[*] Binary protection state of libext2fs.so.2.4
Full RELRO Canary found NX enabled DSO No RPATH No RUNPATH No Symbols
[*] Function system tear down of libext2fs.so.2.4
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/libext2fs.so.2.4 @ 0x2e688 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.0002e688 () | void fcn_0002e688 (int16_t arg_24h, int16_t arg_28h, int16_t arg_90h, int16_t arg_290h, int16_t arg_694h, int16_t arg2) {
| int32_t var_694h;
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_20h;
| r1 = arg2;
0x0002e688 blmi 0xff2411ac | __asm ("blmi aav.0x0002b1b8");
0x0002e68c push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0002e690 subw sp, sp, 0x69c | __asm ("subw sp, sp, aav.0x000000ff");
0x0002e694 add r2, pc | r2 += pc;
0x0002e696 add r4, sp, 0x28 | r4 += arg_28h;
0x0002e698 mov r5, r1 | r5 = r1;
0x0002e69a mov r1, r4 | r1 = r4;
0x0002e69c ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x0002e69e ldr r3, [r3] | r3 = *(r3);
0x0002e6a0 str.w r3, [sp, 0x694] | __asm ("str.w r3, [arg_694h]");
0x0002e6a4 mov.w r3, 0 | r3 = 0;
0x0002e6a8 blx 0xbd54 | r0 = fcn_0000bd54 ();
| if (r0 != 0) {
0x0002e6ac cbnz r0, 0x2e706 | goto label_0;
| }
0x0002e6ae ldrd r3, r2, [r4, 0x30] | __asm ("ldrd r3, r2, [r4, 0x30]");
0x0002e6b2 mov r7, r0 | r7 = r0;
0x0002e6b4 orrs r3, r2 | r3 |= r2;
0x0002e6b6 bne 0x2e6da |
| while (1) {
| label_1:
0x0002e6b8 ldr r2, [pc, 0x2f4] |
0x0002e6ba ldr r3, [pc, 0x2f0] | r3 = *(0x2e9ae);
0x0002e6bc add r2, pc | r2 = 0x5d070;
0x0002e6be ldr r3, [r2, r3] | r3 = *(0x5d070);
0x0002e6c0 ldr r2, [r3] | r2 = *(0x5d070);
0x0002e6c2 ldr.w r3, [sp, 0x694] | r3 = *(arg_694h);
0x0002e6c6 eors r2, r3 | r2 ^= r3;
0x0002e6c8 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0002e6cc bne.w 0x2e9a2 | goto label_7;
| }
0x0002e6d0 mov r0, r7 | r0 = r7;
0x0002e6d2 addw sp, sp, 0x69c | __asm ("addw sp, var_0h");
0x0002e6d6 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x0002e6da mov.w r1, 0xfe00 | r1 = 0xfe00;
0x0002e6de add r6, sp, 0x90 | r6 += arg_90h;
0x0002e6e0 movt r1, 0xffff | r1 = (r1 & 0xFFFF) | 0xffff0000;
0x0002e6e4 ldr r0, [r5, 4] | r0 = *((r5 + 4));
0x0002e6e6 movs r2, 0 | r2 = 0;
0x0002e6e8 movs r3, 0 | r3 = 0;
0x0002e6ea strd r1, r6, [sp] | __asm ("strd r1, r6, [sp]");
0x0002e6ee str r6, [sp, 0x18] | var_18h = r6;
0x0002e6f0 blx 0xb42c | r0 = fcn_0000b42c ();
0x0002e6f4 mov r4, r0 | r4 = r0;
| if (r0 == 0) {
0x0002e6f6 cbnz r0, 0x2e706 |
0x0002e6f8 ldr r2, [sp, 0x90] | r2 = *(arg_90h);
0x0002e6fa movw r3, 0x3245 |
0x0002e6fe movt r3, 0x4e55 | r3 = 0x4e553245;
0x0002e702 cmp r2, r3 |
| if (r2 == r3) {
0x0002e704 beq 0x2e710 | goto label_8;
| }
| }
| label_0:
0x0002e706 movw r7, 0xb7ac |
0x0002e70a movt r7, 0x7f2b | r7 = 0x7f2bb7ac;
0x0002e70e b 0x2e6b8 |
| }
| label_8:
0x0002e710 ldr r3, [sp, 0x18] | r3 = var_18h;
0x0002e712 ldr r2, [r3, 4] | r2 = *((r3 + 4));
0x0002e714 movw r3, 0x4f44 |
0x0002e716 strb r4, [r0, 0xd] | *((r0 + 0xd)) = r4;
0x0002e718 movt r3, 0x3230 | r3 = 0x32304f44;
0x0002e71c cmp r2, r3 |
| if (r2 != r3) {
0x0002e71e bne 0x2e706 | goto label_0;
| }
0x0002e720 ldr r6, [sp, 0x18] | r6 = var_18h;
0x0002e722 mov.w r2, 0x1fc | r2 = 0x1fc;
0x0002e726 mov.w r0, -1 | r0 = -1;
0x0002e72a mov r1, r6 | r1 = r6;
0x0002e72c blx 0xb4e8 | fcn_0000b4e8 ();
0x0002e730 ldr.w r3, [r6, 0x1fc] | r3 = *((r6 + 0x1fc));
0x0002e734 cmp r3, r0 |
| if (r3 != r0) {
0x0002e736 bne 0x2e706 | goto label_0;
| }
0x0002e738 ldr r3, [r6, 0x24] | r3 = *((r6 + 0x24));
0x0002e73a mov.w r2, 0xfc00 | r2 = 0xfc00;
0x0002e73e ldr.w sb, [r6, 0x20] | sb = *((r6 + 0x20));
0x0002e742 movt r2, 0xf | r2 = (r2 & 0xFFFF) | 0xf0000;
0x0002e746 str r3, [sp, 8] | var_8h = r3;
0x0002e748 clz r3, r3 | r3 &= r3;
0x0002e74c lsrs r3, r3, 5 | r3 >>= 5;
0x0002e74e sub.w r1, sb, 0x400 | r1 = sb - 0x400;
0x0002e752 cmp r1, r2 |
0x0002e754 it hi |
| if (r1 <= r2) {
0x0002e756 orrhi r3, r3, 1 | r3 |= 1;
| }
0x0002e75a cmp r3, 0 |
| if (r3 != 0) {
0x0002e75c bne 0x2e706 | goto label_0;
| }
0x0002e75e ldr r3, [r6, 8] | r3 = *((r6 + 8));
0x0002e760 mov r1, sb | r1 = sb;
0x0002e762 ldr r0, [r5, 4] | r0 = *((r5 + 4));
0x0002e764 ldrd sl, fp, [r6, 0x10] | __asm ("ldrd sl, fp, [r6, 0x10]");
0x0002e768 str r3, [sp, 0x20] | var_20h = r3;
0x0002e76a ldr r3, [r0, 4] | r3 = *((r0 + 4));
0x0002e76c ldr r3, [r3, 0x10] | r3 = *((r3 + 0x10));
0x0002e76e blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
0x0002e770 ldrd r3, r2, [r6, 0x34] | __asm ("ldrd r3, r2, [r6, 0x34]");
0x0002e774 orrs r3, r2 | r3 |= r2;
| if (r3 != r2) {
0x0002e776 bne 0x2e706 | goto label_0;
| }
0x0002e778 ldr r3, [r5, 0x34] | r3 = *((r5 + 0x34));
0x0002e77a mov.w r1, 0x400 | r1 = 0x400;
0x0002e77e ldr.w r8, [r5, 4] | r8 = *((r5 + 4));
0x0002e782 mov.w r6, 0xfc00 |
0x0002e786 movt r6, 0xffff | r6 = 0x-400;
0x0002e78a add r7, sp, 0x290 | r7 += arg_290h;
0x0002e78c ldr r2, [r3, 4] | r2 = *((r3 + 4));
0x0002e78e mov r0, r3 | r0 = r3;
0x0002e790 str r3, [sp, 0xc] | var_ch = r3;
0x0002e792 ldr r2, [r2, 0x10] | r2 = *((r2 + 0x10));
0x0002e794 blx r2 | uint32_t (*r2)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x0002e796 ldr r3, [sp, 0xc] | r3 = var_ch;
0x0002e798 movs r2, 1 | r2 = 1;
0x0002e79a strd r6, r7, [sp] | __asm ("strd r6, r7, [sp]");
0x0002e79e mov r0, r3 | r0 = r3;
0x0002e7a0 movs r3, 0 | r3 = 0;
0x0002e7a2 blx 0xb42c | r0 = fcn_0000b42c ();
0x0002e7a6 cbz r0, 0x2e7b2 |
| while (r0 == 0) {
| label_2:
0x0002e7a8 movw r7, 0xb7ad |
0x0002e7ac movt r7, 0x7f2b | r7 = 0x7f2bb7ad;
0x0002e7b0 b 0x2e6b8 | goto label_1;
0x0002e7b2 mov r0, sb | r0 = sb;
0x0002e7b4 blx 0xb97c | r0 = fcn_0000b97c ();
0x0002e7b8 mov r1, r0 | r1 = r0;
0x0002e7ba cmp r0, 0 |
0x0002e7bc beq 0x2e7a8 |
| }
0x0002e7be str r1, [sp, 4] | var_4h = r1;
0x0002e7c0 mov r0, r8 | r0 = r8;
0x0002e7c2 mov r2, sl | r2 = sl;
0x0002e7c4 mov r3, fp | r3 = fp;
0x0002e7c6 str r6, [sp] | *(sp) = r6;
0x0002e7c8 str r1, [sp, 0xc] | var_ch = r1;
0x0002e7ca blx 0xb42c | fcn_0000b42c ();
0x0002e7ce ldr r1, [sp, 0xc] | r1 = var_ch;
| if (r0 == 0) {
0x0002e7d0 cbnz r0, 0x2e7f8 |
0x0002e7d2 ldrh r3, [r1, 0x38] | r3 = *((r1 + 0x38));
0x0002e7d4 mov r0, r7 | r0 = r7;
0x0002e7d6 mov.w r2, 0x400 | r2 = 0x400;
0x0002e7da mvns r3, r3 | r3 = ~r3;
0x0002e7dc strh r3, [r1, 0x38] | *((r1 + 0x38)) = r3;
0x0002e7de blx 0xb380 | stpcpy ();
0x0002e7e2 ldr r1, [sp, 0xc] | r1 = var_ch;
0x0002e7e4 mov r6, r0 | r6 = r0;
| if (r0 == 0) {
0x0002e7e6 cbz r0, 0x2e800 | goto label_9;
| }
0x0002e7e8 mov r0, r1 | r0 = r1;
0x0002e7ea movw r7, 0xb7ad |
0x0002e7ee movt r7, 0x7f2b | r7 = 0x7f2bb7ad;
0x0002e7f2 blx 0xb1b8 | fcn_0000b1b8 ();
0x0002e7f6 b 0x2e6b8 | goto label_1;
| }
0x0002e7f8 mov r0, r1 | r0 = r1;
0x0002e7fa blx 0xb1b8 | fcn_0000b1b8 ();
0x0002e7fe b 0x2e7a8 | goto label_2;
| label_9:
0x0002e800 mov.w r2, 0x400 | r2 = 0x400;
0x0002e804 mov.w r0, -1 | r0 = -1;
0x0002e808 str r1, [sp, 0xc] | var_ch = r1;
0x0002e80a blx 0xb4e8 | fcn_0000b4e8 ();
0x0002e80e ldr r3, [sp, 0x18] | r3 = var_18h;
0x0002e810 ldr r1, [sp, 0xc] | r1 = var_ch;
0x0002e812 ldr r3, [r3, 0x28] | r3 = *((r3 + 0x28));
0x0002e814 cmp r0, r3 |
0x0002e816 mov r0, r1 | r0 = r1;
| if (r0 != r3) {
0x0002e818 beq 0x2e828 |
0x0002e81a movw r7, 0xb7ad |
0x0002e81e movt r7, 0x7f2b | r7 = 0x7f2bb7ad;
0x0002e822 blx 0xb1b8 | fcn_0000b1b8 ();
0x0002e826 b 0x2e6b8 | goto label_1;
| }
0x0002e828 blx 0xb1b8 | fcn_0000b1b8 ();
0x0002e82c ldr r3, [r5, 0x40] | r3 = *((r5 + 0x40));
0x0002e82e strd sb, r4, [r5, 0x38] | __asm ("strd sb, r4, [r5, 0x38]");
0x0002e832 cmp r3, 1 |
| if (r3 == 1) {
0x0002e834 beq.w 0x2e99a | goto label_10;
| }
0x0002e838 mov r0, r5 | r0 = r5;
0x0002e83a bl 0x2df70 | r0 = fcn_0002df70 (r0);
0x0002e83e cmp r0, 0 |
| if (r0 != 0) {
0x0002e840 bne.w 0x2e706 | goto label_0;
| }
0x0002e844 ldrd r3, r6, [r5, 0x38] | __asm ("ldrd r3, r6, [r5, 0x38]");
| label_4:
0x0002e848 lsrs r3, r3, 4 | r3 >>= 4;
0x0002e84a ldr r2, [sp, 0x20] | r2 = var_20h;
0x0002e84c strd sl, fp, [r5, 0x18] | __asm ("strd sl, fp, [r5, 0x18]");
0x0002e850 orr.w r3, r3, r6, lsl 28 | r3 |= (r6 << 28);
0x0002e854 str r2, [r5, 0x2c] | *((r5 + 0x2c)) = r2;
0x0002e856 subs r3, 1 | r3--;
0x0002e858 str r3, [sp, 0x1c] | var_1ch = r3;
0x0002e85a ldr r3, [sp, 0x18] | r3 = var_18h;
0x0002e85c ldr.w sl, [r3, 0x18] | sl = *((r3 + 0x18));
0x0002e860 ldr.w fp, [r3, 0x1c] | fp = *((r3 + 0x1c));
0x0002e864 str.w sl, [r5, 0x20] | __asm ("str.w sl, [r5, 0x20]");
0x0002e868 str.w fp, [r5, 0x24] | __asm ("str.w fp, [r5, 0x24]");
0x0002e86c cmp r2, 0 |
| if (r2 == 0) {
0x0002e86e beq 0x2e952 | goto label_11;
| }
0x0002e870 mov r6, sl | r6 = sl;
0x0002e872 ldr.w sl, [sp, 8] | sl = var_8h;
0x0002e876 movw r3, 0xcade |
0x0002e87a movt r3, 0xcade | r3 = 0xcadecade;
0x0002e87e str r3, [sp, 0x24] | *(arg_24h) = r3;
0x0002e880 movs r3, 0 | r3 = 0;
0x0002e882 str r3, [sp, 0x14] | var_14h = r3;
| label_3:
0x0002e884 movs r3, 1 | r3 = 1;
0x0002e886 strd r6, fp, [r5, 0x10] | __asm ("strd r6, fp, [r5, 0x10]");
0x0002e88a str r3, [sp] | *(sp) = r3;
0x0002e88c mov r2, r6 | r2 = r6;
0x0002e88e ldr r3, [r5, 0x28] | r3 = *((r5 + 0x28));
0x0002e890 str r3, [sp, 4] | var_4h = r3;
0x0002e892 mov r3, fp | r3 = fp;
0x0002e894 ldr r0, [r5, 4] | r0 = *((r5 + 4));
0x0002e896 blx 0xb42c | fcn_0000b42c ();
0x0002e89a str r0, [sp, 8] | var_8h = r0;
0x0002e89c cmp r0, 0 |
| if (r0 != 0) {
0x0002e89e bne 0x2e99e | goto label_12;
| }
0x0002e8a0 ldr r1, [r5, 0x28] | r1 = *((r5 + 0x28));
0x0002e8a2 ldr r2, [sp, 0x24] | r2 = *(arg_24h);
0x0002e8a4 ldr r3, [r1] | r3 = *(r1);
0x0002e8a6 cmp r3, r2 |
| if (r3 != r2) {
0x0002e8a8 bne 0x2e970 | goto label_13;
| }
0x0002e8aa ldr r3, [sp, 8] | r3 = var_8h;
0x0002e8ac mov r2, sb | r2 = sb;
0x0002e8ae ldr r4, [r1, 4] | r4 = *((r1 + 4));
0x0002e8b0 mov.w r0, -1 | r0 = -1;
0x0002e8b4 str r3, [r1, 4] | *((r1 + 4)) = r3;
0x0002e8b6 blx 0xb4e8 | r0 = fcn_0000b4e8 ();
0x0002e8ba cmp r4, r0 |
| if (r4 != r0) {
0x0002e8bc bne 0x2e970 | goto label_13;
| }
0x0002e8be ldr r2, [sp, 0x14] | r2 = var_14h;
0x0002e8c0 adds r6, 1 | r6++;
0x0002e8c2 ldr r3, [r5, 0x2c] | r3 = *((r5 + 0x2c));
0x0002e8c4 adc fp, fp, 0 | __asm ("adc fp, fp, 0");
0x0002e8c8 ldr r7, [r5, 0x28] | r7 = *((r5 + 0x28));
0x0002e8ca subs r3, r3, r2 | r3 -= r2;
0x0002e8cc ldr r2, [sp, 0x1c] | r2 = var_1ch;
0x0002e8ce cmp r3, r2 |
0x0002e8d0 it hs |
| if (r3 < r2) {
0x0002e8d2 movhs r3, r2 | r3 = r2;
| }
0x0002e8d4 str r3, [sp, 0xc] | var_ch = r3;
| if (r3 == 0) {
0x0002e8d6 cbz r3, 0x2e944 | goto label_14;
| }
0x0002e8d8 ldr.w r8, [sp, 8] | r8 = var_8h;
0x0002e8dc mov r3, r5 | r3 = r5;
0x0002e8de adds r7, 0x20 | r7 += 0x20;
0x0002e8e0 add.w r2, sb, -1 | r2 = sb + -1;
0x0002e8e4 str r2, [sp, 0x10] | var_10h = r2;
0x0002e8e6 mov r5, r8 | r5 = r8;
0x0002e8e8 mov r8, r3 | r8 = r3;
| do {
0x0002e8ea ldr r0, [r7, -0x4] | r0 = *((r7 - 0x4));
0x0002e8ee mov r1, sb | r1 = sb;
0x0002e8f0 ldr r3, [sp, 0x10] | r3 = var_10h;
0x0002e8f2 adds r5, 1 | r5++;
0x0002e8f4 adds r7, 0x10 | r7 += 0x10;
0x0002e8f6 add r0, r3 | r0 += r3;
0x0002e8f8 bl 0x30970 | fcn_00030970 (r0, r1, r2);
0x0002e8fc ldr r1, [r7, -0x1c] | r1 = *((r7 - 0x1c));
0x0002e900 mov r4, r0 | r4 = r0;
0x0002e902 ldr r3, [sp, 8] | r3 = var_8h;
0x0002e904 mov r2, sb | r2 = sb;
0x0002e906 ldr r0, [r7, -0x20] | r0 = *((r7 - 0x20));
0x0002e90a mul r1, sl, r1 | r1 = sl * r1;
0x0002e90e mla r1, r3, r0, r1 | __asm ("mla r1, r3, r0, r1");
0x0002e912 umull r0, r3, r0, sl | r0:r3 = r0 * sl;
0x0002e916 add r1, r3 | r1 += r3;
0x0002e918 movs r3, 0 | r3 = 0;
0x0002e91a bl 0x312b0 | fcn_000312b0 (r0, r1, r2, r3);
0x0002e91e str r4, [sp] | *(sp) = r4;
0x0002e920 mov r2, r0 | r2 = r0;
0x0002e922 mov r3, r1 | r3 = r1;
0x0002e924 ldr.w r0, [r8, 0x50] | r0 = *((r8 + 0x50));
0x0002e928 blx 0xc2ac | fcn_0000c2ac ();
0x0002e92c ldr r3, [sp, 0xc] | r3 = var_ch;
0x0002e92e adds r4, r4, r6 | r4 += r6;
0x0002e930 adc fp, fp, 0 | __asm ("adc fp, fp, 0");
0x0002e934 mov r6, r4 | r6 = r4;
0x0002e936 strd r4, fp, [r8, 8] | __asm ("strd r4, fp, [r8, 8]");
0x0002e93a cmp r5, r3 |
0x0002e93c str.w r5, [r8, 0x30] | __asm ("str.w r5, [r8, 0x30]");
0x0002e940 bne 0x2e8ea |
| } while (r5 != r3);
0x0002e942 mov r5, r8 | r5 = r8;
| label_14:
0x0002e944 ldr r3, [sp, 0x14] | r3 = var_14h;
0x0002e946 ldr r2, [sp, 0x1c] | r2 = var_1ch;
0x0002e948 add r3, r2 | r3 += r2;
0x0002e94a ldr r2, [sp, 0x20] | r2 = var_20h;
0x0002e94c str r3, [sp, 0x14] | var_14h = r3;
0x0002e94e cmp r2, r3 |
| if (r2 > r3) {
0x0002e950 bhi 0x2e884 | goto label_3;
| }
| label_11:
0x0002e952 ldr r2, [sp, 0x18] | r2 = var_18h;
0x0002e954 movs r7, 0 | r7 = 0;
0x0002e956 ldrd r3, r0, [r2, 0x2c] | __asm ("ldrd r3, r0, [r2, 0x2c]");
0x0002e95a ldrd r1, r2, [r2, 0x34] | __asm ("ldrd r1, r2, [r2, 0x34]");
0x0002e95e bic r3, r3, 1 | r3 = BIT_MASK (r3, 1);
0x0002e962 strd r3, r0, [r5, 0x14c] | __asm ("strd r3, r0, aav.0x000000ff");
0x0002e966 str.w r1, [r5, 0x154] | __asm ("str.w r1, aav.0x000000ff");
0x0002e96a str.w r2, [r5, 0x158] | __asm ("str.w r2, aav.0x000000ff");
0x0002e96e b 0x2e6b8 | goto label_1;
| label_13:
0x0002e970 movw r7, 0xb7ac |
0x0002e974 movt r7, 0x7f2b | r7 = 0x7f2bb7ac;
| do {
0x0002e978 vmov.i32 d16, 0 | __asm ("vmov.i32 d16, 0");
0x0002e97c movs r4, 0 | r4 = 0;
0x0002e97e ldr r0, [r5, 0x28] | r0 = *((r5 + 0x28));
0x0002e980 str r4, [r5, 0x30] | *((r5 + 0x30)) = r4;
0x0002e982 vstr d16, [r5, 8] | __asm ("vstr d16, [r5, 8]");
0x0002e986 vstr d16, [r5, 0x10] | __asm ("vstr d16, [r5, 0x10]");
0x0002e98a blx 0xb1b8 | fcn_0000b1b8 ();
0x0002e98e ldr r0, [r5, 0x50] | r0 = *((r5 + 0x50));
0x0002e990 str r4, [r5, 0x28] | *((r5 + 0x28)) = r4;
0x0002e992 blx 0xb068 | secure_getenv ();
0x0002e996 str r4, [r5, 0x40] | *((r5 + 0x40)) = r4;
0x0002e998 b 0x2e6b8 | goto label_1;
| label_10:
0x0002e99a mov r3, sb | r3 = sb;
0x0002e99c b 0x2e848 | goto label_4;
| label_12:
0x0002e99e ldr r7, [sp, 8] | r7 = var_8h;
0x0002e9a0 b 0x2e978 |
| } while (1);
| label_7:
0x0002e9a2 blx 0xb47c | sysconf ();
0x0002e9a6 nop |
| if (r0 != 0) {
0x0002e9a8 cbz r0, 0x2e9da |
0x0002e9aa movs r2, r0 | r2 = r0;
0x0002e9ac lsls r4, r3, 0x1d | r4 = r3 << 0x1d;
0x0002e9ae movs r0, r0 |
| if (r0 != 0) {
0x0002e9b0 cbz r0, 0x2e9d8 |
0x0002e9b2 movs r2, r0 | r2 = r0;
0x0002e9b4 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0002e9b8 ldr.w sb, [pc, 0x20c] |
0x0002e9bc add sb, pc | sb = 0x5d588;
0x0002e9be cmp r0, 0 |
| if (r0 == 0) {
0x0002e9c0 beq.w 0x2eada | goto label_15;
| }
0x0002e9c4 mov r6, r0 | r6 = r0;
0x0002e9c6 movs r0, 0x64 | r0 = 0x64;
0x0002e9c8 mov r7, r1 | r7 = r1;
0x0002e9ca mov r8, r2 | r8 = r2;
0x0002e9cc blx 0xb97c | fcn_0000b97c ();
0x0002e9ce invalid |
0x0002e9d2 cmp r0, 0 |
| if (r0 == 0) {
0x0002e9d4 beq.w 0x2eb9e | goto label_16;
| }
| }
0x0002e9d8 movs r2, 0x60 | r2 = 0x60;
| }
0x0002e9da movs r1, 0 | r1 = 0;
0x0002e9dc adds r0, 4 | r0 += 4;
0x0002e9de blx 0xbca0 | fcn_0000bca0 ();
0x0002e9e2 movw r3, 0xb705 |
0x0002e9e6 movs r1, 1 | r1 = 1;
0x0002e9e8 movt r3, 0x7f2b | r3 = 0x7f2bb705;
0x0002e9ec mov.w r0, 0x320 | r0 = 0x320;
0x0002e9f0 str r3, [r5] | *(r5) = r3;
0x0002e9f2 blx 0xaeb8 | r0 = calloc (r0, r1);
0x0002e9f6 mov r4, r0 | r4 = r0;
0x0002e9f8 cmp r0, 0 |
| if (r0 != 0) {
0x0002e9fa beq 0x2ea84 |
0x0002e9fc ldr r3, [pc, 0x1cc] |
0x0002e9fe mov r0, r6 | r0 = r6;
0x0002ea00 ldr.w r3, [sb, r3] | r3 = *((sb + r3));
0x0002ea04 ldr r3, [r3] | r3 = *(0x2ebcc);
0x0002ea06 str r3, [r5, 4] | *((r5 + 4)) = r3;
0x0002ea08 blx 0xbaf4 | r0 = pthread_attr_init (r0);
0x0002ea0c add.w sb, r0, 1 | sb = r0 + 1;
0x0002ea10 mov r0, sb | r0 = sb;
0x0002ea12 blx 0xb97c | r0 = fcn_0000b97c ();
0x0002ea16 cmp r0, 0 |
| if (r0 == 0) {
0x0002ea18 beq 0x2eaa2 | goto label_17;
| }
0x0002ea1a mov r2, sb | r2 = sb;
0x0002ea1c ldr.w sb, [pc, 0x1b0] |
0x0002ea20 mov r1, r6 | r1 = r6;
0x0002ea22 str r0, [r5, 8] | *((r5 + 8)) = r0;
0x0002ea24 blx 0xb280 | fcn_0000b280 ();
0x0002ea28 movw r3, 0xb706 |
0x0002ea2c add sb, pc | sb = 0x5d600;
0x0002ea2e movt r3, 0x7f2b | r3 = 0x7f2bb706;
0x0002ea32 movs r0, 1 | r0 = 1;
0x0002ea34 str r3, [r4] | *(r4) = r3;
0x0002ea36 movs r1, 0 | r1 = 0;
0x0002ea38 ldr.w r3, [sb, 4] | r3 = *(0x5d604);
0x0002ea3c mov.w r2, 0x400 | r2 = 0x400;
0x0002ea40 strd r0, r1, [r4, 0x18] | __asm ("strd r0, r1, [r4, 0x18]");
0x0002ea44 movs r0, 2 | r0 = 2;
0x0002ea46 movs r1, 0 | r1 = 0;
0x0002ea48 mov.w sl, 1 | sl = 1;
0x0002ea4c strd r0, r1, [r4, 0x20] | __asm ("strd r0, r1, [r4, 0x20]");
0x0002ea50 movs r0, 3 | r0 = 3;
0x0002ea52 movs r1, 0 | r1 = 0;
0x0002ea54 str r4, [r5, 0x58] | *((r5 + 0x58)) = r4;
0x0002ea56 str r2, [r5, 0xc] | *((r5 + 0xc)) = r2;
0x0002ea58 str.w sl, [r5, 0x18] | __asm ("str.w sl, [r5, 0x18]");
0x0002ea5c strd r0, r1, [r4, 8] | __asm ("strd r0, r1, [r4, 8]");
0x0002ea60 cmp r3, 0 |
| if (r3 == 0) {
0x0002ea62 beq 0x2eb5e | goto label_18;
| }
0x0002ea64 mov r0, r6 | r0 = r6;
0x0002ea66 ldr r3, [r3, 8] | r3 = *((r3 + 8));
0x0002ea68 bic r1, r7, 0x10 | r1 = BIT_MASK (r7, 0x10);
0x0002ea6c add.w r2, r4, 0x34 | r2 = r4 + 0x34;
0x0002ea70 blx r3 | r0 = uint32_t (*r3)(uint32_t) (r2);
0x0002ea72 mov r6, r0 | r6 = r0;
0x0002ea74 cmp r0, 0 |
| if (r0 == 0) {
0x0002ea76 beq 0x2eae8 | goto label_19;
| }
0x0002ea78 ldr r0, [pc, 0x158] |
0x0002ea7a mov r1, r4 | r1 = r4;
0x0002ea7c add r0, pc | r0 = 0x5d654;
0x0002ea7e blx 0xb3cc | fcn_0000b3cc ();
0x0002ea80 stc p0, c14, [r6], 0x5c | __asm ("stc p0, c14, [r6], 0x5c");
0x0002ea82 b 0x2eab4 | goto label_6;
| }
0x0002ea84 ldr r0, [pc, 0x150] |
0x0002ea86 movw r6, 0xb746 |
0x0002ea8a movt r6, 0x7f2b | r6 = 0x7f2bb746;
0x0002ea8e mov r1, r4 | r1 = r4;
0x0002ea90 add r0, pc | r0 = 0x5d66c;
0x0002ea92 blx 0xb3cc | fcn_0000b3cc ();
| do {
0x0002ea96 mov r0, r5 | r0 = r5;
0x0002ea98 blx 0xb1b8 | fcn_0000b1b8 ();
| label_5:
0x0002ea9c mov r0, r6 | r0 = r6;
0x0002ea9e pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_17:
0x0002eaa2 ldr r0, [pc, 0x138] |
0x0002eaa4 movw r6, 0xb746 |
0x0002eaa8 movt r6, 0x7f2b | r6 = 0x7f2bb746;
0x0002eaac mov r1, r4 | r1 = r4;
0x0002eaae add r0, pc | r0 = 0x5d690;
0x0002eab0 blx 0xb3cc | fcn_0000b3cc ();
| label_6:
0x0002eab4 ldr r0, [r4, 4] | r0 = *((r4 + 4));
| if (r0 != 0) {
0x0002eab6 cbz r0, 0x2eabe |
0x0002eab8 ldr r3, [r0, 4] | r3 = *((r0 + 4));
0x0002eaba ldr r3, [r3, 0xc] | r3 = *((r3 + 0xc));
0x0002eabc blx r3 | uint32_t (*r3)(uint32_t) (r3);
| }
0x0002eabe ldr.w r0, [r4, 0x11c] | r0 = *((r4 + 0x11c));
| if (r0 != 0) {
0x0002eac2 cbz r0, 0x2eac8 |
0x0002eac4 blx 0xb1b8 | fcn_0000b1b8 ();
| }
0x0002eac8 ldr r0, [r4, 0x34] | r0 = *((r4 + 0x34));
| if (r0 != 0) {
0x0002eaca cbz r0, 0x2ead2 |
0x0002eacc ldr r3, [r0, 4] | r3 = *((r0 + 4));
0x0002eace ldr r3, [r3, 0xc] | r3 = *((r3 + 0xc));
0x0002ead0 blx r3 | uint32_t (*r3)(uint32_t) (r3);
| }
0x0002ead2 mov r0, r4 | r0 = r4;
0x0002ead4 blx 0xb1b8 | fcn_0000b1b8 ();
0x0002ead8 b 0x2ea96 |
| } while (1);
| label_15:
0x0002eada movw r6, 0xb73a |
0x0002eade movt r6, 0x7f2b | r6 = 0x7f2bb73a;
0x0002eae2 mov r0, r6 | r0 = r6;
0x0002eae4 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_19:
0x0002eae8 ldr.w r0, [sb, 8] | r0 = *((sb + 8));
0x0002eaec blx 0xb444 | fcn_0000b444 ();
0x0002eaf0 str.w r0, [r4, 0x11c] | __asm ("str.w r0, aav.0x000000ff");
0x0002eaf4 cmp r0, 0 |
| if (r0 == 0) {
0x0002eaf6 beq 0x2ebb2 | goto label_20;
| }
0x0002eaf8 mov.w r2, 0x180 | r2 = 0x180;
0x0002eafc movs r1, 0x42 | r1 = 0x42;
0x0002eafe blx 0xc608 | r0 = fcn_0000c608 ();
0x0002eb02 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 < r0) {
0x0002eb04 blt 0x2eb92 | goto label_21;
| }
0x0002eb06 ldr.w r3, [sb, 4] | r3 = *((sb + 4));
0x0002eb0a mov r1, sl | r1 = sl;
0x0002eb0c ldr.w r0, [r4, 0x11c] | r0 = *((r4 + 0x11c));
0x0002eb10 adds r2, r4, 4 | r2 = r4 + 4;
0x0002eb12 ldr r3, [r3, 8] | r3 = *((r3 + 8));
0x0002eb14 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x0002eb16 mov r6, r0 | r6 = r0;
| if (r0 != 0) {
0x0002eb18 cbnz r0, 0x2eb86 | goto label_22;
| }
0x0002eb1a ldr r1, [r4, 0x34] | r1 = *((r4 + 0x34));
0x0002eb1c ldr r0, [r4, 4] | r0 = *((r4 + 4));
| if (r1 != 0) {
0x0002eb1e cbz r1, 0x2eb36 |
0x0002eb20 ldr r3, [r5, 0x1c] | r3 = *((r5 + 0x1c));
0x0002eb22 ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x0002eb24 bic r3, r3, 2 | r3 = BIT_MASK (r3, 2);
0x0002eb28 and r2, r2, 2 | r2 &= 2;
0x0002eb2c orrs r3, r2 | r3 |= r2;
0x0002eb2e str r3, [r5, 0x1c] | *((r5 + 0x1c)) = r3;
0x0002eb30 ldr r3, [pc, 0xac] |
0x0002eb32 add r3, pc | r3 = 0x5d716;
0x0002eb34 str r3, [r1, 0x10] | *((r1 + 0x10)) = r3;
| }
| if (r0 != 0) {
0x0002eb36 cbz r0, 0x2eb44 |
0x0002eb38 mov r1, r4 | r1 = r4;
0x0002eb3a mov r0, r7 | r0 = r7;
0x0002eb3c bl 0x2e688 | r0 = fcn_0002e688 (r0, r1, r2, r3, r4, r5);
0x0002eb40 mov r6, r0 | r6 = r0;
| if (r0 != 0) {
0x0002eb42 cbnz r0, 0x2eb74 | goto label_23;
| }
| }
0x0002eb44 ldr r0, [pc, 0x9c] |
0x0002eb46 mov r1, r4 | r1 = r4;
0x0002eb48 add r0, pc | r0 = 0x5d730;
0x0002eb4a blx 0xb304 | r0 = fcn_0000b304 ();
0x0002eb4e mov r6, r0 | r6 = r0;
| if (r0 == 0) {
0x0002eb50 cbnz r0, 0x2eb74 |
0x0002eb52 mov r0, r7 | r0 = r7;
0x0002eb54 str.w r5, [r8] | __asm ("str.w r5, [r8]");
0x0002eb58 blx 0xc530 | fcn_0000c530 ();
0x0002eb5c b 0x2ea9c | goto label_5;
| label_18:
0x0002eb5e ldr r7, [pc, 0x88] |
0x0002eb60 mov r1, r4 | r1 = r4;
0x0002eb62 add r7, pc | r7 = 0x5d750;
0x0002eb64 mov r0, r7 | r0 = r7;
0x0002eb66 blx 0xb304 | r0 = fcn_0000b304 ();
0x0002eb6a mov r6, r0 | r6 = r0;
| if (r0 != 0) {
0x0002eb6c cbnz r0, 0x2ebbe | goto label_24;
| }
0x0002eb6e str.w r5, [r8] | __asm ("str.w r5, [r8]");
0x0002eb72 b 0x2ea9c | goto label_5;
| }
| label_23:
0x0002eb74 ldr r0, [pc, 0x74] |
0x0002eb76 mov r1, r4 | r1 = r4;
0x0002eb78 add r0, pc | r0 = 0x5d768;
0x0002eb7a blx 0xb3cc | fcn_0000b3cc ();
| do {
0x0002eb7e mov r0, r7 | r0 = r7;
0x0002eb80 blx 0xc530 | fcn_0000c530 ();
0x0002eb84 b 0x2eab4 | goto label_6;
| label_22:
0x0002eb86 ldr r0, [pc, 0x68] |
0x0002eb88 mov r1, r4 | r1 = r4;
0x0002eb8a add r0, pc | r0 = 0x5d780;
0x0002eb8c blx 0xb3cc | fcn_0000b3cc ();
0x0002eb90 b 0x2eb7e |
| } while (1);
| label_21:
0x0002eb92 ldr r0, [pc, 0x60] |
0x0002eb94 mov r1, r4 | r1 = r4;
0x0002eb96 add r0, pc | r0 = 0x5d790;
0x0002eb98 blx 0xb3cc | fcn_0000b3cc ();
0x0002eb9c b 0x2eab4 | goto label_6;
| label_16:
0x0002eb9e ldr r0, [pc, 0x58] |
0x0002eba0 mov r1, r5 | r1 = r5;
0x0002eba2 movw r6, 0xb746 |
0x0002eba6 movt r6, 0x7f2b | r6 = 0x7f2bb746;
0x0002ebaa add r0, pc | r0 = 0x5d7a8;
0x0002ebac blx 0xb3cc | fcn_0000b3cc ();
0x0002ebb0 b 0x2ea9c | goto label_5;
| label_20:
0x0002ebb2 ldr r0, [pc, 0x48] |
0x0002ebb4 mov r1, r4 | r1 = r4;
0x0002ebb6 add r0, pc | r0 = 0x5d7b8;
0x0002ebb8 blx 0xb3cc | fcn_0000b3cc ();
0x0002ebbc b 0x2eab4 | goto label_6;
| label_24:
0x0002ebbe mov r1, r4 | r1 = r4;
0x0002ebc0 mov r0, r7 | r0 = r7;
0x0002ebc2 blx 0xb3cc | fcn_0000b3cc ();
0x0002ebc6 b 0x2eab4 | goto label_6;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/libext2fs.so.2.4 @ 0x2f0dc */
| #include <stdint.h>
|
; (fcn) fcn.0002f0dc () | void fcn_0002f0dc (int16_t arg_48h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h;
| int32_t var_4h;
| int16_t var_8h;
| int16_t var_10h;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0002f0dc push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0002f0e0 sub sp, 0x24 |
0x0002f0e2 mov r5, r3 | r5 = r3;
0x0002f0e4 ldrd r3, fp, [sp, 0x48] | __asm ("ldrd r3, fp, [arg_48h]");
0x0002f0e8 mov r4, r1 | r4 = r1;
0x0002f0ea str r0, [sp, 0x18] | var_18h = r0;
0x0002f0ec cmp r3, 1 |
0x0002f0ee str r2, [sp, 0x1c] | var_1ch = r2;
| if (r3 == 1) {
0x0002f0f0 beq.w 0x2f384 | goto label_12;
| }
0x0002f0f4 ldr r3, [sp, 0x48] | r3 = *(arg_48h);
0x0002f0f6 ldr r1, [r4, 8] | r1 = *((r4 + 8));
0x0002f0f8 cmp r3, 0 |
0x0002f0fa itett ge |
| if (r3 < 0) {
0x0002f0fc ldrge r3, [sp, 0x18] | r3 = var_18h;
| }
| if (r3 < 0) {
0x0002f0fe rsblt r8, r3, 0 | __asm ("rsblt r8, r3, 0");
| }
| if (r3 < 0) {
0x0002f102 ldrge r2, [sp, 0x48] | r2 = *(arg_48h);
| }
| if (r3 >= 0) {
0x0002f104 ldr r3, [r3, 0xc] | r3 = *((r3 + 0xc));
| }
0x0002f106 it ge |
| if (r3 < 0) {
0x0002f108 mulge r8, r3, r2 | r8 = r3 * r2;
| }
0x0002f10c lsls r3, r1, 0x1b | r3 = r1 << 0x1b;
| if (r3 >= r1) {
0x0002f10e bpl.w 0x2f390 | goto label_13;
| }
| label_5:
0x0002f112 asr.w r7, r8, 0x1f | r7 = r8 >> 0x1f;
0x0002f116 add.w r6, r4, 0x130 | r6 = r4 + 0x130;
0x0002f11a mov r0, r6 | r0 = r6;
0x0002f11c str r7, [sp, 0x10] | var_10h = r7;
0x0002f11e blx 0xb21c | fcn_0000b21c ();
0x0002f122 ldr.w r3, [r4, 0xf8] | r3 = *((r4 + 0xf8));
0x0002f126 ldr r1, [r4, 8] | r1 = *((r4 + 8));
0x0002f128 adds.w r3, r3, r8 | r3 += r8;
0x0002f12c str.w r3, [r4, 0xf8] | __asm ("str.w r3, [r4, 0xf8]");
0x0002f130 ldr.w r3, [r4, 0xfc] | r3 = *((r4 + 0xfc));
0x0002f134 adc.w r3, r3, r7 | __asm ("adc.w r3, r3, r7");
0x0002f138 lsls r2, r1, 0x1b | r2 = r1 << 0x1b;
0x0002f13a str.w r3, [r4, 0xfc] | __asm ("str.w r3, [r4, 0xfc]");
| if (r2 < r1) {
0x0002f13e bpl 0x2f148 |
0x0002f140 mov r0, r6 | r0 = r6;
0x0002f142 blx 0xae94 | pthread_mutex_unlock ();
0x0002f146 ldr r1, [r4, 8] | r1 = *((r4 + 8));
| }
| label_6:
0x0002f148 ldr r3, [sp, 0x18] | r3 = var_18h;
0x0002f14a ldr r0, [sp, 0x1c] | r0 = var_1ch;
0x0002f14c ldr r2, [r3, 0xc] | r2 = *((r3 + 0xc));
0x0002f14e ldr.w ip, [r3, 0x60] | ip = *((r3 + 0x60));
0x0002f152 mov r6, r2 | r6 = r2;
0x0002f154 asrs r3, r2, 0x1f | r3 = r2 >> 0x1f;
0x0002f156 mov r7, ip | r7 = ip;
0x0002f158 mul lr, r0, r3 | lr = r0 * r3;
0x0002f15c mla lr, r2, r5, lr | __asm ("mla lr, r2, r5, lr");
0x0002f160 umull r5, sl, r0, r2 | r5:sl = r0 * r2;
0x0002f164 ldr r0, [r4, 0x18] | r0 = *((r4 + 0x18));
0x0002f166 adds r5, r5, r0 | r5 += r0;
0x0002f168 ldr r0, [r4, 0x1c] | r0 = *((r4 + 0x1c));
0x0002f16a add sl, lr | sl += lr;
0x0002f16c adc.w sl, sl, r0 | __asm ("adc.w sl, sl, r0");
0x0002f170 ands sb, r1, 8 | sb = r1 & 8;
| if (sb != r1) {
0x0002f174 bne.w 0x2f366 | goto label_14;
| }
0x0002f178 cmp.w ip, 0 |
| if (ip != 0) {
0x0002f17c beq 0x2f18e |
0x0002f17e orr.w r3, fp, r5 | r3 = fp | r5;
0x0002f182 add.w r1, ip, -1 | r1 = ip + -1;
0x0002f186 orr.w r3, r3, r8 | r3 |= r8;
0x0002f18a tst r3, r1 |
| if ((r3 & r1) != 0) {
0x0002f18c bne 0x2f262 | goto label_11;
| }
| }
0x0002f18e strd r5, sl, [sp] | __asm ("strd r5, sl, [sp]");
0x0002f192 mov r2, r8 | r2 = r8;
0x0002f194 ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x0002f196 mov r1, fp | r1 = fp;
0x0002f198 blx 0xbd6c | fcn_0000bd6c ();
0x0002f19c cmp.w r8, 0x4000 |
0x0002f1a0 mov r7, r0 | r7 = r0;
| if (r8 > 0x4000) {
0x0002f1a2 bgt.w 0x2f3e2 | goto label_15;
| }
| label_8:
0x0002f1a6 cmp r7, r8 |
| if (r7 == r8) {
0x0002f1a8 beq.w 0x2f3b0 | goto label_16;
| }
0x0002f1ac ldr r3, [sp, 0x18] | r3 = var_18h;
0x0002f1ae ldr.w ip, [r3, 0x60] | ip = *((r3 + 0x60));
0x0002f1b2 cmp.w ip, 0 |
0x0002f1b6 bne 0x2f24a |
| while ((r3 & r2) == 0) {
0x0002f1b8 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x0002f1ba lsls r1, r3, 0x1b | r1 = r3 << 0x1b;
| if (r1 < r3) {
0x0002f1bc bpl 0x2f1c6 |
0x0002f1be add.w r0, r4, 0x118 | r0 = r4 + 0x118;
0x0002f1c2 blx 0xb21c | fcn_0000b21c ();
| }
0x0002f1c6 movs r1, 0 | r1 = 0;
0x0002f1c8 mov r2, r5 | r2 = r5;
0x0002f1ca str r1, [sp] | *(sp) = r1;
0x0002f1cc mov r3, sl | r3 = sl;
0x0002f1ce ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x0002f1d0 blx 0xaef0 | fcn_0000aef0 ();
0x0002f1d4 cmp r1, 0 |
| if (r1 >= 0) {
0x0002f1d6 blt 0x2f208 |
0x0002f1d8 mov r1, fp | r1 = fp;
0x0002f1da ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x0002f1dc mov r2, r8 | r2 = r8;
0x0002f1de blx 0xbdc8 | fcn_0000bdc8 ();
0x0002f1e2 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x0002f1e4 mov r7, r0 | r7 = r0;
0x0002f1e6 lsls r1, r3, 0x1b | r1 = r3 << 0x1b;
| if (r1 < r3) {
0x0002f1e8 bpl 0x2f1f2 |
0x0002f1ea add.w r0, r4, 0x118 | r0 = r4 + 0x118;
0x0002f1ee blx 0xae94 | pthread_mutex_unlock ();
| }
0x0002f1f2 cmp r7, 0 |
| if (r7 < 0) {
0x0002f1f4 blt.w 0x2f3fe | goto label_17;
| }
0x0002f1f8 cmp r7, r8 |
| if (r7 == r8) {
0x0002f1fa beq.w 0x2f3b0 | goto label_16;
| }
| label_1:
0x0002f1fe movw r5, 0xb725 |
0x0002f202 movt r5, 0x7f2b | r5 = 0x7f2bb725;
0x0002f206 b 0x2f22a |
| } else {
| label_0:
0x0002f208 blx 0xbc04 | r0 = fcn_0000bc04 ();
0x0002f20c ldr r5, [r0] | r5 = *(r0);
0x0002f20e movw r3, 0xb745 |
0x0002f212 movt r3, 0x7f2b | r3 = 0x7f2bb745;
0x0002f216 cmp r5, 0 |
0x0002f218 it eq |
| if (r5 != 0) {
0x0002f21a moveq r5, r3 | r5 = r3;
| }
| label_10:
0x0002f21c ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x0002f21e lsls r0, r3, 0x1b | r0 = r3 << 0x1b;
| if (r0 >= r3) {
0x0002f220 bpl 0x2f22a | goto label_9;
| }
0x0002f222 add.w r0, r4, 0x118 | r0 = r4 + 0x118;
0x0002f226 blx 0xae94 | pthread_mutex_unlock ();
| }
| label_9:
0x0002f22a ldr r0, [sp, 0x18] | r0 = var_18h;
0x0002f22c ldr r4, [r0, 0x14] | r4 = *((r0 + 0x14));
| if (r4 != 0) {
0x0002f22e cbz r4, 0x2f242 |
0x0002f230 strd r7, r5, [sp, 4] | __asm ("strd r7, r5, [var_8h]");
0x0002f234 mov r3, fp | r3 = fp;
0x0002f236 ldr r2, [sp, 0x48] | r2 = *(arg_48h);
0x0002f238 ldr r1, [sp, 0x1c] | r1 = var_1ch;
0x0002f23a str.w r8, [sp] | __asm ("str.w r8, [sp]");
0x0002f23e blx r4 | r0 = uint32_t (*r4)(uint32_t, uint32_t, uint32_t) (r1, r2, r3);
0x0002f240 mov r5, r0 | r5 = r0;
| }
0x0002f242 mov r0, r5 | r0 = r5;
0x0002f244 add sp, 0x24 |
0x0002f246 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x0002f24a orr.w r3, fp, r5 | r3 = fp | r5;
0x0002f24e add.w r2, ip, -1 | r2 = ip + -1;
0x0002f252 orr.w r3, r3, r8 | r3 |= r8;
0x0002f256 tst r3, r2 |
0x0002f258 ittt ne |
| if ((r3 & r2) == 0) {
0x0002f25a ldrne r3, [sp, 0x18] | r3 = var_18h;
| }
| if ((r3 & r2) == 0) {
0x0002f25c movne sb, r7 | sb = r7;
| }
| if ((r3 & r2) == 0) {
0x0002f25e ldrne r2, [r3, 0xc] | r2 = *((r3 + 0xc));
| }
0x0002f260 beq 0x2f1b8 |
| }
| label_11:
0x0002f262 cmp r2, ip |
0x0002f264 mov r6, ip | r6 = ip;
0x0002f266 it le |
| if (r2 > ip) {
0x0002f268 movle r0, r5 | r0 = r5;
| }
| if (r2 > ip) {
0x0002f26a bgt.w 0x2f3ba | goto label_18;
| }
| label_7:
0x0002f26e asrs r3, r6, 0x1f | r3 = r6 >> 0x1f;
0x0002f270 mov r1, sl | r1 = sl;
0x0002f272 mov r7, sb | r7 = sb;
| label_3:
0x0002f274 mov r2, r6 | r2 = r6;
0x0002f276 bl 0x31210 | r0 = fcn_00031210 (r0, r1, r2, r3);
0x0002f27a mov r5, r0 | r5 = r0;
0x0002f27c mov sl, r1 | sl = r1;
0x0002f27e mov sb, r2 | sb = r2;
| label_4:
0x0002f280 cmp.w r8, 0 |
| if (r8 <= 0) {
0x0002f284 ble.w 0x2f3b0 | goto label_16;
| }
0x0002f288 asrs r3, r6, 0x1f | r3 = r6 >> 0x1f;
0x0002f28a add.w r2, r4, 0x118 | r2 = r4 + 0x118;
0x0002f28e str r2, [sp, 0x10] | var_10h = r2;
0x0002f290 str r3, [sp, 0x14] | var_14h = r3;
0x0002f292 mul r3, r5, r3 | r3 = r5 * r3;
0x0002f296 mla r3, r6, sl, r3 | __asm ("mla r3, r6, sl, r3");
0x0002f29a umull r5, sl, r5, r6 | r5:sl = r5 * r6;
0x0002f29e add sl, r3 | sl += r3;
0x0002f2a0 b 0x2f316 | goto label_19;
| label_2:
0x0002f2a2 add.w r3, sb, r8 | r3 = sb + r8;
0x0002f2a6 cmp r3, r6 |
0x0002f2a8 it le |
| if (r3 > r6) {
0x0002f2aa movle r7, r8 | r7 = r8;
| }
| if (r3 > r6) {
0x0002f2ac ble 0x2f2b8 |
0x0002f2ae sub.w r7, r6, sb | r7 = r6 - sb;
0x0002f2b2 cmp r7, r8 |
0x0002f2b4 it ge |
| if (r7 >= r8) {
0x0002f2b6 movge r7, r8 | r7 = r8;
| goto label_20;
| }
| }
| label_20:
0x0002f2b8 ldr.w r0, [r4, 0xe0] | r0 = *((r4 + 0xe0));
0x0002f2bc mov r2, r7 | r2 = r7;
0x0002f2be mov r1, fp | r1 = fp;
0x0002f2c0 add r0, sb | r0 += sb;
0x0002f2c2 blx 0xb280 | fcn_0000b280 ();
0x0002f2c6 movs r3, 0 | r3 = 0;
0x0002f2c8 mov r2, r5 | r2 = r5;
0x0002f2ca str r3, [sp] | *(sp) = r3;
0x0002f2cc mov r3, sl | r3 = sl;
0x0002f2ce ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x0002f2d0 blx 0xaef0 | fcn_0000aef0 ();
0x0002f2d4 cmp r1, 0 |
| if (r1 < 0) {
0x0002f2d6 blt 0x2f208 | goto label_0;
| }
0x0002f2d8 ldr.w r1, [r4, 0xe0] | r1 = *((r4 + 0xe0));
0x0002f2dc mov r2, r6 | r2 = r6;
0x0002f2de ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x0002f2e0 blx 0xbdc8 | fcn_0000bdc8 ();
0x0002f2e4 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x0002f2e6 mov sb, r0 | sb = r0;
0x0002f2e8 lsls r3, r3, 0x1b | r3 <<= 0x1b;
| if (r3 < r3) {
0x0002f2ea bpl 0x2f2f2 |
0x0002f2ec ldr r0, [sp, 0x10] | r0 = var_10h;
0x0002f2ee blx 0xae94 | pthread_mutex_unlock ();
| }
0x0002f2f2 cmp.w sb, 0 |
| if (sb < 0) {
0x0002f2f6 blt.w 0x2f3fe | goto label_17;
| }
0x0002f2fa cmp r6, sb |
| if (r6 != sb) {
0x0002f2fc bne.w 0x2f1fe | goto label_1;
| }
0x0002f300 ldr r3, [sp, 0x14] | r3 = var_14h;
0x0002f302 adds r5, r5, r6 | r5 += r6;
0x0002f304 sub.w r8, r8, r7 | r8 -= r7;
0x0002f308 mov.w sb, 0 | sb = 0;
0x0002f30c add fp, r7 |
0x0002f30e adc.w sl, r3, sl | __asm ("adc.w sl, r3, sl");
0x0002f312 cmp r8, sb |
| if (r8 <= sb) {
0x0002f314 ble 0x2f3b0 | goto label_16;
| }
| label_19:
0x0002f316 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x0002f318 lsls r2, r3, 0x1b | r2 = r3 << 0x1b;
| if (r2 < r3) {
0x0002f31a bpl 0x2f322 |
0x0002f31c ldr r0, [sp, 0x10] | r0 = var_10h;
0x0002f31e blx 0xb21c | fcn_0000b21c ();
| }
0x0002f322 cmp r6, r8 |
0x0002f324 it le |
| if (r6 > r8) {
0x0002f326 cmple sb, 0 | __asm ("cmple sb, 0");
| goto label_21;
| }
| if (r6 == r8) {
| label_21:
0x0002f32a beq 0x2f2a2 | goto label_2;
| }
0x0002f32c movs r3, 0 | r3 = 0;
0x0002f32e mov r2, r5 | r2 = r5;
0x0002f330 str r3, [sp] | *(sp) = r3;
0x0002f332 mov r3, sl | r3 = sl;
0x0002f334 ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x0002f336 blx 0xaef0 | fcn_0000aef0 ();
0x0002f33a cmp r1, 0 |
| if (r1 < 0) {
0x0002f33c blt.w 0x2f208 | goto label_0;
| }
0x0002f340 ldr.w r1, [r4, 0xe0] | r1 = *((r4 + 0xe0));
0x0002f344 mov r2, r6 | r2 = r6;
0x0002f346 ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x0002f348 blx 0xb0d0 | r0 = fcn_0000b0d0 ();
0x0002f34c cmp r6, r0 |
0x0002f34e mov r7, r0 | r7 = r0;
| if (r6 == r0) {
0x0002f350 beq 0x2f2a2 | goto label_2;
| }
0x0002f352 cmp r0, 0 |
| if (r0 < 0) {
0x0002f354 blt 0x2f406 | goto label_22;
| }
0x0002f356 ldr.w r0, [r4, 0xe0] | r0 = *((r4 + 0xe0));
0x0002f35a subs r2, r6, r7 | r2 = r6 - r7;
0x0002f35c movs r1, 0 | r1 = 0;
0x0002f35e add r0, r7 | r0 += r7;
0x0002f360 blx 0xbca0 | fcn_0000bca0 ();
0x0002f364 b 0x2f2a2 | goto label_2;
| label_14:
0x0002f366 cmp r7, 0 |
| if (r7 != 0) {
0x0002f368 bne 0x2f40e | goto label_23;
| }
0x0002f36a ldr r1, [sp, 0x18] | r1 = var_18h;
0x0002f36c movs r2, 1 | r2 = 1;
0x0002f36e cmp r6, r2 |
0x0002f370 it gt |
| if (r6 <= r2) {
0x0002f372 movgt r0, r5 | r0 = r5;
| }
0x0002f374 str r2, [r1, 0x60] | *((r1 + 0x60)) = r2;
0x0002f376 it gt |
| if (r6 > r2) {
0x0002f378 movgt r1, sl | r1 = sl;
| goto label_24;
| }
| if (r6 > r2) {
| label_24:
0x0002f37a bgt.w 0x2f274 | goto label_3;
| }
0x0002f37e mov r6, r2 | r6 = r2;
0x0002f380 mov sb, ip | sb = ip;
0x0002f382 b 0x2f280 | goto label_4;
| label_12:
0x0002f384 ldr r1, [r4, 8] | r1 = *((r4 + 8));
0x0002f386 ldr.w r8, [r0, 0xc] | r8 = *((r0 + 0xc));
0x0002f38a lsls r3, r1, 0x1b | r3 = r1 << 0x1b;
| if (r3 < r1) {
0x0002f38c bmi.w 0x2f112 | goto label_5;
| }
| label_13:
0x0002f390 ldr.w r3, [r4, 0xf8] | r3 = *((r4 + 0xf8));
0x0002f394 asr.w r2, r8, 0x1f | r2 = r8 >> 0x1f;
0x0002f398 str r2, [sp, 0x10] | var_10h = r2;
0x0002f39a adds.w r3, r3, r8 | r3 += r8;
0x0002f39e str.w r3, [r4, 0xf8] | __asm ("str.w r3, [r4, 0xf8]");
0x0002f3a2 ldr.w r3, [r4, 0xfc] | r3 = *((r4 + 0xfc));
0x0002f3a6 adc.w r3, r3, r2 | __asm ("adc.w r3, r3, r2");
0x0002f3aa str.w r3, [r4, 0xfc] | __asm ("str.w r3, [r4, 0xfc]");
0x0002f3ae b 0x2f148 | goto label_6;
| label_16:
0x0002f3b0 movs r5, 0 | r5 = 0;
0x0002f3b2 mov r0, r5 | r0 = r5;
0x0002f3b4 add sp, 0x24 |
0x0002f3b6 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_18:
0x0002f3ba mov r0, r2 | r0 = r2;
0x0002f3bc mov r1, ip | r1 = ip;
0x0002f3be str r2, [sp, 0x10] | var_10h = r2;
0x0002f3c0 bl 0x30e7c | fcn_00030e7c (r0, r1);
0x0002f3c4 ldr r2, [sp, 0x10] | r2 = var_10h;
0x0002f3c6 mov r0, r5 | r0 = r5;
0x0002f3c8 cmp r1, 0 |
| if (r1 != 0) {
0x0002f3ca bne.w 0x2f26e | goto label_7;
| }
0x0002f3ce mov r1, sl | r1 = sl;
0x0002f3d0 asrs r3, r2, 0x1f | r3 = r2 >> 0x1f;
0x0002f3d2 mov r7, sb | r7 = sb;
0x0002f3d4 mov r6, r2 | r6 = r2;
0x0002f3d6 bl 0x31210 | r0 = fcn_00031210 (r0, r1, r2, r3);
0x0002f3da mov r5, r0 | r5 = r0;
0x0002f3dc mov sl, r1 | sl = r1;
0x0002f3de mov sb, r2 | sb = r2;
0x0002f3e0 b 0x2f280 | goto label_4;
| label_15:
0x0002f3e2 ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x0002f3e4 blx 0xc4bc | fcn_0000c4bc ();
0x0002f3e8 ldr r3, [sp, 0x10] | r3 = var_10h;
0x0002f3ea mov r2, r5 | r2 = r5;
0x0002f3ec strd r8, r3, [sp] | __asm ("strd r8, r3, [sp]");
0x0002f3f0 movs r3, 4 | r3 = 4;
0x0002f3f2 str r3, [sp, 8] | var_8h = r3;
0x0002f3f4 mov r3, sl | r3 = sl;
0x0002f3f6 ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x0002f3f8 blx 0xb058 | fcn_0000b058 ();
0x0002f3fc b 0x2f1a6 | goto label_8;
| label_17:
0x0002f3fe blx 0xbc04 | r0 = fcn_0000bc04 ();
0x0002f402 ldr r5, [r0] | r5 = *(r0);
0x0002f404 b 0x2f22a | goto label_9;
| label_22:
0x0002f406 blx 0xbc04 | r0 = fcn_0000bc04 ();
0x0002f40a ldr r5, [r0] | r5 = *(r0);
0x0002f40c b 0x2f21c | goto label_10;
| label_23:
0x0002f40e mov.w sb, 0 | sb = 0;
0x0002f412 b 0x2f262 | goto label_11;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/libext2fs.so.2.4 @ 0x2f920 */
| #include <stdint.h>
|
; (fcn) fcn.0002f920 () | void fcn_0002f920 (int16_t arg_48h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h;
| int32_t var_4h;
| int32_t var_4h_2;
| int16_t var_10h;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0002f920 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0002f924 sub sp, 0x24 |
0x0002f926 mov sb, r3 | sb = r3;
0x0002f928 ldrd r3, r7, [sp, 0x48] | __asm ("ldrd r3, r7, [arg_48h]");
0x0002f92c mov sl, r0 | sl = r0;
0x0002f92e mov r4, r1 | r4 = r1;
0x0002f930 ldr.w fp, [r1, 8] | fp = *((r1 + 8));
0x0002f934 cmp r3, 0 |
0x0002f936 str r2, [sp, 0x10] | var_10h = r2;
0x0002f938 itett ge |
| if (r3 < 0) {
0x0002f93a ldrge r5, [r0, 0xc] | r5 = *((r0 + 0xc));
| }
| if (r3 < 0) {
0x0002f93c rsblt r5, r3, 0 | __asm ("rsblt r5, r3, 0");
| }
| if (r3 < 0) {
0x0002f93e ldrge r3, [sp, 0x48] | r3 = *(arg_48h);
| }
| if (r3 < 0) {
0x0002f940 mulge r5, r3, r5 | r5 = r3 * r5;
| }
0x0002f942 tst.w fp, 0x10 |
| if ((fp & 0x10) == 0) {
0x0002f946 beq.w 0x2fb84 | goto label_8;
| }
0x0002f94a add.w r6, r4, 0x130 | r6 = r4 + 0x130;
0x0002f94e mov r0, r6 | r0 = r6;
0x0002f950 blx 0xb21c | fcn_0000b21c ();
0x0002f954 ldr.w r3, [r4, 0xf0] | r3 = *((r4 + 0xf0));
0x0002f958 ldr.w fp, [r4, 8] | fp = *((r4 + 8));
0x0002f95c adds r3, r3, r5 | r3 += r5;
0x0002f95e str.w r3, [r4, 0xf0] | __asm ("str.w r3, [r4, 0xf0]");
0x0002f962 ldr.w r3, [r4, 0xf4] | r3 = *((r4 + 0xf4));
0x0002f966 adc.w r3, r3, r5, asr 31 | __asm ("adc.w r3, r3, r5, asr 31");
0x0002f96a tst.w fp, 0x10 |
0x0002f96e str.w r3, [r4, 0xf4] | __asm ("str.w r3, [r4, 0xf4]");
| if ((fp & 0x10) != 0) {
0x0002f972 beq 0x2f97e |
0x0002f974 mov r0, r6 | r0 = r6;
0x0002f976 blx 0xae94 | pthread_mutex_unlock ();
0x0002f97a ldr.w fp, [r4, 8] | fp = *((r4 + 8));
| }
| label_4:
0x0002f97e ldr r3, [r4, 0x1c] | r3 = *((r4 + 0x1c));
0x0002f980 ldr.w r2, [sl, 0xc] | r2 = *((sl + 0xc));
0x0002f982 movs r0, 0xc | r0 = 0xc;
0x0002f984 ldr r0, [r4, 0x18] | r0 = *((r4 + 0x18));
0x0002f986 str r3, [sp, 0x14] | var_14h = r3;
0x0002f988 ldr r3, [sp, 0x10] | r3 = var_10h;
0x0002f98a mov r8, r2 | r8 = r2;
0x0002f98c asr.w lr, r2, 0x1f | lr = r2 >> 0x1f;
0x0002f990 ldr.w r1, [sl, 0x60] | r1 = *((sl + 0x60));
0x0002f994 mul ip, r3, lr |
0x0002f998 mov r6, r1 | r6 = r1;
0x0002f99a mla ip, r2, sb, ip | __asm ("mla ip, r2, sb, ip");
0x0002f99e umull sb, r3, r3, r2 | sb:r3 = r3 * r2;
0x0002f9a2 adds.w sb, sb, r0 | sb += r0;
0x0002f9a6 ldr r0, [sp, 0x14] | r0 = var_14h;
0x0002f9a8 add r3, ip | r3 += ip;
0x0002f9aa adc.w r3, r3, r0 | __asm ("adc.w r3, r3, r0");
0x0002f9ae tst.w fp, 8 |
| if ((fp & 8) != 0) {
0x0002f9b2 bne.w 0x2fb3e | goto label_9;
| }
0x0002f9b6 cbnz r1, 0x2fa1c |
| while ((r0 & r6) == 0) {
0x0002f9b8 strd sb, r3, [sp] | __asm ("strd sb, r3, [sp]");
0x0002f9bc mov r2, r5 | r2 = r5;
0x0002f9be ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x0002f9c0 mov r1, r7 | r1 = r7;
0x0002f9c2 str r3, [sp, 0x14] | var_14h = r3;
0x0002f9c4 blx 0xb7f0 | r0 = fcn_0000b7f0 ();
0x0002f9c8 cmp r0, r5 |
0x0002f9ca ldr r3, [sp, 0x14] | r3 = var_14h;
| if (r0 == r5) {
0x0002f9cc beq.w 0x2fc14 | goto label_10;
| }
0x0002f9d0 ldr.w r1, [sl, 0x60] | r1 = *((sl + 0x60));
0x0002f9d4 ldr.w fp, [r4, 8] | fp = *((r4 + 8));
0x0002f9d8 cmp r1, 0 |
| if (r1 != 0) {
0x0002f9da bne.w 0x2fb20 | goto label_11;
| }
0x0002f9de tst.w fp, 0x10 |
| if ((fp & 0x10) != 0) {
0x0002f9e2 beq 0x2f9f0 |
| label_1:
0x0002f9e4 add.w r0, r4, 0x118 | r0 = r4 + 0x118;
0x0002f9e8 str r3, [sp, 0x14] | var_14h = r3;
0x0002f9ea blx 0xb21c | fcn_0000b21c ();
0x0002f9ee ldr r3, [sp, 0x14] | r3 = var_14h;
| }
| label_2:
0x0002f9f0 movs r6, 0 | r6 = 0;
0x0002f9f2 mov r2, sb | r2 = sb;
0x0002f9f4 str r6, [sp] | *(sp) = r6;
0x0002f9f6 ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x0002f9f8 blx 0xaef0 | fcn_0000aef0 ();
0x0002f9fc cmp r1, r6 |
| if (r1 < r6) {
0x0002f9fe blt.w 0x2fbe0 | goto label_12;
| }
0x0002fa02 ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x0002fa04 mov r2, r5 | r2 = r5;
0x0002fa06 mov r1, r7 | r1 = r7;
0x0002fa08 blx 0xb0d0 | r0 = fcn_0000b0d0 ();
0x0002fa0c cmp r0, r5 |
0x0002fa0e mov sb, r0 | sb = r0;
| if (r0 == r5) {
0x0002fa10 beq.w 0x2fb6a | goto label_13;
| }
0x0002fa14 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x0002fa16 and r3, r3, 0x10 | r3 &= 0x10;
0x0002fa1a b 0x2fae0 | goto label_14;
0x0002fa1c orr.w r0, r7, sb | r0 = r7 | sb;
0x0002fa20 subs r6, r1, 1 | r6 = r1 - 1;
0x0002fa22 orrs r0, r5 | r0 |= r5;
0x0002fa24 tst r0, r6 |
0x0002fa26 beq 0x2f9b8 |
| }
| label_0:
0x0002fa28 cmp r2, r1 |
0x0002fa2a mov r8, r1 | r8 = r1;
0x0002fa2c it le |
| if (r2 > r1) {
0x0002fa2e movle r0, sb | r0 = sb;
| }
| if (r2 > r1) {
0x0002fa30 bgt.w 0x2fb9c | goto label_15;
| }
| label_5:
0x0002fa34 mov r1, r3 | r1 = r3;
0x0002fa36 asr.w r3, r8, 0x1f | r3 = r8 >> 0x1f;
0x0002fa3a mov r2, r8 | r2 = r8;
0x0002fa3c strd r8, r3, [sp, 0x14] | __asm ("strd r8, r3, [var_14h]");
0x0002fa40 bl 0x31210 | fcn_00031210 (r0, r1, r2, r3);
0x0002fa44 mov r3, r1 | r3 = r1;
0x0002fa46 mov sb, r0 | sb = r0;
0x0002fa48 mov r6, r2 | r6 = r2;
| label_3:
0x0002fa4a tst.w fp, 0x10 |
| if ((fp & 0x10) != 0) {
0x0002fa4e beq 0x2fa5c |
0x0002fa50 add.w r0, r4, 0x118 | r0 = r4 + 0x118;
0x0002fa54 str r3, [sp, 0x1c] | var_1ch = r3;
0x0002fa56 blx 0xb21c | fcn_0000b21c ();
0x0002fa5a ldr r3, [sp, 0x1c] | r3 = var_1ch;
| }
0x0002fa5c ldr r2, [sp, 0x18] | r2 = var_18h;
0x0002fa5e mov.w fp, 0 |
0x0002fa62 ldr r1, [sp, 0x14] | r1 = var_14h;
0x0002fa64 str.w fp, [sp] | __asm ("str.w fp, [sp]");
0x0002fa68 ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x0002fa6a mul r2, sb, r2 | r2 = sb * r2;
0x0002fa6e mla r3, r1, r3, r2 | __asm ("mla r3, r1, r3, r2");
0x0002fa72 umull r2, sb, sb, r1 | r2:sb = sb * r1;
0x0002fa76 add r3, sb | r3 += sb;
0x0002fa78 blx 0xaef0 | fcn_0000aef0 ();
0x0002fa7c cmp r1, fp |
| if (r1 < fp) {
0x0002fa7e blt.w 0x2fc20 | goto label_16;
| }
0x0002fa80 strh r7, [r1, 6] | *((r1 + 6)) = r7;
0x0002fa82 cmp r5, fp |
0x0002fa84 it gt |
| if (r5 <= fp) {
0x0002fa86 movgt sb, fp | sb = fp;
| }
| if (r5 > fp) {
0x0002fa88 bgt 0x2fab0 | goto label_17;
| }
0x0002fa8a b 0x2fb6a | goto label_13;
| do {
0x0002fa8c cmp r6, 0 |
0x0002fa8e ldr.w r1, [r4, 0xe0] | r1 = *((r4 + 0xe0));
0x0002fa92 it gt |
| if (r6 <= 0) {
0x0002fa94 subgt r2, r8, r6 | r2 = r8 - r6;
| }
0x0002fa98 cmp r2, r5 |
0x0002fa9a it ge |
| if (r2 < r5) {
0x0002fa9c movge r2, r5 | r2 = r5;
| }
0x0002fa9e add r1, r6 | r1 += r6;
0x0002faa0 subs r5, r5, r2 | r5 -= r2;
0x0002faa2 movs r6, 0 | r6 = 0;
0x0002faa4 add sb, r2 | sb += r2;
0x0002faa6 add r7, r2 | r7 += r2;
0x0002faa8 blx 0xb280 | fcn_0000b280 ();
0x0002faac cmp r5, r6 |
| if (r5 <= r6) {
0x0002faae ble 0x2fb6a | goto label_13;
| }
| label_17:
0x0002fab0 mov r2, r8 | r2 = r8;
0x0002fab2 ldr.w r1, [r4, 0xe0] | r1 = *((r4 + 0xe0));
0x0002fab6 ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x0002fab8 blx 0xb0d0 | r0 = fcn_0000b0d0 ();
0x0002fabc mov r2, r0 | r2 = r0;
0x0002fabe mov r0, r7 | r0 = r7;
0x0002fac0 cmp r8, r2 |
0x0002fac2 beq 0x2fa8c |
| } while (r8 == r2);
0x0002fac4 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x0002fac6 ands r3, r3, 0x10 | r3 &= 0x10;
| if (r3 != r3) {
0x0002faca beq 0x2fada |
0x0002facc add.w r0, r4, 0x118 | r0 = r4 + 0x118;
0x0002fad0 blx 0xae94 | pthread_mutex_unlock ();
0x0002fad4 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x0002fad6 and r3, r3, 0x10 | r3 &= 0x10;
| }
0x0002fada sub.w r7, r7, sb | r7 -= sb;
0x0002fade add r5, sb | r5 += sb;
| label_14:
0x0002fae0 cmp.w sb, 0 |
0x0002fae4 itt ge |
| if (sb >= 0) {
0x0002fae6 movwge r8, 0xb724 |
| }
| if (sb >= 0) {
0x0002faea movt r8, 0x7f2b | r8 = 0xNaN;
| }
| if (sb < 0) {
0x0002faee blt 0x2fbce | goto label_18;
| }
| if (r3 != 0) {
| label_6:
0x0002faf0 cbz r3, 0x2fafa |
0x0002faf2 add.w r0, r4, 0x118 | r0 = r4 + 0x118;
0x0002faf6 blx 0xae94 | pthread_mutex_unlock ();
| }
0x0002fafa cmp sb, r5 |
| if (sb < r5) {
0x0002fafc blt.w 0x2fc04 | goto label_19;
| }
| label_7:
0x0002fb00 ldr.w r4, [sl, 0x10] | r4 = *((sl + 0x10));
| if (r4 != 0) {
0x0002fb04 cbz r4, 0x2fb18 |
0x0002fb06 strd sb, r8, [sp, 4] | __asm ("strd sb, r8, [var_4h]");
0x0002fb0a mov r3, r7 | r3 = r7;
0x0002fb0c ldr r2, [sp, 0x48] | r2 = *(arg_48h);
0x0002fb0e mov r0, sl | r0 = sl;
0x0002fb10 ldr r1, [sp, 0x10] | r1 = var_10h;
0x0002fb12 str r5, [sp] | *(sp) = r5;
0x0002fb14 blx r4 | r0 = uint32_t (*r4)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x0002fb16 mov r8, r0 | r8 = r0;
| }
0x0002fb18 mov r0, r8 | r0 = r8;
0x0002fb1a add sp, 0x24 |
0x0002fb1c pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_11:
0x0002fb20 orr.w r2, r7, sb | r2 = r7 | sb;
0x0002fb24 subs r0, r1, 1 | r0 = r1 - 1;
0x0002fb26 orrs r2, r5 | r2 |= r5;
0x0002fb28 tst r2, r0 |
0x0002fb2a it ne |
| if ((r2 & r0) != 0) {
0x0002fb2c ldrne r2, [sl, 0xc] | r2 = *((sl + 0xc));
| goto label_20;
| }
| if ((r2 & r0) != 0) {
| label_20:
0x0002fb30 bne.w 0x2fa28 | goto label_0;
| }
0x0002fb34 tst.w fp, 0x10 |
| if ((fp & 0x10) != 0) {
0x0002fb38 bne.w 0x2f9e4 | goto label_1;
| }
0x0002fb3c b 0x2f9f0 | goto label_2;
| label_9:
0x0002fb3e cmp r1, 0 |
| if (r1 != 0) {
0x0002fb40 bne.w 0x2fa28 | goto label_0;
| }
0x0002fb44 movs r2, 1 | r2 = 1;
0x0002fb46 cmp r8, r2 |
0x0002fb48 str.w r2, [sl, 0x60] | __asm ("str.w r2, [sl, 0x60]");
| if (r8 <= r2) {
0x0002fb4c ble 0x2fbc6 | goto label_21;
| }
0x0002fb4e mov r0, sb | r0 = sb;
0x0002fb50 mov r1, r3 | r1 = r3;
0x0002fb52 mov r2, r8 | r2 = r8;
0x0002fb54 mov r3, lr | r3 = lr;
0x0002fb56 str.w lr, [sp, 0x18] | __asm ("str.w lr, [var_18h]");
0x0002fb5a bl 0x31210 | fcn_00031210 (r0, r1, r2, r3);
0x0002fb5e str.w r8, [sp, 0x14] | __asm ("str.w r8, [var_14h]");
0x0002fb62 mov r3, r1 | r3 = r1;
0x0002fb64 mov sb, r0 | sb = r0;
0x0002fb66 mov r6, r2 | r6 = r2;
0x0002fb68 b 0x2fa4a | goto label_3;
| label_13:
0x0002fb6a ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x0002fb6c lsls r3, r3, 0x1b | r3 <<= 0x1b;
| if (r3 >= r3) {
0x0002fb6e bpl 0x2fc14 | goto label_10;
| }
0x0002fb70 add.w r0, r4, 0x118 | r0 = r4 + 0x118;
0x0002fb74 mov.w r8, 0 | r8 = 0;
0x0002fb78 blx 0xae94 | pthread_mutex_unlock ();
0x0002fb7c mov r0, r8 | r0 = r8;
0x0002fb7e add sp, 0x24 |
0x0002fb80 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_8:
0x0002fb84 ldr.w r3, [r1, 0xf0] | r3 = *((r1 + 0xf0));
0x0002fb88 adds r3, r3, r5 | r3 += r5;
0x0002fb8a str.w r3, [r1, 0xf0] | __asm ("str.w r3, [r1, 0xf0]");
0x0002fb8e ldr.w r3, [r1, 0xf4] | r3 = *((r1 + 0xf4));
0x0002fb92 adc.w r3, r3, r5, asr 31 | __asm ("adc.w r3, r3, r5, asr 31");
0x0002fb96 str.w r3, [r1, 0xf4] | __asm ("str.w r3, [r1, 0xf4]");
0x0002fb9a b 0x2f97e | goto label_4;
| label_15:
0x0002fb9c mov r0, r2 | r0 = r2;
0x0002fb9e str r3, [sp, 0x18] | var_18h = r3;
0x0002fba0 str r2, [sp, 0x14] | var_14h = r2;
0x0002fba2 bl 0x30e7c | fcn_00030e7c (r0, r1);
0x0002fba6 ldrd r2, r3, [sp, 0x14] | __asm ("ldrd r2, r3, [var_14h]");
0x0002fbaa mov r0, sb | r0 = sb;
0x0002fbac cmp r1, 0 |
| if (r1 != 0) {
0x0002fbae bne.w 0x2fa34 | goto label_5;
| }
0x0002fbb2 mov r1, r3 | r1 = r3;
0x0002fbb4 asrs r3, r2, 0x1f | r3 = r2 >> 0x1f;
0x0002fbb6 mov r8, r2 | r8 = r2;
0x0002fbb8 str r3, [sp, 0x18] | var_18h = r3;
0x0002fbba bl 0x31210 | fcn_00031210 (r0, r1, r2, r3);
0x0002fbbe mov r3, r1 | r3 = r1;
0x0002fbc0 mov sb, r0 | sb = r0;
0x0002fbc2 mov r6, r2 | r6 = r2;
0x0002fbc4 b 0x2fa4a | goto label_3;
| label_21:
0x0002fbc6 mov r8, r2 | r8 = r2;
0x0002fbc8 strd r2, r1, [sp, 0x14] | __asm ("strd r2, r1, [var_14h]");
0x0002fbcc b 0x2fa4a | goto label_3;
| label_18:
0x0002fbce str r3, [sp, 0x14] | var_14h = r3;
0x0002fbd0 mov.w sb, 0 | sb = 0;
0x0002fbd4 blx 0xbc04 | fcn_0000bc04 ();
0x0002fbd8 ldr r3, [sp, 0x14] | r3 = var_14h;
0x0002fbda ldr.w r8, [r0] | r8 = *(r0);
0x0002fbde b 0x2faf0 | goto label_6;
| label_12:
0x0002fbe0 blx 0xbc04 | fcn_0000bc04 ();
0x0002fbe4 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x0002fbe6 ldr.w sb, [r0] | sb = *(r0);
0x0002fbea and r3, r3, 0x10 | r3 &= 0x10;
0x0002fbee cmp.w sb, 0 |
| if (sb == 0) {
0x0002fbf2 beq 0x2fbfa | goto label_22;
| }
0x0002fbf4 mov r8, sb | r8 = sb;
0x0002fbf6 mov sb, r6 | sb = r6;
0x0002fbf8 b 0x2faf0 | goto label_6;
| do {
| label_22:
0x0002fbfa movw r8, 0xb745 |
0x0002fbfe movt r8, 0x7f2b | r8 = 0x7f2bb745;
0x0002fc02 b 0x2faf0 | goto label_6;
| label_19:
0x0002fc04 sub.w r2, r5, sb | r2 = r5 - sb;
0x0002fc08 movs r1, 0 | r1 = 0;
0x0002fc0a add.w r0, r7, sb | r0 = r7 + sb;
0x0002fc0e blx 0xbca0 | fcn_0000bca0 ();
0x0002fc12 b 0x2fb00 | goto label_7;
| label_10:
0x0002fc14 mov.w r8, 0 | r8 = 0;
0x0002fc18 mov r0, r8 | r0 = r8;
0x0002fc1a add sp, 0x24 |
0x0002fc1c pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_16:
0x0002fc20 blx 0xbc04 | fcn_0000bc04 ();
0x0002fc24 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x0002fc26 ldr.w sb, [r0] | sb = *(r0);
0x0002fc2a and r3, r3, 0x10 | r3 &= 0x10;
0x0002fc2e cmp.w sb, 0 |
0x0002fc32 beq 0x2fbfa |
| } while (sb == 0);
0x0002fc34 mov r8, sb | r8 = sb;
0x0002fc36 mov sb, fp | sb = fp;
0x0002fc38 b 0x2faf0 | goto label_6;
| }
[*] Function system used 1 times libext2fs.so.2.4