[*] Binary protection state of ubirsvol.mtd-utils
Full RELRO Canary found NX enabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of ubirsvol.mtd-utils
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/ubirsvol.mtd-utils @ 0x1324 */
| #include <stdint.h>
|
; (fcn) fcn.00001324 () | void fcn_00001324 (int16_t arg_8h, int16_t arg_10h, int16_t arg_14h, int16_t arg_18h, int16_t arg_70h, int16_t arg_74h, int16_t arg_9ch, int16_t arg_12ch) {
| int16_t var_0h;
| int16_t var_4h;
| label_1:
0x00000bae movs r1, 0 | r1 = 0;
0x00000bb0 mov r3, sb | r3 = sb;
0x00000bb2 str r1, [sp] | *(sp) = r1;
0x00000bb4 mov r2, r8 | r2 = r8;
0x00000bb6 mov r1, r5 | r1 = r5;
0x00000bb8 mov r0, r4 | r0 = r4;
0x00000bba blx 0xa84 | r0 = fcn_00000a84 ();
0x00000bbe adds r3, r0, 1 | r3 = r0 + 1;
0x00000bc0 mov r7, r0 | r7 = r0;
| if (r3 == r0) {
0x00000bc2 beq.w 0xe72 | goto label_10;
| }
0x00000bc6 sub.w r7, r0, 0x3a | r7 = r0 - 0x3a;
0x00000bca cmp r7, 0x39 |
| if (r7 <= 0x39) {
0x00000bcc bhi 0xc46 |
| /* switch table (59 cases) at 0xbd2 */
0x00000bce tbh [pc, r7, lsl 1] | __asm ("tbh [pc, r7, lsl 1]");
| }
0x00000c46 ldr.w r3, [pc, 0x574] |
0x00000c4a mov.w r7, -1 | r7 = -1;
0x00000c4e ldr.w r0, [pc, 0x570] |
0x00000c52 movs r2, 0x10 | r2 = 0x10;
0x00000c54 movs r1, 1 | r1 = 1;
0x00000c56 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00000c58 add r0, pc | r0 = 0x1e1e;
0x00000c5a ldr r3, [r3] | r3 = *(0x11be);
0x00000c5c blx 0xa14 | fcn_00000a14 ();
| do {
| label_0:
0x00000c60 ldr.w r2, [pc, 0x560] | r2 = *(0x000011c4);
0x00000c64 ldr.w r3, [pc, 0x540] | r3 = *(0x11a8);
0x00000c68 add r2, pc | r2 += pc;
0x00000c6a ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x00000c6c ldr r2, [r3] | r2 = *(0x11a8);
0x00000c6e ldr r3, [sp, 0x12c] | r3 = *(arg_12ch);
0x00000c70 eors r2, r3 | r2 ^= r3;
0x00000c72 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00000c76 bne.w 0x11a0 | goto label_11;
| }
0x00000c7a mov r0, r7 | r0 = r7;
0x00000c7c add sp, 0x134 |
0x00000c7e pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x00000c82 ldr.w r0, [pc, 0x538] |
0x00000c86 movs r1, 1 | r1 = 1;
0x00000c88 ldr.w r3, [pc, 0x53c] |
0x00000c8c mov.w r7, -1 | r7 = -1;
0x00000c90 ldr.w r2, [pc, 0x538] |
0x00000c94 ldr r0, [r6, r0] | r0 = *((r6 + r0));
0x00000c96 add r3, pc | r3 = 0x1e62;
0x00000c98 add r2, pc | r2 = 0x1e68;
0x00000c9a ldr r0, [r0] | r0 = *(0x11be);
0x00000c9c blx 0xb30 | readdir64 ();
0x00000ca0 b 0xc60 |
| } while (1);
0x00000ca2 ldr.w r4, [pc, 0x52c] |
0x00000ca6 movs r0, 1 | r0 = 1;
0x00000ca8 ldr.w r5, [pc, 0x528] |
0x00000cac mov.w r7, -1 | r7 = -1;
0x00000cb0 add r4, pc | r4 = 0x1e86;
0x00000cb2 add r5, pc | r5 = 0x1e8a;
0x00000cb4 mov r2, r4 | r2 = r4;
0x00000cb6 mov r1, r5 | r1 = r5;
0x00000cb8 blx 0xb24 | fprintf_chk ()
0x00000cbc add.w r2, r4, 0x38 | r2 = r4 + 0x38;
0x00000cc0 mov r1, r5 | r1 = r5;
0x00000cc2 movs r0, 1 | r0 = 1;
0x00000cc4 blx 0xb24 | fprintf_chk ()
0x00000cc8 add.w r0, r4, 0x1e8 | r0 = r4 + 0x1e8;
0x00000cca strb r4, [r6, 3] | *((r6 + 3)) = r4;
0x00000ccc blx 0xa54 | fcn_00000a54 ();
0x00000cd0 b 0xc60 | goto label_0;
0x00000cd2 ldr.w r3, [pc, 0x504] |
0x00000cd6 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00000cd8 ldr r3, [r3] | r3 = *(0x11da);
0x00000cda str.w r3, [sl, 8] | __asm ("str.w r3, [sl, 8]");
0x00000cde b 0xbae | goto label_1;
0x00000ce0 ldr.w r3, [pc, 0x4f4] | r3 = *(0x11d8);
0x00000ce4 movs r2, 0 | r2 = 0;
0x00000ce6 ldr.w fp, [r6, r3] | fp = *((r6 + r3));
0x00000cea add r3, sp, 0x18 | r3 += arg_18h;
0x00000cec mov r1, r3 | r1 = r3;
0x00000cee str r3, [sp, 0x14] | *(arg_14h) = r3;
0x00000cf0 ldr.w r3, [fp] | r3 = *(fp);
0x00000cf4 mov r0, r3 | r0 = r3;
0x00000cf6 str r3, [sp, 0x10] | *(arg_10h) = r3;
0x00000cf8 blx 0xb18 | printf_chk ();
0x00000cfc ldr r3, [sp, 0x10] | r3 = *(arg_10h);
0x00000cfe mov r7, r0 | r7 = r0;
0x00000d00 ldrb r2, [r3] | r2 = *(r3);
| if (r2 != 0) {
0x00000d02 cbz r2, 0xd10 |
0x00000d04 ldr r2, [sp, 0x14] | r2 = *(arg_14h);
0x00000d06 ldr r2, [r2] | r2 = *(r2);
0x00000d08 ldrb r2, [r2] | r2 = *(r2);
0x00000d0a cmp r2, 0 |
| if (r2 == 0) {
0x00000d0c beq.w 0xe60 | goto label_12;
| }
| }
0x00000d10 ldr.w r2, [pc, 0x4a8] | r2 = *(0x11bc);
0x00000d14 movs r1, 1 | r1 = 1;
0x00000d16 ldr r4, [r6, r2] | r4 = *((r6 + r2));
0x00000d18 ldr.w r2, [pc, 0x4c0] |
0x00000d1c add r2, pc | r2 = 0x1efc;
0x00000d1e strd r2, r3, [sp] | __asm ("strd r2, r3, [sp]");
0x00000d22 ldr.w r3, [pc, 0x4bc] |
0x00000d26 ldr.w r2, [pc, 0x4bc] |
0x00000d2a ldr r0, [r4] | r0 = *(r4);
0x00000d2c add r3, pc |
0x00000d2e add r2, pc | r2 = 0x1f18;
0x00000d30 blx 0xb30 | readdir64 ();
0x00000d34 ldr.w r3, [pc, 0x4b0] | r3 = *(0x000011e8);
0x00000d38 add r3, pc | r3 = 0x2c4e;
0x00000d3a str r7, [r3, 0x18] | *((r3 + 0x18)) = r7;
| label_3:
0x00000d3c ldr.w r3, [pc, 0x4ac] |
0x00000d40 ldr.w r2, [pc, 0x4ac] |
0x00000d44 ldr.w r0, [fp] | r0 = *(fp);
0x00000d48 add r3, pc | r3 = 0x1f38;
0x00000d4a add r2, pc | r2 = 0x1f3e;
| do {
0x00000d4c str r0, [sp] | *(sp) = r0;
0x00000d4e movs r1, 1 | r1 = 1;
0x00000d50 ldr r0, [r4] | r0 = *(r4);
0x00000d52 mov.w r7, -1 | r7 = -1;
0x00000d56 blx 0xb30 | readdir64 ();
0x00000d5a b 0xc60 | goto label_0;
0x00000d5c ldr.w r3, [pc, 0x494] |
0x00000d60 movs r0, 1 | r0 = 1;
0x00000d62 ldr.w r2, [pc, 0x494] |
0x00000d66 ldr.w r1, [pc, 0x494] |
0x00000d6a add r3, pc | r3 = 0x1f62;
0x00000d6c add r2, pc | r2 = 0x1f6a;
0x00000d6e add r1, pc | r1 = 0x1f70;
0x00000d70 blx 0xb24 | fprintf_chk ()
0x00000d74 movs r0, 0 | r0 = 0;
0x00000d76 blx 0xa9c | fcn_00000a9c ();
0x00000d7a ldr.w r4, [pc, 0x484] |
0x00000d7e movs r0, 1 | r0 = 1;
0x00000d80 ldr.w r5, [pc, 0x480] |
0x00000d84 add r4, pc | r4 = 0x1f8a;
0x00000d86 add r5, pc | r5 = 0x1f8e;
0x00000d88 mov r2, r4 | r2 = r4;
0x00000d8a mov r1, r5 | r1 = r5;
0x00000d8c blx 0xb24 | fprintf_chk ()
0x00000d90 add.w r2, r4, 0x38 | r2 = r4 + 0x38;
0x00000d94 mov r1, r5 | r1 = r5;
0x00000d96 movs r0, 1 | r0 = 1;
0x00000d98 blx 0xb24 | fprintf_chk ()
0x00000d9c add.w r0, r4, 0x1e8 | r0 = r4 + 0x1e8;
0x00000da0 blx 0xa54 | fcn_00000a54 ();
0x00000da4 movs r0, 0 | r0 = 0;
0x00000da6 blx 0xa9c | fcn_00000a9c ();
0x00000daa ldr.w r3, [pc, 0x42c] | r3 = *(0x11da);
0x00000dae add r1, sp, 0x18 | r1 += arg_18h;
0x00000db0 movs r2, 0 | r2 = 0;
0x00000db2 ldr.w fp, [r6, r3] | fp = *((r6 + r3));
0x00000db6 str r1, [sp, 0x14] | *(arg_14h) = r1;
0x00000db8 ldr.w r3, [fp] | r3 = *(fp);
0x00000dbc mov r0, r3 | r0 = r3;
0x00000dbe str r3, [sp, 0x10] | *(arg_10h) = r3;
0x00000dc0 blx 0xaa8 | fcn_00000aa8 ();
0x00000dc4 ldr r3, [sp, 0x10] | r3 = *(arg_10h);
0x00000dc6 mov r7, r0 | r7 = r0;
0x00000dc8 ldrb r2, [r3] | r2 = *(r3);
| if (r2 != 0) {
0x00000dca cbz r2, 0xdd6 |
0x00000dcc ldr r1, [sp, 0x14] | r1 = *(arg_14h);
0x00000dce ldr r2, [r1] | r2 = *(r1);
0x00000dd0 ldrb r2, [r2] | r2 = *(r2);
0x00000dd2 cmp r2, 0 |
| if (r2 == 0) {
0x00000dd4 beq 0xe4e | goto label_13;
| }
| }
0x00000dd6 ldr r2, [pc, 0x3e4] | r2 = *(0x11be);
0x00000dd8 movs r1, 1 | r1 = 1;
0x00000dda ldr r4, [r6, r2] | r4 = *((r6 + r2));
0x00000ddc ldr.w r2, [pc, 0x428] |
0x00000de0 add r2, pc | r2 = 0x1fec;
0x00000de2 strd r2, r3, [sp] | __asm ("strd r2, r3, [sp]");
0x00000de6 ldr.w r3, [pc, 0x424] |
0x00000de8 adds r4, 0x24 | r4 += 0x24;
0x00000dea ldr.w r2, [pc, 0x424] |
0x00000dee ldr r0, [r4] | r0 = *(r4);
0x00000df0 add r3, pc |
0x00000df2 add r2, pc | r2 = 0x2008;
0x00000df4 blx 0xb30 | readdir64 ();
0x00000df8 ldr.w r3, [pc, 0x418] | r3 = *(0x00001214);
0x00000dfc add r3, pc | r3 = 0x2e02;
0x00000dfe str r7, [r3] | *(r3) = r7;
| label_2:
0x00000e00 ldr.w r3, [pc, 0x414] |
0x00000e04 ldr.w r2, [pc, 0x414] |
0x00000e08 ldr.w r0, [fp] | r0 = *(fp);
0x00000e0c add r3, pc | r3 = 0x2028;
0x00000e0e add r2, pc | r2 = 0x202e;
0x00000e10 b 0xd4c |
| } while (1);
0x00000e12 ldr r3, [pc, 0x3c4] |
0x00000e14 ldr r7, [r6, r3] | r7 = *((r6 + r3));
0x00000e16 ldr r0, [r7] | r0 = *(r7);
0x00000e18 bl 0x13ec | fcn_000013ec (r0);
0x00000e1c ldr.w r3, [pc, 0x400] | r3 = *(0x00001220);
0x00000e20 cmp r0, 1 |
0x00000e22 add r3, pc | r3 = 0x2000;
0x00000e24 strd r0, r1, [r3, 0x10] | __asm ("strd r0, r1, [r3, 0x10]");
0x00000e28 sbcs r1, r1, 0 | __asm ("sbcs r1, r1, 0");
| if (r0 >= 1) {
0x00000e2c bge.w 0xbae | goto label_1;
| }
0x00000e30 ldr r1, [pc, 0x388] | r1 = *(0x11bc);
0x00000e32 ldr r4, [r7] | r4 = *(r7);
0x00000e34 mov.w r7, -1 | r7 = -1;
0x00000e38 ldr r3, [pc, 0x3e8] |
0x00000e3a ldr r0, [r6, r1] | r0 = *((r6 + r1));
0x00000e3c movs r1, 1 | r1 = 1;
0x00000e3e ldr r2, [pc, 0x3e8] |
0x00000e40 str r4, [sp] | *(sp) = r4;
0x00000e42 add r3, pc | r3 = 0x206a;
0x00000e44 ldr r0, [r0] | r0 = *(r0);
0x00000e46 add r2, pc | r2 = 0x2074;
0x00000e48 blx 0xb30 | readdir64 ();
0x00000e4c b 0xc60 | goto label_0;
| label_13:
0x00000e4e ldr r3, [pc, 0x3dc] |
0x00000e50 cmp r0, 0 |
0x00000e52 add r3, pc | r3 = 0x2084;
0x00000e54 str r0, [r3] | *(r3) = r0;
| if (r0 >= 0) {
0x00000e56 bge.w 0xbae | goto label_1;
| }
0x00000e5a ldr r3, [pc, 0x360] | r3 = *(0x11be);
0x00000e5c ldr r4, [r6, r3] | r4 = *((r6 + r3));
0x00000e5e b 0xe00 | goto label_2;
| label_12:
0x00000e60 ldr r3, [pc, 0x3cc] |
0x00000e62 cmp r0, 0 |
0x00000e64 add r3, pc | r3 = 0x2098;
0x00000e66 str r0, [r3, 0x18] | *((r3 + 0x18)) = r0;
| if (r0 > 0) {
| label_9:
0x00000e68 bgt.w 0xbae | goto label_1;
| }
0x00000e6c ldr r3, [pc, 0x34c] | r3 = *(0x11bc);
0x00000e6e ldr r4, [r6, r3] | r4 = *((r6 + r3));
0x00000e70 b 0xd3c | goto label_3;
| label_10:
0x00000e72 ldr r3, [pc, 0x3c0] | r3 = *(0x1236);
0x00000e74 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00000e76 ldr r2, [r3] | r2 = *(0x1236);
0x00000e78 cmp r4, r2 |
| if (r4 == r2) {
0x00000e7a beq.w 0x118a | goto label_14;
| }
0x00000e7e subs r4, 1 | r4--;
0x00000e80 cmp r2, r4 |
| if (r2 != r4) {
0x00000e82 bne.w 0x1148 | goto label_15;
| }
0x00000e86 ldr r3, [pc, 0x3b0] |
0x00000e88 ldr.w r1, [r5, r2, lsl 2] | offset_0 = r2 << 2;
| r1 = *((r5 + offset_0));
0x00000e8c add r3, pc |
0x00000e8e ldr r2, [r3] | r2 = *(0x20ca);
0x00000e90 str r1, [r3, 4] | *((r3 + 4)) = r1;
0x00000e92 ldr r3, [r3, 8] | r3 = *(0x20d2);
0x00000e94 adds r2, 1 | r2++;
| if (r2 == 1) {
0x00000e96 beq.w 0x101a | goto label_16;
| }
0x00000e9a cmp r3, 0 |
| if (r3 != 0) {
0x00000e9c bne.w 0x115e | goto label_17;
| }
| label_7:
0x00000ea0 ldr r3, [pc, 0x398] |
0x00000ea2 add r3, pc | r3 = 0x20e2;
0x00000ea4 ldrd r0, r2, [r3, 0x10] | __asm ("ldrd r0, r2, [r3, 0x10]");
0x00000ea8 ldr r1, [r3, 0x18] | r1 = *(0x20fa);
0x00000eaa cmp.w r2, -1 |
0x00000eae it eq |
| if (r2 == -1) {
0x00000eb0 cmpeq r0, -1 | __asm ("cmpeq r0, -1");
| }
| if (r2 == -1) {
0x00000eb4 beq.w 0xffc | goto label_18;
| }
0x00000eb8 adds r1, 1 | r1++;
| if (r1 != 1) {
0x00000eba bne.w 0x1174 | goto label_19;
| }
| label_6:
0x00000ebe bl 0x1f60 | r0 = fcn_00001f60 ();
0x00000ec2 mov r4, r0 | r4 = r0;
0x00000ec4 cmp r0, 0 |
| if (r0 == 0) {
0x00000ec6 beq.w 0x10b2 | goto label_20;
| }
0x00000eca ldr r5, [pc, 0x374] |
0x00000ecc add r5, pc | r5 = 0x2112;
0x00000ece ldr r1, [r5, 4] | r1 = *(0x2116);
0x00000ed0 bl 0x27b4 | r0 = fcn_000027b4 (r0, r1);
0x00000ed4 cmp r0, 2 |
| if (r0 == 2) {
0x00000ed6 beq.w 0x112e | goto label_21;
| }
0x00000eda cmp r0, 0 |
0x00000edc blt 0xf4e |
| while (1) {
| label_5:
0x00000ede ldr r5, [pc, 0x364] |
0x00000ee0 add.w r8, sp, 0x18 | r8 += arg_18h;
0x00000ee4 mov r2, r8 | r2 = r8;
0x00000ee6 mov r0, r4 | r0 = r4;
0x00000ee8 add r5, pc | r5 = 0x2132;
0x00000eea ldr r1, [r5, 4] | r1 = *(0x2136);
0x00000eec bl 0x32d4 | r0 = fcn_000032d4 (r0, r1, r2);
0x00000ef0 cmp r0, 0 |
| if (r0 != 0) {
0x00000ef2 bne.w 0x1072 | goto label_22;
| }
0x00000ef4 strh r6, [r7, 4] | *((r7 + 4)) = r6;
0x00000ef6 ldr r2, [r5, 8] | r2 = *((r5 + 8));
0x00000ef8 ldr.w r1, [r8] | r1 = *(r8);
0x00000efc cmp r2, 0 |
| if (r2 == 0) {
0x00000efe beq 0xf98 | goto label_23;
| }
0x00000f00 add r3, sp, 0x70 | r3 += arg_70h;
0x00000f02 mov r0, r4 | r0 = r4;
0x00000f04 bl 0x3a90 | r0 = fcn_00003a90 (r0, r1, r2, r3);
0x00000f08 cmp r0, 0 |
| if (r0 != 0) {
0x00000f0a bne.w 0x10ee | goto label_24;
| }
0x00000f0e ldr r3, [sp, 0x74] | r3 = *(arg_74h);
0x00000f10 str r3, [r5] | *(r5) = r3;
| label_4:
0x00000f12 ldr r2, [pc, 0x334] |
0x00000f14 add r2, pc | r2 = 0x2162;
0x00000f16 ldr r3, [r2, 0x18] | r3 = *(0x217a);
0x00000f18 adds r1, r3, 1 | r1 = r3 + 1;
| if (r1 != r3) {
0x00000f1a beq 0xf28 |
0x00000f1c ldr r1, [sp, 0x9c] | r1 = *(arg_9ch);
0x00000f1e mul r3, r1, r3 | r3 = r1 * r3;
0x00000f22 str r3, [r2, 0x10] | *((r2 + 0x10)) = r3;
0x00000f24 asrs r3, r3, 0x1f | r3 >>= 0x1f;
0x00000f26 str r3, [r2, 0x14] | *((r2 + 0x14)) = r3;
| }
0x00000f28 ldr r3, [pc, 0x320] |
0x00000f2a mov r0, r4 | r0 = r4;
0x00000f2c add r3, pc | r3 = 0x217c;
0x00000f2e ldrd r8, sb, [r3, 0x10] | __asm ("ldrd r8, sb, [r3, 0x10]");
0x00000f32 strd r8, sb, [sp] | __asm ("strd r8, sb, [sp]");
0x00000f36 ldrd r2, r1, [r3] | __asm ("ldrd r2, r1, [r3]");
0x00000f3a bl 0x2c24 | r0 = fcn_00002c24 (r0, r1, r2);
0x00000f3e mov r3, r0 | r3 = r0;
0x00000f40 cmp r0, 0 |
| if (r0 != 0) {
0x00000f42 bne 0x1036 | goto label_25;
| }
0x00000f44 mov r0, r4 | r0 = r4;
0x00000f46 mov r7, r3 | r7 = r3;
0x00000f48 bl 0x1ec0 | fcn_00001ec0 (r0);
0x00000f4c b 0xc60 | goto label_0;
0x00000f4e blx 0xacc | fcn_00000acc ();
0x00000f52 ldr r2, [pc, 0x268] | r2 = *(0x11be);
0x00000f54 ldr.w r8, [r0] | r8 = *(r0);
0x00000f58 ldr r3, [r5, 4] | r3 = *((r5 + 4));
0x00000f5a ldr r5, [r6, r2] | r5 = *((r6 + r2));
0x00000f5c cmp.w r8, 0x13 |
0x00000f60 ldr r0, [r5] | r0 = *(r5);
0x00000f62 str r3, [sp] | *(sp) = r3;
| if (r8 == 0x13) {
0x00000f64 beq 0xfec | goto label_26;
| }
0x00000f66 ldr r3, [pc, 0x2e8] |
0x00000f68 movs r1, 1 | r1 = 1;
0x00000f6a ldr r2, [pc, 0x2e8] |
0x00000f6c add r3, pc | r3 = 0x21c2;
0x00000f6e add r2, pc | r2 = 0x21c8;
0x00000f70 blx 0xb30 | readdir64 ();
0x00000f74 mov r0, r8 | r0 = r8;
0x00000f76 ldr r5, [r5] | r5 = *(r5);
0x00000f78 blx 0xa6c | fcn_00000a6c ();
0x00000f7c ldr r3, [pc, 0x2d8] |
0x00000f7e movs r1, 1 | r1 = 1;
0x00000f80 ldr r2, [pc, 0x2d8] |
0x00000f82 str r0, [sp, 8] | *(arg_8h) = r0;
0x00000f84 mov r0, r5 | r0 = r5;
0x00000f86 add r3, pc | r3 = 0x21e2;
0x00000f88 str.w r8, [sp, 4] | __asm ("str.w r8, [var_4h]");
0x00000f8c str r3, [sp] | *(sp) = r3;
0x00000f8e add r2, pc | r2 = 0x21ee;
0x00000f90 movs r3, 0xa | r3 = 0xa;
0x00000f92 blx 0xb30 | readdir64 ();
0x00000f96 b 0xede |
| }
| label_23:
0x00000f98 ldr r2, [r5] | r2 = *(r5);
0x00000f9a add r3, sp, 0x70 | r3 += arg_70h;
0x00000f9c mov r0, r4 | r0 = r4;
0x00000f9e bl 0x34f8 | r0 = fcn_000034f8 (r0, r1, r2, r3, r4);
0x00000fa2 cmp r0, 0 |
| if (r0 == 0) {
0x00000fa4 beq 0xf12 | goto label_4;
| }
0x00000fa6 blx 0xacc | fcn_00000acc ();
0x00000faa ldr r3, [r5] | r3 = *(r5);
0x00000fac movs r1, 1 | r1 = 1;
0x00000fae ldr r2, [pc, 0x20c] | r2 = *(0x11be);
0x00000fb0 ldr r5, [r0] | r5 = *(r0);
0x00000fb2 ldr r6, [r6, r2] | r6 = *((r6 + r2));
0x00000fb4 str r3, [sp] | *(sp) = r3;
0x00000fb6 ldr r2, [pc, 0x2a8] |
0x00000fb8 ldr r3, [pc, 0x2a8] |
0x00000fba ldr r0, [r6] | r0 = *(r6);
0x00000fbc add r2, pc | r2 = 0x2222;
0x00000fbe add r3, pc | r3 = 0x2226;
0x00000fc0 blx 0xb30 | readdir64 ();
0x00000fc4 mov r0, r5 | r0 = r5;
0x00000fc6 ldr r6, [r6] | r6 = *(r6);
0x00000fc8 blx 0xa6c | fcn_00000a6c ();
0x00000fcc ldr r3, [pc, 0x298] |
0x00000fce movs r1, 1 | r1 = 1;
0x00000fd0 ldr r2, [pc, 0x298] |
0x00000fd2 str r0, [sp, 8] | *(arg_8h) = r0;
0x00000fd4 mov r0, r6 | r0 = r6;
0x00000fd6 add r3, pc | r3 = 0x2242;
0x00000fd8 str r5, [sp, 4] | var_4h = r5;
0x00000fda str r3, [sp] | *(sp) = r3;
0x00000fdc add r2, pc | r2 = 0x224c;
0x00000fde movs r3, 0xa | r3 = 0xa;
0x00000fe0 blx 0xb30 | readdir64 ();
| label_8:
0x00000fe4 mov r0, r4 | r0 = r4;
0x00000fe6 bl 0x1ec0 | fcn_00001ec0 (r0);
0x00000fea b 0xc60 | goto label_0;
| label_26:
0x00000fec ldr r3, [pc, 0x280] |
0x00000fee movs r1, 1 | r1 = 1;
0x00000ff0 ldr r2, [pc, 0x280] |
0x00000ff2 add r3, pc | r3 = 0x2266;
0x00000ff4 add r2, pc | r2 = 0x226c;
0x00000ff6 blx 0xb30 | readdir64 ();
0x00000ffa b 0xede | goto label_5;
| label_18:
0x00000ffc adds r0, r1, 1 | r0 = r1 + 1;
| if (r0 != r1) {
0x00000ffe bne.w 0xebe | goto label_6;
| }
0x00001002 ldr r0, [pc, 0x1b8] | r0 = *(0x11be);
0x00001004 mov r7, r1 | r7 = r1;
0x00001006 ldr r3, [pc, 0x270] |
0x00001008 ldr r2, [pc, 0x270] |
0x0000100a ldr r1, [r6, r0] | r1 = *((r6 + r0));
0x0000100c add r3, pc | r3 = 0x228a;
0x0000100e add r2, pc | r2 = 0x228e;
0x00001010 ldr r0, [r1] | r0 = *(r1);
0x00001012 movs r1, 1 | r1 = 1;
0x00001014 blx 0xb30 | readdir64 ();
0x00001016 stc p6, c14, [ip, 0x88] | __asm ("stc p6, c14, [ip, 0x88]");
| label_16:
0x0000101a cmp r3, 0 |
| if (r3 != 0) {
0x0000101c bne.w 0xea0 | goto label_7;
| }
0x00001020 ldr r1, [pc, 0x198] | r1 = *(0x11bc);
0x00001022 ldr r3, [pc, 0x25c] |
0x00001024 ldr r2, [pc, 0x25c] |
0x00001026 ldr r1, [r6, r1] | r1 = *((r6 + r1));
0x00001028 add r3, pc | r3 = 0x22ae;
0x0000102a add r2, pc | r2 = 0x22b2;
0x0000102c ldr r0, [r1] | r0 = *(0x11bc);
0x0000102e movs r1, 1 | r1 = 1;
0x00001030 blx 0xb30 | readdir64 ();
0x00001034 b 0xc60 | goto label_0;
| label_25:
0x00001036 blx 0xacc | fcn_00000acc ();
0x0000103a ldr r3, [pc, 0x180] | r3 = *(0x11be);
0x0000103c movs r1, 1 | r1 = 1;
0x0000103e ldr r2, [pc, 0x248] |
0x00001040 ldr r5, [r0] | r5 = *(r0);
0x00001042 ldr r6, [r6, r3] | r6 = *((r6 + r3));
0x00001044 ldr r3, [pc, 0x244] |
0x00001046 add r2, pc | r2 = 0x22d4;
0x00001048 ldr r0, [r6] | r0 = *(r6);
0x0000104a add r3, pc | r3 = 0x22da;
0x0000104c blx 0xb30 | readdir64 ();
0x00001050 mov r0, r5 | r0 = r5;
0x00001052 ldr r6, [r6] | r6 = *(r6);
0x00001054 blx 0xa6c | fcn_00000a6c ();
0x00001058 ldr r3, [pc, 0x234] |
0x0000105a movs r1, 1 | r1 = 1;
0x0000105c ldr r2, [pc, 0x234] |
0x0000105e str r0, [sp, 8] | *(arg_8h) = r0;
0x00001060 mov r0, r6 | r0 = r6;
0x00001062 add r3, pc | r3 = 0x22f6;
0x00001064 str r5, [sp, 4] | var_4h = r5;
0x00001066 str r3, [sp] | *(sp) = r3;
0x00001068 add r2, pc | r2 = 0x2300;
0x0000106a movs r3, 0xa | r3 = 0xa;
0x0000106c blx 0xb30 | readdir64 ();
0x00001070 b 0xfe4 | goto label_8;
| label_22:
0x00001072 blx 0xacc | fcn_00000acc ();
0x00001076 ldr r3, [r5, 4] | r3 = *((r5 + 4));
0x00001078 movs r1, 1 | r1 = 1;
0x0000107a ldr r2, [pc, 0x140] | r2 = *(0x11be);
0x0000107c ldr r5, [r0] | r5 = *(r0);
0x0000107e ldr r6, [r6, r2] | r6 = *((r6 + r2));
0x00001080 str r3, [sp] | *(sp) = r3;
0x00001082 ldr r2, [pc, 0x214] |
0x00001084 ldr r3, [pc, 0x214] |
0x00001086 ldr r0, [r6] | r0 = *(r6);
0x00001088 add r2, pc | r2 = 0x2326;
0x0000108a add r3, pc | r3 = 0x232a;
0x0000108c blx 0xb30 | readdir64 ();
0x00001090 mov r0, r5 | r0 = r5;
0x00001092 ldr r6, [r6] | r6 = *(r6);
0x00001094 blx 0xa6c | fcn_00000a6c ();
0x00001098 ldr r3, [pc, 0x204] |
0x0000109a movs r1, 1 | r1 = 1;
0x0000109c ldr r2, [pc, 0x204] |
0x0000109e str r0, [sp, 8] | *(arg_8h) = r0;
0x000010a0 mov r0, r6 | r0 = r6;
0x000010a2 add r3, pc | r3 = 0x2346;
0x000010a4 str r5, [sp, 4] | var_4h = r5;
0x000010a6 str r3, [sp] | *(sp) = r3;
0x000010a8 add r2, pc | r2 = 0x2350;
0x000010aa movs r3, 0xa | r3 = 0xa;
0x000010ac blx 0xb30 | readdir64 ();
0x000010b0 b 0xfe4 | goto label_8;
| label_20:
0x000010b2 blx 0xacc | fcn_00000acc ();
0x000010b6 ldr r2, [pc, 0x104] | r2 = *(0x11be);
0x000010b8 movs r1, 1 | r1 = 1;
0x000010ba ldr r3, [pc, 0x1ec] |
0x000010bc ldr r4, [r0] | r4 = *(r0);
0x000010be ldr r5, [r6, r2] | r5 = *((r6 + r2));
0x000010c0 ldr r2, [pc, 0x1e8] |
0x000010c2 add r3, pc | r3 = 0x2370;
0x000010c4 ldr r0, [r5] | r0 = *(r5);
0x000010c6 add r2, pc | r2 = 0x2376;
0x000010c8 blx 0xb30 | readdir64 ();
0x000010cc mov r0, r4 | r0 = r4;
0x000010ce ldr r5, [r5] | r5 = *(r5);
0x000010d0 blx 0xa6c | fcn_00000a6c ();
0x000010d4 ldr r1, [pc, 0x1d8] |
0x000010d6 movs r3, 0xa | r3 = 0xa;
0x000010d8 ldr r2, [pc, 0x1d8] |
0x000010da strd r4, r0, [sp, 4] | __asm ("strd r4, r0, [sp, 4]");
0x000010de mov r0, r5 | r0 = r5;
0x000010e0 add r1, pc | r1 = 0x2394;
0x000010e2 str r1, [sp] | *(sp) = r1;
0x000010e4 add r2, pc | r2 = 0x239c;
0x000010e6 movs r1, 1 | r1 = 1;
0x000010e8 blx 0xb30 | readdir64 ();
0x000010ec b 0xc60 | goto label_0;
| label_24:
0x000010ee blx 0xacc | fcn_00000acc ();
0x000010f2 ldr r3, [r5, 8] | r3 = *((r5 + 8));
0x000010f4 movs r1, 1 | r1 = 1;
0x000010f6 ldr r2, [pc, 0xc4] | r2 = *(0x11be);
0x000010f8 ldr r5, [r0] | r5 = *(r0);
0x000010fa ldr r6, [r6, r2] | r6 = *((r6 + r2));
0x000010fc str r3, [sp] | *(sp) = r3;
0x000010fe ldr r2, [pc, 0x1b8] |
0x00001100 ldr r3, [pc, 0x1b8] |
0x00001102 ldr r0, [r6] | r0 = *(r6);
0x00001104 add r2, pc | r2 = 0x23c2;
0x00001106 add r3, pc | r3 = 0x23c6;
0x00001108 blx 0xb30 | readdir64 ();
0x0000110c mov r0, r5 | r0 = r5;
0x0000110e ldr r6, [r6] | r6 = *(r6);
0x00001110 blx 0xa6c | fcn_00000a6c ();
0x00001114 ldr r3, [pc, 0x1a8] |
0x00001116 movs r1, 1 | r1 = 1;
0x00001118 ldr r2, [pc, 0x1a8] |
0x0000111a str r0, [sp, 8] | *(arg_8h) = r0;
0x0000111c mov r0, r6 | r0 = r6;
0x0000111e add r3, pc | r3 = 0x23e2;
0x00001120 str r5, [sp, 4] | var_4h = r5;
0x00001122 str r3, [sp] | *(sp) = r3;
0x00001124 add r2, pc | r2 = 0x23ec;
0x00001126 movs r3, 0xa | r3 = 0xa;
0x00001128 blx 0xb30 | readdir64 ();
0x0000112c b 0xfe4 | goto label_8;
| label_21:
0x0000112e ldr r3, [pc, 0x8c] | r3 = *(0x11be);
0x00001130 ldr r1, [r5, 4] | r1 = *((r5 + 4));
0x00001132 ldr r2, [r6, r3] | r2 = *((r6 + r3));
0x00001134 str r1, [sp] | *(sp) = r1;
0x00001136 movs r1, 1 | r1 = 1;
0x00001138 ldr r3, [pc, 0x18c] |
0x0000113a ldr r0, [r2] | r0 = *(r2);
0x0000113c ldr r2, [pc, 0x18c] |
0x0000113e add r3, pc | r3 = 0x240a;
0x00001140 add r2, pc | r2 = 0x2410;
0x00001142 blx 0xb30 | readdir64 ();
0x00001146 b 0xfe4 | goto label_8;
| label_15:
0x00001148 ldr r1, [pc, 0x70] | r1 = *(0x11bc);
0x0000114a ldr r3, [pc, 0x184] |
0x0000114c ldr r2, [pc, 0x184] |
0x0000114e ldr r1, [r6, r1] | r1 = *((r6 + r1));
0x00001150 add r3, pc | r3 = 0x2426;
0x00001152 add r2, pc | r2 = 0x242a;
0x00001154 ldr r0, [r1] | r0 = *(0x11bc);
0x00001156 movs r1, 1 | r1 = 1;
0x00001158 blx 0xb30 | readdir64 ();
0x0000115c b 0xc60 | goto label_0;
| label_17:
0x0000115e ldr r1, [pc, 0x5c] | r1 = *(0x11be);
0x00001160 ldr r3, [pc, 0x174] |
0x00001162 ldr r2, [pc, 0x178] |
0x00001164 ldr r1, [r6, r1] | r1 = *((r6 + r1));
0x00001166 add r3, pc | r3 = 0x2442;
0x00001168 add r2, pc | r2 = 0x244a;
0x0000116a ldr r0, [r1] | r0 = *(0x11be);
0x0000116c movs r1, 1 | r1 = 1;
0x0000116e blx 0xb30 | readdir64 ();
0x00001172 b 0xc60 | goto label_0;
| label_19:
0x00001174 ldr r1, [pc, 0x44] | r1 = *(0x11bc);
0x00001176 ldr r3, [pc, 0x168] |
0x00001178 ldr r2, [pc, 0x168] |
0x0000117a ldr r1, [r6, r1] | r1 = *((r6 + r1));
0x0000117c add r3, pc | r3 = 0x2462;
0x0000117e add r2, pc | r2 = 0x2466;
0x00001180 ldr r0, [r1] | r0 = *(0x11bc);
0x00001182 movs r1, 1 | r1 = 1;
0x00001184 blx 0xb30 | readdir64 ();
0x00001188 b 0xc60 | goto label_0;
| label_14:
0x0000118a ldr r1, [pc, 0x30] | r1 = *(0x11be);
0x0000118c ldr r3, [pc, 0x158] |
0x0000118e ldr r2, [pc, 0x15c] |
0x00001190 ldr r1, [r6, r1] | r1 = *((r6 + r1));
0x00001192 add r3, pc | r3 = 0x247e;
0x00001194 add r2, pc | r2 = 0x2486;
0x00001196 ldr r0, [r1] | r0 = *(0x11be);
0x00001198 movs r1, 1 | r1 = 1;
0x0000119a blx 0xb30 | readdir64 ();
0x0000119e b 0xc60 | goto label_0;
| label_11:
0x000011a0 blx 0x9fc | fcn_000009fc ();
0x000011a4 strh r2, [r5, r6] | *((r5 + r6)) = r2;
0x000011a6 movs r1, r0 | r1 = r0;
0x000011a8 lsls r0, r6, 2 | r0 = r6 << 2;
0x000011aa movs r0, r0 |
0x000011ac strh r0, [r5, r0] | *((r5 + r0)) = r0;
0x000011ae movs r1, r0 | r1 = r0;
0x000011b0 adds r3, 0 | r3 += 0;
0x000011b2 movs r0, r0 |
0x000011b4 strb r2, [r4, r1] | *((r4 + r1)) = r2;
0x000011b6 movs r1, r0 | r1 = r0;
0x000011b8 strh r4, [r1, r6] | *((r1 + r6)) = r4;
0x000011ba movs r1, r0 | r1 = r0;
0x000011bc lsls r0, r7, 2 | r0 = r7 << 2;
0x000011be movs r0, r0 |
0x000011c0 adds r3, 0x5c | r3 += 0x5c;
0x000011c2 movs r0, r0 |
0x000011c4 strh r0, [r1, r3] | *((r1 + r3)) = r0;
0x000011c6 movs r1, r0 | r1 = r0;
0x000011c8 adds r2, 0x16 | r2 += 0x16;
0x000011ca movs r0, r0 |
0x000011cc adds r2, 0xf8 | r2 += 0xf8;
0x000011ce movs r0, r0 |
0x000011d0 adds r6, 0x54 | r6 += 0x54;
0x000011d2 movs r0, r0 |
0x000011d4 adds r2, 0xba | r2 += 0xba;
0x000011d6 movs r0, r0 |
0x000011d8 lsls r0, r1, 3 | r0 = r1 << 3;
0x000011da movs r0, r0 |
0x000011dc adds r1, 0xf4 | r1 += 0xf4;
0x000011de movs r0, r0 |
0x000011e0 adds r1, 0x80 | r1 += 0x80;
0x000011e2 movs r0, r0 |
0x000011e4 adds r1, 0xae | r1 += 0xae;
0x000011e6 movs r0, r0 |
0x000011e8 strh r4, [r1, r3] | *((r1 + r3)) = r4;
0x000011ea movs r1, r0 | r1 = r0;
0x000011ec adds r1, 0x64 | r1 += 0x64;
0x000011ee movs r0, r0 |
0x000011f0 adds r1, 0xd2 | r1 += 0xd2;
0x000011f2 movs r0, r0 |
0x000011f4 adds r2, 0xa | r2 += 0xa;
0x000011f6 movs r0, r0 |
0x000011f8 adds r1, 0x40 | r1 += 0x40;
0x000011fa movs r0, r0 |
0x000011fc adds r2, 0xe | r2 += 0xe;
0x000011fe movs r0, r0 |
0x00001200 adds r5, 0x80 | r5 += 0x80;
0x00001202 movs r0, r0 |
0x00001204 adds r1, 0xe6 | r1 += 0xe6;
0x00001206 movs r0, r0 |
0x00001208 adds r1, 0x60 | r1 += 0x60;
0x0000120a movs r0, r0 |
0x0000120c adds r0, 0xbc | r0 += 0xbc;
0x0000120e movs r0, r0 |
0x00001210 adds r0, 0xea | r0 += 0xea;
0x00001212 movs r0, r0 |
0x00001214 strh r0, [r1, r0] | *((r1 + r0)) = r0;
0x00001216 movs r1, r0 | r1 = r0;
0x00001218 adds r0, 0xa0 | r0 += 0xa0;
0x0000121a movs r0, r0 |
0x0000121c adds r1, 0x3a | r1 += 0x3a;
0x0000121e movs r0, r0 |
0x00001220 str r2, [r4, r7] | *((r4 + r7)) = r2;
0x00001222 movs r1, r0 | r1 = r0;
0x00001224 adds r0, 0x6a | r0 += 0x6a;
0x00001226 movs r0, r0 |
0x00001228 adds r0, 0x72 | r0 += 0x72;
0x0000122a movs r0, r0 |
0x0000122c str r2, [r6, r6] | *((r6 + r6)) = r2;
0x0000122e movs r1, r0 | r1 = r0;
0x00001230 str r0, [r4, r6] | *((r4 + r6)) = r0;
0x00001232 movs r1, r0 | r1 = r0;
0x00001234 lsls r4, r6, 2 | r4 = r6 << 2;
0x00001236 movs r0, r0 |
0x00001238 str r0, [r7, r5] | *((r7 + r5)) = r0;
0x0000123a movs r1, r0 | r1 = r0;
0x0000123c str r2, [r4, r5] | *((r4 + r5)) = r2;
0x0000123e movs r1, r0 | r1 = r0;
0x00001240 str r0, [r7, r4] | *((r7 + r4)) = r0;
0x00001242 movs r1, r0 | r1 = r0;
0x00001244 str r4, [r3, r4] | *((r3 + r4)) = r4;
0x00001246 movs r1, r0 | r1 = r0;
0x00001248 str r0, [r6, r3] | *((r6 + r3)) = r0;
0x0000124a movs r1, r0 | r1 = r0;
0x0000124c str r0, [r3, r3] | *((r3 + r3)) = r0;
0x0000124e movs r1, r0 | r1 = r0;
0x00001250 cmp r7, 0x40 |
0x00001252 movs r0, r0 |
0x00001254 adds r2, 0x82 | r2 += 0x82;
0x00001256 movs r0, r0 |
0x00001258 cmp r7, 0xea |
0x0000125a movs r0, r0 |
0x0000125c adds r1, 0xe2 | r1 += 0xe2;
0x0000125e movs r0, r0 |
0x00001260 adds r2, 0xc4 | r2 += 0xc4;
0x00001262 movs r0, r0 |
0x00001264 cmp r6, 0xee |
0x00001266 movs r0, r0 |
0x00001268 cmp r7, 0x9a |
0x0000126a movs r0, r0 |
0x0000126c adds r1, 0x94 | r1 += 0x94;
0x0000126e movs r0, r0 |
0x00001270 cmp r6, 0xba |
0x00001272 movs r0, r0 |
0x00001274 adds r1, 0xd0 | r1 += 0xd0;
0x00001276 movs r0, r0 |
0x00001278 cmp r6, 0xa0 |
0x0000127a movs r0, r0 |
0x0000127c adds r0, 0xca | r0 += 0xca;
0x0000127e movs r0, r0 |
0x00001280 cmp r6, 0x84 |
0x00001282 movs r0, r0 |
0x00001284 adds r0, 0x26 | r0 += 0x26;
0x00001286 movs r0, r0 |
0x00001288 adds r2, 0x66 | r2 += 0x66;
0x0000128a movs r0, r0 |
0x0000128c cmp r6, 0x62 |
0x0000128e movs r0, r0 |
0x00001290 cmp r7, 0xe |
0x00001292 movs r0, r0 |
0x00001294 adds r1, 8 | r1 += 8;
0x00001296 movs r0, r0 |
0x00001298 adds r1, 0x90 | r1 += 0x90;
0x0000129a movs r0, r0 |
0x0000129c cmp r6, 0x22 |
0x0000129e movs r0, r0 |
0x000012a0 cmp r6, 0xce |
0x000012a2 movs r0, r0 |
0x000012a4 adds r0, 0xc8 | r0 += 0xc8;
0x000012a6 movs r0, r0 |
0x000012a8 cmp r5, 0xea |
0x000012aa movs r0, r0 |
0x000012ac adds r0, 0x8a | r0 += 0x8a;
0x000012ae movs r0, r0 |
0x000012b0 cmp r6, 0x90 |
0x000012b2 movs r0, r0 |
0x000012b4 adds r0, 0x8c | r0 += 0x8c;
0x000012b6 movs r0, r0 |
0x000012b8 adds r1, 0x50 | r1 += 0x50;
0x000012ba movs r0, r0 |
0x000012bc cmp r5, 0xa6 |
0x000012be movs r0, r0 |
0x000012c0 cmp r6, 0x52 |
0x000012c2 movs r0, r0 |
0x000012c4 adds r0, 0x4c | r0 += 0x4c;
0x000012c6 movs r0, r0 |
0x000012c8 cmp r5, 0x6e |
0x000012ca movs r0, r0 |
0x000012cc adds r0, 0x44 | r0 += 0x44;
0x000012ce movs r0, r0 |
0x000012d0 cmp r5, 0x5c |
0x000012d2 movs r0, r0 |
0x000012d4 cmp r6, 0xba |
0x000012d6 movs r0, r0 |
0x000012d8 cmp r5, 0x46 |
0x000012da movs r0, r0 |
0x000012dc cmp r7, 0x28 |
0x000012de movs r0, r0 |
0x000012e0 cmp r5, 0x30 |
0x000012e2 movs r0, r0 |
0x000012e4 cmp r7, 0x9a |
0x000012e6 movs r0, r0 |
0x000012e8 cmp r5, 0x1a |
0x000012ea movs r0, r0 |
0x000012ec cmp r6, 0x34 |
0x000012ee movs r0, r0 |
0x00001324 adds r0, 0x14 | r0 += 0x14;
0x00001326 b 0xe68 | goto label_9;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/ubirsvol.mtd-utils @ 0x13ec */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.000013ec () | void fcn_000013ec (int16_t arg1) {
| int16_t var_0h_2;
| int16_t var_4h_2;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_0h;
| int16_t var_4h;
| r0 = arg1;
| label_3:
0x00000afc bx pc | return void (*pc)() ();
0x000013ec push.w {r4, r5, r6, r7, r8, sb, lr} |
0x000013f0 sub sp, 0xc |
0x000013f2 ldr r4, [pc, 0xd8] |
0x000013f4 movs r2, 0 | r2 = 0;
0x000013f6 mov r1, sp | r1 = sp;
0x000013f8 mov r5, r0 | r5 = r0;
0x000013fa ldr r3, [pc, 0xd4] | r3 = *(0x14d2);
0x000013fc add r4, pc | r4 = 0x28ce;
0x000013fe ldr r7, [pc, 0xd4] |
0x00001400 ldr r3, [r4, r3] |
0x00001402 add r7, pc | r7 = 0x28dc;
0x00001404 ldr r3, [r3] | r3 = *(0x28ce);
0x00001406 str r3, [sp, 4] | var_4h = r3;
0x00001408 mov.w r3, 0 | r3 = 0;
0x0000140c blx 0xb18 | printf_chk ();
0x00001410 ldr.w r8, [sp] | r8 = *(sp);
0x00001414 lsrs r2, r1, 0x1f | r2 = r1 >> 0x1f;
0x00001416 cmp r8, r5 |
0x00001418 it eq |
| if (r8 != r5) {
0x0000141a orreq r2, r2, 1 | r2 |= 1;
| }
0x0000141e cmp r2, 0 |
| if (r2 != 0) {
0x00001420 bne 0x14be | goto label_5;
| }
0x00001422 ldrb.w r3, [r8] | r3 = *(r8);
0x00001426 mov sb, r0 | sb = r0;
| if (r3 == 0) {
0x00001428 cbnz r3, 0x1446 |
| label_0:
0x0000142a ldr r2, [pc, 0xac] |
0x0000142c ldr r3, [pc, 0xa0] | r3 = *(0x14d0);
0x0000142e add r2, pc | r2 = 0x290c;
0x00001430 ldr r3, [r2, r3] | r3 = *(0x290c);
0x00001432 ldr r2, [r3] | r2 = *(0x290c);
0x00001434 ldr r3, [sp, 4] | r3 = var_4h;
0x00001436 eors r2, r3 | r2 ^= r3;
0x00001438 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000143c bne 0x14c8 | goto label_6;
| }
0x0000143e mov r0, sb | r0 = sb;
0x00001440 add sp, 0xc |
0x00001442 pop.w {r4, r5, r6, r7, r8, sb, pc} |
| }
0x00001446 cmp r3, 0x20 |
0x00001448 it ne |
| if (r3 != 0x20) {
0x0000144a cmpne r3, 9 | __asm ("cmpne r3, 9");
| }
0x0000144c mov r6, r1 | r6 = r1;
0x0000144e mov r4, r0 | r4 = r0;
0x00001450 mov r5, r8 | r5 = r8;
| if (r3 != 0x20) {
0x00001452 bne 0x1460 | goto label_7;
| }
| do {
0x00001454 ldrb r2, [r5, 1]! | r2 = *((r5 += 1));
0x00001458 cmp r2, 9 |
0x0000145a it ne |
| if (r2 != 9) {
0x0000145c cmpne r2, 0x20 | __asm ("cmpne r2, 0x20");
| }
0x0000145e beq 0x1454 |
| } while (r2 == 9);
| label_7:
0x00001460 ldr r1, [pc, 0x78] |
0x00001462 mov r0, r5 | r0 = r5;
0x00001464 add r1, pc | r1 = 0x2944;
0x00001466 blx 0x9bc | r0 = strcmp (r0, r1);
| if (r0 == 0) {
0x0000146a cbz r0, 0x1498 | goto label_8;
| }
0x0000146c ldr r1, [pc, 0x70] |
0x0000146e mov r0, r5 | r0 = r5;
0x00001470 add r1, pc | r1 = 0x2954;
0x00001472 blx 0x9bc | r0 = strcmp (r0, r1);
| if (r0 == 0) {
0x00001476 cbz r0, 0x149e | goto label_9;
| }
0x00001478 ldr r1, [pc, 0x68] |
0x0000147a mov r0, r5 | r0 = r5;
0x0000147c add r1, pc | r1 = 0x2964;
0x0000147e blx 0x9bc | strcmp (r0, r1);
0x00001482 mov.w r3, 0x40000000 | r3 = 0x40000000;
| if (r0 != 0) {
0x00001486 cbnz r0, 0x14a4 | goto label_10;
| }
| do {
| label_1:
0x00001488 mul r4, r0, r4 | r4 = r0 * r4;
0x0000148c umull sb, r1, sb, r3 | sb:r1 = sb * r3;
0x00001490 mla r4, r3, r6, r4 | __asm ("mla r4, r3, r6, r4");
0x00001494 add r1, r4 | r1 += r4;
0x00001496 b 0x142a | goto label_0;
| label_8:
0x00001498 mov.w r3, 0x400 | r3 = 0x400;
0x0000149c b 0x1488 |
| } while (1);
| label_9:
0x0000149e mov.w r3, 0x100000 | r3 = 0x100000;
0x000014a2 b 0x1488 | goto label_1;
| label_10:
0x000014a4 ldr r2, [pc, 0x40] |
0x000014a6 mov r3, r8 | r3 = r8;
0x000014a8 ldr r0, [pc, 0x40] | r0 = *(0x14ec);
0x000014aa add r2, pc | r2 = 0x2996;
| do {
0x000014ac ldr r0, [r7, r0] | r0 = *((r7 + r0));
0x000014ae movs r1, 1 | r1 = 1;
0x000014b0 mov.w sb, -1 | sb = -1;
0x000014b4 ldr r0, [r0] | r0 = *(r0);
0x000014b6 blx 0xb30 | readdir64 ();
0x000014ba mov r1, sb | r1 = sb;
0x000014bc b 0x142a | goto label_0;
| label_5:
0x000014be ldr r2, [pc, 0x30] |
0x000014c0 mov r3, r5 | r3 = r5;
0x000014c2 ldr r0, [pc, 0x28] | r0 = *(0x14ee);
0x000014c4 add r2, pc | r2 = 0x29ba;
0x000014c6 b 0x14ac |
| } while (1);
| label_6:
0x000014c8 blx 0x9fc | fcn_000009fc ();
0x000014cc ldr r3, [pc, 0xd0] | r3 = *(0x15a0);
0x000014ce movs r1, r0 | r1 = r0;
0x000014d0 lsls r0, r6, 2 | r0 = r6 << 2;
0x000014d2 movs r0, r0 |
0x000014d4 ldr r3, [pc, 0xb8] | r3 = *(0x1590);
0x000014d6 movs r1, r0 | r1 = r0;
0x000014d8 ldr r3, [pc, 8] | r3 = *(0x14e4);
0x000014da movs r1, r0 | r1 = r0;
0x000014dc adds r2, 0xd4 | r2 += 0xd4;
0x000014de movs r0, r0 |
0x000014e0 adds r2, 0xb8 | r2 += 0xb8;
0x000014e2 movs r0, r0 |
0x000014e4 adds r2, 0x9c | r2 += 0x9c;
0x000014e6 movs r0, r0 |
0x000014e8 adds r2, 0x12 | r2 += 0x12;
0x000014ea movs r0, r0 |
0x000014ec lsls r0, r7, 2 | r0 = r7 << 2;
0x000014ee movs r0, r0 |
0x000014f0 adds r1, 0xd4 | r1 += 0xd4;
0x000014f2 movs r0, r0 |
0x000014f4 push.w {r4, r5, r6, r7, r8, lr} |
0x000014f8 mov r4, r0 | r4 = r0;
0x000014fa sub sp, 0x10 |
0x000014fc mov r5, r1 | r5 = r1;
0x000014fe mov r6, r2 | r6 = r2;
0x00001500 cmp r2, 0 |
| if (r2 != 0) {
0x00001502 bne 0x15a6 | goto label_11;
| }
0x00001504 ldr r7, [pc, 0x15c] |
0x00001506 add r7, pc | r7 = 0x2b6e;
| do {
0x00001508 ldr r1, [pc, 0x15c] |
0x0000150a mov r3, r5 | r3 = r5;
0x0000150c mov r2, r4 | r2 = r4;
0x0000150e movs r0, 1 | r0 = 1;
0x00001510 add r1, pc | r1 = 0x2b7c;
0x00001512 blx 0xb24 | fprintf_chk ()
0x00001516 movs r3, 1 |
0x00001518 movt r3, 0x4000 | r3 = 0x40000001;
0x0000151c cmp r4, r3 |
0x0000151e sbcs r3, r5, 0 | __asm ("sbcs r3, r5, 0");
| if (r4 >= r3) {
0x00001522 bge 0x15f0 | goto label_12;
| }
0x00001524 movs r3, 1 |
0x00001526 movt r3, 0x10 | r3 = 0x100001;
0x0000152a cmp r4, r3 |
0x0000152c sbcs r3, r5, 0 | __asm ("sbcs r3, r5, 0");
| if (r4 >= r3) {
0x00001530 bge 0x15ac | goto label_13;
| }
0x00001532 movw r3, 0x401 | r3 = 0x401;
0x00001536 cmp r4, r3 |
0x00001538 sbcs r3, r5, 0 | __asm ("sbcs r3, r5, 0");
| if (r4 >= r3) {
0x0000153c blt 0x15a0 |
0x0000153e ubfx r3, r4, 0, 0xa | r3 = (r4 >> 0) & ((1 << 0xa) - 1);
0x00001542 lsrs r4, r4, 0xa | r4 >>= 0xa;
0x00001544 movw r0, 0xa0a1 |
0x00001548 ldr r1, [pc, 0x120] |
0x0000154a orr.w r4, r4, r5, lsl 22 | r4 |= (r5 << 22);
0x0000154e movt r0, 0xa0a0 |
0x00001552 asrs r5, r5, 0xa | r5 >>= 0xa;
0x00001554 mov r2, r7 | r2 = r7;
0x00001556 str r4, [sp] | *(sp) = r4;
0x00001558 umull r4, r0, r0, r3 | r4:r0 = r0 * r3;
0x0000155c movw r4, 0xfafb |
0x00001560 str r5, [sp, 4] | var_4h_2 = r5;
0x00001562 movt r4, 0xfafa | r4 = 0xfafafafb;
0x00001566 add r1, pc | r1 = 0x2bd6;
0x00001568 lsrs r0, r0, 5 | r0 >>= 5;
0x0000156a add.w r0, r0, r0, lsl 1 |
| /* if there is a right shift of 7, then it's a division by 1/204 */
0x0000156e add.w r0, r0, r0, lsl 4 | r0 = 0xa0a0a0a1;
0x00001572 subs r0, r3, r0 | r0 = r3 - r0;
0x00001574 subs r3, r3, r0 | r3 -= r0;
0x00001576 mov.w r0, -0x5050506 | r0 = -0x5050506;
0x0000157a mul r0, r3, r0 | r0 = r3 * r0;
0x0000157e sbc.w r5, r5, r5 | __asm ("sbc.w r5, r5, r5");
0x00001582 mla r0, r4, r5, r0 | __asm ("mla r0, r4, r5, r0");
0x00001586 umull r3, r4, r3, r4 | r3:r4 = r3 * r4;
0x0000158a lsrs r3, r3, 1 | r3 >>= 1;
0x0000158c add r0, r4 | r0 += r4;
0x0000158e orr.w r3, r3, r0, lsl 31 | r3 |= (r0 << 31);
0x00001592 lsrs r0, r0, 1 | r0 >>= 1;
0x00001594 str r3, [sp, 8] | var_8h = r3;
0x00001596 str r0, [sp, 0xc] | var_ch = r0;
0x00001598 movs r0, 1 | r0 = 1;
0x0000159a blx 0xb24 | fprintf_chk ()
| if (r6 != 0) {
| label_4:
0x0000159e cbnz r6, 0x15e4 | goto label_14;
| }
| }
| label_2:
0x000015a0 add sp, 0x10 |
0x000015a2 pop.w {r4, r5, r6, r7, r8, pc} |
| label_11:
0x000015a6 ldr r7, [pc, 0xc8] |
0x000015a8 add r7, pc | r7 = 0x2c1e;
0x000015aa b 0x1508 |
| } while (1);
| label_13:
0x000015ac ubfx r0, r4, 0, 0x14 | r0 = (r4 >> 0) & ((1 << 0x14) - 1);
0x000015b0 ldr.w r8, [pc, 0xc0] |
0x000015b4 lsrs r4, r4, 0x14 | r4 >>= 0x14;
0x000015b6 movw r2, 0x9999 |
0x000015ba movt r2, 1 | r2 = 0x19999;
0x000015be orr.w r4, r4, r5, lsl 12 | r4 |= (r5 << 12);
0x000015c2 asrs r5, r5, 0x14 | r5 >>= 0x14;
0x000015c4 add r8, pc | r8 = 0x2c3c;
0x000015c6 movs r1, 0 | r1 = 0;
0x000015c8 movs r3, 0 | r3 = 0;
0x000015ca bl 0x3c28 | fcn_00003c28 (r0, r1, r2, r3);
0x000015ce mov r2, r7 | r2 = r7;
0x000015d0 strd r0, r1, [sp, 8] | __asm ("strd r0, r1, [sp, 8]");
0x000015d4 str r4, [sp] | *(sp) = r4;
0x000015d6 mov r1, r8 | r1 = r8;
0x000015d8 movs r0, 1 | r0 = 1;
0x000015da str r5, [sp, 4] | var_4h_2 = r5;
0x000015dc blx 0xb24 | fprintf_chk ()
0x000015e0 cmp r6, 0 |
| if (r6 == 0) {
0x000015e2 beq 0x15a0 | goto label_2;
| }
| label_14:
0x000015e4 movs r0, 0x29 | r0 = 0x29;
0x000015e6 add sp, 0x10 |
0x000015e8 pop.w {r4, r5, r6, r7, r8, lr} |
0x000015ec b.w 0xafc | goto label_3;
| label_12:
0x000015f0 bic r3, r4, 0xc0000000 | r3 = BIT_MASK (r4, 0xc0000000);
0x000015f4 bic lr, r4, 0xf0000000 | lr = BIT_MASK (r4, 0xf0000000);
0x000015f8 lsrs r4, r4, 0x1e | r4 >>= 0x1e;
0x000015fa add.w lr, lr, r3, lsr 28 | lr += (r3 >> 28);
0x000015fe ldr r1, [pc, 0x78] |
0x00001600 orr.w r4, r4, r5, lsl 2 | r4 |= (r5 << 2);
0x00001604 asrs r5, r5, 0x1e | r5 >>= 0x1e;
0x00001606 str r5, [sp, 4] | var_4h_2 = r5;
0x00001608 movs r5, 0x15 |
0x0000160a movt r5, 0x4000 | r5 = 0x40000015;
0x0000160e mov r2, r7 | r2 = r7;
0x00001610 umull r0, r5, r5, lr | r0:r5 = r5 * lr;
0x00001614 movw r7, 0x3333 |
0x00001616 adds r7, 0x33 |
0x00001618 movt r7, 0x333 | r7 = 0x3333333;
0x0000161c str r4, [sp] | *(sp) = r4;
0x0000161e mvn r4, 0x5000000 | r4 = ~0x5000000;
0x00001622 movw ip, 0xfffb |
0x00001626 movt ip, 0xafff | ip = 0xaffffffb;
0x0000162a movs r0, 1 | r0 = 1;
0x0000162c add r1, pc | r1 = 0x2caa;
0x0000162e sub.w r8, lr, r5 | r8 = lr - r5;
0x00001632 add.w r5, r5, r8, lsr 1 | r5 += (r8 >> 1);
0x00001636 lsrs r5, r5, 0x19 | r5 >>= 0x19;
0x00001638 mls lr, r7, r5, lr | __asm ("mls lr, r7, r5, lr");
0x0000163c subs.w r3, r3, lr | r3 -= lr;
0x00001640 mul r4, r3, r4 | r4 = r3 * r4;
0x00001644 sbc.w r7, r7, r7 | __asm ("sbc.w r7, r7, r7");
0x00001648 umull r3, r5, r3, ip | r3:r5 = r3 * ip;
0x0000164c mla r4, ip, r7, r4 | __asm ("mla r4, ip, r7, r4");
0x00001650 lsrs r3, r0 | r3 >>= r0;
0x00001652 add r4, r5 | r4 += r5;
0x00001654 orr.w r3, r3, r4, lsl 31 | r3 |= (r4 << 31);
0x00001658 lsrs r4, r0 | r4 >>= r0;
0x0000165a str r3, [sp, 8] | var_8h = r3;
0x0000165c str r4, [sp, 0xc] | var_ch = r4;
0x0000165e blx 0xb24 | fprintf_chk ()
0x00001662 b 0x159e | goto label_4;
| }
[*] Function fprintf used 10 times ubirsvol.mtd-utils