[*] Binary protection state of libjq.so.1.0.4
Full RELRO Canary found NX enabled DSO No RPATH No RUNPATH No Symbols
[*] Function printf tear down of libjq.so.1.0.4
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libjq.so.1.0.4 @ 0x13e74 */
| #include <stdint.h>
|
; (fcn) fcn.00013e74 () | void fcn_00013e74 (int16_t arg1, int16_t arg2) {
| int16_t var_8h_2;
| int16_t var_18h_2;
| int16_t var_28h;
| int16_t var_3ch;
| int16_t var_60h;
| int16_t var_8h;
| int16_t var_18h;
| r0 = arg1;
| r1 = arg2;
0x00013e74 push {r1, r7, ip, sp, pc} |
0x00013e78 blx lr | lr ();
0x00013e7a sub sp, 0x40 |
0x00013e7c mov r4, r0 | r4 = r0;
0x00013e7e add r0, sp, 0x60 | r0 += var_60h;
0x00013e80 mov r6, r1 | r6 = r1;
0x00013e82 stm.w r0, {r2, r3} | *(r0) = r2;
| *((r0 + 4)) = r3;
0x00013e86 ldr r2, [pc, 0x110] |
0x00013e88 ldr r3, [pc, 0x110] | r3 = *(0x13f9c);
0x00013e8a ldr r1, [r1, 0x60] | r1 = *((r1 + 0x60));
0x00013e8c add r2, pc | r2 = 0x27e2a;
0x00013e8e ldr r3, [r2, r3] |
0x00013e90 ldr r3, [r3] | r3 = *(0x27e2a);
0x00013e92 str r3, [sp, 0x3c] | var_3ch = r3;
0x00013e94 mov.w r3, 0 | r3 = 0;
| if (r1 == 0) {
0x00013e98 cbnz r1, 0x13eaa |
0x00013e9a add.w r7, r6, 0x40 | r7 = r6 + 0x40;
0x00013e9e ldm.w r7, {r0, r1, r2, r3} | r0 = *(r7);
| r1 = *((r7 + 4));
| r2 = *((r7 + 8));
| r3 = *((r7 + 12));
0x00013ea2 blx 0x4d3c | r0 = fcn_00004d3c ();
0x00013ea6 cmp r0, 6 |
| if (r0 == 6) {
0x00013ea8 beq 0x13ee4 | goto label_2;
| }
| }
0x00013eaa add r5, sp, 0x80 | r5 += var_18h;
| do {
0x00013eac add r3, sp, 0x60 | r3 += var_60h;
0x00013eae ldm r3, {r0, r1, r2, r3} | r0 = *(r3);
| r1 = *((r3 + 4));
| r2 = *((r3 + 8));
| r3 = *((r3 + 12));
0x00013eb0 blx 0x5190 | fcn_00005190 ();
| label_0:
0x00013eb4 add r3, sp, 0x70 | r3 += var_8h;
0x00013eb6 ldm r3, {r0, r1, r2, r3} | r0 = *(r3);
| r1 = *((r3 + 4));
| r2 = *((r3 + 8));
| r3 = *((r3 + 12));
0x00013eb8 blx 0x5190 | r0 = fcn_00005190 ();
0x00013ebc ldm.w r5, {r0, r1, r2, r3} | r0 = *(r5);
| r1 = *((r5 + 4));
| r2 = *((r5 + 8));
| r3 = *((r5 + 12));
0x00013ec0 stm.w r4, {r0, r1, r2, r3} | *(r4) = r0;
| *((r4 + 4)) = r1;
| *((r4 + 8)) = r2;
| *((r4 + 12)) = r3;
| label_1:
0x00013ec4 ldr r2, [pc, 0xd8] |
0x00013ec6 ldr r3, [pc, 0xd4] | r3 = *(0x13f9e);
0x00013ec8 add r2, pc | r2 = 0x27e6c;
0x00013eca ldr r3, [r2, r3] | r3 = *(0x27e6c);
0x00013ecc ldr r2, [r3] | r2 = *(0x27e6c);
0x00013ece ldr r3, [sp, 0x3c] | r3 = var_3ch;
0x00013ed0 eors r2, r3 | r2 ^= r3;
0x00013ed2 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00013ed6 bne 0x13f94 | goto label_3;
| }
0x00013ed8 mov r0, r4 | r0 = r4;
0x00013eda add sp, 0x40 |
0x00013edc pop.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00013ee0 add sp, 8 |
0x00013ee2 bx lr | return;
| label_2:
0x00013ee4 add r5, sp, 0x80 | r5 += var_18h;
0x00013ee6 add.w r8, sp, 0x28 | r8 += var_28h;
0x00013eea ldm.w r5, {r0, r1, r2, r3} | r0 = *(r5);
| r1 = *((r5 + 4));
| r2 = *((r5 + 8));
| r3 = *((r5 + 12));
0x00013eee stm.w r8, {r0, r1, r2, r3} | *(r8) = r0;
| *((r8 + 4)) = r1;
| *((r8 + 8)) = r2;
| *((r8 + 12)) = r3;
0x00013ef2 blx 0x4d3c | r0 = fcn_00004d3c ();
0x00013ef6 cmp r0, 0 |
0x00013ef8 beq 0x13eac |
| } while (r0 == 0);
0x00013efa add.w sl, r6, 0x58 | sl = r6 + 0x58;
0x00013efe add.w sb, r6, 0x50 | sb = r6 + 0x50;
0x00013f02 ldm.w sl, {r0, r1} | r0 = *(sl);
| r1 = *((sl + 4));
0x00013f06 stm.w sp, {r0, r1} | *(sp) = r0;
| *((sp + 4)) = r1;
0x00013f0a mov r0, r8 | r0 = r8;
0x00013f0c ldm.w sb, {r2, r3} | r2 = *(sb);
| r3 = *((sb + 4));
0x00013f10 blx 0x4b28 | r0 = strrchr (r0, r1);
0x00013f14 ldm.w r8, {r0, r1, r2, r3} | r0 = *(r8);
| r1 = *((r8 + 4));
| r2 = *((r8 + 8));
| r3 = *((r8 + 12));
0x00013f16 movs r7, r1 | r7 = r1;
0x00013f18 stm.w sp, {r0, r1, r2, r3} | *(sp) = r0;
| *((sp + 4)) = r1;
| *((sp + 8)) = r2;
| *((sp + 12)) = r3;
0x00013f1c add r3, sp, 0x60 | r3 += var_60h;
0x00013f1e ldm r3, {r0, r1, r2, r3} | r0 = *(r3);
| r1 = *((r3 + 4));
| r2 = *((r3 + 8));
| r3 = *((r3 + 12));
0x00013f20 blx 0x4a20 | r0 = printf_chk ()
0x00013f24 cmp r0, 0 |
| if (r0 == 0) {
0x00013f26 beq 0x13eb4 | goto label_0;
| }
0x00013f28 add.w r8, sp, 0x70 | r8 += var_8h;
0x00013f2c adds r6, 0x48 | r6 += 0x48;
0x00013f2e ldm.w r8, {r0, r1, r2, r3} | r0 = *(r8);
| r1 = *((r8 + 4));
| r2 = *((r8 + 8));
| r3 = *((r8 + 12));
0x00013f32 blx 0x4d3c | r0 = fcn_00004d3c ();
0x00013f36 cmp r0, 6 |
0x00013f38 ldm.w r8, {r0, r1, r2, r3} | r0 = *(r8);
| r1 = *((r8 + 4));
| r2 = *((r8 + 8));
| r3 = *((r8 + 12));
0x00013f3c add.w ip, sp, 8 |
0x00013f40 stm.w ip, {r0, r1, r2, r3} | *(ip) = r0;
| *((ip + 4)) = r1;
| *((ip + 8)) = r2;
| *((ip + 12)) = r3;
0x00013f44 ldm.w r6, {r0, r1} | r0 = *(r6);
| r1 = *((r6 + 4));
0x00013f48 add r6, sp, 0x18 | r6 += var_18h_2;
0x00013f4a stm.w sp, {r0, r1} | *(sp) = r0;
| *((sp + 4)) = r1;
0x00013f4e mov r0, r6 | r0 = r6;
0x00013f50 ldm.w r7, {r2, r3} | r2 = *(r7);
| r3 = *((r7 + 4));
| if (r0 == 6) {
0x00013f54 beq 0x13f86 | goto label_4;
| }
0x00013f56 blx 0x47f8 | r0 = fcn_000047f8 ();
0x00013f5a ldm.w r6, {r0, r1, r2, r3} | r0 = *(r6);
| r1 = *((r6 + 4));
| r2 = *((r6 + 8));
| r3 = *((r6 + 12));
0x00013f5e stm.w r7, {r0, r1, r2, r3} | *(r7) = r0;
| *((r7 + 4)) = r1;
| *((r7 + 8)) = r2;
| *((r7 + 12)) = r3;
| do {
0x00013f62 ldm.w sb, {r0, r1, r2, r3} | r0 = *(sb);
| r1 = *((sb + 4));
| r2 = *((sb + 8));
| r3 = *((sb + 12));
0x00013f66 blx 0x5190 | r0 = fcn_00005190 ();
0x00013f6a ldm.w r5, {r0, r1, r2, r3} | r0 = *(r5);
| r1 = *((r5 + 4));
| r2 = *((r5 + 8));
| r3 = *((r5 + 12));
0x00013f6e stm.w sb, {r0, r1, r2, r3} | *(sb) = r0;
| *((sb + 4)) = r1;
| *((sb + 8)) = r2;
| *((sb + 12)) = r3;
0x00013f72 ldm.w sl, {r0, r1} | r0 = *(sl);
| r1 = *((sl + 4));
0x00013f76 ldm.w sb, {r2, r3} | r2 = *(sb);
| r3 = *((sb + 4));
0x00013f7a stm.w sp, {r0, r1} | *(sp) = r0;
| *((sp + 4)) = r1;
0x00013f7e mov r0, r4 | r0 = r4;
0x00013f80 blx 0x4b28 | strrchr (r0, r1);
0x00013f84 b 0x13ec4 | goto label_1;
| label_4:
0x00013f86 blx 0x48d4 | r0 = fcn_000048d4 ();
0x00013f8a ldm.w r6, {r0, r1, r2, r3} | r0 = *(r6);
| r1 = *((r6 + 4));
| r2 = *((r6 + 8));
| r3 = *((r6 + 12));
0x00013f8e stm.w r7, {r0, r1, r2, r3} | *(r7) = r0;
| *((r7 + 4)) = r1;
| *((r7 + 8)) = r2;
| *((r7 + 12)) = r3;
0x00013f92 b 0x13f62 |
| } while (1);
| label_3:
0x00013f94 blx 0x50a8 | fcn_000050a8 ();
0x00013f98 cmp r4, 0xc8 |
0x00013f9a movs r3, r0 | r3 = r0;
0x00013f9c lsls r0, r7, 0x11 | r0 = r7 << 0x11;
0x00013f9e movs r0, r0 |
0x00013fa0 cmp r4, 0x8c |
0x00013fa2 movs r3, r0 | r3 = r0;
| }
[*] Function printf used 2 times libjq.so.1.0.4