[*] Binary protection state of debugfs
Full RELRO Canary found NX enabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function sprintf tear down of debugfs
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/debugfs @ 0x6dc4 */
| #include <stdint.h>
|
; (fcn) fcn.00006dc4 () | void fcn_00006dc4 (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h_2;
| int16_t var_0h_3;
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch_2;
| int16_t var_10h;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_20h;
| int16_t var_24h;
| int16_t var_2ch;
| int16_t var_30h;
| int32_t var_30h_2;
| int16_t var_3ch;
| int16_t var_0h;
| int16_t var_8h_2;
| int16_t var_ch;
| int16_t var_d4h;
| int16_t var_d7h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x00006dc4 push.w {r4, r5, r6, r7, r8, lr} |
0x00006dc8 mov r8, r1 | r8 = r1;
0x00006dca ldr r1, [pc, 0xac] |
0x00006dcc mov r6, r2 | r6 = r2;
0x00006dce sub sp, 0xd8 |
0x00006dd0 mov r7, r0 | r7 = r0;
0x00006dd2 ldrb r3, [r2] | r3 = *(r2);
0x00006dd4 add r4, sp, 0xc | r4 += var_ch;
0x00006dd6 ldr r2, [pc, 0xa4] | r2 = *(0x6e7e);
0x00006dd8 add r1, pc | r1 = 0xdc56;
0x00006dda mov r0, r4 | r0 = r4;
0x00006ddc ldr r5, [pc, 0xa0] |
0x00006dde ldr r2, [r1, r2] |
0x00006de0 movs r1, 1 | r1 = 1;
0x00006de2 add r5, pc | r5 = 0xdc66;
0x00006de4 ldr r2, [r2] | r2 = *(0xdc56);
0x00006de6 str r2, [sp, 0xd4] | var_d4h = r2;
0x00006de8 mov.w r2, 0 | r2 = 0;
0x00006dec str r3, [sp] | *(sp) = r3;
0x00006dee ldr r3, [pc, 0x94] |
0x00006df0 movs r2, 0xc8 | r2 = 0xc8;
0x00006df2 add r3, pc | r3 = 0xdc7c;
0x00006df4 blx 0x540c | mkdir ();
0x00006df8 ldr r1, [pc, 0x8c] |
0x00006dfa mov r3, r4 | r3 = r4;
0x00006dfc mov r2, r8 | r2 = r8;
0x00006dfe movs r0, 1 | r0 = 1;
0x00006e00 add r1, pc | r1 = 0xdc8c;
0x00006e02 blx 0x54bc | fcn_000054bc ();
0x00006e06 ldr r3, [pc, 0x84] | r3 = *(0x6e8e);
0x00006e08 movs r1, 0xc8 | r1 = 0xc8;
0x00006e0a mov r0, r4 | r0 = r4;
0x00006e0c ldr r3, [r5, r3] | r3 = *(0xdc66);
0x00006e0e ldr r2, [r3] | r2 = *(0xdc66);
0x00006e10 blx 0x4ee8 | r0 = fcn_00004ee8 ();
| if (r0 == 0) {
0x00006e14 cbz r0, 0x6e36 | goto label_2;
| }
0x00006e16 mov r0, r4 | r0 = r4;
0x00006e18 blx 0x537c | ext2fs_dir_iterate ();
0x00006e1c add.w r3, r0, 0xd7 | r3 += var_d7h;
0x00006e20 add r3, sp, r3 | r3 = sp + r3;
0x00006e22 ldrb r2, [r3, -0xcc] | r2 = *((r3 - 0xcc));
0x00006e26 cmp r2, 0xa |
0x00006e28 itt eq |
| if (r2 != 0xa) {
0x00006e2a moveq r2, 0 | r2 = 0;
| }
| if (r2 != 0xa) {
0x00006e2c strbeq r2, [r3, -0xcc] | *((r3 - 0xcc)) = r2;
| }
0x00006e30 ldrb.w r3, [sp, 0xc] | r3 = var_ch;
0x00006e34 cbnz r3, 0x6e50 |
| while (1) {
| label_2:
0x00006e36 ldr r2, [pc, 0x58] |
0x00006e38 ldr r3, [pc, 0x40] | r3 = *(0x6e7c);
0x00006e3a add r2, pc | r2 = 0xdcd0;
0x00006e3c ldr r3, [r2, r3] | r3 = *(0xdcd0);
0x00006e3e ldr r2, [r3] | r2 = *(0xdcd0);
0x00006e40 ldr r3, [sp, 0xd4] | r3 = var_d4h;
0x00006e42 eors r2, r3 | r2 ^= r3;
0x00006e44 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00006e48 bne 0x6e74 | goto label_3;
| }
0x00006e4a add sp, 0xd8 |
0x00006e4c pop.w {r4, r5, r6, r7, r8, pc} |
0x00006e50 movs r2, 0 | r2 = 0;
0x00006e52 add r1, sp, 8 | r1 += var_8h_2;
0x00006e54 mov r0, r4 | r0 = r4;
0x00006e56 blx 0x5370 | ext2fs_xattrs_flags ();
0x00006e5a ldr r3, [sp, 8] | r3 = var_8h_2;
0x00006e5c ldrb r3, [r3] | r3 = *(r3);
| if (r3 != 0) {
0x00006e5e cbnz r3, 0x6e64 | goto label_4;
| }
0x00006e60 strb r0, [r6] | *(r6) = r0;
0x00006e62 b 0x6e36 |
| }
| label_4:
0x00006e64 ldr r2, [pc, 0x2c] |
0x00006e66 mov r3, r4 | r3 = r4;
0x00006e68 movs r1, 0 | r1 = 0;
0x00006e6a mov r0, r7 | r0 = r7;
0x00006e6c add r2, pc | r2 = 0xdd04;
0x00006e6e blx 0x50d8 | fcn_000050d8 ();
0x00006e70 ldmdb r4!, {r5, r6, r7, r8, sb, sl, sp, lr, pc} | __asm ("ldmdb r4!, {r5, r6, r7, r8, sb, sl, sp, lr, pc}");
| label_3:
0x00006e74 blx 0x5008 | fcn_00005008 ();
0x00006e78 ldm r5!, {r2, r6, r7} | r2 = *(r5!);
| r6 = *((r5! + 4));
| r7 = *((r5! + 8));
0x00006e7a movs r2, r0 | r2 = r0;
0x00006e7c lsls r0, r2, 0x10 | r0 = r2 << 0x10;
0x00006e7e movs r0, r0 |
0x00006e80 ldm r5, {r1, r3, r4, r5, r7} | r1 = *(r5);
| r3 = *((r5 + 4));
| r4 = *((r5 + 8));
| r5 = *((r5 + 12));
| r7 = *((r5 + 16));
0x00006e82 movs r2, r0 | r2 = r0;
0x00006e84 strh r2, [r2, 0x14] | *((r2 + 0x14)) = r2;
0x00006e86 movs r1, r0 | r1 = r0;
0x00006e88 str r4, [r5, 0x30] | *((r5 + 0x30)) = r4;
0x00006e8a movs r1, r0 | r1 = r0;
0x00006e8c lsls r0, r7, 0x10 | r0 = r7 << 0x10;
0x00006e8e movs r0, r0 |
0x00006e90 ldm r5, {r1, r5, r6} | r1 = *(r5);
| r5 = *((r5 + 4));
| r6 = *((r5 + 8));
0x00006e92 movs r2, r0 | r2 = r0;
0x00006e94 str r0, [r2, 0x2c] | *((r2 + 0x2c)) = r0;
0x00006e96 movs r1, r0 | r1 = r0;
0x00006e98 ldr r2, [pc, 0x184] |
0x00006e9a ldr r3, [pc, 0x188] | r3 = *(0x7026);
0x00006e9c push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00006ea0 mov.w r6, 0x8000 | r6 = 0x8000;
0x00006ea4 ldr r7, [pc, 0x180] |
0x00006ea6 add r2, pc | r2 = 0xdeca;
0x00006ea8 movt r6, 0x402 | r6 = (r6 & 0xFFFF) | 0x4020000;
0x00006eac sub sp, 0x44 |
0x00006eae ldr.w fp, [pc, 0x17c] |
0x00006eb2 mov.w sb, 0 | sb = 0;
0x00006eb6 ldr.w sl, [pc, 0x178] |
0x00006eba add r7, pc | r7 = 0xdee6;
0x00006ebc ldr r3, [r2, r3] |
0x00006ebe mov r5, r0 | r5 = r0;
0x00006ec0 vmov.i32 d16, 0 | __asm ("vmov.i32 d16, 0");
0x00006ec4 add fp, pc | fp = 0xdef6;
0x00006ec6 ldr.w r8, [pc, 0x16c] | r8 = *(0x00007034);
0x00006eca add sl, pc | sl = 0xdf00;
0x00006ecc ldr r3, [r3] | r3 = *(0xdeca);
0x00006ece str r3, [sp, 0x3c] | var_3ch = r3;
0x00006ed0 mov.w r3, 0 | r3 = 0;
0x00006ed4 mov r4, r1 | r4 = r1;
0x00006ed6 vstr d16, [sp, 0x30] | __asm ("vstr d16, [sp, 0x30]");
0x00006eda add r8, pc | r8 += pc;
0x00006edc bl 0xa514 | fcn_0000a514 ();
0x00006ee0 strd sb, sb, [sp, 0x18] | __asm ("strd sb, sb, [var_18h]");
0x00006ee4 strd sb, sb, [sp, 0x20] | __asm ("strd sb, sb, [var_24h]");
| do {
| label_0:
0x00006ee8 mov r2, r7 | r2 = r7;
0x00006eea mov r1, r4 | r1 = r4;
0x00006eec mov r0, r5 | r0 = r5;
0x00006eee blx 0x53b8 | r0 = e2p_str2encoding ();
0x00006ef2 adds r3, r0, 1 | r3 = r0 + 1;
| if (r3 != r0) {
0x00006ef4 beq 0x6f38 |
0x00006ef6 subs r0, 0x44 | r0 -= 0x44;
0x00006ef8 cmp r0, 0x36 |
| if (r0 > 0x36) {
0x00006efa bhi 0x6f46 | goto label_5;
| }
| /* switch table (55 cases) at 0x6f00 */
0x00006efc tbb [pc, r0] | __asm ("tbb [0x00006f04]");
| }
0x00006f38 ldr r3, [pc, 0xfc] | r3 = *(0x7038);
0x00006f3a subs r5, 1 | r5--;
0x00006f3c ldr.w r7, [r8, r3] | r7 = *((r8 + r3));
0x00006f40 ldr r3, [r7] | r3 = *(r7);
0x00006f42 cmp r5, r3 |
| if (r5 == r3) {
0x00006f44 beq 0x6fea | goto label_6;
| }
| label_5:
0x00006f46 ldr r0, [pc, 0xf4] |
0x00006f48 movs r1, 1 | r1 = 1;
0x00006f4a ldr r2, [pc, 0xf4] |
0x00006f4c ldr r3, [r4] | r3 = *(r4);
0x00006f4e ldr.w r0, [r8, r0] | r0 = *((r8 + r0));
0x00006f52 add r2, pc | r2 = 0xdf98;
0x00006f54 ldr r0, [r0] | r0 = *(0x703e);
0x00006f56 blx 0x5538 | ext2fs_write_inode ();
| label_1:
0x00006f5a ldr r2, [pc, 0xe8] |
0x00006f5c ldr r3, [pc, 0xc4] | r3 = imp._ITM_deregisterTMCloneTable;
0x00006f5e add r2, pc | r2 = 0xdfa8;
0x00006f60 ldr r3, [r2, r3] | r3 = *(0xdfa8);
0x00006f62 ldr r2, [r3] | r2 = *(0xdfa8);
0x00006f64 ldr r3, [sp, 0x3c] | r3 = var_3ch;
0x00006f66 eors r2, r3 | r2 ^= r3;
0x00006f68 mov.w r3, 0 | r3 = 0;
0x00006f6a lsls r0, r0, 0xc | r0 <<= 0xc;
| if (r0 != r0) {
0x00006f6c bne 0x701a | goto label_7;
| }
0x00006f6e add sp, 0x44 |
0x00006f70 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x00006f74 ldr r3, [pc, 0xd0] | r3 = *(0x7048);
0x00006f76 ldr.w r3, [r8, r3] | r3 = *((r8 + r3));
0x00006f7a ldr.w sb, [r3] | sb = *(0x7048);
0x00006f7e b 0x6ee8 |
| } while (1);
0x00006f80 orr r6, r6, 1 | r6 |= 1;
0x00006f84 b 0x6ee8 | goto label_0;
0x00006f86 ldr r3, [pc, 0xc0] | r3 = *(0x704a);
0x00006f88 mov r2, fp | r2 = fp;
0x00006f8a ldr r0, [r4] | r0 = *(r4);
0x00006f8c ldr.w r3, [r8, r3] | r3 = *((r8 + r3));
0x00006f90 ldr r1, [r3] | r1 = *(0x704a);
0x00006f92 add r3, sp, 0x30 | r3 += var_30h;
0x00006f94 bl 0xac40 | fcn_0000ac40 (r0, r1, r2, r3);
0x00006f98 str r0, [sp, 0x2c] | var_2ch = r0;
0x00006f9a cmp r0, 0 |
| if (r0 == 0) {
0x00006f9c beq 0x6ee8 | goto label_0;
| }
0x00006f9e b 0x6f5a | goto label_1;
0x00006fa0 orr r6, r6, 0x2000 | r6 |= 0x2000;
0x00006fa4 b 0x6ee8 | goto label_0;
0x00006fa6 orr r6, r6, 0x400 | r6 |= 0x400;
0x00006faa b 0x6ee8 | goto label_0;
0x00006fac orr r6, r6, 0x4000 | r6 |= 0x4000;
0x00006fb0 b 0x6ee8 | goto label_0;
0x00006fb2 ldr r3, [pc, 0x94] |
0x00006fb4 ldr.w r3, [r8, r3] | r3 = *((r8 + r3));
0x00006fb8 ldr r3, [r3] | r3 = *(0x704a);
0x00006fba str r3, [sp, 0x18] | var_18h = r3;
0x00006fbc b 0x6ee8 | goto label_0;
0x00006fbe ldr r3, [pc, 0x88] | r3 = *(0x704a);
0x00006fc0 mov r2, sl | r2 = sl;
0x00006fc2 ldr r1, [r4] | r1 = *(r4);
0x00006fc4 ldr.w r3, [r8, r3] | r3 = *((r8 + r3));
0x00006fc8 ldr r0, [r3] | r0 = *(0x704a);
0x00006fca add r3, sp, 0x2c | r3 += var_2ch;
0x00006fcc bl 0xab44 | fcn_0000ab44 (r0, r1, r2, r3, r4, r5);
0x00006fd0 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x00006fd2 movs r2, 0 | r2 = 0;
0x00006fd4 str r0, [sp, 0x1c] | var_1ch = r0;
0x00006fd6 str r2, [sp, 0x20] | var_20h = r2;
0x00006fd8 cmp r3, 0 |
| if (r3 == 0) {
0x00006fda beq 0x6ee8 | goto label_0;
| }
0x00006fdc b 0x6f5a | goto label_1;
0x00006fde orr r6, r6, 0x80000 | r6 |= 0x80000;
0x00006fe2 b 0x6ee8 | goto label_0;
0x00006fe4 movs r3, 1 | r3 = 1;
0x00006fe6 str r3, [sp, 0x24] | var_24h = r3;
0x00006fe8 b 0x6ee8 | goto label_0;
| label_6:
0x00006fea ldr r0, [r4] | r0 = *(r4);
0x00006fec bl 0xa75c | r0 = fcn_0000a75c ();
0x00006ff0 cmp r0, 0 |
| if (r0 != 0) {
0x00006ff2 bne 0x6f5a | goto label_1;
| }
0x00006ff4 ldr r3, [sp, 0x18] | r3 = var_18h;
0x00006ff6 mov r1, r6 | r1 = r6;
0x00006ff8 str.w sb, [sp, 0x10] | __asm ("str.w sb, [var_10h]");
0x00006ffc str r3, [sp, 0xc] | var_ch_2 = r3;
0x00006ffe ldr r3, [sp, 0x24] | r3 = var_24h;
0x00007000 str r3, [sp, 8] | var_8h = r3;
0x00007002 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x00007004 ldr r0, [r7] | r0 = *(r7);
0x00007006 str r3, [sp] | *(sp) = r3;
0x00007008 ldr r3, [sp, 0x20] | r3 = var_20h;
0x0000700a str r3, [sp, 4] | var_4h = r3;
0x0000700c ldrd r2, r3, [sp, 0x30] | __asm ("ldrd r2, r3, [var_30h]");
0x00007010 ldr.w r0, [r4, r0, lsl 2] | offset_0 = r0 << 2;
| r0 = *((r4 + offset_0));
0x00007014 bl 0x5d84 | fcn_00005d84 (r0, r1, r2, r3, r4, r5);
0x00007016 mrc2 p7, 5, lr, c6, c15, 4 | __asm ("mrc2 p7, 5, lr, c6, c15, 4");
| label_7:
0x0000701a blx 0x5008 | fcn_00005008 ();
0x0000701e nop |
0x00007020 movs r0, r0 |
0x00007022 movs r0, r0 |
0x00007024 movs r0, r0 |
0x00007026 movs r0, r0 |
0x00007028 str r6, [r7, 0x30] | *((r7 + 0x30)) = r6;
0x0000702a movs r1, r0 | r1 = r0;
0x0000702c str r4, [r3, 0x30] | *((r3 + 0x30)) = r4;
0x0000702e movs r1, r0 | r1 = r0;
0x00007030 movs r1, r0 | r1 = r0;
0x00007032 movs r0, r0 |
0x00007034 ldm r4!, {r1, r6, r7} | r1 = *(r4!);
| r6 = *((r4! + 4));
| r7 = *((r4! + 8));
0x00007036 movs r2, r0 | r2 = r0;
0x00007038 lsls r0, r0, 8 | r0 <<= 8;
0x0000703a movs r0, r0 |
0x0000703c lsls r0, r5, 0x10 | r0 = r5 << 0x10;
0x0000703e movs r0, r0 |
0x00007040 str r6, [r6, 0x28] | *((r6 + 0x28)) = r6;
0x00007042 movs r1, r0 | r1 = r0;
0x00007044 ldm r4, {r1, r2, r3, r4, r5} | r1 = *(r4);
| r2 = *((r4 + 4));
| r3 = *((r4 + 8));
| r4 = *((r4 + 12));
| r5 = *((r4 + 16));
0x00007046 movs r2, r0 | r2 = r0;
0x00007048 lsls r0, r3, 0x11 | r0 = r3 << 0x11;
0x0000704a movs r0, r0 |
0x0000704c cmp r0, 2 |
0x0000704e push {r4, lr} |
0x00007050 mov r4, r1 | r4 = r1;
0x00007052 sub sp, 8 |
| if (r0 == 2) {
0x00007054 beq 0x706e | goto label_8;
| }
0x00007056 ldr r4, [pc, 0x38] |
0x00007058 ldr r3, [r1] | r3 = *(r1);
0x0000705a movs r1, 0 | r1 = 0;
0x0000705c ldr r2, [pc, 0x34] |
0x0000705e add r4, pc | r4 = 0xe0f4;
0x00007060 mov r0, r3 | r0 = r3;
0x00007062 str r4, [sp] | *(sp) = r4;
0x00007064 add r2, pc | r2 = 0xe0fc;
0x00007066 blx 0x50d8 | fcn_000050d8 ();
| do {
0x0000706a add sp, 8 |
0x0000706c pop {r4, pc} |
| label_8:
0x0000706e ldr r0, [r1, 4] | r0 = *((r1 + 4));
0x00007070 blx 0x50bc | fcn_000050bc ();
0x00007074 adds r0, 1 | r0++;
0x00007076 bne 0x706a |
| } while (r0 != 1);
0x00007078 blx 0x53f4 | sprintf_chk ()
0x0000707c ldr r2, [pc, 0x18] |
0x0000707e ldr r1, [r0] | r1 = *(r0);
0x00007080 ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x00007082 ldr r0, [r4] | r0 = *(r4);
0x00007084 add r2, pc | r2 = 0xe120;
0x00007086 add sp, 8 |
0x00007088 pop.w {r4, lr} |
0x0000708c b.w 0x50d4 | return void (*0x50d4)() ();
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/debugfs @ 0xb0e4 */
| #include <stdint.h>
|
; (fcn) fcn.0000b0e4 () | void fcn_0000b0e4 (int16_t arg_0h, int16_t arg2, int16_t arg3) {
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_14h;
| r1 = arg2;
| r2 = arg3;
0x0000b0e4 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0000b0e8 sub sp, 0x1c |
0x0000b0ea strd r1, r2, [sp, 8] | __asm ("strd r1, r2, [var_8h]");
0x0000b0ee ldr r5, [r2] | r5 = *(r2);
0x0000b0f0 ldr r2, [pc, 0xf4] |
0x0000b0f2 ldr r3, [pc, 0xf8] | r3 = *(0xb1ee);
0x0000b0f4 ldr.w sb, [pc, 0xf8] |
0x0000b0f8 add r2, pc | r2 = 0x162e4;
0x0000b0fa ldr.w r8, [r1] | r8 = *(r1);
0x0000b0fe ldr r3, [r2, r3] |
0x0000b100 add sb, pc | sb = 0x162f4;
0x0000b102 mov r1, sb | r1 = sb;
0x0000b104 ldr r3, [r3] | r3 = *(0x162e4);
0x0000b106 str r3, [sp, 0x14] | var_14h = r3;
0x0000b108 mov.w r3, 0 | r3 = 0;
0x0000b10c add r3, sp, 0x10 | r3 += var_10h;
0x0000b10e str r3, [sp, 4] | var_4h = r3;
0x0000b110 blx 0x5604 | r0 = popen (r0, r1);
0x0000b114 mov r4, r0 | r4 = r0;
0x0000b116 cmp r0, 0 |
| if (r0 == 0) {
0x0000b118 beq 0xb190 | goto label_3;
| }
| label_0:
0x0000b11a blx 0x53f4 | sprintf_chk ()
0x0000b11e movs r2, 0 | r2 = 0;
0x0000b120 mov fp, r0 |
0x0000b122 str.w r2, [fp] | __asm ("str.w r2, [fp]");
0x0000b126 mov r0, r4 | r0 = r4;
0x0000b128 ldr r1, [sp, 4] | r1 = var_4h;
0x0000b12a blx 0x5488 | fcn_00005488 ();
0x0000b12e ldr.w r2, [fp] | r2 = *(fp);
0x0000b132 mov r4, r0 | r4 = r0;
0x0000b134 mov r6, r1 | r6 = r1;
0x0000b136 cmp r2, 0 |
| if (r2 != 0) {
0x0000b138 bne 0xb1d8 | goto label_4;
| }
0x0000b13a ldr r0, [sp, 0x10] | r0 = var_10h;
0x0000b13c ldrb r3, [r0] | r3 = *(r0);
0x0000b13e cmp r3, 0x2d |
| if (r3 == 0x2d) {
0x0000b140 beq 0xb194 | goto label_5;
| }
| if (r3 != 0) {
0x0000b142 cbnz r3, 0xb1ae | goto label_6;
| }
0x0000b144 mov r7, r4 | r7 = r4;
0x0000b146 mov fp, r1 |
| label_1:
0x0000b148 adds.w sl, r5, 1 | sl = r5 + 1;
0x0000b14c mov r0, r8 | r0 = r8;
0x0000b14e subs.w r1, sl, r4 | r1 = sl - r4;
0x0000b152 adds r1, r1, r7 | r1 += r7;
0x0000b154 lsls r1, r1, 3 | r1 <<= 3;
0x0000b156 blx 0x5074 | r0 = fcn_00005074 ();
0x0000b15a cmp r0, 0 |
| if (r0 == 0) {
0x0000b15c beq 0xb1e0 | goto label_7;
| }
0x0000b15e add.w r1, r0, r5, lsl 3 | r1 = r0 + (r5 << 3);
0x0000b162 mov r3, r4 | r3 = r4;
0x0000b164 sub.w r2, sl, r4 | r2 = sl - r4;
| do {
0x0000b168 str r3, [r1] | *(r1) = r3;
0x0000b16a adds r5, r2, r3 | r5 = r2 + r3;
0x0000b16c adds r3, 1 | r3++;
0x0000b16e str r6, [r1, 4] | *((r1 + 4)) = r6;
0x0000b170 adc r6, r6, 0 | __asm ("adc r6, r6, 0");
0x0000b174 cmp r7, r3 |
0x0000b176 sbcs.w r4, fp, r6 | __asm ("sbcs.w r4, fp, r6");
0x0000b17a add.w r1, r1, 8 | r1 += 8;
0x0000b17e bhs 0xb168 |
| } while (r7 >= r3);
0x0000b180 mov r8, r0 | r8 = r0;
0x0000b182 mov r1, sb | r1 = sb;
0x0000b184 movs r0, 0 | r0 = 0;
0x0000b186 blx 0x5604 | r0 = popen (r0, r1);
0x0000b18a mov r4, r0 | r4 = r0;
0x0000b18c cmp r0, 0 |
| if (r0 != 0) {
0x0000b18e bne 0xb11a | goto label_0;
| }
| label_3:
0x0000b190 mov ip, r0 |
0x0000b192 b 0xb1b2 | goto label_2;
| label_5:
0x0000b194 mov r1, r2 | r1 = r2;
0x0000b196 adds r0, 1 | r0++;
0x0000b198 blx 0x5488 | fcn_00005488 ();
0x0000b19c ldr.w r2, [fp] | r2 = *(fp);
0x0000b19e movs r0, 0 | r0 = 0;
0x0000b1a0 mov r7, r0 | r7 = r0;
0x0000b1a2 mov fp, r1 |
| if (r2 != 0) {
0x0000b1a4 cbnz r2, 0xb1d8 | goto label_4;
| }
0x0000b1a6 cmp r0, r4 |
0x0000b1a8 sbcs.w r3, r1, r6 | __asm ("sbcs.w r3, r1, r6");
| if (r0 >= r4) {
0x0000b1ac bhs 0xb148 | goto label_1;
| }
| label_6:
0x0000b1ae mov.w ip, 0x16 |
| do {
| label_2:
0x0000b1b2 ldr r3, [sp, 8] | r3 = var_8h;
0x0000b1b4 ldr r2, [pc, 0x3c] |
0x0000b1b6 str.w r8, [r3] | __asm ("str.w r8, [r3]");
0x0000b1ba ldr r3, [sp, 0xc] | r3 = var_ch;
0x0000b1bc add r2, pc | r2 = 0x163b4;
0x0000b1be str r5, [r3] | *(r3) = r5;
0x0000b1c0 ldr r3, [pc, 0x28] | r3 = *(0xb1ec);
0x0000b1c2 ldr r3, [r2, r3] | r3 = *(0x163b4);
0x0000b1c4 ldr r2, [r3] | r2 = *(0x163b4);
0x0000b1c6 ldr r3, [sp, 0x14] | r3 = var_14h;
0x0000b1c8 eors r2, r3 | r2 ^= r3;
0x0000b1ca mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000b1ce bne 0xb1dc | goto label_8;
| }
0x0000b1d0 mov r0, ip | r0 = ip;
0x0000b1d2 add sp, 0x1c |
0x0000b1d4 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_4:
0x0000b1d8 mov ip, r2 |
0x0000b1da b 0xb1b2 |
| } while (1);
| label_8:
0x0000b1dc blx 0x5008 | fcn_00005008 ();
| label_7:
0x0000b1e0 mov.w ip, 0xc |
0x0000b1e4 b 0xb1b2 | goto label_2;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/debugfs @ 0xc460 */
| #include <stdint.h>
|
; (fcn) fcn.0000c460 () | void fcn_0000c460 (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_4h;
| int32_t var_4h_2;
| int16_t var_ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0000c460 push.w {r4, r5, r6, r7, r8, sb, lr} |
0x0000c464 mov r5, r1 | r5 = r1;
0x0000c466 ldr r1, [pc, 0x140] |
0x0000c468 mov sb, r2 | sb = r2;
0x0000c46a cmp.w sb, -1 |
0x0000c46e sub sp, 0x14 |
0x0000c470 ldr r2, [pc, 0x138] | r2 = *(0xc5ac);
0x0000c472 mov r8, r0 | r8 = r0;
0x0000c474 add r1, pc | r1 = 0x18a22;
0x0000c476 ldrh r6, [r5] | r6 = *(r5);
0x0000c478 mov r7, r3 | r7 = r3;
0x0000c47a ldr r2, [r1, r2] |
0x0000c47c ldr r2, [r2] | r2 = *(0x18a22);
0x0000c47e str r2, [sp, 0xc] | var_ch = r2;
0x0000c480 mov.w r2, 0 | r2 = 0;
| if (sb == -1) {
0x0000c484 beq 0xc506 | goto label_4;
| }
0x0000c486 ldr.w ip, [pc, 0x128] |
0x0000c48a movs r4, 0x80 | r4 = 0x80;
0x0000c48c movs r1, 0 | r1 = 0;
0x0000c48e mov.w lr, 0x100 | lr = 0x100;
0x0000c492 add ip, pc | ip = 0x18a48;
0x0000c494 b 0xc49c |
| while (r4 != 0) {
0x0000c496 mov lr, r4 | lr = r4;
0x0000c498 ldrh.w r4, [ip, 8] | r4 = *((ip + 8));
0x0000c49c tst.w lr, r6 |
0x0000c4a0 add.w ip, ip, 8 |
0x0000c4a4 itt ne |
| if ((lr & r6) == 0) {
0x0000c4a6 ldrne r3, [ip, -0x4] | r3 = *((ip - 0x4));
| }
| if ((lr & r6) != 0) {
0x0000c4aa orrs r1, r3 | r1 |= r3;
| }
0x0000c4ac cmp r4, 0 |
0x0000c4ae bne 0xc496 |
| }
0x0000c4b0 mov r0, sb | r0 = sb;
0x0000c4b2 blx 0x58e8 | fcn_000058e8 ();
0x0000c4b6 adds r0, 1 | r0++;
| if (r0 == 1) {
0x0000c4b8 beq 0xc57a | goto label_5;
| }
| label_2:
0x0000c4ba ldrh r3, [r5, 0x18] | r3 = *((r5 + 0x18));
0x0000c4bc mov r0, sb | r0 = sb;
0x0000c4be ldrh.w r2, [r5, 0x7a] | r2 = *((r5 + 0x7a));
0x0000c4c2 ldrh.w r1, [r5, 0x78] | r1 = *((r5 + 0x78));
0x0000c4c6 orr.w r2, r3, r2, lsl 16 | r2 = r3 | (r2 << 16);
0x0000c4ca ldrh r3, [r5, 2] | r3 = *((r5 + 2));
0x0000c4cc orr.w r1, r3, r1, lsl 16 | r1 = r3 | (r1 << 16);
0x0000c4d0 blx 0x53ac | ext2fs_dx_csum ();
0x0000c4d4 adds r0, 1 | r0++;
| if (r0 == 1) {
0x0000c4d6 beq 0xc552 | goto label_6;
| }
| label_0:
0x0000c4d8 ldr r2, [r5, 8] | r2 = *((r5 + 8));
0x0000c4da add r1, sp, 4 | r1 += var_4h;
0x0000c4dc ldr r3, [r5, 0x10] | r3 = *((r5 + 0x10));
0x0000c4de mov r0, r7 | r0 = r7;
0x0000c4e0 strd r2, r3, [sp, 4] | __asm ("strd r2, r3, [var_4h]");
0x0000c4e4 blx 0x5688 | uuid_parse ();
0x0000c4e8 adds r0, 1 | r0++;
| if (r0 == 1) {
0x0000c4ea beq 0xc566 | goto label_7;
| }
| label_1:
0x0000c4ec ldr r2, [pc, 0xc4] |
0x0000c4ee ldr r3, [pc, 0xbc] | r3 = *(0xc5ae);
0x0000c4f0 add r2, pc | r2 = 0x18aa8;
0x0000c4f2 ldr r3, [r2, r3] | r3 = *(0x18aa8);
0x0000c4f4 ldr r2, [r3] | r2 = *(0x18aa8);
0x0000c4f6 ldr r3, [sp, 0xc] | r3 = var_ch;
0x0000c4f8 eors r2, r3 | r2 ^= r3;
0x0000c4fa mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000c4fe bne 0xc5a2 | goto label_8;
| }
0x0000c500 add sp, 0x14 |
0x0000c502 pop.w {r4, r5, r6, r7, r8, sb, pc} |
| label_4:
0x0000c506 ldr r2, [pc, 0xb0] |
0x0000c508 movs r3, 0x80 | r3 = 0x80;
0x0000c50a movs r1, 0 | r1 = 0;
0x0000c50c mov.w r0, 0x100 | r0 = 0x100;
0x0000c510 add r2, pc | r2 = 0x18ace;
0x0000c512 b 0xc518 |
| while (r3 != 0) {
0x0000c514 mov r0, r3 | r0 = r3;
0x0000c516 ldrh r3, [r2, 8] | r3 = *((r2 + 8));
0x0000c518 tst r0, r6 |
0x0000c51a add.w r2, r2, 8 | r2 += 8;
0x0000c51e itt ne |
| if ((r0 & r6) == 0) {
0x0000c520 ldrne r0, [r2, -0x4] | r0 = *((r2 - 0x4));
| }
| if ((r0 & r6) != 0) {
0x0000c524 orrs r1, r0 | r1 |= r0;
| }
0x0000c526 cmp r3, 0 |
0x0000c528 bne 0xc514 |
| }
0x0000c52a mov r0, r7 | r0 = r7;
0x0000c52c blx 0x57f4 | fcn_000057f4 ();
0x0000c530 adds r0, 1 | r0++;
| if (r0 == 1) {
0x0000c532 beq 0xc58e | goto label_9;
| }
| label_3:
0x0000c534 ldrh r3, [r5, 0x18] | r3 = *((r5 + 0x18));
0x0000c536 mov r0, r7 | r0 = r7;
0x0000c538 ldrh.w r2, [r5, 0x7a] | r2 = *((r5 + 0x7a));
0x0000c53c ldrh.w r1, [r5, 0x78] | r1 = *((r5 + 0x78));
0x0000c540 orr.w r2, r3, r2, lsl 16 | r2 = r3 | (r2 << 16);
0x0000c544 ldrh r3, [r5, 2] | r3 = *((r5 + 2));
0x0000c546 orr.w r1, r3, r1, lsl 16 | r1 = r3 | (r1 << 16);
0x0000c54a blx 0x53dc | errno_location ();
0x0000c54e adds r0, 1 | r0++;
| if (r0 != 1) {
0x0000c550 bne 0xc4d8 | goto label_0;
| }
| label_6:
0x0000c552 blx 0x53f4 | sprintf_chk ()
0x0000c556 ldr r2, [pc, 0x64] |
0x0000c558 mov r3, r7 | r3 = r7;
0x0000c55a ldr r1, [r0] | r1 = *(r0);
0x0000c55c mov r0, r8 | r0 = r8;
0x0000c55e add r2, pc | r2 = 0x18b20;
0x0000c560 blx 0x50d8 | fcn_000050d8 ();
0x0000c564 b 0xc4d8 | goto label_0;
| label_7:
0x0000c566 blx 0x53f4 | sprintf_chk ()
0x0000c56a ldr r2, [pc, 0x54] |
0x0000c56c mov r3, r7 | r3 = r7;
0x0000c56e ldr r1, [r0] | r1 = *(r0);
0x0000c570 mov r0, r8 | r0 = r8;
0x0000c572 add r2, pc | r2 = 0x18b38;
0x0000c574 blx 0x50d8 | fcn_000050d8 ();
0x0000c578 b 0xc4ec | goto label_1;
| label_5:
0x0000c57a blx 0x53f4 | sprintf_chk ()
0x0000c57e ldr r2, [pc, 0x44] |
0x0000c580 mov r3, r7 | r3 = r7;
0x0000c582 ldr r1, [r0] | r1 = *(r0);
0x0000c584 mov r0, r8 | r0 = r8;
0x0000c586 add r2, pc | r2 = 0x18b50;
0x0000c588 blx 0x50d8 | fcn_000050d8 ();
0x0000c58c b 0xc4ba | goto label_2;
| label_9:
0x0000c58e blx 0x53f4 | sprintf_chk ()
0x0000c592 ldr r2, [pc, 0x34] |
0x0000c594 mov r3, r7 | r3 = r7;
0x0000c596 ldr r1, [r0] | r1 = *(r0);
0x0000c598 mov r0, r8 | r0 = r8;
0x0000c59a add r2, pc | r2 = 0x18b68;
0x0000c59c blx 0x50d8 | fcn_000050d8 ();
0x0000c5a0 b 0xc534 | goto label_3;
| label_8:
0x0000c5a2 blx 0x5008 | fcn_00005008 ();
0x0000c5a6 nop |
0x0000c5a8 strb r0, [r5, 0x1c] | *((r5 + 0x1c)) = r0;
0x0000c5aa movs r2, r0 | r2 = r0;
0x0000c5ac lsls r0, r2, 0x10 | r0 = r2 << 0x10;
0x0000c5ae movs r0, r0 |
0x0000c5b0 movs r7, 0x62 | r7 = 0x62;
0x0000c5b2 movs r1, r0 | r1 = r0;
0x0000c5b4 strb r4, [r5, 0x1a] | *((r5 + 0x1a)) = r4;
0x0000c5b6 movs r2, r0 | r2 = r0;
0x0000c5b8 movs r6, 0xe4 | r6 = 0xe4;
0x0000c5ba movs r1, r0 | r1 = r0;
0x0000c5bc movs r4, 0x36 | r4 = 0x36;
0x0000c5be movs r1, r0 | r1 = r0;
0x0000c5c0 movs r4, 0x42 | r4 = 0x42;
0x0000c5c2 movs r1, r0 | r1 = r0;
0x0000c5c4 movs r4, 0x4a | r4 = 0x4a;
0x0000c5c6 movs r1, r0 | r1 = r0;
0x0000c5c8 movs r4, 0x36 | r4 = 0x36;
0x0000c5ca movs r1, r0 | r1 = 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/debugfs @ 0xc5cc */
| #include <stdint.h>
|
; (fcn) fcn.0000c5cc () | void fcn_0000c5cc (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h;
| int16_t var_4h_3;
| int16_t var_ch_2;
| int16_t var_10h_2;
| int16_t var_14h;
| int16_t var_94h;
| int16_t var_c0h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0000c5cc svcmi 0xf0e92d | __asm ("svcmi 0xf0e92d");
0x0000c5d0 mov sb, r3 | sb = r3;
0x0000c5d2 ldr r5, [pc, 0x120] |
0x0000c5d4 sub sp, 0x9c |
0x0000c5d6 add.w sl, sp, 0x14 | sl += var_14h;
0x0000c5da mov r6, r0 | r6 = r0;
0x0000c5dc ldr r4, [pc, 0x118] | r4 = *(0xc6f8);
0x0000c5de add r5, pc | r5 = 0x18cd8;
0x0000c5e0 ldr r3, [pc, 0x118] |
0x0000c5e2 ldr r4, [r5, r4] |
0x0000c5e4 mov r5, r2 | r5 = r2;
0x0000c5e6 ldr r2, [pc, 0x118] | r2 = *(0xc702);
0x0000c5e8 add r3, pc | r3 = 0x18ce8;
0x0000c5ea ldr r4, [r4] | r4 = *(0x18cd8);
0x0000c5ec str r4, [sp, 0x94] | var_94h = r4;
0x0000c5ee mov.w r4, 0 | r4 = 0;
0x0000c5f2 mov r4, r1 | r4 = r1;
0x0000c5f4 ldr r1, [sp, 0xc0] | r1 = var_c0h;
0x0000c5f6 str r1, [sp] | *(sp) = r1;
0x0000c5f8 mov r1, sl | r1 = sl;
0x0000c5fa ldr.w r8, [r3, r2] | r8 = *(0x18ce8);
0x0000c5fe mov r2, r0 | r2 = r0;
0x0000c600 mov r0, r4 | r0 = r4;
0x0000c602 ldr.w r3, [r8] | r3 = *(0x18ce8);
0x0000c606 ldr r7, [r3, 0x14] | r7 = *(0x18cfc);
0x0000c608 bl 0xaf94 | r0 = fcn_0000af94 (r0, r1, r2);
| if (r0 != 0) {
0x0000c60c cbz r0, 0xc628 |
| label_1:
0x0000c60e ldr r2, [pc, 0xf4] |
0x0000c610 ldr r3, [pc, 0xe4] | r3 = *(0xc6f8);
0x0000c612 add r2, pc | r2 = 0x18d1c;
0x0000c614 ldr r3, [r2, r3] | r3 = *(0x18d1c);
0x0000c616 ldr r2, [r3] | r2 = *(0x18d1c);
0x0000c618 ldr r3, [sp, 0x94] | r3 = var_94h;
0x0000c61a eors r2, r3 | r2 ^= r3;
0x0000c61c mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000c620 bne 0xc6ee | goto label_3;
| }
0x0000c622 add sp, 0x9c |
0x0000c624 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
0x0000c628 mov r2, r0 | r2 = r0;
0x0000c62a mov r1, r4 | r1 = r4;
0x0000c62c ldr.w r0, [r8] | r0 = *(r8);
0x0000c630 add r3, sp, 0xc | r3 += var_ch_2;
0x0000c632 blx 0x4f30 | r0 = fcn_00004f30 ();
0x0000c636 cmp r0, 0 |
| if (r0 != 0) {
0x0000c638 bne 0xc6be | goto label_4;
| }
0x0000c63a mov r0, r7 | r0 = r7;
0x0000c63c blx 0x52bc | r0 = strerror (r0);
0x0000c640 mov r4, r0 | r4 = r0;
0x0000c642 cmp r0, 0 |
| if (r0 == 0) {
0x0000c644 beq 0xc6cc | goto label_5;
| }
0x0000c646 ldr r3, [pc, 0xc0] |
0x0000c648 add.w r8, sp, 0x10 | r8 += var_10h_2;
0x0000c64c ldr.w fp, [pc, 0xbc] |
0x0000c650 add r3, pc | r3 = 0x18d5e;
0x0000c652 add fp, pc | fp = 0x18d62;
0x0000c654 str r3, [sp, 4] | var_4h_3 = r3;
0x0000c656 b 0xc66a |
| while (r0 == 0) {
0x0000c658 ldr r2, [sp, 0x10] | r2 = var_10h_2;
| if (r2 == 0) {
0x0000c65a cbz r2, 0xc68a | goto label_6;
| }
| label_0:
0x0000c65c mov r1, r4 | r1 = r4;
0x0000c65e mov r0, r5 | r0 = r5;
0x0000c660 blx 0x54e0 | fcn_000054e0 ();
0x0000c664 ldr r3, [sp, 0x10] | r3 = var_10h_2;
0x0000c666 cmp r0, r3 |
| if (r0 != r3) {
0x0000c668 bne 0xc6ae | goto label_7;
| }
| label_2:
0x0000c66a ldr r0, [sp, 0xc] | r0 = var_ch_2;
0x0000c66c mov r3, r8 | r3 = r8;
0x0000c66e mov r2, r7 | r2 = r7;
0x0000c670 mov r1, r4 | r1 = r4;
0x0000c672 blx 0x4db8 | r0 = ext2fs_file_read ();
0x0000c676 cmp r0, 0 |
0x0000c678 beq 0xc658 |
| }
0x0000c67a mov r1, r0 | r1 = r0;
0x0000c67c mov r2, fp | r2 = fp;
0x0000c67e mov r0, r6 | r0 = r6;
0x0000c680 blx 0x50d8 | fcn_000050d8 ();
0x0000c684 ldr r2, [sp, 0x10] | r2 = var_10h_2;
0x0000c686 cmp r2, 0 |
| if (r2 != 0) {
0x0000c688 bne 0xc65c | goto label_0;
| }
| label_6:
0x0000c68a mov r0, r4 | r0 = r4;
0x0000c68c blx 0x4ec4 | fcn_00004ec4 ();
0x0000c690 ldr r0, [sp, 0xc] | r0 = var_ch_2;
0x0000c692 blx 0x4e9c | r0 = ext2fs_file_close ();
| if (r0 != 0) {
0x0000c696 cbnz r0, 0xc6e0 | goto label_8;
| }
0x0000c698 cmp.w sb, 0 |
| if (sb == 0) {
0x0000c69c beq 0xc60e | goto label_1;
| }
0x0000c69e ldr r0, [pc, 0x70] |
0x0000c6a0 mov r2, r5 | r2 = r5;
0x0000c6a2 ldr r3, [sp] | r3 = *(sp);
0x0000c6a4 mov r1, sl | r1 = sl;
0x0000c6a6 add r0, pc | r0 = 0x18dbc;
0x0000c6a8 bl 0xc460 | fcn_0000c460 (r0, r1, r2, r3);
0x0000c6ac b 0xc60e | goto label_1;
| label_7:
0x0000c6ae blx 0x53f4 | sprintf_chk ()
0x0000c6b2 ldr r2, [sp, 4] | r2 = var_4h_3;
0x0000c6b4 ldr r1, [r0] | r1 = *(r0);
0x0000c6b6 mov r0, r6 | r0 = r6;
0x0000c6b8 blx 0x50d8 | fcn_000050d8 ();
0x0000c6bc b 0xc66a | goto label_2;
| label_4:
0x0000c6be ldr r2, [pc, 0x54] |
0x0000c6c0 mov r1, r0 | r1 = r0;
0x0000c6c2 mov r0, r6 | r0 = r6;
0x0000c6c4 add r2, pc | r2 = 0x18dde;
0x0000c6c6 blx 0x50d8 | fcn_000050d8 ();
0x0000c6ca b 0xc60e | goto label_1;
| label_5:
0x0000c6cc ldr r2, [pc, 0x48] |
0x0000c6ce movw r1, 0xb746 |
0x0000c6d2 movt r1, 0x7f2b | r1 = 0x7f2bb746;
0x0000c6d6 mov r0, r6 | r0 = r6;
0x0000c6d8 add r2, pc | r2 = 0x18df4;
0x0000c6da blx 0x50d8 | fcn_000050d8 ();
0x0000c6de b 0xc60e | goto label_1;
| label_8:
0x0000c6e0 ldr r2, [pc, 0x38] |
0x0000c6e2 mov r1, r0 | r1 = r0;
0x0000c6e4 mov r0, r6 | r0 = r6;
0x0000c6e6 add r2, pc | r2 = 0x18e06;
0x0000c6e8 blx 0x50d8 | fcn_000050d8 ();
0x0000c6ec b 0xc60e | goto label_1;
| label_3:
0x0000c6ee blx 0x5008 | fcn_00005008 ();
0x0000c6f2 nop |
0x0000c6f4 strb r6, [r7, 0x16] | *((r7 + 0x16)) = r6;
0x0000c6f6 movs r2, r0 | r2 = r0;
0x0000c6f8 lsls r0, r2, 0x10 | r0 = r2 << 0x10;
0x0000c6fa movs r0, r0 |
0x0000c6fc strb r4, [r6, 0x16] | *((r6 + 0x16)) = r4;
0x0000c6fe movs r2, r0 | r2 = r0;
0x0000c700 lsls r4, r3, 0x11 | r4 = r3 << 0x11;
0x0000c702 movs r0, r0 |
0x0000c704 strb r2, [r1, 0x16] | *((r1 + 0x16)) = r2;
0x0000c706 movs r2, r0 | r2 = r0;
0x0000c708 movs r3, 0xd0 | r3 = 0xd0;
0x0000c70a movs r1, r0 | r1 = r0;
0x0000c70c movs r3, 0xb6 | r3 = 0xb6;
0x0000c70e movs r1, r0 | r1 = r0;
0x0000c710 movs r3, 0xa6 | r3 = 0xa6;
0x0000c712 movs r1, r0 | r1 = r0;
0x0000c714 movs r3, 0x2c | r3 = 0x2c;
0x0000c716 movs r1, r0 | r1 = r0;
0x0000c718 adds r4, r2, r3 | r4 = r2 + r3;
0x0000c71a movs r1, r0 | r1 = r0;
0x0000c71c movs r3, 0x4e | r3 = 0x4e;
0x0000c71e movs r1, r0 | r1 = 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/debugfs @ 0xc720 */
| #include <stdint.h>
|
; (fcn) fcn.0000c720 () | void fcn_0000c720 (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h_2;
| int16_t var_4h_2;
| int16_t var_ch_3;
| int16_t var_10h;
| int16_t var_14h_2;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
| label_6:
0x000050d4 invalid | void (*0x50d8)() ();
0x0000c720 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0000c724 mov r5, r2 | r5 = r2;
0x0000c726 ldr r2, [pc, 0x294] |
0x0000c728 mov sb, r3 | sb = r3;
0x0000c72a sub sp, 0x18 |
0x0000c72c mov r7, r0 | r7 = r0;
0x0000c72e ldr r3, [pc, 0x290] | r3 = *(0xc9c2);
0x0000c730 mov r0, sb | r0 = sb;
0x0000c732 add r2, pc | r2 = 0x190f4;
0x0000c734 mov r6, r1 | r6 = r1;
0x0000c736 ldr.w r8, [pc, 0x28c] | r8 = *(0x0000c9c4);
0x0000c73a ldr r3, [r2, r3] |
0x0000c73c add r8, pc | r8 += pc;
0x0000c73e ldr r3, [r3] | r3 = *(0x190f4);
0x0000c740 str r3, [sp, 0x14] | var_14h_2 = r3;
0x0000c742 mov.w r3, 0 | r3 = 0;
0x0000c746 blx 0x537c | r0 = ext2fs_dir_iterate ();
0x0000c74a mov r4, r0 | r4 = r0;
0x0000c74c mov r0, r5 | r0 = r5;
0x0000c74e blx 0x537c | ext2fs_dir_iterate ();
0x0000c752 add r0, r4 | r0 += r4;
0x0000c754 adds r0, 2 | r0 += 2;
0x0000c756 blx 0x52bc | r0 = strerror (r0);
0x0000c75a cmp r0, 0 |
| if (r0 == 0) {
0x0000c75c beq.w 0xc97c | goto label_7;
| }
0x0000c760 ldr r3, [pc, 0x264] |
0x0000c762 mov.w r2, -1 | r2 = -1;
0x0000c766 movs r1, 1 | r1 = 1;
0x0000c768 strd sb, r5, [sp] | __asm ("strd sb, r5, [sp]");
0x0000c76c mov r4, r0 | r4 = r0;
0x0000c76e add r3, pc | r3 = 0x1913a;
0x0000c770 blx 0x540c | mkdir ();
0x0000c774 ldrh r3, [r6] | r3 = *(r6);
0x0000c776 and r3, r3, 0xf000 | r3 &= 0xf000;
0x0000c77a cmp.w r3, 0xa000 |
| if (r3 == 0xa000) {
0x0000c77e beq 0xc7ee | goto label_8;
| }
0x0000c780 cmp.w r3, 0x8000 |
| if (r3 == 0x8000) {
0x0000c784 beq.w 0xc8ca | goto label_9;
| }
0x0000c788 cmp.w r3, 0x4000 |
0x0000c78c beq 0xc7b0 |
| while (1) {
| label_0:
0x0000c78e ldr r2, [pc, 0x23c] |
0x0000c790 ldr r3, [pc, 0x22c] | r3 = *(0xc9c0);
0x0000c792 add r2, pc | r2 = 0x19164;
0x0000c794 ldr r3, [r2, r3] | r3 = *(0x19164);
0x0000c796 ldr r2, [r3] | r2 = *(0x19164);
0x0000c798 ldr r3, [sp, 0x14] | r3 = var_14h_2;
0x0000c79a eors r2, r3 | r2 ^= r3;
0x0000c79c mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000c7a0 bne.w 0xc978 | goto label_10;
| }
0x0000c7a4 mov r0, r4 | r0 = r4;
0x0000c7a6 add sp, 0x18 |
0x0000c7a8 pop.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0000c7ac b.w 0x4ec0 | void (*0x4ec0)() ();
0x0000c7b0 ldrb r3, [r5] | r3 = *(r5);
0x0000c7b2 cmp r3, 0x2e |
| if (r3 == 0x2e) {
0x0000c7b4 beq 0xc828 | goto label_11;
| }
| label_1:
0x0000c7b6 ldrb r3, [r5] | r3 = *(r5);
0x0000c7b8 cmp r3, 0x2e |
| if (r3 == 0x2e) {
0x0000c7ba bne 0xc7c4 |
0x0000c7bc ldrb r3, [r5, 1] | r3 = *((r5 + 1));
0x0000c7be cmp r3, 0x2e |
| if (r3 == 0x2e) {
0x0000c7c0 beq.w 0xc914 | goto label_12;
| }
| }
| label_3:
0x0000c7c4 ldrb r3, [r5] | r3 = *(r5);
0x0000c7c6 cmp r3, 0 |
| if (r3 == 0) {
0x0000c7c8 beq 0xc89a | goto label_13;
| }
0x0000c7ca mov.w r1, 0x1c0 | r1 = 0x1c0;
0x0000c7ce mov r0, r4 | r0 = r4;
0x0000c7d0 blx 0x5424 | memset (r0, r1, r2);
0x0000c7d4 adds r0, 1 | r0++;
| if (r0 != 1) {
0x0000c7d6 bne 0xc89a | goto label_13;
| }
0x0000c7d8 blx 0x53f4 | sprintf_chk ()
0x0000c7dc ldr r2, [pc, 0x1f0] |
0x0000c7de mov r3, r4 | r3 = r4;
0x0000c7e0 ldr r1, [r0] | r1 = *(r0);
0x0000c7e2 ldr r0, [pc, 0x1f0] |
0x0000c7e4 add r2, pc | r2 = 0x191b8;
0x0000c7e6 add r0, pc | r0 = 0x191c0;
0x0000c7e8 blx 0x50d8 | fcn_000050d8 ();
0x0000c7ec b 0xc78e |
| }
| label_8:
0x0000c7ee ldr r0, [r6, 4] | r0 = *((r6 + 4));
0x0000c7f0 adds r0, 1 | r0++;
0x0000c7f2 blx 0x52bc | r0 = strerror (r0);
0x0000c7f6 mov sb, r0 | sb = r0;
0x0000c7f8 cmp r0, 0 |
| if (r0 == 0) {
0x0000c7fa beq.w 0xc9a8 | goto label_14;
| }
0x0000c7fe mov r0, r6 | r0 = r6;
0x0000c800 blx 0x4d70 | r0 = ext2fs_is_fast_symlink ();
0x0000c804 mov r2, r0 | r2 = r0;
| if (r0 == 0) {
0x0000c806 cbz r0, 0xc830 | goto label_15;
| }
0x0000c808 add.w r1, r6, 0x28 | r1 = r6 + 0x28;
0x0000c80c mov r0, sb | r0 = sb;
0x0000c80e blx 0x51b4 | gettimeofday ();
| label_2:
0x0000c812 mov r1, r4 | r1 = r4;
0x0000c814 mov r0, sb | r0 = sb;
0x0000c816 blx 0x56e0 | fcn_000056e0 ();
0x0000c81a adds r0, 1 | r0++;
| if (r0 == 1) {
0x0000c81c beq.w 0xc960 | goto label_16;
| }
| label_5:
0x0000c820 mov r0, sb | r0 = sb;
0x0000c822 blx 0x4ec4 | fcn_00004ec4 ();
0x0000c826 b 0xc78e | goto label_0;
| label_11:
0x0000c828 ldrb r3, [r5, 1] | r3 = *((r5 + 1));
0x0000c82a cmp r3, 0 |
| if (r3 == 0) {
0x0000c82c beq 0xc78e | goto label_0;
| }
0x0000c82e b 0xc7b6 | goto label_1;
| label_15:
0x0000c830 ldr r3, [pc, 0x1a4] | r3 = *(0xc9d8);
0x0000c832 mov r1, r7 | r1 = r7;
0x0000c834 add.w sl, sp, 0x10 | sl += var_10h;
0x0000c838 ldr r7, [r6, 4] | r7 = *((r6 + 4));
0x0000c83a ldr.w r3, [r8, r3] | r3 = *((r8 + r3));
0x0000c83e mov r8, sb | r8 = sb;
0x0000c840 ldr r0, [r3] | r0 = *(0xc9d8);
0x0000c842 add r3, sp, 0xc | r3 += var_ch_3;
0x0000c844 blx 0x4f30 | r0 = fcn_00004f30 ();
0x0000c848 mov r1, r0 | r1 = r0;
0x0000c84a cmp r0, 0 |
| if (r0 != 0) {
0x0000c84c bne.w 0xc952 | goto label_17;
| }
| do {
0x0000c850 mov r1, r8 | r1 = r8;
0x0000c852 ldr r0, [sp, 0xc] | r0 = var_ch_3;
0x0000c854 mov r3, sl | r3 = sl;
0x0000c856 mov r2, r7 | r2 = r7;
0x0000c858 blx 0x4db8 | r0 = ext2fs_file_read ();
0x0000c85c mov r1, r0 | r1 = r0;
0x0000c85e cmp r0, 0 |
| if (r0 != 0) {
0x0000c860 bne 0xc944 | goto label_18;
| }
0x0000c862 ldr r2, [sp, 0x10] | r2 = var_10h;
0x0000c864 subs r7, r7, r2 | r7 -= r2;
0x0000c866 add r8, r2 | r8 += r2;
0x0000c868 ite eq |
| if (r7 != r7) {
0x0000c86a moveq r3, 1 | r3 = 1;
| }
| if (r7 == r7) {
0x0000c86c movne r3, 0 | r3 = 0;
| }
0x0000c86e cmp r2, 0 |
0x0000c870 it eq |
| if (r2 != 0) {
0x0000c872 orreq r3, r3, 1 | r3 |= 1;
| }
0x0000c876 cmp r3, 0 |
0x0000c878 beq 0xc850 |
| } while (r3 == 0);
0x0000c87a ldr r3, [r6, 4] | r3 = *((r6 + 4));
0x0000c87c ldr r0, [sp, 0xc] | r0 = var_ch_3;
0x0000c87e strb.w r1, [sb, r3] | *((sb + r3)) = r1;
0x0000c882 blx 0x4e9c | r0 = ext2fs_file_close ();
0x0000c886 mov r1, r0 | r1 = r0;
0x0000c888 cmp r0, 0 |
| if (r0 == 0) {
0x0000c88a beq 0xc812 | goto label_2;
| }
0x0000c88c ldr r2, [pc, 0x14c] |
0x0000c88e ldr r0, [pc, 0x150] |
0x0000c890 add r2, pc | r2 = 0x19270;
0x0000c892 add r0, pc | r0 = 0x19278;
0x0000c894 blx 0x50d8 | fcn_000050d8 ();
0x0000c898 b 0xc812 | goto label_2;
| label_13:
0x0000c89a ldr r3, [pc, 0x13c] | r3 = *(0xc9da);
0x0000c89c mov r1, r7 | r1 = r7;
0x0000c89e ldr.w r2, [r8, r3] | r2 = *((r8 + r3));
0x0000c8a2 ldr r3, [pc, 0x140] |
0x0000c8a4 str r4, [sp, 4] | var_4h_2 = r4;
0x0000c8a6 ldr r0, [r2] | r0 = *(r2);
0x0000c8a8 add r3, pc | r3 = 0x19292;
0x0000c8aa str r3, [sp] | *(sp) = r3;
0x0000c8ac movs r3, 0 | r3 = 0;
0x0000c8ae mov r2, r3 | r2 = r3;
0x0000c8b0 blx 0x5394 | r0 = fchown ();
0x0000c8b4 mov r1, r0 | r1 = r0;
| if (r0 != 0) {
0x0000c8b6 cbnz r0, 0xc91e | goto label_19;
| }
| label_4:
0x0000c8b8 ldr r0, [pc, 0x12c] |
0x0000c8ba mov r3, r4 | r3 = r4;
0x0000c8bc mov.w r2, -1 | r2 = -1;
0x0000c8c0 mov r1, r6 | r1 = r6;
0x0000c8c2 add r0, pc | r0 = 0x192ae;
0x0000c8c4 bl 0xc460 | fcn_0000c460 (r0, r1, r2, r3);
0x0000c8c8 b 0xc78e | goto label_0;
| label_9:
0x0000c8ca movw r1, 0x241 |
0x0000c8ce mov.w r2, 0x1c0 | r2 = 0x1c0;
0x0000c8d2 movt r1, 2 | r1 = 0x20241;
0x0000c8d6 mov r0, r4 | r0 = r4;
0x0000c8d8 blx 0x5304 | r0 = ctype_b_loc ();
0x0000c8dc adds r3, r0, 1 | r3 = r0 + 1;
0x0000c8de mov r5, r0 | r5 = r0;
| if (r3 == r0) {
0x0000c8e0 beq 0xc92e | goto label_20;
| }
0x0000c8e2 ldr r6, [pc, 0x108] |
0x0000c8e4 mov r2, r0 | r2 = r0;
0x0000c8e6 movs r3, 1 | r3 = 1;
0x0000c8e8 mov r1, r7 | r1 = r7;
0x0000c8ea str r4, [sp] | *(sp) = r4;
0x0000c8ec add r6, pc | r6 = 0x192de;
0x0000c8ee mov r0, r6 | r0 = r6;
0x0000c8f0 bl 0xc5cc | fcn_0000c5cc (r0, r1, r2, r3);
0x0000c8f4 mov r0, r5 | r0 = r5;
0x0000c8f6 blx 0x5894 | r0 = fcn_00005894 ();
0x0000c8fa cmp r0, 0 |
| if (r0 == 0) {
0x0000c8fc beq.w 0xc78e | goto label_0;
| }
0x0000c900 blx 0x53f4 | sprintf_chk ()
0x0000c904 ldr r2, [pc, 0xe8] |
0x0000c906 mov r3, r4 | r3 = r4;
0x0000c908 ldr r1, [r0] | r1 = *(r0);
0x0000c90a mov r0, r6 | r0 = r6;
0x0000c90c add r2, pc | r2 = 0x19300;
0x0000c90e blx 0x50d8 | fcn_000050d8 ();
0x0000c912 b 0xc78e | goto label_0;
| label_12:
0x0000c914 ldrb r3, [r5, 2] | r3 = *((r5 + 2));
0x0000c916 cmp r3, 0 |
| if (r3 == 0) {
0x0000c918 beq.w 0xc78e | goto label_0;
| }
0x0000c91c b 0xc7c4 | goto label_3;
| label_19:
0x0000c91e ldr r2, [pc, 0xd4] |
0x0000c920 mov r3, r4 | r3 = r4;
0x0000c922 ldr r0, [pc, 0xd4] |
0x0000c924 add r2, pc | r2 = 0x1931e;
0x0000c926 add r0, pc | r0 = 0x19324;
0x0000c928 blx 0x50d8 | fcn_000050d8 ();
0x0000c92c b 0xc8b8 | goto label_4;
| label_20:
0x0000c92e blx 0x53f4 | sprintf_chk ()
0x0000c932 ldr r2, [pc, 0xc8] |
0x0000c934 mov r3, r4 | r3 = r4;
0x0000c936 ldr r1, [r0] | r1 = *(r0);
0x0000c938 ldr r0, [pc, 0xc4] |
0x0000c93a add r2, pc | r2 = 0x1933c;
0x0000c93c add r0, pc | r0 = 0x19340;
0x0000c93e blx 0x50d8 | fcn_000050d8 ();
0x0000c942 b 0xc78e | goto label_0;
| label_18:
0x0000c944 ldr r2, [pc, 0xbc] |
0x0000c946 ldr r0, [pc, 0xc0] |
0x0000c948 add r2, pc | r2 = 0x19350;
0x0000c94a add r0, pc | r0 = 0x19358;
0x0000c94c blx 0x50d8 | fcn_000050d8 ();
0x0000c950 b 0xc820 | goto label_5;
| label_17:
0x0000c952 ldr r2, [pc, 0xb8] |
0x0000c954 ldr r0, [pc, 0xb8] |
0x0000c956 add r2, pc | r2 = 0x19368;
0x0000c958 add r0, pc | r0 = 0x1936c;
0x0000c95a blx 0x50d8 | fcn_000050d8 ();
0x0000c95e b 0xc820 | goto label_5;
| label_16:
0x0000c960 blx 0x53f4 | sprintf_chk ()
0x0000c964 ldr r2, [pc, 0xac] |
0x0000c966 mov r3, sb | r3 = sb;
0x0000c968 ldr r1, [r0] | r1 = *(r0);
0x0000c96a ldr r0, [pc, 0xac] |
0x0000c96c add r2, pc | r2 = 0x19384;
0x0000c96e str r4, [sp] | *(sp) = r4;
0x0000c970 add r0, pc | r0 = 0x1938e;
0x0000c972 blx 0x50d8 | fcn_000050d8 ();
0x0000c976 b 0xc820 | goto label_5;
| do {
| label_10:
0x0000c978 blx 0x5008 | fcn_00005008 ();
| label_7:
0x0000c97c blx 0x53f4 | sprintf_chk ()
0x0000c980 ldr r1, [pc, 0x98] |
0x0000c982 ldr r2, [pc, 0x3c] | r2 = *(0xc9c2);
0x0000c984 add r1, pc | r1 = 0x193a4;
0x0000c986 ldr r2, [r1, r2] | r2 = *(0x193a4);
0x0000c988 ldr r1, [r2] | r1 = *(0x193a4);
0x0000c98a ldr r2, [sp, 0x14] | r2 = var_14h_2;
0x0000c98c eors r1, r2 | r1 ^= r2;
0x0000c98e mov.w r2, 0 | r2 = 0;
0x0000c992 bne 0xc978 |
| } while (r1 != r2);
0x0000c994 ldr r1, [r0] | r1 = *(r0);
0x0000c996 ldr r2, [pc, 0x88] |
0x0000c998 ldr r0, [pc, 0x88] |
0x0000c99a add r2, pc | r2 = 0x193c0;
0x0000c99c add r0, pc | r0 = 0x193c4;
0x0000c99e add sp, 0x18 |
0x0000c9a0 pop.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0000c9a4 b.w 0x50d4 | goto label_6;
| label_14:
0x0000c9a8 blx 0x53f4 | sprintf_chk ()
0x0000c9ac ldr r2, [pc, 0x78] |
0x0000c9ae ldr r1, [r0] | r1 = *(r0);
0x0000c9b0 ldr r0, [pc, 0x78] |
0x0000c9b2 add r2, pc | r2 = 0x193de;
0x0000c9b4 add r0, pc | r0 = 0x193e4;
0x0000c9b6 blx 0x50d8 | fcn_000050d8 ();
0x0000c9ba b 0xc820 | goto label_5;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/debugfs @ 0xdd14 */
| #include <stdint.h>
|
; (fcn) fcn.0000dd14 () | void fcn_0000dd14 (int16_t arg_28h, size_t nbyte, int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h_2;
| int32_t var_0h;
| int16_t var_8h_2;
| int16_t var_ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x0000dd14 push {r4, r5, r6, r7, lr} |
0x0000dd16 mov r5, r1 | r5 = r1;
0x0000dd18 ldr r4, [pc, 0xc0] |
0x0000dd1a mov r6, r0 | r6 = r0;
0x0000dd1c sub sp, 0x14 |
0x0000dd1e ldr r1, [pc, 0xc0] | r1 = *(0xdde2);
0x0000dd20 ldr r0, [r5] | r0 = *(r5);
0x0000dd22 add r4, pc | r4 = 0x1bb02;
0x0000dd24 ldr r7, [sp, 0x28] | r7 = *(arg_28h);
0x0000dd26 ldr r1, [r4, r1] |
0x0000dd28 cmp r0, 1 |
0x0000dd2a ldr r1, [r1] | r1 = *(0x1bb02);
0x0000dd2c str r1, [sp, 0xc] | var_ch = r1;
0x0000dd2e mov.w r1, 0 | r1 = 0;
| if (r0 == 1) {
0x0000dd32 beq 0xdd9c | goto label_3;
| }
0x0000dd34 movs r1, 0 | r1 = 0;
0x0000dd36 strd r1, r1, [sp] | __asm ("strd r1, r1, [sp]");
0x0000dd3a ldr r0, [r5, 8] | r0 = *((r5 + 8));
0x0000dd3c blx 0x5580 | r0 = ext2fs_mkdir ();
0x0000dd40 mov r4, r0 | r4 = r0;
| if (r0 == 0) {
0x0000dd42 cbz r0, 0xdd6a | goto label_4;
| }
| label_2:
0x0000dd44 ldr r2, [pc, 0x9c] |
0x0000dd46 mov r1, r4 | r1 = r4;
0x0000dd48 mov r0, r6 | r0 = r6;
0x0000dd4a add r2, pc | r2 = 0x1bb32;
0x0000dd4c blx 0x50d8 | fcn_000050d8 ();
| do {
| label_0:
0x0000dd50 ldr r2, [pc, 0x94] |
0x0000dd52 ldr r3, [pc, 0x8c] | r3 = *(0xdde2);
0x0000dd54 add r2, pc | r2 = 0x1bb40;
0x0000dd56 ldr r3, [r2, r3] | r3 = *(0x1bb40);
0x0000dd58 ldr r2, [r3] | r2 = *(0x1bb40);
0x0000dd5a ldr r3, [sp, 0xc] | r3 = var_ch;
0x0000dd5c eors r2, r3 | r2 ^= r3;
0x0000dd5e mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000dd62 bne 0xddd8 | goto label_5;
| }
0x0000dd64 mov r0, r4 | r0 = r4;
0x0000dd66 add sp, 0x14 |
0x0000dd68 pop {r4, r5, r6, r7, pc} |
| label_4:
0x0000dd6a add r3, sp, 8 | r3 += var_8h_2;
0x0000dd6c ldr r0, [r5, 8] | r0 = *((r5 + 8));
0x0000dd6e ldr r2, [sp, 0x2c] | r2 = *(nbyte);
0x0000dd70 mov r1, r7 | r1 = r7;
0x0000dd72 blx 0x4db8 | ext2fs_file_read ();
0x0000dd76 ldr r3, [sp, 8] | r3 = var_8h_2;
0x0000dd78 mov r4, r0 | r4 = r0;
| if (r0 != 0) {
0x0000dd7a cbnz r0, 0xddc2 | goto label_6;
| }
| label_1:
0x0000dd7c ldr r2, [sp, 0x2c] | r2 = *(nbyte);
0x0000dd7e cmp r2, r3 |
0x0000dd80 it eq |
| if (r2 != r3) {
0x0000dd82 moveq r4, 0 | r4 = 0;
| }
0x0000dd84 beq 0xdd50 |
| } while (r2 == r3);
0x0000dd86 ldr r4, [sp, 0x2c] | r4 = *(nbyte);
0x0000dd88 movs r1, 0 | r1 = 0;
0x0000dd8a ldr r2, [pc, 0x60] |
0x0000dd8c mov r0, r6 | r0 = r6;
0x0000dd8e str r4, [sp] | *(sp) = r4;
0x0000dd90 mov.w r4, -1 | r4 = -1;
0x0000dd94 add r2, pc | r2 = 0x1bb86;
0x0000dd96 blx 0x50d8 | fcn_000050d8 ();
0x0000dd9a b 0xdd50 | goto label_0;
| label_3:
0x0000dd9c mov r1, r2 | r1 = r2;
0x0000dd9e ldr r0, [r5, 4] | r0 = *((r5 + 4));
0x0000dda0 movs r2, 0 | r2 = 0;
0x0000dda2 blx 0x4f6c | r0 = fcn_00004f6c ();
0x0000dda6 cmp r0, 0 |
| if (r0 < 0) {
0x0000dda8 blt 0xddd0 | goto label_7;
| }
0x0000ddaa ldr r0, [r5, 4] | r0 = *((r5 + 4));
0x0000ddac mov r1, r7 | r1 = r7;
0x0000ddae ldr r2, [sp, 0x2c] | r2 = *(nbyte);
0x0000ddb0 blx 0x4e54 | r0 = read (r0, r1, r2);
0x0000ddb4 subs r3, r0, 0 | r3 = r0 - 0;
0x0000ddb6 it ge |
| if (r3 >= r0) {
0x0000ddb8 strge r3, [sp, 8] | var_8h_2 = r3;
| goto label_8;
| }
| if (r3 >= r0) {
| label_8:
0x0000ddba bge 0xdd7c | goto label_1;
| }
0x0000ddbc blx 0x53f4 | r0 = sprintf_chk ()
0x0000ddc0 ldr r4, [r0] | r4 = *(r0);
| label_6:
0x0000ddc2 ldr r2, [pc, 0x2c] |
0x0000ddc4 mov r1, r4 | r1 = r4;
0x0000ddc6 mov r0, r6 | r0 = r6;
0x0000ddc8 add r2, pc | r2 = 0x1bbbe;
0x0000ddca blx 0x50d8 | fcn_000050d8 ();
0x0000ddce b 0xdd50 | goto label_0;
| label_7:
0x0000ddd0 blx 0x53f4 | r0 = sprintf_chk ()
0x0000ddd4 ldr r4, [r0] | r4 = *(r0);
0x0000ddd6 b 0xdd44 | goto label_2;
| label_5:
0x0000ddd8 blx 0x5008 | fcn_00005008 ();
0x0000dddc ldrsh r2, [r7, r1] | r2 = *((r7 + r1));
0x0000ddde movs r2, r0 | r2 = r0;
0x0000dde0 lsls r0, r2, 0x10 | r0 = r2 << 0x10;
0x0000dde2 movs r0, r0 |
0x0000dde4 subs r2, r1, r2 | r2 = r1 - r2;
0x0000dde6 movs r1, r0 | r1 = r0;
0x0000dde8 ldrsh r0, [r1, r1] | r0 = *((r1 + r1));
0x0000ddea movs r2, r0 | r2 = r0;
0x0000ddec subs r4, r7, r1 | r4 = r7 - r1;
0x0000ddee movs r1, r0 | r1 = r0;
0x0000ddf0 subs r0, r6, r0 | r0 = r6 - r0;
0x0000ddf2 movs r1, r0 | r1 = 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/debugfs @ 0x1264c */
| #include <stdint.h>
|
; (fcn) fcn.0001264c () | void fcn_0001264c (int16_t arg_60h, int16_t arg_64h, int16_t arg_68h, int16_t arg_6ch, int16_t arg_70h, int16_t arg_74h, int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_14h_2;
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_20h;
| int16_t var_24h;
| int16_t var_28h;
| int16_t var_2ch;
| int16_t var_30h;
| int16_t var_34h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x0001264c svcmi 0xf0e92d | __asm ("svcmi 0xf0e92d");
0x00012650 sub sp, 0x3c |
0x00012652 ldr r4, [pc, 0x124] |
0x00012654 mov sb, r2 | sb = r2;
0x00012656 ldr r5, [sp, 0x60] | r5 = *(arg_60h);
0x00012658 ldr r6, [sp, 0x64] | r6 = *(arg_64h);
0x0001265a add r4, pc | r4 = 0x24dd8;
0x0001265c ldr r3, [pc, 0x11c] | r3 = *(0x1277c);
0x0001265e str r5, [sp, 0x14] | var_14h = r5;
0x00012660 str r6, [sp, 0x18] | var_18h = r6;
0x00012662 ldr r3, [r4, r3] |
0x00012664 ldr r2, [sp, 0x6c] | r2 = *(arg_6ch);
0x00012666 ldr r3, [r3] | r3 = *(0x24dd8);
0x00012668 str r3, [sp, 0x34] | var_34h = r3;
0x0001266a mov.w r3, 0 | r3 = 0;
0x0001266e ldr r3, [sp, 0x68] | r3 = *(arg_68h);
0x00012670 strd r0, r1, [sp, 0x20] | __asm ("strd r0, r1, [var_24h]");
0x00012674 ldr r1, [sp, 0x70] | r1 = *(arg_70h);
0x00012676 cmp r5, r3 |
0x00012678 str r3, [sp, 0x28] | var_28h = r3;
0x0001267a sbcs.w r3, r6, r2 | __asm ("sbcs.w r3, r6, r2");
0x0001267e str r2, [sp, 0x2c] | var_2ch = r2;
0x00012680 str r1, [sp, 0x1c] | var_1ch = r1;
0x00012682 ldr r1, [sp, 0x74] | r1 = *(arg_74h);
0x00012684 str r1, [sp, 0x10] | var_10h = r1;
| if (r5 >= r3) {
0x00012686 bge 0x1270e | goto label_4;
| }
| label_0:
0x00012688 ldr r3, [sp, 0x14] | r3 = var_14h;
0x0001268a mov.w r2, 0x10000 | r2 = 0x10000;
0x0001268e ldr r1, [sp, 0x1c] | r1 = var_1ch;
0x00012690 ldr r0, [sp, 0x24] | r0 = var_24h;
0x00012692 str r3, [sp] | *(sp) = r3;
0x00012694 ldr r3, [sp, 0x18] | r3 = var_18h;
0x00012696 str r3, [sp, 4] | var_4h = r3;
0x00012698 blx 0x51f0 | r0 = ext2fs_new_block2 ();
0x0001269c subs.w r8, r0, 0 | r8 = r0 - 0;
| if (r8 < r0) {
0x000126a0 blt 0x1276a | goto label_5;
| }
0x000126a2 asr.w fp, r8, 0x1f |
| if (r8 == r0) {
0x000126a6 beq 0x126f2 | goto label_6;
| }
0x000126a8 ldr r3, [sp, 0x20] | r3 = var_20h;
0x000126aa movs r6, 0 | r6 = 0;
0x000126ac ldr r5, [sp, 0x1c] | r5 = var_1ch;
0x000126ae mov r7, r6 | r7 = r6;
0x000126b0 add.w sl, sp, 0x30 | sl += var_30h;
0x000126b4 ldr r3, [r3, 0x14] | r3 = *((r3 + 0x14));
| do {
0x000126b6 subs.w r2, r8, r6 | r2 = r8 - r6;
0x000126ba asr.w r1, r3, 0x1f | r1 = r3 >> 0x1f;
0x000126be sbc.w r0, fp, r7 | __asm ("sbc.w r0, fp, r7");
0x000126c2 cmp r2, r3 |
0x000126c4 mov r4, r3 | r4 = r3;
0x000126c6 sbcs r0, r1 | __asm ("sbcs r0, r1");
0x000126c8 ldr r1, [sp, 0x10] | r1 = var_10h;
0x000126ca it ge |
| if (r2 < r3) {
0x000126cc movge r2, r3 | r2 = r3;
| }
0x000126ce mov r0, r5 | r0 = r5;
0x000126d0 it lt |
| if (r2 >= r3) {
0x000126d2 movlt r4, r2 | r4 = r2;
| }
0x000126d4 strd r2, r3, [sp, 8] | __asm ("strd r2, r3, [var_8h]");
0x000126d8 blx 0x4f9c | r0 = fcn_00004f9c ();
| if (r0 != 0) {
0x000126dc cbnz r0, 0x1272a | goto label_7;
| }
0x000126de ldr r2, [sp, 8] | r2 = var_8h;
0x000126e0 ldr r3, [sp, 0xc] | r3 = var_ch;
0x000126e2 add r5, r2 | r5 += r2;
| label_3:
0x000126e4 adds r6, r3, r6 | r6 = r3 + r6;
0x000126e6 adc r7, r7, 0 | __asm ("adc r7, r7, 0");
0x000126ea cmp r6, r8 |
0x000126ec sbcs.w r2, r7, fp | __asm ("sbcs.w r2, r7, fp");
0x000126f0 blt 0x126b6 |
| } while (r6 < r8);
| label_6:
0x000126f2 ldr r3, [sp, 0x14] | r3 = var_14h;
0x000126f4 ldr r2, [sp, 0x18] | r2 = var_18h;
0x000126f6 ldr r1, [sp, 0x28] | r1 = var_28h;
0x000126f8 adds.w r3, r3, 0x10000 | r3 += 0x10000;
0x000126fc adc r2, r2, 0 | __asm ("adc r2, r2, 0");
0x00012700 str r3, [sp, 0x14] | var_14h = r3;
0x00012702 cmp r3, r1 |
0x00012704 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x00012706 str r2, [sp, 0x18] | var_18h = r2;
0x00012708 sbcs.w r3, r2, r3 | __asm ("sbcs.w r3, r2, r3");
| if (r3 < r1) {
0x0001270c blt 0x12688 | goto label_0;
| }
| label_4:
0x0001270e movs r0, 0 | r0 = 0;
| do {
| label_1:
0x00012710 ldr r2, [pc, 0x6c] |
0x00012712 ldr r3, [pc, 0x68] | r3 = *(0x1277e);
0x00012714 add r2, pc | r2 = 0x24e98;
0x00012716 ldr r3, [r2, r3] | r3 = *(0x24e98);
0x00012718 ldr r2, [r3] | r2 = *(0x24e98);
0x0001271a ldr r3, [sp, 0x34] | r3 = var_34h;
0x0001271c eors r2, r3 | r2 ^= r3;
0x0001271e mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00012722 bne 0x12772 | goto label_8;
| }
0x00012724 add sp, 0x3c |
0x00012726 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_7:
0x0001272a movs r3, 0 | r3 = 0;
0x0001272c mov r0, sb | r0 = sb;
0x0001272e strd r3, r3, [sp] | __asm ("strd r3, r3, [sp]");
0x00012732 ldr r3, [sp, 0x14] | r3 = var_14h;
0x00012734 adds r2, r3, r6 | r2 = r3 + r6;
0x00012736 ldr r3, [sp, 0x18] | r3 = var_18h;
0x00012738 adc.w r3, r7, r3 | __asm ("adc.w r3, r7, r3");
0x0001273c blx 0x5580 | r0 = ext2fs_mkdir ();
| if (r0 == 0) {
0x00012740 cbz r0, 0x1275c | goto label_9;
| }
0x00012742 b 0x12710 |
| } while (1);
| label_2:
0x00012744 mov r3, sl | r3 = sl;
0x00012746 mov r2, r4 | r2 = r4;
0x00012748 mov r1, r5 | r1 = r5;
0x0001274a mov r0, sb | r0 = sb;
0x0001274c blx 0x4e30 | r0 = ext2fs_file_write ();
0x00012750 cmp r0, 0 |
| if (r0 != 0) {
0x00012752 bne 0x12710 | goto label_1;
| }
0x00012754 ldr r3, [sp, 0x30] | r3 = var_30h;
| if (r3 == 0) {
0x00012756 cbz r3, 0x12766 | goto label_10;
| }
0x00012758 subs r4, r4, r3 | r4 -= r3;
0x0001275a add r5, r3 | r5 += r3;
| label_9:
0x0001275c cmp r4, 0 |
| if (r4 > 0) {
0x0001275e bgt 0x12744 | goto label_2;
| }
0x00012760 ldr r3, [sp, 0x20] | r3 = var_20h;
0x00012762 ldr r3, [r3, 0x14] | r3 = *((r3 + 0x14));
0x00012764 b 0x126e4 | goto label_3;
| label_10:
0x00012766 movs r0, 5 | r0 = 5;
0x00012768 b 0x12710 | goto label_1;
| label_5:
0x0001276a blx 0x53f4 | r0 = sprintf_chk ()
0x0001276e ldr r0, [r0] | r0 = *(r0);
0x00012770 b 0x12710 | goto label_1;
| label_8:
0x00012772 blx 0x5008 | fcn_00005008 ();
0x00012776 nop |
0x00012778 asrs r2, r0, 0x15 | r2 = r0 >> 0x15;
0x0001277a movs r2, r0 | r2 = r0;
0x0001277c lsls r0, r2, 0x10 | r0 = r2 << 0x10;
0x0001277e movs r0, r0 |
0x00012780 asrs r0, r1, 0x12 | r0 = r1 >> 0x12;
0x00012782 movs r2, r0 | r2 = 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/debugfs @ 0x12784 */
| #include <stdint.h>
|
; (fcn) fcn.00012784 () | void fcn_00012784 (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_10h;
| int16_t var_14h;
| int16_t var_10h_2;
| int16_t var_14h_2;
| int16_t var_0h;
| int16_t var_ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x00012784 svcmi 0xf0e92d | __asm ("svcmi 0xf0e92d");
0x00012788 sub sp, 0x1c |
0x0001278a ldr r5, [pc, 0x264] |
0x0001278c ldr r3, [pc, 0x264] | r3 = *(0x129f4);
0x0001278e add r5, pc | r5 = 0x25184;
0x00012790 ldr r4, [pc, 0x264] |
0x00012792 ldr.w ip, [pc, 0x268] | ip = *(0x129fe);
0x00012796 ldr r3, [r5, r3] |
0x00012798 add r4, pc | r4 = 0x25194;
0x0001279a ldr r3, [r3] | r3 = *(0x25184);
0x0001279c str r3, [sp, 0x14] | var_14h_2 = r3;
0x0001279e mov.w r3, 0 | r3 = 0;
0x000127a2 ldr.w r3, [r4, ip] | r3 = *(0x25194);
0x000127a6 ldr r6, [r3] | r6 = *(0x25194);
0x000127a8 cbz r6, 0x127ca |
| while (r0 == 0) {
| label_0:
0x000127aa movs r4, 0 | r4 = 0;
| label_1:
0x000127ac ldr r2, [pc, 0x250] |
0x000127ae ldr r3, [pc, 0x244] | r3 = *(0x129f6);
0x000127b0 add r2, pc | r2 = 0x251b4;
0x000127b2 ldr r3, [r2, r3] | r3 = *(0x251b4);
0x000127b4 ldr r2, [r3] | r2 = *(0x251b4);
0x000127b6 ldr r3, [sp, 0x14] | r3 = var_14h;
0x000127b8 eors r2, r3 | r2 ^= r3;
0x000127ba mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x000127be bne.w 0x129ce | goto label_4;
| }
0x000127c2 mov r0, r4 | r0 = r4;
0x000127c4 add sp, 0x1c |
0x000127c6 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x000127ca mov r5, r2 | r5 = r2;
0x000127cc mov sb, r0 | sb = r0;
0x000127ce mov r7, r1 | r7 = r1;
0x000127d0 mov r2, r6 | r2 = r6;
0x000127d2 mov r1, r6 | r1 = r6;
0x000127d4 mov r0, r5 | r0 = r5;
0x000127d6 blx 0x5568 | r0 = ext2fs_read_inode2 ();
0x000127da cmp.w r0, -1 |
0x000127de mov r8, r0 | r8 = r0;
| if (r0 == -1) {
0x000127e0 beq.w 0x128f2 | goto label_5;
| }
0x000127e4 cmp r0, 0 |
0x000127e6 beq 0x127aa |
| }
0x000127e8 mov r0, sb | r0 = sb;
0x000127ea add.w sb, sp, 0x10 | sb += var_10h_2;
0x000127ee mov r2, sb | r2 = sb;
0x000127f0 mov r1, r7 | r1 = r7;
0x000127f2 blx 0x4ef4 | r0 = fcn_00004ef4 ();
0x000127f6 mov r4, r0 | r4 = r0;
| if (r0 == 0) {
0x000127f8 cbz r0, 0x12818 | goto label_6;
| }
0x000127fa movw r3, 0xb7a4 |
0x000127fe movt r3, 0x7f2b | r3 = 0x7f2bb7a4;
0x00012802 cmp r0, r3 |
| if (r0 == r3) {
0x00012804 beq 0x127aa | goto label_0;
| }
0x00012806 ldr r2, [pc, 0x1fc] |
0x00012808 mov r3, r7 | r3 = r7;
0x0001280a ldr r0, [pc, 0x1fc] |
0x0001280c mov r1, r4 | r1 = r4;
0x0001280e add r2, pc | r2 = 0x25218;
0x00012810 add r0, pc | r0 = 0x2521e;
0x00012812 blx 0x50d8 | fcn_000050d8 ();
0x00012816 b 0x127ac | goto label_1;
| label_6:
0x00012818 ldr r0, [sp, 0x10] | r0 = var_10h_2;
0x0001281a blx 0x4d34 | r0 = ext2fs_xattrs_read ();
0x0001281e mov r4, r0 | r4 = r0;
0x00012820 cmp r0, 0 |
| if (r0 != 0) {
0x00012822 bne 0x1290a | goto label_7;
| }
0x00012824 mov r0, r8 | r0 = r8;
0x00012826 blx 0x52bc | r0 = strerror (r0);
0x0001282a mov r6, r0 | r6 = r0;
0x0001282c cmp r0, 0 |
| if (r0 == 0) {
0x0001282e beq.w 0x1293e | goto label_8;
| }
0x00012832 mov r1, r0 | r1 = r0;
0x00012834 mov r2, r8 | r2 = r8;
0x00012836 mov r0, r5 | r0 = r5;
0x00012838 blx 0x5568 | r0 = ext2fs_read_inode2 ();
0x0001283c mov r3, r0 | r3 = r0;
0x0001283e str r0, [sp, 0xc] | var_ch = r0;
0x00012840 adds r0, r3, 1 | r0 = r3 + 1;
| if (r0 == r3) {
0x00012842 beq.w 0x129b6 | goto label_9;
| }
0x00012846 cmp r3, 0 |
| if (r3 > 0) {
0x00012848 bgt 0x12898 | goto label_10;
| }
0x0001284a b 0x1295c | goto label_11;
| do {
0x0001284c blx 0x52bc | r0 = strerror (r0);
0x00012850 mov r8, r0 | r8 = r0;
0x00012852 cmp r0, 0 |
| if (r0 == 0) {
0x00012854 beq.w 0x129d2 | goto label_12;
| }
0x00012858 mov r2, r0 | r2 = r0;
0x0001285a mov r3, r4 | r3 = r4;
0x0001285c mov r1, fp | r1 = fp;
0x0001285e mov r0, r5 | r0 = r5;
0x00012860 blx 0x55b0 | r0 = io_channel_write_blk64 ();
0x00012864 adds r2, r0, 1 | r2 = r0 + 1;
0x00012866 mov r3, r0 | r3 = r0;
| if (r2 == r0) {
0x00012868 beq.w 0x12982 | goto label_13;
| }
0x0001286c ldr r0, [sp, 0x10] | r0 = var_10h;
0x0001286e mov r2, r8 | r2 = r8;
0x00012870 mov r1, fp | r1 = fp;
0x00012872 blx 0x5710 | r0 = fcn_00005710 ();
0x00012876 mov r4, r0 | r4 = r0;
0x00012878 mov r0, r8 | r0 = r8;
0x0001287a blx 0x4ec4 | fcn_00004ec4 ();
0x0001287e cmp r4, 0 |
| if (r4 != 0) {
0x00012880 bne.w 0x129a2 | goto label_14;
| }
0x00012884 mov r0, fp | r0 = fp;
0x00012886 add.w sl, sl, 1 | sl++;
0x0001288a blx 0x537c | ext2fs_dir_iterate ();
0x0001288e ldr r3, [sp, 0xc] | r3 = var_ch;
0x00012890 add.w r4, sl, r0 | r4 = sl + r0;
0x00012894 cmp r3, r4 |
| if (r3 <= r4) {
0x00012896 ble 0x1295c | goto label_11;
| }
| label_10:
0x00012898 movs r3, 0 | r3 = 0;
0x0001289a add.w fp, r6, r4 |
0x0001289e mov r1, fp | r1 = fp;
0x000128a0 mov r2, r3 | r2 = r3;
0x000128a2 mov r0, r5 | r0 = r5;
0x000128a4 mov sl, r4 | sl = r4;
0x000128a6 blx 0x55b0 | r0 = io_channel_write_blk64 ();
0x000128aa adds r1, r0, 1 | r1 = r0 + 1;
0x000128ac mov r4, r0 | r4 = r0;
0x000128ae bne 0x1284c |
| } while (r1 != r0);
0x000128b0 blx 0x53f4 | sprintf_chk ()
0x000128b4 ldr r2, [pc, 0x154] |
0x000128b6 mov r3, fp | r3 = fp;
0x000128b8 ldr r4, [r0] | r4 = *(r0);
0x000128ba ldr r0, [pc, 0x154] |
0x000128bc add r2, pc | r2 = 0x252cc;
0x000128be str r5, [sp] | *(sp) = r5;
0x000128c0 mov r1, r4 | r1 = r4;
0x000128c2 add r0, pc | r0 = 0x252d8;
0x000128c4 blx 0x50d8 | fcn_000050d8 ();
| label_3:
0x000128c8 mov r0, r6 | r0 = r6;
0x000128ca blx 0x4ec4 | fcn_00004ec4 ();
0x000128ce mov r0, sb | r0 = sb;
0x000128d0 blx 0x5824 | fcn_00005824 ();
0x000128d2 vmlal.s32 q1, d8, d0 | __asm ("vmlal.s32 q1, d8, d0");
| if (r1 == r0) {
0x000128d6 beq.w 0x127ac | goto label_1;
| }
0x000128da mov r1, r4 | r1 = r4;
0x000128dc ldr r2, [pc, 0x134] |
0x000128de cmp r4, 0 |
0x000128e0 it eq |
| if (r4 != 0) {
0x000128e2 moveq r4, r0 | r4 = r0;
| }
0x000128e4 ldr r0, [pc, 0x130] |
0x000128e6 mov r3, r7 | r3 = r7;
0x000128e8 add r2, pc | r2 = 0x25300;
0x000128ea add r0, pc | r0 = 0x25306;
0x000128ec blx 0x50d8 | fcn_000050d8 ();
0x000128f0 b 0x127ac | goto label_1;
| label_5:
0x000128f2 blx 0x53f4 | sprintf_chk ()
0x000128f6 ldr r2, [pc, 0x124] |
0x000128f8 mov r3, r5 | r3 = r5;
0x000128fa ldr r4, [r0] | r4 = *(r0);
0x000128fc ldr r0, [pc, 0x120] |
0x000128fe add r2, pc | r2 = 0x25320;
0x00012900 mov r1, r4 | r1 = r4;
0x00012902 add r0, pc | r0 = 0x25326;
0x00012904 blx 0x50d8 | fcn_000050d8 ();
0x00012908 b 0x127ac | goto label_1;
| label_7:
0x0001290a ldr r2, [pc, 0x118] |
0x0001290c mov r3, r7 | r3 = r7;
0x0001290e ldr r0, [pc, 0x118] |
0x00012910 mov r1, r4 | r1 = r4;
0x00012912 add r2, pc | r2 = 0x2533c;
0x00012914 add r0, pc | r0 = 0x25342;
0x00012916 blx 0x50d8 | fcn_000050d8 ();
| label_2:
0x0001291a mov r0, r6 | r0 = r6;
0x0001291c blx 0x4ec4 | fcn_00004ec4 ();
0x00012920 mov r0, sb | r0 = sb;
0x00012922 blx 0x5824 | r0 = fcn_00005824 ();
0x00012926 cmp r0, 0 |
| if (r0 == 0) {
0x00012928 beq.w 0x127ac | goto label_1;
| }
0x0001292c ldr r2, [pc, 0xfc] |
0x0001292e mov r3, r7 | r3 = r7;
0x00012930 ldr r0, [pc, 0xfc] |
0x00012932 mov r1, r4 | r1 = r4;
0x00012934 add r2, pc | r2 = 0x25364;
0x00012936 add r0, pc | r0 = 0x2536a;
0x00012938 blx 0x50d8 | fcn_000050d8 ();
0x0001293c b 0x127ac | goto label_1;
| label_8:
0x0001293e ldr r2, [pc, 0xf4] |
0x00012940 movw r1, 0xb746 |
0x00012944 ldr r0, [pc, 0xf0] |
0x00012946 movt r1, 0x7f2b | r1 = 0x7f2bb746;
0x0001294a movw r4, 0xb746 |
0x0001294e add r2, pc | r2 = 0x25388;
0x00012950 movt r4, 0x7f2b | r4 = 0x7f2bb746;
0x00012954 add r0, pc | r0 = 0x25390;
0x00012956 blx 0x50d8 | fcn_000050d8 ();
0x0001295a b 0x1291a | goto label_2;
| label_11:
0x0001295c mov r0, r6 | r0 = r6;
0x0001295e blx 0x4ec4 | fcn_00004ec4 ();
0x00012962 mov r0, sb | r0 = sb;
0x00012964 blx 0x5824 | r0 = fcn_00005824 ();
0x00012968 mov r4, r0 | r4 = r0;
0x0001296a cmp r0, 0 |
| if (r0 == 0) {
0x0001296c beq.w 0x127ac | goto label_1;
| }
0x00012970 ldr r2, [pc, 0xc8] |
0x00012972 mov r3, r7 | r3 = r7;
0x00012974 ldr r0, [pc, 0xc8] |
0x00012976 movs r1, 0 | r1 = 0;
0x00012978 add r2, pc | r2 = 0x253b8;
0x0001297a add r0, pc | r0 = 0x253be;
0x0001297c blx 0x50d8 | fcn_000050d8 ();
0x00012980 b 0x127ac | goto label_1;
| label_13:
0x00012982 mov r0, r8 | r0 = r8;
0x00012984 blx 0x4ec4 | fcn_00004ec4 ();
0x00012988 blx 0x53f4 | sprintf_chk ()
0x0001298c ldr r2, [pc, 0xb4] |
0x0001298e mov r3, fp | r3 = fp;
0x00012990 ldr r4, [r0] | r4 = *(r0);
0x00012992 ldr r0, [pc, 0xb4] |
0x00012994 add r2, pc | r2 = 0x253dc;
0x00012996 str r5, [sp] | *(sp) = r5;
0x00012998 mov r1, r4 | r1 = r4;
0x0001299a add r0, pc | r0 = 0x253e8;
0x0001299c blx 0x50d8 | fcn_000050d8 ();
0x000129a0 b 0x128c8 | goto label_3;
| label_14:
0x000129a2 ldr r2, [pc, 0xa8] |
0x000129a4 mov r3, fp | r3 = fp;
0x000129a6 ldr r0, [pc, 0xa8] |
0x000129a8 mov r1, r4 | r1 = r4;
0x000129aa str r7, [sp] | *(sp) = r7;
0x000129ac add r2, pc | r2 = 0x253fe;
0x000129ae add r0, pc | r0 = 0x25404;
0x000129b0 blx 0x50d8 | fcn_000050d8 ();
0x000129b4 b 0x1291a | goto label_2;
| label_9:
0x000129b6 blx 0x53f4 | sprintf_chk ()
0x000129ba ldr r2, [pc, 0x98] |
0x000129bc mov r3, r5 | r3 = r5;
0x000129be ldr r4, [r0] | r4 = *(r0);
0x000129c0 ldr r0, [pc, 0x94] |
0x000129c2 add r2, pc | r2 = 0x2541c;
0x000129c4 mov r1, r4 | r1 = r4;
0x000129c6 add r0, pc | r0 = 0x25422;
0x000129c8 blx 0x50d8 | fcn_000050d8 ();
0x000129cc b 0x128c8 | goto label_3;
| label_4:
0x000129ce blx 0x5008 | fcn_00005008 ();
| label_12:
0x000129d2 ldr r2, [pc, 0x88] |
0x000129d4 movw r1, 0xb746 |
0x000129d8 ldr r0, [pc, 0x84] |
0x000129da movt r1, 0x7f2b | r1 = 0x7f2bb746;
0x000129de movw r4, 0xb746 |
0x000129e2 add r2, pc | r2 = 0x25444;
0x000129e4 movt r4, 0x7f2b | r4 = 0x7f2bb746;
0x000129e8 add r0, pc | r0 = 0x2544c;
0x000129ea blx 0x50d8 | fcn_000050d8 ();
0x000129ee b 0x1291a | goto label_2;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/debugfs @ 0x12d80 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.00012d80 () | void fcn_00012d80 (int16_t arg_28h, int16_t arg_2ch, int16_t arg_30h, int16_t arg_34h, int16_t arg_38h, int16_t arg_3ch, int16_t arg_40h, int16_t arg_50h, int16_t arg_54h, int16_t arg_58h, int16_t arg_5ch, int16_t arg_60h, int16_t arg_70h, int16_t arg_88h, int16_t arg_90h, int16_t arg_98h, int16_t arg_a0h, int16_t arg_ach, int16_t arg_aeh, int16_t arg_b4h, int16_t arg_b8h, int16_t arg_bch, int16_t arg_c4h, int16_t arg_c6h, int16_t arg_124h, int16_t arg_126h, int16_t arg_12ch, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_20h;
| int16_t var_24h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00012d80 push.w {r4, r5, r6, r7, r8, lr} |
0x00012d84 mov r5, r2 | r5 = r2;
0x00012d86 ldr r2, [pc, 0xd4] |
0x00012d88 mov r7, r3 | r7 = r3;
0x00012d8a sub sp, 0x10 |
0x00012d8c mov r4, r1 | r4 = r1;
0x00012d8e ldr r3, [pc, 0xd0] | r3 = *(0x12e62);
0x00012d90 mov r6, r0 | r6 = r0;
0x00012d92 add r2, pc | r2 = 0x25bf4;
0x00012d94 movs r1, 0x2f | r1 = 0x2f;
0x00012d96 mov r0, r5 | r0 = r5;
0x00012d98 ldr r3, [r2, r3] |
0x00012d9a ldr r3, [r3] | r3 = *(0x25bf4);
0x00012d9c str r3, [sp, 0xc] | var_ch = r3;
0x00012d9e mov.w r3, 0 | r3 = 0;
0x00012da2 blx 0x567c | r0 = ext2fs_fallocate ();
| if (r0 == 0) {
0x00012da6 cbz r0, 0x12e02 | goto label_19;
| }
0x00012da8 movs r3, 0 | r3 = 0;
0x00012daa mov r2, r4 | r2 = r4;
0x00012dac strb r3, [r0] | *(r0) = r3;
0x00012dae add r3, sp, 8 | r3 += var_8h;
0x00012db0 str r3, [sp] | *(sp) = r3;
0x00012db2 mov r8, r0 | r8 = r0;
0x00012db4 mov r1, r7 | r1 = r7;
0x00012db6 mov r3, r5 | r3 = r5;
0x00012db8 mov r0, r6 | r0 = r6;
0x00012dba blx 0x4f3c | r0 = fcn_00004f3c ();
0x00012dbe mov r4, r0 | r4 = r0;
0x00012dc0 cmp r0, 0 |
| if (r0 != 0) {
0x00012dc2 bne 0x12e34 | goto label_20;
| }
0x00012dc4 ldr r4, [sp, 8] | r4 = var_8h;
0x00012dc6 add.w r5, r8, 1 | r5 = r8 + 1;
| do {
0x00012dca mov r3, r5 | r3 = r5;
0x00012dcc mov r1, r4 | r1 = r4;
0x00012dce movs r2, 0 | r2 = 0;
0x00012dd0 mov r0, r6 | r0 = r6;
0x00012dd2 blx 0x55a4 | ext2fs_close_free ();
0x00012dd6 movw r3, 0xb726 |
0x00012dda mov r4, r0 | r4 = r0;
0x00012ddc movt r3, 0x7f2b | r3 = 0x7f2bb726;
0x00012de0 cmp r0, r3 |
| if (r0 == r3) {
0x00012de2 beq 0x12e18 | goto label_21;
| }
| if (r4 != 0) {
| label_1:
0x00012de4 cbnz r4, 0x12e06 | goto label_22;
| }
| label_0:
0x00012de6 ldr r2, [pc, 0x7c] |
0x00012de8 ldr r3, [pc, 0x74] | r3 = *(0x12e60);
0x00012dea add r2, pc | r2 = 0x25c54;
0x00012dec ldr r3, [r2, r3] | r3 = *(0x25c54);
0x00012dee ldr r2, [r3] | r2 = *(0x25c54);
0x00012df0 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00012df2 eors r2, r3 | r2 ^= r3;
0x00012df4 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00012df8 bne 0x12e56 | goto label_23;
| }
0x00012dfa mov r0, r4 | r0 = r4;
0x00012dfc add sp, 0x10 |
0x00012dfe pop.w {r4, r5, r6, r7, r8, pc} |
| label_19:
0x00012e02 str r4, [sp, 8] | var_8h = r4;
0x00012e04 b 0x12dca |
| } while (1);
| label_22:
0x00012e06 ldr r2, [pc, 0x60] |
0x00012e08 mov r3, r5 | r3 = r5;
0x00012e0a ldr r0, [pc, 0x60] |
0x00012e0c mov r1, r4 | r1 = r4;
0x00012e0e add r2, pc | r2 = 0x25c7c;
0x00012e10 add r0, pc | r0 = 0x25c82;
0x00012e12 blx 0x50d8 | fcn_000050d8 ();
0x00012e16 b 0x12de6 | goto label_0;
| label_21:
0x00012e18 ldr r1, [sp, 8] | r1 = var_8h;
0x00012e1a mov r0, r6 | r0 = r6;
0x00012e1c blx 0x53e8 | r0 = strcat_chk ();
0x00012e20 mov r4, r0 | r4 = r0;
| if (r0 == 0) {
0x00012e22 cbnz r0, 0x12e44 |
0x00012e24 mov r2, r0 | r2 = r0;
0x00012e26 ldr r1, [sp, 8] | r1 = var_8h;
0x00012e28 mov r3, r5 | r3 = r5;
0x00012e2a mov r0, r6 | r0 = r6;
0x00012e2c blx 0x55a4 | r0 = ext2fs_close_free ();
0x00012e30 mov r4, r0 | r4 = r0;
0x00012e32 b 0x12de4 | goto label_1;
| label_20:
0x00012e34 ldr r2, [pc, 0x38] |
0x00012e36 mov r1, r0 | r1 = r0;
0x00012e38 mov r3, r5 | r3 = r5;
0x00012e3a mov r0, r5 | r0 = r5;
0x00012e3c add r2, pc | r2 = 0x25cb0;
0x00012e3e blx 0x50d8 | fcn_000050d8 ();
0x00012e42 b 0x12de6 | goto label_0;
| }
0x00012e44 ldr r0, [pc, 0x2c] |
0x00012e46 mov r1, r4 | r1 = r4;
0x00012e48 ldr r2, [pc, 0x2c] |
0x00012e4a add r0, pc | r0 = 0x25cc2;
0x00012e4c add r2, pc | r2 = 0x25cc8;
0x00012e4e adds r0, 0x24 | r0 += 0x24;
0x00012e50 blx 0x50d8 | fcn_000050d8 ();
0x00012e54 b 0x12de6 | goto label_0;
| label_23:
0x00012e56 blx 0x5008 | fcn_00005008 ();
0x00012e5a nop |
0x00012e5c lsrs r2, r1, 0x18 | r2 = r1 >> 0x18;
0x00012e5e movs r2, r0 | r2 = r0;
0x00012e60 lsls r0, r2, 0x10 | r0 = r2 << 0x10;
0x00012e62 movs r0, r0 |
0x00012e64 lsrs r2, r6, 0x16 | r2 = r6 >> 0x16;
0x00012e66 movs r2, r0 | r2 = r0;
0x00012e68 b 0x134f8 | goto label_24;
| do {
0x000133fc ldrb r3, [r5, 1] | r3 = *((r5 + 1));
| if (r3 != 0) {
0x000133fe cbnz r3, 0x13422 | goto label_25;
| }
| label_2:
0x00013400 blx 0x4ec4 | fcn_00004ec4 ();
0x00013404 ldr r3, [sp, 0x18] | r3 = var_18h;
0x00013406 adds r4, 1 | r4++;
0x00013408 cmp r3, r4 |
| if (r3 == r4) {
0x0001340a beq.w 0x13726 | goto label_26;
| }
| label_4:
0x0001340e ldr r3, [sp, 0x38] | r3 = *(arg_38h);
0x00013410 lsls r2, r4, 2 | r2 = r4 << 2;
0x00013412 str r2, [sp, 0x14] | var_14h = r2;
0x00013414 ldr.w r0, [r3, r4, lsl 2] | offset_0 = r4 << 2;
| r0 = *((r3 + offset_0));
0x00013418 ldrb r3, [r0, 0x13] | r3 = *((r0 + 0x13));
0x0001341a add.w r5, r0, 0x13 | r5 = r0 + 0x13;
0x0001341e cmp r3, 0x2e |
0x00013420 beq 0x133fc |
| } while (r3 == 0x2e);
| label_25:
0x00013422 ldrb r3, [r5] | r3 = *(r5);
0x00013424 cmp r3, 0x2e |
| if (r3 != 0x2e) {
0x00013426 bne 0x13434 | goto label_27;
| }
0x00013428 ldrb r3, [r5, 1] | r3 = *((r5 + 1));
0x0001342a cmp r3, 0x2e |
| if (r3 != 0x2e) {
0x0001342c bne 0x13434 | goto label_27;
| }
0x0001342e ldrb r3, [r5, 2] | r3 = *((r5 + 2));
0x00013430 cmp r3, 0 |
| if (r3 == 0) {
0x00013432 beq 0x13400 | goto label_2;
| }
| label_27:
0x00013434 add r1, sp, 0x40 | r1 += arg_40h;
0x00013436 mov r0, r5 | r0 = r5;
0x00013438 blx 0x4f48 | r0 = fcn_00004f48 ();
0x0001343c cmp r0, 0 |
| if (r0 != 0) {
0x0001343e bne.w 0x139fe | goto label_28;
| }
0x00013442 ldr r3, [sp, 0x50] | r3 = *(arg_50h);
0x00013444 and r3, r3, 0xf000 | r3 &= 0xf000;
0x00013448 cmp.w r3, 0x4000 |
0x0001344c it ne |
| if (r3 != 0x4000) {
0x0001344e cmpne r3, 0xa000 | __asm ("cmpne r3, 0xa000");
| }
0x00013452 ite ne |
| if (r3 == 0x4000) {
0x00013454 movne r3, 1 | r3 = 1;
| }
| if (r3 != 0x4000) {
0x00013456 moveq r3, 0 | r3 = 0;
| }
| if (r3 == 0x4000) {
0x00013458 beq.w 0x13568 | goto label_29;
| }
0x0001345c ldr r3, [sp, 0x54] | r3 = *(arg_54h);
0x0001345e cmp r3, 1 |
| if (r3 < 1) {
0x00013460 bls.w 0x13802 | goto label_30;
| }
0x00013464 ldr r3, [sp, 0x24] | r3 = var_24h;
0x00013466 ldrd r7, r2, [sp, 0x40] | __asm ("ldrd r7, r2, [arg_40h]");
0x0001346a ldrd r1, r8, [sp, 0xa0] | __asm ("ldrd r1, r8, [arg_a0h]");
0x0001346e ldr r6, [r3] | r6 = *(r3);
0x00013470 cmp r6, 0 |
| if (r6 <= 0) {
0x00013472 ble 0x13566 | goto label_31;
| }
0x00013474 ldr r3, [r3, 8] | r3 = *((r3 + 8));
0x00013476 mov lr, r5 | lr = r5;
0x00013478 mov ip, r4 |
0x0001347a b 0x13486 |
| while (r2 != r4) {
| label_3:
0x0001347c adds r0, 1 | r0++;
0x0001347e adds r3, 0x18 | r3 += 0x18;
0x00013480 cmp r0, r6 |
| if (r0 == r6) {
0x00013482 beq.w 0x137f8 | goto label_32;
| }
0x00013484 strh r1, [r7, 0xc] | *((r7 + 0xc)) = r1;
0x00013486 ldrd r5, r4, [r3] | __asm ("ldrd r5, r4, [r3]");
0x0001348a cmp r2, r4 |
0x0001348c it eq |
| if (r2 == r4) {
0x0001348e cmpeq r7, r5 | __asm ("cmpeq r7, r5");
| }
0x00013490 bne 0x1347c |
| }
0x00013492 ldrd r5, r4, [r3, 8] | __asm ("ldrd r5, r4, [r3, 8]");
0x00013496 cmp r8, r4 |
0x00013498 it eq |
| if (r8 != r4) {
0x0001349a cmpeq r1, r5 | __asm ("cmpeq r1, r5");
| goto label_33;
| }
| if (r8 != r4) {
| label_33:
0x0001349c bne 0x1347c | goto label_3;
| }
0x0001349e ldr r6, [r3, 0x10] | r6 = *((r3 + 0x10));
0x000134a0 add r7, sp, 0xac | r7 += arg_ach;
0x000134a2 mov r2, r7 | r2 = r7;
0x000134a4 mov r0, fp | r0 = fp;
0x000134a6 mov r5, lr | r5 = lr;
0x000134a8 mov r4, ip | r4 = ip;
0x000134aa mov r1, r6 | r1 = r6;
0x000134ac blx 0x4d58 | r0 = ext2fs_read_inode ();
0x000134b0 mov r3, r0 | r3 = r0;
0x000134b2 cmp r0, 0 |
| if (r0 != 0) {
0x000134b4 bne.w 0x139ca | goto label_34;
| }
0x000134b8 ldrh.w r2, [sp, 0xac] | r2 = *(arg_ach);
0x000134bc and r2, r2, 0xf000 | r2 &= 0xf000;
0x000134c0 cmp.w r2, 0x8000 |
0x000134c4 it eq |
| if (r2 != 0x8000) {
0x000134c6 moveq r3, 1 | r3 = 1;
| }
| if (r2 != 0x8000) {
0x000134c8 beq 0x134fa |
0x000134ca cmp.w r2, 0x4000 |
| if (r2 == 0x4000) {
0x000134ce beq.w 0x13a1a | goto label_35;
| }
0x000134d2 cmp.w r2, 0x2000 |
| if (r2 == 0x2000) {
0x000134d6 beq.w 0x13a7e | goto label_36;
| }
0x000134da cmp.w r2, 0x6000 |
| if (r2 == 0x6000) {
0x000134de beq.w 0x13a82 | goto label_37;
| }
0x000134e2 cmp.w r2, 0xa000 |
| if (r2 == 0xa000) {
0x000134e6 beq.w 0x13a86 | goto label_38;
| }
0x000134ea cmp.w r2, 0x1000 |
| if (r2 == 0x1000) {
0x000134ee beq.w 0x13a8a | goto label_39;
| }
0x000134f2 cmp.w r2, 0xc000 |
0x000134f6 it eq |
| if (r2 == 0xc000) {
| label_24:
0x000134f8 moveq r3, 6 | r3 = 6;
| goto label_17;
| }
| }
| label_17:
0x000134fa mov r2, r5 | r2 = r5;
0x000134fc str r3, [sp] | *(sp) = r3;
0x000134fe mov r1, sb | r1 = sb;
0x00013500 mov r3, r6 | r3 = r6;
0x00013502 mov r0, fp | r0 = fp;
0x00013504 blx 0x577c | fcn_0000577c ();
0x00013508 ldr r2, [sp, 0x30] | r2 = *(arg_30h);
0x0001350a mov r3, r0 | r3 = r0;
0x0001350c cmp r0, r2 |
| if (r0 == r2) {
0x0001350e beq.w 0x13942 | goto label_40;
| }
0x00013512 cmp r3, 0 |
| if (r3 != 0) {
0x00013514 bne.w 0x1392a | goto label_15;
| }
| label_14:
0x00013518 ldrh.w r3, [sp, 0xc6] | r3 = *(arg_c6h);
0x0001351c mov r2, r7 | r2 = r7;
0x0001351e mov r1, r6 | r1 = r6;
0x00013520 mov r0, fp | r0 = fp;
0x00013522 adds r3, 1 | r3++;
0x00013524 strh.w r3, [sp, 0xc6] | *(arg_c6h) = r3;
0x00013528 blx 0x555c | r0 = ext2fs_file_llseek ();
0x0001352c cmp r0, 0 |
| if (r0 != 0) {
0x0001352e beq.w 0x13712 |
0x00013532 mov r8, r6 | r8 = r6;
0x00013534 mov r6, r0 | r6 = r0;
0x00013536 ldr.w r0, [pc, 0x644] |
0x0001353a mov r3, r8 | r3 = r8;
0x0001353c ldr.w r2, [pc, 0x640] |
0x00013540 mov r1, r6 | r1 = r6;
0x00013542 ldr r7, [sp, 0x18] | r7 = var_18h;
0x00013544 add r0, pc | r0 = 0x270c6;
0x00013546 adds r0, 0x5c | r0 += 0x5c;
0x00013548 add r2, pc | r2 = 0x270cc;
0x0001354a blx 0x50d8 | fcn_000050d8 ();
| label_13:
0x0001354e ldr.w r0, [pc, 0x634] |
0x00013552 mov r3, r5 | r3 = r5;
0x00013554 ldr.w r2, [pc, 0x630] | r2 = *(0x13b88);
0x00013558 mov r1, r6 | r1 = r6;
0x0001355a add r0, pc | r0 = 0x270e4;
0x0001355c adds r0, 0x4c | r0 += 0x4c;
0x0001355e add r2, pc | r2 += pc;
0x00013560 blx 0x50d8 | fcn_000050d8 ();
0x00013562 ldc p1, c14, [sl, 0x190]! | __asm ("ldc p1, c14, [sl, 0x190]!");
| label_31:
0x00013566 movs r3, 1 | r3 = 1;
| label_29:
0x00013568 str r3, [sp, 0x28] | *(arg_28h) = r3;
| label_9:
0x0001356a ldr.w r7, [sl, 4] | r7 = *((sl + 4));
0x0001356e mov r0, r5 | r0 = r5;
0x00013570 blx 0x537c | ext2fs_dir_iterate ();
0x00013574 ldr.w r1, [sl, 8] | r1 = *((sl + 8));
0x00013578 adds r2, r7, 1 | r2 = r7 + 1;
0x0001357a ldr.w r3, [sl] | r3 = *(sl);
0x0001357e add r2, r0 | r2 += r0;
0x00013580 cmp r2, r1 |
| if (r2 < r1) {
0x00013582 bls.w 0x137f4 | goto label_41;
| }
0x00013586 lsls r1, r1, 1 | r1 <<= 1;
0x00013588 mov r0, r3 | r0 = r3;
0x0001358a str.w r1, [sl, 8] | __asm ("str.w r1, [sl, 8]");
0x0001358e blx 0x5074 | r0 = fcn_00005074 ();
0x00013592 mov r3, r0 | r3 = r0;
0x00013594 cmp r0, 0 |
| if (r0 == 0) {
0x00013596 beq.w 0x13b2c | goto label_42;
| }
0x0001359a str.w r0, [sl] | __asm ("str.w r0, [sl]");
0x0001359e ldr.w r0, [sl, 4] | r0 = *((sl + 4));
| label_8:
0x000135a2 add r0, r3 | r0 += r3;
0x000135a4 ldr.w r3, [pc, 0x5e4] |
0x000135a8 mov.w r2, -1 | r2 = -1;
0x000135ac movs r1, 1 | r1 = 1;
0x000135ae str r5, [sp] | *(sp) = r5;
0x000135b0 add r3, pc | r3 = 0x27140;
0x000135b2 blx 0x540c | mkdir ();
0x000135b6 ldr.w r3, [sl, 4] | r3 = *((sl + 4));
0x000135ba add r3, r0 | r3 += r0;
0x000135bc str.w r3, [sl, 4] | __asm ("str.w r3, [sl, 4]");
0x000135c0 ldr r3, [sp, 0x1c] | r3 = var_1ch;
| if (r3 != 0) {
0x000135c2 cbz r3, 0x135ea |
0x000135c4 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x000135c6 ldr r6, [r3] | r6 = *(r3);
0x000135c8 ldr r3, [sp, 0x50] | r3 = *(arg_50h);
| if (r6 == 0) {
0x000135ca cbz r6, 0x135ec | goto label_43;
| }
0x000135cc and r3, r3, 0xf000 | r3 &= 0xf000;
0x000135d0 mov r2, r5 | r2 = r5;
0x000135d2 str r3, [sp, 4] | var_4h = r3;
0x000135d4 mov r0, fp | r0 = fp;
0x000135d6 ldr r3, [sp, 0x20] | r3 = var_20h;
0x000135d8 str r3, [sp] | *(sp) = r3;
0x000135da mov r3, sb | r3 = sb;
0x000135dc ldr.w r1, [sl] | r1 = *(sl);
0x000135de asrs r0, r0, 0x20 | r0 >>= 0x20;
0x000135e0 blx r6 | r0 = uint32_t (*r6)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x000135e2 mov r3, r0 | r3 = r0;
0x000135e4 cmp r0, 0 |
| if (r0 != 0) {
0x000135e6 bne.w 0x13a4c | goto label_44;
| }
| }
0x000135ea ldr r3, [sp, 0x50] | r3 = *(arg_50h);
| label_43:
0x000135ec and r2, r3, 0xf000 | r2 = r3 & 0xf000;
0x000135f0 cmp.w r2, 0x8000 |
| if (r2 == 0x8000) {
0x000135f4 beq.w 0x13862 | goto label_45;
| }
0x000135f6 strh r5, [r6, 8] | *((r6 + 8)) = r5;
| if (r2 > 0x8000) {
0x000135f8 bhi.w 0x13760 | goto label_46;
| }
0x000135fc cmp.w r2, 0x4000 |
| if (r2 == 0x4000) {
0x00013600 beq.w 0x1388e | goto label_47;
| }
| if (r2 < 0x4000) {
0x00013604 bls.w 0x13750 | goto label_48;
| }
0x00013608 cmp.w r2, 0x6000 |
| if (r2 == 0x6000) {
0x0001360c beq.w 0x137ca | goto label_49;
| }
| label_5:
0x00013610 ldr.w r2, [pc, 0x57c] | r2 = fcn.0000dd14;
0x00013614 mov r3, r5 | r3 = r5;
0x00013616 ldr r0, [sp, 0x2c] | r0 = *(arg_2ch);
0x00013618 movs r1, 0 | r1 = 0;
0x0001361a add r6, sp, 0x3c | r6 += arg_3ch;
0x0001361c add r2, pc | r2 += pc;
0x0001361e blx 0x50d8 | fcn_000050d8 ();
| label_6:
0x00013622 ldr r1, [sp, 0x20] | r1 = var_20h;
0x00013624 mov r3, r5 | r3 = r5;
0x00013626 mov r2, sb | r2 = sb;
0x00013628 mov r0, fp | r0 = fp;
0x0001362a str r6, [sp] | *(sp) = r6;
0x0001362c blx 0x4f3c | r0 = fcn_00004f3c ();
0x00013630 cmp r0, 0 |
| if (r0 != 0) {
0x00013632 bne.w 0x13a52 | goto label_50;
| }
0x00013636 ldr r6, [sp, 0x3c] | r6 = *(arg_3ch);
0x00013638 add.w r8, sp, 0xac | r8 += arg_ach;
0x0001363c mov r2, r8 | r2 = r8;
0x0001363e mov r0, fp | r0 = fp;
0x00013640 mov r1, r6 | r1 = r6;
0x00013642 blx 0x4d58 | r0 = ext2fs_read_inode ();
0x00013646 cmp r0, 0 |
| if (r0 != 0) {
0x00013648 bne.w 0x13806 | goto label_51;
| }
0x0001364c ldr r3, [sp, 0x58] | r3 = *(arg_58h);
0x0001364e mov r2, r8 | r2 = r8;
0x00013650 ldr r1, [sp, 0x50] | r1 = *(arg_50h);
0x00013652 mov r0, fp | r0 = fp;
0x00013654 strh.w r3, [sp, 0xae] | *(arg_aeh) = r3;
0x00013658 lsrs r3, r3, 0x10 | r3 >>= 0x10;
0x0001365a ubfx r1, r1, 0, 0xc | r1 = (r1 >> 0) & ((1 << 0xc) - 1);
0x0001365e strh.w r3, [sp, 0x124] | *(arg_124h) = r3;
0x00013662 ldr r3, [sp, 0x5c] | r3 = *(arg_5ch);
0x00013664 strh.w r3, [sp, 0xc4] | *(arg_c4h) = r3;
0x00013668 lsrs r3, r3, 0x10 | r3 >>= 0x10;
0x0001366a strh.w r3, [sp, 0x126] | *(arg_126h) = r3;
0x0001366e ldrh.w r3, [sp, 0xac] | r3 = *(arg_ach);
0x00013672 bic r3, r3, 0xff0 | r3 = BIT_MASK (r3, 0xff0);
0x00013676 bic r3, r3, 0xf | r3 = BIT_MASK (r3, 0xf);
0x0001367a orrs r3, r1 | r3 |= r1;
0x0001367c mov r1, r6 | r1 = r6;
0x0001367e strh.w r3, [sp, 0xac] | *(arg_ach) = r3;
0x00013682 ldr r3, [sp, 0x88] | r3 = *(arg_88h);
0x00013684 str r3, [sp, 0xb4] | *(arg_b4h) = r3;
0x00013686 ldr r3, [sp, 0x90] | r3 = *(arg_90h);
0x00013688 str r3, [sp, 0xbc] | *(arg_bch) = r3;
0x0001368a ldr r3, [sp, 0x98] | r3 = *(arg_98h);
0x0001368c str r3, [sp, 0xb8] | *(arg_b8h) = r3;
0x0001368e blx 0x555c | r0 = ext2fs_file_llseek ();
0x00013692 cmp r0, 0 |
| if (r0 != 0) {
0x00013694 bne.w 0x13848 | goto label_52;
| }
0x00013698 ldr r1, [sp, 0x3c] | r1 = *(arg_3ch);
0x0001369a mov r2, r5 | r2 = r5;
0x0001369c mov r0, fp | r0 = fp;
0x0001369e bl 0x12784 | r0 = fcn_00012784 (r0, r1, r2);
0x000136a2 cmp r0, 0 |
| if (r0 != 0) {
0x000136a4 bne.w 0x13a66 | goto label_53;
| }
0x000136a8 ldr r3, [sp, 0x1c] | r3 = var_1ch;
| if (r3 != 0) {
0x000136aa cbz r3, 0x136d2 |
0x000136ac ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x000136ae ldr r6, [r3, 4] | r6 = *((r3 + 4));
| if (r6 == 0) {
0x000136b0 cbz r6, 0x136d2 | goto label_54;
| }
0x000136b2 ldr r3, [sp, 0x20] | r3 = var_20h;
0x000136b4 mov r2, r5 | r2 = r5;
0x000136b6 mov r0, fp | r0 = fp;
0x000136b8 str r3, [sp] | *(sp) = r3;
0x000136ba ldr r3, [sp, 0x50] | r3 = *(arg_50h);
0x000136bc and r3, r3, 0xf000 | r3 &= 0xf000;
0x000136c0 str r3, [sp, 4] | var_4h = r3;
0x000136c2 mov r3, sb | r3 = sb;
0x000136c4 ldr.w r1, [sl] | r1 = *(sl);
0x000136c8 blx r6 | r0 = uint32_t (*r6)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x000136ca mov r3, r0 | r3 = r0;
0x000136cc cmp r0, 0 |
| if (r0 != 0) {
0x000136ce bne.w 0x13a4c | goto label_44;
| }
| }
| label_54:
0x000136d2 ldr r3, [sp, 0x28] | r3 = *(arg_28h);
| if (r3 != 0) {
0x000136d4 cbz r3, 0x13706 |
0x000136d6 ldr r1, [sp, 0x24] | r1 = var_24h;
0x000136d8 ldrd r3, r2, [r1] | __asm ("ldrd r3, r2, [r1]");
0x000136dc ldr r0, [r1, 8] | r0 = *((r1 + 8));
0x000136de cmp r3, r2 |
| if (r3 == r2) {
0x000136e0 beq.w 0x139aa | goto label_55;
| }
| label_16:
0x000136e4 add.w r2, r3, r3, lsl 1 | r2 = r3 + (r3 << 1);
0x000136e8 ldr r1, [sp, 0x3c] | r1 = *(arg_3ch);
0x000136ea vldr d16, [sp, 0xa0] | __asm ("vldr d16, [sp, 0xa0]");
0x000136ee adds r3, 1 | r3++;
0x000136f0 add.w r2, r0, r2, lsl 3 | r2 = r0 + (r2 << 3);
0x000136f4 str r1, [r2, 0x10] | *((r2 + 0x10)) = r1;
0x000136f6 ldrd r0, r1, [sp, 0x40] | __asm ("ldrd r0, r1, [arg_40h]");
0x000136fa vstr d16, [r2, 8] | __asm ("vstr d16, [r2, 8]");
0x000136fe strd r0, r1, [r2] | __asm ("strd r0, r1, [r2]");
0x00013702 ldr r2, [sp, 0x24] | r2 = var_24h;
0x00013704 str r3, [r2] | *(r2) = r3;
| }
0x00013706 ldr.w r3, [sl] | r3 = *(sl);
0x0001370a movs r2, 0 | r2 = 0;
0x0001370c str.w r7, [sl, 4] | __asm ("str.w r7, [sl, 4]");
0x00013710 strb r2, [r3, r7] | *((r3 + r7)) = r2;
| }
0x00013712 ldr r3, [sp, 0x38] | r3 = *(arg_38h);
0x00013714 adds r4, 1 | r4++;
0x00013716 ldr r2, [sp, 0x14] | r2 = var_14h;
0x00013718 ldr r0, [r3, r2] | r0 = *((r3 + r2));
0x0001371a blx 0x4ec4 | fcn_00004ec4 ();
0x0001371e ldr r3, [sp, 0x18] | r3 = var_18h;
0x00013720 cmp r3, r4 |
| if (r3 != r4) {
0x00013722 bne.w 0x1340e | goto label_4;
| }
| label_26:
0x00013726 movs r6, 0 | r6 = 0;
| label_10:
0x00013728 ldr r0, [sp, 0x38] | r0 = *(arg_38h);
0x0001372a blx 0x4ec4 | fcn_00004ec4 ();
0x0001372e ldr.w r2, [pc, 0x464] |
0x00013732 ldr.w r3, [pc, 0x434] | r3 = *(0x13b6a);
0x00013736 add r2, pc | r2 = 0x272d0;
0x00013738 ldr r3, [r2, r3] | r3 = *(0x272d0);
0x0001373a ldr r2, [r3] | r2 = *(0x272d0);
0x0001373c ldr r3, [sp, 0x12c] | r3 = *(arg_12ch);
0x0001373e eors r2, r3 | r2 ^= r3;
0x00013740 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00013744 bne.w 0x13b0a | goto label_56;
| }
0x00013748 mov r0, r6 | r0 = r6;
0x0001374a add sp, 0x134 |
0x0001374c pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_48:
0x00013750 sub.w r2, r2, 0x1000 | r2 -= 0x1000;
0x00013754 bic r2, r2, 0x1000 | r2 = BIT_MASK (r2, 0x1000);
0x00013758 cmp r2, 0 |
| if (r2 != 0) {
0x0001375a bne.w 0x13610 | goto label_5;
| }
0x0001375e b 0x137ca | goto label_49;
| label_46:
0x00013760 cmp.w r2, 0xa000 |
| if (r2 == 0xa000) {
0x00013764 bne 0x137c2 |
0x00013766 ldr r2, [sp, 0x70] | r2 = *(arg_70h);
0x00013768 add.w r8, r2, 1 | r8 = r2 + 1;
0x0001376c mov r0, r8 | r0 = r8;
0x0001376e blx 0x52bc | r0 = strerror (r0);
0x00013772 mov r6, r0 | r6 = r0;
0x00013774 cmp r0, 0 |
| if (r0 == 0) {
0x00013776 beq.w 0x13b50 | goto label_57;
| }
0x0001377a mov r1, r0 | r1 = r0;
0x0001377c mov r2, r8 | r2 = r8;
0x0001377e mov r0, r5 | r0 = r5;
0x00013780 blx 0x5120 | r0 = fcn_00005120 ();
0x00013784 adds r3, r0, 1 | r3 = r0 + 1;
| if (r3 == r0) {
0x00013786 beq.w 0x13aaa | goto label_58;
| }
0x0001378a ldrd r1, r2, [sp, 0x70] | __asm ("ldrd r1, r2, [arg_70h]");
0x0001378e asrs r3, r0, 0x1f | r3 = r0 >> 0x1f;
0x00013790 cmp r1, r0 |
0x00013792 sbcs.w r3, r2, r3 | __asm ("sbcs.w r3, r2, r3");
| if (r1 < r0) {
0x00013796 blt.w 0x13a8e | goto label_59;
| }
0x0001379a movs r3, 0 | r3 = 0;
0x0001379c mov r2, r5 | r2 = r5;
0x0001379e strb r3, [r6, r0] | *((r6 + r0)) = r3;
0x000137a0 mov r1, sb | r1 = sb;
0x000137a2 ldr r3, [sp, 0x20] | r3 = var_20h;
0x000137a4 mov r0, fp | r0 = fp;
0x000137a6 str r3, [sp] | *(sp) = r3;
0x000137a8 mov r3, r6 | r3 = r6;
0x000137aa bl 0x12c88 | fcn_00012c88 (r0, r1, r2, r3, r4);
0x000137ae str r0, [sp, 0x34] | *(arg_34h) = r0;
0x000137b0 mov r0, r6 | r0 = r6;
0x000137b2 blx 0x4ec4 | fcn_00004ec4 ();
0x000137b6 ldr r3, [sp, 0x34] | r3 = *(arg_34h);
0x000137b8 cmp r3, 0 |
| if (r3 != 0) {
0x000137ba bne.w 0x13a34 | goto label_60;
| }
| label_7:
0x000137be add r6, sp, 0x3c | r6 += arg_3ch;
0x000137c0 b 0x13622 | goto label_6;
| }
0x000137c2 cmp.w r2, 0xc000 |
| if (r2 != 0xc000) {
0x000137c6 bne.w 0x13610 | goto label_5;
| }
| label_49:
0x000137ca ldr r2, [sp, 0x60] | r2 = *(arg_60h);
0x000137cc mov r1, sb | r1 = sb;
0x000137ce mov r0, fp | r0 = fp;
0x000137d0 str r2, [sp] | *(sp) = r2;
0x000137d2 mov r2, r5 | r2 = r5;
0x000137d4 bl 0x12a64 | r0 = fcn_00012a64 (r0, r1, r2, r3, r4);
0x000137d8 cmp r0, 0 |
| if (r0 == 0) {
0x000137da beq 0x137be | goto label_7;
| }
0x000137dc mov r6, r0 | r6 = r0;
0x000137de ldr r0, [pc, 0x3b8] |
0x000137e0 ldr r2, [pc, 0x3b8] |
0x000137e2 mov r3, r5 | r3 = r5;
0x000137e4 mov r1, r6 | r1 = r6;
0x000137e6 ldr r7, [sp, 0x18] | r7 = var_18h;
0x000137e8 add r0, pc | r0 = 0x27386;
0x000137ea adds r0, 0x4c | r0 += 0x4c;
0x000137ec add r2, pc | r2 = 0x2738c;
0x000137ee blx 0x50d8 | fcn_000050d8 ();
0x000137f2 b 0x13830 | goto label_12;
| label_41:
0x000137f4 mov r0, r7 | r0 = r7;
0x000137f6 b 0x135a2 | goto label_8;
| label_32:
0x000137f8 movs r3, 1 | r3 = 1;
0x000137fa mov r5, lr | r5 = lr;
0x000137fc mov r4, ip | r4 = ip;
0x000137fe str r3, [sp, 0x28] | *(arg_28h) = r3;
0x00013800 b 0x1356a | goto label_9;
| label_30:
0x00013802 str r0, [sp, 0x28] | *(arg_28h) = r0;
0x00013804 b 0x1356a | goto label_9;
| label_51:
0x00013806 mov sb, r6 | sb = r6;
0x00013808 mov r6, r0 | r6 = r0;
0x0001380a ldr r0, [pc, 0x394] |
0x0001380c mov r3, sb | r3 = sb;
0x0001380e ldr r2, [pc, 0x394] |
0x00013810 mov r1, r6 | r1 = r6;
0x00013812 ldr r7, [sp, 0x18] | r7 = var_18h;
0x00013814 add r0, pc | r0 = 0x273ba;
0x00013816 adds r0, 0x68 | r0 += 0x68;
0x00013818 add r2, pc | r2 = 0x273c2;
0x0001381a blx 0x50d8 | fcn_000050d8 ();
| label_11:
0x0001381e ldr r0, [pc, 0x388] |
0x00013820 mov r3, r5 | r3 = r5;
0x00013822 ldr r2, [pc, 0x388] |
0x00013824 mov r1, r6 | r1 = r6;
0x00013826 add r0, pc | r0 = 0x273d4;
0x00013828 adds r0, 0x4c | r0 += 0x4c;
0x0001382a add r2, pc | r2 = 0x273dc;
0x0001382c blx 0x50d8 | fcn_000050d8 ();
| label_12:
0x00013830 cmp r7, r4 |
| if (r7 <= r4) {
0x00013832 ble.w 0x13728 | goto label_10;
| }
| do {
0x00013836 ldr r3, [sp, 0x38] | r3 = *(arg_38h);
0x00013838 ldr.w r0, [r3, r4, lsl 2] | offset_1 = r4 << 2;
| r0 = *((r3 + offset_1));
0x0001383c adds r4, 1 | r4++;
0x0001383e blx 0x4ec4 | fcn_00004ec4 ();
0x00013842 cmp r7, r4 |
0x00013844 bne 0x13836 |
| } while (r7 != r4);
0x00013846 b 0x13728 | goto label_10;
| label_52:
0x00013848 mov sb, r6 | sb = r6;
0x0001384a mov r6, r0 | r6 = r0;
0x0001384c ldr r0, [pc, 0x360] |
0x0001384e mov r3, sb | r3 = sb;
0x00013850 ldr r2, [pc, 0x360] |
0x00013852 mov r1, r6 | r1 = r6;
0x00013854 ldr r7, [sp, 0x18] | r7 = var_18h;
0x00013856 add r0, pc | r0 = 0x2740a;
0x00013858 adds r0, 0x68 | r0 += 0x68;
0x0001385a add r2, pc | r2 = 0x27412;
0x0001385c blx 0x50d8 | fcn_000050d8 ();
0x00013860 b 0x1381e | goto label_11;
| label_45:
0x00013862 ldr r3, [sp, 0x20] | r3 = var_20h;
0x00013864 mov r2, r5 | r2 = r5;
0x00013866 mov r1, sb | r1 = sb;
0x00013868 mov r0, fp | r0 = fp;
0x0001386a str r3, [sp] | *(sp) = r3;
0x0001386c mov r3, r5 | r3 = r5;
0x0001386e bl 0x12e7c | r0 = fcn_00012e7c (r0, r1, r2, r3, r4);
0x00013872 cmp r0, 0 |
| if (r0 == 0) {
0x00013874 beq 0x137be | goto label_7;
| }
0x00013876 mov r6, r0 | r6 = r0;
0x00013878 ldr r0, [pc, 0x33c] |
0x0001387a ldr r2, [pc, 0x340] |
0x0001387c mov r3, r5 | r3 = r5;
0x0001387e mov r1, r6 | r1 = r6;
0x00013880 ldr r7, [sp, 0x18] | r7 = var_18h;
0x00013882 add r0, pc | r0 = 0x2743e;
0x00013884 adds r0, 0x4c | r0 += 0x4c;
0x00013886 add r2, pc | r2 = 0x27448;
0x00013888 blx 0x50d8 | fcn_000050d8 ();
0x0001388c b 0x13830 | goto label_12;
| label_47:
0x0001388e cmp.w sb, 2 |
| if (sb == 2) {
0x00013892 bne 0x138a0 |
0x00013894 ldr r1, [pc, 0x328] |
0x00013896 mov r0, r5 | r0 = r5;
0x00013898 add r1, pc | r1 = 0x2745c;
0x0001389a blx 0x4dd0 | r0 = strcmp (r0, r1);
| if (r0 == 0) {
0x0001389e cbz r0, 0x138b2 | goto label_61;
| }
| }
0x000138a0 ldr r3, [sp, 0x20] | r3 = var_20h;
0x000138a2 mov r2, r5 | r2 = r5;
0x000138a4 mov r1, sb | r1 = sb;
0x000138a6 mov r0, fp | r0 = fp;
0x000138a8 bl 0x12d80 | r0 = fcn_00012d80 (r0, r1, r2, r3, r4, r5, r6);
0x000138ac cmp r0, 0 |
| if (r0 != 0) {
0x000138ae bne.w 0x13ade | goto label_62;
| }
| label_61:
0x000138b2 add r6, sp, 0x3c | r6 += arg_3ch;
0x000138b4 mov r3, r5 | r3 = r5;
0x000138b6 ldr r1, [sp, 0x20] | r1 = var_20h;
0x000138b8 mov r2, sb | r2 = sb;
0x000138ba mov r0, fp | r0 = fp;
0x000138bc str r6, [sp] | *(sp) = r6;
0x000138be blx 0x4f3c | r0 = fcn_00004f3c ();
0x000138c2 mov r3, r0 | r3 = r0;
0x000138c4 cmp r0, 0 |
| if (r0 != 0) {
0x000138c6 bne.w 0x13ace | goto label_63;
| }
0x000138ca ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x000138cc mov r2, r5 | r2 = r5;
0x000138ce ldr r1, [sp, 0x3c] | r1 = *(arg_3ch);
0x000138d0 mov r0, fp | r0 = fp;
0x000138d2 strd sl, r3, [sp, 4] | __asm ("strd sl, r3, [var_8h]");
0x000138d6 ldr r3, [sp, 0x24] | r3 = var_24h;
0x000138d8 str r3, [sp] | *(sp) = r3;
0x000138da ldr r3, [sp, 0x20] | r3 = var_20h;
0x000138dc bl 0x13384 | r0 = fcn_00013384 (r0, r1, r2, r3, r4, r5);
0x000138e0 mov r3, r0 | r3 = r0;
0x000138e2 cmp r0, 0 |
| if (r0 != 0) {
0x000138e4 bne.w 0x13a4c | goto label_44;
| }
0x000138e8 ldr r0, [pc, 0x2d8] |
0x000138ea add r0, pc | r0 = 0x274b2;
0x000138ec blx 0x50bc | r0 = fcn_000050bc ();
0x000138f0 cmp r0, 0 |
| if (r0 == 0) {
0x000138f2 beq.w 0x13622 | goto label_6;
| }
0x000138f6 blx 0x53f4 | r0 = sprintf_chk ()
0x000138fa ldr r6, [r0] | r6 = *(r0);
0x000138fc ldr r0, [pc, 0x2c8] |
0x000138fe ldr r2, [pc, 0x2cc] |
0x00013900 mov r1, r6 | r1 = r6;
0x00013902 ldr r7, [sp, 0x18] | r7 = var_18h;
0x00013904 add r0, pc | r0 = 0x274d0;
0x00013906 add r2, pc | r2 = 0x274d8;
0x00013908 adds r0, 0x4c | r0 += 0x4c;
0x0001390a blx 0x50d8 | fcn_000050d8 ();
0x0001390e b 0x13830 | goto label_12;
| label_15:
0x0001392a ldr r0, [pc, 0x2ac] |
0x0001392c mov r6, r3 | r6 = r3;
0x0001392e ldr r2, [pc, 0x2ac] |
0x00013930 mov r3, r5 | r3 = r5;
0x00013932 mov r1, r6 | r1 = r6;
0x00013934 ldr r7, [sp, 0x18] | r7 = var_18h;
0x00013936 add r0, pc | r0 = 0x27514;
0x00013938 adds r0, 0x5c | r0 += 0x5c;
0x0001393a add r2, pc | r2 = 0x2751c;
0x0001393c blx 0x50d8 | fcn_000050d8 ();
0x00013940 b 0x1354e | goto label_13;
| label_40:
0x00013942 mov r1, sb | r1 = sb;
0x00013944 mov r0, fp | r0 = fp;
0x00013946 blx 0x53e8 | r0 = strcat_chk ();
0x0001394a mov r3, r0 | r3 = r0;
0x0001394c cmp r0, 0 |
| if (r0 != 0) {
0x0001394e bne 0x13a1e | goto label_64;
| }
0x00013950 ldrh.w r2, [sp, 0xac] | r2 = *(arg_ach);
0x00013954 and r2, r2, 0xf000 | r2 &= 0xf000;
0x00013958 cmp.w r2, 0x8000 |
0x0001395c it eq |
| if (r2 != 0x8000) {
0x0001395e moveq r3, 1 | r3 = 1;
| }
| if (r2 != 0x8000) {
0x00013960 beq 0x13992 |
0x00013962 cmp.w r2, 0x4000 |
| if (r2 == 0x4000) {
0x00013966 beq.w 0x13af6 | goto label_65;
| }
0x0001396a cmp.w r2, 0x2000 |
| if (r2 == 0x2000) {
0x0001396e beq.w 0x13afa | goto label_66;
| }
0x00013972 cmp.w r2, 0x6000 |
| if (r2 == 0x6000) {
0x00013976 beq.w 0x13b02 | goto label_67;
| }
0x0001397a cmp.w r2, 0xa000 |
| if (r2 == 0xa000) {
0x0001397e beq.w 0x13afe | goto label_68;
| }
0x00013982 cmp.w r2, 0x1000 |
| if (r2 == 0x1000) {
0x00013986 beq.w 0x13b06 | goto label_69;
| }
0x0001398a cmp.w r2, 0xc000 |
0x0001398e it eq |
| if (r2 == 0xc000) {
0x00013990 moveq r3, 6 | r3 = 6;
| goto label_18;
| }
| }
| label_18:
0x00013992 str r3, [sp] | *(sp) = r3;
0x00013994 mov r2, r5 | r2 = r5;
0x00013996 mov r3, r6 | r3 = r6;
0x00013998 mov r1, sb | r1 = sb;
0x0001399a mov r0, fp | r0 = fp;
0x0001399c blx 0x577c | r0 = fcn_0000577c ();
0x000139a0 mov r3, r0 | r3 = r0;
0x000139a2 cmp r3, 0 |
| if (r3 == 0) {
0x000139a4 beq.w 0x13518 | goto label_14;
| }
0x000139a8 b 0x1392a | goto label_15;
| label_55:
0x000139aa adds r3, 4 | r3 += 4;
0x000139ac add.w r3, r3, r3, lsl 1 | r3 += (r3 << 1);
0x000139b0 lsls r1, r3, 3 | r1 = r3 << 3;
0x000139b2 blx 0x5074 | r0 = fcn_00005074 ();
0x000139b6 cmp r0, 0 |
| if (r0 != 0) {
0x000139b8 beq.w 0x13b0e |
0x000139bc ldr r2, [sp, 0x24] | r2 = var_24h;
0x000139be ldr r3, [r2, 4] | r3 = *((r2 + 4));
0x000139c0 str r0, [r2, 8] | *((r2 + 8)) = r0;
0x000139c2 adds r3, 4 | r3 += 4;
0x000139c4 str r3, [r2, 4] | *((r2 + 4)) = r3;
0x000139c6 ldr r3, [r2] | r3 = *(r2);
0x000139c8 b 0x136e4 | goto label_16;
| label_34:
0x000139ca mov r8, r6 | r8 = r6;
0x000139cc mov r6, r0 | r6 = r0;
0x000139ce ldr r0, [pc, 0x210] |
0x000139d0 mov r3, r8 | r3 = r8;
0x000139d2 ldr r2, [pc, 0x210] |
0x000139d4 mov r1, r6 | r1 = r6;
0x000139d6 ldr r7, [sp, 0x18] | r7 = var_18h;
0x000139d8 add r0, pc | r0 = 0x275be;
0x000139da adds r0, 0x5c | r0 += 0x5c;
0x000139dc add r2, pc | r2 = 0x275c6;
0x000139de blx 0x50d8 | fcn_000050d8 ();
0x000139e2 b 0x1354e | goto label_13;
| label_28:
0x000139fe blx 0x53f4 | r0 = sprintf_chk ()
0x00013a02 ldr r6, [r0] | r6 = *(r0);
0x00013a04 mov r3, r5 | r3 = r5;
0x00013a06 ldr r0, [pc, 0x1e8] |
0x00013a08 ldr r2, [pc, 0x1e8] |
0x00013a0a mov r1, r6 | r1 = r6;
0x00013a0c ldr r7, [sp, 0x18] | r7 = var_18h;
0x00013a0e add r0, pc | r0 = 0x27604;
0x00013a10 adds r0, 0x4c | r0 += 0x4c;
0x00013a12 add r2, pc | r2 = 0x2760a;
0x00013a14 blx 0x50d8 | fcn_000050d8 ();
0x00013a18 b 0x13830 | goto label_12;
| label_35:
0x00013a1a movs r3, 2 | r3 = 2;
0x00013a1c b 0x134fa | goto label_17;
| label_64:
0x00013a1e mov r6, r0 | r6 = r0;
0x00013a20 ldr r0, [pc, 0x1d4] |
0x00013a22 ldr r2, [pc, 0x1d8] |
0x00013a24 mov r1, r3 | r1 = r3;
0x00013a26 ldr r7, [sp, 0x18] | r7 = var_18h;
0x00013a28 add r0, pc | r0 = 0x27624;
0x00013a2a adds r0, 0x5c | r0 += 0x5c;
0x00013a2c add r2, pc | r2 = 0x2762e;
0x00013a2e blx 0x50d8 | fcn_000050d8 ();
0x00013a32 b 0x1354e | goto label_13;
| label_60:
0x00013a34 ldr r0, [pc, 0x1c8] |
0x00013a36 mov r6, r3 | r6 = r3;
0x00013a38 ldr r2, [pc, 0x1c8] |
0x00013a3a mov r3, r5 | r3 = r5;
0x00013a3c mov r1, r6 | r1 = r6;
0x00013a3e ldr r7, [sp, 0x18] | r7 = var_18h;
0x00013a40 add r0, pc | r0 = 0x27644;
0x00013a42 adds r0, 0x4c | r0 += 0x4c;
0x00013a44 add r2, pc | r2 = 0x2764c;
0x00013a46 blx 0x50d8 | fcn_000050d8 ();
0x00013a4a b 0x13830 | goto label_12;
| label_44:
0x00013a4c ldr r7, [sp, 0x18] | r7 = var_18h;
0x00013a4e mov r6, r3 | r6 = r3;
0x00013a50 b 0x13830 | goto label_12;
| label_50:
0x00013a52 ldr r2, [pc, 0x1b4] |
0x00013a54 mov r6, r0 | r6 = r0;
0x00013a56 mov r3, r5 | r3 = r5;
0x00013a58 mov r0, r5 | r0 = r5;
0x00013a5a mov r1, r6 | r1 = r6;
0x00013a5c ldr r7, [sp, 0x18] | r7 = var_18h;
0x00013a5e add r2, pc | r2 = 0x2766c;
0x00013a60 blx 0x50d8 | fcn_000050d8 ();
0x00013a64 b 0x13830 | goto label_12;
| label_53:
0x00013a66 mov r6, r0 | r6 = r0;
0x00013a68 ldr r0, [pc, 0x1a0] |
0x00013a6a ldr r2, [pc, 0x1a4] |
0x00013a6c mov r3, r5 | r3 = r5;
0x00013a6e mov r1, r6 | r1 = r6;
0x00013a70 ldr r7, [sp, 0x18] | r7 = var_18h;
0x00013a72 add r0, pc | r0 = 0x27682;
0x00013a74 adds r0, 0x4c | r0 += 0x4c;
0x00013a76 add r2, pc | r2 = 0x2768c;
0x00013a78 blx 0x50d8 | fcn_000050d8 ();
0x00013a7c b 0x13830 | goto label_12;
| label_36:
0x00013a7e movs r3, 3 | r3 = 3;
0x00013a80 b 0x134fa | goto label_17;
| label_37:
0x00013a82 movs r3, 4 | r3 = 4;
0x00013a84 b 0x134fa | goto label_17;
| label_38:
0x00013a86 movs r3, 7 | r3 = 7;
0x00013a88 b 0x134fa | goto label_17;
| label_39:
0x00013a8a movs r3, 5 | r3 = 5;
0x00013a8c b 0x134fa | goto label_17;
| label_59:
0x00013a8e ldr r0, [pc, 0x184] |
0x00013a90 movs r1, 0 | r1 = 0;
0x00013a92 ldr r2, [pc, 0x184] |
0x00013a94 ldr r7, [sp, 0x18] | r7 = var_18h;
0x00013a96 add r0, pc | r0 = 0x276b0;
0x00013a98 add r2, pc | r2 = 0x276b6;
0x00013a9a adds r0, 0x4c | r0 += 0x4c;
0x00013a9c blx 0x50d8 | fcn_000050d8 ();
0x00013aa0 mov r0, r6 | r0 = r6;
0x00013aa2 movs r6, 0 | r6 = 0;
0x00013aa4 blx 0x4ec4 | fcn_00004ec4 ();
0x00013aa8 b 0x13830 | goto label_12;
| label_58:
0x00013aaa blx 0x53f4 | sprintf_chk ()
0x00013aae mov sb, r6 | sb = r6;
0x00013ab0 ldr r6, [r0] | r6 = *(r0);
0x00013ab2 ldr r0, [pc, 0x168] |
0x00013ab4 mov r3, r5 | r3 = r5;
0x00013ab6 ldr r2, [pc, 0x168] |
0x00013ab8 mov r1, r6 | r1 = r6;
0x00013aba ldr r7, [sp, 0x18] | r7 = var_18h;
0x00013abc add r0, pc | r0 = 0x276de;
0x00013abe adds r0, 0x4c | r0 += 0x4c;
0x00013ac0 add r2, pc | r2 = 0x276e6;
0x00013ac2 blx 0x50d8 | fcn_000050d8 ();
0x00013ac6 mov r0, sb | r0 = sb;
0x00013ac8 blx 0x4ec4 | fcn_00004ec4 ();
0x00013acc b 0x13830 | goto label_12;
| label_63:
0x00013ace mov r6, r0 | r6 = r0;
0x00013ad0 movs r2, 0 | r2 = 0;
0x00013ad2 mov r0, r5 | r0 = r5;
0x00013ad4 mov r1, r3 | r1 = r3;
0x00013ad6 ldr r7, [sp, 0x18] | r7 = var_18h;
0x00013ad8 blx 0x50d8 | fcn_000050d8 ();
0x00013adc b 0x13830 | goto label_12;
| label_62:
0x00013ade mov r6, r0 | r6 = r0;
0x00013ae0 ldr r0, [pc, 0x140] |
0x00013ae2 ldr r2, [pc, 0x144] |
0x00013ae4 mov r3, r5 | r3 = r5;
0x00013ae6 mov r1, r6 | r1 = r6;
0x00013ae8 ldr r7, [sp, 0x18] | r7 = var_18h;
0x00013aea add r0, pc | r0 = 0x27712;
0x00013aec adds r0, 0x4c | r0 += 0x4c;
0x00013aee add r2, pc | r2 = 0x2771c;
0x00013af0 blx 0x50d8 | fcn_000050d8 ();
0x00013af4 b 0x13830 | goto label_12;
| label_65:
0x00013af6 movs r3, 2 | r3 = 2;
0x00013af8 b 0x13992 | goto label_18;
| label_66:
0x00013afa movs r3, 3 | r3 = 3;
0x00013afc b 0x13992 | goto label_18;
| label_68:
0x00013afe movs r3, 7 | r3 = 7;
0x00013b00 b 0x13992 | goto label_18;
| label_67:
0x00013b02 movs r3, 4 | r3 = 4;
0x00013b04 b 0x13992 | goto label_18;
| label_69:
0x00013b06 movs r3, 5 | r3 = 5;
0x00013b08 b 0x13992 | goto label_18;
| label_56:
0x00013b0a blx 0x5008 | fcn_00005008 ();
| }
0x00013b0e ldr r2, [pc, 0x11c] |
0x00013b10 movw r1, 0xb746 |
0x00013b14 movt r1, 0x7f2b | r1 = 0x7f2bb746;
0x00013b18 mov r0, r5 | r0 = r5;
0x00013b1a movw r6, 0xb746 |
0x00013b1e ldr r7, [sp, 0x18] | r7 = var_18h;
0x00013b20 add r2, pc | r2 = 0x27752;
0x00013b22 movt r6, 0x7f2b | r6 = 0x7f2bb746;
0x00013b26 blx 0x50d8 | fcn_000050d8 ();
0x00013b2a b 0x13830 | goto label_12;
| label_42:
0x00013b2c ldr r0, [pc, 0x100] |
0x00013b2e movw r1, 0xb746 |
0x00013b32 ldr r2, [pc, 0x100] |
0x00013b34 mov r3, r5 | r3 = r5;
0x00013b36 movt r1, 0x7f2b | r1 = 0x7f2bb746;
0x00013b3a movw r6, 0xb746 |
0x00013b3e add r0, pc | r0 = 0x27772;
0x00013b40 ldr r7, [sp, 0x18] | r7 = var_18h;
0x00013b42 add r2, pc | r2 = 0x2777c;
0x00013b44 adds r0, 0x4c | r0 += 0x4c;
0x00013b46 movt r6, 0x7f2b | r6 = 0x7f2bb746;
0x00013b48 strb r3, [r5, 0x18] | *((r5 + 0x18)) = r3;
0x00013b4a blx 0x50d8 | fcn_000050d8 ();
0x00013b4e b 0x13830 | goto label_12;
| label_57:
0x00013b50 ldr r0, [pc, 0xe4] |
0x00013b52 mov r1, r6 | r1 = r6;
0x00013b54 ldr r2, [pc, 0xe4] |
0x00013b56 ldr r7, [sp, 0x18] | r7 = var_18h;
0x00013b58 add r0, pc | r0 = 0x27794;
0x00013b5a add r2, pc | r2 = 0x2779a;
0x00013b5c adds r0, 0x4c | r0 += 0x4c;
0x00013b5e blx 0x50d8 | fcn_000050d8 ();
0x00013b62 b 0x13830 | goto label_12;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/debugfs @ 0x12e7c */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.00012e7c () | void fcn_00012e7c (int16_t arg_148h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch;
| int32_t var_10h;
| int32_t var_10h_2;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_24h;
| char * src;
| int16_t var_2ch;
| int16_t var_30h;
| int16_t var_40h;
| int16_t var_60h;
| int32_t var_60h_2;
| int16_t var_9ch;
| int16_t var_a4h;
| int32_t var_a8h;
| int32_t var_a8h_2;
| int16_t var_b6h;
| int16_t var_bch;
| int16_t var_11ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00012e7c push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00012e80 mov r4, r1 | r4 = r1;
0x00012e82 ldr.w r1, [pc, 0x4dc] |
0x00012e86 mov r7, r3 | r7 = r3;
0x00012e88 mov r8, r2 | r8 = r2;
0x00012e8a movs r2, 0 | r2 = 0;
0x00012e8c ldr.w r3, [pc, 0x4d4] | r3 = *(0x13364);
0x00012e90 sub sp, 0x124 |
0x00012e92 add r1, pc | r1 = 0x261f8;
0x00012e94 mov r6, r0 | r6 = r0;
0x00012e96 mov r0, r8 | r0 = r8;
0x00012e98 ldr r3, [r1, r3] |
0x00012e9a mov r1, r2 | r1 = r2;
0x00012e9c ldr r3, [r3] | r3 = *(0x261f8);
0x00012e9e str r3, [sp, 0x11c] | var_11ch = r3;
0x00012ea0 mov.w r3, 0 | r3 = 0;
0x00012ea4 blx 0x58f4 | r0 = fcn_000058f4 ();
0x00012ea8 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 < r0) {
0x00012eaa blt 0x12f48 | goto label_12;
| }
0x00012eac add r1, sp, 0x30 | r1 += var_30h;
0x00012eae blx 0x57b8 | r0 = fcn_000057b8 ();
0x00012eb2 cmp r0, 0 |
| if (r0 < 0) {
0x00012eb4 blt.w 0x130fe | goto label_13;
| }
0x00012eb8 movs r1, 0x2f | r1 = 0x2f;
0x00012eba mov r0, r7 | r0 = r7;
0x00012ebc blx 0x567c | r0 = ext2fs_fallocate ();
0x00012ec0 mov r8, r0 | r8 = r0;
0x00012ec2 cmp r0, 0 |
| if (r0 == 0) {
0x00012ec4 beq 0x12f44 | goto label_14;
| }
0x00012ec6 movs r3, 0 | r3 = 0;
0x00012ec8 mov r2, r4 | r2 = r4;
0x00012eca strb r3, [r0] | *(r0) = r3;
0x00012ecc add r3, sp, 0x28 | r3 += src;
0x00012ece str r3, [sp] | *(sp) = r3;
0x00012ed0 mov r0, r6 | r0 = r6;
0x00012ed2 ldr r1, [sp, 0x148] | r1 = *(arg_148h);
0x00012ed4 mov r3, r7 | r3 = r7;
0x00012ed6 blx 0x4f3c | r0 = fcn_00004f3c ();
0x00012eda mov r4, r0 | r4 = r0;
0x00012edc cmp r0, 0 |
| if (r0 != 0) {
0x00012ede bne.w 0x13106 | goto label_15;
| }
0x00012ee2 ldr r4, [sp, 0x28] | r4 = src;
0x00012ee4 add.w r7, r8, 1 | r7 = r8 + 1;
| do {
0x00012ee8 add.w r8, sp, 0x24 | r8 += var_24h;
0x00012eec mov r2, r4 | r2 = r4;
0x00012eee ldr r1, [sp, 0x148] | r1 = *(arg_148h);
0x00012ef0 mov r3, r7 | r3 = r7;
0x00012ef2 mov r0, r6 | r0 = r6;
0x00012ef4 movw r4, 0xb79b |
0x00012ef8 str.w r8, [sp] | __asm ("str.w r8, [sp]");
0x00012efc movt r4, 0x7f2b | r4 = 0x7f2bb79b;
0x00012f00 blx 0x4f3c | r0 = fcn_00004f3c ();
| if (r0 != 0) {
0x00012f04 cbz r0, 0x12f1c |
0x00012f06 ldr r1, [sp, 0x28] | r1 = src;
0x00012f08 movs r3, 0 | r3 = 0;
0x00012f0a movw r2, 0x11ed | r2 = 0x11ed;
0x00012f0e mov r0, r6 | r0 = r6;
0x00012f10 str.w r8, [sp] | __asm ("str.w r8, [sp]");
0x00012f14 blx 0x51a8 | r0 = strcpy (r0, r1);
0x00012f18 mov r4, r0 | r4 = r0;
| if (r0 == 0) {
0x00012f1a cbz r0, 0x12f66 | goto label_16;
| }
| }
| label_1:
0x00012f1c mov r0, r5 | r0 = r5;
0x00012f1e blx 0x5894 | fcn_00005894 ();
| label_0:
0x00012f22 ldr.w r2, [pc, 0x444] |
0x00012f26 ldr.w r3, [pc, 0x43c] | r3 = *(0x13366);
0x00012f2a add r2, pc | r2 = 0x26298;
0x00012f2c ldr r3, [r2, r3] | r3 = *(0x26298);
0x00012f2e ldr r2, [r3] | r2 = *(0x26298);
0x00012f30 ldr r3, [sp, 0x11c] | r3 = var_11ch;
0x00012f32 eors r2, r3 | r2 ^= r3;
0x00012f34 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00012f38 bne.w 0x1318e | goto label_17;
| }
0x00012f3a strh r1, [r5, 8] | *((r5 + 8)) = r1;
0x00012f3c mov r0, r4 | r0 = r4;
0x00012f3e add sp, 0x124 |
0x00012f40 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_14:
0x00012f44 str r4, [sp, 0x28] | src = r4;
0x00012f46 b 0x12ee8 |
| } while (1);
| label_12:
0x00012f48 blx 0x53f4 | r0 = sprintf_chk ()
0x00012f4c ldr r4, [r0] | r4 = *(r0);
0x00012f4e mov r3, r8 | r3 = r8;
0x00012f50 ldr.w r0, [pc, 0x418] |
0x00012f54 ldr.w r2, [pc, 0x418] |
0x00012f58 mov r1, r4 | r1 = r4;
0x00012f5a add r0, pc | r0 = 0x262ca;
0x00012f5c add r2, pc | r2 = 0x262d0;
0x00012f5e adds r0, 0x38 | r0 += 0x38;
0x00012f60 blx 0x50d8 | fcn_000050d8 ();
0x00012f64 b 0x12f22 | goto label_0;
| label_16:
0x00012f66 ldr.w r1, [pc, 0x40c] |
0x00012f6a movs r0, 1 | r0 = 1;
0x00012f6c ldr r2, [sp, 0x24] | r2 = var_24h;
0x00012f6e mov.w r8, 1 | r8 = 1;
0x00012f72 add r1, pc | r1 = 0x262ec;
0x00012f74 blx 0x54bc | fcn_000054bc ();
0x00012f78 ldr r3, [sp, 0x24] | r3 = var_24h;
0x00012f7a mov r2, r7 | r2 = r7;
0x00012f7c ldr r1, [sp, 0x28] | r1 = src;
0x00012f7e mov r0, r6 | r0 = r6;
0x00012f80 str.w r8, [sp] | __asm ("str.w r8, [sp]");
0x00012f84 blx 0x577c | fcn_0000577c ();
0x00012f88 movw r3, 0xb726 |
0x00012f8c mov r4, r0 | r4 = r0;
0x00012f8e movt r3, 0x7f2b | r3 = 0x7f2bb726;
0x00012f92 cmp r0, r3 |
| if (r0 == r3) {
0x00012f94 beq.w 0x13116 | goto label_18;
| }
| label_2:
0x00012f98 cmp r4, 0 |
| if (r4 != 0) {
0x00012f9a bne 0x12f1c | goto label_1;
| }
0x00012f9c ldr r2, [sp, 0x24] | r2 = var_24h;
0x00012f9e mov r3, r4 | r3 = r4;
0x00012fa0 ldr r0, [r6, 0x2c] | r0 = *((r6 + 0x2c));
0x00012fa2 blx 0x55ec | r0 = list_super2 ();
0x00012fa6 cmp r0, 0 |
| if (r0 != 0) {
0x00012fa8 bne.w 0x13140 | goto label_19;
| }
| label_4:
0x00012fac movs r3, 0 | r3 = 0;
0x00012fae ldr r1, [sp, 0x24] | r1 = var_24h;
0x00012fb0 movs r2, 1 | r2 = 1;
0x00012fb2 mov r0, r6 | r0 = r6;
0x00012fb4 add r7, sp, 0x9c | r7 += var_9ch;
0x00012fb6 blx 0x564c | ext2fs_xattr_remove ();
0x00012fba movs r2, 0x80 | r2 = 0x80;
0x00012fbc movs r1, 0 | r1 = 0;
0x00012fbe mov r0, r7 | r0 = r7;
0x00012fc0 blx 0x5440 | fcn_00005440 ();
0x00012fc4 ldr r3, [sp, 0x40] | r3 = var_40h;
0x00012fc6 ldr r0, [r6, 0x60] | r0 = *((r6 + 0x60));
0x00012fc8 ubfx r3, r3, 0, 0xc | r3 = (r3 >> 0) & ((1 << 0xc) - 1);
0x00012fcc mvn.w r3, r3, lsl 17 | r3 = ~r3;
0x00012fd0 mvn.w r3, r3, lsr 17 | r3 = ~r3;
0x00012fd4 strh.w r3, [sp, 0x9c] | var_9ch = r3;
0x00012fd8 cmp r0, 0 |
| if (r0 == 0) {
0x00012fda beq.w 0x1313a | goto label_20;
| }
| label_3:
0x00012fde movs r3, 1 | r3 = 1;
0x00012fe0 strd r0, r0, [sp, 0xa8] | __asm ("strd r0, r0, [var_a8h]");
0x00012fe4 str r0, [sp, 0xa4] | var_a4h = r0;
0x00012fe6 mov r1, r7 | r1 = r7;
0x00012fe8 strh.w r3, [sp, 0xb6] | var_b6h = r3;
0x00012fec mov r0, r6 | r0 = r6;
0x00012fee ldrd r2, r3, [sp, 0x60] | __asm ("ldrd r2, r3, [var_60h]");
0x00012ff2 blx 0x5108 | r0 = fcn_00005108 ();
0x00012ff6 mov r4, r0 | r4 = r0;
0x00012ff8 cmp r0, 0 |
| if (r0 != 0) {
0x00012ffa bne 0x12f1c | goto label_1;
| }
0x00012ffc ldr r3, [r6, 0x10] | r3 = *((r6 + 0x10));
0x00012ffe ldr r1, [sp, 0x24] | r1 = var_24h;
0x00013000 ldr r3, [r3, 0x60] | r3 = *((r3 + 0x60));
0x00013002 lsls r2, r3, 0x10 | r2 = r3 << 0x10;
| if (r2 >= r3) {
0x00013004 bpl.w 0x13152 | goto label_21;
| }
0x00013006 strh r5, [r4, 4] | *((r4 + 4)) = r5;
0x00013008 ldr r3, [sp, 0xbc] | r3 = var_bch;
0x0001300a orr r3, r3, 0x10000000 | r3 |= 0x10000000;
0x0001300e str r3, [sp, 0xbc] | var_bch = r3;
| label_5:
0x00013010 mov r2, r7 | r2 = r7;
0x00013012 mov r0, r6 | r0 = r6;
0x00013014 blx 0x5260 | r0 = fcn_00005260 ();
0x00013018 mov r4, r0 | r4 = r0;
0x0001301a cmp r0, 0 |
| if (r0 != 0) {
0x0001301c bne.w 0x12f1c | goto label_1;
| }
0x00013020 ldr r3, [sp, 0xbc] | r3 = var_bch;
0x00013022 lsls r7, r3, 3 | r7 = r3 << 3;
| if (r7 < r3) {
0x00013024 bmi.w 0x1317c | goto label_22;
| }
| label_6:
0x00013028 ldrh.w r3, [sp, 0x9c] | r3 = var_9ch;
0x0001302c and r3, r3, 0xf000 | r3 &= 0xf000;
0x00013030 cmp.w r3, 0x8000 |
| if (r3 != 0x8000) {
0x00013034 bne.w 0x12f1c | goto label_1;
| }
0x00013038 ldr r1, [sp, 0x24] | r1 = var_24h;
0x0001303a add r3, sp, 0x2c | r3 += var_2ch;
0x0001303c movs r2, 1 | r2 = 1;
0x0001303e mov r0, r6 | r0 = r6;
0x00013040 blx 0x4f30 | r0 = fcn_00004f30 ();
0x00013044 mov r4, r0 | r4 = r0;
0x00013046 cmp r0, 0 |
| if (r0 != 0) {
0x00013048 bne.w 0x12f1c | goto label_1;
| }
0x0001304c mov.w r0, 0x10000 | r0 = 0x10000;
0x00013050 blx 0x52bc | strerror (r0);
0x00013054 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x00013056 mov r8, r0 | r8 = r0;
0x00013058 str r3, [sp, 0x18] | var_18h = r3;
0x0001305a cmp r0, 0 |
| if (r0 == 0) {
0x0001305c beq.w 0x13348 | goto label_23;
| }
0x00013060 ldr r0, [r6, 0x14] | r0 = *((r6 + 0x14));
0x00013062 movs r1, 1 | r1 = 1;
0x00013064 blx 0x4d1c | r0 = calloc (r0, r1);
0x00013068 mov sl, r0 | sl = r0;
0x0001306a cmp r0, 0 |
| if (r0 == 0) {
0x0001306c beq.w 0x13348 | goto label_23;
| }
0x00013070 mov r7, r4 | r7 = r4;
0x00013072 mov sb, r4 | sb = r4;
0x00013074 b 0x130dc |
| while (r7 < r2) {
0x00013076 movs r1, 3 | r1 = 3;
0x00013078 mov r2, r7 | r2 = r7;
0x0001307a mov r3, sb | r3 = sb;
0x0001307c mov r0, r5 | r0 = r5;
0x0001307e str r1, [sp] | *(sp) = r1;
0x00013080 blx 0x516c | strtoll (r0, r1, r2);
0x00013084 subs.w fp, r1, 0 |
0x00013088 mov r4, r0 | r4 = r0;
| if (fp < r1) {
0x0001308a blt.w 0x13318 | goto label_24;
| }
0x0001308e movs r3, 4 | r3 = 4;
0x00013090 mov r2, r0 | r2 = r0;
0x00013092 str r3, [sp] | *(sp) = r3;
0x00013094 mov r0, r5 | r0 = r5;
0x00013096 mov r3, fp | r3 = fp;
0x00013098 blx 0x516c | strtoll (r0, r1, r2);
0x0001309c subs.w sb, r1, 0 | sb = r1 - 0;
0x000130a0 mov r7, r0 | r7 = r0;
| if (sb < r1) {
0x000130a2 blt.w 0x131b4 | goto label_25;
| }
0x000130a6 str.w fp, [sp, 4] | __asm ("str.w fp, [var_4h]");
0x000130aa mov r1, r5 | r1 = r5;
0x000130ac strd r8, sl, [sp, 0x10] | __asm ("strd r8, sl, [var_10h]");
0x000130b0 mov r0, r6 | r0 = r6;
0x000130b2 ldr.w ip, [r6, 0x14] | ip = *((r6 + 0x14));
0x000130b6 ldr r2, [sp, 0x18] | r2 = var_18h;
0x000130b8 add.w r3, ip, -1 | r3 = ip + -1;
0x000130bc rsb.w ip, ip, 0 |
0x000130c0 adds r3, r7, r3 | r3 = r7 + r3;
0x000130c2 and.w r4, r4, ip | r4 &= ip;
0x000130c6 and.w r3, r3, ip | r3 &= ip;
0x000130ca str r4, [sp] | *(sp) = r4;
0x000130cc str r3, [sp, 8] | var_8h = r3;
0x000130ce adc r3, sb, 0 | __asm ("adc r3, sb, 0");
0x000130d2 str r3, [sp, 0xc] | var_ch = r3;
0x000130d4 bl 0x1264c | r0 = fcn_0001264c (r0, r1, r2, r3, r4, r5, r6);
0x000130d8 cmp r0, 0 |
| if (r0 != 0) {
0x000130da bne 0x13192 | goto label_26;
| }
0x000130dc ldrd r2, r3, [sp, 0x60] | __asm ("ldrd r2, r3, [var_60h]");
0x000130e0 cmp r7, r2 |
0x000130e2 sbcs.w r3, sb, r3 | __asm ("sbcs.w r3, sb, r3");
0x000130e6 blt 0x13076 |
| }
| label_9:
0x000130e8 mov r0, sl | r0 = sl;
0x000130ea blx 0x4ec4 | fcn_00004ec4 ();
0x000130ee mov r0, r8 | r0 = r8;
0x000130f0 blx 0x4ec4 | fcn_00004ec4 ();
0x000130f4 ldr r0, [sp, 0x2c] | r0 = var_2ch;
0x000130f6 blx 0x4e9c | r0 = ext2fs_file_close ();
0x000130fa mov r4, r0 | r4 = r0;
0x000130fc b 0x12f1c | goto label_1;
| label_13:
0x000130fe blx 0x53f4 | r0 = sprintf_chk ()
0x00013102 ldr r4, [r0] | r4 = *(r0);
0x00013104 b 0x12f1c | goto label_1;
| label_15:
0x00013106 ldr r2, [pc, 0x270] |
0x00013108 mov r3, r7 | r3 = r7;
0x0001310a mov r0, r7 | r0 = r7;
0x0001310c mov r1, r4 | r1 = r4;
0x0001310e add r2, pc | r2 = 0x2648c;
0x00013110 blx 0x50d8 | fcn_000050d8 ();
0x00013114 b 0x12f1c | goto label_1;
| label_18:
0x00013116 ldr r1, [sp, 0x28] | r1 = src;
0x00013118 mov r0, r6 | r0 = r6;
0x0001311a blx 0x53e8 | r0 = strcat_chk ();
0x0001311e mov r4, r0 | r4 = r0;
0x00013120 cmp r0, 0 |
| if (r0 != 0) {
0x00013122 bne.w 0x12f1c | goto label_1;
| }
0x00013126 ldr r3, [sp, 0x24] | r3 = var_24h;
0x00013128 mov r2, r7 | r2 = r7;
0x0001312a ldr r1, [sp, 0x28] | r1 = src;
0x0001312c mov r0, r6 | r0 = r6;
0x0001312e str.w r8, [sp] | __asm ("str.w r8, [sp]");
0x00013132 blx 0x577c | r0 = fcn_0000577c ();
0x00013136 mov r4, r0 | r4 = r0;
0x00013138 b 0x12f98 | goto label_2;
| label_20:
0x0001313a blx 0x4f60 | fcn_00004f60 ();
0x0001313e b 0x12fde | goto label_3;
| label_19:
0x00013140 ldr r0, [pc, 0x238] |
0x00013142 mov r1, r4 | r1 = r4;
0x00013144 ldr r2, [pc, 0x238] |
0x00013146 add r0, pc | r0 = 0x264c6;
0x00013148 add r2, pc | r2 = 0x264cc;
0x0001314a adds r0, 0x38 | r0 += 0x38;
0x0001314c blx 0x50d8 | fcn_000050d8 ();
0x00013150 b 0x12fac | goto label_4;
| label_21:
0x00013152 lsls r3, r3, 0x19 | r3 <<= 0x19;
| if (r3 >= r3) {
0x00013154 bpl.w 0x13010 | goto label_5;
| }
0x00013158 ldr r3, [sp, 0xbc] | r3 = var_bch;
0x0001315a mov r2, r7 | r2 = r7;
0x0001315c mov r0, r6 | r0 = r6;
0x0001315e bic r3, r3, 0x80000 | r3 = BIT_MASK (r3, 0x80000);
0x00013162 str r3, [sp, 0xbc] | var_bch = r3;
0x00013164 add r3, sp, 0x2c | r3 += var_2ch;
0x00013166 blx 0x54d4 | r0 = fcn_000054d4 ();
0x0001316a mov r4, r0 | r4 = r0;
0x0001316c cmp r0, 0 |
| if (r0 != 0) {
0x0001316e bne.w 0x12f1c | goto label_1;
| }
0x00013172 ldr r0, [sp, 0x2c] | r0 = var_2ch;
0x00013174 blx 0x56d4 | fcn_000056d4 ();
0x00013178 ldr r1, [sp, 0x24] | r1 = var_24h;
0x0001317a b 0x13010 | goto label_5;
| label_22:
0x0001317c ldr r1, [sp, 0x24] | r1 = var_24h;
0x0001317e mov r0, r6 | r0 = r6;
0x00013180 blx 0x5184 | r0 = ext2fs_open_inode_scan ();
0x00013184 cmp r0, 0 |
| if (r0 == 0) {
0x00013186 beq.w 0x13028 | goto label_6;
| }
0x0001318a mov r4, r0 | r4 = r0;
0x0001318c b 0x12f1c | goto label_1;
| label_17:
0x0001318e blx 0x5008 | fcn_00005008 ();
| label_26:
0x00013192 movw r3, 0xb750 |
0x00013196 mov r4, r0 | r4 = r0;
0x00013198 movt r3, 0x7f2b | r3 = 0x7f2bb750;
0x0001319c cmp r0, r3 |
| if (r0 != r3) {
0x0001319e beq 0x131b4 |
| label_11:
0x000131a0 mov r0, sl | r0 = sl;
0x000131a2 blx 0x4ec4 | fcn_00004ec4 ();
0x000131a6 mov r0, r8 | r0 = r8;
0x000131a8 blx 0x4ec4 | fcn_00004ec4 ();
0x000131ac ldr r0, [sp, 0x2c] | r0 = var_2ch;
0x000131ae blx 0x4e9c | ext2fs_file_close ();
0x000131b2 b 0x12f1c | goto label_1;
| }
| label_25:
0x000131b4 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x000131b6 str r3, [sp, 0x18] | var_18h = r3;
| label_10:
0x000131b8 movs r1, 1 | r1 = 1;
0x000131ba movw r0, 0x7020 | r0 = 0x7020;
0x000131be blx 0x4d1c | r0 = calloc (r0, r1);
0x000131c2 mov r7, r0 | r7 = r0;
0x000131c4 cmp r0, 0 |
| if (r0 == 0) {
0x000131c6 beq.w 0x1333e | goto label_27;
| }
0x000131ca add.w r2, r0, 0x20 | r2 = r0 + 0x20;
0x000131ce vmov.i8 d16, 0xff | __asm ("vmov.i8 d16, 0xff");
0x000131d2 movs r3, 0 | r3 = 0;
0x000131d4 movw fp, 0x660b |
0x000131d8 movs r1, 1 | r1 = 1;
0x000131da str r2, [sp, 0x1c] | var_1ch = r2;
0x000131dc movt fp, 0xc020 | fp = 0xc020660b;
0x000131e0 mov r2, r3 | r2 = r3;
0x000131e2 str r1, [r0, 0x10] | *((r0 + 0x10)) = r1;
0x000131e4 mov.w r1, 0x200 | r1 = 0x200;
0x000131e8 vstr d16, [r0, 8] | __asm ("vstr d16, [r0, 8]");
0x000131ec str r1, [r0, 0x18] | *((r0 + 0x18)) = r1;
| label_8:
0x000131ee strd r3, r2, [r7] | __asm ("strd r3, r2, [r7]");
0x000131f2 movs r1, 0 | r1 = 0;
0x000131f4 mov.w r2, 0x7000 | r2 = 0x7000;
0x000131f8 ldr r0, [sp, 0x1c] | r0 = var_1ch;
0x000131fa blx 0x5440 | fcn_00005440 ();
0x000131fe mov r2, r7 | r2 = r7;
0x00013200 mov r1, fp | r1 = fp;
0x00013202 mov r0, r5 | r0 = r5;
0x00013204 blx 0x513c | r0 = ss_set_prompt ();
0x00013208 subs.w sb, r0, 0 | sb = r0 - 0;
| if (sb < r0) {
0x0001320c blt 0x132ae | goto label_28;
| }
0x0001320e ldr r3, [r7, 0x14] | r3 = *((r7 + 0x14));
| if (r3 == 0) {
0x00013210 cbz r3, 0x1327e | goto label_29;
| }
0x00013212 add.w sb, r7, 0x58 | sb = r7 + 0x58;
0x00013216 movs r4, 0 | r4 = 0;
0x00013218 b 0x13226 |
| while (r0 == 0) {
0x0001321a ldr r0, [r7, 0x14] | r0 = *((r7 + 0x14));
0x0001321c adds r4, 1 | r4++;
0x0001321e add.w sb, sb, 0x38 | sb += 0x38;
0x00013222 cmp r4, r0 |
| if (r4 >= r0) {
0x00013224 bhs 0x132ea | goto label_30;
| }
0x00013226 ldrd r1, r3, [sb, -0x38] | __asm ("ldrd r1, r3, [sb, -0x38]");
0x0001322a strd r8, sl, [sp, 0x10] | __asm ("strd r8, sl, [var_10h]");
0x0001322e ldr r2, [sb, -0x28] | r2 = *((sb - 0x28));
0x00013232 ldr r0, [sb, -0x24] | r0 = *((sb - 0x24));
0x00013236 strd r1, r3, [sp] | __asm ("strd r1, r3, [sp]");
0x0001323a adds r2, r1, r2 | r2 = r1 + r2;
0x0001323c mov r1, r5 | r1 = r5;
0x0001323e adc.w r3, r3, r0 | __asm ("adc.w r3, r3, r0");
0x00013242 str r2, [sp, 8] | var_8h = r2;
0x00013244 mov r0, r6 | r0 = r6;
0x00013246 ldr r2, [sp, 0x18] | r2 = var_18h;
0x00013248 str r3, [sp, 0xc] | var_ch = r3;
0x0001324a bl 0x1264c | fcn_0001264c (r0, r1, r2, r3, r4, r5, r6);
0x0001324e mov r1, sb | r1 = sb;
0x00013250 cmp r0, 0 |
0x00013252 beq 0x1321a |
| }
0x00013254 mov r4, r0 | r4 = r0;
0x00013256 mov r0, r7 | r0 = r7;
0x00013258 blx 0x4ec4 | fcn_00004ec4 ();
0x0001325c movw r3, 0xb750 |
0x00013260 ldr r7, [sp, 0x2c] | r7 = var_2ch;
0x00013262 movt r3, 0x7f2b | r3 = 0x7f2bb750;
0x00013266 cmp r4, r3 |
| if (r4 == r3) {
0x00013268 beq 0x132c8 | goto label_31;
| }
0x0001326a mov r0, sl | r0 = sl;
0x0001326c blx 0x4ec4 | fcn_00004ec4 ();
0x00013270 mov r0, r8 | r0 = r8;
0x00013272 blx 0x4ec4 | fcn_00004ec4 ();
0x00013276 mov r0, r7 | r0 = r7;
0x00013278 blx 0x4e9c | ext2fs_file_close ();
0x0001327c b 0x12f1c | goto label_1;
| do {
| label_29:
0x0001327e mov r0, r7 | r0 = r7;
0x00013280 blx 0x4ec4 | fcn_00004ec4 ();
0x00013284 movw r3, 0xb750 |
0x00013288 movt r3, 0x7f2b | r3 = 0x7f2bb750;
0x0001328c cmp sb, r3 |
| if (sb == r3) {
0x0001328e beq 0x132c8 | goto label_31;
| }
| label_7:
0x00013290 mov r0, sl | r0 = sl;
0x00013292 blx 0x4ec4 | fcn_00004ec4 ();
0x00013296 mov r0, r8 | r0 = r8;
0x00013298 blx 0x4ec4 | fcn_00004ec4 ();
0x0001329c ldr r0, [sp, 0x2c] | r0 = var_2ch;
0x0001329e blx 0x4e9c | ext2fs_file_close ();
0x000132a2 cmp.w sb, 0 |
0x000132a6 ite ne |
| if (sb == 0) {
0x000132a8 movne r4, sb | r4 = sb;
| }
| if (sb != 0) {
0x000132aa moveq r4, r0 | r4 = r0;
| }
0x000132ac b 0x12f1c | goto label_1;
| label_28:
0x000132ae blx 0x53f4 | r0 = sprintf_chk ()
0x000132b2 ldr.w sb, [r0] | sb = *(r0);
0x000132b6 cmp.w sb, 0x5f |
| if (sb == 0x5f) {
0x000132ba beq 0x132c2 | goto label_32;
| }
0x000132bc cmp.w sb, 0x19 |
0x000132c0 bne 0x1327e |
| } while (sb != 0x19);
| label_32:
0x000132c2 mov r0, r7 | r0 = r7;
0x000132c4 blx 0x4ec4 | fcn_00004ec4 ();
| label_31:
0x000132c8 vmov.i32 d16, 0 | __asm ("vmov.i32 d16, 0");
0x000132cc mov r0, r6 | r0 = r6;
0x000132ce ldrd r6, r7, [sp, 0x60] | __asm ("ldrd r6, r7, [var_60h]");
0x000132d2 mov r1, r5 | r1 = r5;
0x000132d4 ldr r2, [sp, 0x2c] | r2 = var_2ch;
0x000132d6 strd r8, sl, [sp, 0x10] | __asm ("strd r8, sl, [var_10h]");
0x000132da vstr d16, [sp] | __asm ("vstr d16, [sp]");
0x000132de strd r6, r7, [sp, 8] | __asm ("strd r6, r7, [var_8h]");
0x000132e2 bl 0x1264c | r0 = fcn_0001264c (r0, r1, r2, r3, r4, r5, r6);
0x000132e6 mov sb, r0 | sb = r0;
0x000132e8 b 0x13290 | goto label_7;
| label_30:
0x000132ea ldr r2, [r1, -0x28] | r2 = *((r1 - 0x28));
0x000132ee ldr r3, [r1, -0x38] | r3 = *((r1 - 0x38));
0x000132f2 ldr r4, [r1, -0x24] | r4 = *((r1 - 0x24));
0x000132f6 adds r3, r3, r2 | r3 += r2;
0x000132f8 ldr r2, [r1, -0x34] | r2 = *((r1 - 0x34));
0x000132fc adc.w r2, r2, r4 | __asm ("adc.w r2, r2, r4");
0x00013300 cmp.w r0, 0x200 |
| if (r0 != 0x200) {
0x00013304 bne 0x13310 | goto label_33;
| }
0x00013306 ldr r1, [r1, -0x10] | r1 = *((r1 - 0x10));
0x0001330a lsls r1, r1, 0x1f | r1 <<= 0x1f;
| if (r1 >= r1) {
0x0001330c bpl.w 0x131ee | goto label_8;
| }
| label_33:
0x00013310 mov r0, r7 | r0 = r7;
0x00013312 blx 0x4ec4 | fcn_00004ec4 ();
0x00013316 b 0x130e8 | goto label_9;
| label_24:
0x00013318 blx 0x53f4 | r0 = sprintf_chk ()
0x0001331c ldr r3, [r0] | r3 = *(r0);
0x0001331e ldr r2, [sp, 0x2c] | r2 = var_2ch;
0x00013320 cmp r3, 6 |
0x00013322 str r2, [sp, 0x18] | var_18h = r2;
| if (r3 != 6) {
0x00013324 bne.w 0x131b8 | goto label_10;
| }
0x00013328 mov r0, sl | r0 = sl;
0x0001332a blx 0x4ec4 | fcn_00004ec4 ();
0x0001332e mov r0, r8 | r0 = r8;
0x00013330 blx 0x4ec4 | fcn_00004ec4 ();
0x00013334 ldr r0, [sp, 0x18] | r0 = var_18h;
0x00013336 blx 0x4e9c | r0 = ext2fs_file_close ();
0x0001333a mov r4, r0 | r4 = r0;
0x0001333c b 0x12f1c | goto label_1;
| label_27:
0x0001333e movw r4, 0xb746 |
0x00013342 movt r4, 0x7f2b | r4 = 0x7f2bb746;
0x00013346 b 0x131a0 | goto label_11;
| label_23:
0x00013348 mov r0, r8 | r0 = r8;
0x0001334a movw r4, 0xb746 |
0x0001334e blx 0x4ec4 | fcn_00004ec4 ();
0x00013352 ldr r0, [sp, 0x18] | r0 = var_18h;
0x00013354 movt r4, 0x7f2b | r4 = 0x7f2bb746;
0x00013358 blx 0x4e9c | ext2fs_file_close ();
0x0001335c b 0x12f1c | goto label_1;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/debugfs @ 0x13384 */
| #include <stdint.h>
|
; (fcn) fcn.00013384 () | void fcn_00013384 (int16_t arg_158h, int16_t arg_15ch, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_20h;
| int16_t var_24h;
| int16_t var_2ch;
| int16_t var_30h;
| int16_t var_38h;
| int16_t var_12ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00013384 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00013388 sub sp, 0x134 |
0x0001338a mov r4, r2 | r4 = r2;
0x0001338c ldr r2, [sp, 0x158] | r2 = *(arg_158h);
0x0001338e mov fp, r0 |
0x00013390 mov r0, r4 | r0 = r4;
0x00013392 str r3, [sp, 0x20] | var_20h = r3;
0x00013394 mov r5, r1 | r5 = r1;
0x00013396 str r2, [sp, 0x24] | var_24h = r2;
0x00013398 ldr.w r2, [pc, 0x7c8] |
0x0001339c ldr.w r3, [pc, 0x7c8] | r3 = *(0x13b68);
0x000133a0 add r2, pc | r2 = 0x26f08;
0x000133a2 ldr r3, [r2, r3] |
0x000133a4 ldr r3, [r3] | r3 = *(0x26f08);
0x000133a6 str r3, [sp, 0x12c] | var_12ch = r3;
0x000133a8 mov.w r3, 0 | r3 = 0;
0x000133ac ldrd sl, r3, [sp, 0x15c] | __asm ("ldrd sl, r3, [arg_15ch]");
0x000133b0 str r3, [sp, 0x1c] | var_1ch = r3;
0x000133b2 blx 0x50bc | fcn_000050bc ();
0x000133b6 ldr.w r3, [pc, 0x7b4] |
0x000133ba cmp r0, 0 |
0x000133bc add r3, pc | r3 = 0x26f2e;
| if (r0 < 0) {
0x000133be blt.w 0x13910 | goto label_0;
| }
0x000133c2 ldr.w r2, [pc, 0x7ac] | r2 = *(0x13b72);
0x000133c6 add r1, sp, 0x38 | r1 += var_38h;
0x000133c8 ldr.w r0, [pc, 0x7a8] |
0x000133cc ldr r3, [r3, r2] | r3 = *((r3 + r2));
0x000133ce movs r2, 0 | r2 = 0;
0x000133d0 add r0, pc | r0 = 0x26f48;
0x000133d2 blx 0x5800 | r0 = fcn_00005800 ();
0x000133d6 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 < r0) {
0x000133d8 blt.w 0x139e4 | goto label_1;
| }
| if (r7 == r0) {
0x000133dc beq.w 0x13726 | void (*0x13726)() ();
| }
0x000133e0 ldr.w r3, [pc, 0x794] |
0x000133e4 movs r4, 0 | r4 = 0;
0x000133e6 mov sb, r5 | sb = r5;
0x000133e8 str r7, [sp, 0x18] | var_18h = r7;
0x000133ea add r3, pc | r3 = 0x26f66;
0x000133ec adds r3, 0x4c | r3 += 0x4c;
0x000133ee str r3, [sp, 0x2c] | var_2ch = r3;
0x000133f0 movw r3, 0xb726 |
0x000133f4 movt r3, 0x7f2b | r3 = 0x7f2bb726;
0x000133f8 str r3, [sp, 0x30] | var_30h = r3;
0x000133fa b 0x1340e | void (*0x1340e)() ();
| label_0:
0x00013910 blx 0x53f4 | r0 = sprintf_chk ()
0x00013914 ldr r6, [r0] | r6 = *(r0);
0x00013916 mov r3, r4 | r3 = r4;
0x00013918 ldr r0, [pc, 0x2b4] |
0x0001391a ldr r2, [pc, 0x2b8] |
0x0001391c mov r1, r6 | r1 = r6;
0x0001391e add r0, pc | r0 = 0x274f2;
0x00013920 add r2, pc | r2 = 0x274fa;
0x00013922 adds r0, 0x4c | r0 += 0x4c;
0x00013924 blx 0x50d8 | fcn_000050d8 ();
0x00013928 b 0x1372e | void (*0x1372e)() ();
| label_1:
0x000139e4 blx 0x53f4 | r0 = sprintf_chk ()
0x000139e8 ldr r6, [r0] | r6 = *(r0);
0x000139ea mov r3, r4 | r3 = r4;
0x000139ec ldr r0, [pc, 0x1f8] |
0x000139ee ldr r2, [pc, 0x1fc] |
0x000139f0 mov r1, r6 | r1 = r6;
0x000139f2 add r0, pc | r0 = 0x275de;
0x000139f4 add r2, pc | r2 = 0x275e6;
0x000139f6 adds r0, 0x4c | r0 += 0x4c;
0x000139f8 blx 0x50d8 | fcn_000050d8 ();
0x000139fc b 0x1372e | return void (*0x1372e)() ();
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/debugfs @ 0x13c40 */
| #include <stdint.h>
|
; (fcn) fcn.00013c40 () | void fcn_00013c40 (int16_t arg_50h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_20h;
| int32_t var_20h_2;
| int16_t var_28h;
| int16_t var_2ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00013c40 push.w {r4, r5, r6, r7, r8, sb, lr} |
0x00013c44 mov r5, r0 | r5 = r0;
0x00013c46 ldr r4, [pc, 0xd4] |
0x00013c48 mov r7, r3 | r7 = r3;
0x00013c4a mov r8, r1 | r8 = r1;
0x00013c4c sub sp, 0x34 |
0x00013c4e ldr r0, [pc, 0xd0] | r0 = *(0x13d22);
0x00013c50 ldr r3, [r5, 8] | r3 = *((r5 + 8));
0x00013c52 add r4, pc | r4 = 0x27974;
0x00013c54 ldr.w sb, [sp, 0x50] | sb = *(arg_50h);
0x00013c58 ldr r0, [r4, r0] |
0x00013c5a ands r1, r3, 1 | r1 = r3 & 1;
0x00013c5e ldr r0, [r0] | r0 = *(0x27974);
0x00013c60 str r0, [sp, 0x2c] | var_2ch = r0;
0x00013c62 mov.w r0, 0 | r0 = 0;
0x00013c64 movs r0, r0 |
| if (r0 == r0) {
0x00013c66 beq 0x13cee | goto label_1;
| }
0x00013c68 movs r3, 4 | r3 = 4;
0x00013c6a movs r4, 0 | r4 = 0;
0x00013c6c movs r0, 0x60 | r0 = 0x60;
0x00013c6e mov r6, r2 | r6 = r2;
0x00013c70 strd r4, r3, [sp, 0x20] | __asm ("strd r4, r3, [var_20h]");
0x00013c74 blx 0x52bc | strerror (r0);
0x00013c78 str r0, [sp, 0x28] | var_28h = r0;
0x00013c7a cmp r0, 0 |
| if (r0 == 0) {
0x00013c7c beq 0x13d04 | goto label_2;
| }
0x00013c7e movs r0, 0xff | r0 = 0xff;
0x00013c80 movs r1, 1 | r1 = 1;
0x00013c82 str r4, [sp, 0x18] | var_18h = r4;
0x00013c84 str r0, [sp, 0x1c] | var_1ch = r0;
0x00013c86 blx 0x4d1c | calloc (r0, r1);
0x00013c8a mov r2, r6 | r2 = r6;
0x00013c8c str r0, [sp, 0x14] | var_14h = r0;
0x00013c8e mov r1, r7 | r1 = r7;
0x00013c90 mov r0, r5 | r0 = r5;
0x00013c92 bl 0x12784 | r0 = fcn_00012784 (r0, r1, r2);
0x00013c96 mov r4, r0 | r4 = r0;
| if (r0 != 0) {
0x00013c98 cbnz r0, 0x13cdc | goto label_3;
| }
0x00013c9a add r4, sp, 0x14 | r4 += var_14h;
0x00013c9c mov r3, r7 | r3 = r7;
0x00013c9e str r4, [sp, 4] | var_4h = r4;
0x00013ca0 add r4, sp, 0x20 | r4 += var_20h;
0x00013ca2 str r4, [sp] | *(sp) = r4;
0x00013ca4 mov r2, r6 | r2 = r6;
0x00013ca6 mov r1, r8 | r1 = r8;
0x00013ca8 mov r0, r5 | r0 = r5;
0x00013caa str.w sb, [sp, 8] | __asm ("str.w sb, [var_8h]");
0x00013cac str r0, [sp, 0x20] | *((sp + 0x20)) = r0;
0x00013cae bl 0x13384 | r0 = fcn_00013384 (r0, r1, r2, r3, r4, r5);
0x00013cb2 mov r4, r0 | r4 = r0;
0x00013cb4 ldr r0, [sp, 0x14] | r0 = var_14h;
0x00013cb6 blx 0x4ec4 | fcn_00004ec4 ();
0x00013cba ldr r0, [sp, 0x28] | r0 = var_28h;
0x00013cbc blx 0x4ec4 | fcn_00004ec4 ();
| do {
| label_0:
0x00013cc0 ldr r2, [pc, 0x60] |
0x00013cc2 ldr r3, [pc, 0x5c] | r3 = *(0x13d22);
0x00013cc4 add r2, pc | r2 = 0x279ec;
0x00013cc6 ldr r3, [r2, r3] | r3 = *(0x279ec);
0x00013cc8 ldr r2, [r3] | r2 = *(0x279ec);
0x00013cca ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x00013ccc eors r2, r3 | r2 ^= r3;
0x00013cce mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00013cd2 bne 0x13d00 | goto label_4;
| }
0x00013cd4 mov r0, r4 | r0 = r4;
0x00013cd6 add sp, 0x34 |
0x00013cd8 pop.w {r4, r5, r6, r7, r8, sb, pc} |
| label_3:
0x00013cdc ldr r0, [pc, 0x48] |
0x00013cde mov r1, r4 | r1 = r4;
0x00013ce0 ldr r2, [pc, 0x48] |
0x00013ce2 add r0, pc | r0 = 0x27a0e;
0x00013ce4 add r2, pc | r2 = 0x27a14;
0x00013ce6 adds r0, 0x78 | r0 += 0x78;
0x00013ce8 blx 0x50d8 | fcn_000050d8 ();
0x00013cea ldrd lr, r7, [r6, 0x388]! | __asm ("ldrd lr, r7, [r6, 0x388]!");
| label_1:
0x00013cee ldr r0, [pc, 0x40] |
0x00013cf0 movs r4, 0x1e | r4 = 0x1e;
0x00013cf2 ldr r2, [pc, 0x40] |
0x00013cf4 add r0, pc | r0 = 0x27a2a;
0x00013cf6 add r2, pc | r2 = 0x27a30;
0x00013cf8 adds r0, 0x78 | r0 += 0x78;
0x00013cfa blx 0x50d8 | fcn_000050d8 ();
0x00013cfe b 0x13cc0 |
| } while (1);
| label_4:
0x00013d00 blx 0x5008 | fcn_00005008 ();
| label_2:
0x00013d04 blx 0x53f4 | r0 = sprintf_chk ()
0x00013d08 ldr r4, [r0] | r4 = *(r0);
0x00013d0a ldr r0, [pc, 0x2c] |
0x00013d0c ldr r2, [pc, 0x2c] |
0x00013d0e mov r1, r4 | r1 = r4;
0x00013d10 add r0, pc | r0 = 0x27a4e;
0x00013d12 add r2, pc | r2 = 0x27a52;
0x00013d14 adds r0, 0x78 | r0 += 0x78;
0x00013d16 blx 0x50d8 | fcn_000050d8 ();
0x00013d1a b 0x13cc0 | goto label_0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/debugfs @ 0x169a4 */
| #include <stdint.h>
|
| #define SWAP32(n) ((uint32_t) (((n & 0x000000ff) << 24) | \
| ((n & 0x0000ff00) << 8) | \
| ((n & 0x00ff0000) >> 8) | \
| ((n & 0xff000000) >> 24)))
|
; (fcn) fcn.000169a4 () | void fcn_000169a4 (int16_t arg_50h, int16_t arg_54h, int16_t arg_5ch, int16_t arg_60h, int16_t arg_64h, int16_t arg_68h, int16_t arg_6ch, int16_t arg_70h, int16_t arg_74h, int16_t arg_78h, int16_t arg_7ch, int16_t arg1) {
| int16_t var_7ch;
| int16_t var_0h_2;
| int16_t var_4h_2;
| int32_t var_4h_3;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_14h_2;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_20h;
| int16_t var_24h;
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_30h;
| int16_t var_34h;
| int16_t var_38h;
| int16_t var_14h;
| int16_t var_40h;
| int16_t var_44h;
| int16_t var_48h;
| int16_t var_4ch;
| r0 = arg1;
0x000169a4 push {r4, r5, r6, lr} |
0x000169a6 sub sp, 0x18 |
0x000169a8 ldr r4, [pc, 0xa0] |
0x000169aa movs r2, 0 | r2 = 0;
0x000169ac mov r6, sp | r6 = sp;
0x000169ae mov r5, r0 | r5 = r0;
0x000169b0 ldr r3, [r0, 0xc] | r3 = *(arg_50hxc);
0x000169b2 ldr r1, [pc, 0x9c] | r1 = *(0x16a52);
0x000169b4 add r4, pc | r4 = 0x2d404;
0x000169b6 ldr r1, [r4, r1] |
0x000169b8 ldr r4, [r3, 0x1c] | r4 = *((r3 + 0x1c));
0x000169ba ldr r1, [r1] | r1 = *(0x2d404);
0x000169bc str r1, [sp, 0x14] | var_14h = r1;
0x000169be mov.w r1, 0 | r1 = 0;
0x000169c2 str r2, [sp] | *(sp) = r2;
0x000169c4 strd r2, r2, [r6, 4] | __asm ("strd r2, r2, [var_4h]");
0x000169c8 strd r2, r2, [r6, 0xc] | __asm ("strd r2, r2, [var_34h]");
| if (r4 != 0) {
0x000169cc cbnz r4, 0x169f0 | goto label_22;
| }
0x000169ce ldr r3, [r3, 0x18] | r3 = *((r3 + 0x18));
0x000169d0 rev r3, r3 | r3 = SWAP32 (r3);
0x000169d2 adds r3, 1 | r3++;
0x000169d4 str r3, [r0, 0x50] | *(arg_50hx50) = r3;
| do {
| label_1:
0x000169d6 ldr r2, [pc, 0x7c] |
0x000169d8 ldr r3, [pc, 0x74] | r3 = *(0x16a50);
0x000169da add r2, pc | r2 = 0x2d434;
| label_2:
0x000169dc ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x000169de ldr r2, [r3] | r2 = *(r3);
0x000169e0 ldr r3, [sp, 0x14] | r3 = var_14h;
0x000169e2 eors r2, r3 | r2 ^= r3;
0x000169e4 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x000169e8 bne 0x16a46 | goto label_23;
| }
0x000169ea mov r0, r4 | r0 = r4;
0x000169ec add sp, 0x18 |
0x000169ee pop {r4, r5, r6, pc} |
| label_22:
0x000169f0 mov r1, r6 | r1 = r6;
0x000169f2 bl 0x161fc | r0 = fcn_000161fc (r0, r1, r2, r3, r4, r5, r6);
0x000169f6 mov r4, r0 | r4 = r0;
| if (r0 == 0) {
0x000169f8 cbz r0, 0x16a0e | goto label_24;
| }
| label_0:
0x000169fa ldr r3, [sp, 4] | r3 = var_4h;
0x000169fc mov r0, r5 | r0 = r5;
0x000169fe adds r3, 1 | r3++;
0x00016a00 str r3, [r5, 0x50] | *((r5 + 0x50)) = r3;
0x00016a02 bl 0x16008 | fcn_00016008 (r0);
0x00016a06 ldr r0, [r5, 0x38] | r0 = *((r5 + 0x38));
0x00016a08 bl 0x15160 | fcn_00015160 (r0, r1);
0x00016a0c b 0x169d6 |
| } while (1);
| label_24:
0x00016a0e movs r2, 1 | r2 = 1;
0x00016a10 mov r1, r6 | r1 = r6;
0x00016a12 mov r0, r5 | r0 = r5;
0x00016a14 bl 0x161fc | r0 = fcn_000161fc (r0, r1, r2, r3, r4, r5, r6);
0x00016a18 mov r4, r0 | r4 = r0;
0x00016a1a cmp r0, 0 |
| if (r0 != 0) {
0x00016a1c bne 0x169fa | goto label_0;
| }
0x00016a1e mov r1, r6 | r1 = r6;
| do {
0x00016a20 movs r2, 2 | r2 = 2;
0x00016a22 mov r0, r5 | r0 = r5;
0x00016a24 bl 0x161fc | fcn_000161fc (r0, r1, r2, r3, r4, r5, r6);
0x00016a28 ldr r3, [sp, 4] | r3 = var_4h;
0x00016a2a mov r6, r0 | r6 = r0;
0x00016a2c mov r0, r5 | r0 = r5;
0x00016a2e adds r3, 1 | r3++;
0x00016a30 str r3, [r5, 0x50] | *((r5 + 0x50)) = r3;
0x00016a32 bl 0x16008 | fcn_00016008 (r0);
0x00016a36 ldr r0, [r5, 0x38] | r0 = *((r5 + 0x38));
0x00016a38 bl 0x15160 | fcn_00015160 (r0, r1);
0x00016a3c cmp r6, 0 |
0x00016a3e ite ne |
| if (r6 == 0) {
0x00016a40 movne r4, r6 | r4 = r6;
| }
| if (r6 != 0) {
0x00016a42 moveq r4, r0 | r4 = r0;
| }
0x00016a44 b 0x169d6 | goto label_1;
| label_23:
0x00016a46 blx 0x5008 | fcn_00005008 ();
0x00016a4a nop |
0x00016a4c bne 0x16a20 |
| } while (r6 != 0);
0x00016a4e movs r1, r0 | r1 = r0;
0x00016a50 lsls r0, r2, 0x10 | r0 = r2 << 0x10;
0x00016a52 movs r0, r0 |
| if (r0 != r0) {
0x00016a54 bne 0x169dc | goto label_2;
| }
0x00016a56 movs r1, r0 | r1 = r0;
0x00016a58 ldr r1, [pc, 0x64] |
0x00016a5a movs r2, 0 | r2 = 0;
0x00016a5c ldr r3, [pc, 0x64] | r3 = *(0x16ac4);
0x00016a5e push {r4, r5, lr} |
0x00016a60 sub sp, 0x1c |
0x00016a62 add r1, pc | r1 = 0x2d526;
0x00016a64 mov r4, r0 | r4 = r0;
0x00016a66 ldr r3, [r1, r3] |
0x00016a68 mov r1, sp | r1 = sp;
0x00016a6a ldr r3, [r3] | r3 = *(0x2d526);
0x00016a6c str r3, [sp, 0x14] | var_14h_2 = r3;
0x00016a6e mov.w r3, 0 | r3 = 0;
0x00016a72 str r2, [sp] | *(sp) = r2;
0x00016a74 strd r2, r2, [r1, 4] | __asm ("strd r2, r2, [var_4h_2]");
0x00016a78 strd r2, r2, [r1, 0xc] | __asm ("strd r2, r2, [var_10h]");
0x00016a7c bl 0x161fc | r0 = fcn_000161fc (r0, r1, r2, r3, r4, r5, r6);
0x00016a80 mov r5, r0 | r5 = r0;
| if (r0 != 0) {
0x00016a82 cbnz r0, 0x16aa8 | goto label_25;
| }
0x00016a84 ldr r3, [sp, 4] | r3 = var_4h_2;
0x00016a86 adds r3, 1 | r3++;
| do {
0x00016a88 movs r2, 0 | r2 = 0;
0x00016a8a str r3, [r4, 0x50] | *((r4 + 0x50)) = r3;
0x00016a8c str r2, [r4, 0x18] | *((r4 + 0x18)) = r2;
0x00016a8e ldr r2, [pc, 0x38] |
0x00016a90 ldr r3, [pc, 0x30] | r3 = *(0x16ac4);
0x00016a92 add r2, pc | r2 = 0x2d560;
0x00016a94 ldr r3, [r2, r3] | r3 = *(0x2d560);
0x00016a96 ldr r2, [r3] | r2 = *(0x2d560);
0x00016a98 ldr r3, [sp, 0x14] | r3 = var_14h_2;
0x00016a9a eors r2, r3 | r2 ^= r3;
0x00016a9c mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00016aa0 bne 0x16aba | goto label_26;
| }
0x00016aa2 mov r0, r5 | r0 = r5;
0x00016aa4 add sp, 0x1c |
0x00016aa6 pop {r4, r5, pc} |
| label_25:
0x00016aa8 ldr r1, [pc, 0x20] |
0x00016aaa mov r2, r0 | r2 = r0;
0x00016aac movs r0, 1 | r0 = 1;
0x00016aae add r1, pc | r1 = 0x2d57e;
0x00016ab0 blx 0x54bc | fcn_000054bc ();
0x00016ab4 ldr r3, [r4, 0x50] | r3 = *((r4 + 0x50));
0x00016ab6 adds r3, 1 | r3++;
0x00016ab8 b 0x16a88 |
| } while (1);
| label_26:
0x00016aba blx 0x5008 | fcn_00005008 ();
0x00016abe nop |
| if (r3 != 1) {
0x00016ac0 bne 0x16b38 | goto label_27;
| }
0x00016ac2 movs r1, r0 | r1 = r0;
0x00016ac4 lsls r0, r2, 0x10 | r0 = r2 << 0x10;
0x00016ac6 movs r0, r0 |
| if (r0 == r0) {
0x00016ac8 bne 0x16ae0 |
0x00016aca movs r1, r0 | r1 = r0;
| if (r6 == 0) {
0x00016acc cbz r6, 0x16afa | goto label_28;
| }
0x00016ace movs r0, r0 |
0x00016ad0 ldr.w r3, [pc, 0x9ac] | r3 = *(0x17480);
0x00016ad4 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00016ad8 mov r5, r1 | r5 = r1;
0x00016ada ldr.w r1, [pc, 0x9a8] | r1 = *(0x17486);
0x00016ade sub sp, 0x84 |
| }
0x00016ae0 add r3, pc | r3 += pc;
0x00016ae2 movs r4, 0 | r4 = 0;
0x00016ae4 ldr.w r2, [pc, 0x9a0] |
0x00016ae8 add r1, pc | r1 += pc;
0x00016aea ldr r3, [r3] | r3 = *(r3);
0x00016aec ldr.w r8, [pc, 0x99c] |
0x00016af0 ldr r2, [r1, r2] | r2 = *((r1 + r2));
0x00016af2 add r8, pc | r8 = 0x2df82;
0x00016af4 ldr r2, [r2] | r2 = *(0x17488);
0x00016af6 str r2, [sp, 0x7c] | *(arg_7ch) = r2;
0x00016af8 invalid |
| label_28:
0x00016afa lsls r0, r0, 8 | r0 <<= 8;
0x00016afc strd r4, r4, [sp, 0x5c] | __asm ("strd r4, r4, [sp, 0x5c]");
0x00016b00 strd r4, r4, [sp, 0x64] | __asm ("strd r4, r4, [sp, 0x64]");
0x00016b04 cmp r3, 0 |
| if (r3 == 0) {
0x00016b06 beq 0x16bde | goto label_29;
| }
0x00016b08 ldr.w r6, [pc, 0x984] |
0x00016b0c add.w sb, sp, 0x68 | sb += arg_68h;
0x00016b10 mov r7, r0 | r7 = r0;
0x00016b12 bl 0xa514 | fcn_0000a514 ();
0x00016b16 add r6, pc | r6 = 0x2dfaa;
| do {
| label_4:
0x00016b18 mov r1, r5 | r1 = r5;
0x00016b1a mov r2, r6 | r2 = r6;
0x00016b1c mov r0, r7 | r0 = r7;
0x00016b1e blx 0x53b8 | r0 = e2p_str2encoding ();
0x00016b22 adds r1, r0, 1 | r1 = r0 + 1;
| if (r1 == r0) {
0x00016b24 beq 0x16bea | goto label_30;
| }
0x00016b26 cmp r0, 0x63 |
| if (r0 == 0x63) {
0x00016b28 beq 0x16bda | goto label_31;
| }
0x00016b2a cmp r0, 0x72 |
| if (r0 == 0x72) {
0x00016b2c beq 0x16bb4 | goto label_32;
| }
0x00016b2e cmp r0, 0x62 |
| if (r0 != 0x62) {
0x00016b30 beq 0x16b8e |
0x00016b32 ldr.w r1, [pc, 0x960] | r1 = *(0x17496);
0x00016b36 movs r0, 1 | r0 = 1;
| label_27:
0x00016b38 ldr r2, [r5] | r2 = *(r5);
0x00016b3a add r1, pc | r1 += pc;
0x00016b3c blx 0x54bc | fcn_000054bc ();
0x00016b40 ldr.w r0, [pc, 0x954] |
0x00016b44 add r0, pc | r0 = 0x2dfe0;
0x00016b46 blx 0x5294 | fcn_00005294 ();
0x00016b4a ldr.w r0, [pc, 0x950] |
0x00016b4e add r0, pc | r0 = 0x2dff0;
0x00016b50 blx 0x5294 | fcn_00005294 ();
0x00016b54 ldr.w r0, [pc, 0x948] |
0x00016b58 add r0, pc | r0 = 0x2dffc;
0x00016b5a blx 0x5294 | fcn_00005294 ();
| label_3:
0x00016b5e ldr r0, [sp, 0x5c] | r0 = *(arg_5ch);
| if (r0 != 0) {
0x00016b60 cbz r0, 0x16b66 |
0x00016b62 blx 0x4ec4 | fcn_00004ec4 ();
| }
0x00016b66 ldr r0, [sp, 0x60] | r0 = *(arg_60h);
| if (r0 != 0) {
0x00016b68 cbz r0, 0x16b6e |
0x00016b6a blx 0x4ec4 | fcn_00004ec4 ();
| }
| label_5:
0x00016b6e ldr.w r2, [pc, 0x934] |
0x00016b72 ldr.w r3, [pc, 0x914] | r3 = *(0x1748a);
0x00016b76 add r2, pc | r2 = 0x2e020;
0x00016b78 ldr r3, [r2, r3] | r3 = *(0x2e020);
0x00016b7a ldr r2, [r3] | r2 = *(0x2e020);
0x00016b7c ldr r3, [sp, 0x7c] | r3 = *(arg_7ch);
0x00016b7e eors r2, r3 | r2 ^= r3;
0x00016b80 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00016b84 bne.w 0x17408 | goto label_33;
| }
0x00016b88 add sp, 0x84 |
0x00016b8a pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
0x00016b8e ldr.w r3, [pc, 0x918] | r3 = *(0x174aa);
0x00016b92 add r2, sp, 0x64 | r2 += arg_64h;
0x00016b94 add r1, sp, 0x5c | r1 += arg_5ch;
0x00016b96 ldr.w r3, [r8, r3] | r3 = *((r8 + r3));
0x00016b98 adds r0, 3 | r0 += 3;
0x00016b9a ldr r0, [r3] | r0 = *(0x174aa);
0x00016b9c bl 0xb0e4 | fcn_0000b0e4 (r0, r1, r2);
0x00016b9e invalid |
0x00016ba2 beq 0x16b18 |
| } while (r0 == 3);
0x00016ba4 ldr.w r2, [pc, 0x904] |
0x00016ba8 mov r1, r0 | r1 = r0;
0x00016baa ldr r0, [r5] | r0 = *(r5);
0x00016bac add r2, pc | r2 = 0x2e05c;
0x00016bae blx 0x50d8 | fcn_000050d8 ();
0x00016bb2 b 0x16b5e | goto label_3;
| label_32:
0x00016bb4 ldr.w r3, [pc, 0x8f0] | r3 = *(0x174a8);
0x00016bb8 mov r2, sb | r2 = sb;
0x00016bba add r1, sp, 0x60 | r1 += arg_60h;
0x00016bbc ldr.w r3, [r8, r3] | r3 = *((r8 + r3));
0x00016bc0 ldr r0, [r3] | r0 = *(0x174a8);
0x00016bc2 bl 0xb0e4 | r0 = fcn_0000b0e4 (r0, r1, r2);
0x00016bc6 cmp r0, 0 |
| if (r0 == 0) {
0x00016bc8 beq 0x16b18 | goto label_4;
| }
0x00016bca ldr.w r2, [pc, 0x8e4] |
0x00016bce mov r1, r0 | r1 = r0;
0x00016bd0 ldr r0, [r5] | r0 = *(r5);
0x00016bd2 add r2, pc | r2 = 0x2e088;
0x00016bd4 blx 0x50d8 | fcn_000050d8 ();
0x00016bd8 b 0x16b5e | goto label_3;
| label_31:
0x00016bda movs r4, 1 | r4 = 1;
0x00016bdc b 0x16b18 | goto label_4;
| label_29:
0x00016bde ldr.w r0, [pc, 0x8d4] |
0x00016be2 add r0, pc | r0 = 0x2e09c;
0x00016be4 blx 0x5294 | fcn_00005294 ();
0x00016be8 b 0x16b6e | goto label_5;
| label_30:
0x00016bea ldr r6, [sp, 0x64] | r6 = *(arg_64h);
0x00016bec cmp r6, 0 |
| if (r6 != 0) {
0x00016bee bne.w 0x16f1a | goto label_34;
| }
0x00016bf2 str r6, [sp, 0xc] | var_ch = r6;
| label_7:
0x00016bf4 ldr.w r3, [pc, 0x8c0] |
0x00016bf8 ldr r2, [sp, 0x5c] | r2 = *(arg_5ch);
0x00016bfa add r3, pc | r3 = 0x2e0b6;
0x00016bfc ldr r5, [r3] | r5 = *(0x2e0b6);
0x00016bfe ldr r3, [sp, 0x68] | r3 = *(arg_68h);
0x00016c00 str r2, [sp, 0x1c] | var_1ch = r2;
0x00016c02 ldr r2, [sp, 0x60] | r2 = *(arg_60h);
0x00016c04 str r3, [sp, 0x10] | var_10h = r3;
0x00016c06 str r2, [sp, 0x34] | var_34h = r2;
0x00016c08 cmp r3, 0 |
| if (r3 != 0) {
0x00016c0a bne.w 0x16f86 | goto label_35;
| }
0x00016c0e ldr.w fp, [r5, 0x10] | fp = *((r5 + 0x10));
0x00016c12 ldr r7, [r5, 0x3c] | r7 = *((r5 + 0x3c));
0x00016c14 cmp.w fp, 1 |
0x00016c18 sub.w sb, r7, 0x10 | sb = r7 - 0x10;
| if (fp <= 1) {
0x00016c1c ble.w 0x16f98 | goto label_36;
| }
0x00016c20 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x00016c22 ldr r3, [r3, 0x28] | r3 = *((r3 + 0x28));
0x00016c24 and r2, r3, 0x8000000 | r2 = r3 & 0x8000000;
0x00016c26 str r0, [r0, 0x20] | *((r0 + 0x20)) = r0;
0x00016c28 and r8, r3, 0x10000000 | r8 = r3 & 0x10000000;
0x00016c2c and sl, r3, 0x2000000 | sl = r3 & 0x2000000;
0x00016c30 ands r3, r3, 0x18000000 | r3 &= 0x18000000;
0x00016c32 strh r0, [r0, r7] | *((r0 + r7)) = r0;
0x00016c34 str r2, [sp, 0x14] | var_14h_2 = r2;
| if (r3 != r3) {
0x00016c36 bne.w 0x16f5c | goto label_37;
| }
0x00016c3a cmp.w sl, 0 |
| if (sl != 0) {
0x00016c3e bne.w 0x16fd4 | goto label_38;
| }
0x00016c42 ldr r3, [sp, 0x10] | r3 = var_10h;
0x00016c44 mov r2, r7 | r2 = r7;
0x00016c46 lsls r0, r3, 2 | r0 = r3 << 2;
0x00016c48 lsrs r1, r3, 0x1e | r1 = r3 >> 0x1e;
0x00016c4a mov r3, sl | r3 = sl;
0x00016c4c bl 0x1be20 | r0 = fcn_0001be20 (r0, r1, r2, r3);
0x00016c50 adds r2, r0, 1 | r2 = r0 + 1;
0x00016c52 adc r3, r1, 0 | __asm ("adc r3, r1, 0");
| label_9:
0x00016c56 cmp.w r8, 0 |
| if (r8 == 0) {
0x00016c5a beq.w 0x16f44 | goto label_39;
| }
0x00016c5e movs r0, 0x10 | r0 = 0x10;
0x00016c60 mov.w r8, 0 | r8 = 0;
| label_8:
0x00016c64 umull r0, r1, r6, r0 | r0:r1 = r6 * r0;
0x00016c68 adds.w sl, r6, r2 | sl = r6 + r2;
0x00016c6c mov r2, sb | r2 = sb;
0x00016c6e adc sb, r3, 0 | __asm ("adc sb, r3, 0");
0x00016c72 movs r3, 0 | r3 = 0;
0x00016c74 mla r1, r6, r8, r1 | __asm ("mla r1, r6, r8, r1");
0x00016c78 bl 0x1be20 | fcn_0001be20 (r0, r1, r2, r3);
0x00016c7c ldr r2, [r5, 0x38] | r2 = *((r5 + 0x38));
0x00016c7e adds.w r0, r0, sl | r0 += sl;
0x00016c82 ldr r3, [r5, 0x18] | r3 = *((r5 + 0x18));
0x00016c84 adc.w sb, sb, r1 | __asm ("adc.w sb, sb, r1");
0x00016c88 ldr r2, [r2] | r2 = *(r2);
0x00016c8a str r2, [sp, 0x2c] | var_4h = r2;
0x00016c8c ldrd r2, r1, [r5, 0x4c] | __asm ("ldrd r2, r1, [r5, 0x4c]");
0x00016c90 str r1, [sp, 0x18] | var_18h = r1;
0x00016c92 cmp r3, 0 |
| if (r3 != 0) {
0x00016c94 bne.w 0x16f7c | goto label_40;
| }
0x00016c98 str r3, [sp, 0x30] | var_30h = r3;
0x00016c9a ldr r3, [r5, 0x2c] | r3 = *((r5 + 0x2c));
0x00016c9c str r2, [sp, 0x18] | var_18h = r2;
0x00016c9e str r3, [sp, 0x14] | var_14h_2 = r3;
| label_10:
0x00016ca0 ldr r3, [sp, 0x14] | r3 = var_14h_2;
0x00016ca2 ldr r2, [r5, 0x30] | r2 = *((r5 + 0x30));
0x00016ca4 adds r1, r0, r3 | r1 = r0 + r3;
0x00016ca6 mov.w r3, 0 | r3 = 0;
0x00016caa adc sb, sb, 0 | __asm ("adc sb, sb, 0");
0x00016cae cmp r2, r1 |
0x00016cb0 sbcs.w sb, r3, sb | __asm ("sbcs.w sb, r3, sb");
0x00016cb4 str r1, [sp, 0x3c] | var_14h = r1;
| if (r2 <= r1) {
0x00016cb6 blo.w 0x16fe8 | goto label_41;
| }
0x00016cba str r3, [sp, 0x70] | *(arg_70h) = r3;
0x00016cbc cmp r6, 0 |
| if (r6 == 0) {
0x00016cbe beq.w 0x1700a | goto label_42;
| }
0x00016cc2 cmp.w fp, 1 |
0x00016cc6 it le |
| if (fp > 1) {
0x00016cc8 strle r3, [sp, 0x44] | var_44h = r3;
| }
| if (fp > 1) {
0x00016cca ble 0x16cde |
0x00016ccc ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x00016cce ldr r3, [r3, 0x28] | r3 = *((r3 + 0x28));
0x00016cd0 tst.w r3, 0x18000000 |
0x00016cd4 ite ne |
| if ((r3 & 0x18000000) == 0) {
0x00016cd6 movne r3, 1 | r3 = 1;
| }
| if ((r3 & 0x18000000) != 0) {
0x00016cd8 moveq r3, 0 | r3 = 0;
| }
0x00016cda lsls r3, r3, 2 | r3 <<= 2;
0x00016cdc str r3, [sp, 0x44] | var_44h = r3;
| }
0x00016cde ldr r0, [r5, 0x34] | r0 = *((r5 + 0x34));
0x00016ce0 movs r3, 0 | r3 = 0;
0x00016ce2 ldr r2, [sp, 0x14] | r2 = var_14h_2;
0x00016ce4 str r7, [sp] | *(sp) = r7;
0x00016ce6 bl 0x15130 | fcn_00015130 (r0, r1, r2);
0x00016cea str r0, [sp, 0x38] | var_38h = r0;
0x00016cec str r0, [sp, 0x74] | *(arg_74h) = r0;
0x00016cee cmp r0, 0 |
| if (r0 == 0) {
0x00016cf0 beq.w 0x17274 | goto label_43;
| }
0x00016cf4 ldr r3, [r5, 0x3c] | r3 = *((r5 + 0x3c));
0x00016cf6 ldr r7, [sp, 0x14] | r7 = var_14h_2;
0x00016cf8 ldr r0, [r5, 0x34] | r0 = *((r5 + 0x34));
0x00016cfa str r3, [sp] | *(sp) = r3;
0x00016cfc movs r3, 0 | r3 = 0;
0x00016cfe mov r2, r7 | r2 = r7;
0x00016d00 bl 0x15130 | r0 = fcn_00015130 (r0, r1, r2);
0x00016d04 mov r3, r0 | r3 = r0;
0x00016d06 str r0, [sp, 0x70] | *(arg_70h) = r0;
0x00016d08 cmp r0, 0 |
| if (r0 == 0) {
0x00016d0a beq.w 0x17252 | goto label_44;
| }
0x00016d0e mov.w ip, 0x3bc0 |
0x00016d12 ldr r0, [sp, 0x74] | r0 = *(arg_74h);
0x00016d14 mov r2, ip | r2 = ip;
0x00016d16 add.w r1, r3, 0x2c | r1 = r3 + 0x2c;
0x00016d1a movt r2, 0x9839 | r2 = (r2 & 0xFFFF) | 0x98390000;
0x00016d1e add.w ip, r3, 0x20 |
0x00016d22 str r2, [sp, 0x4c] | var_4ch = r2;
0x00016d24 mov r8, r1 | r8 = r1;
0x00016d26 str r2, [r3, 0x20] | *((r3 + 0x20)) = r2;
0x00016d28 mov.w fp, 0 |
0x00016d2c ldr r2, [sp, 0x30] | r2 = var_30h;
0x00016d2e str r7, [sp, 0x14] | var_14h_2 = r7;
0x00016d30 adds r7, 1 | r7++;
0x00016d32 str r1, [sp, 0x28] | var_0h = r1;
0x00016d34 add r1, sp, 0x70 | r1 += arg_70h;
0x00016d36 str.w ip, [sp, 0x40] | __asm ("str.w ip, [var_40h]");
0x00016d3a adc ip, r2, 0 | __asm ("adc ip, r2, 0");
0x00016d3e ldr r2, [sp, 0x14] | r2 = var_14h_2;
0x00016d40 mov sl, ip | sl = ip;
0x00016d42 str r1, [sp, 0x50] | *(arg_50h) = r1;
0x00016d44 ldr r1, [sp, 0x18] | r1 = var_18h;
0x00016d46 str r2, [sp, 0x48] | var_48h = r2;
0x00016d48 mov.w r2, 0x1000000 | r2 = 0x1000000;
0x00016d4a strb r0, [r0, 0xa] | *((r0 + 0xa)) = r0;
0x00016d4c str r2, [r3, 0x24] | *((r3 + 0x24)) = r2;
0x00016d4e rev r2, r1 | r1 = SWAP32 (r2);
0x00016d50 ldr.w sb, [sp, 0x1c] | sb = var_1ch;
0x00016d54 str.w ip, [sp, 0x20] | __asm ("str.w ip, [var_20h]");
0x00016d58 str r2, [r3, 0x28] | *((r3 + 0x28)) = r2;
0x00016d5a str r6, [sp, 0x1c] | var_1ch = r6;
0x00016d5c str r4, [sp, 0x54] | *(arg_54h) = r4;
0x00016d5e b 0x16e1a |
| while (r3 != r8) {
0x00016d60 mov.w r3, 0x200 | r3 = 0x200;
0x00016d64 strh.w r3, [r8, 6] | *((r8 + 6)) = r3;
| label_6:
0x00016d68 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x00016d6a ldr r2, [sp, 0x4c] | r2 = var_4ch;
0x00016d6c subs r3, 1 | r3--;
0x00016d6e cmp r3, fp |
0x00016d70 ittt eq |
| if (r3 == fp) {
0x00016d72 ldrheq r3, [r8, 6] | __asm ("ldrheq r3, [r8, 6]");
| }
| if (r3 != fp) {
0x00016d76 orreq r3, r3, 0x800 | r3 |= 0x800;
| }
| if (r3 == fp) {
0x00016d7a strh.w r3, [r8, 6] | *((r8 + 6)) = r3;
| }
0x00016d7e ldr r3, [sp, 0x38] | r3 = var_38h;
0x00016d80 ldr r3, [r3, 0x20] | r3 = *((r3 + 0x20));
0x00016d82 cmp r3, r2 |
| if (r3 == r2) {
0x00016d84 bne 0x16d98 |
0x00016d86 ldrh.w r3, [r8, 6] | r3 = *((r8 + 6));
0x00016d8a movs r2, 0 | r2 = 0;
0x00016d8c ldr r1, [sp, 0x38] | r1 = var_38h;
0x00016d8e orr r3, r3, 0x100 | r3 |= 0x100;
0x00016d92 str r2, [r1, 0x20] | *((r1 + 0x20)) = r2;
0x00016d94 strh.w r3, [r8, 6] | *((r8 + 6)) = r3;
| }
0x00016d98 ldr r3, [r5, 0x10] | r3 = *((r5 + 0x10));
0x00016d9a cmp r3, 1 |
| if (r3 > 1) {
0x00016d9c ble 0x16dc4 |
0x00016d9e ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x00016da0 ldr r3, [r3, 0x28] | r3 = *((r3 + 0x28));
0x00016da2 lsls r0, r3, 6 | r0 = r3 << 6;
| if (r0 >= r3) {
0x00016da4 bpl 0x16dc4 | goto label_45;
| }
0x00016da6 ldr.w r3, [sb, 4] | r3 = *((sb + 4));
0x00016daa lsls r2, r3, 0x18 | r2 = r3 << 0x18;
0x00016dac lsrs r1, r3, 8 | r1 = r3 >> 8;
0x00016dae orr.w r2, r2, r3, lsr 24 | r2 |= (r3 >> 24);
0x00016db2 lsls r3, r3, 8 | r3 <<= 8;
0x00016db4 and r1, r1, 0xff00 | r1 &= 0xff00;
0x00016db8 and r3, r3, 0xff0000 | r3 &= 0xff0000;
0x00016dbc orrs r2, r1 | r2 |= r1;
0x00016dbe orrs r3, r2 | r3 |= r2;
0x00016dc0 str.w r3, [r8, 8] | __asm ("str.w r3, [r8, 8]");
| }
| label_45:
0x00016dc4 ldr r2, [sp, 0x74] | r2 = *(arg_74h);
0x00016dc6 mov r1, r8 | r1 = r8;
0x00016dc8 ldr r3, [sp, 0x18] | r3 = var_18h;
0x00016dca mov r0, r5 | r0 = r5;
0x00016dcc bl 0x15c60 | fcn_00015c60 (r0, r1, r2, r3);
0x00016dd0 ldr r2, [sp, 0x74] | r2 = *(arg_74h);
0x00016dd2 mov r1, r7 | r1 = r7;
0x00016dd4 mov r0, r5 | r0 = r5;
0x00016dd6 adds r2, 0x18 | r2 += 0x18;
0x00016dd8 bl 0x150c8 | r0 = fcn_000150c8 (r0, r1, r2);
0x00016ddc mov r1, r0 | r1 = r0;
0x00016dde cmp r0, 0 |
| if (r0 != 0) {
0x00016de0 bne.w 0x1722e | goto label_46;
| }
0x00016de4 str r0, [sp, 0x20] | var_20h = r0;
0x00016de6 ldr r0, [sp, 0x74] | r0 = *(arg_74h);
0x00016de8 bl 0x15238 | fcn_00015238 (r0);
0x00016dec movs r2, 1 | r2 = 1;
0x00016dee ldr r1, [sp, 0x20] | r1 = var_20h;
0x00016df0 mov r0, r2 | r0 = r2;
0x00016df2 add r3, sp, 0x74 | r3 += arg_74h;
0x00016df4 bl 0x15180 | fcn_00015180 (r0, r1, r2);
0x00016df8 ldr r0, [sp, 0x74] | r0 = *(arg_74h);
0x00016dfa ldr r1, [r0, 0xc] | r1 = *((r0 + 0xc));
0x00016dfc cmp r1, 0 |
| if (r1 != 0) {
0x00016dfe bne.w 0x1722e | goto label_46;
| }
0x00016e02 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x00016e04 adds r7, 1 | r7++;
0x00016e06 add.w fp, fp, 1 |
0x00016e08 lsrs r1, r0, 0xc | r1 = r0 >> 0xc;
0x00016e0a adc sl, sl, 0 | __asm ("adc sl, sl, 0");
0x00016e0e add r8, r6 | r8 += r6;
0x00016e10 add.w sb, sb, 8 | sb += 8;
0x00016e14 cmp fp, r3 |
| if (fp == r3) {
0x00016e16 beq.w 0x1728c | goto label_47;
| }
0x00016e1a ldr r1, [r5, 0x3c] | r1 = *((r5 + 0x3c));
0x00016e1c adds r0, 0x20 | r0 += 0x20;
0x00016e1e ldr r3, [sp, 0xc] | r3 = var_ch;
0x00016e20 movs r2, 1 | r2 = 1;
0x00016e22 blx 0x51e4 | r0 = pread64 ();
0x00016e26 cmp r0, 1 |
| if (r0 != 1) {
0x00016e28 bne.w 0x17278 | goto label_48;
| }
0x00016e2c ldr r3, [r5, 0x10] | r3 = *((r5 + 0x10));
0x00016e2e cmp r3, 1 |
0x00016e30 itt le |
| if (r3 > 1) {
0x00016e32 movle r6, 8 | r6 = 8;
| }
| if (r3 > 1) {
0x00016e34 movle r4, r6 | r4 = r6;
| }
| if (r3 > 1) {
0x00016e36 ble 0x16e5c |
0x00016e38 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x00016e3a ldr r3, [r3, 0x28] | r3 = *((r3 + 0x28));
0x00016e3c lsls r2, r3, 3 | r2 = r3 << 3;
0x00016e3e itt mi |
| if (r2 >= r3) {
0x00016e40 movmi r6, 0x10 | r6 = 0x10;
| }
| if (r2 >= r3) {
0x00016e42 movmi r4, r6 | r4 = r6;
| }
| if (r2 < r3) {
0x00016e44 bmi 0x16e5c | goto label_49;
| }
0x00016e46 tst.w r3, 0x8000000 |
0x00016e4a ite ne |
| if ((r3 & 0x8000000) == 0) {
0x00016e4c movne r4, 0xe | r4 = 0xe;
| }
| if ((r3 & 0x8000000) != 0) {
0x00016e4e moveq r4, 0xc | r4 = 0xc;
| }
0x00016e50 lsls r6, r3, 6 | r6 = r3 << 6;
0x00016e52 it mi |
| if (r6 >= r3) {
0x00016e54 movmi r6, r4 | r6 = r4;
| }
| if (r6 < r3) {
0x00016e56 bmi 0x16e5c | goto label_49;
| }
0x00016e58 subs r4, 4 | r4 -= 4;
0x00016e5a mov r6, r4 | r6 = r4;
| }
| label_49:
0x00016e5c ldr r2, [sp, 0x44] | r2 = var_44h;
0x00016e5e ldr r3, [r5, 0x3c] | r3 = *((r5 + 0x3c));
0x00016e60 subs r3, r3, r2 | r3 -= r2;
0x00016e62 ldr r2, [sp, 0x40] | r2 = var_40h;
0x00016e64 add r3, r2 | r3 += r2;
0x00016e66 add.w r2, r8, r4 | r2 = r8 + r4;
0x00016e6a cmp r2, r3 |
| if (r2 >= r3) {
0x00016e6c bls 0x16eb6 |
0x00016e6e ldr r1, [sp, 0x70] | r1 = *(arg_70h);
0x00016e70 mov r0, r5 | r0 = r5;
0x00016e72 bl 0x15c34 | fcn_00015c34 (r0, r1);
0x00016e76 ldr r2, [sp, 0x70] | r2 = *(arg_70h);
0x00016e78 mov r0, r5 | r0 = r5;
0x00016e7a ldr r1, [sp, 0x48] | r1 = var_48h;
0x00016e7c adds r2, 0x18 | r2 += 0x18;
0x00016e7e bl 0x150c8 | r0 = fcn_000150c8 (r0, r1, r2);
0x00016e82 mov r1, r0 | r1 = r0;
0x00016e84 cmp r0, 0 |
| if (r0 != 0) {
0x00016e86 bne.w 0x1722e | goto label_46;
| }
0x00016e8a str r0, [sp, 0x20] | var_20h = r0;
0x00016e8c ldr r0, [sp, 0x70] | r0 = *(arg_70h);
0x00016e8e bl 0x15238 | fcn_00015238 (r0);
0x00016e92 movs r2, 1 | r2 = 1;
0x00016e94 ldr r1, [sp, 0x20] | r1 = var_20h;
0x00016e96 mov r0, r2 | r0 = r2;
0x00016e98 ldr r3, [sp, 0x50] | r3 = *(arg_50h);
0x00016e9a bl 0x15180 | fcn_00015180 (r0, r1, r2);
0x00016e9e ldr r0, [sp, 0x70] | r0 = *(arg_70h);
0x00016ea0 ldr r1, [r0, 0xc] | r1 = *((r0 + 0xc));
0x00016ea2 cmp r1, 0 |
| if (r1 != 0) {
0x00016ea4 bne.w 0x17336 | goto label_50;
| }
0x00016ea8 ldr.w r8, [sp, 0x28] | r8 = var_0h;
0x00016eac adds r3, r7, 1 | r3 = r7 + 1;
0x00016eae str r7, [sp, 0x48] | var_48h = r7;
0x00016eb0 adc sl, sl, 0 | __asm ("adc sl, sl, 0");
0x00016eb4 mov r7, r3 | r7 = r3;
| }
0x00016eb6 ldr r3, [r5, 0x38] | r3 = *((r5 + 0x38));
0x00016eb8 ldr.w r2, [sb] | r2 = *(sb);
0x00016ebc ldr r3, [r3] | r3 = *(r3);
0x00016ebe str r2, [sp, 0x24] | var_24h = r2;
0x00016ec0 ldr r0, [r3, 0x10] | r0 = *((r3 + 0x10));
0x00016ec2 ldr.w r3, [sb, 4] | r3 = *((sb + 4));
0x00016ec6 str r3, [sp, 0x20] | var_20h = r3;
0x00016ec8 blx 0x5230 | fcn_00005230 ();
0x00016ecc ldr r2, [sp, 0x24] | r2 = var_24h;
0x00016ece ldr r3, [sp, 0x20] | r3 = var_20h;
0x00016ed0 cmp r2, r0 |
0x00016ed2 sbcs.w r1, r3, r1 | __asm ("sbcs.w r1, r3, r1");
| if (r2 >= r0) {
0x00016ed6 bhs.w 0x172e0 | goto label_51;
| }
0x00016eda ldr.w r3, [sb] | r3 = *(sb);
0x00016ede rev r3, r3 | r3 = SWAP32 (r3);
0x00016ee0 str.w r3, [r8] | __asm ("str.w r3, [r8]");
0x00016ee4 movs r3, 0 | r3 = 0;
0x00016ee6 strh.w r3, [r8, 6] | *((r8 + 6)) = r3;
0x00016eea ldr r3, [sp, 0x28] | r3 = var_0h;
0x00016eec cmp r3, r8 |
0x00016eee bne.w 0x16d60 |
| }
0x00016ef2 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x00016ef4 add.w r4, r4, r4, lsl 1 | r4 += (r4 << 1);
0x00016ef6 lsls r4, r0, 0x11 | r4 = r0 << 0x11;
0x00016ef8 ldr r1, [sp, 0x28] | r1 = var_0h;
0x00016efa adds r6, 0x10 | r6 += 0x10;
0x00016efc ldr.w ip, [r3, 0x30] | ip = *((r3 + 0x30));
0x00016f00 ldr r0, [r3, 0x34] | r0 = *((r3 + 0x34));
0x00016f02 ldr.w lr, [r3, 0x38] |
0x00016f06 add.w r2, r1, r4, lsl 2 | r2 = r1 + (r4 << 2);
0x00016f0a ldr r3, [r3, 0x3c] | r3 = *((r3 + 0x3c));
0x00016f0c str.w ip, [r1, r4, lsl 2] | __asm ("str.w ip, [r1, r4, lsl 2]");
0x00016f10 str r0, [r2, 4] | *((r2 + 4)) = r0;
0x00016f12 str.w lr, [r2, 8] | __asm ("str.w lr, [r2, 8]");
0x00016f16 str r3, [r2, 0xc] | *((r2 + 0xc)) = r3;
0x00016f18 b 0x16d68 | goto label_6;
| label_34:
0x00016f1a ldr.w r3, [pc, 0x5a0] |
0x00016f1e subs r7, 1 | r7--;
0x00016f20 ldr.w r3, [r8, r3] | r3 = *((r8 + r3));
0x00016f24 ldr r3, [r3] | r3 = *(0x174be);
0x00016f26 cmp r7, r3 |
| if (r7 != r3) {
0x00016f28 bne 0x16fc8 | goto label_52;
| }
0x00016f2a ldr.w r1, [pc, 0x594] |
0x00016f2e ldr.w r0, [r5, r7, lsl 2] | offset_0 = r7 << 2;
| r0 = *((r5 + offset_0));
0x00016f32 add r1, pc | r1 = 0x2e3f8;
0x00016f34 blx 0x4e3c | fopen (r0, r1);
0x00016f38 str r0, [sp, 0xc] | var_ch = r0;
0x00016f3a cmp r0, 0 |
| if (r0 == 0) {
0x00016f3c beq.w 0x1746a | goto label_53;
| }
0x00016f3e strh r5, [r2, 0x14] | *((r2 + 0x14)) = r5;
0x00016f40 ldr r6, [sp, 0x64] | r6 = *(arg_64h);
0x00016f42 b 0x16bf4 | goto label_7;
| label_39:
0x00016f44 ldr r1, [sp, 0x14] | r1 = var_14h_2;
0x00016f46 cmp r1, 0 |
0x00016f48 ite eq |
| if (r1 != 0) {
0x00016f4a moveq r0, 0xc | r0 = 0xc;
| }
| if (r1 == 0) {
0x00016f4c movne r0, 0xe | r0 = 0xe;
| }
0x00016f4e cmp.w sl, 0 |
| if (sl != 0) {
0x00016f52 bne.w 0x16c64 | goto label_8;
| }
0x00016f56 subs r0, 4 | r0 -= 4;
0x00016f58 mov r8, sl | r8 = sl;
0x00016f5a b 0x16c64 | goto label_8;
| label_37:
0x00016f5c ldr r3, [sp, 0x10] | r3 = var_10h;
0x00016f5e subs r2, r7, 4 | r2 = r7 - 4;
0x00016f60 cmp.w sl, 0 |
| if (sl != 0) {
0x00016f64 bne 0x16fb6 | goto label_54;
| }
0x00016f66 lsls r0, r3, 2 | r0 = r3 << 2;
0x00016f68 lsrs r1, r3, 0x1e | r1 = r3 >> 0x1e;
0x00016f6a mov r3, sl | r3 = sl;
0x00016f6c bl 0x1be20 | r0 = fcn_0001be20 (r0, r1, r2, r3);
0x00016f70 adds r2, r0, 1 | r2 = r0 + 1;
0x00016f72 adc r3, r1, 0 | __asm ("adc r3, r1, 0");
| do {
0x00016f76 sub.w sb, r7, 0x14 | sb = r7 - 0x14;
0x00016f7a b 0x16c56 | goto label_9;
| label_40:
0x00016f7c ldr r3, [r5, 0x14] | r3 = *((r5 + 0x14));
0x00016f7e str r3, [sp, 0x14] | var_14h_2 = r3;
0x00016f80 movs r3, 0 | r3 = 0;
0x00016f82 str r3, [sp, 0x30] | var_30h = r3;
0x00016f84 b 0x16ca0 | goto label_10;
| label_35:
0x00016f86 ldrd r0, r2, [r5, 8] | __asm ("ldrd r0, r2, [r5, 8]");
0x00016f8a ldr r3, [r2, 0x28] | r3 = *((r2 + 0x28));
0x00016f8c orr r3, r3, 0x1000000 | r3 |= 0x1000000;
0x00016f90 str r3, [r2, 0x28] | *((r2 + 0x28)) = r3;
0x00016f92 bl 0x15238 | fcn_00015238 (r0);
0x00016f94 invalid |
| label_36:
0x00016f98 ldr r3, [sp, 0x10] | r3 = var_10h;
0x00016f9a mov r2, r7 | r2 = r7;
0x00016f9c mov.w r8, 0 | r8 = 0;
0x00016f9e lsrs r0, r0, 0x20 | r0 >>= 0x20;
0x00016fa0 lsls r0, r3, 2 | r0 = r3 << 2;
0x00016fa2 lsrs r1, r3, 0x1e | r1 = r3 >> 0x1e;
0x00016fa4 movs r3, 0 | r3 = 0;
0x00016fa6 bl 0x1be20 | r0 = fcn_0001be20 (r0, r1, r2, r3);
0x00016faa adds r2, r0, 1 | r2 = r0 + 1;
0x00016fac mov.w r0, 8 | r0 = 8;
0x00016fb0 adc r3, r1, 0 | __asm ("adc r3, r1, 0");
0x00016fb4 b 0x16c64 | goto label_8;
| label_54:
0x00016fb6 lsls r0, r3, 3 | r0 = r3 << 3;
0x00016fb8 lsrs r1, r3, 0x1d | r1 = r3 >> 0x1d;
0x00016fba movs r3, 0 | r3 = 0;
0x00016fbc bl 0x1be20 | r0 = fcn_0001be20 (r0, r1, r2, r3);
0x00016fc0 adds r2, r0, 1 | r2 = r0 + 1;
0x00016fc2 adc r3, r1, 0 | __asm ("adc r3, r1, 0");
0x00016fc6 b 0x16f76 |
| } while (1);
| label_52:
0x00016fc8 ldr.w r0, [pc, 0x4f8] | r0 = fcn.0000adb4;
0x00016fcc add r0, pc | r0 += pc;
0x00016fce blx 0x5294 | fcn_00005294 ();
0x00016fd2 b 0x16b6e | goto label_5;
| label_38:
0x00016fd4 ldr r2, [sp, 0x10] | r2 = var_10h;
0x00016fd6 lsls r0, r2, 3 | r0 = r2 << 3;
0x00016fd8 lsrs r1, r2, 0x1d | r1 = r2 >> 0x1d;
0x00016fda mov r2, r7 | r2 = r7;
0x00016fdc bl 0x1be20 | r0 = fcn_0001be20 (r0, r1, r2, r3);
0x00016fe0 adds r2, r0, 1 | r2 = r0 + 1;
0x00016fe2 adc r3, r1, 0 | __asm ("adc r3, r1, 0");
0x00016fe6 b 0x16c56 | goto label_9;
| label_41:
0x00016fe8 movs r1, 0x1c | r1 = 0x1c;
| label_13:
0x00016fea ldr.w r2, [pc, 0x4dc] |
0x00016fee ldr.w r0, [pc, 0x4dc] |
0x00016ff2 add r2, pc | r2 = 0x2e4c0;
0x00016ff4 add r0, pc | r0 = 0x2e4c6;
0x00016ff6 blx 0x50d8 | fcn_000050d8 ();
| label_12:
0x00016ffa ldr r3, [sp, 0xc] | r3 = var_ch;
0x00016ffc cmp r3, 0 |
| if (r3 == 0) {
0x00016ffe beq.w 0x16b5e | goto label_3;
| }
0x00017002 mov r0, r3 | r0 = r3;
0x00017004 blx 0x5550 | ext2fs_unmark_generic_bmap ();
0x00017008 b 0x16b5e | goto label_3;
| label_42:
0x0001700a ldr r7, [sp, 0x14] | r7 = var_14h_2;
0x0001700c str r6, [sp, 0x20] | var_20h = r6;
| label_14:
0x0001700e ldr r3, [sp, 0x10] | r3 = var_10h;
0x00017010 cmp r3, 0 |
| if (r3 == 0) {
0x00017012 beq.w 0x1714e | goto label_21;
| }
0x00017016 ldr r3, [r5, 0x10] | r3 = *((r5 + 0x10));
0x00017018 cmp r3, 1 |
0x0001701a itt le |
| if (r3 > 1) {
0x0001701c movle r3, 0 | r3 = 0;
| }
| if (r3 > 1) {
0x0001701e strle r3, [sp, 0x1c] | var_1ch = r3;
| }
| if (r3 > 1) {
0x00017020 ble 0x17034 |
0x00017022 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x00017024 ldr r3, [r3, 0x28] | r3 = *((r3 + 0x28));
0x00017026 tst.w r3, 0x18000000 |
0x0001702a ite ne |
| if ((r3 & 0x18000000) == 0) {
0x0001702c movne r3, 1 | r3 = 1;
| }
| if ((r3 & 0x18000000) != 0) {
0x0001702e moveq r3, 0 | r3 = 0;
| }
0x00017030 lsls r3, r3, 2 | r3 <<= 2;
0x00017032 str r3, [sp, 0x1c] | var_1ch = r3;
| }
0x00017034 ldr r3, [r5, 0x3c] | r3 = *((r5 + 0x3c));
0x00017036 mov r2, r7 | r2 = r7;
0x00017038 ldr r0, [r5, 0x34] | r0 = *((r5 + 0x34));
0x0001703a str r3, [sp] | *(sp) = r3;
0x0001703c ldr r3, [sp, 0x20] | r3 = var_20h;
0x0001703e bl 0x15130 | fcn_00015130 (r0, r1, r2);
0x00017042 str r0, [sp, 0x28] | var_0h = r0;
0x00017044 str r0, [sp, 0x74] | *(arg_74h) = r0;
0x00017046 cmp r0, 0 |
| if (r0 == 0) {
0x00017048 beq.w 0x17274 | goto label_43;
| }
0x0001704c ldr r1, [sp, 0x28] | r1 = var_0h;
0x0001704e mov.w r3, 0x3bc0 |
0x00017052 movt r3, 0x9839 | r3 = 0x-67c6c440;
0x00017056 ldr r2, [r5, 0x10] | r2 = *((r5 + 0x10));
0x00017058 str r3, [r1, 0x20] | *((r1 + 0x20)) = r3;
0x0001705a mov.w r3, 0x5000000 | r3 = 0x5000000;
0x0001705e str r3, [r1, 0x24] | *((r1 + 0x24)) = r3;
0x00017060 cmp r2, 1 |
0x00017062 ldr r3, [sp, 0x18] | r3 = var_18h;
0x00017064 it le |
| if (r2 > 1) {
0x00017066 movle sl, 4 | sl = 4;
| }
0x0001706a rev r3, r3 | r3 = SWAP32 (r3);
0x0001706c str r3, [r1, 0x28] | *((r1 + 0x28)) = r3;
0x0001706e add.w r3, r1, 0x20 | r3 = r1 + 0x20;
0x00017072 str r3, [sp, 0x24] | var_24h = r3;
| if (r2 > 1) {
0x00017074 ble 0x17088 |
0x00017076 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x00017078 ldr r3, [r3, 0x28] | r3 = *((r3 + 0x28));
0x0001707a tst.w r3, 0x2000000 |
0x0001707e ite eq |
| if ((r3 & 0x2000000) != 0) {
0x00017080 moveq sl, 4 | sl = 4;
| }
| if ((r3 & 0x2000000) == 0) {
0x00017082 lsrne r4, r0, 8 | r4 = r0 >> 8;
| }
0x00017084 mov.w sl, 8 | sl = 8;
0x00017086 lsrs r0, r1, 8 | r0 = r1 >> 8;
| }
0x00017088 add r3, sp, 0x74 | r3 += arg_74h;
0x0001708a ldr.w r8, [sp, 0x34] | r8 = var_34h;
0x0001708e mov.w sb, 0 | sb = 0;
0x00017092 movs r6, 0x10 | r6 = 0x10;
0x00017094 strd r3, r4, [sp, 0x34] | __asm ("strd r3, r4, [var_34h]");
0x00017098 b 0x170b4 |
| while (r1 > 1) {
0x0001709a ldr r1, [r5, 0xc] | r1 = *((r5 + 0xc));
0x0001709c ldr r1, [r1, 0x28] | r1 = *((r1 + 0x28));
0x0001709e lsls r1, r1, 6 | r1 <<= 6;
| if (r1 >= r1) {
0x000170a0 bpl 0x1713a | goto label_55;
| }
0x000170a2 rev r0, r0 | r0 = SWAP32 (r0);
0x000170a4 str r3, [r2, 4] | *((r2 + 4)) = r3;
0x000170a6 str r0, [r2] | *(r2) = r0;
| label_11:
0x000170a8 ldr r3, [sp, 0x10] | r3 = var_10h;
0x000170aa add.w sb, sb, 1 | sb++;
0x000170ac lsrs r1, r0, 4 | r1 = r0 >> 4;
0x000170ae add r6, sl | r6 += sl;
0x000170b0 cmp r3, sb |
| if (r3 == sb) {
0x000170b2 beq 0x1713e | goto label_56;
| }
0x000170b4 ldr r2, [sp, 0x1c] | r2 = var_1ch;
0x000170b6 ldr r3, [r5, 0x3c] | r3 = *((r5 + 0x3c));
0x000170b8 subs r3, r3, r2 | r3 -= r2;
0x000170ba add.w r2, sl, r6 | r2 = sl + r6;
0x000170be cmp r2, r3 |
| if (r2 >= r3) {
0x000170c0 bls 0x1710e |
0x000170c2 ldr r3, [sp, 0x28] | r3 = var_0h;
0x000170c4 rev r6, r6 | r6 = SWAP32 (r6);
0x000170c6 ldr r1, [sp, 0x74] | r1 = *(arg_74h);
0x000170c8 mov r0, r5 | r0 = r5;
0x000170ca str r6, [r3, 0x2c] | *((r3 + 0x2c)) = r6;
0x000170cc bl 0x15c08 | fcn_00015c08 (r0, r1);
0x000170d0 ldr r2, [sp, 0x74] | r2 = *(arg_74h);
0x000170d2 mov r1, r7 | r1 = r7;
0x000170d4 mov r0, r5 | r0 = r5;
0x000170d6 adds r2, 0x18 | r2 += 0x18;
0x000170d8 bl 0x150c8 | r0 = fcn_000150c8 (r0, r1, r2);
0x000170dc mov r6, r0 | r6 = r0;
0x000170de cmp r0, 0 |
| if (r0 != 0) {
0x000170e0 bne.w 0x17330 | goto label_57;
| }
0x000170e4 ldr r0, [sp, 0x74] | r0 = *(arg_74h);
0x000170e6 bl 0x15238 | fcn_00015238 (r0);
0x000170ea movs r2, 1 | r2 = 1;
0x000170ec mov r1, r6 | r1 = r6;
0x000170ee mov r0, r2 | r0 = r2;
0x000170f0 ldr r3, [sp, 0x34] | r3 = var_34h;
0x000170f2 bl 0x15180 | fcn_00015180 (r0, r1, r2);
0x000170f6 ldr r0, [sp, 0x74] | r0 = *(arg_74h);
0x000170f8 ldr r6, [r0, 0xc] | r6 = *((r0 + 0xc));
0x000170fa cmp r6, 0 |
| if (r6 != 0) {
0x000170fc bne.w 0x1732c | goto label_58;
| }
0x00017100 ldr r3, [sp, 0x20] | r3 = var_20h;
0x00017102 adds r7, 1 | r7++;
0x00017104 mov.w r6, 0x10 | r6 = 0x10;
0x00017108 adc r3, r3, 0 | __asm ("adc r3, r3, 0");
0x0001710c str r3, [sp, 0x20] | var_20h = r3;
| }
0x0001710e ldr r3, [r5, 0x38] | r3 = *((r5 + 0x38));
0x00017110 ldrd fp, r4, [r8] | __asm ("ldrd fp, r4, [r8]");
0x00017114 ldr r3, [r3] | r3 = *(r3);
0x00017116 ldr r0, [r3, 0x10] | r0 = *((r3 + 0x10));
0x00017118 blx 0x5230 | r0 = fcn_00005230 ();
0x0001711c cmp fp, r0 |
0x0001711e sbcs.w r1, r4, r1 | __asm ("sbcs.w r1, r4, r1");
| if (fp >= r0) {
0x00017122 bhs.w 0x17260 | goto label_59;
| }
0x00017126 ldr r1, [r5, 0x10] | r1 = *((r5 + 0x10));
0x00017128 ldr.w r0, [r8, 4] | r0 = *((r8 + 4));
0x0001712c ldr r2, [sp, 0x24] | r2 = var_24h;
0x0001712e ldr r3, [r8], 8 | r3 = *(r8);
| r8 += 8;
0x00017132 cmp r1, 1 |
0x00017134 add r2, r6 | r2 += r6;
0x00017136 rev r3, r3 | r3 = SWAP32 (r3);
0x00017138 bgt 0x1709a |
| }
| label_55:
0x0001713a str r3, [r2] | *(r2) = r3;
0x0001713c b 0x170a8 | goto label_11;
| label_56:
0x0001713e ldr r4, [sp, 0x38] | r4 = var_38h;
0x00017140 ldr r1, [sp, 0x74] | r1 = *(arg_74h);
0x00017142 cmp r6, 0 |
| if (r6 != 0) {
0x00017144 bne.w 0x17300 | goto label_60;
| }
0x00017148 mov r0, r1 | r0 = r1;
0x0001714a bl 0x15244 | fcn_00015244 (r0);
| label_21:
0x0001714e cmp r4, 0 |
| if (r4 != 0) {
0x00017150 bne.w 0x16ffa | goto label_12;
| }
0x00017154 ldr r3, [r5, 0x3c] | r3 = *((r5 + 0x3c));
0x00017156 movs r2, 0 | r2 = 0;
0x00017158 ldr r0, [r5, 0x34] | r0 = *((r5 + 0x34));
0x0001715a str r4, [sp, 0x70] | *(arg_70h) = r4;
0x0001715c str r3, [sp] | *(sp) = r3;
0x0001715e movs r3, 0 | r3 = 0;
0x00017160 bl 0x15130 | r0 = fcn_00015130 (r0, r1, r2);
0x00017164 mov r6, r0 | r6 = r0;
0x00017166 str r0, [sp, 0x6c] | *(arg_6ch) = r0;
0x00017168 cmp r0, 0 |
| if (r0 == 0) {
0x0001716a beq.w 0x17274 | goto label_43;
| }
0x0001716e mov.w r3, 0x3bc0 | r3 = 0x3bc0;
0x00017172 ldr r2, [r5, 0x10] | r2 = *((r5 + 0x10));
0x00017174 movt r3, 0x9839 | r3 = (r3 & 0xFFFF) | 0x98390000;
0x00017178 str r3, [r6, 0x20] | *((r6 + 0x20)) = r3;
0x0001717a mov.w r3, 0x2000000 | r3 = 0x2000000;
0x0001717e str r3, [r6, 0x24] | *((r6 + 0x24)) = r3;
0x00017180 cmp r2, 1 |
0x00017182 ldr r3, [sp, 0x18] | r3 = var_18h;
0x00017184 rev r3, r3 | r3 = SWAP32 (r3);
0x00017186 str r3, [r6, 0x28] | *((r6 + 0x28)) = r3;
| if (r2 <= 1) {
0x00017188 ble.w 0x1733e | goto label_61;
| }
0x0001718c ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x0001718e ldr r3, [r3, 0x24] | r3 = *((r3 + 0x24));
0x00017190 ands r3, r3, 0x1000000 | r3 &= 0x1000000;
| if (r3 == r3) {
0x00017194 beq.w 0x17404 | goto label_62;
| }
0x00017198 ldr r3, [r5, 0x3c] | r3 = *((r5 + 0x3c));
0x0001719a movs r2, 0 | r2 = 0;
0x0001719c str r3, [sp] | *(sp) = r3;
0x0001719e movs r3, 0 | r3 = 0;
0x000171a0 ldr r0, [r5, 0x34] | r0 = *((r5 + 0x34));
0x000171a2 bl 0x15130 | fcn_00015130 (r0, r1, r2);
0x000171a6 str r0, [sp, 0x70] | *(arg_70h) = r0;
0x000171a8 cmp r0, 0 |
| if (r0 == 0) {
0x000171aa beq.w 0x17458 | goto label_63;
| }
0x000171ae ldr r3, [sp, 0x14] | r3 = var_14h_2;
0x000171b0 ldr r2, [sp, 0x30] | r2 = var_30h;
0x000171b2 ldr r1, [sp, 0x20] | r1 = var_20h;
0x000171b4 cmp r3, r7 |
0x000171b6 sbcs r2, r1 | __asm ("sbcs r2, r1");
| if (r3 >= r7) {
0x000171b8 bhs.w 0x1744c | goto label_64;
| }
0x000171bc mov sb, r4 | sb = r4;
0x000171be mov.w r4, -1 | r4 = -1;
0x000171c2 mov r8, r3 | r8 = r3;
0x000171c4 add.w sl, sp, 0x70 | sl += arg_70h;
0x000171c8 mov fp, r4 |
0x000171ca b 0x17208 |
| while (r0 == 0) {
0x000171cc ldr r0, [sp, 0x70] | r0 = *(arg_70h);
0x000171ce bl 0x15814 | fcn_00015814 (r0, r1);
0x000171d2 mov r1, r4 | r1 = r4;
0x000171d4 mov r0, r4 | r0 = r4;
0x000171d6 mov r3, sl | r3 = sl;
0x000171d8 movs r2, 1 | r2 = 1;
0x000171da bl 0x15180 | fcn_00015180 (r0, r1, r2);
0x000171de ldr r1, [sp, 0x70] | r1 = *(arg_70h);
0x000171e0 ldr r4, [r1, 0xc] | r4 = *((r1 + 0xc));
0x000171e2 cmp r4, 0 |
| if (r4 != 0) {
0x000171e4 bne.w 0x1743a | goto label_65;
| }
0x000171e8 ldr r2, [r1, 8] | r2 = *((r1 + 8));
0x000171ea mov r0, fp | r0 = fp;
0x000171ec adds r1, 0x20 | r1 += 0x20;
0x000171ee blx 0x4de8 | ext2fs_crc32_be ();
0x000171f2 ldr r3, [sp, 0x20] | r3 = var_20h;
0x000171f4 adds.w r8, r8, 1 | r8++;
0x000171f8 adc sb, sb, 0 | __asm ("adc sb, sb, 0");
0x000171fc cmp r8, r7 |
0x000171fe mov fp, r0 |
0x00017200 sbcs.w r3, sb, r3 | __asm ("sbcs.w r3, sb, r3");
| if (r8 >= r7) {
0x00017204 bhs.w 0x17466 | goto label_66;
| }
0x00017208 ldr r2, [sp, 0x70] | r2 = *(arg_70h);
0x0001720a mov r1, r8 | r1 = r8;
0x0001720c mov r0, r5 | r0 = r5;
0x0001720e adds r2, 0x18 | r2 += 0x18;
0x00017210 bl 0x150c8 | r0 = fcn_000150c8 (r0, r1, r2);
0x00017214 mov r4, r0 | r4 = r0;
0x00017216 mov r1, r0 | r1 = r0;
0x00017218 cmp r0, 0 |
0x0001721a beq 0x171cc |
| }
| label_19:
0x0001721c ldr r0, [sp, 0x70] | r0 = *(arg_70h);
0x0001721e cmp r0, 0 |
| if (r0 != 0) {
0x00017220 bne 0x172f0 | goto label_67;
| }
0x00017222 ldr r0, [sp, 0x6c] | r0 = *(arg_6ch);
0x00017224 str r1, [sp, 0x10] | var_10h = r1;
0x00017226 bl 0x15244 | fcn_00015244 (r0);
0x0001722a ldr r1, [sp, 0x10] | r1 = var_10h;
0x0001722c b 0x16fea | goto label_13;
| label_46:
0x0001722e ldr r4, [sp, 0x54] | r4 = *(arg_54h);
0x00017230 str.w sl, [sp, 0x20] | __asm ("str.w sl, [var_20h]");
| label_17:
0x00017234 ldr r0, [sp, 0x70] | r0 = *(arg_70h);
| if (r0 == 0) {
0x00017236 cbz r0, 0x17254 | goto label_68;
| }
| label_15:
0x00017238 str r1, [sp, 0x1c] | var_1ch = r1;
0x0001723a bl 0x15244 | fcn_00015244 (r0);
0x0001723e ldr r1, [sp, 0x1c] | r1 = var_1ch;
| label_16:
0x00017240 ldr r0, [sp, 0x74] | r0 = *(arg_74h);
0x00017242 str r1, [sp, 0x1c] | var_1ch = r1;
0x00017244 bl 0x15244 | fcn_00015244 (r0);
0x00017248 ldr r1, [sp, 0x1c] | r1 = var_1ch;
0x0001724a cmp r1, 0 |
| if (r1 == 0) {
0x0001724c beq.w 0x1700e | goto label_14;
| }
0x00017250 b 0x16fea | goto label_13;
| label_44:
0x00017252 movs r1, 0xc | r1 = 0xc;
| label_68:
0x00017254 ldr r0, [sp, 0x74] | r0 = *(arg_74h);
0x00017256 str r1, [sp, 0x10] | var_10h = r1;
0x00017258 bl 0x15244 | fcn_00015244 (r0);
0x0001725c ldr r1, [sp, 0x10] | r1 = var_10h;
0x0001725e b 0x16fea | goto label_13;
| label_59:
0x00017260 ldr r0, [sp, 0x74] | r0 = *(arg_74h);
0x00017262 movw r1, 0xb72a |
0x00017266 movt r1, 0x7f2b | r1 = 0x7f2bb72a;
| label_18:
0x0001726a str r1, [sp, 0x10] | var_10h = r1;
0x0001726c bl 0x15244 | fcn_00015244 (r0);
0x00017270 ldr r1, [sp, 0x10] | r1 = var_10h;
0x00017272 b 0x16fea | goto label_13;
| label_43:
0x00017274 movs r1, 0xc | r1 = 0xc;
0x00017276 b 0x16fea | goto label_13;
| label_48:
0x00017278 str.w sl, [sp, 0x20] | __asm ("str.w sl, [var_20h]");
0x0001727c blx 0x53f4 | r0 = sprintf_chk ()
0x00017280 ldr r1, [r0] | r1 = *(r0);
0x00017282 ldr r0, [sp, 0x70] | r0 = *(arg_70h);
0x00017284 ldr r4, [sp, 0x54] | r4 = *(arg_54h);
0x00017286 cmp r0, 0 |
| if (r0 != 0) {
0x00017288 bne 0x17238 | goto label_15;
| }
0x0001728a b 0x17240 | goto label_16;
| label_47:
0x0001728c ldr r3, [sp, 0x28] | r3 = var_0h;
0x0001728e ldr r4, [sp, 0x54] | r4 = *(arg_54h);
0x00017290 ldr r2, [sp, 0x70] | r2 = *(arg_70h);
0x00017292 cmp r3, r8 |
0x00017294 str.w sl, [sp, 0x20] | __asm ("str.w sl, [var_20h]");
| if (r3 == r8) {
0x00017298 beq 0x17322 | goto label_69;
| }
0x0001729a mov r1, r2 | r1 = r2;
0x0001729c mov r0, r5 | r0 = r5;
0x0001729e bl 0x15c34 | fcn_00015c34 (r0, r1);
0x000172a2 ldr r2, [sp, 0x70] | r2 = *(arg_70h);
0x000172a4 mov r0, r5 | r0 = r5;
0x000172a6 ldr r1, [sp, 0x48] | r1 = var_48h;
0x000172a8 adds r2, 0x18 | r2 += 0x18;
0x000172aa bl 0x150c8 | r0 = fcn_000150c8 (r0, r1, r2);
0x000172ae mov r1, r0 | r1 = r0;
0x000172b0 cmp r0, 0 |
| if (r0 != 0) {
0x000172b2 bne 0x17234 | goto label_17;
| }
0x000172b4 str r0, [sp, 0x1c] | var_1ch = r0;
0x000172b6 ldr r0, [sp, 0x70] | r0 = *(arg_70h);
0x000172b8 bl 0x15238 | fcn_00015238 (r0);
0x000172bc movs r2, 1 | r2 = 1;
0x000172be ldr r1, [sp, 0x1c] | r1 = var_1ch;
0x000172c0 mov r0, r2 | r0 = r2;
0x000172c2 add r3, sp, 0x70 | r3 += arg_70h;
0x000172c4 bl 0x15180 | fcn_00015180 (r0, r1, r2);
0x000172c8 ldr r0, [sp, 0x70] | r0 = *(arg_70h);
0x000172ca ldr r1, [r0, 0xc] | r1 = *((r0 + 0xc));
0x000172cc mov r2, r0 | r2 = r0;
0x000172ce cmp r1, 0 |
| if (r1 != 0) {
0x000172d0 bne 0x17238 | goto label_15;
| }
| do {
0x000172d2 mov r0, r2 | r0 = r2;
0x000172d4 bl 0x15244 | fcn_00015244 (r0);
0x000172d8 ldr r0, [sp, 0x74] | r0 = *(arg_74h);
0x000172da bl 0x15244 | fcn_00015244 (r0);
0x000172de b 0x1700e | goto label_14;
| label_51:
0x000172e0 movw r1, 0xb72a |
0x000172e4 ldr r4, [sp, 0x54] | r4 = *(arg_54h);
0x000172e6 movt r1, 0x7f2b | r1 = 0x7f2bb72a;
0x000172ea str.w sl, [sp, 0x20] | __asm ("str.w sl, [var_20h]");
0x000172ee b 0x17234 | goto label_17;
| label_67:
0x000172f0 str r1, [sp, 0x10] | var_10h = r1;
0x000172f2 bl 0x15244 | fcn_00015244 (r0);
0x000172f6 ldr r0, [sp, 0x6c] | r0 = *(arg_6ch);
0x000172f8 bl 0x15244 | fcn_00015244 (r0);
0x000172fc ldr r1, [sp, 0x10] | r1 = var_10h;
0x000172fe b 0x16fea | goto label_13;
| label_60:
0x00017300 ldr r3, [sp, 0x28] | r3 = var_0h;
0x00017302 rev r6, r6 | r6 = SWAP32 (r6);
0x00017304 mov r0, r5 | r0 = r5;
0x00017306 str r6, [r3, 0x2c] | *((r3 + 0x2c)) = r6;
0x00017308 bl 0x15c08 | fcn_00015c08 (r0, r1);
0x0001730c ldr r2, [sp, 0x74] | r2 = *(arg_74h);
0x0001730e mov r1, r7 | r1 = r7;
0x00017310 mov r0, r5 | r0 = r5;
0x00017312 adds r2, 0x18 | r2 += 0x18;
0x00017314 bl 0x150c8 | r0 = fcn_000150c8 (r0, r1, r2);
0x00017318 mov r1, r0 | r1 = r0;
0x0001731a cmp r0, 0 |
| if (r0 == 0) {
0x0001731c beq 0x1740c | goto label_70;
| }
0x0001731e ldr r0, [sp, 0x74] | r0 = *(arg_74h);
0x00017320 b 0x1726a | goto label_18;
| label_69:
0x00017322 cmp r2, 0 |
0x00017324 bne 0x172d2 |
| } while (r2 != 0);
0x00017326 bl 0x15244 | fcn_00015244 (r0);
0x0001732a b 0x1700e | goto label_14;
| label_58:
0x0001732c mov r1, r6 | r1 = r6;
0x0001732e b 0x1726a | goto label_18;
| label_57:
0x00017330 mov r1, r0 | r1 = r0;
0x00017332 ldr r0, [sp, 0x74] | r0 = *(arg_74h);
0x00017334 b 0x1726a | goto label_18;
| label_50:
0x00017336 ldr r4, [sp, 0x54] | r4 = *(arg_54h);
0x00017338 str.w sl, [sp, 0x20] | __asm ("str.w sl, [var_20h]");
0x0001733c b 0x17238 | goto label_15;
| label_61:
0x0001733e mov r2, r4 | r2 = r4;
0x00017340 mov r3, r4 | r3 = r4;
| label_20:
0x00017342 movs r1, 0 | r1 = 0;
0x00017344 strb.w r2, [r6, 0x2d] | *((r6 + 0x2d)) = r2;
0x00017348 str r3, [r6, 0x30] | *((r6 + 0x30)) = r3;
0x0001734a add r0, sp, 0x74 | r0 += arg_74h;
0x0001734c strb.w r4, [r6, 0x2c] | *((r6 + 0x2c)) = r4;
0x00017350 blx 0x51c0 | strcpy_chk ();
0x00017354 ldr r3, [sp, 0x78] | r3 = *(arg_78h);
0x00017356 mov.w r2, 0x3e8 | r2 = 0x3e8;
0x0001735a ldr r1, [sp, 0x6c] | r1 = *(arg_6ch);
0x0001735c mov r0, r5 | r0 = r5;
0x0001735e mul r3, r2, r3 | r3 = r2 * r3;
0x00017362 ldr r2, [sp, 0x74] | r2 = *(arg_74h);
0x00017364 rev r2, r2 | r2 = SWAP32 (r2);
0x00017366 rev r3, r3 | r3 = SWAP32 (r3);
0x00017368 str r2, [r6, 0x50] | *((r6 + 0x50)) = r2;
0x0001736a str r3, [r6, 0x58] | *((r6 + 0x58)) = r3;
0x0001736c movs r3, 0 | r3 = 0;
0x0001736e str r3, [r6, 0x54] | *((r6 + 0x54)) = r3;
0x00017370 bl 0x15bdc | fcn_00015bdc (r0, r1);
0x00017374 ldr r2, [sp, 0x6c] | r2 = *(arg_6ch);
0x00017376 mov r1, r7 | r1 = r7;
0x00017378 mov r0, r5 | r0 = r5;
0x0001737a adds r2, 0x18 | r2 += 0x18;
0x0001737c bl 0x150c8 | r0 = fcn_000150c8 (r0, r1, r2);
0x00017380 mov r1, r0 | r1 = r0;
0x00017382 cmp r0, 0 |
| if (r0 != 0) {
0x00017384 bne.w 0x1721c | goto label_19;
| }
0x00017388 str r0, [sp, 0x10] | var_10h = r0;
0x0001738a ldr r0, [sp, 0x6c] | r0 = *(arg_6ch);
0x0001738c bl 0x15238 | fcn_00015238 (r0);
0x00017390 movs r2, 1 | r2 = 1;
0x00017392 ldr r1, [sp, 0x10] | r1 = var_10h;
0x00017394 mov r0, r2 | r0 = r2;
0x00017396 add r3, sp, 0x6c | r3 += arg_6ch;
0x00017398 bl 0x15180 | fcn_00015180 (r0, r1, r2);
0x0001739c ldr r0, [sp, 0x6c] | r0 = *(arg_6ch);
0x0001739e ldr r1, [r0, 0xc] | r1 = *((r0 + 0xc));
0x000173a0 cmp r1, 0 |
| if (r1 != 0) {
0x000173a2 bne.w 0x1721c | goto label_19;
| }
0x000173a6 ldr r4, [sp, 0x2c] | r4 = var_4h;
0x000173a8 ldr r1, [r4, 0x10] | r1 = *((r4 + 0x10));
0x000173aa ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x000173ac ldr r2, [r1, 0x60] | r2 = *((r1 + 0x60));
0x000173ae orr r3, r3, 6 | r3 |= 6;
0x000173b2 orr r2, r2, 4 | r2 |= 4;
0x000173b6 str r2, [r1, 0x60] | *((r1 + 0x60)) = r2;
0x000173b8 str r3, [r4, 8] | *((r4 + 8)) = r3;
0x000173ba ldr r3, [sp, 0x70] | r3 = *(arg_70h);
| if (r3 != 0) {
0x000173bc cbz r3, 0x173c6 |
0x000173be mov r0, r3 | r0 = r3;
0x000173c0 bl 0x15244 | fcn_00015244 (r0);
0x000173c4 ldr r0, [sp, 0x6c] | r0 = *(arg_6ch);
| }
0x000173c6 bl 0x15244 | fcn_00015244 (r0);
0x000173ca ldr r3, [r5, 0x18] | r3 = *((r5 + 0x18));
| if (r3 == 0) {
0x000173cc cbnz r3, 0x173dc |
0x000173ce ldr r3, [sp, 0x18] | r3 = var_18h;
0x000173d0 str r3, [r5, 0x4c] | *((r5 + 0x4c)) = r3;
0x000173d2 ldr r3, [sp, 0x14] | r3 = var_14h_2;
0x000173d4 rev r2, r3 | r3 = SWAP32 (r2);
0x000173d6 str r3, [r5, 0x18] | *((r5 + 0x18)) = r3;
0x000173d8 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x000173da str r2, [r3, 0x1c] | *((r3 + 0x1c)) = r2;
| }
0x000173dc ldr r0, [sp, 0x2c] | r0 = var_4h;
0x000173de ldr r3, [sp, 0x18] | r3 = var_18h;
0x000173e0 ldr r2, [sp, 0x3c] | r2 = var_14h;
0x000173e2 ldr r1, [r0, 0x10] | r1 = *((r0 + 0x10));
0x000173e4 adds r3, 1 | r3++;
0x000173e6 str r3, [r5, 0x50] | *((r5 + 0x50)) = r3;
0x000173e8 adds r2, 1 | r2++;
0x000173ea ldr r3, [r1, 0x60] | r3 = *((r1 + 0x60));
0x000173ec str r2, [r5, 0x14] | *((r5 + 0x14)) = r2;
0x000173ee lsls r2, r3, 0x1d | r2 = r3 << 0x1d;
| if (r2 < r3) {
0x000173f0 bmi.w 0x16ffa | goto label_12;
| }
0x000173f4 ldr r2, [r0, 8] | r2 = *((r0 + 8));
0x000173f6 orr r3, r3, 4 | r3 |= 4;
0x000173fa str r3, [r1, 0x60] | *((r1 + 0x60)) = r3;
0x000173fc orr r2, r2, 6 | r2 |= 6;
0x00017400 str r2, [r0, 8] | *((r0 + 8)) = r2;
0x00017402 b 0x16ffa | goto label_12;
| label_62:
0x00017404 mov r2, r4 | r2 = r4;
0x00017406 b 0x17342 | goto label_20;
| label_33:
0x00017408 blx 0x5008 | fcn_00005008 ();
| label_70:
0x0001740c str r0, [sp, 0x10] | var_10h = r0;
0x0001740e ldr r0, [sp, 0x74] | r0 = *(arg_74h);
0x00017410 bl 0x15238 | fcn_00015238 (r0);
0x00017414 movs r2, 1 | r2 = 1;
0x00017416 ldr r1, [sp, 0x10] | r1 = var_10h;
0x00017418 mov r0, r2 | r0 = r2;
0x0001741a add r3, sp, 0x74 | r3 += arg_74h;
0x0001741c bl 0x15180 | fcn_00015180 (r0, r1, r2);
0x00017420 ldr r0, [sp, 0x74] | r0 = *(arg_74h);
0x00017422 ldr r1, [r0, 0xc] | r1 = *((r0 + 0xc));
0x00017424 cmp r1, 0 |
| if (r1 != 0) {
0x00017426 bne.w 0x1726a | goto label_18;
| }
0x0001742a ldr r3, [sp, 0x20] | r3 = var_20h;
0x0001742c adds r7, 1 | r7++;
0x0001742e adc r3, r3, 0 | __asm ("adc r3, r3, 0");
0x00017432 str r3, [sp, 0x20] | var_20h = r3;
0x00017434 bl 0x15244 | fcn_00015244 (r0);
0x00017438 b 0x1714e | goto label_21;
| label_65:
0x0001743a mov r0, r1 | r0 = r1;
0x0001743c str r4, [sp, 0x10] | var_10h = r4;
0x0001743e bl 0x15244 | fcn_00015244 (r0);
0x00017442 ldr r0, [sp, 0x6c] | r0 = *(arg_6ch);
0x00017444 bl 0x15244 | fcn_00015244 (r0);
0x00017448 ldr r1, [sp, 0x10] | r1 = var_10h;
0x0001744a b 0x16fea | goto label_13;
| label_64:
0x0001744c mov.w r4, -1 | r4 = -1;
| do {
0x00017450 rev r3, r4 | r4 = SWAP32 (r3);
0x00017452 movs r2, 4 | r2 = 4;
0x00017454 movs r4, 1 | r4 = 1;
0x00017456 b 0x17342 | goto label_20;
| label_63:
0x00017458 movs r1, 0xc | r1 = 0xc;
0x0001745a ldr r0, [sp, 0x6c] | r0 = *(arg_6ch);
0x0001745c str r1, [sp, 0x10] | var_10h = r1;
0x0001745e bl 0x15244 | fcn_00015244 (r0);
0x00017462 ldr r1, [sp, 0x10] | r1 = var_10h;
0x00017464 b 0x16fea | goto label_13;
| label_66:
0x00017466 mov r4, r0 | r4 = r0;
0x00017468 b 0x17450 |
| } while (1);
| label_53:
0x0001746a blx 0x53f4 | sprintf_chk ()
0x0001746e ldr r2, [pc, 0x60] |
0x00017470 ldr r1, [r0] | r1 = *(r0);
0x00017472 ldr r0, [r5] | r0 = *(r5);
0x00017474 add r2, pc | r2 = 0x2e94a;
0x00017476 blx 0x50d8 | fcn_000050d8 ();
0x0001747a b.w 0x16b5e | goto label_3;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/debugfs @ 0x1827c */
| #include <stdint.h>
|
; (fcn) fcn.0001827c () | void fcn_0001827c (uint32_t arg1) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_14h;
| r0 = arg1;
0x0001827c push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00018280 sub sp, 0x1c |
0x00018282 ldr.w sl, [pc, 0xa4] |
0x00018286 add sl, pc | sl = 0x305b4;
0x00018288 cmp r0, 0 |
| if (r0 == 0) {
0x0001828a beq 0x18322 | goto label_1;
| }
0x0001828c ldr.w sb, [pc, 0x9c] |
0x00018290 mov r7, r0 | r7 = r0;
0x00018292 ldr r6, [r0] | r6 = *(r0);
0x00018294 ldr.w fp, [pc, 0x98] |
0x00018298 add sb, pc | sb = 0x305c8;
0x0001829a adds r4, r6, 4 | r4 = r6 + 4;
0x0001829c add.w r5, r6, 0xc | r5 = r6 + 0xc;
0x000182a0 add.w sb, sb, 8 | sb += 8;
0x000182a4 add fp, pc | fp = 0x305d8;
0x000182a6 add.w r8, r6, 0x10 | r8 = r6 + 0x10;
| do {
0x000182aa ldr r3, [r4] | r3 = *(r4);
0x000182ac movs r2, 0 | r2 = 0;
0x000182ae str r2, [r4], 4 | *(r4) = r2;
| r4 += 4;
0x000182b2 mov r0, r3 | r0 = r3;
0x000182b4 str r3, [sp, 0x14] | var_14h = r3;
| if (r3 != 0) {
0x000182b6 cbz r3, 0x182c4 |
0x000182b8 bl 0x1afd4 | fcn_0001afd4 (r0);
0x000182bc ldr r3, [sp, 0x14] | r3 = var_14h;
0x000182be mov r0, r3 | r0 = r3;
0x000182c0 blx 0x4ec4 | fcn_00004ec4 ();
| }
0x000182c4 ldr r1, [r5, 4]! | r1 = *((r5 += 4));
0x000182c8 mov r0, r6 | r0 = r6;
| if (r1 != 0) {
0x000182ca cbz r1, 0x182d2 |
0x000182cc bl 0x19258 | r0 = fcn_00019258 (r0, r1);
| if (r0 != 0) {
0x000182d0 cbnz r0, 0x182e6 | goto label_2;
| }
| }
| label_0:
0x000182d2 cmp r4, r8 |
0x000182d4 bne 0x182aa |
| } while (r4 != r8);
0x000182d6 movs r3, 0 | r3 = 0;
0x000182d8 mov r0, r6 | r0 = r6;
0x000182da str r3, [r7] | *(r7) = r3;
0x000182dc add sp, 0x1c |
0x000182de pop.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000182e2 b.w 0x4ec0 | void (*0x4ec0)() ();
| label_2:
0x000182e6 ldr r3, [pc, 0x4c] |
0x000182e8 ldr.w r3, [sl, r3] | r3 = *((sl + r3));
0x000182ec ldr r3, [r3] | r3 = *(0x18336);
0x000182ee str r3, [sp, 0x14] | var_14h = r3;
0x000182f0 blx 0x53f4 | r0 = sprintf_chk ()
0x000182f4 ldr r0, [r0] | r0 = *(r0);
0x000182f6 blx 0x52d4 | loc_imp_gmon_start_ ();
0x000182fa ldr r3, [sp, 0x14] | r3 = var_14h;
0x000182fc movs r1, 1 | r1 = 1;
0x000182fe ldr r2, [pc, 0x38] |
0x00018300 str r0, [sp, 8] | var_8h = r0;
0x00018302 mov r0, r3 | r0 = r3;
0x00018304 movw r3, 0x161 | r3 = 0x161;
0x00018308 add r2, pc | r2 = 0x30646;
0x0001830a str r3, [sp] | *(sp) = r3;
0x0001830c str.w sb, [sp, 4] | __asm ("str.w sb, [var_4h]");
0x00018310 mov r3, fp | r3 = fp;
0x00018312 blx 0x5538 | ext2fs_write_inode ();
0x00018316 ldr r0, [r5] | r0 = *(r5);
0x00018318 blx 0x4ec4 | fcn_00004ec4 ();
0x0001831c movs r3, 0 | r3 = 0;
0x0001831e str r3, [r5] | *(r5) = r3;
0x00018320 b 0x182d2 | goto label_0;
| label_1:
0x00018322 add sp, 0x1c |
0x00018324 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/debugfs @ 0x188c4 */
| #include <stdint.h>
|
; (fcn) fcn.000188c4 () | void fcn_000188c4 (int16_t arg_f0h, int16_t arg_f8h, int16_t arg_138h, int16_t arg_170h, int16_t arg_140h, int16_t arg_178h, int16_t arg_188h, int16_t arg_190h, int16_t arg_1c8h, int16_t arg_1a0h, int16_t arg_1d0h, int16_t arg_278h, int16_t arg_220h, int16_t arg_248h, int16_t arg_2a0h, int16_t arg_2e8h, int16_t arg_328h, int16_t arg_308h, int16_t arg_350h, int16_t arg_2f8h, int16_t arg_300h, int16_t arg_3b0h, int16_t arg_398h, int16_t arg_3a8h, int16_t arg_3d8h, int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_8h_2;
| int16_t var_10h_2;
| int16_t var_14h_3;
| int16_t var_30h_2;
| int16_t var_34h;
| int16_t var_8h;
| int16_t var_10h;
| int16_t var_14h_2;
| int16_t var_48h;
| int16_t var_28h;
| int16_t var_30h;
| int16_t var_34h_2;
| int16_t var_8h_3;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_20h;
| int16_t var_30h_3;
| int16_t var_d8h;
| int16_t var_b8h;
| int16_t var_8ch;
| int16_t var_90h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x000188c4 push.w {r4, r5, r6, r7, r8, sb, lr} |
0x000188c8 mov r6, r2 | r6 = r2;
0x000188ca ldr r2, [pc, 0x2c0] |
0x000188cc sub sp, 0x94 |
0x000188ce mov r5, r1 | r5 = r1;
0x000188d0 movs r1, 0 | r1 = 0;
0x000188d2 ldr r3, [pc, 0x2bc] | r3 = *(0x18b92);
0x000188d4 mov r7, r0 | r7 = r0;
0x000188d6 add r2, pc | r2 = 0x31468;
0x000188d8 ldr.w r8, [pc, 0x2b8] |
0x000188dc ldr r3, [r2, r3] |
0x000188de mov.w r2, 0x1b6 | r2 = 0x1b6;
0x000188e2 add r8, pc | r8 = 0x3147a;
0x000188e4 ldr r3, [r3] | r3 = *(0x31468);
0x000188e6 str r3, [sp, 0x8c] | var_8ch = r3;
0x000188e8 mov.w r3, 0 | r3 = 0;
0x000188ec str r1, [sp, 0x14] | var_14h = r1;
0x000188ee blx 0x58f4 | r0 = fcn_000058f4 ();
0x000188f2 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 < r0) {
0x000188f4 blt 0x1895e | goto label_12;
| }
| label_5:
0x000188f6 add r1, sp, 0x20 | r1 += var_20h;
0x000188f8 mov r0, r4 | r0 = r4;
0x000188fa blx 0x5494 | r0 = fcn_00005494 ();
0x000188fe cmp r0, 0 |
| if (r0 < 0) {
0x00018900 blt.w 0x18b62 | goto label_13;
| }
0x00018904 mov r0, r4 | r0 = r4;
0x00018906 blx 0x5894 | fcn_00005894 ();
0x0001890a ldr r3, [sp, 0x30] | r3 = var_30h_3;
0x0001890c and r3, r3, 0xf000 | r3 &= 0xf000;
0x00018910 cmp.w r3, 0x6000 |
| if (r3 == 0x6000) {
0x00018914 beq 0x18950 | goto label_14;
| }
0x00018916 and r3, r5, 1 | r3 = r5 & 1;
0x0001891a cmp r6, 0 |
| if (r6 == 0) {
0x0001891c beq 0x189ee | goto label_15;
| }
0x0001891e movs r2, 0 | r2 = 0;
0x00018920 str r2, [r6] | *(r6) = r2;
| if (r3 == 0) {
0x00018922 cbz r3, 0x18956 | goto label_2;
| }
| label_3:
0x00018924 ldr r1, [pc, 0x270] |
0x00018926 mov r2, r7 | r2 = r7;
0x00018928 movs r0, 1 | r0 = 1;
0x0001892a movs r4, 0 | r4 = 0;
0x0001892c add r1, pc | r1 = 0x314c8;
0x0001892e blx 0x54bc | fcn_000054bc ();
| do {
| label_1:
0x00018932 ldr r2, [pc, 0x268] |
0x00018934 ldr r3, [pc, 0x258] | r3 = *(0x18b90);
0x00018936 add r2, pc | r2 = 0x314d8;
0x00018938 ldr r3, [r2, r3] | r3 = *(0x314d8);
0x0001893a ldr r2, [r3] | r2 = *(0x314d8);
0x0001893c ldr r3, [sp, 0x8c] | r3 = var_8ch;
0x0001893e eors r2, r3 | r2 ^= r3;
0x00018940 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00018944 bne.w 0x18b6c | goto label_16;
| }
0x00018948 mov r0, r4 | r0 = r4;
0x0001894a add sp, 0x94 |
0x0001894c pop.w {r4, r5, r6, r7, r8, sb, pc} |
| if (r6 != 0) {
| label_14:
0x00018950 cbz r6, 0x18956 |
0x00018952 movs r3, 1 | r3 = 1;
0x00018954 str r3, [r6] | *(r6) = r3;
| }
| label_2:
0x00018956 lsls r3, r5, 0x1d | r3 = r5 << 0x1d;
| if (r3 < r5) {
0x00018958 bmi 0x18998 | goto label_17;
| }
| label_0:
0x0001895a movs r4, 1 | r4 = 1;
0x0001895c b 0x18932 |
| } while (1);
| label_12:
0x0001895e blx 0x53f4 | r0 = sprintf_chk ()
0x00018962 mov sb, r0 | sb = r0;
0x00018964 ldr r0, [r0] | r0 = *(r0);
0x00018966 cmp r0, 2 |
| if (r0 == 2) {
0x00018968 beq.w 0x18aa0 | goto label_18;
| }
| label_4:
0x0001896c ldr r3, [pc, 0x230] | r3 = *(0x18ba0);
0x0001896e ldr.w r4, [r8, r3] | r4 = *((r8 + r3));
0x00018972 ldr r5, [r4] | r5 = *(r4);
0x00018974 blx 0x54c8 | fcn_000054c8 ();
0x00018978 ldr r2, [pc, 0x228] |
0x0001897a mov r3, r7 | r3 = r7;
0x0001897c str r0, [sp] | *(sp) = r0;
0x0001897e movs r1, 1 | r1 = 1;
0x00018980 mov r0, r5 | r0 = r5;
0x00018982 add r2, pc | r2 = 0x3152a;
0x00018984 blx 0x5538 | ext2fs_write_inode ();
0x00018988 ldr.w r3, [sb] | r3 = *(sb);
0x0001898c cmp r3, 2 |
| if (r3 == 2) {
0x0001898e beq.w 0x18af4 | goto label_19;
| }
| label_7:
0x00018992 movs r0, 1 | r0 = 1;
0x00018994 blx 0x5328 | set_undo_io_backing_manager ();
| label_17:
0x00018998 movs r1, 0 | r1 = 0;
0x0001899a add r0, sp, 0x14 | r0 += var_14h;
0x0001899c blx 0x5818 | r0 = fcn_00005818 ();
0x000189a0 cmp r0, 0 |
| if (r0 >= 0) {
0x000189a2 bge 0x189f4 | goto label_20;
| }
| label_6:
0x000189a4 mov r0, r7 | r0 = r7;
0x000189a6 blx 0x4e60 | r0 = blkid_new_probe_from_filename ();
0x000189aa mov r5, r0 | r5 = r0;
0x000189ac cmp r0, 0 |
| if (r0 == 0) {
0x000189ae beq 0x1895a | goto label_0;
| }
0x000189b0 movs r1, 1 | r1 = 1;
0x000189b2 blx 0x4f0c | r0 = fcn_00004f0c ();
0x000189b6 cmp r0, 0 |
| if (r0 >= 0) {
0x000189b8 blt 0x189e4 |
0x000189ba movs r1, 0 | r1 = 0;
0x000189bc mov r0, r5 | r0 = r5;
0x000189be blx 0x4ed0 | r0 = fcn_00004ed0 ();
0x000189c2 cmp r0, 0 |
| if (r0 < 0) {
0x000189c4 blt 0x189e4 | goto label_21;
| }
0x000189c6 mov r0, r5 | r0 = r5;
0x000189c8 blx 0x52c8 | r0 = localtime (r0);
0x000189cc cmp r0, 0 |
| if (r0 < 0) {
0x000189ce blt 0x189e4 | goto label_21;
| }
0x000189d0 ldr r1, [pc, 0x1d4] |
0x000189d2 movs r3, 0 | r3 = 0;
0x000189d4 add r2, sp, 0x1c | r2 += var_1ch;
0x000189d6 mov r0, r5 | r0 = r5;
0x000189d8 add r1, pc | r1 = 0x31584;
0x000189da blx 0x4e18 | r0 = blkid_probe_lookup_value ();
0x000189de mov r4, r0 | r4 = r0;
0x000189e0 cmp r0, 0 |
| if (r0 == 0) {
0x000189e2 beq 0x18ad6 | goto label_22;
| }
| }
| label_21:
0x000189e4 mov r0, r5 | r0 = r5;
0x000189e6 movs r4, 1 | r4 = 1;
0x000189e8 blx 0x561c | ext2fs_get_next_inode ();
0x000189ec b 0x18932 | goto label_1;
| label_15:
0x000189ee cmp r3, 0 |
| if (r3 == 0) {
0x000189f0 beq 0x18956 | goto label_2;
| }
0x000189f2 b 0x18924 | goto label_3;
| label_20:
0x000189f4 ldr r1, [pc, 0x1b4] |
0x000189f6 mov r2, r7 | r2 = r7;
0x000189f8 ldr r0, [sp, 0x14] | r0 = var_14h;
0x000189fa add r1, pc | r1 = 0x315aa;
0x000189fc blx 0x5068 | r0 = fcn_00005068 ();
0x00018a00 mov r4, r0 | r4 = r0;
0x00018a02 cmp r0, 0 |
| if (r0 == 0) {
0x00018a04 beq 0x18ace | goto label_23;
| }
0x00018a06 ldr r1, [pc, 0x1a8] |
0x00018a08 mov r2, r7 | r2 = r7;
0x00018a0a ldr r0, [sp, 0x14] | r0 = var_14h;
0x00018a0c add r1, pc | r1 = 0x315c2;
0x00018a0e blx 0x5068 | r0 = fcn_00005068 ();
0x00018a12 mov r5, r0 | r5 = r0;
0x00018a14 ldr r0, [sp, 0x14] | r0 = var_14h;
0x00018a16 blx 0x4fb4 | fcn_00004fb4 ();
0x00018a1a mov r3, r4 | r3 = r4;
0x00018a1c cmp r5, 0 |
| if (r5 == 0) {
0x00018a1e beq 0x18b04 | goto label_24;
| }
0x00018a20 ldr r1, [pc, 0x190] |
0x00018a22 mov r2, r7 | r2 = r7;
0x00018a24 movs r0, 1 | r0 = 1;
0x00018a26 str r5, [sp] | *(sp) = r5;
0x00018a28 add r1, pc | r1 = 0x315e0;
0x00018a2a blx 0x54bc | fcn_000054bc ();
| label_8:
0x00018a2e ldrb r3, [r4] | r3 = *(r4);
0x00018a30 cmp r3, 0x65 |
| if (r3 == 0x65) {
0x00018a32 bne 0x18a90 |
0x00018a34 ldrb r3, [r4, 1] | r3 = *((r4 + 1));
0x00018a36 cmp r3, 0x78 |
| if (r3 != 0x78) {
0x00018a38 bne 0x18a90 | goto label_25;
| }
0x00018a3a ldrb r3, [r4, 2] | r3 = *((r4 + 2));
0x00018a3c subs r3, 0x74 | r3 -= 0x74;
| if (r3 != 0x74) {
0x00018a3e bne 0x18a90 | goto label_25;
| }
0x00018a40 ldr r2, [pc, 0x174] |
0x00018a42 add r6, sp, 0x18 | r6 += var_18h;
0x00018a44 str r6, [sp, 8] | var_8h_3 = r6;
0x00018a46 mov r0, r7 | r0 = r7;
0x00018a48 mov r1, r3 | r1 = r3;
0x00018a4a ldr.w r2, [r8, r2] | r2 = *((r8 + r2));
0x00018a4e str r3, [sp] | *(sp) = r3;
0x00018a50 ldr r2, [r2] | r2 = *(0x18bb8);
0x00018a52 str r2, [sp, 4] | var_34h_2 = r2;
0x00018a54 mov.w r2, 0x20000 | r2 = 0x20000;
0x00018a58 blx 0x5430 | r0 = e2p_jrnl_feature2string ();
| if (r0 != 0) {
0x00018a5c cbnz r0, 0x18a90 | goto label_25;
| }
0x00018a5e ldr r3, [sp, 0x18] | r3 = var_18h;
0x00018a60 ldr r7, [r3, 0x10] | r7 = *((r3 + 0x10));
0x00018a62 ldr r3, [r7, 0x2c] | r3 = *((r7 + 0x2c));
0x00018a64 cmp r3, 0 |
| if (r3 == 0) {
0x00018a66 beq 0x18b18 | goto label_26;
| }
0x00018a68 str r3, [sp, 0x1c] | var_1ch = r3;
0x00018a6a add r0, sp, 0x1c | r0 += var_1ch;
0x00018a6c ldrb.w r3, [r7, 0x88] | r3 = *((r7 + 0x88));
0x00018a70 cmp r3, 0 |
| if (r3 == 0) {
0x00018a72 beq 0x18b3a | goto label_27;
| }
0x00018a74 blx 0x4fc0 | fcn_00004fc0 ();
0x00018a78 ldr r1, [pc, 0x140] |
0x00018a7a add.w r3, r7, 0x88 | r3 = r7 + 0x88;
0x00018a7e str r0, [sp] | *(sp) = r0;
0x00018a80 movs r2, 0x40 | r2 = 0x40;
0x00018a82 movs r0, 1 | r0 = 1;
0x00018a84 add r1, pc | r1 = 0x31644;
0x00018a86 blx 0x54bc | fcn_000054bc ();
| label_9:
0x00018a8a mov r0, r6 | r0 = r6;
0x00018a8c blx 0x55c8 | ext2fs_test_generic_bmap ();
| }
| label_25:
0x00018a90 mov r0, r4 | r0 = r4;
0x00018a92 movs r4, 0 | r4 = 0;
0x00018a94 blx 0x4ec4 | fcn_00004ec4 ();
0x00018a98 mov r0, r5 | r0 = r5;
0x00018a9a blx 0x4ec4 | fcn_00004ec4 ();
0x00018a9e b 0x18932 | goto label_1;
| label_18:
0x00018aa0 lsls r4, r5, 0x1b | r4 = r5 << 0x1b;
| if (r4 < r5) {
0x00018aa2 bmi 0x18b70 | goto label_28;
| }
0x00018aa4 lsls r1, r5, 0x1e | r1 = r5 << 0x1e;
| if (r1 >= r5) {
0x00018aa6 bpl.w 0x1896c | goto label_4;
| }
0x00018aaa mov.w r2, 0x1b6 | r2 = 0x1b6;
0x00018aae movs r1, 0x40 | r1 = 0x40;
0x00018ab0 mov r0, r7 | r0 = r7;
0x00018ab2 blx 0x58f4 | r0 = fcn_000058f4 ();
0x00018ab6 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 < r0) {
0x00018ab8 blt 0x18b12 | goto label_29;
| }
0x00018aba lsls r2, r5, 0x1c | r2 = r5 << 0x1c;
| if (r2 >= r5) {
0x00018abc bpl.w 0x188f6 | goto label_5;
| }
0x00018ac0 ldr r1, [pc, 0xfc] |
0x00018ac2 mov r2, r7 | r2 = r7;
0x00018ac4 movs r0, 1 | r0 = 1;
0x00018ac6 add r1, pc | r1 = 0x3168a;
0x00018ac8 blx 0x54bc | fcn_000054bc ();
0x00018acc b 0x188f6 | goto label_5;
| label_23:
0x00018ace ldr r0, [sp, 0x14] | r0 = var_14h;
0x00018ad0 blx 0x4fb4 | fcn_00004fb4 ();
0x00018ad4 b 0x189a4 | goto label_6;
| label_22:
0x00018ad6 ldr r3, [pc, 0xc8] | r3 = *(0x18ba2);
0x00018ad8 movs r1, 1 | r1 = 1;
0x00018ada ldr.w r2, [r8, r3] | r2 = *((r8 + r3));
0x00018ade str r7, [sp] | *(sp) = r7;
0x00018ae0 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x00018ae2 ldr r0, [r2] | r0 = *(r2);
0x00018ae4 ldr r2, [pc, 0xdc] |
0x00018ae6 add r2, pc | r2 = 0x316ae;
0x00018ae8 blx 0x5538 | ext2fs_write_inode ();
0x00018aec mov r0, r5 | r0 = r5;
0x00018aee blx 0x561c | ext2fs_get_next_inode ();
0x00018af2 b 0x18932 | goto label_1;
| label_19:
0x00018af4 ldr r0, [pc, 0xd0] |
0x00018af6 movs r2, 0x45 | r2 = 0x45;
0x00018af8 ldr r3, [r4] | r3 = *(r4);
0x00018afa movs r1, 1 | r1 = 1;
0x00018afc add r0, pc | r0 = 0x316c8;
0x00018afe blx 0x5130 | ioctl (r0, r1);
0x00018b02 b 0x18992 | goto label_7;
| label_24:
0x00018b04 ldr r1, [pc, 0xc4] |
0x00018b06 mov r2, r7 | r2 = r7;
0x00018b08 movs r0, 1 | r0 = 1;
0x00018b0a add r1, pc | r1 = 0x316da;
0x00018b0c blx 0x54bc | fcn_000054bc ();
0x00018b10 b 0x18a2e | goto label_8;
| label_29:
0x00018b12 ldr.w r0, [sb] | r0 = *(sb);
0x00018b16 b 0x1896c | goto label_4;
| label_26:
0x00018b18 ldr.w r3, [r7, 0x108] | r3 = *((r7 + 0x108));
| if (r3 != 0) {
0x00018b1c cbnz r3, 0x18b4c | goto label_30;
| }
0x00018b1e ldr r3, [r7, 0x30] | r3 = *((r7 + 0x30));
0x00018b20 cmp r3, 0 |
| if (r3 == 0) {
0x00018b22 beq 0x18a8a | goto label_9;
| }
0x00018b24 add r0, sp, 0x1c | r0 += var_1ch;
0x00018b26 str r3, [sp, 0x1c] | var_1ch = r3;
0x00018b28 blx 0x4fc0 | fcn_00004fc0 ();
0x00018b2c ldr r1, [pc, 0xa0] |
0x00018b2e mov r2, r0 | r2 = r0;
0x00018b30 movs r0, 1 | r0 = 1;
0x00018b32 add r1, pc | r1 = 0x31706;
0x00018b34 blx 0x54bc | fcn_000054bc ();
0x00018b38 b 0x18a8a | goto label_9;
| label_27:
0x00018b3a blx 0x4fc0 | fcn_00004fc0 ();
0x00018b3e ldr r1, [pc, 0x94] |
0x00018b40 mov r2, r0 | r2 = r0;
0x00018b42 movs r0, 1 | r0 = 1;
0x00018b44 add r1, pc | r1 = 0x3171e;
0x00018b46 blx 0x54bc | fcn_000054bc ();
0x00018b4a b 0x18a8a | goto label_9;
| label_30:
0x00018b4c add r0, sp, 0x1c | r0 += var_1ch;
0x00018b4e str r3, [sp, 0x1c] | var_1ch = r3;
0x00018b50 blx 0x4fc0 | fcn_00004fc0 ();
0x00018b54 ldr r1, [pc, 0x80] |
0x00018b56 mov r2, r0 | r2 = r0;
0x00018b58 movs r0, 1 | r0 = 1;
0x00018b5a add r1, pc | r1 = 0x31736;
0x00018b5c blx 0x54bc | fcn_000054bc ();
0x00018b60 b 0x18a8a | goto label_9;
| label_13:
0x00018b62 ldr r0, [pc, 0x78] |
0x00018b64 add r0, pc | r0 = 0x31746;
0x00018b66 blx 0x50e4 | fcn_000050e4 ();
0x00018b6a b 0x18992 | goto label_7;
| label_16:
0x00018b6c blx 0x5008 | fcn_00005008 ();
| label_28:
0x00018b70 ldr r0, [pc, 0x2c] |
0x00018b72 mov r3, r7 | r3 = r7;
0x00018b74 ldr r2, [pc, 0x68] |
0x00018b76 movs r1, 1 | r1 = 1;
0x00018b78 ldr.w r0, [r8, r0] | r0 = *((r8 + r0));
0x00018b7c add r2, pc | r2 = 0x31760;
0x00018b7e ldr r0, [r0] | r0 = *(0x18ba0);
0x00018b80 blx 0x5538 | ext2fs_write_inode ();
0x00018b84 movs r0, 1 | r0 = 1;
0x00018b86 blx 0x5328 | set_undo_io_backing_manager ();
0x00018b8a nop |
0x00018b8c uxtb r6, r0 | r6 = (int8_t) r0;
0x00018b8e movs r1, r0 | r1 = r0;
0x00018b90 lsls r0, r2, 0x10 | r0 = r2 << 0x10;
0x00018b92 movs r0, r0 |
0x00018b94 uxth r2, r7 | r2 = (int16_t) r7;
0x00018b96 movs r1, r0 | r1 = r0;
0x00018b98 ldr r1, [sp, 0xf0] | r1 = *(arg_f0h);
0x00018b9a movs r0, r0 |
0x00018b9c sxtb r6, r4 | r6 = (int32_t) r4;
0x00018b9e movs r1, r0 | r1 = r0;
0x00018ba0 lsls r0, r5, 0x10 | r0 = r5 << 0x10;
0x00018ba2 movs r0, r0 |
0x00018ba4 ldr r1, [sp, 0x3a8] | r1 = *(arg_3a8h);
0x00018ba6 movs r0, r0 |
0x00018ba8 ldr r1, [sp, 0x1a0] | r1 = *(arg_1a0h);
0x00018baa movs r0, r0 |
0x00018bac ldr r0, [sp, 0x248] | r0 = *(arg_248h);
0x00018bae movs r0, r0 |
0x00018bb0 ldr r0, [sp, 0x220] | r0 = *(arg_220h);
0x00018bb2 movs r0, r0 |
0x00018bb4 ldr r0, [sp, 0x1d0] | r0 = *(arg_1d0h);
0x00018bb6 movs r0, r0 |
0x00018bb8 lsls r0, r1, 0x11 | r0 = r1 << 0x11;
0x00018bba movs r0, r0 |
0x00018bbc ldr r0, [sp, 0x190] | r0 = *(arg_190h);
0x00018bbe movs r0, r0 |
0x00018bc0 str r7, [sp, 0xf8] | *(arg_f8h) = r7;
0x00018bc2 movs r0, r0 |
0x00018bc4 ldr r0, [sp, 0x188] | r0 = *(arg_188h);
0x00018bc6 movs r0, r0 |
0x00018bc8 str r7, [sp, 0x90] | var_90h = r7;
0x00018bca movs r0, r0 |
0x00018bcc str r7, [sp, 0x2f8] | *(arg_2f8h) = r7;
0x00018bce movs r0, r0 |
0x00018bd0 str r7, [sp, 0x3d8] | *(arg_3d8h) = r7;
0x00018bd2 movs r0, r0 |
0x00018bd4 str r7, [sp, 0x300] | *(arg_300h) = r7;
0x00018bd6 movs r0, r0 |
0x00018bd8 str r7, [sp, 0x2f8] | *(arg_2f8h) = r7;
0x00018bda movs r0, r0 |
0x00018bdc asrs r4, r0 | r4 >>= r0;
0x00018bde movs r0, r0 |
0x00018be0 str r6, [sp, 0x140] | *(arg_140h) = r6;
0x00018be2 movs r0, r0 |
0x00018be4 push.w {r4, r5, r6, r7, r8, lr} |
0x00018be8 movs r4, 0 | r4 = 0;
0x00018bea ldr r6, [r0, 8] | r6 = *(0x18ba8);
0x00018bec sub sp, 0x18 |
0x00018bee ldr r0, [pc, 0x9c] |
0x00018bf0 ldr r1, [pc, 0x9c] | r1 = *(0x18c90);
0x00018bf2 ldr r7, [pc, 0xa0] |
0x00018bf4 add r0, pc | r0 = 0x31886;
0x00018bf6 ldr.w r8, [sp, 0x30] | r8 = var_30h;
0x00018bfa ldr r1, [r0, r1] |
0x00018bfc mov r0, r6 | r0 = r6;
0x00018bfe add r7, pc | r7 = 0x31898;
0x00018c00 ldr r1, [r1] | r1 = *(0x31886);
0x00018c02 str r1, [sp, 0x14] | var_14h_2 = r1;
0x00018c04 mov.w r1, 0 | r1 = 0;
0x00018c08 strd r4, r4, [sp] | __asm ("strd r4, r4, [sp]");
0x00018c0c str r4, [sp, 0x10] | var_10h = r4;
0x00018c0e blx 0x5580 | r0 = ext2fs_mkdir ();
0x00018c12 mov r5, r0 | r5 = r0;
| if (r0 != 0) {
0x00018c14 cbnz r0, 0x18c40 | goto label_31;
| }
0x00018c16 ldr r2, [sp, 0x34] | r2 = var_34h_2;
0x00018c18 add r3, sp, 0x10 | r3 += var_10h;
0x00018c1a mov r1, r8 | r1 = r8;
0x00018c1c mov r0, r6 | r0 = r6;
0x00018c1e blx 0x4db8 | r0 = ext2fs_file_read ();
| if (r0 != 0) {
0x00018c22 cbnz r0, 0x18c64 | goto label_32;
| }
0x00018c24 ldr r0, [sp, 0x10] | r0 = var_10h;
| do {
| label_10:
0x00018c26 ldr r2, [pc, 0x70] |
0x00018c28 ldr r3, [pc, 0x64] | r3 = *(0x18c90);
0x00018c2a add r2, pc | r2 = 0x318c8;
0x00018c2c ldr r3, [r2, r3] | r3 = *(0x318c8);
0x00018c2e ldr r2, [r3] | r2 = *(0x318c8);
0x00018c30 ldr r3, [sp, 0x14] | r3 = var_14h_2;
0x00018c32 eors r2, r3 | r2 ^= r3;
0x00018c34 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00018c38 bne 0x18c88 | goto label_33;
| }
0x00018c3a add sp, 0x18 |
0x00018c3c pop.w {r4, r5, r6, r7, r8, pc} |
| label_31:
0x00018c40 ldr r3, [pc, 0x58] | r3 = *(0x18c9c);
0x00018c42 ldr r2, [pc, 0x5c] |
0x00018c44 ldr r1, [r7, r3] | r1 = *((r7 + r3));
0x00018c46 add r2, pc | r2 = 0x318ec;
0x00018c48 str r0, [sp, 8] | var_8h = r0;
0x00018c4a movs r0, 0xac | r0 = 0xac;
0x00018c4c ldr r3, [pc, 0x54] |
0x00018c4e strd r0, r2, [sp] | __asm ("strd r0, r2, [sp]");
0x00018c52 ldr r2, [pc, 0x54] |
0x00018c54 ldr r0, [r1] | r0 = *(r1);
0x00018c56 add r3, pc | r3 = 0x318fe;
0x00018c58 movs r1, 1 | r1 = 1;
0x00018c5a add r2, pc | r2 = 0x31908;
0x00018c5c blx 0x5538 | ext2fs_write_inode ();
0x00018c60 mov r0, r4 | r0 = r4;
0x00018c62 b 0x18c26 |
| } while (1);
| label_32:
0x00018c64 ldr r3, [pc, 0x34] | r3 = *(0x18c9c);
0x00018c66 ldr r2, [pc, 0x44] |
0x00018c68 ldr r1, [r7, r3] | r1 = *((r7 + r3));
0x00018c6a add r2, pc | r2 = 0x3191c;
0x00018c6c str r0, [sp, 8] | var_8h = r0;
0x00018c6e movs r0, 0xb2 | r0 = 0xb2;
0x00018c70 ldr r3, [pc, 0x3c] |
0x00018c72 strd r0, r2, [sp] | __asm ("strd r0, r2, [sp]");
0x00018c76 ldr r2, [pc, 0x3c] |
0x00018c78 ldr r0, [r1] | r0 = *(r1);
0x00018c7a add r3, pc | r3 = 0x3192e;
0x00018c7c movs r1, 1 | r1 = 1;
0x00018c7e add r2, pc | r2 = 0x31938;
0x00018c80 blx 0x5538 | ext2fs_write_inode ();
0x00018c84 mov r0, r5 | r0 = r5;
0x00018c86 b 0x18c26 | goto label_10;
| label_33:
0x00018c88 blx 0x5008 | fcn_00005008 ();
0x00018c8c add r7, sp, 0x2a0 | r7 += arg_2a0h;
0x00018c8e movs r1, r0 | r1 = r0;
0x00018c90 lsls r0, r2, 0x10 | r0 = r2 << 0x10;
0x00018c92 movs r0, r0 |
0x00018c94 add r7, sp, 0x278 | r7 += arg_248h;
0x00018c96 movs r1, r0 | r1 = r0;
0x00018c98 add r7, sp, 0x1c8 | r7 += arg_1c8h;
0x00018c9a movs r1, r0 | r1 = r0;
0x00018c9c lsls r0, r5, 0x10 | r0 = r5 << 0x10;
0x00018c9e movs r0, r0 |
0x00018ca0 ldr r1, [sp, 0x398] | r1 = *(arg_398h);
0x00018ca2 movs r0, r0 |
0x00018ca4 str r7, [sp, 0xb8] | var_b8h = r7;
0x00018ca6 movs r0, r0 |
0x00018ca8 str r7, [sp, 0x138] | *(arg_138h) = r7;
0x00018caa movs r0, r0 |
0x00018cac ldr r1, [sp, 0x308] | r1 = *(arg_308h);
0x00018cae movs r0, r0 |
0x00018cb0 str r7, [sp, 0x28] | var_28h = r7;
0x00018cb2 movs r0, r0 |
0x00018cb4 str r7, [sp, 0x178] | *(arg_178h) = r7;
0x00018cb6 movs r0, r0 |
0x00018cb8 push.w {r4, r5, r6, r7, r8, lr} |
0x00018cbc movs r4, 0 | r4 = 0;
0x00018cbe ldr r6, [r0, 8] | r6 = *((r0 + 8));
0x00018cc0 sub sp, 0x18 |
0x00018cc2 ldr r0, [pc, 0xa0] |
0x00018cc4 ldr r1, [pc, 0xa0] | r1 = *(0x18d68);
0x00018cc6 ldr r7, [pc, 0xa4] |
0x00018cc8 add r0, pc | r0 = 0x31a32;
0x00018cca ldr.w r8, [sp, 0x30] | r8 = var_30h_2;
0x00018cce ldr r1, [r0, r1] |
0x00018cd0 mov r0, r6 | r0 = r6;
0x00018cd2 add r7, pc | r7 = 0x31a44;
0x00018cd4 ldr r1, [r1] | r1 = *(0x31a32);
0x00018cd6 str r1, [sp, 0x14] | var_14h_3 = r1;
0x00018cd8 mov.w r1, 0 | r1 = 0;
0x00018cdc strd r4, r4, [sp] | __asm ("strd r4, r4, [sp]");
0x00018ce0 str r4, [sp, 0x10] | var_10h_2 = r4;
0x00018ce2 blx 0x5580 | r0 = ext2fs_mkdir ();
0x00018ce6 mov r5, r0 | r5 = r0;
| if (r0 != 0) {
0x00018ce8 cbnz r0, 0x18d14 | goto label_34;
| }
0x00018cea ldr r2, [sp, 0x34] | r2 = var_34h;
0x00018cec add r3, sp, 0x10 | r3 += var_10h_2;
0x00018cee mov r1, r8 | r1 = r8;
0x00018cf0 mov r0, r6 | r0 = r6;
0x00018cf2 blx 0x4e30 | r0 = ext2fs_file_write ();
| if (r0 != 0) {
0x00018cf6 cbnz r0, 0x18d3a | goto label_35;
| }
0x00018cf8 ldr r0, [sp, 0x10] | r0 = var_10h_2;
| do {
| label_11:
0x00018cfa ldr r2, [pc, 0x74] |
0x00018cfc ldr r3, [pc, 0x68] | r3 = *(0x18d68);
0x00018cfe add r2, pc | r2 = 0x31a74;
0x00018d00 ldr r3, [r2, r3] | r3 = *(0x31a74);
0x00018d02 ldr r2, [r3] | r2 = *(0x31a74);
0x00018d04 ldr r3, [sp, 0x14] | r3 = var_14h_3;
0x00018d06 eors r2, r3 | r2 ^= r3;
0x00018d08 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00018d0c bne 0x18d60 | goto label_36;
| }
0x00018d0e add sp, 0x18 |
0x00018d10 pop.w {r4, r5, r6, r7, r8, pc} |
| label_34:
0x00018d14 ldr r2, [pc, 0x5c] |
0x00018d16 movs r1, 0x94 | r1 = 0x94;
0x00018d18 ldr r3, [pc, 0x5c] | r3 = *(0x18d78);
0x00018d1a add r2, pc | r2 = 0x31a92;
0x00018d1c adds r2, 0x14 | r2 += 0x14;
0x00018d1e ldr r0, [r7, r3] | r0 = *((r7 + r3));
0x00018d20 str r2, [sp, 4] | var_4h = r2;
0x00018d22 ldr r3, [pc, 0x58] |
0x00018d24 ldr r2, [pc, 0x58] |
0x00018d26 str r5, [sp, 8] | var_8h_2 = r5;
0x00018d28 add r3, pc | r3 = 0x31aaa;
0x00018d2a ldr r0, [r0] | r0 = *(r0);
0x00018d2c add r2, pc | r2 = 0x31ab0;
0x00018d2e str r1, [sp] | *(sp) = r1;
0x00018d30 movs r1, 1 | r1 = 1;
0x00018d32 blx 0x5538 | ext2fs_write_inode ();
0x00018d36 mov r0, r4 | r0 = r4;
0x00018d38 b 0x18cfa |
| } while (1);
| label_35:
0x00018d3a ldr r2, [pc, 0x48] |
0x00018d3c movs r1, 0x9a | r1 = 0x9a;
0x00018d3e ldr r3, [pc, 0x38] | r3 = *(0x18d7a);
0x00018d40 add r2, pc | r2 = 0x31aca;
0x00018d42 adds r2, 0x14 | r2 += 0x14;
0x00018d44 ldr r4, [r7, r3] | r4 = *((r7 + r3));
0x00018d46 str r2, [sp, 4] | var_4h = r2;
0x00018d48 ldr r3, [pc, 0x3c] |
0x00018d4a ldr r2, [pc, 0x40] |
0x00018d4c str r0, [sp, 8] | var_8h_2 = r0;
0x00018d4e add r3, pc | r3 = 0x31ada;
0x00018d50 ldr r0, [r4] | r0 = *(r4);
0x00018d52 add r2, pc | r2 = 0x31ae4;
0x00018d54 str r1, [sp] | *(sp) = r1;
0x00018d56 movs r1, 1 | r1 = 1;
0x00018d58 blx 0x5538 | ext2fs_write_inode ();
0x00018d5c mov r0, r5 | r0 = r5;
0x00018d5e b 0x18cfa | goto label_11;
| label_36:
0x00018d60 blx 0x5008 | fcn_00005008 ();
0x00018d64 add r6, sp, 0x350 | r6 += arg_350h;
0x00018d66 movs r1, r0 | r1 = r0;
0x00018d68 lsls r0, r2, 0x10 | r0 = r2 << 0x10;
0x00018d6a movs r0, r0 |
0x00018d6c add r6, sp, 0x328 | r6 += arg_328h;
0x00018d6e movs r1, r0 | r1 = r0;
0x00018d70 add r6, sp, 0x278 | r6 += arg_278h;
0x00018d72 movs r1, r0 | r1 = r0;
0x00018d74 ldr r1, [sp, 0x48] | r1 = var_48h;
0x00018d76 movs r0, r0 |
0x00018d78 lsls r0, r5, 0x10 | r0 = r5 << 0x10;
0x00018d7a movs r0, r0 |
0x00018d7c str r6, [sp, 0x170] | *(arg_170h) = r6;
0x00018d7e movs r0, r0 |
0x00018d80 str r6, [sp, 0x1f0] | *(arg_190h) = r6;
0x00018d82 movs r0, r0 |
0x00018d84 ldr r0, [sp, 0x3b0] | r0 = *(arg_3b0h);
0x00018d86 movs r0, r0 |
0x00018d88 str r6, [sp, 0xd8] | var_d8h = r6;
0x00018d8a movs r0, r0 |
0x00018d8c str r6, [sp, 0x2e8] | *(arg_2e8h) = r6;
0x00018d8e 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/debugfs @ 0x19ab8 */
| #include <stdint.h>
|
; (fcn) fcn.00019ab8 () | void fcn_00019ab8 (int16_t arg2, int16_t arg3) {
| int32_t var_0h;
| int32_t var_0h_2;
| int32_t var_8h;
| int32_t var_8h_2;
| r1 = arg2;
| r2 = arg3;
0x00019ab8 invalid |
0x00019abc str r0, [r0, 0x38] | *((r0 + 0x38)) = r0;
0x00019abe sub sp, 0x10 |
0x00019ac0 mov r5, r1 | r5 = r1;
0x00019ac2 mov r4, r2 | r4 = r2;
0x00019ac4 adds r0, 0x10 | r0 += 0x10;
0x00019ac6 ldr r1, [r0, 0xc] | r1 = *((r0 + 0xc));
0x00019ac8 ldr r6, [pc, 0x60] |
0x00019aca strd r2, r3, [sp] | __asm ("strd r2, r3, [sp]");
0x00019ace lsls r2, r5, 0xa | r2 = r5 << 0xa;
0x00019ad0 movs r3, 0 | r3 = 0;
0x00019ad2 blx r1 | r0 = uint32_t (*r1)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00019ad4 cmp r0, 0 |
0x00019ad6 add r6, pc | r6 = 0x33606;
| if (r0 >= 0) {
0x00019ad8 blt 0x19af6 |
0x00019ada cmp.w r0, 0x400 |
| if (r0 == 0x400) {
0x00019ade bne 0x19ae4 |
0x00019ae0 add sp, 0x10 |
0x00019ae2 pop {r4, r5, r6, pc} |
| }
0x00019ae4 rsb.w r2, r0, 0x400 | r2 = 0x400 - r0;
0x00019ae8 movs r1, 0 | r1 = 0;
0x00019aea add r0, r4 | r0 += r4;
0x00019aec add sp, 0x10 |
0x00019aee pop.w {r4, r5, r6, lr} |
0x00019af2 b.w 0x543c | void (*0x543c)() ();
| }
0x00019af6 ldr r3, [pc, 0x38] | r3 = *(0x19b32);
0x00019af8 movs r4, 0x45 | r4 = 0x45;
0x00019afa ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00019afc ldr r6, [r3] | r6 = *(0x19b32);
0x00019afe blx 0x53f4 | r0 = sprintf_chk ()
0x00019b02 ldr r0, [r0] | r0 = *(r0);
0x00019b04 blx 0x52d4 | loc_imp_gmon_start_ ();
0x00019b08 ldr r1, [pc, 0x28] |
0x00019b0a mov r3, r0 | r3 = r0;
0x00019b0c strd r5, r3, [sp, 8] | __asm ("strd r5, r3, [var_8h]");
0x00019b10 mov r0, r6 | r0 = r6;
0x00019b12 ldr r3, [pc, 0x24] |
0x00019b14 ldr r2, [pc, 0x24] |
0x00019b16 add r1, pc | r1 = 0x3364e;
0x00019b18 strd r4, r1, [sp] | __asm ("strd r4, r1, [sp]");
0x00019b1c movs r1, 1 | r1 = 1;
0x00019b1e add r3, pc | r3 = 0x3365c;
0x00019b20 add r2, pc | r2 = 0x33660;
0x00019b22 blx 0x5538 | ext2fs_write_inode ();
0x00019b26 add sp, 0x10 |
0x00019b28 pop {r4, r5, r6, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/debugfs @ 0x19b40 */
| #include <stdint.h>
|
; (fcn) fcn.00019b40 () | void fcn_00019b40 (int16_t arg2, int16_t arg3) {
| int32_t var_0h;
| int32_t var_0h_2;
| int16_t var_8h;
| int16_t var_ch;
| r1 = arg2;
| r2 = arg3;
0x00019b40 invalid |
0x00019b44 str r0, [r0, 0x38] | *((r0 + 0x38)) = r0;
0x00019b46 sub sp, 0x10 |
0x00019b48 mov r4, r1 | r4 = r1;
0x00019b4a adds r0, 0x10 | r0 += 0x10;
0x00019b4c ldr r1, [r0, 0x10] | r1 = *((r0 + 0x10));
0x00019b4e ldr r5, [pc, 0x64] |
0x00019b50 strd r2, r3, [sp] | __asm ("strd r2, r3, [sp]");
0x00019b54 lsls r2, r4, 0xa | r2 = r4 << 0xa;
0x00019b56 movs r3, 0 | r3 = 0;
0x00019b58 blx r1 | r0 = uint32_t (*r1)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00019b5a cmp r0, 0 |
0x00019b5c add r5, pc | r5 = 0x33716;
| if (r0 < 0) {
0x00019b5e blt 0x19b70 | goto label_0;
| }
0x00019b60 cmp.w r0, 0x400 |
0x00019b64 ite ne |
| if (r0 == 0x400) {
0x00019b66 mvnne r0, 0x1b | r0 = ~0x1b;
| }
0x00019b6a movs r0, 0 | r0 = 0;
| while (r0 == 0x1c) {
0x00019b6c add sp, 0x10 |
0x00019b6e pop {r4, r5, r6, pc} |
| label_0:
0x00019b70 blx 0x53f4 | r0 = sprintf_chk ()
0x00019b74 ldr r0, [r0] | r0 = *(r0);
0x00019b76 cmp r0, 0x1c |
0x00019b78 it eq |
| if (r0 != 0x1c) {
0x00019b7a mvneq r0, 0x1b | r0 = ~0x1b;
| }
0x00019b7e beq 0x19b6c |
| }
0x00019b80 ldr r3, [pc, 0x34] | r3 = *(0x19bb8);
0x00019b82 ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x00019b84 movs r5, 0x52 | r5 = 0x52;
0x00019b86 ldr r6, [r3] | r6 = *(0x19bb8);
0x00019b88 blx 0x52d4 | loc_imp_gmon_start_ ();
0x00019b8a sub.w sb, r4, fp, lsl 16 | sb = r4 - (fp << 16);
0x00019b8e ldr r3, [pc, 0x30] |
0x00019b90 ldr r2, [pc, 0x30] |
0x00019b92 add r1, pc | r1 += pc;
0x00019b94 str r0, [sp, 0xc] | var_ch = r0;
0x00019b96 adds r1, 0xc | r1 += 0xc;
0x00019b98 mov r0, r6 | r0 = r6;
0x00019b9a strd r5, r1, [sp] | __asm ("strd r5, r1, [sp]");
0x00019b9e add r3, pc | r3 = 0x33764;
0x00019ba0 add r2, pc | r2 = 0x33768;
0x00019ba2 movs r1, 1 | r1 = 1;
0x00019ba4 str r4, [sp, 8] | var_8h = r4;
0x00019ba6 blx 0x5538 | ext2fs_write_inode ();
0x00019baa mvn r0, 0x1b | r0 = ~0x1b;
0x00019bae add sp, 0x10 |
0x00019bb0 pop {r4, r5, r6, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/debugfs @ 0x1a834 */
| #include <stdint.h>
|
; (fcn) fcn.0001a834 () | void fcn_0001a834 (int16_t arg_120h, int16_t arg_170h, int16_t arg_1f0h, int16_t arg_350h, int16_t arg1) {
| int16_t var_0h_3;
| int16_t var_4h_3;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_14h;
| r0 = arg1;
0x0001a834 qaddhs r4, r7, r1 | __asm ("qaddhs r4, r7, r1");
0x0001a838 ldr r3, [pc, 0x15c] |
0x0001a83a push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0001a83e mov r4, r0 | r4 = r0;
0x0001a840 add r2, pc | r2 += pc;
0x0001a842 ldr r6, [r0, 0xc] | r6 = *((r0 + 0xc));
0x0001a844 sub sp, 0x18 |
0x0001a846 ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x0001a848 ldr r7, [pc, 0x150] |
0x0001a84a ldr r0, [r6, 0x3c] | r0 = *((r6 + 0x3c));
0x0001a84c ldr r3, [r3] | r3 = *(0x1a998);
0x0001a84e str r3, [sp, 0x14] | var_14h = r3;
0x0001a850 mov.w r3, 0 | r3 = 0;
0x0001a854 add r7, pc | r7 = 0x351f4;
0x0001a856 blx 0x4d1c | r0 = calloc (r0, r1);
0x0001a85a cmp r0, 0 |
| if (r0 == 0) {
0x0001a85c beq 0x1a8e4 | goto label_2;
| }
0x0001a85e ldrd r3, r2, [r4, 0x48] | __asm ("ldrd r3, r2, [r4, 0x48]");
0x0001a862 mov r5, r0 | r5 = r0;
0x0001a864 orrs r3, r2 | r3 |= r2;
0x0001a866 beq 0x1a936 |
| while (r0 >= 0) {
| label_0:
0x0001a868 ldr r3, [r6, 0x40] | r3 = *((r6 + 0x40));
0x0001a86a mov r1, r4 | r1 = r4;
0x0001a86c mov r0, r5 | r0 = r5;
0x0001a86e ldr r3, [r3] | r3 = *(r3);
0x0001a870 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
0x0001a872 ldr r3, [r6, 0x3c] | r3 = *((r6 + 0x3c));
0x0001a874 add.w r0, r6, 0x10 | r0 = r6 + 0x10;
0x0001a878 strd r5, r3, [sp] | __asm ("strd r5, r3, [sp]");
0x0001a87c ldr r1, [r6, 0x20] | r1 = *((r6 + 0x20));
0x0001a87e ldrd r2, r3, [r4, 0x48] | __asm ("ldrd r2, r3, [r4, 0x48]");
0x0001a882 blx r1 | uint32_t (*r1)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x0001a884 ldr r3, [r6, 0x3c] | r3 = *((r6 + 0x3c));
0x0001a886 mov r6, r0 | r6 = r0;
0x0001a888 cmp r3, r0 |
| if (r3 != r0) {
0x0001a88a beq 0x1a8c4 |
0x0001a88c blx 0x53f4 | sprintf_chk ()
0x0001a890 cmp r6, 0 |
| if (r6 != 0) {
0x0001a892 bne 0x1a988 | goto label_3;
| }
0x0001a894 ldr r0, [r0] | r0 = *(r0);
| label_1:
0x0001a896 ldr r3, [pc, 0x108] | r3 = *(0x1a9a2);
0x0001a898 ldr r6, [r4, 4] | r6 = *((r4 + 4));
0x0001a89a ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x0001a89c ldr r4, [r3] | r4 = *(0x1a9a2);
0x0001a89e blx 0x52d4 | loc_imp_gmon_start_ ();
0x0001a8a2 ldr r2, [pc, 0x100] |
0x0001a8a4 movw r1, 0x15b | r1 = 0x15b;
0x0001a8a8 ldr r3, [pc, 0xfc] |
0x0001a8aa strd r6, r0, [sp, 8] | __asm ("strd r6, r0, [var_ch]");
0x0001a8ae mov r0, r4 | r0 = r4;
0x0001a8b0 add r2, pc | r2 = 0x3525a;
0x0001a8b2 adds r2, 0x8c | r2 += 0x8c;
0x0001a8b4 add r3, pc | r3 = 0x35260;
0x0001a8b6 strd r1, r2, [sp] | __asm ("strd r1, r2, [sp]");
0x0001a8ba movs r1, 1 | r1 = 1;
0x0001a8bc ldr r2, [pc, 0xec] |
0x0001a8be add r2, pc | r2 = 0x3526e;
0x0001a8c0 blx 0x5538 | ext2fs_write_inode ();
| }
0x0001a8c4 ldr r2, [pc, 0xe8] |
0x0001a8c6 ldr r3, [pc, 0xd0] | r3 = *(0x1a99a);
0x0001a8c8 add r2, pc | r2 = 0x3527c;
0x0001a8ca ldr r3, [r2, r3] | r3 = imp._ITM_deregisterTMCloneTable;
0x0001a8cc ldr r2, [r3] | r2 = imp._ITM_deregisterTMCloneTable;
0x0001a8ce ldr r3, [sp, 0x14] | r3 = var_14h;
0x0001a8d0 eors r2, r3 | r2 ^= r3;
0x0001a8d2 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0001a8d6 bne 0x1a990 | goto label_4;
| }
0x0001a8d8 mov r0, r5 | r0 = r5;
0x0001a8da add sp, 0x18 |
0x0001a8dc pop.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0001a8e0 b.w 0x4ec0 | void (*0x4ec0)() ();
| label_2:
0x0001a8e4 blx 0x53f4 | sprintf_chk ()
0x0001a8e8 ldr r3, [pc, 0xb4] | r3 = *(0x1a9a0);
0x0001a8ea movs r2, 0xc | r2 = 0xc;
0x0001a8ec str r2, [r0] | *(r0) = r2;
0x0001a8ee mov r0, r2 | r0 = r2;
0x0001a8f0 ldr r5, [r4, 4] | r5 = *((r4 + 4));
0x0001a8f2 movw r4, 0x149 | r4 = 0x149;
0x0001a8f6 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x0001a8f8 ldr r6, [r3] | r6 = *(0x1a9a0);
0x0001a8fa blx 0x52d4 | loc_imp_gmon_start_ ();
0x0001a8fe ldr r1, [pc, 0xb4] |
0x0001a900 ldr r3, [pc, 0xb4] |
0x0001a902 ldr r2, [pc, 0xb8] |
0x0001a904 add r1, pc | r1 = 0x352be;
0x0001a906 str r0, [sp, 0xc] | var_ch = r0;
0x0001a908 adds r1, 0x8c | r1 += 0x8c;
0x0001a90a add r3, pc | r3 = 0x352c6;
0x0001a90c add r2, pc | r2 = 0x352ce;
0x0001a90e strd r4, r1, [sp] | __asm ("strd r4, r1, [sp]");
0x0001a912 mov r0, r6 | r0 = r6;
0x0001a914 movs r1, 1 | r1 = 1;
0x0001a916 str r5, [sp, 8] | var_8h = r5;
0x0001a918 blx 0x5538 | ext2fs_write_inode ();
0x0001a91c ldr r2, [pc, 0xa0] |
0x0001a91e ldr r3, [pc, 0x78] | r3 = *(0x1a99a);
0x0001a920 add r2, pc | r2 = 0x352e4;
0x0001a922 ldr r3, [r2, r3] | r3 = imp._ITM_deregisterTMCloneTable;
0x0001a924 ldr r2, [r3] | r2 = imp._ITM_deregisterTMCloneTable;
0x0001a926 ldr r3, [sp, 0x14] | r3 = var_14h;
0x0001a928 eors r2, r3 | r2 ^= r3;
0x0001a92a mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0001a92e bne 0x1a990 | goto label_4;
| }
0x0001a930 add sp, 0x18 |
0x0001a932 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
0x0001a936 mov.w r8, 1 | r8 = 1;
0x0001a93a movs r3, 0 | r3 = 0;
0x0001a93c add r2, sp, 0x10 | r2 += var_10h;
0x0001a93e mov r1, r4 | r1 = r4;
0x0001a940 mov r0, r6 | r0 = r6;
0x0001a942 str.w r8, [sp, 0x10] | __asm ("str.w r8, [var_10h]");
0x0001a946 bl 0x1a188 | r0 = fcn_0001a188 (r0, r1, r2, r3, r4, r5, r6);
0x0001a94a cmp r0, 0 |
0x0001a94c bge 0x1a868 |
| }
0x0001a94e ldr r3, [pc, 0x50] | r3 = *(0x1a9a2);
0x0001a950 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x0001a952 ldr.w sb, [r3] | sb = *(0x1a9a2);
0x0001a956 blx 0x53f4 | r0 = sprintf_chk ()
0x0001a95a ldr r0, [r0] | r0 = *(r0);
0x0001a95c ldr.w sl, [r4, 4] | sl = *((r4 + 4));
0x0001a960 blx 0x52d4 | loc_imp_gmon_start_ ();
0x0001a964 ldr r3, [pc, 0x5c] |
0x0001a966 mov r1, r8 | r1 = r8;
0x0001a968 ldr r2, [pc, 0x5c] |
0x0001a96a strd sl, r0, [sp, 8] | __asm ("strd sl, r0, [var_ch]");
0x0001a96e mov r0, sb | r0 = sb;
0x0001a970 add r3, pc | r3 = 0x35338;
0x0001a972 adds r3, 0xa0 | r3 += 0xa0;
0x0001a974 add r2, pc | r2 = 0x35340;
0x0001a976 str r3, [sp, 4] | var_4h_3 = r3;
0x0001a978 mov.w r3, 0x136 | r3 = 0x136;
0x0001a97c str r3, [sp] | *(sp) = r3;
0x0001a97e ldr r3, [pc, 0x4c] |
0x0001a980 add r3, pc | r3 = 0x35352;
0x0001a982 blx 0x5538 | ext2fs_write_inode ();
0x0001a986 b 0x1a868 | goto label_0;
| label_3:
0x0001a988 movs r3, 0x1c | r3 = 0x1c;
0x0001a98a str r3, [r0] | *(r0) = r3;
0x0001a98c mov r0, r3 | r0 = r3;
0x0001a98e b 0x1a896 | goto label_1;
| label_4:
0x0001a990 blx 0x5008 | fcn_00005008 ();
0x0001a994 str r3, [sp, 0x170] | *(arg_170h) = r3;
0x0001a996 movs r1, r0 | r1 = r0;
0x0001a998 lsls r0, r2, 0x10 | r0 = r2 << 0x10;
0x0001a99a movs r0, r0 |
0x0001a99c str r3, [sp, 0x120] | *(arg_120h) = r3;
0x0001a99e movs r1, r0 | r1 = r0;
0x0001a9a0 lsls r0, r5, 0x10 | r0 = r5 << 0x10;
0x0001a9a2 movs r0, r0 |
0x0001a9a4 strh r4, [r3, 0x14] | *((r3 + 0x14)) = r4;
0x0001a9a6 movs r0, r0 |
0x0001a9a8 ldrb r4, [r1, 0x1e] | r4 = *((r1 + 0x1e));
0x0001a9aa movs r0, r0 |
0x0001a9ac strh r6, [r4, 0xe] | *((r4 + 0xe)) = r6;
0x0001a9ae movs r0, r0 |
0x0001a9b0 str r2, [sp, 0x350] | *(arg_350h) = r2;
0x0001a9b2 movs r1, r0 | r1 = r0;
0x0001a9b4 strh r0, [r1, 0x12] | *((r1 + 0x12)) = r0;
0x0001a9b6 movs r0, r0 |
0x0001a9b8 ldrb r6, [r6, 0x1c] | r6 = *((r6 + 0x1c));
0x0001a9ba movs r0, r0 |
0x0001a9bc strh r0, [r3, 0xc] | *((r3 + 0xc)) = r0;
0x0001a9be movs r0, r0 |
0x0001a9c0 str r2, [sp, 0x1f0] | *(arg_1f0h) = r2;
0x0001a9c2 movs r1, r0 | r1 = r0;
0x0001a9c4 strh r4, [r3, 0xe] | *((r3 + 0xe)) = r4;
0x0001a9c6 movs r0, r0 |
0x0001a9c8 strh r4, [r4, 0xa] | *((r4 + 0xa)) = r4;
0x0001a9ca movs r0, r0 |
0x0001a9cc ldrb r0, [r0, 0x1b] | r0 = *((r0 + 0x1b));
0x0001a9ce 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/debugfs @ 0x1a9d0 */
| #include <stdint.h>
|
; (fcn) fcn.0001a9d0 () | void fcn_0001a9d0 (int16_t arg_270h, int16_t arg_310h, int16_t arg1) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_0h_2;
| int16_t var_4h_2;
| int16_t var_8h_2;
| int16_t var_ch_2;
| r0 = arg1;
0x0001a9d0 blmi 0x4ad21c | __asm ("blmi aav.0x000191c4");
0x0001a9d4 push {r4, lr} |
0x0001a9d6 sub sp, 8 |
0x0001a9d8 add r2, pc | r2 += pc;
0x0001a9da movs r4, 1 | r4 = 1;
0x0001a9dc ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x0001a9de ldr r3, [r3] | r3 = *(r3);
0x0001a9e0 str r3, [sp, 4] | var_4h = r3;
0x0001a9e2 mov.w r3, 0 | r3 = 0;
0x0001a9e6 ldrd r3, r2, [r0, 0x48] | __asm ("ldrd r3, r2, [var_0hx48]");
0x0001a9ea str r4, [sp] | *(sp) = r4;
0x0001a9ec orrs r3, r2 | r3 |= r2;
| if (r3 != r2) {
0x0001a9ee beq 0x1a9fc |
0x0001a9f0 mov r1, r0 | r1 = r0;
0x0001a9f2 movs r3, 0 | r3 = 0;
0x0001a9f4 ldr r0, [r0, 0xc] | r0 = *(var_0hxc);
0x0001a9f6 mov r2, sp | r2 = sp;
0x0001a9f8 bl 0x1a518 | fcn_0001a518 (r0, r1, r2, r3, r4, r5);
| }
0x0001a9fc ldr r2, [pc, 0x20] |
0x0001a9fe ldr r3, [pc, 0x1c] | r3 = *(0x1aa1e);
0x0001aa00 add r2, pc | r2 = 0x35424;
0x0001aa02 ldr r3, [r2, r3] | r3 = imp._ITM_deregisterTMCloneTable;
0x0001aa04 ldr r2, [r3] | r2 = imp._ITM_deregisterTMCloneTable;
0x0001aa06 ldr r3, [sp, 4] | r3 = var_4h;
0x0001aa08 eors r2, r3 | r2 ^= r3;
0x0001aa0a mov.w r3, 0 | r3 = 0;
| if (r2 == r3) {
0x0001aa0e bne 0x1aa14 |
0x0001aa10 add sp, 8 |
0x0001aa12 pop {r4, pc} |
| }
0x0001aa14 blx 0x5008 | fcn_00005008 ();
0x0001aa18 str r1, [sp, 0x310] | *(arg_310h) = r1;
0x0001aa1a movs r1, r0 | r1 = r0;
0x0001aa1c lsls r0, r2, 0x10 | r0 = r2 << 0x10;
0x0001aa1e movs r0, r0 |
0x0001aa20 str r1, [sp, 0x270] | *(arg_270h) = r1;
0x0001aa22 movs r1, r0 | r1 = r0;
0x0001aa24 push.w {r4, r5, r6, r7, r8, lr} |
0x0001aa28 sub sp, 0x10 |
0x0001aa2a ldr r7, [pc, 0xcc] |
0x0001aa2c mov r5, r0 | r5 = r0;
0x0001aa2e mov r8, r1 | r8 = r1;
0x0001aa30 bl 0x19500 | fcn_00019500 ();
0x0001aa34 add r7, pc | r7 = 0x35532;
0x0001aa36 mov r4, r0 | r4 = r0;
0x0001aa38 cmp r0, 0 |
| if (r0 == 0) {
0x0001aa3a beq 0x1aad8 | goto label_0;
| }
0x0001aa3c ldr r0, [r5, 0x3c] | r0 = *((r5 + 0x3c));
0x0001aa3e blx 0x52bc | r0 = strerror (r0);
0x0001aa42 mov r6, r0 | r6 = r0;
0x0001aa44 cmp r0, 0 |
| if (r0 == 0) {
0x0001aa46 beq 0x1aae8 | goto label_1;
| }
0x0001aa48 movs r2, 0x40 | r2 = 0x40;
0x0001aa4a movs r1, 0 | r1 = 0;
0x0001aa4c add.w r0, r4, 0x10 | r0 = r4 + 0x10;
0x0001aa50 str.w r8, [r4, 4] | __asm ("str.w r8, [r4, 4]");
0x0001aa54 str r5, [r4, 0xc] | *((r4 + 0xc)) = r5;
0x0001aa56 blx 0x5440 | fcn_00005440 ();
0x0001aa5a movs r3, 0 | r3 = 0;
0x0001aa5c movs r2, 1 | r2 = 1;
0x0001aa5e mov r1, r4 | r1 = r4;
0x0001aa60 mov r0, r5 | r0 = r5;
0x0001aa62 bl 0x19ffc | fcn_00019ffc (r0, r1, r2, r3, r4);
0x0001aa66 mov r3, r1 | r3 = r1;
0x0001aa68 cmp r0, 1 |
0x0001aa6a sbcs r1, r3, 0 | __asm ("sbcs r1, r3, 0");
| if (r0 < 1) {
0x0001aa6e blt 0x1aad2 | goto label_2;
| }
0x0001aa70 strd r0, r3, [r4, 0x48] | __asm ("strd r0, r3, [r4, 0x48]");
0x0001aa74 mov r2, r0 | r2 = r0;
0x0001aa76 str r6, [sp] | *(sp) = r6;
0x0001aa78 add.w r0, r5, 0x10 | r0 = r5 + 0x10;
0x0001aa7c ldr r1, [r5, 0x3c] | r1 = *((r5 + 0x3c));
0x0001aa7e str r1, [sp, 4] | var_4h_2 = r1;
0x0001aa80 ldr r1, [r5, 0x1c] | r1 = *((r5 + 0x1c));
0x0001aa82 blx r1 | uint32_t (*r1)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x0001aa84 ldr r3, [r5, 0x3c] | r3 = *((r5 + 0x3c));
0x0001aa86 mov r8, r0 | r8 = r0;
0x0001aa88 cmp r3, r0 |
| if (r3 == r0) {
0x0001aa8a beq 0x1aac8 | goto label_3;
| }
0x0001aa8c blx 0x53f4 | sprintf_chk ()
0x0001aa90 cmp.w r8, 0 |
| if (r8 != 0) {
0x0001aa94 bne 0x1aae0 | goto label_4;
| }
0x0001aa96 ldr r0, [r0] | r0 = *(r0);
| do {
0x0001aa98 ldr r3, [pc, 0x60] | r3 = *(0x1aafc);
0x0001aa9a ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x0001aa9c ldr r7, [r4, 4] | r7 = *((r4 + 4));
0x0001aa9e ldr.w r8, [r3] | r8 = *(0x1aafc);
0x0001aaa2 blx 0x52d4 | loc_imp_gmon_start_ ();
0x0001aaa6 ldr r3, [pc, 0x58] |
0x0001aaa8 movs r1, 1 | r1 = 1;
0x0001aaaa ldr r2, [pc, 0x58] |
0x0001aaac str r0, [sp, 0xc] | var_ch_2 = r0;
0x0001aaae mov r0, r8 | r0 = r8;
0x0001aab0 add r3, pc | r3 = 0x355b6;
0x0001aab2 str r7, [sp, 8] | var_8h_2 = r7;
0x0001aab4 adds r3, 0xb0 | r3 += 0xb0;
0x0001aab6 add r2, pc | r2 = 0x355c0;
0x0001aab8 str r3, [sp, 4] | var_4h_2 = r3;
0x0001aaba movw r3, 0x216 | r3 = 0x216;
0x0001aabe str r3, [sp] | *(sp) = r3;
0x0001aac0 ldr r3, [pc, 0x44] |
0x0001aac2 add r3, pc | r3 = 0x355ce;
0x0001aac4 blx 0x5538 | ext2fs_write_inode ();
| label_3:
0x0001aac8 ldr r3, [r5, 0x40] | r3 = *((r5 + 0x40));
0x0001aaca mov r1, r6 | r1 = r6;
0x0001aacc mov r0, r4 | r0 = r4;
0x0001aace ldr r3, [r3, 4] | r3 = *((r3 + 4));
0x0001aad0 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
| label_2:
0x0001aad2 mov r0, r6 | r0 = r6;
0x0001aad4 blx 0x4ec4 | fcn_00004ec4 ();
| label_0:
0x0001aad8 mov r0, r4 | r0 = r4;
0x0001aada add sp, 0x10 |
0x0001aadc pop.w {r4, r5, r6, r7, r8, pc} |
| label_4:
0x0001aae0 movs r3, 5 | r3 = 5;
0x0001aae2 str r3, [r0] | *(r0) = r3;
0x0001aae4 mov r0, r3 | r0 = r3;
0x0001aae6 b 0x1aa98 |
| } while (1);
| label_1:
0x0001aae8 mov r0, r4 | r0 = r4;
0x0001aaea mov r4, r6 | r4 = r6;
0x0001aaec blx 0x4ec4 | fcn_00004ec4 ();
0x0001aaf0 mov r0, r4 | r0 = r4;
0x0001aaf2 add sp, 0x10 |
0x0001aaf4 pop.w {r4, r5, r6, r7, r8, pc} |
| }
[*] Function sprintf used 41 times debugfs