[*] Binary protection state of libglib-2.0.so.0.6800.4
Full RELRO No Canary found NX enabled DSO No RPATH No RUNPATH No Symbols
[*] Function popen tear down of libglib-2.0.so.0.6800.4
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/libglib-2.0.so.0.6800.4 @ 0x4adb4 */
| #include <stdint.h>
|
; (fcn) sym.g_regex_replace_eval () | void g_regex_replace_eval (int16_t arg_40h, int16_t arg_44h, int16_t arg_4ch, uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_10h;
| int16_t var_14h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0004adb4 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0004adb8 movs r5, 0 | r5 = 0;
0x0004adba sub sp, 0x1c |
0x0004adbc mov sl, r0 | sl = r0;
0x0004adbe ldr r4, [sp, 0x40] | r4 = *(arg_40h);
0x0004adc0 ldrd r7, r8, [sp, 0x44] | __asm ("ldrd r7, r8, [arg_44h]");
0x0004adc4 str r5, [sp, 0x14] | var_14h = r5;
0x0004adc6 cmp r0, 0 |
| if (arg_40h == ) {
0x0004adc8 beq 0x4aebe | goto label_2;
| }
0x0004adca mov r6, r1 | r6 = r1;
0x0004adcc cmp r1, 0 |
| if (r1 == 0) {
0x0004adce beq.w 0x4aeda | goto label_3;
| }
0x0004add2 cmp r3, 0 |
0x0004add4 mov fp, r3 |
| if (r3 < 0) {
0x0004add6 blt 0x4ae7c | goto label_4;
| }
0x0004add8 cmp r7, 0 |
| if (r7 == 0) {
0x0004adda beq.w 0x4aef6 | goto label_5;
| }
0x0004adde movw r3, 0x7a6f |
0x0004ade2 movt r3, 0xe60f | r3 = 0xe60f7a6f;
0x0004ade6 ands r3, r4 | r3 &= r4;
0x0004ade8 cmp r3, 0 |
| if (r3 != 0) {
0x0004adea bne 0x4ae98 | goto label_6;
| }
0x0004adec cmp r2, 0 |
0x0004adee mov sb, r2 | sb = r2;
0x0004adf0 it ge |
| if (r2 < 0) {
0x0004adf2 movge r0, r2 | r0 = r2;
| }
| if (r2 < 0) {
0x0004adf4 blt 0x4aeb4 | goto label_7;
| }
| label_0:
0x0004adf6 bl 0x539b8 | g_string_sized_new ();
0x0004adfa mov r3, fp | r3 = fp;
0x0004adfc add r2, sp, 0x10 | r2 += var_10h;
0x0004adfe mov r5, r0 | r5 = r0;
0x0004ae00 mov.w fp, 0 |
0x0004ae04 mov r0, sl | r0 = sl;
0x0004ae06 add.w sl, sp, 0x14 | sl += var_14h;
0x0004ae0a str r2, [sp, 4] | var_4h = r2;
0x0004ae0c mov r1, r6 | r1 = r6;
0x0004ae0e mov r2, sb | r2 = sb;
0x0004ae10 str r4, [sp] | *(sp) = r4;
0x0004ae12 str.w sl, [sp, 8] | __asm ("str.w sl, [var_8h]");
0x0004ae16 bl 0x4a648 | g_regex_match_full ();
| do {
0x0004ae1a ldr r0, [sp, 0x10] | r0 = var_10h;
0x0004ae1c bl 0x490b8 | r0 = g_match_info_matches ();
0x0004ae20 mov r3, r0 | r3 = r0;
0x0004ae22 add.w r1, r6, fp | r1 = r6 + fp;
0x0004ae26 mov r0, r5 | r0 = r5;
| if (r3 == 0) {
0x0004ae28 cbz r3, 0x4ae54 | goto label_8;
| }
0x0004ae2a ldr r3, [sp, 0x10] | r3 = var_10h;
0x0004ae2c ldr r3, [r3, 0x18] | r3 = *((r3 + 0x18));
0x0004ae2e ldr r2, [r3] | r2 = *(r3);
0x0004ae30 sub.w r2, r2, fp | r2 -= fp;
0x0004ae34 bl 0x53dbc | g_string_append_len ();
0x0004ae38 mov r1, r5 | r1 = r5;
0x0004ae3a ldr r0, [sp, 0x10] | r0 = var_10h;
0x0004ae3c mov r2, r8 | r2 = r8;
0x0004ae3e blx r7 | r0 = uint32_t (*r7)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x0004ae40 mov r4, r0 | r4 = r0;
0x0004ae42 ldr r0, [sp, 0x10] | r0 = var_10h;
0x0004ae44 mov r1, sl | r1 = sl;
0x0004ae46 ldr r3, [r0, 0x18] | r3 = *((r0 + 0x18));
0x0004ae48 ldr.w fp, [r3, 4] | fp = *((r3 + 4));
0x0004ae4c bl 0x49484 | g_match_info_next ();
0x0004ae50 cmp r4, 0 |
0x0004ae52 beq 0x4ae1a |
| } while (r4 == 0);
| label_8:
0x0004ae54 ldr r0, [sp, 0x10] | r0 = var_10h;
0x0004ae56 bl 0x4a308 | g_match_info_free ();
0x0004ae5a ldr r4, [sp, 0x14] | r4 = var_14h;
0x0004ae5c cmp r4, 0 |
| if (r4 != 0) {
0x0004ae5e bne 0x4af0e | goto label_9;
| }
0x0004ae60 add.w r1, r6, fp | r1 = r6 + fp;
0x0004ae64 sub.w r2, sb, fp | r2 = sb - fp;
0x0004ae68 mov r0, r5 | r0 = r5;
0x0004ae6a bl 0x53dbc | g_string_append_len ();
0x0004ae6e mov r1, r4 | r1 = r4;
0x0004ae70 mov r0, r5 | r0 = r5;
0x0004ae72 bl 0x53a00 | g_string_free ();
| do {
| label_1:
0x0004ae76 add sp, 0x1c |
0x0004ae78 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_4:
0x0004ae7c ldr r1, [pc, 0xa4] |
0x0004ae7e ldr r2, [pc, 0xa8] |
0x0004ae80 ldr r0, [pc, 0xa8] |
0x0004ae82 add r1, pc |
0x0004ae84 add r2, pc | r2 = 0x95db2;
0x0004ae86 add.w r1, r1, 0x21c | r1 = 0x95fc6;
0x0004ae8a add r0, pc | r0 = 0x95dba;
0x0004ae8c bl 0x41bf8 | g_return_if_fail_warning ();
0x0004ae90 mov r0, r5 | r0 = r5;
0x0004ae92 add sp, 0x1c |
0x0004ae94 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_6:
0x0004ae98 ldr r1, [pc, 0x94] |
0x0004ae9a ldr r2, [pc, 0x98] |
0x0004ae9c ldr r0, [pc, 0x98] |
0x0004ae9e add r1, pc |
0x0004aea0 add r2, pc | r2 = 0x95dda;
0x0004aea2 add.w r1, r1, 0x21c | r1 = 0x95fee;
0x0004aea6 add r0, pc | r0 = 0x95de2;
0x0004aea8 bl 0x41bf8 | g_return_if_fail_warning ();
0x0004aeac mov r0, r5 | r0 = r5;
0x0004aeae add sp, 0x1c |
0x0004aeb0 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_7:
0x0004aeb4 mov r0, r1 | r0 = r1;
0x0004aeb6 blx 0x16fd0 | r0 = fcn_00016fd0 ();
0x0004aeb8 stm.w ip, {r0, r7, sb, sl, lr} | *(ip) = r0;
| *((ip + 4)) = r7;
| *((ip + 8)) = sb;
| *((ip + 12)) = sl;
| *((ip + 16)) = lr;
0x0004aebc b 0x4adf6 | goto label_0;
| label_2:
0x0004aebe ldr r1, [pc, 0x7c] |
0x0004aec0 ldr r2, [pc, 0x7c] |
0x0004aec2 ldr r0, [pc, 0x80] |
0x0004aec4 add r1, pc |
0x0004aec6 add r2, pc | r2 = 0x95e0a;
0x0004aec8 add.w r1, r1, 0x21c | r1 = 0x96022;
0x0004aecc add r0, pc | r0 = 0x95e16;
0x0004aece bl 0x41bf8 | g_return_if_fail_warning ();
0x0004aed2 mov r0, sl | r0 = sl;
0x0004aed4 add sp, 0x1c |
0x0004aed6 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_3:
0x0004aeda ldr r1, [pc, 0x6c] |
0x0004aedc ldr r2, [pc, 0x6c] |
0x0004aede ldr r0, [pc, 0x70] |
0x0004aee0 add r1, pc |
0x0004aee2 add r2, pc | r2 = 0x95e32;
0x0004aee4 add.w r1, r1, 0x21c | r1 = 0x9604a;
0x0004aee8 add r0, pc | r0 = 0x95e3e;
0x0004aeea bl 0x41bf8 | g_return_if_fail_warning ();
0x0004aeee mov r0, r6 | r0 = r6;
0x0004aef0 add sp, 0x1c |
0x0004aef2 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_5:
0x0004aef6 ldr r1, [pc, 0x5c] |
0x0004aef8 ldr r2, [pc, 0x5c] |
0x0004aefa ldr r0, [pc, 0x60] |
0x0004aefc add r1, pc |
0x0004aefe add r2, pc | r2 = 0x95e5a;
0x0004af00 add.w r1, r1, 0x21c | r1 = 0x96072;
0x0004af04 add r0, pc | r0 = 0x95e66;
0x0004af06 bl 0x41bf8 | g_return_if_fail_warning ();
0x0004af08 mrc2 p6, 3, r4, c7, c8, 1 | __asm ("mrc2 p6, 3, r4, c7, c8, 1");
0x0004af0c b 0x4ae76 |
| } while (1);
| label_9:
0x0004af0e ldr r0, [sp, 0x4c] | r0 = *(arg_4ch);
0x0004af10 mov r1, r4 | r1 = r4;
0x0004af12 bl 0x2d310 | g_propagate_error ();
0x0004af16 movs r1, 1 | r1 = 1;
0x0004af18 mov r0, r5 | r0 = r5;
0x0004af1a bl 0x53a00 | g_string_free ();
0x0004af1e movs r0, 0 | r0 = 0;
0x0004af20 b 0x4ae76 | goto label_1;
| }
[*] Function popen used 1 times libglib-2.0.so.0.6800.4