[*] Binary protection state of ubinfo
Full RELRO Canary found NX enabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of ubinfo
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/ubinfo @ 0x1164 */
| #include <stdint.h>
|
; (fcn) fcn.00001164 () | void fcn_00001164 (int16_t arg_8h, int16_t arg_14h, int16_t arg_18h, int16_t arg_1ch, int16_t arg_20h, int16_t arg_90h, int16_t arg_94h, int16_t arg_14ch) {
| int16_t var_0h;
| int16_t var_4h;
| do {
| label_0:
0x00000bb0 movs r2, 0 | r2 = 0;
0x00000bb2 mov r3, fp | r3 = fp;
0x00000bb4 str r2, [sp] | *(sp) = r2;
0x00000bb6 mov r1, r8 | r1 = r8;
0x00000bb8 str r2, [r5] | *(r5) = r2;
0x00000bba mov r0, r7 | r0 = r7;
0x00000bbc mov r2, sb | r2 = sb;
0x00000bbe blx 0xa84 | r0 = fcn_00000a84 ();
0x00000bc2 adds r4, r0, 1 | r4 = r0 + 1;
| if (r4 == r0) {
0x00000bc4 beq.w 0xd1a | goto label_11;
| }
0x00000bc8 subs r0, 0x3a | r0 -= 0x3a;
0x00000bca cmp r0, 0x34 |
| if (r0 <= 0x34) {
0x00000bcc bhi 0xc08 |
| /* switch table (53 cases) at 0xbd2 */
0x00000bce tbb [pc, r0] | __asm ("tbb [0x00000bd4]");
| }
0x00000c08 ldr.w r3, [pc, 0x448] |
0x00000c0c movs r2, 0x10 | r2 = 0x10;
0x00000c0e ldr.w r0, [pc, 0x448] |
0x00000c12 movs r1, 1 | r1 = 1;
0x00000c14 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00000c16 add r0, pc | r0 = 0x1c74;
0x00000c18 ldr r3, [r3] | r3 = *(0x1054);
0x00000c1a blx 0xa14 | fcn_00000a14 ();
| label_1:
0x00000c1e mov.w r4, -1 | r4 = -1;
| label_2:
0x00000c22 ldr.w r2, [pc, 0x438] | r2 = *(0x0000105c);
0x00000c26 ldr.w r3, [pc, 0x418] | r3 = *(0x1042);
0x00000c2a add r2, pc | r2 += pc;
0x00000c2c ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x00000c2e ldr r2, [r3] | r2 = *(0x1042);
0x00000c30 ldr r3, [sp, 0x14c] | r3 = *(arg_14ch);
0x00000c32 eors r2, r3 | r2 ^= r3;
0x00000c34 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00000c38 bne.w 0xfe4 | goto label_12;
| }
0x00000c3c mov r0, r4 | r0 = r4;
0x00000c3e add sp, 0x154 |
0x00000c40 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x00000c44 ldr.w r3, [pc, 0x418] | r3 = *(0x1060);
0x00000c48 mov r1, r5 | r1 = r5;
0x00000c4a ldr r4, [r6, r3] | r4 = *((r6 + r3));
0x00000c4c ldr r0, [r4] | r0 = *(r4);
0x00000c4e bl 0x18f8 | fcn_000018f8 (r0, r1);
0x00000c52 ldr.w r2, [pc, 0x410] | r2 = *(0x00001064);
0x00000c54 movs r4, 0x10 | r4 = 0x10;
0x00000c56 ldr r3, [r5] | r3 = *(r5);
0x00000c58 add r2, pc | r2 += pc;
0x00000c5a str r0, [r2, 4] | *((r2 + 4)) = r0;
| if (r3 != 0) {
0x00000c5c cbnz r3, 0xc62 | goto label_13;
| }
0x00000c5e cmp r0, 0 |
0x00000c60 bge 0xbb0 |
| } while (r0 >= 0);
| label_13:
0x00000c62 ldr.w r3, [pc, 0x404] |
0x00000c66 ldr.w r2, [pc, 0x404] |
0x00000c6a ldr r1, [pc, 0x3e8] | r1 = *(0x1056);
0x00000c6c ldr r4, [r4] | r4 = *(r4);
0x00000c6e add r3, pc | r3 = 0x1cdc;
0x00000c70 add r2, pc | r2 = 0x1ce2;
0x00000c72 b 0xcc6 | goto label_14;
0x00000c74 ldr r4, [pc, 0x3f8] |
0x00000c76 movs r0, 1 | r0 = 1;
0x00000c78 ldr r5, [pc, 0x3f8] |
0x00000c7a add r4, pc | r4 = 0x1cee;
0x00000c7c add r5, pc | r5 = 0x1cf4;
0x00000c7e mov r2, r4 | r2 = r4;
0x00000c80 mov r1, r5 | r1 = r5;
0x00000c82 blx 0xb24 | fprintf_chk ()
0x00000c84 vrhadd.s16 d31, d0, d4 | __asm ("vrhadd.s16 d31, d0, d4");
0x00000c88 lsls r0, r7, 8 | r0 = r7 << 8;
0x00000c8a mov r1, r5 | r1 = r5;
0x00000c8c movs r0, 1 | r0 = 1;
0x00000c8e blx 0xb24 | fprintf_chk ()
0x00000c92 add.w r0, r4, 0x310 | r0 = r4 + 0x310;
0x00000c96 blx 0xa54 | fcn_00000a54 ();
0x00000c9a movs r0, 0 | r0 = 0;
0x00000c9c blx 0xa9c | fcn_00000a9c ();
0x00000ca0 ldr r3, [pc, 0x3bc] | r3 = *(0x1060);
0x00000ca2 mov r1, r5 | r1 = r5;
0x00000ca4 ldr r4, [r6, r3] | r4 = *((r6 + r3));
0x00000ca6 ldr r0, [r4] | r0 = *(r4);
| label_10:
0x00000ca8 bl 0x18f8 | fcn_000018f8 (r0, r1);
0x00000cac ldr r3, [r5] | r3 = *(r5);
0x00000cae str.w r0, [sl] | __asm ("str.w r0, [sl]");
| if (r3 != 0) {
0x00000cb2 cbnz r3, 0xcba | goto label_15;
| }
0x00000cb4 cmp r0, 0 |
| if (r0 >= 0) {
0x00000cb6 bge.w 0xbb0 | goto label_0;
| }
| label_15:
0x00000cba ldr r3, [pc, 0x3bc] |
0x00000cbc ldr r2, [pc, 0x3bc] |
0x00000cbe ldr r1, [pc, 0x394] | r1 = *(0x1056);
0x00000cc0 ldr r4, [r4] | r4 = *(r4);
0x00000cc2 add r3, pc | r3 = 0x1d40;
0x00000cc4 add r2, pc | r2 = 0x1d44;
| label_14:
0x00000cc6 ldr r0, [r6, r1] | r0 = *((r6 + r1));
0x00000cc8 movs r1, 1 | r1 = 1;
0x00000cca str r4, [sp] | *(sp) = r4;
0x00000ccc ldr r0, [r0] | r0 = *(r0);
0x00000cce blx 0xb30 | readdir64 ();
0x00000cd2 b 0xc1e | goto label_1;
0x00000cd4 ldr r3, [pc, 0x3a8] |
0x00000cd6 movs r2, 1 | r2 = 1;
0x00000cd8 add r3, pc | r3 = 0x1d5c;
0x00000cda str r2, [r3, 8] | *((r3 + 8)) = r2;
0x00000cdc b 0xbb0 | goto label_0;
0x00000cde ldr r3, [pc, 0x3a4] |
0x00000ce0 movs r0, 1 | r0 = 1;
0x00000ce2 ldr r2, [pc, 0x3a4] |
0x00000ce4 ldr r1, [pc, 0x3a4] |
0x00000ce6 add r3, pc | r3 = 0x1d70;
0x00000ce8 add r2, pc | r2 = 0x1d76;
0x00000cea add r1, pc | r1 = 0x1d7a;
0x00000cec blx 0xb24 | fprintf_chk ()
0x00000cf0 movs r0, 0 | r0 = 0;
0x00000cf2 blx 0xa9c | fcn_00000a9c ();
0x00000cf6 ldr r3, [pc, 0x368] | r3 = *(0x1062);
0x00000cf8 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00000cfa ldr r2, [r3] | r2 = *(0x1062);
0x00000cfc ldr r3, [pc, 0x390] |
0x00000cfe add r3, pc | r3 = 0x1d92;
0x00000d00 str r2, [r3, 0x10] | *((r3 + 0x10)) = r2;
0x00000d02 b 0xbb0 | goto label_0;
0x00000d04 ldr r0, [pc, 0x34c] |
0x00000d06 movs r1, 1 | r1 = 1;
0x00000d08 ldr r3, [pc, 0x388] |
0x00000d0a ldr r2, [pc, 0x38c] |
0x00000d0c ldr r0, [r6, r0] | r0 = *((r6 + r0));
0x00000d0e add r3, pc | r3 = 0x1da6;
0x00000d10 add r2, pc | r2 = 0x1dae;
0x00000d12 ldr r0, [r0] | r0 = *(0x1054);
0x00000d14 blx 0xb30 | readdir64 ();
0x00000d16 vabd.s8 d14, d28, d1 | __asm ("vabd.s8 d14, d28, d1");
| label_11:
0x00000d1a ldr r3, [pc, 0x380] |
0x00000d1c subs r2, r7, 1 | r2 = r7 - 1;
0x00000d1e mov r4, r0 | r4 = r0;
0x00000d20 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00000d22 ldr r3, [r3] | r3 = *(0x109e);
0x00000d24 cmp r2, r3 |
| if (r2 == r3) {
0x00000d26 beq.w 0xf08 | goto label_16;
| }
0x00000d2a cmp r7, r3 |
| if (r7 > r3) {
0x00000d2c bgt.w 0x1024 | goto label_17;
| }
| label_6:
0x00000d30 bl 0x24fc | r0 = fcn_000024fc ();
0x00000d34 mov r7, r0 | r7 = r0;
| if (r0 == 0) {
0x00000d36 cbz r0, 0xd9e | goto label_18;
| }
0x00000d38 ldr r3, [pc, 0x364] |
0x00000d3a add r3, pc | r3 = 0x1dde;
0x00000d3c ldr r1, [r3, 0xc] | r1 = *(0x1dea);
| if (r1 != 0) {
0x00000d3e cbz r1, 0xd48 |
0x00000d40 bl 0x122c | r0 = fcn_0000122c (r0, r1);
0x00000d44 cmp r0, 0 |
| if (r0 != 0) {
0x00000d46 bne 0xdd0 | goto label_5;
| }
| }
0x00000d48 ldr.w r8, [pc, 0x358] | r8 = *(0x000010a4);
0x00000d4c add r8, pc | r8 += pc;
0x00000d4e ldr.w sb, [r8, 0x10] | sb = *((r8 + 0x10));
0x00000d52 ldr.w sl, [r8] | sl = *(r8);
0x00000d56 cmp.w sb, 0 |
| if (sb != 0) {
0x00000d5a beq 0xd7c |
0x00000d5c cmp.w sl, -1 |
| if (sl == -1) {
0x00000d60 beq.w 0xfb8 | goto label_19;
| }
0x00000d64 add r3, sp, 0x90 | r3 += arg_90h;
0x00000d66 mov r2, sb | r2 = sb;
0x00000d68 mov r1, sl | r1 = sl;
0x00000d6a mov r0, r7 | r0 = r7;
0x00000d6c bl 0x402c | r0 = fcn_0000402c (r0, r1, r2, r3);
0x00000d70 cmp r0, 0 |
| if (r0 != 0) {
0x00000d72 bne.w 0xf78 | goto label_20;
| }
0x00000d76 ldr r3, [sp, 0x94] | r3 = *(arg_94h);
0x00000d78 str.w r3, [r8, 4] | __asm ("str.w r3, [r8, 4]");
| }
0x00000d7c ldr r3, [pc, 0x328] |
0x00000d7e add r3, pc | r3 = 0x1e2a;
0x00000d80 ldrd r1, r2, [r3] | __asm ("ldrd r1, r2, [r3]");
0x00000d84 adds r0, r2, 1 | r0 = r2 + 1;
| if (r0 == r2) {
0x00000d86 beq 0xdbc | goto label_21;
| }
0x00000d88 adds r0, r1, 1 | r0 = r1 + 1;
| if (r0 == r1) {
0x00000d8a beq.w 0xfce | goto label_22;
| }
0x00000d8e mov r0, r7 | r0 = r7;
0x00000d90 bl 0x1400 | fcn_00001400 (r0, r1);
| do {
| label_3:
0x00000d94 mov r0, r7 | r0 = r7;
0x00000d96 movs r4, 0 | r4 = 0;
0x00000d98 bl 0x245c | fcn_0000245c (r0);
0x00000d9c b 0xc22 | goto label_2;
| label_18:
0x00000d9e blx 0xacc | fcn_00000acc ();
0x00000da2 ldr r3, [pc, 0x2b0] | r3 = *(0x1056);
0x00000da4 ldr r5, [r0] | r5 = *(r0);
0x00000da6 ldr r6, [r6, r3] | r6 = *((r6 + r3));
0x00000da8 ldr r0, [r6] | r0 = *(r6);
| if (r5 != 0) {
0x00000daa cbnz r5, 0xdd8 | goto label_23;
| }
0x00000dac ldr r3, [pc, 0x2fc] |
0x00000dae movs r1, 1 | r1 = 1;
0x00000db0 ldr r2, [pc, 0x2fc] |
0x00000db2 add r3, pc | r3 = 0x1e62;
0x00000db4 add r2, pc | r2 = 0x1e68;
0x00000db6 blx 0xb30 | readdir64 ();
0x00000dba b 0xc22 | goto label_2;
| label_21:
0x00000dbc ldr.w sb, [r3, 8] | sb = *((r3 + 8));
0x00000dc0 adds r3, r1, 1 | r3 = r1 + 1;
| if (r3 == r1) {
0x00000dc2 beq 0xe08 | goto label_24;
| }
0x00000dc4 mov r2, sb | r2 = sb;
0x00000dc6 mov r0, r7 | r0 = r7;
0x00000dc8 bl 0x1590 | r0 = fcn_00001590 (r0, r1, r2);
0x00000dcc cmp r0, 0 |
0x00000dce beq 0xd94 |
| } while (r0 == 0);
| label_5:
0x00000dd0 mov r0, r7 | r0 = r7;
0x00000dd2 bl 0x245c | fcn_0000245c (r0);
0x00000dd6 b 0xc22 | goto label_2;
| label_23:
0x00000dd8 ldr r3, [pc, 0x2d8] |
0x00000dda movs r1, 1 | r1 = 1;
0x00000ddc ldr r2, [pc, 0x2d8] |
0x00000dde add r3, pc | r3 = 0x1e96;
0x00000de0 add r2, pc | r2 = 0x1e9c;
0x00000de2 blx 0xb30 | readdir64 ();
0x00000de6 mov r0, r5 | r0 = r5;
0x00000de8 ldr r6, [r6] | r6 = *(r6);
0x00000dea blx 0xa6c | fcn_00000a6c ();
0x00000dee ldr r1, [pc, 0x2cc] |
0x00000df0 movs r3, 8 | r3 = 8;
0x00000df2 ldr r2, [pc, 0x2cc] |
0x00000df4 strd r5, r0, [sp, 4] | __asm ("strd r5, r0, [sp, 4]");
0x00000df8 mov r0, r6 | r0 = r6;
0x00000dfa add r1, pc | r1 = 0x1ebc;
0x00000dfc str r1, [sp] | *(sp) = r1;
0x00000dfe add r2, pc | r2 = 0x1ec4;
0x00000e00 movs r1, 1 | r1 = 1;
0x00000e02 blx 0xb30 | readdir64 ();
0x00000e06 b 0xc22 | goto label_2;
| label_24:
0x00000e08 add.w r8, sp, 0x20 | r8 += arg_20h;
0x00000e0c mov r0, r7 | r0 = r7;
0x00000e0e mov r1, r8 | r1 = r8;
0x00000e10 bl 0x2938 | r0 = fcn_00002938 (r0, r1);
0x00000e14 cmp r0, 0 |
| if (r0 != 0) {
0x00000e16 bne.w 0xfe8 | goto label_25;
| }
0x00000e1a ldr r1, [pc, 0x2a8] |
0x00000e1c movs r0, 1 | r0 = 1;
0x00000e1e ldr.w r2, [r8, 0xc] | r2 = *((r8 + 0xc));
0x00000e22 add r1, pc | r1 = 0x1eec;
0x00000e24 blx 0xb24 | fprintf_chk ()
0x00000e28 ldr r1, [pc, 0x29c] |
0x00000e2a movs r0, 1 | r0 = 1;
0x00000e2c ldr.w r2, [r8] | r2 = *(r8);
0x00000e30 add r1, pc | r1 = 0x1efc;
0x00000e32 blx 0xb24 | fprintf_chk ()
0x00000e36 ldr.w r2, [r8, 0x10] | r2 = *((r8 + 0x10));
0x00000e3a adds r1, r2, 1 | r1 = r2 + 1;
| if (r1 == r2) {
0x00000e3c beq.w 0xf6e | goto label_26;
| }
0x00000e40 ldr r1, [pc, 0x288] |
0x00000e42 movs r0, 1 | r0 = 1;
0x00000e44 ldr.w r3, [r8, 0x14] | r3 = *((r8 + 0x14));
0x00000e48 add r1, pc | r1 = 0x1f18;
0x00000e4a blx 0xb24 | fprintf_chk ()
| label_9:
0x00000e4e ldr.w r3, [r8] | r3 = *(r8);
0x00000e52 cmp r3, 0 |
| if (r3 == 0) {
0x00000e54 beq 0xd94 | goto label_3;
| }
0x00000e56 ldr r1, [pc, 0x278] |
0x00000e58 movs r0, 1 | r0 = 1;
0x00000e5a mov.w sl, 1 | sl = 1;
0x00000e5e add r1, pc | r1 = 0x1f34;
0x00000e60 blx 0xb24 | fprintf_chk ()
0x00000e64 ldr r3, [pc, 0x26c] |
0x00000e66 ldr r2, [pc, 0x270] |
0x00000e68 ldr.w fp, [r8, 4] | fp = *((r8 + 4));
0x00000e6c add r3, pc | r3 = 0x1f44;
0x00000e6e str r4, [sp, 0x14] | *(arg_14h) = r4;
0x00000e70 add r2, pc | r2 = 0x1f4e;
0x00000e72 str r6, [sp, 0x18] | *(arg_18h) = r6;
0x00000e74 mov r4, fp | r4 = fp;
0x00000e76 mov r6, sl | r6 = sl;
0x00000e78 mov fp, r2 |
0x00000e7a mov sl, r3 | sl = r3;
0x00000e7c b 0xe8e |
| while (r0 != 1) {
0x00000e7e cmp r6, 0 |
| if (r6 != 0) {
0x00000e80 bne 0xefa | goto label_27;
| }
0x00000e82 mov r2, r4 | r2 = r4;
0x00000e84 mov r1, fp | r1 = fp;
0x00000e86 movs r0, 1 | r0 = 1;
0x00000e88 blx 0xb24 | fprintf_chk ()
| label_4:
0x00000e8c adds r4, 1 | r4++;
0x00000e8e ldr.w r2, [r8, 8] | r2 = *((r8 + 8));
0x00000e92 cmp r4, r2 |
| if (r4 > r2) {
0x00000e94 bgt 0xf14 | goto label_28;
| }
0x00000e96 mov r2, r5 | r2 = r5;
0x00000e98 mov r1, r4 | r1 = r4;
0x00000e9a mov r0, r7 | r0 = r7;
0x00000e9c bl 0x33bc | fcn_000033bc (r0, r1, r2);
0x00000ea0 adds r0, 1 | r0++;
0x00000ea2 bne 0xe7e |
| }
0x00000ea4 blx 0xacc | r0 = fcn_00000acc ();
0x00000ea8 ldr r2, [r0] | r2 = *(r0);
0x00000eaa cmp r2, 2 |
| if (r2 == 2) {
0x00000eac beq 0xe8c | goto label_4;
| }
0x00000eae str r0, [sp, 0x1c] | *(arg_1ch) = r0;
0x00000eb0 movs r0, 0xa | r0 = 0xa;
0x00000eb2 mov fp, r4 |
0x00000eb4 ldrd r4, r6, [sp, 0x14] | __asm ("ldrd r4, r6, [arg_14h]");
0x00000eb8 blx 0xb00 | strncpy (r0, r1, r2);
0x00000ebc ldr r2, [sp, 0x1c] | r2 = *(arg_1ch);
0x00000ebe movs r1, 1 | r1 = 1;
0x00000ec0 ldr r3, [pc, 0x218] |
0x00000ec2 ldr r5, [r2] | r5 = *(r2);
0x00000ec4 ldr r2, [pc, 0x18c] | r2 = *(0x1054);
0x00000ec6 add r3, pc | r3 = 0x1fa6;
0x00000ec8 ldr r6, [r6, r2] | r6 = *((r6 + r2));
0x00000eca ldr r2, [pc, 0x214] |
0x00000ecc str.w fp, [sp] | __asm ("str.w fp, [sp]");
0x00000ed0 ldr r0, [r6] | r0 = *(r6);
0x00000ed2 add r2, pc | r2 = 0x1fb8;
0x00000ed4 blx 0xb30 | readdir64 ();
0x00000ed8 mov r0, r5 | r0 = r5;
0x00000eda ldr r6, [r6] | r6 = *(r6);
0x00000edc blx 0xa6c | fcn_00000a6c ();
0x00000ee0 ldr r3, [pc, 0x200] |
0x00000ee2 movs r1, 1 | r1 = 1;
0x00000ee4 ldr r2, [pc, 0x200] |
0x00000ee6 str r0, [sp, 8] | *(arg_8h) = r0;
0x00000ee8 mov r0, r6 | r0 = r6;
0x00000eea add r3, pc | r3 = 0x1fd2;
0x00000eec str r5, [sp, 4] | var_4h = r5;
0x00000eee str r3, [sp] | *(sp) = r3;
0x00000ef0 add r2, pc | r2 = 0x1fdc;
0x00000ef2 movs r3, 8 | r3 = 8;
0x00000ef4 blx 0xb30 | readdir64 ();
0x00000ef8 b 0xdd0 | goto label_5;
| label_27:
0x00000efa mov r2, r4 | r2 = r4;
0x00000efc mov r1, sl | r1 = sl;
0x00000efe movs r0, 1 | r0 = 1;
0x00000f00 movs r6, 0 | r6 = 0;
0x00000f02 blx 0xb24 | fprintf_chk ()
0x00000f06 b 0xe8c | goto label_4;
| label_16:
0x00000f08 ldr r3, [pc, 0x1e0] |
0x00000f0a ldr.w r2, [r8, r2, lsl 2] | offset_0 = r2 << 2;
| r2 = *((r8 + offset_0));
0x00000f0e add r3, pc | r3 = 0x1ffe;
0x00000f10 str r2, [r3, 0xc] | *((r3 + 0xc)) = r2;
0x00000f12 b 0xd30 | goto label_6;
| label_28:
0x00000f14 movs r0, 0xa | r0 = 0xa;
0x00000f16 ldr r4, [sp, 0x14] | r4 = *(arg_14h);
0x00000f18 blx 0xb00 | strncpy (r0, r1, r2);
0x00000f1c cmp.w sb, 0 |
| if (sb == 0) {
0x00000f20 beq.w 0xd94 | goto label_3;
| }
0x00000f24 ldr.w sl, [pc, 0x1c8] |
0x00000f28 movs r0, 0xa | r0 = 0xa;
0x00000f2a blx 0xb00 | strncpy (r0, r1, r2);
0x00000f2e movs r6, 1 | r6 = 1;
0x00000f30 ldr.w r5, [r8, 4] | r5 = *((r8 + 4));
0x00000f34 add sl, pc | sl = 0x2028;
0x00000f36 b 0xf4c | goto label_29;
| label_8:
0x00000f38 mov r2, sb | r2 = sb;
0x00000f3a mov r1, r5 | r1 = r5;
0x00000f3c mov r0, r7 | r0 = r7;
0x00000f3e bl 0x1590 | r0 = fcn_00001590 (r0, r1, r2);
0x00000f42 mov r6, r0 | r6 = r0;
0x00000f44 cmp r0, 0 |
| if (r0 != 0) {
0x00000f46 bne.w 0xdd0 | goto label_5;
| }
| label_7:
0x00000f4a adds r5, 1 | r5++;
| label_29:
0x00000f4c ldr.w r3, [r8, 8] | r3 = *((r8 + 8));
0x00000f50 cmp r5, r3 |
| if (r5 > r3) {
0x00000f52 bgt.w 0xd94 | goto label_3;
| }
0x00000f56 mov r1, r5 | r1 = r5;
0x00000f58 mov r0, r7 | r0 = r7;
0x00000f5a bl 0x3344 | r0 = fcn_00003344 (r0, r1);
0x00000f5e cmp r0, 0 |
| if (r0 == 0) {
0x00000f60 beq 0xf4a | goto label_7;
| }
0x00000f62 cmp r6, 0 |
| if (r6 != 0) {
0x00000f64 bne 0xf38 | goto label_8;
| }
0x00000f66 mov r0, sl | r0 = sl;
0x00000f68 blx 0xa54 | fcn_00000a54 ();
0x00000f6c b 0xf38 | goto label_8;
| label_26:
0x00000f6e ldr r0, [pc, 0x184] |
0x00000f70 add r0, pc | r0 = 0x206a;
0x00000f72 blx 0xa54 | fcn_00000a54 ();
0x00000f76 b 0xe4e | goto label_9;
| label_20:
0x00000f78 blx 0xacc | fcn_00000acc ();
0x00000f7c ldr r3, [pc, 0xd4] | r3 = *(0x1054);
0x00000f7e movs r1, 1 | r1 = 1;
0x00000f80 ldr r2, [pc, 0x174] |
0x00000f82 ldr r5, [r0] | r5 = *(r0);
0x00000f84 ldr r6, [r6, r3] | r6 = *((r6 + r3));
0x00000f86 ldr r3, [pc, 0x174] |
0x00000f88 add r2, pc | r2 = 0x2084;
0x00000f8a strd sb, sl, [sp] | __asm ("strd sb, sl, [sp]");
0x00000f8e ldr r0, [r6] | r0 = *(r6);
0x00000f90 add r3, pc | r3 = 0x2092;
0x00000f92 blx 0xb30 | readdir64 ();
0x00000f96 mov r0, r5 | r0 = r5;
0x00000f98 ldr r6, [r6] | r6 = *(r6);
0x00000f9a blx 0xa6c | fcn_00000a6c ();
0x00000f9e ldr r3, [pc, 0x160] |
0x00000fa0 movs r1, 1 | r1 = 1;
0x00000fa2 ldr r2, [pc, 0x160] |
0x00000fa4 str r0, [sp, 8] | *(arg_8h) = r0;
0x00000fa6 mov r0, r6 | r0 = r6;
0x00000fa8 add r3, pc | r3 = 0x20ae;
0x00000faa str r5, [sp, 4] | var_4h = r5;
0x00000fac str r3, [sp] | *(sp) = r3;
0x00000fae add r2, pc | r2 = 0x20b8;
0x00000fb0 movs r3, 8 | r3 = 8;
0x00000fb2 blx 0xb30 | readdir64 ();
0x00000fb6 b 0xdd0 | goto label_5;
| label_19:
0x00000fb8 ldr r2, [pc, 0x98] | r2 = *(0x1054);
0x00000fba movs r1, 1 | r1 = 1;
0x00000fbc ldr r3, [pc, 0x148] |
0x00000fbe ldr r2, [r6, r2] | r2 = *((r6 + r2));
0x00000fc0 add r3, pc | r3 = 0x20cc;
0x00000fc2 ldr r0, [r2] | r0 = *(0x1054);
0x00000fc4 ldr r2, [pc, 0x144] |
0x00000fc6 add r2, pc | r2 = 0x20d6;
0x00000fc8 blx 0xb30 | readdir64 ();
0x00000fcc b 0xdd0 | goto label_5;
| label_22:
0x00000fce ldr r2, [pc, 0x84] | r2 = *(0x1056);
0x00000fd0 movs r1, 1 | r1 = 1;
0x00000fd2 ldr r3, [pc, 0x13c] |
0x00000fd4 ldr r2, [r6, r2] | r2 = *((r6 + r2));
0x00000fd6 add r3, pc | r3 = 0x20ec;
0x00000fd8 ldr r0, [r2] | r0 = *(0x1056);
0x00000fda ldr r2, [pc, 0x138] |
0x00000fdc add r2, pc | r2 = 0x20f6;
0x00000fde blx 0xb30 | readdir64 ();
0x00000fe2 b 0xdd0 | goto label_5;
| label_12:
0x00000fe4 blx 0x9fc | fcn_000009fc ();
| label_25:
0x00000fe8 blx 0xacc | fcn_00000acc ();
0x00000fec ldr r3, [pc, 0x64] | r3 = *(0x1054);
0x00000fee movs r1, 1 | r1 = 1;
0x00000ff0 ldr r2, [pc, 0x124] |
0x00000ff2 ldr r5, [r0] | r5 = *(r0);
0x00000ff4 ldr r6, [r6, r3] | r6 = *((r6 + r3));
0x00000ff6 ldr r3, [pc, 0x124] |
0x00000ff8 add r2, pc | r2 = 0x2114;
0x00000ffa ldr r0, [r6] | r0 = *(r6);
0x00000ffc add r3, pc | r3 = 0x211e;
0x00000ffe blx 0xb30 | readdir64 ();
0x00001002 mov r0, r5 | r0 = r5;
0x00001004 ldr r6, [r6] | r6 = *(r6);
0x00001006 blx 0xa6c | fcn_00000a6c ();
0x0000100a ldr r3, [pc, 0x114] |
0x0000100c movs r1, 1 | r1 = 1;
0x0000100e ldr r2, [pc, 0x114] |
0x00001010 str r0, [sp, 8] | *(arg_8h) = r0;
0x00001012 mov r0, r6 | r0 = r6;
0x00001014 add r3, pc | r3 = 0x213a;
0x00001016 str r5, [sp, 4] | var_4h = r5;
0x00001018 str r3, [sp] | *(sp) = r3;
0x0000101a add r2, pc | r2 = 0x2144;
0x0000101c movs r3, 8 | r3 = 8;
0x0000101e blx 0xb30 | readdir64 ();
0x00001022 b 0xdd0 | goto label_5;
| label_17:
0x00001024 ldr r1, [pc, 0x2c] | r1 = *(0x1054);
0x00001026 ldr r3, [pc, 0x100] |
0x00001028 ldr r2, [pc, 0x100] |
0x0000102a ldr r1, [r6, r1] | r1 = *((r6 + r1));
0x0000102c add r3, pc | r3 = 0x215a;
0x0000102e add r2, pc | r2 = 0x215e;
0x00001030 ldr r0, [r1] | r0 = *(0x1054);
0x00001032 movs r1, 1 | r1 = 1;
0x00001034 blx 0xb30 | readdir64 ();
0x00001038 b 0xc22 | goto label_2;
0x00001164 adds r0, 0x14 | r0 += 0x14;
0x00001166 b 0xca8 | goto label_10;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/ubinfo @ 0x1400 */
| #include <stdint.h>
|
; (fcn) fcn.00001400 () | void fcn_00001400 (int16_t arg2, int16_t arg3) {
| int16_t var_0h_2;
| int16_t var_4h;
| int16_t var_10h;
| int16_t var_18h_2;
| int16_t var_20h_2;
| int16_t var_24h;
| int16_t var_28h;
| int16_t var_30h;
| int16_t var_38h;
| int16_t var_40h;
| int16_t var_44h;
| int16_t var_cch;
| r1 = arg2;
| r2 = arg3;
0x00001400 push.w {r4, r5, r6, r7, r8, lr} |
0x00001404 sub sp, 0xd0 |
0x00001406 ldr r4, [pc, 0x130] |
0x00001408 mov r7, r1 | r7 = r1;
0x0000140a mov r6, r2 | r6 = r2;
0x0000140c ldr r3, [pc, 0x12c] | r3 = *(0x153c);
0x0000140e add r4, pc | r4 = 0x294c;
0x00001410 ldr r5, [pc, 0x12c] |
0x00001412 ldr r3, [r4, r3] |
0x00001414 add r5, pc | r5 = 0x2958;
0x00001416 ldr r3, [r3] | r3 = *(0x294c);
0x00001418 str r3, [sp, 0xcc] | var_cch = r3;
0x0000141a mov.w r3, 0 | r3 = 0;
0x0000141e add r3, sp, 0x10 | r3 += var_10h;
0x00001420 bl 0x3a94 | r0 = fcn_00003a94 (r0, r1, r2, r3);
0x00001424 cmp r0, 0 |
| if (r0 != 0) {
0x00001426 bne 0x14ec | goto label_3;
| }
0x00001428 ldr r1, [pc, 0x118] |
0x0000142a mov r4, r0 | r4 = r0;
0x0000142c ldrd r3, r2, [sp, 0x10] | __asm ("ldrd r3, r2, [var_10h]");
0x00001430 movs r0, 1 | r0 = 1;
0x00001432 add r1, pc | r1 = 0x297a;
0x00001434 blx 0xb24 | fprintf_chk ()
0x00001438 ldr r3, [sp, 0x20] | r3 = var_20h_2;
0x0000143a cmp r3, 3 |
| if (r3 == 3) {
0x0000143c beq 0x14ca | goto label_4;
| }
0x0000143e ldr r2, [pc, 0x108] |
0x00001440 add r2, pc | r2 = 0x298e;
| label_0:
0x00001442 ldr r1, [pc, 0x108] |
0x00001444 movs r0, 1 | r0 = 1;
0x00001446 add r1, pc | r1 = 0x2998;
0x00001448 blx 0xb24 | fprintf_chk ()
0x0000144c ldr r1, [pc, 0x100] |
0x0000144e movs r0, 1 | r0 = 1;
0x00001450 ldr r2, [sp, 0x24] | r2 = var_24h;
0x00001452 add r1, pc | r1 = 0x29a6;
0x00001454 blx 0xb24 | fprintf_chk ()
0x00001458 ldr r1, [pc, 0xf8] |
0x0000145a movs r0, 1 | r0 = 1;
0x0000145c ldr r2, [sp, 0x38] | r2 = var_38h;
0x0000145e add r1, pc | r1 = 0x29b6;
0x00001460 blx 0xb24 | fprintf_chk ()
0x00001464 ldrd r0, r1, [sp, 0x30] | __asm ("ldrd r0, r1, [var_30h]");
0x00001468 movs r2, 0 | r2 = 0;
0x0000146a bl 0x1a90 | fcn_00001a90 (r0, r1, r2);
0x0000146e ldr r0, [pc, 0xe8] |
0x00001470 add r0, pc | r0 = 0x29ce;
0x00001472 blx 0xa54 | fcn_00000a54 ();
0x00001476 ldr r3, [sp, 0x20] | r3 = var_20h_2;
0x00001478 cmp r3, 4 |
| if (r3 == 4) {
0x0000147a beq 0x14d0 | goto label_5;
| }
| label_1:
0x0000147c ldr r3, [sp, 0x40] | r3 = var_40h;
| if (r3 != 0) {
0x0000147e cbnz r3, 0x14c4 | goto label_6;
| }
0x00001480 ldr r2, [pc, 0xd8] |
0x00001482 add r2, pc | r2 = 0x29e2;
| do {
0x00001484 ldr r1, [pc, 0xd8] |
0x00001486 movs r0, 1 | r0 = 1;
0x00001488 add r1, pc | r1 = 0x29ec;
0x0000148a blx 0xb24 | fprintf_chk ()
0x0000148e ldr r1, [pc, 0xd4] |
0x00001490 add r2, sp, 0x44 | r2 += var_44h;
0x00001492 movs r0, 1 | r0 = 1;
0x00001494 add r1, pc | r1 = 0x29fe;
0x00001496 blx 0xb24 | fprintf_chk ()
0x0000149a ldr r1, [pc, 0xcc] |
0x0000149c movs r0, 1 | r0 = 1;
0x0000149e ldrd r2, r3, [sp, 0x18] | __asm ("ldrd r2, r3, [var_18h_2]");
0x000014a2 add r1, pc | r1 = 0x2a10;
0x000014a4 blx 0xb24 | fprintf_chk ()
| label_2:
0x000014a8 ldr r2, [pc, 0xc0] |
0x000014aa ldr r3, [pc, 0x90] | r3 = *(0x153e);
0x000014ac add r2, pc | r2 = 0x2a1c;
0x000014ae ldr r3, [r2, r3] | r3 = *(0x2a1c);
0x000014b0 ldr r2, [r3] | r2 = *(0x2a1c);
0x000014b2 ldr r3, [sp, 0xcc] | r3 = var_cch;
0x000014b4 eors r2, r3 | r2 ^= r3;
0x000014b6 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x000014ba bne 0x1534 | goto label_7;
| }
0x000014bc mov r0, r4 | r0 = r4;
0x000014be add sp, 0xd0 |
0x000014c0 pop.w {r4, r5, r6, r7, r8, pc} |
| label_6:
0x000014c4 ldr r2, [pc, 0xa8] |
0x000014c6 add r2, pc | r2 = 0x2a3a;
0x000014c8 b 0x1484 |
| } while (1);
| label_4:
0x000014ca ldr r2, [pc, 0xa8] |
0x000014cc add r2, pc | r2 = 0x2a46;
0x000014ce b 0x1442 | goto label_0;
| label_5:
0x000014d0 ldr r1, [pc, 0xa4] |
0x000014d2 movs r0, 1 | r0 = 1;
0x000014d4 add r1, pc | r1 = 0x2a50;
0x000014d6 blx 0xb24 | fprintf_chk ()
0x000014da ldrd r0, r1, [sp, 0x28] | __asm ("ldrd r0, r1, [var_28h]");
0x000014de movs r2, 1 | r2 = 1;
0x000014e0 bl 0x1a90 | fcn_00001a90 (r0, r1, r2);
0x000014e4 movs r0, 0xa | r0 = 0xa;
0x000014e6 blx 0xb00 | strncpy (r0, r1, r2);
0x000014ea b 0x147c | goto label_1;
| label_3:
0x000014ec blx 0xacc | fcn_00000acc ();
0x000014f0 ldr r3, [pc, 0x88] | r3 = *(0x157c);
0x000014f2 movs r1, 1 | r1 = 1;
0x000014f4 ldr r2, [pc, 0x88] |
0x000014f6 ldr.w r8, [r0] | r8 = *(r0);
0x000014f8 strh r0, [r0] | *(r0) = r0;
0x000014fa ldr r4, [r5, r3] | r4 = *((r5 + r3));
0x000014fc ldr r3, [pc, 0x84] |
0x000014fe add r2, pc | r2 = 0x2a82;
0x00001500 str r7, [sp, 4] | var_4h = r7;
0x00001502 str r6, [sp] | *(sp) = r6;
0x00001504 add r3, pc | r3 = 0x2a8c;
0x00001506 ldr r0, [r4] | r0 = *(r4);
0x00001508 blx 0xb30 | readdir64 ();
0x0000150c ldr r5, [r4] | r5 = *(r4);
0x0000150e mov r0, r8 | r0 = r8;
0x00001510 ldr r4, [pc, 0x74] |
0x00001512 blx 0xa6c | fcn_00000a6c ();
0x00001516 ldr r2, [pc, 0x74] |
0x00001518 mov r1, r0 | r1 = r0;
0x0000151a add r4, pc | r4 = 0x2aa6;
0x0000151c strd r8, r1, [sp, 4] | __asm ("strd r8, r1, [sp, 4]");
0x00001520 str r4, [sp] | *(sp) = r4;
0x00001522 movs r3, 8 | r3 = 8;
0x00001524 add r2, pc | r2 = 0x2ab6;
0x00001526 mov r0, r5 | r0 = r5;
0x00001528 movs r1, 1 | r1 = 1;
0x0000152a mov.w r4, -1 | r4 = -1;
0x0000152e blx 0xb30 | readdir64 ();
0x00001532 b 0x14a8 | goto label_2;
| label_7:
0x00001534 blx 0x9fc | fcn_000009fc ();
0x00001538 ldr r3, [pc, 0x88] | r3 = *(0x15c4);
0x0000153a movs r1, r0 | r1 = r0;
0x0000153c lsls r0, r6, 2 | r0 = r6 << 2;
0x0000153e movs r0, r0 |
0x00001540 ldr r3, [pc, 0x70] | r3 = *(0x15b4);
0x00001542 movs r1, r0 | r1 = r0;
0x00001544 adds r1, 0xea | r1 += 0xea;
0x00001546 movs r0, r0 |
0x00001548 adds r1, 0x80 | r1 += 0x80;
0x0000154a movs r0, r0 |
0x0000154c adds r1, 0xf2 | r1 += 0xf2;
0x0000154e movs r0, r0 |
0x00001550 adds r1, 0xfa | r1 += 0xfa;
0x00001552 movs r0, r0 |
0x00001554 adds r2, 2 | r2 += 2;
0x00001556 movs r0, r0 |
0x00001558 adds r2, 8 | r2 += 8;
0x0000155a movs r0, r0 |
0x0000155c adds r1, 0x52 | r1 += 0x52;
0x0000155e movs r0, r0 |
0x00001560 adds r2, 4 | r2 += 4;
0x00001562 movs r0, r0 |
0x00001564 adds r2, 0xc | r2 += 0xc;
0x00001566 movs r0, r0 |
0x00001568 adds r2, 0x12 | r2 += 0x12;
0x0000156a movs r0, r0 |
0x0000156c ldr r2, [pc, 0x210] | r2 = *(0x1780);
0x0000156e movs r1, r0 | r1 = r0;
0x00001570 adds r1, 2 | r1 += 2;
0x00001572 movs r0, r0 |
0x00001574 adds r0, 0xec | r0 += 0xec;
0x00001576 movs r0, r0 |
0x00001578 adds r1, 0xa8 | r1 += 0xa8;
0x0000157a movs r0, r0 |
0x0000157c lsls r0, r7, 2 | r0 = r7 << 2;
0x0000157e movs r0, r0 |
0x00001580 adds r0, 0xda | r0 += 0xda;
0x00001582 movs r0, r0 |
0x00001584 cmp r7, 0x38 |
0x00001586 movs r0, r0 |
0x00001588 adds r6, 0xee | r6 += 0xee;
0x0000158a movs r0, r0 |
0x0000158c cmp r7, 0x48 |
0x0000158e movs r0, r0 |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/ubinfo @ 0x1590 */
| #include <stdint.h>
|
; (fcn) fcn.00001590 () | void fcn_00001590 (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h_3;
| int16_t var_4h_2;
| int16_t var_8h_2;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_20h;
| int16_t var_78h;
| int16_t var_134h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x00001590 svcmi 0xf0e92d | __asm ("svcmi 0xf0e92d");
0x00001594 sub sp, 0x13c |
0x00001596 str r2, [sp, 0x14] | var_14h = r2;
0x00001598 add r4, sp, 0x20 | r4 += var_20h;
0x0000159a mov r5, r0 | r5 = r0;
0x0000159c mov r6, r1 | r6 = r1;
0x0000159e ldr r2, [pc, 0x2cc] |
0x000015a0 ldr r3, [pc, 0x2cc] | r3 = *(0x1870);
0x000015a2 add r2, pc | r2 = 0x2e14;
0x000015a4 ldr r3, [r2, r3] |
0x000015a6 mov r2, r4 | r2 = r4;
0x000015a8 ldr r3, [r3] | r3 = *(0x2e14);
0x000015aa str r3, [sp, 0x134] | var_134h = r3;
0x000015ac mov.w r3, 0 | r3 = 0;
0x000015b0 bl 0x33bc | fcn_000033bc (r0, r1, r2);
0x000015b4 ldr r3, [pc, 0x2bc] |
0x000015b6 add r3, pc | r3 = 0x2e2e;
0x000015b8 str r3, [sp, 0x18] | var_18h = r3;
0x000015ba cmp r0, 0 |
| if (r0 != 0) {
0x000015bc bne.w 0x1820 | goto label_6;
| }
0x000015c0 ldr r1, [pc, 0x2b4] |
0x000015c2 mov r7, r0 | r7 = r0;
0x000015c4 ldr r2, [r4] | r2 = *(r4);
0x000015c6 movs r0, 1 | r0 = 1;
0x000015c8 ldr r6, [pc, 0x2b0] |
0x000015ca add r1, pc | r1 = 0x2e46;
0x000015cc blx 0xb24 | fprintf_chk ()
0x000015d0 ldr r1, [pc, 0x2ac] |
0x000015d2 movs r0, 1 | r0 = 1;
0x000015d4 ldr r2, [r4, 8] | r2 = *((r4 + 8));
0x000015d6 add r6, pc | r6 = 0x2e56;
0x000015d8 add r1, pc | r1 = 0x2e5c;
0x000015da blx 0xb24 | fprintf_chk ()
0x000015de ldr r1, [pc, 0x2a4] |
0x000015e0 movs r0, 1 | r0 = 1;
0x000015e2 add r1, pc | r1 = 0x2e6c;
0x000015e4 blx 0xb24 | fprintf_chk ()
0x000015e8 ldr r0, [r4, 0x3c] | r0 = *((r4 + 0x3c));
0x000015ea mov r2, r7 | r2 = r7;
0x000015ec asrs r1, r0, 0x1f | r1 = r0 >> 0x1f;
0x000015ee bl 0x1a90 | fcn_00001a90 (r0, r1, r2);
0x000015f2 movs r0, 0xa | r0 = 0xa;
0x000015f4 blx 0xb00 | strncpy (r0, r1, r2);
0x000015f8 ldr r1, [pc, 0x28c] |
0x000015fa movs r0, 1 | r0 = 1;
0x000015fc ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x000015fe add r1, pc | r1 = 0x2e8a;
0x00001600 blx 0xb24 | fprintf_chk ()
0x00001604 ldrd r0, r1, [r4, 0x28] | __asm ("ldrd r0, r1, [r4, 0x28]");
0x00001608 mov r2, r7 | r2 = r7;
0x0000160a bl 0x1a90 | fcn_00001a90 (r0, r1, r2);
0x0000160e mov r0, r6 | r0 = r6;
0x00001610 blx 0xa54 | fcn_00000a54 ();
0x00001614 ldr r1, [pc, 0x274] |
0x00001616 movs r0, 1 | r0 = 1;
0x00001618 ldr r2, [r4, 0x20] | r2 = *((r4 + 0x20));
0x0000161a add r1, pc | r1 = 0x2eaa;
0x0000161c blx 0xb24 | fprintf_chk ()
0x00001620 ldrd r0, r1, [r4, 0x30] | __asm ("ldrd r0, r1, [r4, 0x30]");
0x00001624 mov r2, r7 | r2 = r7;
0x00001626 bl 0x1a90 | fcn_00001a90 (r0, r1, r2);
0x0000162a mov r0, r6 | r0 = r6;
0x0000162c blx 0xa54 | fcn_00000a54 ();
0x00001630 ldr r1, [pc, 0x25c] |
0x00001632 movs r0, 1 | r0 = 1;
0x00001634 ldr r2, [r4, 0x4c] | r2 = *((r4 + 0x4c));
0x00001636 add r1, pc | r1 = 0x2eca;
0x00001638 blx 0xb24 | fprintf_chk ()
0x0000163c ldr r1, [pc, 0x254] |
0x0000163e movs r0, 1 | r0 = 1;
0x00001640 ldr r2, [r4, 0x38] | r2 = *((r4 + 0x38));
0x00001642 add r1, pc | r1 = 0x2eda;
0x00001644 blx 0xb24 | fprintf_chk ()
0x00001648 ldr r1, [pc, 0x24c] |
0x0000164a movs r0, 1 | r0 = 1;
0x0000164c ldr r2, [r4, 0x48] | r2 = *((r4 + 0x48));
0x0000164e add r1, pc | r1 = 0x2eea;
0x00001650 blx 0xb24 | fprintf_chk ()
0x00001654 ldr r1, [pc, 0x244] |
0x00001656 movs r0, 1 | r0 = 1;
0x00001658 ldrd r2, r3, [r4, 0x40] | __asm ("ldrd r2, r3, [r4, 0x40]");
0x0000165c add r1, pc | r1 = 0x2efc;
0x0000165e blx 0xb24 | fprintf_chk ()
0x00001662 ldr r2, [r4, 0x50] | r2 = *((r4 + 0x50));
0x00001664 cmp r2, 1 |
| if (r2 <= 1) {
0x00001666 ble.w 0x17da | goto label_7;
| }
0x0000166a ldr r3, [pc, 0x234] |
0x0000166c add r3, pc | r3 = 0x2f12;
| label_4:
0x0000166e ldr r1, [pc, 0x234] |
0x00001670 movs r0, 1 | r0 = 1;
0x00001672 add r1, pc | r1 = 0x2f1c;
0x00001674 blx 0xb24 | fprintf_chk ()
0x00001678 ldr r1, [pc, 0x22c] |
0x0000167a movs r0, 1 | r0 = 1;
0x0000167c ldrd r2, r3, [r4, 0x14] | __asm ("ldrd r2, r3, [r4, 0x14]");
0x00001680 add r1, pc | r1 = 0x2f2c;
0x00001682 blx 0xb24 | fprintf_chk ()
0x00001686 ldr r3, [r4, 8] | r3 = *((r4 + 8));
| if (r3 == 0) {
0x00001688 cbnz r3, 0x16a8 |
| label_1:
0x0000168a ldr r2, [pc, 0x220] |
0x0000168c ldr r3, [pc, 0x1e0] | r3 = *(0x1870);
0x0000168e add r2, pc | r2 = 0x2f40;
0x00001690 ldr r3, [r2, r3] | r3 = *(0x2f40);
0x00001692 ldr r2, [r3] | r2 = *(0x2f40);
0x00001694 ldr r3, [sp, 0x134] | r3 = var_134h;
0x00001696 eors r2, r3 | r2 ^= r3;
0x00001698 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000169c bne.w 0x1866 | goto label_8;
| }
0x000016a0 mov r0, r7 | r0 = r7;
0x000016a2 add sp, 0x13c |
0x000016a4 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
0x000016a8 ldr r1, [pc, 0x204] |
0x000016aa movs r0, 1 | r0 = 1;
0x000016ac add r1, pc | r1 = 0x2f60;
0x000016ae blx 0xb24 | fprintf_chk ()
0x000016b2 ldrd sb, r3, [r4, 0xc] | __asm ("ldrd sb, r3, [r4, 0xc]");
0x000016b6 cmp sb, r3 |
| if (sb > r3) {
0x000016b8 bgt 0x1762 | goto label_9;
| }
0x000016ba ldr r3, [pc, 0x1f8] |
0x000016bc mov.w r8, 1 | r8 = 1;
0x000016c0 ldr.w fp, [pc, 0x1f4] |
0x000016c4 add r6, sp, 0x78 | r6 += var_78h;
0x000016c6 str r7, [sp, 0x1c] | var_1ch = r7;
0x000016c8 mov r7, r8 | r7 = r8;
0x000016ca add r3, pc | r3 = 0x2f84;
0x000016cc add fp, pc | fp = 0x2f88;
0x000016ce mov r8, r3 | r8 = r3;
0x000016d0 b 0x16ea |
| while (r0 != -1) {
0x000016d2 mov r2, sb | r2 = sb;
0x000016d4 cmp r7, 0 |
| if (r7 != 0) {
0x000016d6 bne 0x174c | goto label_10;
| }
0x000016d8 mov r1, r8 | r1 = r8;
0x000016da movs r0, 1 | r0 = 1;
0x000016dc blx 0xb24 | fprintf_chk ()
| label_0:
0x000016e0 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x000016e2 add.w sb, sb, 1 | sb++;
0x000016e6 cmp r3, sb |
| if (r3 < sb) {
0x000016e8 blt 0x1760 | goto label_11;
| }
| label_2:
0x000016ea ldr r1, [r4] | r1 = *(r4);
0x000016ec mov r3, r6 | r3 = r6;
0x000016ee mov r2, sb | r2 = sb;
0x000016f0 mov r0, r5 | r0 = r5;
0x000016f2 bl 0x3a94 | r0 = fcn_00003a94 (r0, r1, r2, r3);
0x000016f6 cmp.w r0, -1 |
0x000016fa mov sl, r0 | sl = r0;
0x000016fc bne 0x16d2 |
| }
0x000016fe blx 0xacc | r0 = fcn_00000acc ();
0x00001702 ldr r2, [r0] | r2 = *(r0);
0x00001704 cmp r2, 2 |
| if (r2 == 2) {
0x00001706 beq 0x16e0 | goto label_0;
| }
0x00001708 ldr r0, [sp, 0x18] | r0 = var_18h;
0x0000170a mov r5, r2 | r5 = r2;
0x0000170c ldr r3, [pc, 0x1ac] | r3 = *(0x18bc);
0x0000170e mov r7, sl | r7 = sl;
0x00001710 ldr r1, [r4] | r1 = *(r4);
0x00001712 ldr r2, [pc, 0x1ac] |
0x00001714 ldr r4, [r0, r3] | r4 = *((r0 + r3));
0x00001716 ldr r3, [pc, 0x1ac] |
0x00001718 add r2, pc | r2 = 0x2fde;
0x0000171a str r1, [sp, 4] | var_4h_2 = r1;
0x0000171c str.w sb, [sp] | __asm ("str.w sb, [sp]");
0x00001720 movs r1, 1 | r1 = 1;
0x00001722 ldr r0, [r4] | r0 = *(r4);
0x00001724 add r3, pc | r3 = 0x2fee;
0x00001726 blx 0xb30 | readdir64 ();
0x0000172a mov r0, r5 | r0 = r5;
0x0000172c ldr r4, [r4] | r4 = *(r4);
0x0000172e blx 0xa6c | fcn_00000a6c ();
0x00001732 ldr r1, [pc, 0x194] |
0x00001734 ldr r2, [pc, 0x194] |
0x00001736 str r0, [sp, 8] | var_8h_2 = r0;
0x00001738 add r1, pc | r1 = 0x3006;
0x0000173a str r5, [sp, 4] | var_4h_2 = r5;
0x0000173c add r2, pc | r2 = 0x300c;
| label_5:
0x0000173e str r1, [sp] | *(sp) = r1;
0x00001740 movs r3, 8 | r3 = 8;
0x00001742 mov r0, r4 | r0 = r4;
0x00001744 movs r1, 1 | r1 = 1;
0x00001746 blx 0xb30 | readdir64 ();
0x0000174a b 0x168a | goto label_1;
| label_10:
0x0000174c mov r1, fp | r1 = fp;
0x0000174e movs r0, 1 | r0 = 1;
0x00001750 blx 0xb24 | fprintf_chk ()
0x00001754 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00001756 add.w sb, sb, 1 | sb++;
0x0000175a movs r7, 0 | r7 = 0;
0x0000175c cmp r3, sb |
| if (r3 >= sb) {
0x0000175e bge 0x16ea | goto label_2;
| }
| label_11:
0x00001760 ldr r7, [sp, 0x1c] | r7 = var_1ch;
| label_9:
0x00001762 movs r0, 0xa | r0 = 0xa;
0x00001764 blx 0xb00 | strncpy (r0, r1, r2);
0x00001768 ldr r3, [sp, 0x14] | r3 = var_14h;
0x0000176a cmp r3, 0 |
| if (r3 == 0) {
0x0000176c beq 0x168a | goto label_1;
| }
0x0000176e movs r0, 0xa | r0 = 0xa;
0x00001770 blx 0xb00 | strncpy (r0, r1, r2);
0x00001774 ldrd r3, r2, [r4, 0xc] | __asm ("ldrd r3, r2, [r4, 0xc]");
0x00001778 cmp r3, r2 |
| if (r3 > r2) {
0x0000177a bgt 0x168a | goto label_1;
| }
0x0000177c add.w r8, r3, 1 | r8 = r3 + 1;
0x00001780 ldr r3, [pc, 0x14c] |
0x00001782 movs r2, 1 | r2 = 1;
0x00001784 str r7, [sp, 0x14] | var_14h = r7;
0x00001786 add r6, sp, 0x78 | r6 += var_78h;
0x00001788 mov r7, r2 | r7 = r2;
0x0000178a add r3, pc | r3 = 0x305e;
0x0000178c mov sb, r3 | sb = r3;
| do {
0x0000178e add.w fp, r8, -1 |
0x00001792 ldr r1, [r4] | r1 = *(r4);
0x00001794 mov r3, r6 | r3 = r6;
0x00001796 mov r2, fp | r2 = fp;
0x00001798 mov r0, r5 | r0 = r5;
0x0000179a bl 0x3a94 | r0 = fcn_00003a94 (r0, r1, r2, r3);
0x0000179e cmp.w r0, -1 |
0x000017a2 mov sl, r0 | sl = r0;
| if (r0 != -1) {
0x000017a4 bne 0x17be | goto label_12;
| }
0x000017a6 blx 0xacc | r0 = fcn_00000acc ();
0x000017aa ldr r3, [r0] | r3 = *(r0);
0x000017ac cmp r3, 2 |
| if (r3 != 2) {
0x000017ae bne 0x17e8 | goto label_13;
| }
0x000017b0 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x000017b2 cmp r3, r8 |
| if (r3 < r8) {
0x000017b4 blt 0x17e0 | goto label_14;
| }
| if (r7 == 0) {
0x000017b6 cbz r7, 0x17d0 | goto label_15;
| }
| label_3:
0x000017b8 add.w r8, r8, 1 | r8++;
0x000017bc b 0x178e |
| } while (1);
| label_12:
0x000017be ldr r1, [r4] | r1 = *(r4);
0x000017c0 mov r2, fp | r2 = fp;
0x000017c2 mov r0, r5 | r0 = r5;
0x000017c4 bl 0x1400 | r0 = fcn_00001400 (r0, r1);
| if (r0 == 0) {
0x000017c8 cbnz r0, 0x17e4 |
0x000017ca ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x000017cc cmp r8, r3 |
| if (r8 <= r3) {
0x000017ce bgt 0x17e0 |
| label_15:
0x000017d0 mov r0, sb | r0 = sb;
0x000017d2 movs r7, 0 | r7 = 0;
0x000017d4 blx 0xa54 | fcn_00000a54 ();
0x000017d8 b 0x17b8 | goto label_3;
| label_7:
0x000017da ldr r3, [pc, 0xf8] |
0x000017dc add r3, pc | r3 = 0x30b6;
0x000017de b 0x166e | goto label_4;
| }
| label_14:
0x000017e0 ldr r7, [sp, 0x14] | r7 = var_14h;
0x000017e2 b 0x168a | goto label_1;
| }
0x000017e4 mov r7, r0 | r7 = r0;
0x000017e6 b 0x168a | goto label_1;
| label_13:
0x000017e8 ldr r2, [sp, 0x18] | r2 = var_18h;
0x000017ea mov sb, r3 | sb = r3;
0x000017ec ldr r3, [pc, 0xcc] | r3 = *(0x18bc);
0x000017ee mov r7, sl | r7 = sl;
0x000017f0 ldr r1, [r4] | r1 = *(r4);
0x000017f2 ldr r4, [r2, r3] | r4 = *((r2 + r3));
0x000017f4 ldr r3, [pc, 0xe0] |
0x000017f6 ldr r2, [pc, 0xe4] |
0x000017f8 str r1, [sp, 4] | var_4h_2 = r1;
0x000017fa movs r1, 1 | r1 = 1;
0x000017fc add r3, pc | r3 = 0x30d8;
0x000017fe str.w fp, [sp] | __asm ("str.w fp, [sp]");
0x00001802 add r2, pc | r2 = 0x30e4;
0x00001804 ldr r0, [r4] | r0 = *(r4);
0x00001806 blx 0xb30 | readdir64 ();
0x0000180a mov r0, sb | r0 = sb;
0x0000180c ldr r4, [r4] | r4 = *(r4);
0x0000180e blx 0xa6c | fcn_00000a6c ();
0x00001812 ldr r1, [pc, 0xcc] |
0x00001814 ldr r2, [pc, 0xcc] |
0x00001816 strd sb, r0, [sp, 4] | __asm ("strd sb, r0, [sp, 4]");
0x0000181a add r1, pc | r1 = 0x3100;
0x0000181c add r2, pc | r2 = 0x3104;
0x0000181e b 0x173e | goto label_5;
| label_6:
0x00001820 blx 0xacc | fcn_00000acc ();
0x00001824 ldr r1, [sp, 0x18] | r1 = var_18h;
0x00001826 mov.w r7, -1 | r7 = -1;
0x0000182a ldr r2, [pc, 0x90] | r2 = *(0x18be);
0x0000182c ldr r3, [pc, 0xb8] |
0x0000182e ldr r5, [r0] | r5 = *(r0);
0x00001830 ldr r4, [r1, r2] | r4 = *((r1 + r2));
0x00001832 movs r1, 1 | r1 = 1;
0x00001834 ldr r2, [pc, 0xb4] |
0x00001836 add r3, pc | r3 = 0x3122;
0x00001838 str r6, [sp] | *(sp) = r6;
0x0000183a ldr r0, [r4] | r0 = *(r4);
0x0000183c add r2, pc | r2 = 0x312c;
0x0000183e blx 0xb30 | readdir64 ();
0x00001842 ldr r6, [r4] | r6 = *(r4);
0x00001844 mov r0, r5 | r0 = r5;
0x00001846 ldr r4, [pc, 0xa8] |
0x00001848 blx 0xa6c | fcn_00000a6c ();
0x0000184c ldr r2, [pc, 0xa4] |
0x0000184e mov r1, r0 | r1 = r0;
0x00001850 add r4, pc | r4 = 0x3146;
0x00001852 strd r5, r1, [sp, 4] | __asm ("strd r5, r1, [sp, 4]");
0x00001856 movs r3, 8 | r3 = 8;
0x00001858 mov r0, r6 | r0 = r6;
0x0000185a add r2, pc | r2 = 0x3152;
0x0000185c movs r1, 1 | r1 = 1;
0x0000185e str r4, [sp] | *(sp) = r4;
0x00001860 blx 0xb30 | readdir64 ();
0x00001864 b 0x168a | goto label_1;
| label_8:
0x00001866 blx 0x9fc | fcn_000009fc ();
0x0000186a nop |
0x0000186c ldr r1, [pc, 0x238] | r1 = *(0x1aa8);
0x0000186e movs r1, r0 | r1 = r0;
0x00001870 lsls r0, r6, 2 | r0 = r6 << 2;
0x00001872 movs r0, r0 |
0x00001874 ldr r1, [pc, 0x1e8] | r1 = *(0x1a60);
0x00001876 movs r1, r0 | r1 = r0;
0x00001878 adds r3, 0x92 | r3 += 0x92;
0x0000187a movs r0, r0 |
0x0000187c adds r0, 0xa2 | r0 += 0xa2;
0x0000187e movs r0, r0 |
0x00001880 adds r1, 0x4c | r1 += 0x4c;
0x00001882 movs r0, r0 |
0x00001884 adds r1, 0x72 | r1 += 0x72;
0x00001886 movs r0, r0 |
0x00001888 adds r1, 0x82 | r1 += 0x82;
0x0000188a movs r0, r0 |
0x0000188c adds r1, 0x96 | r1 += 0x96;
0x0000188e movs r0, r0 |
0x00001890 adds r1, 0xaa | r1 += 0xaa;
0x00001892 movs r0, r0 |
0x00001894 adds r1, 0xce | r1 += 0xce;
0x00001896 movs r0, r0 |
0x00001898 adds r1, 0xf2 | r1 += 0xf2;
0x0000189a movs r0, r0 |
0x0000189c adds r2, 0x14 | r2 += 0x14;
0x0000189e movs r0, r0 |
0x000018a0 adds r0, 0x70 | r0 += 0x70;
0x000018a2 movs r0, r0 |
0x000018a4 adds r2, 0x2e | r2 += 0x2e;
0x000018a6 movs r0, r0 |
0x000018a8 adds r2, 0x50 | r2 += 0x50;
0x000018aa movs r0, r0 |
0x000018ac ldr r0, [pc, 0x288] | r0 = *(0x1b38);
0x000018ae movs r1, r0 | r1 = r0;
0x000018b0 adds r2, 0x54 | r2 += 0x54;
0x000018b2 movs r0, r0 |
0x000018b4 adds r2, 0x9a | r2 += 0x9a;
0x000018b6 movs r0, r0 |
0x000018b8 adds r2, 0xa0 | r2 += 0xa0;
0x000018ba movs r0, r0 |
0x000018bc lsls r0, r7, 2 | r0 = r7 << 2;
0x000018be movs r0, r0 |
0x000018c0 adds r2, 0x14 | r2 += 0x14;
0x000018c2 movs r0, r0 |
0x000018c4 cmp r5, 0x18 |
0x000018c6 movs r0, r0 |
0x000018c8 adds r4, 0xd0 | r4 += 0xd0;
0x000018ca movs r0, r0 |
0x000018cc cmp r5, 0x30 |
0x000018ce movs r0, r0 |
0x000018d0 adds r1, 0xe6 | r1 += 0xe6;
0x000018d2 movs r0, r0 |
0x000018d4 cmp r7, 8 |
0x000018d6 movs r0, r0 |
0x000018d8 cmp r4, 0x40 |
0x000018da movs r0, r0 |
0x000018dc adds r1, 0x2a | r1 += 0x2a;
0x000018de movs r0, r0 |
0x000018e0 adds r3, 0xee | r3 += 0xee;
0x000018e2 movs r0, r0 |
0x000018e4 cmp r4, 0x50 |
0x000018e6 movs r0, r0 |
0x000018e8 cmp r4, 6 |
0x000018ea movs r0, r0 |
0x000018ec cmp r6, 0xb0 |
0x000018ee movs r0, r0 |
0x000018f0 adds r3, 0xb8 | r3 += 0xb8;
0x000018f2 movs r0, r0 |
0x000018f4 cmp r4, 0x12 |
0x000018f6 movs r0, r0 |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/ubinfo @ 0x1a90 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.00001a90 () | void fcn_00001a90 (int16_t arg1, int16_t arg2, uint32_t arg3) {
| int16_t var_0h_3;
| int16_t var_4h_3;
| int16_t var_8h_2;
| int16_t var_ch_2;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| label_1:
0x00000afc invalid | void (*0xb00)() ();
0x00001a90 push.w {r4, r5, r6, r7, r8, lr} |
0x00001a94 mov r4, r0 | r4 = r0;
0x00001a96 sub sp, 0x10 |
0x00001a98 mov r5, r1 | r5 = r1;
0x00001a9a mov r6, r2 | r6 = r2;
0x00001a9c cmp r2, 0 |
| if (r2 != 0) {
0x00001a9e bne 0x1b42 | goto label_3;
| }
0x00001aa0 ldr r7, [pc, 0x15c] |
0x00001aa2 add r7, pc | r7 = 0x36a6;
| do {
0x00001aa4 ldr r1, [pc, 0x15c] |
0x00001aa6 mov r3, r5 | r3 = r5;
0x00001aa8 mov r2, r4 | r2 = r4;
0x00001aaa movs r0, 1 | r0 = 1;
0x00001aac add r1, pc | r1 = 0x36b4;
0x00001aae blx 0xb24 | fprintf_chk ()
0x00001ab2 movs r3, 1 |
0x00001ab4 movt r3, 0x4000 | r3 = 0x40000001;
0x00001ab8 cmp r4, r3 |
0x00001aba sbcs r3, r5, 0 | __asm ("sbcs r3, r5, 0");
| if (r4 >= r3) {
0x00001abe bge 0x1b8c | goto label_4;
| }
0x00001ac0 movs r3, 1 |
0x00001ac2 movt r3, 0x10 | r3 = 0x100001;
0x00001ac6 cmp r4, r3 |
0x00001ac8 sbcs r3, r5, 0 | __asm ("sbcs r3, r5, 0");
| if (r4 >= r3) {
0x00001acc bge 0x1b48 | goto label_5;
| }
0x00001ace movw r3, 0x401 | r3 = 0x401;
0x00001ad2 cmp r4, r3 |
0x00001ad4 sbcs r3, r5, 0 | __asm ("sbcs r3, r5, 0");
| if (r4 >= r3) {
0x00001ad8 blt 0x1b3c |
0x00001ada ubfx r3, r4, 0, 0xa | r3 = (r4 >> 0) & ((1 << 0xa) - 1);
0x00001ade lsrs r4, r4, 0xa | r4 >>= 0xa;
0x00001ae0 movw r0, 0xa0a1 |
0x00001ae4 ldr r1, [pc, 0x120] |
0x00001ae6 orr.w r4, r4, r5, lsl 22 | r4 |= (r5 << 22);
0x00001aea movt r0, 0xa0a0 |
0x00001aee asrs r5, r5, 0xa | r5 >>= 0xa;
0x00001af0 mov r2, r7 | r2 = r7;
0x00001af2 str r4, [sp] | *(sp) = r4;
0x00001af4 umull r4, r0, r0, r3 | r4:r0 = r0 * r3;
0x00001af8 movw r4, 0xfafb |
0x00001afc str r5, [sp, 4] | var_4h_3 = r5;
0x00001afe movt r4, 0xfafa | r4 = 0xfafafafb;
0x00001b02 add r1, pc | r1 = 0x370e;
0x00001b04 lsrs r0, r0, 5 | r0 >>= 5;
0x00001b06 add.w r0, r0, r0, lsl 1 |
| /* if there is a right shift of 7, then it's a division by 1/204 */
0x00001b0a add.w r0, r0, r0, lsl 4 | r0 = 0xa0a0a0a1;
0x00001b0e subs r0, r3, r0 | r0 = r3 - r0;
0x00001b10 subs r3, r3, r0 | r3 -= r0;
0x00001b12 mov.w r0, -0x5050506 | r0 = -0x5050506;
0x00001b16 mul r0, r3, r0 | r0 = r3 * r0;
0x00001b1a sbc.w r5, r5, r5 | __asm ("sbc.w r5, r5, r5");
0x00001b1e mla r0, r4, r5, r0 | __asm ("mla r0, r4, r5, r0");
0x00001b22 umull r3, r4, r3, r4 | r3:r4 = r3 * r4;
0x00001b26 lsrs r3, r3, 1 | r3 >>= 1;
0x00001b28 add r0, r4 | r0 += r4;
0x00001b2a orr.w r3, r3, r0, lsl 31 | r3 |= (r0 << 31);
0x00001b2e lsrs r0, r0, 1 | r0 >>= 1;
0x00001b30 str r3, [sp, 8] | var_8h_2 = r3;
0x00001b32 str r0, [sp, 0xc] | var_ch_2 = r0;
0x00001b34 movs r0, 1 | r0 = 1;
0x00001b36 blx 0xb24 | fprintf_chk ()
| if (r6 != 0) {
| label_2:
0x00001b3a cbnz r6, 0x1b80 | goto label_6;
| }
| }
| label_0:
0x00001b3c add sp, 0x10 |
0x00001b3e pop.w {r4, r5, r6, r7, r8, pc} |
| label_3:
0x00001b42 ldr r7, [pc, 0xc8] |
0x00001b44 add r7, pc | r7 = 0x3756;
0x00001b46 b 0x1aa4 |
| } while (1);
| label_5:
0x00001b48 ubfx r0, r4, 0, 0x14 | r0 = (r4 >> 0) & ((1 << 0x14) - 1);
0x00001b4c ldr.w r8, [pc, 0xc0] |
0x00001b4e strh r0, [r0, 6] | *((r0 + 6)) = r0;
0x00001b50 lsrs r4, r4, 0x14 | r4 >>= 0x14;
0x00001b52 movw r2, 0x9999 |
0x00001b56 movt r2, 1 | r2 = 0x19999;
0x00001b5a orr.w r4, r4, r5, lsl 12 | r4 |= (r5 << 12);
0x00001b5c adds r4, 5 | r4 += 5;
0x00001b5e asrs r5, r5, 0x14 | r5 >>= 0x14;
0x00001b60 add r8, pc | r8 = 0x3774;
0x00001b62 movs r1, 0 | r1 = 0;
0x00001b64 movs r3, 0 | r3 = 0;
0x00001b66 bl 0x41c4 | fcn_000041c4 (r0, r1, r2, r3);
0x00001b6a mov r2, r7 | r2 = r7;
0x00001b6c strd r0, r1, [sp, 8] | __asm ("strd r0, r1, [sp, 8]");
0x00001b70 str r4, [sp] | *(sp) = r4;
0x00001b72 mov r1, r8 | r1 = r8;
0x00001b74 movs r0, 1 | r0 = 1;
0x00001b76 str r5, [sp, 4] | var_4h_3 = r5;
0x00001b78 blx 0xb24 | fprintf_chk ()
0x00001b7c cmp r6, 0 |
| if (r6 == 0) {
0x00001b7e beq 0x1b3c | goto label_0;
| }
| label_6:
0x00001b80 movs r0, 0x29 | r0 = 0x29;
0x00001b82 add sp, 0x10 |
0x00001b84 pop.w {r4, r5, r6, r7, r8, lr} |
0x00001b88 b.w 0xafc | goto label_1;
| label_4:
0x00001b8c bic r3, r4, 0xc0000000 | r3 = BIT_MASK (r4, 0xc0000000);
0x00001b90 bic lr, r4, 0xf0000000 | lr = BIT_MASK (r4, 0xf0000000);
0x00001b94 lsrs r4, r4, 0x1e | r4 >>= 0x1e;
0x00001b96 add.w lr, lr, r3, lsr 28 | lr += (r3 >> 28);
0x00001b9a ldr r1, [pc, 0x78] |
0x00001b9c orr.w r4, r4, r5, lsl 2 | r4 |= (r5 << 2);
0x00001ba0 asrs r5, r5, 0x1e | r5 >>= 0x1e;
0x00001ba2 str r5, [sp, 4] | var_4h_3 = r5;
0x00001ba4 movs r5, 0x15 |
0x00001ba6 movt r5, 0x4000 | r5 = 0x40000015;
0x00001baa mov r2, r7 | r2 = r7;
0x00001bac umull r0, r5, r5, lr | r0:r5 = r5 * lr;
0x00001bb0 movw r7, 0x3333 |
0x00001bb4 movt r7, 0x333 | r7 = 0x3333333;
0x00001bb8 str r4, [sp] | *(sp) = r4;
0x00001bba mvn r4, 0x5000000 | r4 = ~0x5000000;
0x00001bbe movw ip, 0xfffb |
0x00001bc2 movt ip, 0xafff | ip = 0xaffffffb;
0x00001bc6 movs r0, 1 | r0 = 1;
0x00001bc8 add r1, pc | r1 = 0x37e2;
0x00001bca sub.w r8, lr, r5 | r8 = lr - r5;
0x00001bce add.w r5, r5, r8, lsr 1 | r5 += (r8 >> 1);
0x00001bd2 lsrs r5, r5, 0x19 | r5 >>= 0x19;
0x00001bd4 mls lr, r7, r5, lr | __asm ("mls lr, r7, r5, lr");
0x00001bd8 subs.w r3, r3, lr | r3 -= lr;
0x00001bdc mul r4, r3, r4 | r4 = r3 * r4;
0x00001be0 sbc.w r7, r7, r7 | __asm ("sbc.w r7, r7, r7");
0x00001be4 umull r3, r5, r3, ip | r3:r5 = r3 * ip;
0x00001be8 mla r4, ip, r7, r4 | __asm ("mla r4, ip, r7, r4");
0x00001bec lsrs r3, r0 | r3 >>= r0;
0x00001bee add r4, r5 | r4 += r5;
0x00001bf0 orr.w r3, r3, r4, lsl 31 | r3 |= (r4 << 31);
0x00001bf4 lsrs r4, r0 | r4 >>= r0;
0x00001bf6 str r3, [sp, 8] | var_8h_2 = r3;
0x00001bf8 str r4, [sp, 0xc] | var_ch_2 = r4;
0x00001bfa blx 0xb24 | fprintf_chk ()
0x00001bfe b 0x1b3a | goto label_2;
| }
[*] Function fprintf used 36 times ubinfo