[*] Binary protection state of e2image
Full RELRO Canary found NX enabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of e2image
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/e2image @ 0x4640 */
| #include <stdint.h>
|
; (fcn) fcn.00004640 () | void fcn_00004640 (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_8h;
| int16_t var_ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00004640 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00004644 mov r7, r2 | r7 = r2;
0x00004646 ldr r2, [pc, 0xbc] |
0x00004648 mov r4, r3 | r4 = r3;
0x0000464a cmp r7, r4 |
0x0000464c sub sp, 0x10 |
0x0000464e ldr r3, [pc, 0xb8] | r3 = *(0x470a);
0x00004650 mov r6, r0 | r6 = r0;
0x00004652 add r2, pc | r2 = 0x8d5c;
0x00004654 ldr.w sl, [pc, 0xb4] |
0x00004658 mov r8, r1 | r8 = r1;
0x0000465a ldr r3, [r2, r3] |
0x0000465c add sl, pc | sl = 0x8d6c;
0x0000465e ldr r3, [r3] | r3 = *(0x8d5c);
0x00004660 str r3, [sp, 0xc] | var_ch = r3;
0x00004662 mov.w r3, 0 | r3 = 0;
0x00004666 bgt 0x46d0 |
| while (1) {
0x00004668 add.w sb, sp, 8 | sb += var_8h;
0x0000466c mov r0, r4 | r0 = r4;
0x0000466e mov r1, sb | r1 = sb;
0x00004670 blx 0x1b74 | r0 = ext2fs_rewrite_to_io ();
0x00004674 mov r5, r0 | r5 = r0;
0x00004676 cmp r0, 0 |
| if (r0 != 0) {
0x00004678 bne 0x46ea | goto label_0;
| }
0x0000467a movs r2, 0 | r2 = 0;
0x0000467c mov r0, r6 | r0 = r6;
0x0000467e movs r3, 0 | r3 = 0;
0x00004680 bl 0x44a0 | fcn_000044a0 ();
0x00004684 ldr r0, [sp, 8] | r0 = var_8h;
0x00004686 mov r2, r4 | r2 = r4;
0x00004688 mov r1, r5 | r1 = r5;
0x0000468a blx 0x1954 | fcn_00001954 ();
0x0000468e cmp.w r8, 0 |
| if (r8 != 0) {
0x00004692 beq 0x469e |
0x00004694 ldr r0, [sp, 8] | r0 = var_8h;
0x00004696 mov r2, r7 | r2 = r7;
0x00004698 mov r1, r8 | r1 = r8;
0x0000469a blx 0x1aa8 | ext2fs_blocks_count ();
| }
0x0000469e vmov.i8 d16, 0xff | __asm ("vmov.i8 d16, 0xff");
0x000046a2 mov r2, r4 | r2 = r4;
0x000046a4 ldr r1, [sp, 8] | r1 = var_8h;
0x000046a6 mov r0, r6 | r0 = r6;
0x000046a8 vstr d16, [sp] | __asm ("vstr d16, [sp]");
0x000046ac bl 0x453c | fcn_0000453c (r0, r1, r2, r3);
0x000046b0 mov r0, sb | r0 = sb;
0x000046b2 bl 0x452c | fcn_0000452c (r0);
0x000046b6 ldr r2, [pc, 0x58] |
0x000046b8 ldr r3, [pc, 0x4c] | r3 = *(0x4708);
0x000046ba add r2, pc | r2 = 0x8dd0;
0x000046bc ldr r3, [r2, r3] | r3 = *(0x8dd0);
0x000046be ldr r2, [r3] | r2 = *(0x8dd0);
0x000046c0 ldr r3, [sp, 0xc] | r3 = var_ch;
0x000046c2 eors r2, r3 | r2 ^= r3;
0x000046c4 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x000046c8 bne 0x46e6 | goto label_1;
| }
0x000046ca add sp, 0x10 |
0x000046cc pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
0x000046d0 ldr r3, [pc, 0x40] |
0x000046d2 movs r2, 0x2b | r2 = 0x2b;
0x000046d4 ldr r0, [pc, 0x40] |
0x000046d6 movs r1, 1 | r1 = 1;
0x000046d8 ldr.w r3, [sl, r3] | r3 = *((sl + r3));
0x000046dc add r0, pc | r0 = 0x8df8;
0x000046de ldr r3, [r3] | r3 = *(0x4714);
0x000046e0 blx 0x1b5c | time (r0);
0x000046e4 b 0x4668 |
| }
| label_1:
0x000046e6 blx 0x1bc8 | fprintf_chk ()
| label_0:
0x000046ea ldr r3, [pc, 0x28] |
0x000046ec movs r2, 0x20 | r2 = 0x20;
0x000046ee ldr r0, [pc, 0x2c] |
0x000046f0 movs r1, 1 | r1 = 1;
0x000046f2 ldr.w r3, [sl, r3] | r3 = *((sl + r3));
0x000046f6 add r0, pc | r0 = 0x8e18;
0x000046f8 ldr r3, [r3] | r3 = *(0x4716);
0x000046fa blx 0x1b5c | time (r0);
0x000046fe movs r0, 1 | r0 = 1;
0x00004700 blx 0x1d0c | blkid_probe_enable_partitions ();
0x00004704 ldrsb r6, [r5, r6] | r6 = *((r5 + r6));
0x00004706 movs r0, r0 |
0x00004708 lsls r0, r2, 7 | r0 = r2 << 7;
0x0000470a movs r0, r0 |
0x0000470c ldrsb r4, [r4, r6] | r4 = *((r4 + r6));
0x0000470e movs r0, r0 |
0x00004710 ldrsb r6, [r0, r5] | r6 = *((r0 + r5));
0x00004712 movs r0, r0 |
0x00004714 lsls r4, r5, 7 | r4 = r5 << 7;
0x00004716 movs r0, r0 |
0x00004718 adds r1, 0x44 | r1 += 0x44;
0x0000471a movs r0, r0 |
0x0000471c adds r1, 0x56 | r1 += 0x56;
0x0000471e movs r0, r0 |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/e2image @ 0x48dc */
| #include <stdint.h>
|
; (fcn) fcn.000048dc () | void fcn_000048dc (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h_3;
| int16_t var_10h_2;
| int16_t var_14h_3;
| int16_t var_28h_2;
| int16_t var_2ch;
| int16_t var_8h_2;
| int16_t var_10h;
| int16_t var_14h_2;
| int16_t var_28h;
| int16_t var_2ch_2;
| int16_t var_8h_3;
| void * ptr;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_20h;
| int16_t var_30h;
| int16_t var_8ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x000048dc mvnsmi lr, 0xb4000 | __asm ("mvnsmi lr, 0xb4000");
0x000048e0 mov r6, r2 | r6 = r2;
0x000048e2 ldr r2, [pc, 0x2b8] |
0x000048e4 sub sp, 0x94 |
0x000048e6 mov r5, r1 | r5 = r1;
0x000048e8 movs r1, 0 | r1 = 0;
0x000048ea ldr r3, [pc, 0x2b4] | r3 = *(0x4ba2);
0x000048ec mov r7, r0 | r7 = r0;
0x000048ee add r2, pc | r2 = 0x9490;
0x000048f0 ldr.w r8, [pc, 0x2b0] |
0x000048f4 ldr r3, [r2, r3] |
0x000048f6 mov.w r2, 0x1b6 | r2 = 0x1b6;
0x000048fa add r8, pc | r8 = 0x94a2;
0x000048fc ldr r3, [r3] | r3 = *(0x9490);
0x000048fe str r3, [sp, 0x8c] | var_8ch = r3;
0x00004900 mov.w r3, 0 | r3 = 0;
0x00004904 str r1, [sp, 0x14] | ptr = r1;
0x00004906 blx 0x1850 | r0 = ext2fs_open_file ();
0x0000490a subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 < r0) {
0x0000490c blt 0x496c | goto label_11;
| }
| label_4:
0x0000490e add r1, sp, 0x20 | r1 += var_20h;
0x00004910 mov r0, r4 | r0 = r4;
0x00004912 blx 0x1c40 | r0 = ext2fs_file_get_lsize ();
0x00004916 cmp r0, 0 |
| if (r0 < 0) {
0x00004918 blt.w 0x4b72 | goto label_12;
| }
0x0000491c mov r0, r4 | r0 = r4;
0x0000491e blx 0x1b44 | blkid_get_cache ();
0x00004922 ldr r3, [sp, 0x30] | r3 = var_30h;
0x00004924 and r3, r3, 0xf000 | r3 &= 0xf000;
0x00004928 cmp.w r3, 0x6000 |
| if (r3 == 0x6000) {
0x0000492c beq 0x49a6 | goto label_13;
| }
0x0000492e and r3, r5, 1 | r3 = r5 & 1;
| if (r6 != 0) {
0x00004932 cbz r6, 0x4938 |
0x00004934 movs r2, 0 | r2 = 0;
0x00004936 str r2, [r6] | *(r6) = r2;
| }
| if (r3 != 0) {
0x00004938 cbnz r3, 0x495c | goto label_14;
| }
| label_0:
0x0000493a lsls r3, r5, 0x1d | r3 = r5 << 0x1d;
| if (r3 < r5) {
0x0000493c bmi 0x49b2 | goto label_15;
| }
| label_1:
0x0000493e movs r0, 1 | r0 = 1;
| do {
0x00004940 ldr r2, [pc, 0x264] |
0x00004942 ldr r3, [pc, 0x25c] | r3 = *(0x4ba2);
0x00004944 add r2, pc | r2 = 0x94f0;
0x00004946 ldr r3, [r2, r3] | r3 = *(0x94f0);
0x00004948 ldr r2, [r3] | r2 = *(0x94f0);
0x0000494a ldr r3, [sp, 0x8c] | r3 = var_8ch;
0x0000494c eors r2, r3 | r2 ^= r3;
0x0000494e mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00004952 bne.w 0x4b7c | goto label_16;
| }
0x00004956 add sp, 0x94 |
0x00004958 pop.w {r4, r5, r6, r7, r8, sb, pc} |
| label_14:
0x0000495c ldr r1, [pc, 0x24c] |
0x0000495e mov r2, r7 | r2 = r7;
0x00004960 movs r0, 1 | r0 = 1;
0x00004962 add r1, pc | r1 = 0x9512;
0x00004964 blx 0x1920 | fcn_00001920 ();
| label_2:
0x00004968 movs r0, 0 | r0 = 0;
0x0000496a b 0x4940 |
| } while (1);
| label_11:
0x0000496c blx 0x1d24 | r0 = ext2fs_open_inode_scan ();
0x00004970 mov sb, r0 | sb = r0;
0x00004972 ldr r0, [r0] | r0 = *(r0);
0x00004974 cmp r0, 2 |
| if (r0 == 2) {
0x00004976 beq.w 0x4aae | goto label_17;
| }
| label_3:
0x0000497a ldr r3, [pc, 0x234] | r3 = *(0x4bb2);
0x0000497c ldr.w r4, [r8, r3] | r4 = *((r8 + r3));
0x00004980 ldr r5, [r4] | r5 = *(r4);
0x00004982 blx 0x1990 | fcn_00001990 ();
0x00004986 ldr r2, [pc, 0x22c] |
0x00004988 mov r3, r7 | r3 = r7;
0x0000498a str r0, [sp] | *(sp) = r0;
0x0000498c movs r1, 1 | r1 = 1;
0x0000498e mov r0, r5 | r0 = r5;
0x00004990 add r2, pc | r2 = 0x954a;
0x00004992 blx 0x1bd4 | fputc (r0, r1);
0x00004996 ldr.w r3, [sb] | r3 = *(sb);
0x0000499a cmp r3, 2 |
| if (r3 == 2) {
0x0000499c beq.w 0x4b0a | goto label_18;
| }
| label_8:
0x000049a0 movs r0, 1 | r0 = 1;
0x000049a2 blx 0x1d0c | blkid_probe_enable_partitions ();
| label_13:
0x000049a6 cmp r6, 0 |
| if (r6 == 0) {
0x000049a8 beq 0x493a | goto label_0;
| }
0x000049aa movs r3, 1 | r3 = 1;
0x000049ac str r3, [r6] | *(r6) = r3;
0x000049ae lsls r3, r5, 0x1d | r3 = r5 << 0x1d;
| if (r3 >= r5) {
0x000049b0 bpl 0x493e | goto label_1;
| }
| label_15:
0x000049b2 movs r1, 0 | r1 = 0;
0x000049b4 add r0, sp, 0x14 | r0 += ptr;
0x000049b6 blx 0x1b50 | r0 = fwrite (r0, r1, r2, r3);
0x000049ba cmp r0, 0 |
| if (r0 >= 0) {
0x000049bc bge 0x4a04 | goto label_19;
| }
| label_5:
0x000049be mov r0, r7 | r0 = r7;
0x000049c0 blx 0x1d54 | r0 = fcn_00001d54 ();
0x000049c4 mov r4, r0 | r4 = r0;
0x000049c6 cmp r0, 0 |
| if (r0 == 0) {
0x000049c8 beq 0x493e | goto label_1;
| }
0x000049ca movs r1, 1 | r1 = 1;
0x000049cc blx 0x1d18 | r0 = errno_location ();
0x000049d0 cmp r0, 0 |
| if (r0 >= 0) {
0x000049d2 blt 0x49fc |
0x000049d4 movs r1, 0 | r1 = 0;
0x000049d6 mov r0, r4 | r0 = r4;
0x000049d8 blx 0x1c7c | r0 = ext2fs_close_inode_scan ();
0x000049dc cmp r0, 0 |
| if (r0 < 0) {
0x000049de blt 0x49fc | goto label_20;
| }
0x000049e0 mov r0, r4 | r0 = r4;
0x000049e2 blx 0x1b2c | r0 = snprintf_chk ();
0x000049e6 cmp r0, 0 |
| if (r0 < 0) {
0x000049e8 blt 0x49fc | goto label_20;
| }
0x000049ea ldr r1, [pc, 0x1cc] |
0x000049ec movs r3, 0 | r3 = 0;
0x000049ee add r2, sp, 0x1c | r2 += var_1ch;
0x000049f0 mov r0, r4 | r0 = r4;
0x000049f2 add r1, pc | r1 = 0x95b0;
0x000049f4 blx 0x1ac0 | r0 = ext2fs_swab64 ();
0x000049f8 cmp r0, 0 |
| if (r0 == 0) {
0x000049fa beq 0x4aec | goto label_21;
| }
| }
| label_20:
0x000049fc mov r0, r4 | r0 = r4;
0x000049fe blx 0x1844 | blkid_free_probe ();
0x00004a02 b 0x493e | goto label_1;
| label_19:
0x00004a04 ldr r1, [pc, 0x1b4] |
0x00004a06 mov r2, r7 | r2 = r7;
0x00004a08 ldr r0, [sp, 0x14] | r0 = ptr;
0x00004a0a add r1, pc | r1 = 0x95ca;
0x00004a0c blx 0x1a78 | r0 = ext2fs_llseek ();
0x00004a10 mov r4, r0 | r4 = r0;
0x00004a12 cmp r0, 0 |
| if (r0 == 0) {
0x00004a14 beq 0x4ae4 | goto label_22;
| }
0x00004a16 ldr r1, [pc, 0x1a8] |
0x00004a18 mov r2, r7 | r2 = r7;
0x00004a1a ldr r0, [sp, 0x14] | r0 = ptr;
0x00004a1c add r1, pc | r1 = 0x95e2;
0x00004a1e blx 0x1a78 | r0 = ext2fs_llseek ();
0x00004a22 mov r5, r0 | r5 = r0;
0x00004a24 ldr r0, [sp, 0x14] | r0 = ptr;
0x00004a26 blx 0x19f4 | write (r0, r1, r2);
0x00004a2a mov r3, r4 | r3 = r4;
0x00004a2c cmp r5, 0 |
| if (r5 == 0) {
0x00004a2e beq 0x4b1a | goto label_23;
| }
0x00004a30 ldr r1, [pc, 0x190] |
0x00004a32 mov r2, r7 | r2 = r7;
0x00004a34 movs r0, 1 | r0 = 1;
0x00004a36 str r5, [sp] | *(sp) = r5;
0x00004a38 add r1, pc | r1 = 0x9600;
0x00004a3a blx 0x1920 | fcn_00001920 ();
| label_6:
0x00004a3e ldrb r3, [r4] | r3 = *(r4);
0x00004a40 cmp r3, 0x65 |
| if (r3 == 0x65) {
0x00004a42 bne 0x4aa0 |
0x00004a44 ldrb r3, [r4, 1] | r3 = *((r4 + 1));
0x00004a46 cmp r3, 0x78 |
| if (r3 != 0x78) {
0x00004a48 bne 0x4aa0 | goto label_24;
| }
0x00004a4a ldrb r3, [r4, 2] | r3 = *((r4 + 2));
0x00004a4c subs r3, 0x74 | r3 -= 0x74;
| if (r3 != 0x74) {
0x00004a4e bne 0x4aa0 | goto label_24;
| }
0x00004a50 ldr r2, [pc, 0x174] |
0x00004a52 add r6, sp, 0x18 | r6 += var_18h;
0x00004a54 str r6, [sp, 8] | var_8h_3 = r6;
0x00004a56 mov r0, r7 | r0 = r7;
0x00004a58 mov r1, r3 | r1 = r3;
0x00004a5a ldr.w r2, [r8, r2] | r2 = *((r8 + r2));
0x00004a5e str r3, [sp] | *(sp) = r3;
0x00004a60 ldr r2, [r2] | r2 = *(0x4bc8);
0x00004a62 str r2, [sp, 4] | var_8ch = r2;
0x00004a64 mov.w r2, 0x20000 | r2 = 0x20000;
0x00004a68 blx 0x18f0 | r0 = fcn_000018f0 ();
| if (r0 != 0) {
0x00004a6c cbnz r0, 0x4aa0 | goto label_24;
| }
0x00004a6e ldr r3, [sp, 0x18] | r3 = var_18h;
0x00004a70 ldr r7, [r3, 0x10] | r7 = *((r3 + 0x10));
0x00004a72 ldr r3, [r7, 0x2c] | r3 = *((r7 + 0x2c));
0x00004a74 cmp r3, 0 |
| if (r3 == 0) {
0x00004a76 beq 0x4b28 | goto label_25;
| }
0x00004a78 str r3, [sp, 0x1c] | var_1ch = r3;
0x00004a7a add r0, sp, 0x1c | r0 += var_1ch;
0x00004a7c ldrb.w r3, [r7, 0x88] | r3 = *((r7 + 0x88));
0x00004a80 cmp r3, 0 |
| if (r3 == 0) {
0x00004a82 beq 0x4b4a | goto label_26;
| }
0x00004a84 blx 0x1ae4 | ext2fs_punch ();
0x00004a88 ldr r1, [pc, 0x140] |
0x00004a8a add.w r3, r7, 0x88 | r3 = r7 + 0x88;
0x00004a8e str r0, [sp] | *(sp) = r0;
0x00004a90 movs r2, 0x40 | r2 = 0x40;
0x00004a92 movs r0, 1 | r0 = 1;
0x00004a94 add r1, pc | r1 = 0x9664;
0x00004a96 blx 0x1920 | fcn_00001920 ();
| label_7:
0x00004a9a mov r0, r6 | r0 = r6;
0x00004a9c blx 0x1ad8 | ctime (r0);
| }
| label_24:
0x00004aa0 mov r0, r4 | r0 = r4;
0x00004aa2 blx 0x19d0 | read (r0, r1, r2);
0x00004aa6 mov r0, r5 | r0 = r5;
0x00004aa8 blx 0x19d0 | read (r0, r1, r2);
0x00004aac b 0x4968 | goto label_2;
| label_17:
0x00004aae lsls r4, r5, 0x1b | r4 = r5 << 0x1b;
| if (r4 < r5) {
0x00004ab0 bmi 0x4b80 | goto label_27;
| }
0x00004ab2 lsls r1, r5, 0x1e | r1 = r5 << 0x1e;
| if (r1 >= r5) {
0x00004ab4 bpl.w 0x497a | goto label_3;
| }
0x00004ab8 mov.w r2, 0x1b6 | r2 = 0x1b6;
0x00004abc movs r1, 0x40 | r1 = 0x40;
0x00004abe mov r0, r7 | r0 = r7;
0x00004ac0 blx 0x1850 | r0 = ext2fs_open_file ();
0x00004ac4 subs r4, r0, 0 | r4 = r0 - 0;
0x00004ac6 it lt |
| if (r4 < r0) {
0x00004ac8 ldrlt r0, [sb] | r0 = *(sb);
| goto label_28;
| }
| if (r4 < r0) {
| label_28:
0x00004acc blt.w 0x497a | goto label_3;
| }
0x00004ad0 lsls r2, r5, 0x1c | r2 = r5 << 0x1c;
| if (r2 >= r5) {
0x00004ad2 bpl.w 0x490e | goto label_4;
| }
0x00004ad6 ldr r1, [pc, 0xf8] |
0x00004ad8 mov r2, r7 | r2 = r7;
0x00004ada movs r0, 1 | r0 = 1;
0x00004adc add r1, pc | r1 = 0x96b2;
0x00004ade blx 0x1920 | fcn_00001920 ();
0x00004ae2 b 0x490e | goto label_4;
| label_22:
0x00004ae4 ldr r0, [sp, 0x14] | r0 = ptr;
0x00004ae6 blx 0x19f4 | write (r0, r1, r2);
0x00004aea b 0x49be | goto label_5;
| label_21:
0x00004aec ldr r2, [pc, 0xc0] | r2 = *(0x4bb0);
0x00004aee movs r1, 1 | r1 = 1;
0x00004af0 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x00004af2 ldr.w r0, [r8, r2] | r0 = *((r8 + r2));
0x00004af6 ldr r2, [pc, 0xdc] |
0x00004af8 str r7, [sp] | *(sp) = r7;
0x00004afa ldr r0, [r0] | r0 = *(r0);
0x00004afc add r2, pc | r2 = 0x96d6;
0x00004afe blx 0x1bd4 | fputc (r0, r1);
0x00004b02 mov r0, r4 | r0 = r4;
0x00004b04 blx 0x1844 | blkid_free_probe ();
0x00004b08 b 0x4968 | goto label_2;
| label_18:
0x00004b0a ldr r0, [pc, 0xcc] |
0x00004b0c movs r2, 0x45 | r2 = 0x45;
0x00004b0e ldr r3, [r4] | r3 = *(r4);
0x00004b10 movs r1, 1 | r1 = 1;
0x00004b12 add r0, pc | r0 = 0x96f0;
0x00004b14 blx 0x1b5c | time (r0);
0x00004b16 invalid |
| label_23:
0x00004b1a ldr r1, [pc, 0xc0] |
0x00004b1c mov r2, r7 | r2 = r7;
0x00004b1e movs r0, 1 | r0 = 1;
0x00004b20 add r1, pc | r1 = 0x9702;
0x00004b22 blx 0x1920 | fcn_00001920 ();
0x00004b26 b 0x4a3e | goto label_6;
| label_25:
0x00004b28 ldr.w r3, [r7, 0x108] | r3 = *((r7 + 0x108));
| if (r3 != 0) {
0x00004b2c cbnz r3, 0x4b5c | goto label_29;
| }
0x00004b2e ldr r3, [r7, 0x30] | r3 = *((r7 + 0x30));
0x00004b30 cmp r3, 0 |
| if (r3 == 0) {
0x00004b32 beq 0x4a9a | goto label_7;
| }
0x00004b34 add r0, sp, 0x1c | r0 += var_1ch;
0x00004b36 str r3, [sp, 0x1c] | var_1ch = r3;
0x00004b38 blx 0x1ae4 | ext2fs_punch ();
0x00004b3c ldr r1, [pc, 0xa0] |
0x00004b3e mov r2, r0 | r2 = r0;
0x00004b40 movs r0, 1 | r0 = 1;
0x00004b42 add r1, pc | r1 = 0x9726;
0x00004b44 blx 0x1920 | fcn_00001920 ();
0x00004b48 b 0x4a9a | goto label_7;
| label_26:
0x00004b4a blx 0x1ae4 | ext2fs_punch ();
0x00004b4e ldr r1, [pc, 0x94] |
0x00004b50 mov r2, r0 | r2 = r0;
0x00004b52 movs r0, 1 | r0 = 1;
0x00004b54 add r1, pc | r1 = 0x973e;
0x00004b56 blx 0x1920 | fcn_00001920 ();
0x00004b5a b 0x4a9a | goto label_7;
| label_29:
0x00004b5c add r0, sp, 0x1c | r0 += var_1ch;
0x00004b5e str r3, [sp, 0x1c] | var_1ch = r3;
0x00004b60 blx 0x1ae4 | ext2fs_punch ();
0x00004b64 ldr r1, [pc, 0x80] |
0x00004b66 mov r2, r0 | r2 = r0;
0x00004b68 movs r0, 1 | r0 = 1;
0x00004b6a add r1, pc | r1 = 0x9756;
0x00004b6c blx 0x1920 | fcn_00001920 ();
0x00004b70 b 0x4a9a | goto label_7;
| label_12:
0x00004b72 ldr r0, [pc, 0x78] |
0x00004b74 add r0, pc | r0 = 0x9766;
0x00004b76 blx 0x1978 | fcn_00001978 ();
0x00004b7a b 0x49a0 | goto label_8;
| label_16:
0x00004b7c blx 0x1bc8 | fprintf_chk ()
| label_27:
0x00004b80 ldr r0, [pc, 0x2c] |
0x00004b82 mov r3, r7 | r3 = r7;
0x00004b84 ldr r2, [pc, 0x68] |
0x00004b86 movs r1, 1 | r1 = 1;
0x00004b88 ldr.w r0, [r8, r0] | r0 = *((r8 + r0));
0x00004b8c add r2, pc | r2 = 0x9780;
0x00004b8e ldr r0, [r0] | r0 = *(0x4bb0);
0x00004b90 blx 0x1bd4 | fputc (r0, r1);
0x00004b94 movs r0, 1 | r0 = 1;
0x00004b96 blx 0x1d0c | blkid_probe_enable_partitions ();
0x00004b9a nop |
0x00004b9c strb r2, [r2, r4] | *((r2 + r4)) = r2;
0x00004b9e movs r0, r0 |
0x00004ba0 lsls r0, r2, 7 | r0 = r2 << 7;
0x00004ba2 movs r0, r0 |
0x00004ba4 strb r6, [r0, r4] | *((r0 + r4)) = r6;
0x00004ba6 movs r0, r0 |
0x00004ba8 strb r4, [r7, r2] | *((r7 + r2)) = r4;
0x00004baa movs r0, r0 |
0x00004bac subs r0, 0x72 | r0 -= 0x72;
0x00004bae movs r0, r0 |
0x00004bb0 lsls r4, r5, 7 | r4 = r5 << 7;
0x00004bb2 movs r0, r0 |
0x00004bb4 adds r7, 0xdc | r7 += 0xdc;
0x00004bb6 movs r0, r0 |
0x00004bb8 subs r0, 0xba | r0 -= 0xba;
0x00004bba movs r0, r0 |
0x00004bbc adds r7, 0xee | r7 += 0xee;
0x00004bbe movs r0, r0 |
0x00004bc0 adds r7, 0xe4 | r7 += 0xe4;
0x00004bc2 movs r0, r0 |
0x00004bc4 adds r7, 0xd0 | r7 += 0xd0;
0x00004bc6 movs r0, r0 |
0x00004bc8 lsls r4, r2, 7 | r4 = r2 << 7;
0x00004bca movs r0, r0 |
0x00004bcc adds r7, 0xc0 | r7 += 0xc0;
0x00004bce movs r0, r0 |
0x00004bd0 adds r6, 0x74 | r6 += 0x74;
0x00004bd2 movs r0, r0 |
0x00004bd4 adds r7, 0xb8 | r7 += 0xb8;
0x00004bd6 movs r0, r0 |
0x00004bd8 adds r6, 0x72 | r6 += 0x72;
0x00004bda movs r0, r0 |
0x00004bdc adds r7, 0x14 | r7 += 0x14;
0x00004bde movs r0, r0 |
0x00004be0 adds r7, 0x52 | r7 += 0x52;
0x00004be2 movs r0, r0 |
0x00004be4 adds r7, 0x1c | r7 += 0x1c;
0x00004be6 movs r0, r0 |
0x00004be8 adds r7, 0x1a | r7 += 0x1a;
0x00004bea movs r0, r0 |
0x00004bec adds r6, 0x58 | r6 += 0x58;
0x00004bee movs r0, r0 |
0x00004bf0 adds r5, 0x8c | r5 += 0x8c;
0x00004bf2 movs r0, r0 |
0x00004bf4 push {r4, r5, r6, lr} |
0x00004bf6 sub sp, 0x18 |
0x00004bf8 ldr r4, [r0, 8] | r4 = *(0x4bb8);
0x00004bfa ldr r0, [pc, 0x8c] |
0x00004bfc ldr r1, [pc, 0x8c] | r1 = *(0x4c8c);
0x00004bfe ldr r5, [pc, 0x90] |
0x00004c00 add r0, pc | r0 = 0x988e;
0x00004c02 ldr r6, [sp, 0x28] | r6 = var_28h;
0x00004c04 ldr r1, [r0, r1] |
0x00004c06 mov r0, r4 | r0 = r4;
0x00004c08 add r5, pc | r5 = 0x989e;
0x00004c0a ldr r1, [r1] | r1 = *(0x988e);
0x00004c0c str r1, [sp, 0x14] | var_14h_2 = r1;
0x00004c0e mov.w r1, 0 | r1 = 0;
0x00004c12 movs r1, 0 | r1 = 0;
0x00004c14 strd r1, r1, [sp] | __asm ("strd r1, r1, [sp]");
0x00004c16 asrs r0, r0, 4 | r0 >>= 4;
0x00004c18 str r1, [sp, 0x10] | var_10h = r1;
0x00004c1a blx 0x1b14 | r0 = io_channel_read_blk64 ();
| if (r0 != 0) {
0x00004c1e cbnz r0, 0x4c48 | goto label_30;
| }
0x00004c20 ldr r2, [sp, 0x2c] | r2 = var_8ch;
0x00004c22 add r3, sp, 0x10 | r3 += var_10h;
0x00004c24 mov r1, r6 | r1 = r6;
0x00004c26 mov r0, r4 | r0 = r4;
0x00004c28 blx 0x1b98 | r0 = malloc (r0);
| if (r0 != 0) {
0x00004c2c cbnz r0, 0x4c6c | goto label_31;
| }
0x00004c2e ldr r0, [sp, 0x10] | r0 = var_10h;
| do {
0x00004c30 ldr r2, [pc, 0x60] |
0x00004c32 ldr r3, [pc, 0x58] | r3 = *(0x4c8e);
0x00004c34 add r2, pc | r2 = 0x98cc;
0x00004c36 ldr r3, [r2, r3] | r3 = *(0x98cc);
0x00004c38 ldr r2, [r3] | r2 = *(0x98cc);
0x00004c3a ldr r3, [sp, 0x14] | r3 = var_14h_2;
0x00004c3c eors r2, r3 | r2 ^= r3;
0x00004c3e mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00004c42 bne 0x4c82 | goto label_32;
| }
0x00004c44 add sp, 0x18 |
0x00004c46 pop {r4, r5, r6, pc} |
| label_30:
0x00004c48 ldr r3, [pc, 0x4c] | r3 = *(0x4c98);
0x00004c4a movs r6, 0xac | r6 = 0xac;
0x00004c4c ldr r1, [pc, 0x4c] |
0x00004c4e ldr r2, [pc, 0x50] |
0x00004c50 ldr r4, [r5, r3] | r4 = *((r5 + r3));
0x00004c52 ldr r3, [pc, 0x50] |
0x00004c54 add r1, pc | r1 = 0x98f4;
0x00004c56 add r2, pc | r2 = 0x98fc;
0x00004c58 str r0, [sp, 8] | var_8h_2 = r0;
0x00004c5a add r3, pc | r3 = 0x9904;
| label_9:
0x00004c5c strd r6, r1, [sp] | __asm ("strd r6, r1, [sp]");
0x00004c60 movs r1, 1 | r1 = 1;
0x00004c62 ldr r0, [r4] | r0 = *(r4);
0x00004c64 blx 0x1bd4 | fputc (r0, r1);
0x00004c68 movs r0, 0 | r0 = 0;
0x00004c6a b 0x4c30 |
| } while (1);
| label_31:
0x00004c6c ldr r3, [pc, 0x28] | r3 = *(0x4c98);
0x00004c6e movs r6, 0xb2 | r6 = 0xb2;
0x00004c70 ldr r1, [pc, 0x34] |
0x00004c72 ldr r2, [pc, 0x38] |
0x00004c74 ldr r4, [r5, r3] | r4 = *((r5 + r3));
0x00004c76 ldr r3, [pc, 0x38] |
0x00004c78 add r1, pc | r1 = 0x9924;
0x00004c7a add r2, pc | r2 = 0x992c;
0x00004c7c str r0, [sp, 8] | var_8h_2 = r0;
0x00004c7e add r3, pc | r3 = 0x9934;
0x00004c80 b 0x4c5c | goto label_9;
| label_32:
0x00004c82 blx 0x1bc8 | fprintf_chk ()
0x00004c86 nop |
0x00004c88 strh r0, [r0, r0] | *((r0 + r0)) = r0;
0x00004c8a movs r0, r0 |
0x00004c8c lsls r0, r2, 7 | r0 = r2 << 7;
0x00004c8e movs r0, r0 |
0x00004c90 str r0, [r7, r7] | *((r7 + r7)) = r0;
0x00004c92 movs r0, r0 |
0x00004c94 str r4, [r1, r7] | *((r1 + r7)) = r4;
0x00004c96 movs r0, r0 |
0x00004c98 lsls r4, r5, 7 | r4 = r5 << 7;
0x00004c9a movs r0, r0 |
0x00004c9c subs r1, 0x6c | r1 -= 0x6c;
0x00004c9e movs r0, r0 |
0x00004ca0 adds r6, 0xbe | r6 += 0xbe;
0x00004ca2 movs r0, r0 |
0x00004ca4 adds r6, 0x7e | r6 += 0x7e;
0x00004ca6 movs r0, r0 |
0x00004ca8 subs r1, 0x48 | r1 -= 0x48;
0x00004caa movs r0, r0 |
0x00004cac adds r6, 0xce | r6 += 0xce;
0x00004cae movs r0, r0 |
0x00004cb0 adds r6, 0x5a | r6 += 0x5a;
0x00004cb2 movs r0, r0 |
0x00004cb4 push {r4, r5, r6, lr} |
0x00004cb6 sub sp, 0x18 |
0x00004cb8 ldr r4, [r0, 8] | r4 = *((r0 + 8));
0x00004cba ldr r0, [pc, 0x9c] |
0x00004cbc ldr r1, [pc, 0x9c] | r1 = *(0x4d5c);
0x00004cbe ldr r5, [pc, 0xa0] |
0x00004cc0 add r0, pc | r0 = 0x9a1e;
0x00004cc2 ldr r6, [sp, 0x28] | r6 = var_28h_2;
0x00004cc4 ldr r1, [r0, r1] |
0x00004cc6 mov r0, r4 | r0 = r4;
0x00004cc8 add r5, pc | r5 = 0x9a2e;
0x00004cca ldr r1, [r1] | r1 = *(0x9a1e);
0x00004ccc str r1, [sp, 0x14] | var_14h_3 = r1;
0x00004cce mov.w r1, 0 | r1 = 0;
0x00004cd2 movs r1, 0 | r1 = 0;
0x00004cd4 strd r1, r1, [sp] | __asm ("strd r1, r1, [sp]");
0x00004cd8 str r1, [sp, 0x10] | var_10h_2 = r1;
0x00004cda blx 0x1b14 | r0 = io_channel_read_blk64 ();
| if (r0 != 0) {
0x00004cde cbnz r0, 0x4d08 | goto label_33;
| }
0x00004ce0 ldr r2, [sp, 0x2c] | r2 = var_2ch;
0x00004ce2 add r3, sp, 0x10 | r3 += var_10h_2;
0x00004ce4 mov r1, r6 | r1 = r6;
0x00004ce6 mov r0, r4 | r0 = r4;
0x00004ce8 blx 0x188c | r0 = ext2fs_file_write ();
| if (r0 != 0) {
0x00004cec cbnz r0, 0x4d2e | goto label_34;
| }
0x00004cee ldr r0, [sp, 0x10] | r0 = var_10h_2;
| do {
0x00004cf0 ldr r2, [pc, 0x70] |
0x00004cf2 ldr r3, [pc, 0x68] | r3 = *(0x4d5e);
0x00004cf4 add r2, pc | r2 = 0x9a5c;
0x00004cf6 ldr r3, [r2, r3] | r3 = *(0x9a5c);
0x00004cf8 ldr r2, [r3] | r2 = *(0x9a5c);
0x00004cfa ldr r3, [sp, 0x14] | r3 = var_14h_3;
0x00004cfc eors r2, r3 | r2 ^= r3;
0x00004cfe mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00004d02 bne 0x4d52 | goto label_35;
| }
0x00004d04 add sp, 0x18 |
0x00004d06 pop {r4, r5, r6, pc} |
| label_33:
0x00004d08 ldr r3, [pc, 0x5c] |
0x00004d0a movs r4, 0x94 | r4 = 0x94;
0x00004d0c ldr r2, [pc, 0x5c] | r2 = *(0x4d6c);
0x00004d0e add r3, pc | r3 = 0x9a7a;
0x00004d10 adds r3, 0x14 | r3 += 0x14;
0x00004d12 ldr r1, [r5, r2] | r1 = *((r5 + r2));
0x00004d14 strd r3, r0, [sp, 4] | __asm ("strd r3, r0, [sp, 4]");
0x00004d16 adds r0, 1 | r0++;
0x00004d18 ldr r2, [pc, 0x54] |
0x00004d1a ldr r3, [pc, 0x58] |
0x00004d1c ldr r0, [r1] | r0 = *(r1);
0x00004d1e movs r1, 1 | r1 = 1;
0x00004d20 add r2, pc | r2 = 0x9a94;
0x00004d22 str r4, [sp] | *(sp) = r4;
0x00004d24 add r3, pc | r3 = 0x9a9e;
0x00004d26 blx 0x1bd4 | fputc (r0, r1);
| label_10:
0x00004d2a movs r0, 0 | r0 = 0;
0x00004d2c b 0x4cf0 |
| } while (1);
| label_34:
0x00004d2e ldr r3, [pc, 0x48] |
0x00004d30 movs r4, 0x9a | r4 = 0x9a;
0x00004d32 ldr r2, [pc, 0x38] | r2 = *(0x4d6e);
0x00004d34 add r3, pc | r3 = 0x9ab2;
0x00004d36 adds r3, 0x14 | r3 += 0x14;
0x00004d38 ldr r1, [r5, r2] | r1 = *((r5 + r2));
0x00004d3a strd r3, r0, [sp, 4] | __asm ("strd r3, r0, [sp, 4]");
0x00004d3e ldr r2, [pc, 0x3c] |
0x00004d40 ldr r3, [pc, 0x3c] |
0x00004d42 ldr r0, [r1] | r0 = *(r1);
0x00004d44 movs r1, 1 | r1 = 1;
0x00004d46 add r2, pc | r2 = 0x9ac8;
0x00004d48 str r4, [sp] | *(sp) = r4;
0x00004d4a add r3, pc | r3 = 0x9ace;
0x00004d4c blx 0x1bd4 | fputc (r0, r1);
0x00004d50 b 0x4d2a | goto label_10;
| label_35:
0x00004d52 blx 0x1bc8 | fprintf_chk ()
0x00004d56 nop |
0x00004d58 str r0, [r0, r5] | *((r0 + r5)) = r0;
0x00004d5a movs r0, r0 |
0x00004d5c lsls r0, r2, 7 | r0 = r2 << 7;
0x00004d5e movs r0, r0 |
0x00004d60 str r0, [r7, r4] | *((r7 + r4)) = r0;
0x00004d62 movs r0, r0 |
0x00004d64 str r4, [r1, r4] | *((r1 + r4)) = r4;
0x00004d66 movs r0, r0 |
0x00004d68 subs r0, 0xb2 | r0 -= 0xb2;
0x00004d6a movs r0, r0 |
0x00004d6c lsls r4, r5, 7 | r4 = r5 << 7;
0x00004d6e movs r0, r0 |
0x00004d70 adds r5, 0xf4 | r5 += 0xf4;
0x00004d72 movs r0, r0 |
0x00004d74 adds r5, 0xb4 | r5 += 0xb4;
0x00004d76 movs r0, r0 |
0x00004d78 subs r0, 0x8c | r0 -= 0x8c;
0x00004d7a movs r0, r0 |
0x00004d7c adds r6, 0x32 | r6 += 0x32;
0x00004d7e movs r0, r0 |
0x00004d80 adds r5, 0x8e | r5 += 0x8e;
0x00004d82 movs r0, r0 |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/e2image @ 0x4ea8 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.00004ea8 () | void fcn_00004ea8 (int16_t arg1, int16_t arg2) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_8h;
| tm * timeptr;
| size_t maxsize;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_28h;
| int16_t var_32h;
| int16_t var_38h;
| int16_t var_84h;
| int16_t var_9ch;
| int16_t var_14h;
| int16_t var_28h_2;
| int16_t var_34h;
| int16_t var_94h;
| r0 = arg1;
| r1 = arg2;
0x00004ea8 blmi 0xb1775c | __asm ("blmi aav.0x00004f50");
0x00004eac push {r4, r5, r6, lr} |
0x00004eae sub sp, 0x98 |
0x00004eb0 add r2, pc | r2 += pc;
0x00004eb2 add r6, sp, 0x14 | r6 += var_14h;
0x00004eb4 mov r4, r0 | r4 = r0;
0x00004eb6 mov r5, r1 | r5 = r1;
0x00004eb8 ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x00004eba mov r2, r6 | r2 = r6;
0x00004ebc ldr r3, [r3] | r3 = *(r3);
0x00004ebe str r3, [sp, 0x94] | var_94h = r3;
0x00004ec0 mov.w r3, 0 | r3 = 0;
0x00004ec4 blx 0x19b4 | r0 = fcn_000019b4 ();
| if (r0 != 0) {
0x00004ec8 cbnz r0, 0x4eee | goto label_0;
| }
0x00004eca cmp r5, 3 |
0x00004ecc ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
| if (r5 == 3) {
0x00004ece beq 0x4f06 | goto label_9;
| }
0x00004ed0 cmp r5, 4 |
| if (r5 == 4) {
0x00004ed2 beq 0x4f06 | goto label_9;
| }
0x00004ed4 ldr.w r3, [r3, 0x26c] | r3 = *((r3 + 0x26c));
0x00004ed8 cmp r3, r5 |
| if (r3 == r5) {
0x00004eda beq 0x4f06 | goto label_9;
| }
0x00004edc ldr r3, [sp, 0x34] | r3 = var_34h;
0x00004ede bic r3, r3, 0x10 | r3 = BIT_MASK (r3, 0x10);
0x00004ee2 str r3, [sp, 0x34] | var_34h = r3;
| label_1:
0x00004ee4 mov r2, r6 | r2 = r6;
0x00004ee6 mov r1, r5 | r1 = r5;
0x00004ee8 mov r0, r4 | r0 = r4;
0x00004eea blx 0x1c70 | blkid_probe_enable_superblocks ();
| do {
| label_0:
0x00004eee ldr r2, [pc, 0x70] |
0x00004ef0 ldr r3, [pc, 0x68] | r3 = *(0x4f5c);
0x00004ef2 add r2, pc | r2 = 0x9e58;
0x00004ef4 ldr r3, [r2, r3] | r3 = *(0x9e58);
0x00004ef6 ldr r2, [r3] | r2 = *(0x9e58);
0x00004ef8 ldr r3, [sp, 0x94] | r3 = var_94h;
0x00004efa eors r2, r3 | r2 ^= r3;
0x00004efc mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00004f00 bne 0x4f52 | goto label_10;
| }
0x00004f02 add sp, 0x98 |
0x00004f04 pop {r4, r5, r6, pc} |
| label_9:
0x00004f06 ldr r0, [r4, 0x60] | r0 = *((r4 + 0x60));
| if (r0 == 0) {
0x00004f08 cbz r0, 0x4f4c | goto label_11;
| }
| label_2:
0x00004f0a str r0, [sp, 0x28] | var_28h_2 = r0;
0x00004f0c mov r1, r6 | r1 = r6;
0x00004f0e mov r0, r4 | r0 = r4;
0x00004f10 blx 0x196c | r0 = fcn_0000196c ();
0x00004f14 cmp r0, 0 |
0x00004f16 beq 0x4eee |
| } while (r0 == 0);
0x00004f18 vmov.i8 d17, 0xff | __asm ("vmov.i8 d17, 0xff");
0x00004f1c movs r3, 0 | r3 = 0;
0x00004f1e vmov.i32 d16, 0 | __asm ("vmov.i32 d16, 0");
0x00004f22 mov r2, r6 | r2 = r6;
0x00004f24 mov r1, r5 | r1 = r5;
0x00004f26 mov r0, r4 | r0 = r4;
0x00004f28 vstr d17, [sp, 8] | __asm ("vstr d17, [sp, 8]");
0x00004f2c vstr d16, [sp] | __asm ("vstr d16, [sp]");
0x00004f30 blx 0x1af0 | raise (r0);
0x00004f32 ldcl p8, c2, [lr] | __asm ("ldcl p8, c2, [lr]");
| if (r3 != 0) {
0x00004f36 bne 0x4eee | goto label_0;
| }
0x00004f38 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x00004f3a mov r1, r0 | r1 = r0;
0x00004f3c movs r2, 0x80 | r2 = 0x80;
0x00004f3e mov r0, r6 | r0 = r6;
0x00004f40 bic r3, r3, 0x800 | r3 = BIT_MASK (r3, 0x800);
0x00004f44 str r3, [r4, 8] | *((r4 + 8)) = r3;
0x00004f46 blx 0x1954 | fcn_00001954 ();
0x00004f4a b 0x4ee4 | goto label_1;
| label_11:
0x00004f4c blx 0x1b68 | ext2fs_get_mem ();
0x00004f50 b 0x4f0a | goto label_2;
| label_10:
0x00004f52 blx 0x1bc8 | fprintf_chk ()
0x00004f56 nop |
0x00004f58 ldr r7, [pc, 0x140] | r7 = *(0x509c);
0x00004f5a movs r0, r0 |
0x00004f5c lsls r0, r2, 7 | r0 = r2 << 7;
0x00004f5e movs r0, r0 |
0x00004f60 ldr r7, [pc, 0x38] | r7 = *(0x4f9c);
0x00004f62 movs r0, r0 |
0x00004f64 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00004f68 mov r6, r2 | r6 = r2;
0x00004f6a ldr r2, [pc, 0x288] |
0x00004f6c mov r8, r3 | r8 = r3;
0x00004f6e adds r3, 1 | r3++;
0x00004f70 sub sp, 0xa4 |
0x00004f72 ldr r3, [pc, 0x284] | r3 = *(0x51fa);
0x00004f74 it eq |
| if (r3 != 1) {
0x00004f76 moveq r8, 4 | r8 = 4;
| }
0x00004f7a add r2, pc | r2 = 0xa174;
0x00004f7c ldr r7, [pc, 0x27c] |
0x00004f7e cmp r6, 1 |
0x00004f80 mov r5, r1 | r5 = r1;
0x00004f82 ldr r3, [r2, r3] |
0x00004f84 mov sb, r0 | sb = r0;
0x00004f86 add r7, pc | r7 = 0xa186;
0x00004f88 ldr r3, [r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00004f8a str r3, [sp, 0x9c] | var_9ch = r3;
0x00004f8c mov.w r3, 0 | r3 = 0;
0x00004f90 ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x00004f92 str r1, [r0, 0x10] | *((r0 + 0x10)) = r1;
| if (r6 == 1) {
0x00004f94 beq 0x4fc8 | goto label_12;
| }
0x00004f96 cmp r6, 2 |
| if (r6 == 2) {
0x00004f98 beq.w 0x5114 | goto label_13;
| }
0x00004f9c movw r4, 0xb729 |
0x00004fa0 movt r4, 0x7f2b | r4 = 0x7f2bb729;
0x00004fa2 strb r3, [r5, 0x10] | *((r5 + 0x10)) = r3;
0x00004fa4 cmp r6, 0 |
| if (r6 == 0) {
0x00004fa6 beq.w 0x510e | goto label_14;
| }
| do {
| label_3:
0x00004faa ldr r2, [pc, 0x254] |
0x00004fac ldr r3, [pc, 0x248] | r3 = *(0x51f8);
0x00004fae add r2, pc | r2 = 0xa1b4;
0x00004fb0 ldr r3, [r2, r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00004fb2 ldr r2, [r3] | r2 = imp.__aeabi_unwind_cpp_pr0;
0x00004fb4 ldr r3, [sp, 0x9c] | r3 = var_9ch;
0x00004fb6 eors r2, r3 | r2 ^= r3;
0x00004fb8 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00004fbc bne.w 0x51f0 | goto label_15;
| }
0x00004fc0 mov r0, r4 | r0 = r4;
0x00004fc2 add sp, 0xa4 |
0x00004fc4 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_12:
0x00004fc8 movs r3, 4 | r3 = 4;
0x00004fca str r3, [sp, 0x14] | maxsize = r3;
| label_4:
0x00004fcc mov r0, r5 | r0 = r5;
0x00004fce blx 0x19e8 | r0 = blkid_put_cache ();
0x00004fd2 mov r4, r0 | r4 = r0;
0x00004fd4 cmp r0, 0 |
| if (r0 != 0) {
0x00004fd6 bne.w 0x50fe | goto label_5;
| }
0x00004fda ldr.w fp, [sp, 0x14] | fp = maxsize;
0x00004fde add.w sl, sp, 0x18 | sl += var_18h;
0x00004fe2 mov r2, sl | r2 = sl;
0x00004fe4 mov r0, r5 | r0 = r5;
0x00004fe6 mov r1, fp | r1 = fp;
0x00004fe8 blx 0x19b4 | r0 = fcn_000019b4 ();
0x00004fec mov r4, r0 | r4 = r0;
0x00004fee cmp r0, 0 |
| if (r0 != 0) {
0x00004ff0 bne.w 0x517a | goto label_16;
| }
0x00004ff4 ldr r2, [sp, 0x84] | r2 = var_84h;
0x00004ff6 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x00004ff8 orrs r3, r2 | r3 |= r2;
| if (r3 != r2) {
0x00004ffa beq 0x500c |
0x00004ffc mov r1, fp | r1 = fp;
0x00004ffe mov r0, r5 | r0 = r5;
0x00005000 bl 0x4ea8 | r0 = fcn_00004ea8 (r0, r1);
0x00005004 mov r4, r0 | r4 = r0;
0x00005006 cmp r0, 0 |
| if (r0 != 0) {
0x00005008 bne.w 0x51c4 | goto label_17;
| }
| }
0x0000500c movs r2, 0x80 | r2 = 0x80;
0x0000500e movs r1, 0 | r1 = 0;
0x00005010 mov r0, sl | r0 = sl;
0x00005012 blx 0x1954 | fcn_00001954 ();
0x00005016 mov r1, sl | r1 = sl;
0x00005018 mov r0, r5 | r0 = r5;
0x0000501a movs r2, 0 | r2 = 0;
0x0000501c movs r3, 0 | r3 = 0;
0x0000501e blx 0x1a24 | ext2fs_file_acl_block ();
0x00005022 ldr r0, [r5, 0x60] | r0 = *((r5 + 0x60));
0x00005024 cmp r0, 0 |
| if (r0 == 0) {
0x00005026 beq.w 0x5174 | goto label_18;
| }
| label_6:
0x0000502a ldr r3, [r5, 0x10] | r3 = *((r5 + 0x10));
0x0000502c movs r1, 1 | r1 = 1;
0x0000502e strh.w r1, [sp, 0x32] | var_32h = r1;
0x00005032 movw r1, 0x8180 | r1 = 0x8180;
0x00005036 vdup.32 d16, r0 | __asm ("vdup.32 d16, r0");
0x0000503a ldr r2, [r3, 0x60] | r2 = *((r3 + 0x60));
0x0000503c ldr r3, [sp, 0x38] | r3 = var_38h;
0x0000503e strh.w r1, [sp, 0x18] | var_18h = r1;
0x00005042 lsls r2, r2, 0x19 | r2 <<= 0x19;
0x00005044 str r0, [sp, 0x28] | var_28h = r0;
0x00005046 orr r1, r3, 0x10 | r1 = r3 | 0x10;
0x0000504a it mi |
| if (r2 >= r2) {
0x0000504c orrmi r3, r3, 0x80000 | r3 |= 0x80000;
| }
0x00005050 str r1, [sp, 0x38] | var_38h = r1;
0x00005052 it mi |
| if (r2 >= r2) {
0x00005054 orrmi r3, r3, 0x10 | r3 |= 0x10;
| }
0x00005058 mov r2, sl | r2 = sl;
0x0000505a mov r1, fp | r1 = fp;
0x0000505c mov r0, r5 | r0 = r5;
0x0000505e vstr d16, [sp, 0x20] | __asm ("vstr d16, [sp, 0x20]");
0x00005062 it mi |
| if (r2 >= r2) {
0x00005064 strmi r3, [sp, 0x38] | var_38h = r3;
| }
0x00005066 blx 0x1bb0 | r0 = gethostname ();
0x0000506a mov r4, r0 | r4 = r0;
0x0000506c cmp r0, 0 |
| if (r0 != 0) {
0x0000506e bne.w 0x51ca | goto label_19;
| }
0x00005072 ldr r3, [pc, 0x190] |
0x00005074 movs r2, 3 | r2 = 3;
0x00005076 ldr r1, [sp, 0x14] | r1 = maxsize;
0x00005078 mov r0, r5 | r0 = r5;
0x0000507a str.w r2, [sb, 8] | __asm ("str.w r2, [sb, 8]");
0x0000507c movs r0, 8 | r0 = 8;
0x0000507e add r3, pc | r3 = 0xa288;
0x00005080 str.w r3, [sb, 0x20] | __asm ("str.w r3, [sb, 0x20]");
0x00005084 ldr r3, [pc, 0x180] |
0x00005086 str.w r1, [sb, 0x14] | __asm ("str.w r1, [sb, 0x14]");
0x0000508a add r3, pc | r3 = 0xa296;
0x0000508c str.w r3, [sb, 0x1c] | __asm ("str.w r3, [sb, 0x1c]");
0x00005090 add r3, sp, 0x10 | r3 += timeptr;
0x00005092 blx 0x1c10 | r0 = strftime (r0, r1, r2, r3);
0x00005096 mov r4, r0 | r4 = r0;
0x00005098 cmp r0, 0 |
| if (r0 != 0) {
0x0000509a bne 0x514e | goto label_20;
| }
0x0000509c ldr r3, [sp, 0x10] | r3 = timeptr;
0x0000509e movs r2, 0x28 | r2 = 0x28;
0x000050a0 mov r1, r0 | r1 = r0;
0x000050a2 str.w r0, [sb, 0xc] | __asm ("str.w r0, [sb, 0xc]");
0x000050a6 str.w r6, [sb] | __asm ("str.w r6, [sb]");
0x000050aa add.w r0, sb, r2 | r0 = sb + r2;
0x000050ae str.w r3, [sb, 0x18] | __asm ("str.w r3, [sb, 0x18]");
0x000050b2 str.w r8, [sb, 4] | __asm ("str.w r8, [sb, 4]");
0x000050b6 blx 0x1954 | fcn_00001954 ();
0x000050ba ldr r3, [pc, 0x150] |
0x000050bc ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x000050be str.w r3, [sb, 0x24] | __asm ("str.w r3, [sb, 0x24]");
0x000050c2 ldr r3, [r3, 8] | r3 = *(0x5216);
0x000050c4 cmp r3, 0 |
0x000050c6 beq.w 0x4faa |
| } while (r3 == 0);
0x000050ca mov r0, sb | r0 = sb;
0x000050cc blx r3 | r0 = uint32_t (*r3)(uint32_t) (r0);
0x000050ce cmp r0, 0 |
| if (r0 >= 0) {
0x000050d0 bge.w 0x4faa | goto label_3;
| }
0x000050d4 ldr r3, [pc, 0x138] |
0x000050d6 movw r0, 0x169 | r0 = 0x169;
0x000050da ldr r2, [pc, 0x138] | r2 = *(0x5216);
0x000050dc movs r4, 5 | r4 = 5;
0x000050de add r3, pc | r3 = 0xa2f2;
0x000050e0 adds r3, 0x40 | r3 += 0x40;
0x000050e2 ldr r1, [r7, r2] | r1 = *((r7 + r2));
0x000050e4 str r3, [sp, 4] | var_4h = r3;
0x000050e6 ldr r2, [pc, 0x130] |
0x000050e8 ldr r3, [pc, 0x130] |
0x000050ea str r0, [sp] | *(sp) = r0;
0x000050ec add r2, pc | r2 = 0xa30a;
0x000050ee ldr r0, [r1] | r0 = *(r1);
0x000050f0 add r3, pc | r3 = 0xa310;
0x000050f2 movs r1, 1 | r1 = 1;
0x000050f4 blx 0x1bd4 | fputc (r0, r1);
0x000050f8 ldr r0, [sp, 0x10] | r0 = timeptr;
0x000050fa blx 0x1868 | ext2fs_file_close ();
| label_5:
0x000050fe ldr r1, [sp, 0x14] | r1 = maxsize;
0x00005100 cmp r1, 0 |
| if (r1 == 0) {
0x00005102 beq.w 0x4faa | goto label_3;
| }
| label_7:
0x00005106 mov r0, r5 | r0 = r5;
0x00005108 bl 0x4ea8 | fcn_00004ea8 (r0, r1);
0x0000510c b 0x4faa | goto label_3;
| label_14:
0x0000510e movs r3, 3 | r3 = 3;
0x00005110 str r3, [sp, 0x14] | maxsize = r3;
0x00005112 b 0x4fcc | goto label_4;
| label_13:
0x00005114 ldr.w r3, [r3, 0x26c] | r3 = *((r3 + 0x26c));
0x00005118 str r3, [sp, 0x14] | maxsize = r3;
0x0000511a cmp r3, 0 |
| if (r3 != 0) {
0x0000511c bne.w 0x4fcc | goto label_4;
| }
0x00005120 add r2, sp, 0x14 | r2 += maxsize;
0x00005122 mov r1, r6 | r1 = r6;
0x00005124 str r2, [sp] | *(sp) = r2;
0x00005126 mov r0, r5 | r0 = r5;
0x00005128 movw r2, 0x8180 | r2 = 0x8180;
0x0000512c blx 0x1cf4 | r0 = strcmp (r0, r1);
0x00005130 mov r4, r0 | r4 = r0;
0x00005132 cmp r0, 0 |
| if (r0 != 0) {
0x00005134 bne.w 0x4faa | goto label_3;
| }
0x00005138 mov r3, r0 | r3 = r0;
0x0000513a ldr r1, [sp, 0x14] | r1 = maxsize;
0x0000513c movs r2, 1 | r2 = 1;
0x0000513e mov r0, r5 | r0 = r5;
0x00005140 blx 0x18a4 | ext2fs_inode_alloc_stats2 ();
0x00005144 ldr r3, [r5, 8] | r3 = *((r5 + 8));
0x00005146 orr r3, r3, 0x12 | r3 |= 0x12;
0x0000514a str r3, [r5, 8] | *((r5 + 8)) = r3;
0x0000514c b 0x4fcc | goto label_4;
| label_20:
0x0000514e ldr r2, [pc, 0xc4] | r2 = *(0x5216);
0x00005150 ldr r3, [pc, 0xcc] |
0x00005152 ldr r1, [r7, r2] | r1 = *((r7 + r2));
0x00005154 movw r2, 0x15d | r2 = 0x15d;
0x00005158 add r3, pc | r3 = 0xa37c;
0x0000515a adds r3, 0x40 | r3 += 0x40;
0x0000515c strd r3, r0, [sp, 4] | __asm ("strd r3, r0, [var_4h]");
0x00005160 ldr r3, [pc, 0xc0] |
0x00005162 ldr r0, [r1] | r0 = *(r1);
0x00005164 movs r1, 1 | r1 = 1;
0x00005166 str r2, [sp] | *(sp) = r2;
0x00005168 ldr r2, [pc, 0xbc] |
0x0000516a add r3, pc | r3 = 0xa392;
0x0000516c add r2, pc | r2 = 0xa398;
0x0000516e blx 0x1bd4 | fputc (r0, r1);
0x00005172 b 0x50fe | goto label_5;
| label_18:
0x00005174 blx 0x1b68 | ext2fs_get_mem ();
0x00005178 b 0x502a | goto label_6;
| label_16:
0x0000517a ldr r2, [pc, 0x98] | r2 = *(0x5216);
0x0000517c movs r1, 1 | r1 = 1;
0x0000517e ldr r3, [pc, 0xac] |
0x00005180 ldr r6, [r7, r2] | r6 = *((r7 + r2));
0x00005182 add r3, pc | r3 = 0xa3b4;
0x00005184 ldr r2, [pc, 0xa8] |
0x00005186 adds r3, 0x28 | r3 += 0x28;
0x00005188 ldr r0, [r6] | r0 = *(r6);
0x0000518a str r3, [sp, 4] | var_4h = r3;
0x0000518c mov.w r3, 0x116 | r3 = 0x116;
0x00005190 str r3, [sp] | *(sp) = r3;
0x00005192 add r2, pc | r2 = 0xa3c6;
0x00005194 ldr r3, [pc, 0x9c] |
0x00005196 add r3, pc | r3 = 0xa3ce;
0x00005198 blx 0x1bd4 | fputc (r0, r1);
| label_8:
0x0000519c ldr r2, [pc, 0x98] |
0x0000519e mov.w r3, 0x152 | r3 = 0x152;
0x000051a2 ldr r0, [r6] | r0 = *(r6);
0x000051a4 movs r1, 1 | r1 = 1;
0x000051a6 str r3, [sp] | *(sp) = r3;
0x000051a8 add r2, pc | r2 = 0xa3e4;
0x000051aa ldr r3, [pc, 0x90] |
0x000051ac adds r2, 0x40 | r2 += 0x40;
0x000051ae str r2, [sp, 4] | var_4h = r2;
0x000051b0 ldr r2, [pc, 0x8c] |
0x000051b2 add r3, pc | r3 = 0xa3f4;
0x000051b4 add r2, pc | r2 = 0xa3f8;
0x000051b6 blx 0x1bd4 | fputc (r0, r1);
0x000051ba ldr r1, [sp, 0x14] | r1 = maxsize;
0x000051bc cmp r1, 0 |
| if (r1 == 0) {
0x000051be beq.w 0x4faa | goto label_3;
| }
0x000051c2 b 0x5106 | goto label_7;
| label_17:
0x000051c4 ldr r3, [pc, 0x4c] | r3 = *(0x5214);
0x000051c6 ldr r6, [r7, r3] | r6 = *((r7 + r3));
0x000051c8 b 0x519c | goto label_8;
| label_19:
0x000051ca ldr r2, [pc, 0x48] | r2 = *(0x5216);
0x000051cc movs r1, 1 | r1 = 1;
0x000051ce ldr r3, [pc, 0x74] |
0x000051d0 ldr r6, [r7, r2] | r6 = *((r7 + r2));
0x000051d2 add r3, pc | r3 = 0xa41c;
0x000051d4 ldr r2, [pc, 0x70] |
0x000051d6 adds r3, 0x28 | r3 += 0x28;
0x000051d8 ldr r0, [r6] | r0 = *(r6);
0x000051da str r3, [sp, 4] | var_4h = r3;
0x000051dc mov.w r3, 0x12c | r3 = 0x12c;
0x000051e0 str r3, [sp] | *(sp) = r3;
0x000051e2 add r2, pc | r2 = 0xa42e;
0x000051e4 ldr r3, [pc, 0x64] |
0x000051e6 str r4, [sp, 8] | var_8h = r4;
0x000051e8 add r3, pc | r3 = 0xa438;
0x000051ea blx 0x1bd4 | fputc (r0, r1);
0x000051ee b 0x519c | goto label_8;
| label_15:
0x000051f0 blx 0x1bc8 | fprintf_chk ()
0x000051f4 ldr r6, [pc, 0x218] | r6 = *(0x5410);
0x000051f6 movs r0, r0 |
0x000051f8 lsls r0, r2, 7 | r0 = r2 << 7;
0x000051fa movs r0, r0 |
0x000051fc ldr r6, [pc, 0x1e8] | r6 = *(0x53e8);
0x000051fe movs r0, r0 |
0x00005200 ldr r6, [pc, 0x148] | r6 = *(0x534c);
0x00005202 movs r0, r0 |
0x00005204 ldc2 p15, c15, [r3], -0x3fc | __asm ("ldc2 p15, c15, [r3], -0x3fc");
0x00005208 invalid |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/e2image @ 0x6334 */
| #include <stdint.h>
|
; (fcn) fcn.00006334 () | void fcn_00006334 (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_8h;
| FILE * stream;
| int16_t var_18h_2;
| int16_t var_1ch_2;
| int16_t var_20h;
| int16_t var_24h;
| int16_t var_28h;
| int16_t var_2ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00006334 svcmi 0xf0e92d | __asm ("svcmi 0xf0e92d");
0x00006338 mov sb, r2 | sb = r2;
0x0000633a ldr r2, [pc, 0x350] |
0x0000633c mov sl, r3 | sl = r3;
0x0000633e sub sp, 0x34 |
0x00006340 mov r6, r0 | r6 = r0;
0x00006342 ldr r3, [pc, 0x34c] | r3 = *(0x6692);
0x00006344 mov r8, r1 | r8 = r1;
0x00006346 add r2, pc | r2 = 0xc9d8;
0x00006348 movs r1, 1 | r1 = 1;
0x0000634a mov.w r0, 0x400 | r0 = 0x400;
0x0000634e ldr r3, [r2, r3] |
0x00006350 ldr r3, [r3] | r3 = *(0xc9d8);
0x00006352 str r3, [sp, 0x2c] | var_2ch = r3;
0x00006354 mov.w r3, 0 | r3 = 0;
0x00006358 ldr r3, [pc, 0x338] |
0x0000635a add r3, pc | r3 = 0xc9f2;
0x0000635c str r3, [sp, 0x14] | stream = r3;
0x0000635e blx 0x192c | r0 = fcn_0000192c ();
0x00006362 cmp r0, 0 |
| if (r0 == 0) {
0x00006364 beq.w 0x65ee | goto label_12;
| }
0x00006368 ldr.w r4, [sb] | r4 = *(sb);
0x0000636c mov r5, r0 | r5 = r0;
0x0000636e cmp r4, 0 |
| if (r4 == 0) {
0x00006370 beq.w 0x64c6 | goto label_13;
| }
0x00006374 mov r1, r4 | r1 = r4;
0x00006376 mov r2, r0 | r2 = r0;
0x00006378 mov r0, r6 | r0 = r6;
0x0000637a movs r4, 0 | r4 = 0;
0x0000637c bl 0x5c54 | fcn_00005c54 (r0, r1);
| label_1:
0x00006380 ldr.w r3, [r8, 4] | r3 = *((r8 + 4));
0x00006384 rsb.w r2, sl, 3 | r2 = 3 - sl;
0x00006388 lsls r2, r2, 3 | r2 <<= 3;
0x0000638a str r2, [sp, 0x18] | var_18h_2 = r2;
0x0000638c lsrs r3, r2 | r3 >>= r2;
0x0000638e uxtb r3, r3 | r3 = (int8_t) r3;
0x00006390 ldr.w r3, [r5, r3, lsl 2] | offset_0 = r3 << 2;
| r3 = *((r5 + offset_0));
0x00006394 str r3, [sp, 0x28] | var_28h = r3;
0x00006396 cmp r3, 0 |
| if (r3 != 0) {
0x00006398 bne.w 0x64e4 | goto label_14;
| }
0x0000639c cmp.w sl, 3 |
| if (sl != 3) {
0x000063a0 bne.w 0x65a0 | goto label_15;
| }
0x000063a4 mov.w r0, 0x400 | r0 = 0x400;
0x000063a8 blx 0x1ba4 | r0 = ext2fs_write_new_inode ();
0x000063ac mov sl, r0 | sl = r0;
0x000063ae cmp r0, 0 |
| if (r0 == 0) {
0x000063b0 beq.w 0x6654 | goto label_16;
| }
0x000063b4 movs r7, 1 | r7 = 1;
| label_2:
0x000063b6 mov.w r2, 0x400 | r2 = 0x400;
0x000063ba movs r1, 0 | r1 = 0;
0x000063bc mov r0, sl | r0 = sl;
0x000063be blx 0x1954 | fcn_00001954 ();
0x000063c2 ldr.w fp, [r6, 0x38] | fp = *((r6 + 0x38));
0x000063c6 cmp.w fp, 0 |
| if (fp == 0) {
0x000063ca beq.w 0x65c2 | goto label_17;
| }
0x000063ce mov r2, sl | r2 = sl;
0x000063d0 mov r1, fp | r1 = fp;
0x000063d2 mov r0, r6 | r0 = r6;
0x000063d4 bl 0x5c54 | fcn_00005c54 (r0, r1);
0x000063d8 ldrh.w r3, [sl, 8] | r3 = *((sl + 8));
0x000063dc str.w fp, [sp, 0x1c] | __asm ("str.w fp, [var_1ch_2]");
0x000063e0 adds r2, r3, 1 | r2 = r3 + 1;
| label_9:
0x000063e2 ldr r4, [r6, 0x3c] | r4 = *((r6 + 0x3c));
0x000063e4 mov.w r0, 0x3f0 | r0 = 0x3f0;
0x000063e8 strd r2, r3, [sp, 0x20] | __asm ("strd r2, r3, [var_20h]");
0x000063ec mov r1, r4 | r1 = r4;
0x000063ee bl 0x6d58 | fcn_00006d58 (r0, r1, r2);
0x000063f2 ldr r2, [sp, 0x20] | r2 = var_20h;
0x000063f4 cmp r2, r0 |
| if (r2 >= r0) {
0x000063f6 bge.w 0x6530 | goto label_18;
| }
0x000063fa ldr r3, [sp, 0x24] | r3 = var_24h;
0x000063fc add.w ip, sl, 0x10 |
0x00006400 adds r3, 1 | r3++;
0x00006402 strh.w r3, [sl, 8] | *((sl + 8)) = r3;
| label_3:
0x00006406 add.w r1, sl, 0xf | r1 = sl + 0xf;
0x0000640a add r1, r4 | r1 += r4;
0x0000640c cmp r4, 0 |
| if (r4 == 0) {
0x0000640e beq.w 0x6616 | goto label_19;
| }
0x00006412 mov.w lr, 0 | lr = 0;
| label_0:
0x00006416 add.w r3, ip, -1 | r3 = ip + -1;
0x0000641a b 0x6422 |
| while (r2 == 0) {
0x0000641c cmp r1, r3 |
| if (r1 == r3) {
0x0000641e beq.w 0x655e | goto label_20;
| }
0x00006422 ldrb r2, [r3, 1]! | r2 = *((r3 += 1));
0x00006426 cmp r2, 0 |
0x00006428 beq 0x641c |
| }
0x0000642a add.w lr, lr, 1 | lr++;
0x0000642e add ip, r4 |
0x00006430 cmp lr, r0 |
0x00006432 add r1, r4 | r1 += r4;
| if (lr != r0) {
0x00006434 bne 0x6416 | goto label_0;
| }
0x00006436 mov r4, lr | r4 = lr;
| label_4:
0x00006438 ldr r2, [sp, 0x14] | r2 = stream;
0x0000643a movs r1, 1 | r1 = 1;
0x0000643c ldr r3, [pc, 0x258] | r3 = *(0x6698);
0x0000643e ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x00006440 ldr r2, [pc, 0x258] |
0x00006442 ldr r0, [r3] | r0 = *(0x6698);
0x00006444 ldr r3, [pc, 0x258] |
0x00006446 add r2, pc | r2 = 0xcae6;
0x00006448 add r3, pc | r3 = 0xcaec;
0x0000644a adds r3, 0x68 | r3 += 0x68;
0x0000644c str r3, [sp, 4] | var_4h = r3;
0x0000644e movs r3, 0xf1 | r3 = 0xf1;
0x00006450 str r3, [sp] | *(sp) = r3;
0x00006452 ldr r3, [pc, 0x250] |
0x00006454 add r3, pc | r3 = 0xcafe;
0x00006456 blx 0x1bd4 | fputc (r0, r1);
| label_5:
0x0000645a mov r2, sl | r2 = sl;
0x0000645c mov r1, fp | r1 = fp;
0x0000645e mov r0, r6 | r0 = r6;
0x00006460 bl 0x5cdc | fcn_00005cdc (r0, r1);
0x00006464 ldr r3, [sp, 0x1c] | r3 = var_1ch_2;
0x00006466 mov r0, sl | r0 = sl;
0x00006468 ldr r2, [r6, 0x3c] | r2 = *((r6 + 0x3c));
0x0000646a lsls r3, r3, 0xa | r3 <<= 0xa;
0x0000646c adds r3, 0x10 | r3 += 0x10;
0x0000646e mla r3, r2, r4, r3 | __asm ("mla r3, r2, r4, r3");
0x00006472 movs r4, 0 | r4 = 0;
0x00006474 str.w r4, [r8, 0x4c] | __asm ("str.w r4, [r8, 0x4c]");
0x00006478 str.w r3, [r8, 0x48] | __asm ("str.w r3, [r8, 0x48]");
0x0000647c blx 0x19d0 | read (r0, r1, r2);
0x00006480 str.w fp, [sp, 0x28] | __asm ("str.w fp, [var_28h]");
0x00006482 add sp, 0xa0 |
| if (r7 == 0) {
0x00006484 cbz r7, 0x64a2 | goto label_6;
| }
0x00006486 mov r7, r4 | r7 = r4;
| label_7:
0x00006488 ldr r2, [sp, 0x18] | r2 = var_18h_2;
0x0000648a mov r0, r6 | r0 = r6;
0x0000648c ldr.w r3, [r8, 4] | r3 = *((r8 + 4));
0x00006490 ldr.w r1, [sb] | r1 = *(sb);
0x00006494 lsrs r3, r2 | r3 >>= r2;
0x00006496 mov r2, r5 | r2 = r5;
0x00006498 uxtb r3, r3 | r3 = (int8_t) r3;
0x0000649a str.w fp, [r5, r3, lsl 2] | __asm ("str.w fp, [r5, r3, lsl 2]");
0x0000649e bl 0x5cdc | fcn_00005cdc (r0, r1);
| do {
| label_6:
0x000064a2 mov r0, r5 | r0 = r5;
0x000064a4 blx 0x19d0 | read (r0, r1, r2);
| label_10:
0x000064a8 ldr r2, [pc, 0x1fc] |
0x000064aa ldr r3, [pc, 0x1e4] | r3 = *(0x6692);
0x000064ac add r2, pc | r2 = 0xcb58;
0x000064ae ldr r3, [r2, r3] | r3 = *(0xcb58);
0x000064b0 ldr r2, [r3] | r2 = *(0xcb58);
0x000064b2 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x000064b4 eors r2, r3 | r2 ^= r3;
0x000064b6 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x000064ba bne.w 0x6686 | goto label_21;
| }
0x000064be mov r0, r7 | r0 = r7;
0x000064c0 add sp, 0x34 |
0x000064c2 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_13:
0x000064c6 mov r0, r6 | r0 = r6;
0x000064c8 bl 0x5d58 | r0 = fcn_00005d58 (r0);
0x000064cc subs r7, r0, 0 | r7 = r0 - 0;
0x000064ce blt 0x64a2 |
| } while (r7 < r0);
0x000064d0 mov r1, r4 | r1 = r4;
0x000064d2 mov.w r2, 0x400 | r2 = 0x400;
0x000064d6 mov r0, r5 | r0 = r5;
0x000064d8 str.w r7, [sb] | __asm ("str.w r7, [sb]");
0x000064dc movs r4, 1 | r4 = 1;
0x000064de blx 0x1954 | fcn_00001954 ();
0x000064e2 b 0x6380 | goto label_1;
| label_14:
0x000064e4 cmp.w sl, 3 |
| if (sl != 3) {
0x000064e8 bne 0x6568 | goto label_22;
| }
0x000064ea ldr r2, [pc, 0x1ac] | r2 = *(0x669a);
0x000064ec ldr r1, [sp, 0x14] | r1 = stream;
0x000064ee ldr r7, [pc, 0x1bc] |
0x000064f0 ldr.w fp, [pc, 0x1bc] |
0x000064f4 ldr r1, [r1, r2] | r1 = *((r1 + r2));
0x000064f6 movw r2, 0x11b | r2 = 0x11b;
0x000064fa add r7, pc | r7 = 0xcbac;
0x000064fc str r2, [sp] | *(sp) = r2;
0x000064fe add.w r2, r7, 0x58 | r2 = r7 + 0x58;
0x00006502 str r3, [sp, 8] | var_8h = r3;
0x00006504 ldr r3, [r1] | r3 = *(r1);
0x00006506 add fp, pc | fp = 0xcbba;
0x00006508 str r2, [sp, 4] | var_4h = r2;
0x0000650a ldr r2, [pc, 0x1a8] |
0x0000650c mov r0, r3 | r0 = r3;
0x0000650e str r1, [sp, 0x20] | var_20h = r1;
0x00006510 str r3, [sp, 0x1c] | var_1ch_2 = r3;
0x00006512 movs r1, 1 | r1 = 1;
0x00006514 add r2, pc | r2 = 0xcbce;
0x00006516 mov r3, fp | r3 = fp;
0x00006518 blx 0x1bd4 | fputc (r0, r1);
0x0000651c mov.w r0, 0x400 | r0 = 0x400;
0x00006520 blx 0x1ba4 | r0 = ext2fs_write_new_inode ();
0x00006524 mov sl, r0 | sl = r0;
0x00006526 cmp r0, 0 |
| if (r0 == 0) {
0x00006528 beq.w 0x662e | goto label_23;
| }
0x0000652c movs r7, 0 | r7 = 0;
0x0000652e b 0x63b6 | goto label_2;
| label_18:
0x00006530 mov r2, fp | r2 = fp;
0x00006532 mov r1, sl | r1 = sl;
0x00006534 mov r0, r6 | r0 = r6;
0x00006536 bl 0x5e20 | fcn_00005e20 (r0, r1, r2);
0x0000653a ldr r4, [r6, 0x3c] | r4 = *((r6 + 0x3c));
0x0000653c mov.w r0, 0x3f0 | r0 = 0x3f0;
0x00006540 mov r1, r4 | r1 = r4;
0x00006542 bl 0x6d58 | fcn_00006d58 (r0, r1, r2);
0x00006546 ldrh.w r3, [sl, 8] | r3 = *((sl + 8));
0x0000654a add.w ip, sl, 0x10 |
0x0000654e adds r3, 1 | r3++;
0x00006550 strh.w r3, [sl, 8] | *((sl + 8)) = r3;
0x00006554 cmp r0, 0 |
| if (r0 != 0) {
0x00006556 bne.w 0x6406 | goto label_3;
| }
0x0000655a mov r4, r0 | r4 = r0;
0x0000655c b 0x6438 | goto label_4;
| label_20:
0x0000655e mov r4, lr | r4 = lr;
| label_11:
0x00006560 cmp lr, r0 |
| if (lr != r0) {
0x00006562 bne.w 0x645a | goto label_5;
| }
0x00006564 add r7, sp, 0x1e8 | r7 = sp + 0x1e8;
0x00006566 b 0x6438 | goto label_4;
| label_22:
0x00006568 add.w r3, sl, 1 | r3 = sl + 1;
0x0000656c mov r1, r8 | r1 = r8;
0x0000656e add r2, sp, 0x28 | r2 += var_28h;
0x00006570 mov r0, r6 | r0 = r6;
0x00006572 bl 0x6334 | r0 = fcn_00006334 (r0, r1, r2, r3);
0x00006576 ands.w r4, r4, r0, lsr 31 | r4 &= (r0 >> 31);
0x0000657a mov r7, r0 | r7 = r0;
| if (r4 == r4) {
0x0000657c beq 0x64a2 | goto label_6;
| }
| label_8:
0x0000657e ldr r3, [r6, 0x34] | r3 = *((r6 + 0x34));
0x00006580 mov r2, r5 | r2 = r5;
0x00006582 ldr.w r1, [sb] | r1 = *(sb);
0x00006586 mov r0, r6 | r0 = r6;
0x00006588 str r3, [r5] | *(r5) = r3;
0x0000658a movs r3, 0 | r3 = 0;
0x0000658c str r3, [r5, 4] | *((r5 + 4)) = r3;
0x0000658e strh r3, [r5, 8] | *((r5 + 8)) = r3;
0x00006590 ldr r3, [r6, 0xc] | r3 = *((r6 + 0xc));
0x00006592 str r1, [r6, 0x34] | *((r6 + 0x34)) = r1;
0x00006594 orr r3, r3, 1 | r3 |= 1;
0x00006598 str r3, [r6, 0xc] | *((r6 + 0xc)) = r3;
0x0000659a bl 0x5cdc | fcn_00005cdc (r0, r1);
0x0000659e b 0x64a2 | goto label_6;
| label_15:
0x000065a0 add.w r3, sl, 1 | r3 = sl + 1;
0x000065a4 add r2, sp, 0x28 | r2 += var_28h;
0x000065a6 mov r1, r8 | r1 = r8;
0x000065a8 mov r0, r6 | r0 = r6;
0x000065aa bl 0x6334 | r0 = fcn_00006334 (r0, r1, r2, r3);
0x000065ae subs r7, r0, 0 | r7 = r0 - 0;
0x000065b0 it ge |
| if (r7 >= r0) {
0x000065b2 ldrge fp, [sp, 0x28] | fp = var_28h;
| goto label_24;
| }
| if (r7 >= r0) {
| label_24:
0x000065b6 bge.w 0x6488 | goto label_7;
| }
0x000065ba cmp r4, 0 |
| if (r4 == 0) {
0x000065bc beq.w 0x64a2 | goto label_6;
| }
0x000065c0 b 0x657e | goto label_8;
| label_17:
0x000065c2 mov r0, r6 | r0 = r6;
0x000065c4 bl 0x5d58 | r0 = fcn_00005d58 (r0);
0x000065c8 subs r3, r0, 0 | r3 = r0 - 0;
0x000065ca str r3, [sp, 0x1c] | var_1ch_2 = r3;
| if (r3 >= r0) {
0x000065cc blt 0x661a |
0x000065ce mov r1, fp | r1 = fp;
0x000065d0 mov.w r2, 0x400 | r2 = 0x400;
0x000065d4 mov r0, sl | r0 = sl;
0x000065d6 blx 0x1954 | fcn_00001954 ();
0x000065da ldr r3, [r6, 0xc] | r3 = *((r6 + 0xc));
0x000065dc ldr r2, [sp, 0x1c] | r2 = var_1ch_2;
0x000065de orr r3, r3, 1 | r3 |= 1;
0x000065e2 mov fp, r2 |
0x000065e4 str r2, [r6, 0x38] | *((r6 + 0x38)) = r2;
0x000065e6 str r3, [r6, 0xc] | *((r6 + 0xc)) = r3;
0x000065e8 movs r2, 1 | r2 = 1;
0x000065ea movs r3, 0 | r3 = 0;
0x000065ec b 0x63e2 | goto label_9;
| label_12:
0x000065ee ldr r2, [pc, 0xc8] |
0x000065f0 movs r4, 0x1b | r4 = 0x1b;
0x000065f2 ldr r1, [pc, 0xa4] | r1 = *(0x669a);
0x000065f4 mvn r7, 0xb | r7 = ~0xb;
0x000065f8 ldr r0, [sp, 0x14] | r0 = stream;
0x000065fa add r2, pc | r2 = 0xccb8;
0x000065fc ldr r3, [pc, 0xbc] |
0x000065fe adds r2, 0x18 | r2 += 0x18;
0x00006600 ldr r0, [r0, r1] | r0 = *((r0 + r1));
0x00006602 movs r1, 1 | r1 = 1;
0x00006604 str r2, [sp, 4] | var_4h = r2;
0x00006606 add r3, pc | r3 = 0xccc6;
0x00006608 ldr r2, [pc, 0xb4] |
0x0000660a str r4, [sp] | *(sp) = r4;
0x0000660c ldr r0, [r0] | r0 = *(r0);
0x0000660e add r2, pc | r2 = 0xccd2;
0x00006610 blx 0x1bd4 | fputc (r0, r1);
0x00006614 b 0x64a8 | goto label_10;
| label_19:
0x00006616 mov lr, r4 | lr = r4;
0x00006618 b 0x6560 | goto label_11;
| }
0x0000661a mov r0, sl | r0 = sl;
0x0000661c blx 0x19d0 | read (r0, r1, r2);
0x00006620 ldr r7, [sp, 0x1c] | r7 = var_1ch_2;
0x00006622 str.w fp, [sp, 0x28] | __asm ("str.w fp, [var_28h]");
0x00006626 cmp r4, 0 |
| if (r4 == 0) {
0x00006628 beq.w 0x64a2 | goto label_6;
| }
0x0000662c b 0x657e | goto label_8;
| label_23:
0x0000662e ldr r3, [sp, 0x20] | r3 = var_20h;
0x00006630 movs r2, 0x1b | r2 = 0x1b;
0x00006632 adds r7, 0x18 | r7 += 0x18;
0x00006634 movs r1, 1 | r1 = 1;
0x00006636 ldr r0, [r3] | r0 = *(r3);
0x00006638 mov r3, fp | r3 = fp;
0x0000663a str r2, [sp] | *(sp) = r2;
0x0000663c ldr r2, [pc, 0x84] |
0x0000663e str r7, [sp, 4] | var_4h = r7;
0x00006640 mvn r7, 0xb | r7 = ~0xb;
0x00006644 add r2, pc | r2 = 0xcd0c;
0x00006646 blx 0x1bd4 | fputc (r0, r1);
0x0000664a str.w sl, [sp, 0x28] | __asm ("str.w sl, [var_28h]");
0x0000664e cmp r4, 0 |
| if (r4 != 0) {
0x00006650 bne 0x657e | goto label_8;
| }
0x00006652 b 0x64a2 | goto label_6;
| label_16:
0x00006654 ldr r2, [sp, 0x14] | r2 = stream;
0x00006656 movs r1, 1 | r1 = 1;
0x00006658 ldr r3, [pc, 0x3c] | r3 = *(0x6698);
0x0000665a mvn r7, 0xb | r7 = ~0xb;
0x0000665e ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x00006660 ldr r2, [pc, 0x64] |
0x00006662 ldr r0, [r3] | r0 = *(0x6698);
0x00006664 ldr r3, [pc, 0x64] |
0x00006666 add r2, pc | r2 = 0xcd32;
0x00006668 add r3, pc | r3 = 0xcd38;
0x0000666a adds r3, 0x18 | r3 += 0x18;
0x0000666c str r3, [sp, 4] | var_4h = r3;
0x0000666e movs r3, 0x1b | r3 = 0x1b;
0x00006670 str r3, [sp] | *(sp) = r3;
0x00006672 ldr r3, [pc, 0x5c] |
0x00006674 add r3, pc | r3 = 0xcd4a;
0x00006676 blx 0x1bd4 | fputc (r0, r1);
0x0000667a str.w sl, [sp, 0x28] | __asm ("str.w sl, [var_28h]");
0x0000667e cmp r4, 0 |
| if (r4 == 0) {
0x00006680 beq.w 0x64a2 | goto label_6;
| }
0x00006684 b 0x657e | goto label_8;
| label_21:
0x00006686 blx 0x1bc8 | fprintf_chk ()
0x0000668a nop |
0x0000668c subs r2, 0xba | r2 -= 0xba;
0x0000668e movs r0, r0 |
0x00006690 lsls r0, r2, 7 | r0 = r2 << 7;
0x00006692 movs r0, r0 |
0x00006694 subs r2, 0xa6 | r2 -= 0xa6;
0x00006696 movs r0, r0 |
0x00006698 lsls r4, r5, 7 | r4 = r5 << 7;
0x0000669a movs r0, r0 |
0x0000669c movs r5, 0x7e | r5 = 0x7e;
0x0000669e movs r0, r0 |
0x000066a0 movs r6, 0xc4 | r6 = 0xc4;
0x000066a2 movs r0, r0 |
0x000066a4 movs r3, 0x94 | r3 = 0x94;
0x000066a6 movs r0, r0 |
0x000066a8 subs r1, 0x54 | r1 -= 0x54;
0x000066aa movs r0, r0 |
0x000066ac movs r6, 0x12 | r6 = 0x12;
0x000066ae movs r0, r0 |
0x000066b0 movs r2, 0xe2 | r2 = 0xe2;
0x000066b2 movs r0, r0 |
0x000066b4 movs r4, 0x68 | r4 = 0x68;
0x000066b6 movs r0, r0 |
0x000066b8 movs r5, 0x12 | r5 = 0x12;
0x000066ba movs r0, r0 |
0x000066bc movs r1, 0xe2 | r1 = 0xe2;
0x000066be movs r0, r0 |
0x000066c0 movs r2, 0x76 | r2 = 0x76;
0x000066c2 movs r0, r0 |
0x000066c4 movs r2, 0x40 | r2 = 0x40;
0x000066c6 movs r0, r0 |
0x000066c8 movs r2, 0x1e | r2 = 0x1e;
0x000066ca movs r0, r0 |
0x000066cc movs r4, 0xa4 | r4 = 0xa4;
0x000066ce movs r0, r0 |
0x000066d0 movs r1, 0x74 | r1 = 0x74;
0x000066d2 movs r0, r0 |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/e2image @ 0x66d4 */
| #include <stdint.h>
|
; (fcn) fcn.000066d4 () | void fcn_000066d4 (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_14h_2;
| int16_t var_18h;
| int16_t var_1ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
| do {
0x000019cc invalid | void (*0x19d0)() ();
0x000066d4 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000066d8 mov r7, r2 | r7 = r2;
0x000066da ldr r2, [pc, 0x2a8] |
0x000066dc mov r8, r3 | r8 = r3;
0x000066de sub sp, 0x24 |
0x000066e0 mov r6, r0 | r6 = r0;
0x000066e2 ldr r3, [pc, 0x2a4] | r3 = *(0x698a);
0x000066e4 mov r4, r1 | r4 = r1;
0x000066e6 add r2, pc | r2 = 0xd070;
0x000066e8 ldr.w sl, [pc, 0x2a0] |
0x000066ec movs r1, 1 | r1 = 1;
0x000066ee mov.w r0, 0x400 | r0 = 0x400;
0x000066f2 ldr r3, [r2, r3] |
0x000066f4 add sl, pc | sl = 0xd084;
0x000066f6 ldr r3, [r3] | r3 = *(0xd070);
0x000066f8 str r3, [sp, 0x1c] | var_1ch = r3;
0x000066fa mov.w r3, 0 | r3 = 0;
0x000066fe blx 0x192c | r0 = fcn_0000192c ();
0x00006702 cmp r0, 0 |
| if (r0 == 0) {
0x00006704 beq.w 0x681a | goto label_4;
| }
0x00006708 mov r5, r0 | r5 = r0;
0x0000670a mov r2, r0 | r2 = r0;
0x0000670c ldr r1, [r7] | r1 = *(r7);
0x0000670e mov r0, r6 | r0 = r6;
0x00006710 bl 0x5c54 | fcn_00005c54 (r0, r1);
0x00006714 ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x00006716 rsb.w sb, r8, 3 | sb = 3 - r8;
0x0000671a lsl.w sb, sb, 3 | sb <<= 3;
0x0000671e cmp.w r8, 3 |
0x00006722 lsr.w r0, r0, sb | r0 >>= sb;
0x00006726 uxtb r0, r0 | r0 = (int8_t) r0;
0x00006728 ldr.w fp, [r5, r0, lsl 2] | offset_0 = r0 << 2;
| fp = *((r5 + offset_0));
0x0000672c str.w fp, [sp, 0x18] | __asm ("str.w fp, [var_18h]");
| if (r8 == 3) {
0x00006730 beq 0x6768 | goto label_5;
| }
0x00006732 add.w r3, r8, 1 | r3 = r8 + 1;
0x00006736 add r2, sp, 0x18 | r2 += var_18h;
0x00006738 mov r1, r4 | r1 = r4;
0x0000673a mov r0, r6 | r0 = r6;
0x0000673c bl 0x66d4 | fcn_000066d4 (r0, r1, r2, r3);
0x00006740 ldr r3, [sp, 0x18] | r3 = var_18h;
0x00006742 cmp r3, 0 |
| if (r3 == 0) {
0x00006744 beq 0x67ec | goto label_6;
| }
| label_1:
0x00006746 ldr r2, [pc, 0x248] |
0x00006748 ldr r3, [pc, 0x23c] | r3 = *(0x6988);
0x0000674a add r2, pc | r2 = 0xd0e0;
0x0000674c ldr r3, [r2, r3] | r3 = *(0xd0e0);
0x0000674e ldr r2, [r3] | r2 = *(0xd0e0);
0x00006750 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x00006752 eors r2, r3 | r2 ^= r3;
0x00006754 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00006758 bne.w 0x6980 | goto label_7;
| }
0x0000675c mov r0, r5 | r0 = r5;
0x0000675e add sp, 0x24 |
0x00006760 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00006764 b.w 0x19cc |
| } while (1);
| label_5:
0x00006768 movs r1, 1 | r1 = 1;
0x0000676a mov.w r0, 0x400 | r0 = 0x400;
0x0000676e blx 0x192c | r0 = fcn_0000192c ();
0x00006772 mov r8, r0 | r8 = r0;
0x00006774 cmp r0, 0 |
| if (r0 == 0) {
0x00006776 beq.w 0x691a | goto label_8;
| }
0x0000677a ldr r3, [r4, 0x48] | r3 = *((r4 + 0x48));
0x0000677c ldr r2, [r4, 0x4c] | r2 = *((r4 + 0x4c));
0x0000677e lsrs r3, r3, 0xa | r3 >>= 0xa;
0x00006780 orr.w r3, r3, r2, lsl 22 | r3 |= (r2 << 22);
0x00006784 asrs r2, r2, 0xa | r2 >>= 0xa;
0x00006786 cmp r2, 0 |
0x00006788 it eq |
| if (r2 == 0) {
0x0000678a cmpeq r3, fp | __asm ("cmpeq r3, fp");
| }
| if (r2 != 0) {
0x0000678c bne 0x6858 | goto label_9;
| }
| label_0:
0x0000678e mov r2, r8 | r2 = r8;
0x00006790 mov r1, fp | r1 = fp;
0x00006792 mov r0, r6 | r0 = r6;
0x00006794 bl 0x5c54 | fcn_00005c54 (r0, r1);
0x00006798 ldrh.w r3, [r8, 8] | r3 = *((r8 + 8));
0x0000679c subs r3, 1 | r3--;
0x0000679e uxth r3, r3 | r3 = (int16_t) r3;
0x000067a0 strh.w r3, [r8, 8] | *((r8 + 8)) = r3;
0x000067a4 str r3, [sp, 0x14] | var_14h_2 = r3;
0x000067a6 cmp r3, 0 |
| if (r3 != 0) {
0x000067a8 bne 0x68a6 | goto label_10;
| }
0x000067aa mov r2, fp | r2 = fp;
0x000067ac mov r1, r8 | r1 = r8;
0x000067ae mov r0, r6 | r0 = r6;
0x000067b0 bl 0x5e20 | fcn_00005e20 (r0, r1, r2);
0x000067b4 ldr r3, [sp, 0x14] | r3 = var_14h_2;
0x000067b6 mov r1, fp | r1 = fp;
0x000067b8 mov r2, r8 | r2 = r8;
0x000067ba mov r0, r6 | r0 = r6;
0x000067bc str.w r3, [r8, 4] | __asm ("str.w r3, [r8, 4]");
0x000067c0 strh.w r3, [r8, 8] | *((r8 + 8)) = r3;
0x000067c4 ldr r3, [r6, 0xc] | r3 = *((r6 + 0xc));
0x000067c6 orr r3, r3, 1 | r3 |= 1;
0x000067ca str r3, [r6, 0xc] | *((r6 + 0xc)) = r3;
0x000067cc ldr r3, [r6, 0x34] | r3 = *((r6 + 0x34));
0x000067ce str.w fp, [r6, 0x34] | __asm ("str.w fp, [r6, 0x34]");
0x000067d2 str.w r3, [r8] | __asm ("str.w r3, [r8]");
0x000067d6 bl 0x5cdc | fcn_00005cdc (r0, r1);
| label_2:
0x000067da vmov.i32 d16, 0 | __asm ("vmov.i32 d16, 0");
0x000067de mov r0, r8 | r0 = r8;
0x000067e0 vstr d16, [r4, 0x48] | __asm ("vstr d16, [r4, 0x48]");
0x000067e4 blx 0x19d0 | read (r0, r1, r2);
| label_3:
0x000067e8 movs r3, 0 | r3 = 0;
0x000067ea str r3, [sp, 0x18] | var_18h = r3;
| label_6:
0x000067ec ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x000067ee movs r3, 0 | r3 = 0;
0x000067f0 subs r1, r5, 1 | r1 = r5 - 1;
0x000067f2 lsr.w r2, r2, sb | r2 >>= sb;
0x000067f6 uxtb r2, r2 | r2 = (int8_t) r2;
0x000067f8 str.w r3, [r5, r2, lsl 2] | __asm ("str.w r3, [r5, r2, lsl 2]");
0x000067fc b 0x6806 |
| while (r4 == 0) {
0x000067fe adds r3, 1 | r3++;
0x00006800 cmp.w r3, 0x400 |
| if (r3 == 0x400) {
0x00006804 beq 0x6882 | goto label_11;
| }
0x00006806 ldrb r4, [r1, 1]! | r4 = *((r1 += 1));
0x0000680a cmp r4, 0 |
0x0000680c beq 0x67fe |
| }
0x0000680e ldr r1, [r7] | r1 = *(r7);
| do {
0x00006810 mov r2, r5 | r2 = r5;
0x00006812 mov r0, r6 | r0 = r6;
0x00006814 bl 0x5cdc | fcn_00005cdc (r0, r1);
0x00006816 invalid |
| label_4:
0x0000681a ldr r2, [pc, 0x178] |
0x0000681c movs r4, 0x1b | r4 = 0x1b;
0x0000681e ldr r1, [pc, 0x178] | r1 = *(0x699a);
0x00006820 ldr r3, [pc, 0x178] |
0x00006822 add r2, pc | r2 = 0xd1bc;
0x00006824 adds r2, 0x18 | r2 += 0x18;
0x00006826 ldr.w r0, [sl, r1] | r0 = *((sl + r1));
0x0000682a str r2, [sp, 4] | var_4h_2 = r2;
0x0000682c add r3, pc | r3 = 0xd1cc;
0x0000682e ldr r2, [pc, 0x170] |
0x00006830 movs r1, 1 | r1 = 1;
0x00006832 str r4, [sp] | *(sp) = r4;
0x00006834 ldr r0, [r0] | r0 = *(r0);
0x00006836 add r2, pc | r2 = 0xd1dc;
0x00006838 blx 0x1bd4 | fputc (r0, r1);
0x0000683c ldr r2, [pc, 0x164] |
0x0000683e ldr r3, [pc, 0x148] | r3 = *(0x698a);
0x00006840 add r2, pc | r2 = 0xd1e8;
0x00006842 ldr r3, [r2, r3] | r3 = *(0xd1e8);
0x00006844 ldr r2, [r3] | r2 = *(0xd1e8);
0x00006846 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x00006848 eors r2, r3 | r2 ^= r3;
0x0000684a mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000684e bne.w 0x6980 | goto label_7;
| }
0x00006852 add sp, 0x24 |
0x00006854 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_9:
0x00006858 ldr r2, [pc, 0x13c] | r2 = *(0x6998);
0x0000685a movs r1, 1 | r1 = 1;
0x0000685c ldr.w r2, [sl, r2] | r2 = *((sl + r2));
0x00006860 strd fp, r3, [sp, 8] | __asm ("strd fp, r3, [sp, 8]");
0x00006864 ldr r3, [pc, 0x140] |
0x00006866 ldr r0, [r2] | r0 = *(0x6998);
0x00006868 ldr r2, [pc, 0x140] |
0x0000686a add r3, pc | r3 = 0xd216;
0x0000686c adds r3, 0x7c | r3 += 0x7c;
0x0000686e str r3, [sp, 4] | var_4h_2 = r3;
0x00006870 movw r3, 0x16d | r3 = 0x16d;
0x00006874 str r3, [sp] | *(sp) = r3;
0x00006876 add r2, pc | r2 = 0xd226;
0x00006878 ldr r3, [pc, 0x134] |
0x0000687a add r3, pc | r3 = 0xd22e;
0x0000687c blx 0x1bd4 | fputc (r0, r1);
0x00006880 b 0x678e | goto label_0;
| label_11:
0x00006882 ldr r1, [r7] | r1 = *(r7);
0x00006884 cmp r1, 1 |
0x00006886 beq 0x6810 |
| } while (r1 == 1);
0x00006888 ldr r3, [r6, 0xc] | r3 = *((r6 + 0xc));
0x0000688a mov r0, r6 | r0 = r6;
0x0000688c mov r2, r5 | r2 = r5;
0x0000688e str r4, [r5, 4] | *((r5 + 4)) = r4;
0x00006890 strh r4, [r5, 8] | *((r5 + 8)) = r4;
0x00006892 orr r3, r3, 1 | r3 |= 1;
0x00006896 str r3, [r6, 0xc] | *((r6 + 0xc)) = r3;
0x00006898 ldr r3, [r6, 0x34] | r3 = *((r6 + 0x34));
0x0000689a str r1, [r6, 0x34] | *((r6 + 0x34)) = r1;
0x0000689c str r3, [r5] | *(r5) = r3;
0x0000689e bl 0x5cdc | fcn_00005cdc (r0, r1);
0x000068a2 str r4, [r7] | *(r7) = r4;
0x000068a4 b 0x6746 | goto label_1;
| label_10:
0x000068a6 ldr r0, [r4, 0x48] | r0 = *((r4 + 0x48));
0x000068a8 movs r1, 0 | r1 = 0;
0x000068aa ldr r2, [r6, 0x3c] | r2 = *((r6 + 0x3c));
0x000068ac ubfx r0, r0, 0, 0xa | r0 = (r0 >> 0) & ((1 << 0xa) - 1);
0x000068b0 add r0, r8 | r0 += r8;
0x000068b2 str r2, [sp, 0x14] | var_14h_2 = r2;
0x000068b4 blx 0x1954 | fcn_00001954 ();
0x000068b8 ldr r2, [sp, 0x14] | r2 = var_14h_2;
0x000068ba mov.w r0, 0x3f0 | r0 = 0x3f0;
0x000068be mov r1, r2 | r1 = r2;
0x000068c0 bl 0x6d58 | fcn_00006d58 (r0, r1, r2);
0x000068c4 ldrh.w r3, [r8, 8] | r3 = *((r8 + 8));
0x000068c8 subs r0, 1 | r0--;
0x000068ca cmp r3, r0 |
| if (r3 != r0) {
0x000068cc beq 0x68da |
0x000068ce mov r1, fp | r1 = fp;
0x000068d0 mov r2, r8 | r2 = r8;
0x000068d2 mov r0, r6 | r0 = r6;
0x000068d4 bl 0x5cdc | fcn_00005cdc (r0, r1);
0x000068d8 b 0x67da | goto label_2;
| }
0x000068da movs r1, 1 | r1 = 1;
0x000068dc mov.w r0, 0x400 | r0 = 0x400;
0x000068e0 blx 0x192c | fcn_0000192c ();
0x000068e4 str r0, [sp, 0x14] | var_14h_2 = r0;
0x000068e6 cmp r0, 0 |
| if (r0 == 0) {
0x000068e8 beq 0x695c | goto label_12;
| }
0x000068ea ldr r2, [r6, 0x38] | r2 = *((r6 + 0x38));
0x000068ec mov r1, fp | r1 = fp;
0x000068ee mov r0, r6 | r0 = r6;
0x000068f0 str.w r2, [r8] | __asm ("str.w r2, [r8]");
0x000068f4 movs r2, 0 | r2 = 0;
0x000068f6 str.w r2, [r8, 4] | __asm ("str.w r2, [r8, 4]");
0x000068fa mov r2, r8 | r2 = r8;
0x000068fc bl 0x5cdc | fcn_00005cdc (r0, r1);
0x00006900 ldr r1, [r6, 0x38] | r1 = *((r6 + 0x38));
0x00006902 ldr r3, [sp, 0x14] | r3 = var_14h_2;
0x00006904 cbnz r1, 0x693e |
| while (1) {
0x00006906 mov r0, r3 | r0 = r3;
0x00006908 blx 0x19d0 | read (r0, r1, r2);
0x0000690c ldr r3, [r6, 0xc] | r3 = *((r6 + 0xc));
0x0000690e str.w fp, [r6, 0x38] | __asm ("str.w fp, [r6, 0x38]");
0x00006912 orr r3, r3, 1 | r3 |= 1;
0x00006916 str r3, [r6, 0xc] | *((r6 + 0xc)) = r3;
0x00006918 b 0x67da | goto label_2;
| label_8:
0x0000691a ldr r3, [pc, 0x7c] | r3 = *(0x699a);
0x0000691c movs r1, 1 | r1 = 1;
0x0000691e ldr r2, [pc, 0x94] |
0x00006920 ldr.w r3, [sl, r3] | r3 = *((sl + r3));
0x00006924 add r2, pc | r2 = 0xd2de;
0x00006926 ldr r0, [r3] | r0 = *(0x699a);
0x00006928 ldr r3, [pc, 0x8c] |
0x0000692a add r3, pc | r3 = 0xd2e6;
0x0000692c adds r3, 0x18 | r3 += 0x18;
0x0000692e str r3, [sp, 4] | var_4h_2 = r3;
0x00006930 movs r3, 0x1b | r3 = 0x1b;
0x00006932 str r3, [sp] | *(sp) = r3;
0x00006934 ldr r3, [pc, 0x84] |
0x00006936 add r3, pc | r3 = 0xd2f6;
0x00006938 blx 0x1bd4 | fputc (r0, r1);
0x0000693c b 0x67e8 | goto label_3;
0x0000693e mov r2, r3 | r2 = r3;
0x00006940 mov r0, r6 | r0 = r6;
0x00006942 str r3, [sp, 0x14] | var_14h_2 = r3;
0x00006944 bl 0x5c54 | fcn_00005c54 (r0, r1);
0x00006948 ldr r3, [sp, 0x14] | r3 = var_14h_2;
0x0000694a mov r0, r6 | r0 = r6;
0x0000694c ldr r1, [r6, 0x38] | r1 = *((r6 + 0x38));
0x0000694e mov r2, r3 | r2 = r3;
0x00006950 str.w fp, [r3, 4] | __asm ("str.w fp, [r3, 4]");
0x00006954 bl 0x5cdc | fcn_00005cdc (r0, r1);
0x00006958 ldr r3, [sp, 0x14] | r3 = var_14h_2;
0x0000695a b 0x6906 |
| }
| label_12:
0x0000695c ldr r3, [pc, 0x38] | r3 = *(0x6998);
0x0000695e movs r1, 1 | r1 = 1;
0x00006960 ldr r2, [pc, 0x5c] |
0x00006962 ldr.w r3, [sl, r3] | r3 = *((sl + r3));
0x00006966 add r2, pc | r2 = 0xd32a;
0x00006968 ldr r0, [r3] | r0 = *(0x6998);
0x0000696a ldr r3, [pc, 0x58] |
0x0000696c add r3, pc | r3 = 0xd336;
0x0000696e adds r3, 0x18 | r3 += 0x18;
0x00006970 str r3, [sp, 4] | var_4h_2 = r3;
0x00006972 movs r3, 0x1b | r3 = 0x1b;
0x00006974 str r3, [sp] | *(sp) = r3;
0x00006976 ldr r3, [pc, 0x50] |
0x00006978 add r3, pc | r3 = 0xd346;
0x0000697a blx 0x1bd4 | fputc (r0, r1);
0x0000697e b 0x67da | goto label_2;
| label_7:
0x00006980 blx 0x1bc8 | fprintf_chk ()
0x00006984 adds r7, 0x1a | r7 += 0x1a;
0x00006986 movs r0, r0 |
0x00006988 lsls r0, r2, 7 | r0 = r2 << 7;
0x0000698a movs r0, r0 |
0x0000698c adds r7, 0xc | r7 += 0xc;
0x0000698e movs r0, r0 |
0x00006990 adds r6, 0xb6 | r6 += 0xb6;
0x00006992 movs r0, r0 |
0x00006994 movs r2, 0xea | r2 = 0xea;
0x00006996 movs r0, r0 |
0x00006998 lsls r4, r5, 7 | r4 = r5 << 7;
0x0000699a movs r0, r0 |
0x0000699c subs r4, r7, 6 | r4 = r7 - 6;
0x0000699e movs r0, r0 |
0x000069a0 movs r0, 0x4e | r0 = 0x4e;
0x000069a2 movs r0, r0 |
0x000069a4 adds r5, 0xc0 | r5 += 0xc0;
0x000069a6 movs r0, r0 |
0x000069a8 movs r2, 0xa2 | r2 = 0xa2;
0x000069aa movs r0, r0 |
0x000069ac movs r1, 0x96 | r1 = 0x96;
0x000069ae movs r0, r0 |
0x000069b0 subs r6, r5, 5 | r6 = r5 - 5;
0x000069b2 movs r0, r0 |
0x000069b4 subs r0, r4, 5 | r0 = r4 - 5;
0x000069b6 movs r0, r0 |
0x000069b8 movs r1, 0xe2 | r1 = 0xe2;
0x000069ba movs r0, r0 |
0x000069bc subs r2, r6, 2 | r2 = r6 - 2;
0x000069be movs r0, r0 |
0x000069c0 subs r6, r3, 4 | r6 = r3 - 4;
0x000069c2 movs r0, r0 |
0x000069c4 movs r1, 0xa0 | r1 = 0xa0;
0x000069c6 movs r0, r0 |
0x000069c8 subs r0, r6, 1 | r0 = r6 - 1;
0x000069ca movs r0, r0 |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/e2image @ 0x69fc */
| #include <stdint.h>
|
; (fcn) fcn.000069fc () | void fcn_000069fc (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;
0x000069fc qaddhs r4, r7, r1 | __asm ("qaddhs r4, r7, r1");
0x00006a00 ldr r3, [pc, 0x15c] |
0x00006a02 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00006a06 mov r4, r0 | r4 = r0;
0x00006a08 add r2, pc | r2 += pc;
0x00006a0a ldr r6, [r0, 0xc] | r6 = *((r0 + 0xc));
0x00006a0c sub sp, 0x18 |
0x00006a0e ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x00006a10 ldr r7, [pc, 0x150] |
0x00006a12 ldr r0, [r6, 0x3c] | r0 = *((r6 + 0x3c));
0x00006a14 ldr r3, [r3] | r3 = *(0x6b60);
0x00006a16 str r3, [sp, 0x14] | var_14h = r3;
0x00006a18 mov.w r3, 0 | r3 = 0;
0x00006a1c add r7, pc | r7 = 0xd584;
0x00006a1e blx 0x192c | r0 = fcn_0000192c ();
0x00006a22 cmp r0, 0 |
| if (r0 == 0) {
0x00006a24 beq 0x6aac | goto label_2;
| }
0x00006a26 ldrd r3, r2, [r4, 0x48] | __asm ("ldrd r3, r2, [r4, 0x48]");
0x00006a2a mov r5, r0 | r5 = r0;
0x00006a2c orrs r3, r2 | r3 |= r2;
0x00006a2e beq 0x6afe |
| while (r0 >= 0) {
| label_0:
0x00006a30 ldr r3, [r6, 0x40] | r3 = *((r6 + 0x40));
0x00006a32 mov r1, r4 | r1 = r4;
0x00006a34 mov r0, r5 | r0 = r5;
0x00006a36 ldr r3, [r3] | r3 = *(r3);
0x00006a38 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
0x00006a3a ldr r3, [r6, 0x3c] | r3 = *((r6 + 0x3c));
0x00006a3c add.w r0, r6, 0x10 | r0 = r6 + 0x10;
0x00006a40 strd r5, r3, [sp] | __asm ("strd r5, r3, [sp]");
0x00006a44 ldr r1, [r6, 0x20] | r1 = *((r6 + 0x20));
0x00006a46 ldrd r2, r3, [r4, 0x48] | __asm ("ldrd r2, r3, [r4, 0x48]");
0x00006a4a blx r1 | uint32_t (*r1)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00006a4c ldr r3, [r6, 0x3c] | r3 = *((r6 + 0x3c));
0x00006a4e mov r6, r0 | r6 = r0;
0x00006a50 cmp r3, r0 |
| if (r3 != r0) {
0x00006a52 beq 0x6a8c |
0x00006a54 blx 0x1d24 | ext2fs_open_inode_scan ();
0x00006a58 cmp r6, 0 |
| if (r6 != 0) {
0x00006a5a bne 0x6b50 | goto label_3;
| }
0x00006a5c ldr r0, [r0] | r0 = *(r0);
| label_1:
0x00006a5e ldr r3, [pc, 0x108] | r3 = *(0x6b6a);
0x00006a60 ldr r6, [r4, 4] | r6 = *((r4 + 4));
0x00006a62 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x00006a64 ldr r4, [r3] | r4 = *(0x6b6a);
0x00006a66 blx 0x185c | strerror (r0);
0x00006a6a ldr r2, [pc, 0x100] |
0x00006a6c movw r1, 0x15b | r1 = 0x15b;
0x00006a70 ldr r3, [pc, 0xfc] |
0x00006a72 strd r6, r0, [sp, 8] | __asm ("strd r6, r0, [var_ch]");
0x00006a76 mov r0, r4 | r0 = r4;
0x00006a78 add r2, pc | r2 = 0xd5ea;
0x00006a7a adds r2, 0x8c | r2 += 0x8c;
0x00006a7c add r3, pc | r3 = 0xd5f0;
0x00006a7e strd r1, r2, [sp] | __asm ("strd r1, r2, [sp]");
0x00006a82 movs r1, 1 | r1 = 1;
0x00006a84 ldr r2, [pc, 0xec] |
0x00006a86 add r2, pc | r2 = 0xd5fe;
0x00006a88 blx 0x1bd4 | fputc (r0, r1);
| }
0x00006a8c ldr r2, [pc, 0xe8] |
0x00006a8e ldr r3, [pc, 0xd0] | r3 = *(0x6b62);
0x00006a90 add r2, pc | r2 = 0xd60c;
0x00006a92 ldr r3, [r2, r3] | r3 = *(0xd60c);
0x00006a94 ldr r2, [r3] | r2 = *(0xd60c);
0x00006a96 ldr r3, [sp, 0x14] | r3 = var_14h;
0x00006a98 eors r2, r3 | r2 ^= r3;
0x00006a9a mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00006a9e bne 0x6b58 | goto label_4;
| }
0x00006aa0 mov r0, r5 | r0 = r5;
0x00006aa2 add sp, 0x18 |
0x00006aa4 pop.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00006aa8 b.w 0x19cc | void (*0x19cc)() ();
| label_2:
0x00006aac blx 0x1d24 | ext2fs_open_inode_scan ();
0x00006ab0 ldr r3, [pc, 0xb4] | r3 = *(0x6b68);
0x00006ab2 movs r2, 0xc | r2 = 0xc;
0x00006ab4 str r2, [r0] | *(r0) = r2;
0x00006ab6 mov r0, r2 | r0 = r2;
0x00006ab8 ldr r5, [r4, 4] | r5 = *((r4 + 4));
0x00006aba movw r4, 0x149 | r4 = 0x149;
0x00006abe ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x00006ac0 ldr r6, [r3] | r6 = *(0x6b68);
0x00006ac2 blx 0x185c | strerror (r0);
0x00006ac6 ldr r1, [pc, 0xb4] |
0x00006ac8 ldr r3, [pc, 0xb4] |
0x00006aca ldr r2, [pc, 0xb8] |
0x00006acc add r1, pc | r1 = 0xd64e;
0x00006ace str r0, [sp, 0xc] | var_ch = r0;
0x00006ad0 adds r1, 0x8c | r1 += 0x8c;
0x00006ad2 add r3, pc | r3 = 0xd656;
0x00006ad4 add r2, pc | r2 = 0xd65e;
0x00006ad6 strd r4, r1, [sp] | __asm ("strd r4, r1, [sp]");
0x00006ada mov r0, r6 | r0 = r6;
0x00006adc movs r1, 1 | r1 = 1;
0x00006ade str r5, [sp, 8] | var_8h = r5;
0x00006ae0 blx 0x1bd4 | fputc (r0, r1);
0x00006ae4 ldr r2, [pc, 0xa0] |
0x00006ae6 ldr r3, [pc, 0x78] | r3 = *(0x6b62);
0x00006ae8 add r2, pc | r2 = 0xd674;
0x00006aea ldr r3, [r2, r3] | r3 = *(0xd674);
0x00006aec ldr r2, [r3] | r2 = *(0xd674);
0x00006aee ldr r3, [sp, 0x14] | r3 = var_14h;
0x00006af0 eors r2, r3 | r2 ^= r3;
0x00006af2 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00006af6 bne 0x6b58 | goto label_4;
| }
0x00006af8 add sp, 0x18 |
0x00006afa pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
0x00006afe mov.w r8, 1 | r8 = 1;
0x00006b02 movs r3, 0 | r3 = 0;
0x00006b04 add r2, sp, 0x10 | r2 += var_10h;
0x00006b06 mov r1, r4 | r1 = r4;
0x00006b08 mov r0, r6 | r0 = r6;
0x00006b0a str.w r8, [sp, 0x10] | __asm ("str.w r8, [var_10h]");
0x00006b0e bl 0x6334 | r0 = fcn_00006334 (r0, r1, r2, r3);
0x00006b12 cmp r0, 0 |
0x00006b14 bge 0x6a30 |
| }
0x00006b16 ldr r3, [pc, 0x50] | r3 = *(0x6b6a);
0x00006b18 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x00006b1a ldr.w sb, [r3] | sb = *(0x6b6a);
0x00006b1e blx 0x1d24 | r0 = ext2fs_open_inode_scan ();
0x00006b22 ldr r0, [r0] | r0 = *(r0);
0x00006b24 ldr.w sl, [r4, 4] | sl = *((r4 + 4));
0x00006b28 blx 0x185c | strerror (r0);
0x00006b2c ldr r3, [pc, 0x5c] |
0x00006b2e mov r1, r8 | r1 = r8;
0x00006b30 ldr r2, [pc, 0x5c] |
0x00006b32 strd sl, r0, [sp, 8] | __asm ("strd sl, r0, [var_ch]");
0x00006b36 mov r0, sb | r0 = sb;
0x00006b38 add r3, pc | r3 = 0xd6c8;
0x00006b3a adds r3, 0xa0 | r3 += 0xa0;
0x00006b3c add r2, pc | r2 = 0xd6d0;
0x00006b3e str r3, [sp, 4] | var_4h_3 = r3;
0x00006b40 mov.w r3, 0x136 | r3 = 0x136;
0x00006b44 str r3, [sp] | *(sp) = r3;
0x00006b46 ldr r3, [pc, 0x4c] |
0x00006b48 add r3, pc | r3 = 0xd6e2;
0x00006b4a blx 0x1bd4 | fputc (r0, r1);
0x00006b4e b 0x6a30 | goto label_0;
| label_3:
0x00006b50 movs r3, 0x1c | r3 = 0x1c;
0x00006b52 str r3, [r0] | *(r0) = r3;
0x00006b54 mov r0, r3 | r0 = r3;
0x00006b56 b 0x6a5e | goto label_1;
| label_4:
0x00006b58 blx 0x1bc8 | fprintf_chk ()
0x00006b5c adds r3, 0xf8 | r3 += 0xf8;
0x00006b5e movs r0, r0 |
0x00006b60 lsls r0, r2, 7 | r0 = r2 << 7;
0x00006b62 movs r0, r0 |
0x00006b64 adds r3, 0xe4 | r3 += 0xe4;
0x00006b66 movs r0, r0 |
0x00006b68 lsls r4, r5, 7 | r4 = r5 << 7;
0x00006b6a movs r0, r0 |
0x00006b6c movs r0, 0x94 | r0 = 0x94;
0x00006b6e movs r0, r0 |
0x00006b70 adds r4, r5, 5 | r4 = r5 + 5;
0x00006b72 movs r0, r0 |
0x00006b74 subs r6, r3, 7 | r6 = r3 - 7;
0x00006b76 movs r0, r0 |
0x00006b78 adds r3, 0x70 | r3 += 0x70;
0x00006b7a movs r0, r0 |
0x00006b7c movs r0, 0x40 | r0 = 0x40;
0x00006b7e movs r0, r0 |
0x00006b80 adds r6, r2, 4 | r6 = r2 + 4;
0x00006b82 movs r0, r0 |
0x00006b84 subs r0, r2, 6 | r0 = r2 - 6;
0x00006b86 movs r0, r0 |
0x00006b88 adds r3, 0x18 | r3 += 0x18;
0x00006b8a movs r0, r0 |
0x00006b8c subs r4, r2, 7 | r4 = r2 - 7;
0x00006b8e movs r0, r0 |
0x00006b90 subs r4, r3, 5 | r4 = r3 - 5;
0x00006b92 movs r0, r0 |
0x00006b94 adds r0, r4, 2 | r0 = r4 + 2;
0x00006b96 movs r0, r0 |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/e2image @ 0x6b98 */
| #include <stdint.h>
|
; (fcn) fcn.00006b98 () | void fcn_00006b98 (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;
0x00006b98 blmi 0x4993e4 | __asm ("blmi aav.0x00003260");
0x00006b9c push {r4, lr} |
0x00006b9e sub sp, 8 |
0x00006ba0 add r2, pc | r2 += pc;
0x00006ba2 movs r4, 1 | r4 = 1;
0x00006ba4 ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x00006ba6 ldr r3, [r3] | r3 = *(r3);
0x00006ba8 str r3, [sp, 4] | var_4h = r3;
0x00006baa mov.w r3, 0 | r3 = 0;
0x00006bae ldrd r3, r2, [r0, 0x48] | __asm ("ldrd r3, r2, [var_0hx48]");
0x00006bb2 str r4, [sp] | *(sp) = r4;
0x00006bb4 orrs r3, r2 | r3 |= r2;
| if (r3 != r2) {
0x00006bb6 beq 0x6bc4 |
0x00006bb8 mov r1, r0 | r1 = r0;
0x00006bba movs r3, 0 | r3 = 0;
0x00006bbc ldr r0, [r0, 0xc] | r0 = *(var_0hxc);
0x00006bbe mov r2, sp | r2 = sp;
0x00006bc0 bl 0x66d4 | fcn_000066d4 (r0, r1, r2, r3);
| }
0x00006bc4 ldr r2, [pc, 0x20] |
0x00006bc6 ldr r3, [pc, 0x1c] | r3 = *(0x6be6);
0x00006bc8 add r2, pc | r2 = 0xd7b4;
0x00006bca ldr r3, [r2, r3] | r3 = *(0xd7b4);
0x00006bcc ldr r2, [r3] | r2 = *(0xd7b4);
0x00006bce ldr r3, [sp, 4] | r3 = var_4h;
0x00006bd0 eors r2, r3 | r2 ^= r3;
0x00006bd2 mov.w r3, 0 | r3 = 0;
| if (r2 == r3) {
0x00006bd6 bne 0x6bdc |
0x00006bd8 add sp, 8 |
0x00006bda pop {r4, pc} |
| }
0x00006bdc blx 0x1bc8 | fprintf_chk ()
0x00006be0 adds r2, 0x60 | r2 += 0x60;
0x00006be2 movs r0, r0 |
0x00006be4 lsls r0, r2, 7 | r0 = r2 << 7;
0x00006be6 movs r0, r0 |
0x00006be8 adds r2, 0x38 | r2 += 0x38;
0x00006bea movs r0, r0 |
0x00006bec push.w {r4, r5, r6, r7, r8, lr} |
0x00006bf0 sub sp, 0x10 |
0x00006bf2 ldr r7, [pc, 0xcc] |
0x00006bf4 mov r5, r0 | r5 = r0;
0x00006bf6 mov r8, r1 | r8 = r1;
0x00006bf8 bl 0x54ec | fcn_000054ec ();
0x00006bfc add r7, pc | r7 = 0xd8c2;
0x00006bfe cmp r0, 0 |
| if (r0 == 0) {
0x00006c00 beq 0x6cb6 | goto label_0;
| }
0x00006c02 mov r4, r0 | r4 = r0;
0x00006c04 ldr r0, [r5, 0x3c] | r0 = *((r5 + 0x3c));
0x00006c06 blx 0x1ba4 | r0 = ext2fs_write_new_inode ();
0x00006c0a mov r6, r0 | r6 = r0;
0x00006c0c cmp r0, 0 |
| if (r0 == 0) {
0x00006c0e beq 0x6cb0 | goto label_1;
| }
0x00006c10 movs r2, 0x40 | r2 = 0x40;
0x00006c12 movs r1, 0 | r1 = 0;
0x00006c14 add.w r0, r4, 0x10 | r0 = r4 + 0x10;
0x00006c16 movs r0, r2 | r0 = r2;
0x00006c18 str.w r8, [r4, 4] | __asm ("str.w r8, [r4, 4]");
0x00006c1c str r5, [r4, 0xc] | *((r4 + 0xc)) = r5;
0x00006c1e blx 0x1954 | fcn_00001954 ();
0x00006c22 movs r3, 0 | r3 = 0;
0x00006c24 movs r2, 1 | r2 = 1;
0x00006c26 mov r1, r4 | r1 = r4;
0x00006c28 mov r0, r5 | r0 = r5;
0x00006c2a bl 0x61a8 | fcn_000061a8 (r0, r1, r2, r3, r4);
0x00006c2e mov r3, r1 | r3 = r1;
0x00006c30 cmp r0, 1 |
0x00006c32 sbcs r1, r3, 0 | __asm ("sbcs r1, r3, 0");
| if (r0 < 1) {
0x00006c36 blt 0x6c9a | goto label_2;
| }
0x00006c38 strd r0, r3, [r4, 0x48] | __asm ("strd r0, r3, [r4, 0x48]");
0x00006c3c mov r2, r0 | r2 = r0;
0x00006c3e str r6, [sp] | *(sp) = r6;
0x00006c40 add.w r0, r5, 0x10 | r0 = r5 + 0x10;
0x00006c44 ldr r1, [r5, 0x3c] | r1 = *((r5 + 0x3c));
0x00006c46 str r1, [sp, 4] | var_4h_2 = r1;
0x00006c48 ldr r1, [r5, 0x1c] | r1 = *((r5 + 0x1c));
0x00006c4a blx r1 | uint32_t (*r1)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x00006c4c ldr r3, [r5, 0x3c] | r3 = *((r5 + 0x3c));
0x00006c4e mov r8, r0 | r8 = r0;
0x00006c50 cmp r3, r0 |
| if (r3 == r0) {
0x00006c52 beq 0x6c90 | goto label_3;
| }
0x00006c54 blx 0x1d24 | ext2fs_open_inode_scan ();
0x00006c58 cmp.w r8, 0 |
| if (r8 != 0) {
0x00006c5c bne 0x6ca8 | goto label_4;
| }
0x00006c5e ldr r0, [r0] | r0 = *(r0);
| do {
0x00006c60 ldr r3, [pc, 0x60] | r3 = *(0x6cc4);
0x00006c62 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x00006c64 ldr r7, [r4, 4] | r7 = *((r4 + 4));
0x00006c66 ldr.w r8, [r3] | r8 = *(0x6cc4);
0x00006c6a blx 0x185c | strerror (r0);
0x00006c6e ldr r3, [pc, 0x58] |
0x00006c70 movs r1, 1 | r1 = 1;
0x00006c72 ldr r2, [pc, 0x58] |
0x00006c74 str r0, [sp, 0xc] | var_ch_2 = r0;
0x00006c76 mov r0, r8 | r0 = r8;
0x00006c78 add r3, pc | r3 = 0xd946;
0x00006c7a str r7, [sp, 8] | var_8h_2 = r7;
0x00006c7c adds r3, 0xb0 | r3 += 0xb0;
0x00006c7e add r2, pc | r2 = 0xd950;
0x00006c80 str r3, [sp, 4] | var_4h_2 = r3;
0x00006c82 movw r3, 0x216 | r3 = 0x216;
0x00006c86 str r3, [sp] | *(sp) = r3;
0x00006c88 ldr r3, [pc, 0x44] |
0x00006c8a add r3, pc | r3 = 0xd95e;
0x00006c8c blx 0x1bd4 | fputc (r0, r1);
| label_3:
0x00006c90 ldr r3, [r5, 0x40] | r3 = *((r5 + 0x40));
0x00006c92 mov r1, r6 | r1 = r6;
0x00006c94 mov r0, r4 | r0 = r4;
0x00006c96 ldr r3, [r3, 4] | r3 = *((r3 + 4));
0x00006c98 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
| label_2:
0x00006c9a mov r0, r6 | r0 = r6;
0x00006c9c blx 0x19d0 | read (r0, r1, r2);
0x00006ca0 mov r0, r4 | r0 = r4;
0x00006ca2 add sp, 0x10 |
0x00006ca4 pop.w {r4, r5, r6, r7, r8, pc} |
| label_4:
0x00006ca8 movs r3, 5 | r3 = 5;
0x00006caa str r3, [r0] | *(r0) = r3;
0x00006cac mov r0, r3 | r0 = r3;
0x00006cae b 0x6c60 |
| } while (1);
| label_1:
0x00006cb0 mov r0, r4 | r0 = r4;
0x00006cb2 blx 0x19d0 | read (r0, r1, r2);
| label_0:
0x00006cb6 movs r4, 0 | r4 = 0;
0x00006cb8 mov r0, r4 | r0 = r4;
0x00006cba add sp, 0x10 |
0x00006cbc pop.w {r4, r5, r6, r7, r8, pc} |
| }
[*] Function fprintf used 11 times e2image