[*] Binary protection state of debugfs
Full RELRO Canary found NX enabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function strcpy 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 @ 0x12a64 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.00012a64 () | void fcn_00012a64 (int16_t arg_b0h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_14h;
| int32_t var_18h;
| int32_t var_18h_2;
| int16_t var_26h;
| int32_t var_34h;
| int32_t var_34h_2;
| int16_t var_8ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00012a64 push.w {r4, r5, r6, r7, r8, sb, lr} |
0x00012a68 and r7, r3, 0xf000 | r7 = r3 & 0xf000;
0x00012a6c ldr r4, [pc, 0x1e4] |
0x00012a6e cmp.w r7, 0x6000 |
0x00012a72 sub sp, 0x94 |
0x00012a74 mov r5, r0 | r5 = r0;
0x00012a76 ldr r3, [pc, 0x1e0] | r3 = *(0x12c5a);
0x00012a78 mov r6, r1 | r6 = r1;
0x00012a7a add r4, pc | r4 = 0x256d2;
0x00012a7c mov r8, r2 | r8 = r2;
0x00012a7e ldr r3, [r4, r3] |
0x00012a80 ldr r3, [r3] | r3 = *(0x256d2);
0x00012a82 str r3, [sp, 0x8c] | var_8ch = r3;
0x00012a84 mov.w r3, 0 | r3 = 0;
| if (r7 == 0x6000) {
0x00012a88 beq.w 0x12bd6 | goto label_5;
| }
| if (r7 > 0x6000) {
0x00012a8c bhi.w 0x12ba4 | goto label_6;
| }
0x00012a90 cmp.w r7, 0x1000 |
| if (r7 == 0x1000) {
0x00012a94 beq.w 0x12bbc | goto label_7;
| }
0x00012a98 cmp.w r7, 0x2000 |
0x00012a9c it eq |
| if (r7 != 0x2000) {
0x00012a9e moveq sb, 3 | sb = 3;
| }
| if (r7 != 0x2000) {
0x00012aa2 bne.w 0x12bb2 | goto label_8;
| }
| do {
| label_1:
0x00012aa6 add r3, sp, 8 | r3 += var_8h;
0x00012aa8 movw r2, 0x11ed | r2 = 0x11ed;
0x00012aaa asrs r5, r5, 0xb | r5 >>= 0xb;
0x00012aac str r3, [sp] | *(sp) = r3;
0x00012aae mov r1, r6 | r1 = r6;
0x00012ab0 movs r3, 0 | r3 = 0;
0x00012ab2 mov r0, r5 | r0 = r5;
0x00012ab4 blx 0x51a8 | r0 = strcpy (r0, r1)
0x00012ab8 mov r4, r0 | r4 = r0;
0x00012aba cmp r0, 0 |
| if (r0 != 0) {
0x00012abc bne.w 0x12bc2 | goto label_9;
| }
0x00012ac0 ldr r1, [pc, 0x198] |
0x00012ac2 movs r0, 1 | r0 = 1;
0x00012ac4 ldr r2, [sp, 8] | r2 = var_8h;
0x00012ac6 add r1, pc | r1 = 0x25726;
0x00012ac8 blx 0x54bc | fcn_000054bc ();
0x00012acc ldr r3, [sp, 8] | r3 = var_8h;
0x00012ace mov r2, r8 | r2 = r8;
0x00012ad0 mov r1, r6 | r1 = r6;
0x00012ad2 mov r0, r5 | r0 = r5;
0x00012ad4 str.w sb, [sp] | __asm ("str.w sb, [sp]");
0x00012ad8 blx 0x577c | fcn_0000577c ();
0x00012adc movw r3, 0xb726 |
0x00012ae0 mov r4, r0 | r4 = r0;
0x00012ae2 movt r3, 0x7f2b | r3 = 0x7f2bb726;
0x00012ae6 cmp r0, r3 |
| if (r0 == r3) {
0x00012ae8 beq 0x12bdc | goto label_10;
| }
0x00012aea cmp r4, 0 |
| if (r4 != 0) {
0x00012aec bne.w 0x12c00 | goto label_11;
| }
| label_2:
0x00012af0 ldr r2, [sp, 8] | r2 = var_8h;
0x00012af2 mov r3, r4 | r3 = r4;
0x00012af4 ldr r0, [r5, 0x2c] | r0 = *((r5 + 0x2c));
0x00012af6 blx 0x55ec | r0 = list_super2 ();
0x00012afa cmp r0, 0 |
| if (r0 != 0) {
0x00012afc bne.w 0x12c10 | goto label_12;
| }
| label_3:
0x00012b00 ldr r1, [sp, 8] | r1 = var_8h;
0x00012b02 movs r3, 0 | r3 = 0;
0x00012b04 movs r2, 1 | r2 = 1;
0x00012b06 mov r0, r5 | r0 = r5;
0x00012b08 add r6, sp, 0xc | r6 += var_ch;
0x00012b0a blx 0x564c | ext2fs_xattr_remove ();
0x00012b0e movs r2, 0x80 | r2 = 0x80;
0x00012b10 movs r1, 0 | r1 = 0;
0x00012b12 mov r0, r6 | r0 = r6;
0x00012b14 blx 0x5440 | fcn_00005440 ();
0x00012b18 ldr r0, [r5, 0x60] | r0 = *((r5 + 0x60));
0x00012b1a strh.w r7, [sp, 0xc] | var_ch = r7;
0x00012b1e cmp r0, 0 |
| if (r0 == 0) {
0x00012b20 beq.w 0x12c36 | goto label_13;
| }
| label_4:
0x00012b24 ldr r3, [sp, 0xb0] | r3 = *(arg_b0h);
0x00012b26 mov r7, r0 | r7 = r0;
0x00012b28 ldr r2, [sp, 0xb0] | r2 = *(arg_b0h);
0x00012b2a strd r7, r7, [sp, 0x18] | __asm ("strd r7, r7, [var_18h]");
0x00012b2e str r7, [sp, 0x14] | var_14h = r7;
0x00012b30 lsrs r1, r3, 8 | r1 = r3 >> 8;
0x00012b32 lsrs r3, r3, 0xc | r3 >>= 0xc;
0x00012b34 uxtb r2, r2 | r2 = (int8_t) r2;
0x00012b36 bic r3, r3, 0xff | r3 = BIT_MASK (r3, 0xff);
0x00012b3a orrs r3, r2 | r3 |= r2;
0x00012b3c ubfx r0, r1, 0, 0xc | r0 = (r1 >> 0) & ((1 << 0xc) - 1);
0x00012b40 and r1, r1, 0xf00 | r1 &= 0xf00;
0x00012b44 cmp r3, 0xff |
0x00012b46 it ls |
| if (r3 <= 0xff) {
0x00012b48 cmpls r1, 0 | __asm ("cmpls r1, 0");
| }
0x00012b4a itttt ne |
| if (r3 == 0xff) {
0x00012b4c movne r1, 0 | r1 = 0;
| }
| if (r3 != 0xff) {
0x00012b4e uxtbne r2, r3 | __asm ("uxtbne r2, r3");
| }
| if (r3 != 0xff) {
0x00012b50 movtne r1, 0xfff0 | __asm ("movtne r1, 0xfff0");
| }
| if (r3 != 0xff) {
0x00012b54 orr.w r2, r2, r0, lsl 8 | r2 |= (r0 << 8);
| }
0x00012b58 iteet ne |
| if (r3 == 0xff) {
0x00012b5a andne r1, r1, r3, lsl 12 | r1 &= (r3 << 12);
| }
| if (r3 != 0xff) {
0x00012b5e moveq r4, 1 | r4 = 1;
| }
| if (r3 == 0xff) {
0x00012b60 addne r4, r3, r0, lsl 8 | r4 = r3 + (r0 << 8);
| }
| if (r3 != 0xff) {
0x00012b64 orr.w r3, r2, r1 | r3 = r2 | r1;
| }
0x00012b68 ldr r1, [sp, 8] | r1 = var_8h;
0x00012b6a ite ne |
| if (r3 == 0xff) {
0x00012b6c movne r4, 0 | r4 = 0;
| }
| if (r3 != 0xff) {
0x00012b6e moveq r3, 0 | r3 = 0;
| }
0x00012b70 mov r0, r5 | r0 = r5;
0x00012b72 mov r2, r6 | r2 = r6;
0x00012b74 movs r5, 1 | r5 = 1;
0x00012b76 strd r4, r3, [sp, 0x34] | __asm ("strd r4, r3, [var_34h]");
0x00012b7a strh.w r5, [sp, 0x26] | var_26h = r5;
0x00012b7e blx 0x5260 | r0 = fcn_00005260 ();
0x00012b82 mov r4, r0 | r4 = r0;
0x00012b84 cmp r0, 0 |
| if (r0 != 0) {
0x00012b86 bne 0x12c22 | goto label_14;
| }
| label_0:
0x00012b88 ldr r2, [pc, 0xd4] |
0x00012b8a ldr r3, [pc, 0xcc] | r3 = *(0x12c5a);
0x00012b8c add r2, pc | r2 = 0x257f0;
0x00012b8e ldr r3, [r2, r3] | r3 = *(0x257f0);
0x00012b90 ldr r2, [r3] | r2 = *(0x257f0);
0x00012b92 ldr r3, [sp, 0x8c] | r3 = var_8ch;
0x00012b94 eors r2, r3 | r2 ^= r3;
0x00012b96 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00012b9a bne 0x12c4e | goto label_15;
| }
0x00012b9c mov r0, r4 | r0 = r4;
0x00012b9e add sp, 0x94 |
0x00012ba0 pop.w {r4, r5, r6, r7, r8, sb, pc} |
| label_6:
0x00012ba4 cmp.w r7, 0xc000 |
0x00012ba8 it eq |
| if (r7 != 0xc000) {
0x00012baa moveq sb, 6 | sb = 6;
| }
0x00012bae beq.w 0x12aa6 |
| } while (r7 == 0xc000);
| label_8:
0x00012bb2 movw r4, 0xb747 |
0x00012bb6 movt r4, 0x7f2b | r4 = 0x7f2bb747;
0x00012bba b 0x12b88 | goto label_0;
| label_7:
0x00012bbc mov.w sb, 5 | sb = 5;
0x00012bc0 b 0x12aa6 | goto label_1;
| label_9:
0x00012bc2 ldr r0, [pc, 0xa0] |
0x00012bc4 mov r3, r8 | r3 = r8;
0x00012bc6 ldr r2, [pc, 0xa0] |
0x00012bc8 mov r1, r4 | r1 = r4;
0x00012bca add r0, pc | r0 = 0x25834;
0x00012bcc add r2, pc | r2 = 0x2583a;
0x00012bce adds r0, 0x10 | r0 += 0x10;
0x00012bd0 blx 0x50d8 | fcn_000050d8 ();
0x00012bd4 b 0x12b88 | goto label_0;
| label_5:
0x00012bd6 mov.w sb, 4 | sb = 4;
0x00012bda b 0x12aa6 | goto label_1;
| label_10:
0x00012bdc mov r1, r6 | r1 = r6;
0x00012bde mov r0, r5 | r0 = r5;
0x00012be0 blx 0x53e8 | r0 = strcat_chk ();
0x00012be4 mov r4, r0 | r4 = r0;
| if (r0 != 0) {
0x00012be6 cbnz r0, 0x12c3c | goto label_16;
| }
0x00012be8 ldr r3, [sp, 8] | r3 = var_8h;
0x00012bea mov r1, r6 | r1 = r6;
0x00012bec mov r2, r8 | r2 = r8;
0x00012bee mov r0, r5 | r0 = r5;
0x00012bf0 str.w sb, [sp] | __asm ("str.w sb, [sp]");
0x00012bf4 blx 0x577c | r0 = fcn_0000577c ();
0x00012bf8 mov r4, r0 | r4 = r0;
0x00012bfa cmp r4, 0 |
| if (r4 == 0) {
0x00012bfc beq.w 0x12af0 | goto label_2;
| }
| label_11:
0x00012c00 ldr r2, [pc, 0x68] |
0x00012c02 mov r3, r8 | r3 = r8;
0x00012c04 mov r1, r4 | r1 = r4;
0x00012c06 mov r0, r8 | r0 = r8;
0x00012c08 add r2, pc | r2 = 0x25878;
0x00012c0a blx 0x50d8 | fcn_000050d8 ();
0x00012c0e b 0x12b88 | goto label_0;
| label_12:
0x00012c10 ldr r0, [pc, 0x5c] |
0x00012c12 mov r1, r4 | r1 = r4;
0x00012c14 ldr r2, [pc, 0x5c] |
0x00012c16 add r0, pc | r0 = 0x2588a;
0x00012c18 add r2, pc | r2 = 0x25890;
0x00012c1a adds r0, 0x10 | r0 += 0x10;
0x00012c1c blx 0x50d8 | fcn_000050d8 ();
0x00012c20 b 0x12b00 | goto label_3;
| label_14:
0x00012c22 ldr r0, [pc, 0x54] |
0x00012c24 mov r1, r4 | r1 = r4;
0x00012c26 ldr r2, [pc, 0x54] |
0x00012c28 ldr r3, [sp, 8] | r3 = var_8h;
0x00012c2a add r0, pc | r0 = 0x258a8;
0x00012c2c add r2, pc | r2 = 0x258ae;
0x00012c2e adds r0, 0x10 | r0 += 0x10;
0x00012c30 blx 0x50d8 | fcn_000050d8 ();
0x00012c32 orrs.w r7, r2, r8, asr 26 | r7 = r2 | (r8 >> 26);
| label_13:
0x00012c36 blx 0x4f60 | fcn_00004f60 ();
0x00012c3a b 0x12b24 | goto label_4;
| label_16:
0x00012c3c ldr r0, [pc, 0x40] |
0x00012c3e mov r1, r4 | r1 = r4;
0x00012c40 ldr r2, [pc, 0x40] |
0x00012c42 add r0, pc | r0 = 0x258c6;
0x00012c44 add r2, pc | r2 = 0x258cc;
0x00012c46 adds r0, 0x10 | r0 += 0x10;
0x00012c48 blx 0x50d8 | fcn_000050d8 ();
0x00012c4c b 0x12b88 | goto label_0;
| label_15:
0x00012c4e blx 0x5008 | fcn_00005008 ();
0x00012c52 nop |
0x00012c54 asrs r2, r4, 4 | r2 = r4 >> 4;
0x00012c56 movs r2, r0 | r2 = r0;
0x00012c58 lsls r0, r2, 0x10 | r0 = r2 << 0x10;
0x00012c5a movs r0, r0 |
0x00012c5c b 0x1282c | return void (*0x1282c)() ();
| }
; 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 @ 0x18f70 */
| #include <stdint.h>
|
; (fcn) fcn.00018f70 () | void fcn_00018f70 (int16_t arg_388h, 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_2;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_20h;
| int16_t var_24h;
| int16_t var_28h;
| int16_t var_36h;
| int16_t var_3ch;
| int16_t var_58h;
| int16_t var_88h;
| int16_t var_9ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00018f70 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00018f74 mov r6, r2 | r6 = r2;
0x00018f76 ldr r2, [pc, 0x284] |
0x00018f78 mov r8, r3 | r8 = r3;
0x00018f7a adds r3, 1 | r3++;
0x00018f7c sub sp, 0xa4 |
0x00018f7e ldr r3, [pc, 0x280] | r3 = *(0x19202);
0x00018f80 it eq |
| if (r3 != 1) {
0x00018f82 moveq r8, 4 | r8 = 4;
| }
0x00018f86 add r2, pc | r2 = 0x32188;
0x00018f88 ldr r7, [pc, 0x278] |
0x00018f8a cmp r6, 1 |
0x00018f8c mov r5, r1 | r5 = r1;
0x00018f8e ldr r3, [r2, r3] |
0x00018f90 mov sb, r0 | sb = r0;
0x00018f92 add r7, pc | r7 = 0x3219a;
0x00018f94 ldr r3, [r3] | r3 = *(0x32188);
0x00018f96 str r3, [sp, 0x9c] | var_9ch = r3;
0x00018f98 mov.w r3, 0 | r3 = 0;
0x00018f9c ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x00018f9e str r1, [r0, 0x10] | *((r0 + 0x10)) = r1;
| if (r6 == 1) {
0x00018fa0 beq 0x18fd4 | goto label_6;
| }
0x00018fa2 cmp r6, 2 |
| if (r6 == 2) {
0x00018fa4 beq.w 0x1911c | goto label_7;
| }
0x00018fa8 movw r4, 0xb729 |
0x00018fac movt r4, 0x7f2b | r4 = 0x7f2bb729;
0x00018fb0 cmp r6, 0 |
| if (r6 == 0) {
0x00018fb2 beq.w 0x19116 | goto label_8;
| }
| do {
| label_0:
0x00018fb6 ldr r2, [pc, 0x250] |
0x00018fb8 ldr r3, [pc, 0x244] | r3 = *(0x19200);
0x00018fba add r2, pc | r2 = 0x321c8;
0x00018fbc ldr r3, [r2, r3] | r3 = *(0x321c8);
0x00018fbe ldr r2, [r3] | r2 = *(0x321c8);
0x00018fc0 ldr r3, [sp, 0x9c] | r3 = var_9ch;
0x00018fc2 eors r2, r3 | r2 ^= r3;
0x00018fc4 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00018fc8 bne.w 0x191f8 | goto label_9;
| }
0x00018fcc mov r0, r4 | r0 = r4;
0x00018fce add sp, 0xa4 |
0x00018fd0 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_6:
0x00018fd4 movs r3, 4 | r3 = 4;
0x00018fd6 str r3, [sp, 0x18] | var_18h = r3;
| label_1:
0x00018fd8 mov r0, r5 | r0 = r5;
0x00018fda blx 0x4e48 | r0 = ext2fs_read_bitmaps ();
0x00018fde mov r4, r0 | r4 = r0;
0x00018fe0 cmp r0, 0 |
| if (r0 != 0) {
0x00018fe2 bne.w 0x19106 | goto label_2;
| }
0x00018fe6 ldr.w fp, [sp, 0x18] | fp = var_18h;
0x00018fea add.w sl, sp, 0x1c | sl += var_1ch;
0x00018fee mov r2, sl | r2 = sl;
0x00018ff0 mov r0, r5 | r0 = r5;
0x00018ff2 mov r1, fp | r1 = fp;
0x00018ff4 blx 0x4d58 | r0 = ext2fs_read_inode ();
0x00018ff8 mov r4, r0 | r4 = r0;
0x00018ffa cmp r0, 0 |
| if (r0 != 0) {
0x00018ffc bne.w 0x19182 | goto label_10;
| }
0x00019000 ldr r2, [sp, 0x88] | r2 = var_88h;
0x00019002 ldr r3, [sp, 0x20] | r3 = var_20h;
0x00019004 orrs r3, r2 | r3 |= r2;
| if (r3 != r2) {
0x00019006 beq 0x19018 |
0x00019008 mov r1, fp | r1 = fp;
0x0001900a mov r0, r5 | r0 = r5;
0x0001900c bl 0x18eb4 | r0 = fcn_00018eb4 (r0, r1, r2, r3);
0x00019010 mov r4, r0 | r4 = r0;
0x00019012 cmp r0, 0 |
| if (r0 != 0) {
0x00019014 bne.w 0x191cc | goto label_11;
| }
| }
0x00019018 movs r2, 0x80 | r2 = 0x80;
0x0001901a movs r1, 0 | r1 = 0;
0x0001901c mov r0, sl | r0 = sl;
0x0001901e blx 0x5440 | fcn_00005440 ();
0x00019022 mov r1, sl | r1 = sl;
0x00019024 mov r0, r5 | r0 = r5;
0x00019026 movs r2, 0 | r2 = 0;
0x00019028 movs r3, 0 | r3 = 0;
0x0001902a blx 0x4eb4 | ext2fs_iblk_set ();
0x0001902e ldr r0, [r5, 0x60] | r0 = *((r5 + 0x60));
0x00019030 cmp r0, 0 |
| if (r0 == 0) {
0x00019032 beq.w 0x1917c | goto label_12;
| }
| label_3:
0x00019036 ldr r3, [r5, 0x10] | r3 = *((r5 + 0x10));
0x00019038 movs r1, 1 | r1 = 1;
0x0001903a strh.w r1, [sp, 0x36] | var_36h = r1;
0x0001903e movw r1, 0x8180 | r1 = 0x8180;
0x00019042 strh.w r1, [sp, 0x1c] | var_1ch = r1;
0x00019046 ldr r2, [r3, 0x60] | r2 = *((r3 + 0x60));
0x00019048 ldr r3, [sp, 0x3c] | r3 = var_3ch;
0x0001904a strd r0, r0, [sp, 0x28] | __asm ("strd r0, r0, [sp, 0x28]");
0x0001904e lsls r2, r2, 0x19 | r2 <<= 0x19;
0x00019050 str r0, [sp, 0x24] | var_24h = r0;
0x00019052 orr r1, r3, 0x10 | r1 = r3 | 0x10;
0x00019056 it mi |
| if (r2 >= r2) {
0x00019058 orrmi r3, r3, 0x80000 | r3 |= 0x80000;
| }
0x0001905c str r1, [sp, 0x3c] | var_3ch = r1;
0x0001905e it mi |
| if (r2 >= r2) {
0x00019060 orrmi r3, r3, 0x10 | r3 |= 0x10;
| }
0x00019064 mov r2, sl | r2 = sl;
0x00019066 mov r1, fp | r1 = fp;
0x00019068 mov r0, r5 | r0 = r5;
0x0001906a it mi |
| if (r2 >= r2) {
0x0001906c strmi r3, [sp, 0x3c] | var_3ch = r3;
| }
0x0001906e blx 0x5260 | r0 = fcn_00005260 ();
0x00019072 mov r4, r0 | r4 = r0;
0x00019074 cmp r0, 0 |
| if (r0 != 0) {
0x00019076 bne.w 0x191d2 | goto label_13;
| }
0x0001907a ldr r3, [pc, 0x190] |
0x0001907c movs r2, 3 | r2 = 3;
0x0001907e ldr r1, [sp, 0x18] | r1 = var_18h;
0x00019080 mov r0, r5 | r0 = r5;
0x00019082 str.w r2, [sb, 8] | __asm ("str.w r2, [sb, 8]");
0x00019086 add r3, pc | r3 = 0x32298;
0x00019088 str.w r3, [sb, 0x20] | __asm ("str.w r3, [sb, 0x20]");
0x0001908c ldr r3, [pc, 0x180] |
0x0001908e str.w r1, [sb, 0x14] | __asm ("str.w r1, [sb, 0x14]");
0x00019092 add r3, pc | r3 = 0x322a6;
0x00019094 str.w r3, [sb, 0x1c] | __asm ("str.w r3, [sb, 0x1c]");
0x00019098 add r3, sp, 0x14 | r3 += var_14h_2;
0x0001909a blx 0x4f30 | r0 = fcn_00004f30 ();
0x0001909e mov r4, r0 | r4 = r0;
0x000190a0 cmp r0, 0 |
| if (r0 != 0) {
0x000190a2 bne 0x19156 | goto label_14;
| }
0x000190a4 ldr r3, [sp, 0x14] | r3 = var_14h_2;
0x000190a6 movs r2, 0x28 | r2 = 0x28;
0x000190a8 mov r1, r0 | r1 = r0;
0x000190aa str.w r0, [sb, 0xc] | __asm ("str.w r0, [sb, 0xc]");
0x000190ae str.w r6, [sb] | __asm ("str.w r6, [sb]");
0x000190b2 add.w r0, sb, r2 | r0 = sb + r2;
0x000190b6 str.w r3, [sb, 0x18] | __asm ("str.w r3, [sb, 0x18]");
0x000190ba str.w r8, [sb, 4] | __asm ("str.w r8, [sb, 4]");
0x000190be blx 0x5440 | fcn_00005440 ();
0x000190c2 ldr r3, [pc, 0x150] |
0x000190c4 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x000190c6 str.w r3, [sb, 0x24] | __asm ("str.w r3, [sb, 0x24]");
0x000190ca ldr r3, [r3, 8] | r3 = *(0x1921e);
0x000190cc cmp r3, 0 |
0x000190ce beq.w 0x18fb6 |
| } while (r3 == 0);
0x000190d2 mov r0, sb | r0 = sb;
0x000190d4 blx r3 | r0 = uint32_t (*r3)(uint32_t) (r0);
0x000190d6 cmp r0, 0 |
| if (r0 >= 0) {
0x000190d8 bge.w 0x18fb6 | goto label_0;
| }
0x000190dc ldr r3, [pc, 0x138] |
0x000190de movw r0, 0x169 | r0 = 0x169;
0x000190e2 ldr r2, [pc, 0x138] | r2 = *(0x1921e);
0x000190e4 movs r4, 5 | r4 = 5;
0x000190e6 add r3, pc | r3 = 0x32302;
0x000190e8 adds r3, 0x40 | r3 += 0x40;
0x000190ea ldr r1, [r7, r2] | r1 = *((r7 + r2));
0x000190ec str r3, [sp, 4] | var_4h = r3;
0x000190ee ldr r2, [pc, 0x130] |
0x000190f0 ldr r3, [pc, 0x130] |
0x000190f2 str r0, [sp] | *(sp) = r0;
0x000190f4 add r2, pc | r2 = 0x3231a;
0x000190f6 ldr r0, [r1] | r0 = *(r1);
0x000190f8 add r3, pc | r3 = 0x32320;
0x000190fa movs r1, 1 | r1 = 1;
0x000190fc blx 0x5538 | ext2fs_write_inode ();
0x00019100 ldr r0, [sp, 0x14] | r0 = var_14h_2;
0x00019102 blx 0x4e9c | ext2fs_file_close ();
| label_2:
0x00019106 ldr r1, [sp, 0x18] | r1 = var_18h;
0x00019108 cmp r1, 0 |
| if (r1 == 0) {
0x0001910a beq.w 0x18fb6 | goto label_0;
| }
| label_4:
0x0001910e mov r0, r5 | r0 = r5;
0x00019110 bl 0x18eb4 | fcn_00018eb4 (r0, r1, r2, r3);
0x00019114 b 0x18fb6 | goto label_0;
| label_8:
0x00019116 movs r3, 3 | r3 = 3;
0x00019118 str r3, [sp, 0x18] | var_18h = r3;
0x0001911a b 0x18fd8 | goto label_1;
| label_7:
0x0001911c ldr.w r3, [r3, 0x26c] | r3 = *((r3 + 0x26c));
0x00019120 str r3, [sp, 0x18] | var_18h = r3;
0x00019122 cmp r3, 0 |
| if (r3 != 0) {
0x00019124 bne.w 0x18fd8 | goto label_1;
| }
0x00019128 add r2, sp, 0x18 | r2 += var_18h;
0x0001912a mov r1, r6 | r1 = r6;
0x0001912c str r2, [sp] | *(sp) = r2;
0x0001912e mov r0, r5 | r0 = r5;
0x00019130 movw r2, 0x8180 | r2 = 0x8180;
0x00019134 blx 0x51a8 | r0 = strcpy (r0, r1)
0x00019138 mov r4, r0 | r4 = r0;
0x0001913a cmp r0, 0 |
| if (r0 != 0) {
0x0001913c bne.w 0x18fb6 | goto label_0;
| }
0x00019140 mov r3, r0 | r3 = r0;
0x00019142 ldr r1, [sp, 0x18] | r1 = var_18h;
0x00019144 movs r2, 1 | r2 = 1;
0x00019146 mov r0, r5 | r0 = r5;
0x00019148 blx 0x564c | ext2fs_xattr_remove ();
0x0001914c ldr r3, [r5, 8] | r3 = *((r5 + 8));
0x0001914e orr r3, r3, 0x12 | r3 |= 0x12;
0x00019152 str r3, [r5, 8] | *((r5 + 8)) = r3;
0x00019154 b 0x18fd8 | goto label_1;
| label_14:
0x00019156 ldr r2, [pc, 0xc4] | r2 = *(0x1921e);
0x00019158 ldr r3, [pc, 0xcc] |
0x0001915a ldr r1, [r7, r2] | r1 = *((r7 + r2));
0x0001915c movw r2, 0x15d | r2 = 0x15d;
0x00019160 add r3, pc | r3 = 0x3238c;
0x00019162 adds r3, 0x40 | r3 += 0x40;
0x00019164 strd r3, r0, [sp, 4] | __asm ("strd r3, r0, [sp, 4]");
0x00019168 ldr r3, [pc, 0xc0] |
0x0001916a ldr r0, [r1] | r0 = *(r1);
0x0001916c movs r1, 1 | r1 = 1;
0x0001916e str r2, [sp] | *(sp) = r2;
0x00019170 ldr r2, [pc, 0xbc] |
0x00019172 add r3, pc | r3 = 0x323a2;
0x00019174 add r2, pc | r2 = 0x323a8;
0x00019176 blx 0x5538 | ext2fs_write_inode ();
0x0001917a b 0x19106 | goto label_2;
| label_12:
0x0001917c blx 0x4f60 | fcn_00004f60 ();
0x00019180 b 0x19036 | goto label_3;
| label_10:
0x00019182 ldr r2, [pc, 0x98] | r2 = *(0x1921e);
0x00019184 movs r1, 1 | r1 = 1;
0x00019186 ldr r3, [pc, 0xac] |
0x00019188 ldr r6, [r7, r2] | r6 = *((r7 + r2));
0x0001918a add r3, pc | r3 = 0x323c4;
0x0001918c ldr r2, [pc, 0xa8] |
0x0001918e adds r3, 0x28 | r3 += 0x28;
0x00019190 ldr r0, [r6] | r0 = *(r6);
0x00019192 str r3, [sp, 4] | var_4h = r3;
0x00019194 mov.w r3, 0x116 | r3 = 0x116;
0x00019198 str r3, [sp] | *(sp) = r3;
0x0001919a add r2, pc | r2 = 0x323d6;
0x0001919c ldr r3, [pc, 0x9c] |
0x0001919e add r3, pc | r3 = 0x323de;
0x000191a0 blx 0x5538 | ext2fs_write_inode ();
| label_5:
0x000191a4 ldr r2, [pc, 0x98] |
0x000191a6 mov.w r3, 0x152 | r3 = 0x152;
0x000191aa ldr r0, [r6] | r0 = *(r6);
0x000191ac movs r1, 1 | r1 = 1;
0x000191ae str r3, [sp] | *(sp) = r3;
0x000191b0 add r2, pc | r2 = 0x323f4;
0x000191b2 ldr r3, [pc, 0x90] |
0x000191b4 adds r2, 0x40 | r2 += 0x40;
0x000191b6 str r2, [sp, 4] | var_4h = r2;
0x000191b8 ldr r2, [pc, 0x8c] |
0x000191ba add r3, pc | r3 = 0x32404;
0x000191bc add r2, pc | r2 = 0x32408;
0x000191be blx 0x5538 | ext2fs_write_inode ();
0x000191c2 ldr r1, [sp, 0x18] | r1 = var_18h;
0x000191c4 cmp r1, 0 |
| if (r1 == 0) {
0x000191c6 beq.w 0x18fb6 | goto label_0;
| }
0x000191ca b 0x1910e | goto label_4;
| label_11:
0x000191cc ldr r3, [pc, 0x4c] | r3 = *(0x1921c);
0x000191ce ldr r6, [r7, r3] | r6 = *((r7 + r3));
0x000191d0 b 0x191a4 | goto label_5;
| label_13:
0x000191d2 ldr r2, [pc, 0x48] | r2 = *(0x1921e);
0x000191d4 movs r1, 1 | r1 = 1;
0x000191d6 ldr r3, [pc, 0x74] |
0x000191d8 ldr r6, [r7, r2] | r6 = *((r7 + r2));
0x000191da add r3, pc | r3 = 0x3242c;
0x000191dc ldr r2, [pc, 0x70] |
0x000191de adds r3, 0x28 | r3 += 0x28;
0x000191e0 ldr r0, [r6] | r0 = *(r6);
0x000191e2 str r3, [sp, 4] | var_4h = r3;
0x000191e4 mov.w r3, 0x12c | r3 = 0x12c;
0x000191e8 str r3, [sp] | *(sp) = r3;
0x000191ea add r2, pc | r2 = 0x3243e;
0x000191ec ldr r3, [pc, 0x64] |
0x000191ee str r4, [sp, 8] | var_8h = r4;
0x000191f0 add r3, pc | r3 = 0x32448;
0x000191f2 blx 0x5538 | ext2fs_write_inode ();
0x000191f6 b 0x191a4 | goto label_5;
| label_9:
0x000191f8 blx 0x5008 | fcn_00005008 ();
0x000191fc add r4, sp, 0x58 | r4 += var_58h;
0x000191fe movs r1, r0 | r1 = r0;
0x00019200 lsls r0, r2, 0x10 | r0 = r2 << 0x10;
0x00019202 movs r0, r0 |
0x00019204 add r4, sp, 0x28 | r4 += var_28h;
0x00019206 movs r1, r0 | r1 = r0;
0x00019208 add r3, sp, 0x388 | r3 += arg_388h;
0x0001920a movs r1, r0 | r1 = r0;
0x0001920c stc2 p15, c15, [pc], -0x3fc | __asm ("stc2 p15, c15, [pc], -0x3fc");
0x00019210 invalid |
| }
[*] Function strcpy used 4 times debugfs