[*] Binary protection state of kmod
Full RELRO Canary found NX enabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of kmod
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/bin/kmod @ 0xd77c */
| #include <stdint.h>
|
; (fcn) fcn.0000d77c () | void fcn_0000d77c (int16_t arg_38h, int16_t arg_78h, int16_t arg_7ch, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_20h;
| int16_t var_24h;
| int16_t var_28h;
| int16_t var_2ch;
| int16_t var_30h;
| int32_t var_30h_2;
| int16_t var_38h;
| int16_t var_3ch;
| int16_t var_44h;
| int16_t var_48h;
| int16_t var_4ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0000d77c push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0000d780 sub sp, 0x54 |
0x0000d782 str r2, [sp, 0x1c] | var_1ch = r2;
0x0000d784 ldr.w r2, [pc, 0x488] | r2 = *(0x0000dc10);
0x0000d788 str r3, [sp, 0x28] | var_28h = r3;
0x0000d78a ldr.w r3, [pc, 0x488] |
0x0000d78e add r2, pc | r2 += pc;
0x0000d790 str r1, [sp, 8] | var_8h = r1;
0x0000d792 ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x0000d794 ldr r3, [r3] | r3 = *(0xdc16);
0x0000d796 str r3, [sp, 0x4c] | var_4ch = r3;
0x0000d798 mov.w r3, 0 | r3 = 0;
0x0000d79c movs r3, 0 | r3 = 0;
0x0000d79e str r3, [sp, 0x44] | var_44h = r3;
0x0000d7a0 ldr r3, [sp, 0x78] | r3 = *(arg_78h);
0x0000d7a2 str r0, [sp, 0xc] | var_ch = r0;
0x0000d7a4 str r3, [sp, 0x2c] | var_2ch = r3;
0x0000d7a6 ldr r3, [sp, 0x7c] | r3 = *(arg_7ch);
0x0000d7a8 str r3, [sp, 0x18] | var_18h = r3;
0x0000d7aa cmp r0, 0 |
| if (r0 == 0) {
0x0000d7ac beq.w 0xdb9e | goto label_22;
| }
0x0000d7b0 ands r3, r1, 8 | r3 = r1 & 8;
0x0000d7b4 str r3, [sp, 0x24] | var_24h = r3;
| if (r3 == r1) {
0x0000d7b6 beq.w 0xdb02 | goto label_23;
| }
| label_17:
0x0000d7ba ldr r3, [sp, 0xc] | r3 = var_ch;
0x0000d7bc ldr r3, [r3, 0x20] | r3 = *((r3 + 0x20));
0x0000d7be cmp r3, 0 |
| if (r3 == 0) {
0x0000d7c0 beq.w 0xd8f4 | goto label_24;
| }
0x0000d7c4 ldr r3, [sp, 8] | r3 = var_8h;
0x0000d7c6 ands r5, r3, 0x40000 | r5 = r3 & 0x40000;
| if (r5 == r3) {
0x0000d7ca beq.w 0xd8f4 | goto label_24;
| }
| label_0:
0x0000d7ce ldr r0, [sp, 0xc] | r0 = var_ch;
0x0000d7d0 bl 0xc53c | r0 = fcn_0000c53c (r0);
0x0000d7d4 cmp r0, 0 |
| if (r0 != 0) {
0x0000d7d6 bne 0xd8d6 | goto label_2;
| }
| label_1:
0x0000d7d8 ldr r4, [sp, 0xc] | r4 = var_ch;
0x0000d7da movs r1, 0 | r1 = 0;
0x0000d7dc ldr r0, [r4] | r0 = *(r4);
0x0000d7de bl 0xa060 | fcn_0000a060 (r0, r1);
0x0000d7e2 ldr r0, [r4] | r0 = *(r4);
0x0000d7e4 movs r1, 0 | r1 = 0;
0x0000d7e6 bl 0xa0c4 | fcn_0000a0c4 (r0, r1);
0x0000d7ea ldrb.w r3, [r4, 0x38] | r3 = *((r4 + 0x38));
0x0000d7ee lsls r0, r3, 0x1f | r0 = r3 << 0x1f;
| if (r0 >= r3) {
0x0000d7f0 bpl.w 0xd908 | goto label_25;
| }
0x0000d7f4 movs r3, 0 | r3 = 0;
0x0000d7f6 mov r5, r3 | r5 = r3;
0x0000d7f8 str r3, [sp, 0x20] | var_20h = r3;
0x0000d7fa ldr r3, [sp, 8] | r3 = var_8h;
0x0000d7fc lsls r2, r3, 0xf | r2 = r3 << 0xf;
| if (r2 < r3) {
0x0000d7fe bmi.w 0xdb28 | goto label_26;
| }
| label_18:
0x0000d802 ldr.w r3, [pc, 0x414] |
0x0000d806 add r3, pc | r3 = 0x1b424;
0x0000d808 str r3, [sp, 0x3c] | var_3ch = r3;
0x0000d80a ldr r3, [sp, 0x20] | r3 = var_20h;
0x0000d80c str r3, [sp, 4] | var_4h = r3;
| do {
0x0000d80e ldr r3, [sp, 4] | r3 = var_4h;
0x0000d810 cmp r3, 0 |
| if (r3 == 0) {
0x0000d812 beq 0xd8d0 | goto label_5;
| }
0x0000d814 ldr r3, [sp, 4] | r3 = var_4h;
0x0000d816 ldr.w fp, [r3, 8] | fp = *((r3 + 8));
0x0000d81a mov r0, fp | r0 = fp;
0x0000d81c bl 0xd1cc | r0 = fcn_0000d1cc (r0, r1);
0x0000d820 mov r4, r0 | r4 = r0;
0x0000d822 mov r0, fp | r0 = fp;
0x0000d824 bl 0xd284 | fcn_0000d284 (r0);
0x0000d828 ldr r3, [sp, 0x24] | r3 = var_24h;
0x0000d82a mov r7, r0 | r7 = r0;
0x0000d82c cmp r3, 0 |
| if (r3 == 0) {
0x0000d82e beq.w 0xd99e | goto label_27;
| }
| label_7:
0x0000d832 ldr r3, [sp, 0xc] | r3 = var_ch;
0x0000d834 cmp r3, fp |
| if (r3 == fp) {
0x0000d836 beq.w 0xd9b2 | goto label_28;
| }
0x0000d83a cmp r4, 0 |
| if (r4 == 0) {
0x0000d83c beq.w 0xd9d6 | goto label_29;
| }
0x0000d840 mov r0, r4 | r0 = r4;
0x0000d842 blx 0x1bb0 | r0 = fcn_00001bb0 ();
0x0000d846 mov sb, r0 | sb = r0;
| label_10:
0x0000d848 cmp.w sb, 0 |
| if (sb == 0) {
0x0000d84c beq.w 0xd9d6 | goto label_29;
| }
0x0000d850 add.w r0, sb, 2 | r0 = sb + 2;
0x0000d854 mov.w r8, 0 | r8 = 0;
0x0000d858 blx 0x1b0c | strerror (r0);
0x0000d85c mov r6, r8 | r6 = r8;
0x0000d85e mov sl, r0 | sl = r0;
| label_21:
0x0000d860 mov r1, r4 | r1 = r4;
0x0000d862 mov r2, sb | r2 = sb;
0x0000d864 mov r0, sl | r0 = sl;
0x0000d866 blx 0x19c8 | mmap64 ();
0x0000d86a movs r3, 0x20 | r3 = 0x20;
0x0000d86c add.w r0, sb, 1 | r0 = sb + 1;
0x0000d870 adds r4, r0, r6 | r4 = r0 + r6;
0x0000d872 strb.w r3, [sl, sb] | *((sl + sb)) = r3;
0x0000d876 cmp.w r8, 0 |
| if (r8 != 0) {
0x0000d87a bne.w 0xd992 | goto label_30;
| }
| label_6:
0x0000d87e mov.w r3, 0 | r3 = 0;
0x0000d882 strb.w r3, [sl, r4] | *((sl + r4)) = r3;
0x0000d886 cmp r7, 0 |
| if (r7 == 0) {
0x0000d888 beq 0xd926 | goto label_31;
| }
0x0000d88a ldrb.w r3, [fp, 0x38] | r3 = *(arg_38h);
0x0000d88e lsls r1, r3, 0x1e | r1 = r3 << 0x1e;
| if (r1 < r3) {
0x0000d890 bmi 0xd926 | goto label_31;
| }
0x0000d892 ldr r3, [sp, 0x18] | r3 = var_18h;
| if (r3 != 0) {
0x0000d894 cbz r3, 0xd8a8 |
0x0000d896 cmp.w sl, 0 |
| if (sl == 0) {
0x0000d89a beq.w 0xdb92 | goto label_32;
| }
0x0000d89e mov r2, sl | r2 = sl;
| label_12:
0x0000d8a0 ldr r3, [sp, 0x18] | r3 = var_18h;
0x0000d8a2 movs r1, 1 | r1 = 1;
0x0000d8a4 mov r0, fp | r0 = fp;
0x0000d8a6 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
| }
| label_11:
0x0000d8a8 ldr r3, [sp, 8] | r3 = var_8h;
0x0000d8aa ands r3, r3, 0x10 | r3 &= 0x10;
0x0000d8ae mov r6, r3 | r6 = r3;
| if (r3 == r3) {
0x0000d8b0 beq.w 0xda20 | goto label_33;
| }
| label_3:
0x0000d8b4 mov r0, sl | r0 = sl;
0x0000d8b6 blx 0x19a0 | fcn_000019a0 ();
0x0000d8ba ldrb.w r3, [fp, 0x38] | r3 = *(arg_38h);
0x0000d8be lsls r3, r3, 0x1d | r3 <<= 0x1d;
| if (r3 >= r3) {
0x0000d8c0 bmi 0xd8c4 |
| label_4:
0x0000d8c2 movs r5, 0 | r5 = 0;
| }
| label_15:
0x0000d8c4 ldr r3, [sp, 4] | r3 = var_4h;
0x0000d8c6 ldr r2, [sp, 0x20] | r2 = var_20h;
0x0000d8c8 ldr r3, [r3] | r3 = *(r3);
0x0000d8ca cmp r3, r2 |
0x0000d8cc str r3, [sp, 4] | var_4h = r3;
0x0000d8ce bne 0xd80e |
| } while (r3 != r2);
| label_5:
0x0000d8d0 ldr r0, [sp, 0x20] | r0 = var_20h;
0x0000d8d2 bl 0xcb50 | fcn_0000cb50 (r0);
| label_2:
0x0000d8d6 ldr r2, [pc, 0x344] |
0x0000d8d8 ldr r3, [pc, 0x338] | r3 = *(0xdc14);
0x0000d8da add r2, pc | r2 = 0x1b4fc;
0x0000d8dc ldr r3, [r2, r3] | r3 = *(0x1b4fc);
0x0000d8de ldr r2, [r3] | r2 = *(0x1b4fc);
0x0000d8e0 ldr r3, [sp, 0x4c] | r3 = var_4ch;
0x0000d8e2 eors r2, r3 | r2 ^= r3;
0x0000d8e4 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000d8e8 bne.w 0xdc0a | goto label_34;
| }
0x0000d8ec mov r0, r5 | r0 = r5;
0x0000d8ee add sp, 0x54 |
0x0000d8f0 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_24:
0x0000d8f4 ldr r3, [sp, 8] | r3 = var_8h;
0x0000d8f6 ands r5, r3, 0x10000 | r5 = r3 & 0x10000;
| if (r5 != r3) {
0x0000d8fa bne.w 0xd7ce | goto label_0;
| }
0x0000d8fe ands r5, r3, 0x20000 | r5 = r3 & 0x20000;
| if (r5 != r3) {
0x0000d902 bne.w 0xd7ce | goto label_0;
| }
0x0000d906 b 0xd7d8 | goto label_1;
| label_25:
0x0000d908 ldr r2, [sp, 8] | r2 = var_8h;
0x0000d90a add r3, sp, 0x44 | r3 += var_44h;
0x0000d90c ldr r0, [sp, 0xc] | r0 = var_ch;
0x0000d90e movs r1, 1 | r1 = 1;
0x0000d910 ubfx r2, r2, 2, 1 | r2 = (r2 >> 2) & ((1 << 1) - 1);
0x0000d914 bl 0xd4ec | r0 = fcn_0000d4ec (r0, r1, r2, r3);
0x0000d918 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 >= r0) {
0x0000d91a bge.w 0xdb1c | goto label_35;
| }
0x0000d91e ldr r0, [sp, 0x44] | r0 = var_44h;
0x0000d920 bl 0xcb50 | fcn_0000cb50 (r0);
0x0000d924 b 0xd8d6 | goto label_2;
| label_31:
0x0000d926 ldr r3, [sp, 0x18] | r3 = var_18h;
| if (r3 != 0) {
0x0000d928 cbz r3, 0xd93c |
0x0000d92a cmp.w sl, 0 |
| if (sl == 0) {
0x0000d92e beq.w 0xdbf0 | goto label_36;
| }
0x0000d932 mov r2, sl | r2 = sl;
| label_14:
0x0000d934 ldr r3, [sp, 0x18] | r3 = var_18h;
0x0000d936 movs r1, 0 | r1 = 0;
0x0000d938 mov r0, fp | r0 = fp;
0x0000d93a blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
| }
| label_13:
0x0000d93c ldr r3, [sp, 8] | r3 = var_8h;
0x0000d93e lsls r6, r3, 0x1b | r6 = r3 << 0x1b;
| if (r6 < r3) {
0x0000d940 bmi 0xd8b4 | goto label_3;
| }
0x0000d942 mov r1, r3 | r1 = r3;
0x0000d944 mov r2, sl | r2 = sl;
0x0000d946 mov r0, fp | r0 = fp;
0x0000d948 bl 0xd050 | fcn_0000d050 (r0, r1, r2);
0x0000d94c ldr r3, [sp, 0xc] | r3 = var_ch;
0x0000d94e mov r5, r0 | r5 = r0;
0x0000d950 cmp r3, fp |
0x0000d952 it eq |
| if (r3 == fp) {
0x0000d954 cmneq r0, 0x11 | __asm ("cmneq r0, 0x11");
| }
0x0000d958 ite eq |
| if (r3 != fp) {
0x0000d95a moveq r4, 1 | r4 = 1;
| }
| if (r3 == fp) {
0x0000d95c movne r4, 0 | r4 = 0;
| }
| label_16:
0x0000d95e mov r0, sl | r0 = sl;
0x0000d960 blx 0x19a0 | fcn_000019a0 ();
0x0000d964 cmp r4, 0 |
| if (r4 == 0) {
0x0000d966 beq 0xda06 | goto label_37;
| }
| label_8:
0x0000d968 ldr r3, [sp, 8] | r3 = var_8h;
0x0000d96a lsls r0, r3, 0x1a | r0 = r3 << 0x1a;
| if (r0 >= r3) {
0x0000d96c bpl 0xd8c2 | goto label_4;
| }
0x0000d96e mvn r5, 0x10 | r5 = ~0x10;
0x0000d972 b 0xd8d0 | goto label_5;
| label_9:
0x0000d974 ldr r3, [sp, 0x1c] | r3 = var_1ch;
| if (r3 == 0) {
0x0000d976 cbz r3, 0xd9d6 | goto label_29;
| }
0x0000d978 ldr r0, [sp, 0x1c] | r0 = var_1ch;
0x0000d97a blx 0x1bb0 | r0 = fcn_00001bb0 ();
0x0000d97e mov r6, r0 | r6 = r0;
| if (r0 == 0) {
0x0000d980 cbz r0, 0xd9d6 | goto label_29;
| }
0x0000d982 adds r0, 2 | r0 += 2;
0x0000d984 blx 0x1b0c | strerror (r0);
0x0000d988 ldr.w r8, [sp, 0x1c] | r8 = var_1ch;
0x0000d98c mov sl, r0 | sl = r0;
0x0000d98e mov r0, r4 | r0 = r4;
0x0000d990 mov r4, r6 | r4 = r6;
| label_30:
0x0000d992 mov r2, r6 | r2 = r6;
0x0000d994 mov r1, r8 | r1 = r8;
0x0000d996 add r0, sl | r0 += sl;
0x0000d998 blx 0x19c8 | mmap64 ();
0x0000d99c b 0xd87e | goto label_6;
| label_27:
0x0000d99e mov r0, fp | r0 = fp;
0x0000d9a0 bl 0xd74c | r0 = fcn_0000d74c (r0);
0x0000d9a4 cmp r0, 1 |
| if (r0 > 1) {
0x0000d9a6 bhi.w 0xd832 | goto label_7;
| }
0x0000d9aa ldr r3, [sp, 0xc] | r3 = var_ch;
0x0000d9ac cmp r3, fp |
| if (r3 == fp) {
0x0000d9ae beq 0xd968 | goto label_8;
| }
0x0000d9b0 b 0xd8c2 | goto label_4;
| label_28:
0x0000d9b2 cmp r4, 0 |
| if (r4 == 0) {
0x0000d9b4 beq 0xd974 | goto label_9;
| }
0x0000d9b6 mov r0, r4 | r0 = r4;
0x0000d9b8 blx 0x1bb0 | fcn_00001bb0 ();
0x0000d9bc ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x0000d9be mov sb, r0 | sb = r0;
0x0000d9c0 cmp r3, 0 |
| if (r3 == 0) {
0x0000d9c2 beq.w 0xd848 | goto label_10;
| }
0x0000d9c4 add r7, sp, 0x104 | r7 = sp + 0x104;
0x0000d9c6 ldr r0, [sp, 0x1c] | r0 = var_1ch;
0x0000d9c8 blx 0x1bb0 | r0 = fcn_00001bb0 ();
0x0000d9cc orrs.w r3, sb, r0 | r3 = sb | r0;
0x0000d9d0 mov r6, r0 | r6 = r0;
| if (r3 != sb) {
0x0000d9d2 bne.w 0xdbde | goto label_38;
| }
| if (r7 == 0) {
| label_29:
0x0000d9d6 cbz r7, 0xd9f4 | goto label_39;
| }
0x0000d9d8 ldrb.w r3, [fp, 0x38] | r3 = *(arg_38h);
0x0000d9dc ubfx r3, r3, 1, 1 | r3 = (r3 >> 1) & ((1 << 1) - 1);
| if (r3 != 0) {
0x0000d9e0 cbnz r3, 0xd9f4 | goto label_39;
| }
0x0000d9e2 ldr r2, [sp, 0x18] | r2 = var_18h;
0x0000d9e4 mov sl, r2 | sl = r2;
0x0000d9e6 cmp r2, 0 |
| if (r2 == 0) {
0x0000d9e8 beq.w 0xd8a8 | goto label_11;
| }
0x0000d9ec ldr r2, [pc, 0x230] |
0x0000d9ee mov sl, r3 | sl = r3;
0x0000d9f0 add r2, pc | r2 = 0x1b614;
0x0000d9f2 b 0xd8a0 | goto label_12;
| label_39:
0x0000d9f4 ldr r3, [sp, 0x18] | r3 = var_18h;
0x0000d9f6 mov sl, r3 | sl = r3;
0x0000d9f8 cmp r3, 0 |
| if (r3 == 0) {
0x0000d9fa beq 0xd93c | goto label_13;
| }
0x0000d9fc ldr r2, [pc, 0x224] |
0x0000d9fe mov.w sl, 0 | sl = 0;
0x0000da02 add r2, pc | r2 = 0x1b62a;
0x0000da04 b 0xd934 | goto label_14;
| label_37:
0x0000da06 cmn.w r5, 0x11 |
| if (r5 == 0x11) {
0x0000da0a beq.w 0xd8c2 | goto label_4;
| }
0x0000da0e ldrb.w r3, [fp, 0x38] | r3 = *(arg_38h);
0x0000da12 lsls r1, r3, 0x1d | r1 = r3 << 0x1d;
| if (r1 >= r3) {
0x0000da14 bpl.w 0xd8c2 | goto label_4;
| }
0x0000da18 cmp r5, 0 |
| if (r5 >= 0) {
0x0000da1a bge.w 0xd8c4 | goto label_15;
| }
0x0000da1e b 0xd8d0 | goto label_5;
| label_33:
0x0000da20 mov r0, fp | r0 = fp;
0x0000da22 bl 0xd284 | r0 = fcn_0000d284 (r0);
0x0000da26 mov r4, r0 | r4 = r0;
0x0000da28 cmp r0, 0 |
| if (r0 == 0) {
0x0000da2a beq.w 0xdbf6 | goto label_40;
| }
0x0000da2e cmp.w sl, 0 |
| if (sl == 0) {
0x0000da32 beq.w 0xdb52 | goto label_41;
| }
0x0000da36 mov r0, sl | r0 = sl;
0x0000da38 blx 0x1bb0 | r0 = fcn_00001bb0 ();
0x0000da3c mov r6, r0 | r6 = r0;
0x0000da3e str.w sl, [sp, 0x14] | __asm ("str.w sl, [var_14h]");
| label_19:
0x0000da42 mov r0, r4 | r0 = r4;
0x0000da44 blx 0x1bb0 | r0 = fcn_00001bb0 ();
0x0000da48 mov r7, r0 | r7 = r0;
0x0000da4a mov r0, r4 | r0 = r4;
0x0000da4c adds r1, r7, 1 | r1 = r7 + 1;
0x0000da4e bl 0x92ac | fcn_000092ac (r0, r1);
0x0000da52 ldr r3, [sp, 0xc] | r3 = var_ch;
0x0000da54 mov sb, r0 | sb = r0;
0x0000da56 sub.w r3, r3, fp | r3 -= fp;
0x0000da5a clz r3, r3 | r3 &= r3;
0x0000da5e lsrs r3, r3, 5 | r3 >>= 5;
0x0000da60 str r3, [sp, 0x38] | var_38h = r3;
0x0000da62 cmp r0, 0 |
| if (r0 == 0) {
0x0000da64 beq.w 0xdbae | goto label_42;
| }
0x0000da68 sub.w r2, r6, 0xd | r2 = r6 - 0xd;
0x0000da6c strd fp, sl, [sp, 0x30] | __asm ("strd fp, sl, [var_30h]");
0x0000da70 str r2, [sp, 0x10] | var_10h = r2;
0x0000da72 mov sl, r6 | sl = r6;
0x0000da74 ldr.w fp, [sp, 0x3c] | fp = var_3ch;
0x0000da78 b 0xdaca |
| while (r0 != 0) {
0x0000da7a ldr r3, [sp, 0x10] | r3 = var_10h;
0x0000da7c sub.w r8, r7, 0xd | r8 = r7 - 0xd;
0x0000da80 sub.w r6, r0, sb | r6 = r0 - sb;
0x0000da84 add.w r5, r0, 0xd | r5 = r0 + 0xd;
0x0000da88 sub.w r8, r8, r6 | r8 -= r6;
0x0000da8c add r7, r3 | r7 += r3;
0x0000da8e adds r0, r7, 1 | r0 = r7 + 1;
0x0000da90 blx 0x1b0c | r0 = strerror (r0);
0x0000da94 mov r4, r0 | r4 = r0;
0x0000da96 cmp r0, 0 |
| if (r0 == 0) {
0x0000da98 beq.w 0xdba4 | goto label_43;
| }
0x0000da9c mov r1, sb | r1 = sb;
0x0000da9e mov r2, r6 | r2 = r6;
0x0000daa0 blx 0x19c8 | mmap64 ();
0x0000daa4 ldr r1, [sp, 0x14] | r1 = var_14h;
0x0000daa6 mov r2, sl | r2 = sl;
0x0000daa8 adds r0, r4, r6 | r0 = r4 + r6;
0x0000daaa blx 0x19c8 | mmap64 ();
0x0000daae add.w r0, sl, r6 | r0 = sl + r6;
0x0000dab2 mov r2, r8 | r2 = r8;
0x0000dab4 mov r1, r5 | r1 = r5;
0x0000dab6 add r0, r4 | r0 += r4;
0x0000dab8 blx 0x19c8 | mmap64 ();
0x0000dabc mov r0, sb | r0 = sb;
0x0000dabe mov.w r3, 0 | r3 = 0;
0x0000dac2 mov sb, r4 | sb = r4;
0x0000dac4 strb r3, [r4, r7] | *((r4 + r7)) = r3;
0x0000dac6 blx 0x19a0 | fcn_000019a0 ();
0x0000daca mov r1, fp | r1 = fp;
0x0000dacc mov r0, sb | r0 = sb;
0x0000dace blx 0x18e4 | r0 = strstr (r0, r1);
0x0000dad2 cmp r0, 0 |
0x0000dad4 bne 0xda7a |
| }
0x0000dad6 ldr r3, [sp, 0x28] | r3 = var_28h;
0x0000dad8 ldrd fp, sl, [sp, 0x30] | __asm ("ldrd fp, sl, [var_30h]");
0x0000dadc cmp r3, 0 |
| if (r3 == 0) {
0x0000dade beq 0xdb5a | goto label_44;
| }
0x0000dae0 ldr r2, [sp, 0x2c] | r2 = var_2ch;
0x0000dae2 mov r1, sb | r1 = sb;
0x0000dae4 mov r0, fp | r0 = fp;
0x0000dae6 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x0000dae8 ldr r3, [sp, 0x38] | r3 = var_38h;
0x0000daea cmn.w r0, 0x11 |
0x0000daee ite ne |
| if (r0 == 0x11) {
0x0000daf0 movne r4, 0 | r4 = 0;
| }
| if (r0 != 0x11) {
0x0000daf2 moveq r4, 1 | r4 = 1;
| }
0x0000daf4 mov r5, r0 | r5 = r0;
0x0000daf6 ands r3, r4 | r3 &= r4;
0x0000daf8 mov r4, r3 | r4 = r3;
| label_20:
0x0000dafa mov r0, sb | r0 = sb;
0x0000dafc blx 0x19a0 | fcn_000019a0 ();
0x0000db00 b 0xd95e | goto label_16;
| label_23:
0x0000db02 bl 0xd74c | r0 = fcn_0000d74c (r0);
0x0000db06 cmp r0, 1 |
| if (r0 > 1) {
0x0000db08 bhi.w 0xd7ba | goto label_17;
| }
0x0000db0c ldr r3, [sp, 8] | r3 = var_8h;
0x0000db0e tst.w r3, 0x20 |
0x0000db12 ite ne |
| if ((r3 & 0x20) == 0) {
0x0000db14 mvnne r5, 0x10 | r5 = ~0x10;
| }
| if ((r3 & 0x20) == 0) {
0x0000db18 movs r5, 0 | r5 = 0;
| }
0x0000db1a b 0xd8d6 | goto label_2;
| label_35:
0x0000db1c ldr r3, [sp, 0x44] | r3 = var_44h;
0x0000db1e str r3, [sp, 0x20] | var_20h = r3;
0x0000db20 ldr r3, [sp, 8] | r3 = var_8h;
0x0000db22 lsls r2, r3, 0xf | r2 = r3 << 0xf;
| if (r2 >= r3) {
0x0000db24 bpl.w 0xd802 | goto label_18;
| }
| label_26:
0x0000db28 ldr r3, [sp, 0xc] | r3 = var_ch;
0x0000db2a movs r1, 1 | r1 = 1;
0x0000db2c ldr r4, [sp, 0x20] | r4 = var_20h;
0x0000db2e ldr r0, [r3] | r0 = *(r3);
0x0000db30 movs r3, 0 | r3 = 0;
0x0000db32 str r3, [sp, 0x48] | var_48h = r3;
0x0000db34 mov r2, r4 | r2 = r4;
0x0000db36 add r3, sp, 0x48 | r3 += var_48h;
0x0000db38 bl 0xd13c | r0 = fcn_0000d13c (r0, r1, r2, r3);
0x0000db3c subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 < r0) {
0x0000db3e blt.w 0xd8d6 | goto label_2;
| }
0x0000db42 mov r0, r4 | r0 = r4;
0x0000db44 bl 0xcb50 | fcn_0000cb50 (r0);
0x0000db48 ldr r3, [sp, 0x48] | r3 = var_48h;
0x0000db4a str r3, [sp, 0x20] | var_20h = r3;
| if (r3 != 0) {
0x0000db4c cbz r3, 0xdb98 |
0x0000db4e str r3, [sp, 0x44] | var_44h = r3;
0x0000db50 b 0xd802 | goto label_18;
| label_41:
0x0000db52 ldr r3, [pc, 0xd4] |
0x0000db54 add r3, pc | r3 = 0x1b782;
0x0000db56 str r3, [sp, 0x14] | var_14h = r3;
0x0000db58 b 0xda42 | goto label_19;
| label_44:
0x0000db5a ldr r4, [pc, 0xd0] |
0x0000db5c mov r0, fp | r0 = fp;
0x0000db5e bl 0xcfb4 | fcn_0000cfb4 (r0);
0x0000db62 movs r2, 1 | r2 = 1;
0x0000db64 mov r1, r0 | r1 = r0;
0x0000db66 add r4, pc | r4 = 0x1b798;
0x0000db68 mov r0, r4 | r0 = r4;
0x0000db6a blx 0x1bcc | errno_location ();
0x0000db6e mov r0, sb | r0 = sb;
0x0000db70 blx 0x1b24 | vfprintf_chk ()
0x0000db72 invalid |
0x0000db76 mov r0, r4 | r0 = r4;
0x0000db78 blx 0x1d8c | fcn_00001d8c ();
0x0000db7c adds r2, r5, 1 | r2 = r5 + 1;
0x0000db7e it eq |
| if (r2 != r5) {
0x0000db80 moveq r0, sb | r0 = sb;
| }
| if (r2 == r5) {
0x0000db82 beq 0xdbc4 | goto label_45;
| }
0x0000db84 ubfx r5, r5, 8, 8 | r5 = (r5 >> 8) & ((1 << 8) - 1);
0x0000db88 mov r0, sb | r0 = sb;
| if (r5 != 0) {
0x0000db8a cbnz r5, 0xdbc4 | goto label_45;
| }
0x0000db8c blx 0x19a0 | fcn_000019a0 ();
0x0000db90 b 0xd8b4 | goto label_3;
| label_32:
0x0000db92 ldr r2, [pc, 0x9c] |
0x0000db94 add r2, pc | r2 = 0x1b7ca;
0x0000db96 b 0xd8a0 | goto label_12;
| }
0x0000db98 mov.w r5, 0x10000 | r5 = 0x10000;
0x0000db9c b 0xd8d6 | goto label_2;
| label_22:
0x0000db9e mvn r5, 1 | r5 = ~1;
0x0000dba2 b 0xd8d6 | goto label_2;
| label_43:
0x0000dba4 ldrd fp, sl, [sp, 0x30] | __asm ("ldrd fp, sl, [var_30h]");
0x0000dba8 mvn r5, 0xb | r5 = ~0xb;
0x0000dbac b 0xdafa | goto label_20;
| label_42:
0x0000dbae mov r0, sl | r0 = sl;
0x0000dbb0 blx 0x19a0 | fcn_000019a0 ();
0x0000dbb4 ldrb.w r3, [fp, 0x38] | r3 = *(arg_38h);
0x0000dbb8 lsls r7, r3, 0x1d | r7 = r3 << 0x1d;
| if (r7 >= r3) {
0x0000dbba bpl.w 0xd8c2 | goto label_4;
| }
0x0000dbbe mvn r5, 0xb | r5 = ~0xb;
0x0000dbc2 b 0xd8d0 | goto label_5;
| label_45:
0x0000dbc4 blx 0x19a0 | fcn_000019a0 ();
0x0000dbc8 mov r0, sl | r0 = sl;
0x0000dbca blx 0x19a0 | fcn_000019a0 ();
0x0000dbce ldrb.w r3, [fp, 0x38] | r3 = *(arg_38h);
0x0000dbd2 lsls r3, r3, 0x1d | r3 <<= 0x1d;
| if (r3 >= r3) {
0x0000dbd4 bpl.w 0xd8c2 | goto label_4;
| }
0x0000dbd8 mvn r5, 0x15 | r5 = ~0x15;
0x0000dbdc b 0xd8d0 | goto label_5;
| label_38:
0x0000dbde add.w r0, sb, r6 | r0 = sb + r6;
0x0000dbe2 adds r0, 2 | r0 += 2;
0x0000dbe4 blx 0x1b0c | strerror (r0);
0x0000dbe8 ldr.w r8, [sp, 0x1c] | r8 = var_1ch;
0x0000dbec mov sl, r0 | sl = r0;
0x0000dbee b 0xd860 | goto label_21;
| label_36:
0x0000dbf0 ldr r2, [pc, 0x40] |
0x0000dbf2 add r2, pc | r2 = 0x1b82a;
0x0000dbf4 b 0xd934 | goto label_14;
| label_40:
0x0000dbf6 ldr r3, [pc, 0x40] |
0x0000dbf8 movw r2, 0x3f5 | r2 = 0x3f5;
0x0000dbfc ldr r1, [pc, 0x3c] |
0x0000dbfe ldr r0, [pc, 0x40] |
0x0000dc00 add r3, pc | r3 = 0x1b83e;
0x0000dc02 add r1, pc | r1 = 0x1b842;
0x0000dc04 add r0, pc | r0 = 0x1b84a;
0x0000dc06 blx 0x1de0 | fcn_00001de0 ();
| label_34:
0x0000dc0a blx 0x1a1c | stat64 ();
0x0000dc0e nop |
0x0000dc10 strh r2, [r1, 0x34] | *((r1 + 0x34)) = r2;
0x0000dc12 movs r1, r0 | r1 = r0;
0x0000dc14 lsls r4, r7, 6 | r4 = r7 << 6;
0x0000dc16 movs r0, r0 |
0x0000dc18 ldr r2, [pc, 0x1d8] | r2 = *(0xddf4);
0x0000dc1a movs r0, r0 |
0x0000dc1c strh r6, [r7, 0x28] | *((r7 + 0x28)) = r6;
0x0000dc1e movs r1, r0 | r1 = r0;
0x0000dc20 str r4, [r4, 0x20] | *((r4 + 0x20)) = r4;
0x0000dc22 movs r0, r0 |
0x0000dc24 str r2, [r2, 0x20] | *((r2 + 0x20)) = r2;
0x0000dc26 movs r0, r0 |
0x0000dc28 str r0, [r0, 0xc] | *((r0 + 0xc)) = r0;
0x0000dc2a movs r0, r0 |
0x0000dc2c bx r5 | return uint32_t (*r5)() ();
| }
[*] Function fprintf used 2 times kmod