[*] Binary protection state of busybox.nosuid
Full RELRO Canary found NX enabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function mmap tear down of busybox.nosuid
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x32faa */
| #include <stdint.h>
|
; (fcn) case.0x133ac.81 () | void case_0x133ac_81 (int16_t arg1, uint32_t arg4) {
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_14h;
| r0 = arg1;
| r3 = arg4;
0x00032f78 shsaxmi sl, r0, r8 | __asm ("shsaxmi sl, r0, r8");
0x00032f7c str.w r8, [sp, 0x10] | __asm ("str.w r8, [var_10h]");
0x00032f80 mov r6, r4 | r6 = r4;
0x00032f82 movs r5, 0 | r5 = 0;
0x00032f84 movs r7, 0x7e | r7 = 0x7e;
0x00032f86 mov r4, sl | r4 = sl;
0x00032f88 mov r8, r3 | r8 = r3;
0x00032f8a mov sl, sb | sl = sb;
| label_8:
0x00032f8c adds r1, r4, r0 | r1 = r4 + r0;
0x00032f8e mov r2, r5 | r2 = r5;
0x00032f90 cmp r5, r1 |
| if (r5 < r1) {
0x00032f92 bhs 0x32fa6 |
0x00032f94 ldr r1, [r6, 4] | r1 = *((r6 + 4));
0x00032f96 cmp r1, sl |
| if (r1 < sl) {
0x00032f98 bls.w 0x3313c | goto label_9;
| }
0x00032f9c ldrb r7, [sl], 1 | r7 = *(sl);
| sl++;
0x00032fa0 cmp r7, 0xa |
| if (r7 != 0xa) {
0x00032fa2 bne.w 0x330e4 | goto label_10;
| }
| }
| label_7:
0x00032fa6 mov r3, r8 | r3 = r8;
0x00032fa8 mov r4, r6 | r4 = r6;
0x00032faa cmp r3, r5 |
0x00032fac mov r6, r0 | r6 = r0;
0x00032fae it ge |
| if (r3 < r5) {
0x00032fb0 movge r3, r5 | r3 = r5;
| }
0x00032fb2 ldr.w r8, [sp, 0x10] | r8 = var_10h;
0x00032fb6 mov r7, r3 | r7 = r3;
0x00032fb8 subs r0, r5, r3 | r0 = r5 - r3;
0x00032fba ldr r3, [sp, 4] | r3 = var_4h;
0x00032fbc cmp r0, r6 |
0x00032fbe add r7, r3 | r7 += r3;
| if (r0 < r6) {
0x00032fc0 bhs 0x32fce |
0x00032fc2 subs r2, r6, r0 | r2 = r6 - r0;
0x00032fc4 movs r1, 0x20 | r1 = 0x20;
0x00032fc6 add r0, r7 | r0 += r7;
0x00032fc8 blx 0x41c8 | fcn_000041c8 ();
0x00032fcc ldr r6, [r4, 0x2c] | r6 = *((r4 + 0x2c));
| }
0x00032fce ldr r5, [r4, 4] | r5 = *((r4 + 4));
0x00032fd0 cmp r5, sb |
| if (r5 >= sb) {
0x00032fd2 bls 0x32fe6 |
0x00032fd4 sub.w r2, r5, sb | r2 = r5 - sb;
0x00032fd8 mov r0, sb | r0 = sb;
0x00032fda movs r1, 0xa | r1 = 0xa;
0x00032fdc blx 0x4294 | r0 = fcn_00004294 ();
0x00032fe0 cmp r0, 0 |
| if (r0 != 0) {
0x00032fe2 bne 0x330de | goto label_11;
| }
0x00032fe4 mov sb, r5 | sb = r5;
| }
| label_6:
0x00032fe6 ldr r0, [r4, 0x50] | r0 = *((r4 + 0x50));
0x00032fe8 subs r3, r6, 1 | r3 = r6 - 1;
0x00032fea mla r0, r6, fp, r0 | __asm ("mla r0, r6, fp, r0");
0x00032fee cmp.w r8, 0 |
| if (r8 != 0) {
0x00032ff2 beq 0x32ff8 |
0x00032ff4 movs r5, 0 | r5 = 0;
0x00032ff6 b 0x33016 | goto label_1;
| }
0x00032ff8 cmp r3, 0 |
| if (r3 >= 0) {
0x00032ffa bge 0x33084 | goto label_12;
| }
0x00032ffc mov r5, r8 | r5 = r8;
0x00032ffe mov r6, r8 | r6 = r8;
| do {
| label_3:
0x00033000 ldr.w r1, [r4, 0x84] | r1 = *((r4 + 0x84));
0x00033004 ldr r2, [r4, 0x3c] | r2 = *((r4 + 0x3c));
0x00033006 cmp r1, r2 |
0x00033008 itt eq |
| if (r1 != r2) {
0x0003300a moveq r1, r3 | r1 = r3;
| }
| if (r1 != r2) {
0x0003300c moveq r2, r3 | r2 = r3;
| }
| if (r1 == r2) {
0x0003300e beq 0x330b4 | goto label_5;
| }
0x00033010 cmp r3, r5 |
0x00033012 it lt |
| if (r3 >= r5) {
0x00033014 movlt r5, 0 | r5 = 0;
| }
| label_1:
0x00033016 subs r3, r3, r5 | r3 -= r5;
0x00033018 adds r6, r0, r5 | r6 = r0 + r5;
0x0003301a add.w sl, r3, 1 | sl = r3 + 1;
0x0003301e adds r1, r7, r5 | r1 = r7 + r5;
0x00033020 mov r2, sl | r2 = sl;
0x00033022 mov r0, r6 | r0 = r6;
0x00033024 blx 0x3b30 | mmap64 ()
0x00033028 mov r1, r5 | r1 = r5;
0x0003302a mov r0, fp | r0 = fp;
0x0003302c bl 0x32d70 | fcn_00032d70 (r0, r1, r2, r3);
0x00033030 ldr r2, [sp, 8] | r2 = var_8h;
0x00033032 mov r1, sl | r1 = sl;
0x00033034 ldr r3, [pc, 0x194] |
0x00033036 mov r0, r6 | r0 = r6;
0x00033038 ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x0003303a movs r2, 1 | r2 = 1;
0x0003303c ldr r3, [r3] | r3 = *(0x331cc);
0x0003303e blx 0x3da4 | fcn_00003da4 ();
| label_0:
0x00033042 ldr r3, [r4, 0x28] | r3 = *((r4 + 0x28));
0x00033044 add.w fp, fp, 1 |
0x00033048 subs r3, 1 | r3--;
0x0003304a cmp r3, fp |
| if (r3 <= fp) {
0x0003304c bhi 0x3307e |
0x0003304e ldrd r7, r1, [r4, 0x34] | __asm ("ldrd r7, r1, [r4, 0x34]");
0x00033052 mov r0, r7 | r0 = r7;
0x00033054 bl 0x32d70 | fcn_00032d70 (r0, r1, r2, r3);
0x00033058 ldr.w r3, [r4, 0x358] | r3 = *((r4 + 0x358));
| if (r3 != 0) {
0x0003305c cbz r3, 0x3306a |
0x0003305e ldr r3, [r4, 0x3c] | r3 = *((r4 + 0x3c));
0x00033060 str.w r3, [r4, 0x84] | __asm ("str.w r3, [r4, 0x84]");
0x00033064 add sp, 0x1c |
0x00033066 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x00033068 ldrh r0, [r6, 0x3e] | r0 = *((r6 + 0x3e));
| }
0x0003306a ldrd r2, r3, [r4, 0x38] | __asm ("ldrd r2, r3, [r4, 0x38]");
0x0003306e add r2, r3 | r2 += r3;
0x00033070 str.w r3, [r4, 0x84] | __asm ("str.w r3, [r4, 0x84]");
0x00033074 str.w r2, [r4, 0x354] | __asm ("str.w r2, aav.0x000000ff");
0x00033078 add sp, 0x1c |
0x0003307a pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
0x0003307e ldr r3, [r4, 0x3c] | r3 = *((r4 + 0x3c));
0x00033080 ldr r6, [r4, 0x2c] | r6 = *((r4 + 0x2c));
0x00033082 b 0x32f76 | void (*0x32f76)() ();
| label_12:
0x00033084 subs r1, r7, 1 | r1 = r7 - 1;
0x00033086 subs r2, r0, 1 | r2 = r0 - 1;
0x00033088 mov r5, r8 | r5 = r8;
| label_2:
0x0003308a ldrb lr, [r1, 1]! |
0x0003308e ldrb ip, [r2, 1]! | ip = *((r2 += 1));
0x00033092 cmp lr, ip |
| if (lr == ip) {
0x00033094 beq 0x330c8 | goto label_13;
| }
0x00033096 cmp r3, r5 |
0x00033098 it lt |
| if (r3 >= r5) {
0x0003309a movlt r6, 1 | r6 = 1;
| }
0x0003309c blt 0x33000 |
| } while (r3 < r5);
0x0003309e adds r1, r7, r6 | r1 = r7 + r6;
0x000330a0 mov r2, r3 | r2 = r3;
0x000330a2 add r6, r0 | r6 += r0;
| label_4:
0x000330a4 ldrb lr, [r1, -0x1]! |
0x000330a8 ldrb ip, [r6, -0x1]! | ip = *((r6 -= 0x1));
0x000330ac cmp lr, ip |
| if (lr == ip) {
0x000330ae beq 0x330d2 | goto label_14;
| }
0x000330b0 mov r1, r2 | r1 = r2;
0x000330b2 movs r6, 1 | r6 = 1;
| label_5:
0x000330b4 cmp r3, r1 |
0x000330b6 it lo |
| if (r3 >= r1) {
0x000330b8 movlo r2, r3 | r2 = r3;
| }
0x000330ba cmp r5, r2 |
0x000330bc ite gt |
| if (r5 <= r2) {
0x000330be movgt r5, 0 | r5 = 0;
| }
| if (r5 > r2) {
0x000330c0 movle r3, r2 | r3 = r2;
| }
0x000330c2 cmp r6, 0 |
| if (r6 == 0) {
0x000330c4 beq 0x33042 | goto label_0;
| }
0x000330c6 b 0x33016 | goto label_1;
| label_13:
0x000330c8 adds r5, 1 | r5++;
0x000330ca cmp r3, r5 |
| if (r3 >= r5) {
0x000330cc bge 0x3308a | goto label_2;
| }
0x000330ce movs r6, 0 | r6 = 0;
0x000330d0 b 0x33000 | goto label_3;
| label_14:
0x000330d2 subs r2, 1 | r2--;
0x000330d4 cmp r2, r5 |
| if (r2 >= r5) {
0x000330d6 bge 0x330a4 | goto label_4;
| }
0x000330d8 mov r1, r2 | r1 = r2;
0x000330da movs r6, 1 | r6 = 1;
0x000330dc b 0x330b4 | goto label_5;
| label_11:
0x000330de adds r5, r0, 1 | r5 = r0 + 1;
0x000330e0 mov sb, r5 | sb = r5;
0x000330e2 b 0x32fe6 | goto label_6;
| label_10:
0x000330e4 lsls r3, r7, 0x18 | r3 = r7 << 0x18;
0x000330e6 it mi |
| if (r3 >= r7) {
0x000330e8 movmi r7, 0x2e | r7 = 0x2e;
| }
| if (r3 < r7) {
0x000330ea bmi 0x3313c | goto label_9;
| }
0x000330ec cmp r7, 0x7f |
0x000330ee it ne |
| if (r7 != 0x7f) {
0x000330f0 cmpne r7, 0x1f | __asm ("cmpne r7, 0x1f");
| }
| if (r7 > 0x7f) {
0x000330f2 bhi 0x3313c | goto label_9;
| }
0x000330f4 cmp r7, 9 |
| if (r7 != 9) {
0x000330f6 bne 0x3316c | goto label_15;
| }
0x000330f8 mov r1, r4 | r1 = r4;
0x000330fa mov r0, r5 | r0 = r5;
0x000330fc subs r4, 1 | r4--;
0x000330fe str r2, [sp, 0x14] | var_14h = r2;
0x00033100 bl 0x838c | fcn_0000838c (r0, r1);
0x00033104 cmp r4, r1 |
0x00033106 ldr r2, [sp, 0x14] | r2 = var_14h;
0x00033108 it eq |
| if (r4 != r1) {
0x0003310a moveq r7, 0x20 | r7 = 0x20;
| }
| if (r4 == r1) {
0x0003310c beq 0x3313c | goto label_9;
| }
0x0003310e addw r5, r5, 0x537 | __asm ("addw r5, r5, aav.0x000000ff");
0x00033112 str.w r8, [sp, 0x14] | __asm ("str.w r8, [var_14h]");
0x00033116 adds r4, r6, r5 | r4 = r6 + r5;
| do {
0x00033118 ldr r3, [sp, 0xc] | r3 = var_ch;
0x0003311a adds r5, r3, r4 | r5 = r3 + r4;
0x0003311c mov.w r3, 0x20 | r3 = 0x20;
0x00033120 strb r3, [r4, 1]! | *((r4 += 1)) = r3;
0x00033124 mov r0, r5 | r0 = r5;
0x00033126 ldr r7, [r6, 0x58] | r7 = *((r6 + 0x58));
0x00033128 mov r1, r7 | r1 = r7;
0x0003312a subs r7, 1 | r7--;
0x0003312c bl 0x838c | fcn_0000838c (r0, r1);
0x00033130 cmp r1, r7 |
0x00033132 bne 0x33118 |
| } while (r1 != r7);
0x00033134 ldr.w r8, [sp, 0x14] | r8 = var_14h;
0x00033138 mov r2, r5 | r2 = r5;
0x0003313a movs r7, 0x20 | r7 = 0x20;
| label_9:
0x0003313c ldr r3, [sp, 4] | r3 = var_4h;
0x0003313e adds r5, 1 | r5++;
0x00033140 cmp r5, r8 |
0x00033142 strb r7, [r3, r2] | *((r3 + r2)) = r7;
0x00033144 mov r2, r5 | r2 = r5;
0x00033146 ldr r4, [r6, 0x58] | r4 = *((r6 + 0x58));
0x00033148 it ge |
| if (r5 < r8) {
0x0003314a movge r2, r8 | r2 = r8;
| }
0x0003314c cmp r4, r2 |
| if (r4 <= r2) {
0x0003314e bgt 0x33160 |
0x00033150 mov r2, r5 | r2 = r5;
0x00033152 adds r1, r3, r4 | r1 = r3 + r4;
0x00033154 mov r0, r3 | r0 = r3;
0x00033156 sub.w r8, r8, r4 | r8 -= r4;
0x0003315a subs r5, r5, r4 | r5 -= r4;
0x0003315c blx 0x3ab0 | fcn_00003ab0 ();
| }
0x00033160 ldr r2, [r6, 4] | r2 = *((r6 + 4));
0x00033162 ldr r0, [r6, 0x2c] | r0 = *((r6 + 0x2c));
0x00033164 cmp r2, sl |
| if (r2 < sl) {
0x00033166 bls.w 0x32fa6 | goto label_7;
| }
0x00033168 add r7, sp, 0x78 | r7 = sp + 0x78;
0x0003316a b 0x32f8c | goto label_8;
| label_15:
0x0003316c ldr r3, [sp, 4] | r3 = var_4h;
0x0003316e cmp r7, 0x7f |
0x00033170 mov.w r1, 0x5e | r1 = 0x5e;
0x00033174 add.w r5, r5, 1 | r5++;
0x00033178 ite ne |
| if (r7 == 0x7f) {
0x0003317a addne r7, 0x40 | r7 += 0x40;
| }
| if (r7 != 0x7f) {
0x0003317c moveq r7, 0x3f | r7 = 0x3f;
| }
0x0003317e strb r1, [r3, r2] | *((r3 + r2)) = r1;
0x00033180 it ne |
| if (r7 != 0x7f) {
0x00033182 uxtbne r7, r7 | __asm ("uxtbne r7, r7");
| }
0x00033184 mov r2, r5 | r2 = r5;
0x00033186 b 0x3313c | goto label_9;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x8e3c */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.00008e3c () | void fcn_00008e3c (int16_t arg1) {
| int16_t var_4h_2;
| int16_t var_ch;
| int16_t var_0h_2;
| int16_t var_0h;
| int16_t var_4h;
| r0 = arg1;
| do {
0x00008bec push.w {r4, r5, r6, r7, r8, sb, lr} |
0x00008bf0 sub sp, 0x1d4 |
0x00008bf2 ldr r5, [pc, 0x140] |
0x00008bf4 mov r8, r1 | r8 = r1;
0x00008bf6 add r7, sp, 0 | r7 += var_0h_2;
0x00008bf8 mov r3, r0 | r3 = r0;
0x00008bfa ldr r1, [pc, 0x13c] |
0x00008bfc str r3, [r7, 0xc] | *((r7 + 0xc)) = r3;
0x00008bfe add r5, pc | r5 = 0x11938;
0x00008c00 ldr r3, [pc, 0x138] | r3 = *(0x8d3c);
0x00008c02 mov sb, r5 | sb = r5;
0x00008c04 ldr r4, [pc, 0x138] |
0x00008c06 add r1, pc | r1 = 0x11944;
0x00008c08 invalid |
0x00008c0c strb r4, [r0, 0xb] | *((r0 + 0xb)) = r4;
0x00008c0e ldr r5, [pc, 0x134] |
0x00008c10 add.w r0, r7, 0x28 | r0 = r7 + 0x28;
0x00008c14 ldr r3, [r1, r3] |
0x00008c16 add r4, pc | r4 = 0x1195a;
0x00008c18 mov r1, r4 | r1 = r4;
0x00008c1a add r5, pc | r5 = 0x11964;
0x00008c1c ldr r3, [r3] | r3 = *(0x11944);
0x00008c1e str.w r3, [r7, 0x1cc] | __asm ("str.w r3, aav.0x000000ff");
0x00008c22 mov.w r3, 0 | r3 = 0;
0x00008c26 blx 0x3b30 | mmap64 ()
0x00008c2a ldr r2, [r5] | r2 = *(0x11964);
0x00008c2c movs r0, 1 | r0 = 1;
0x00008c2e ldr.w ip, [pc, 0x118] |
0x00008c32 ldr r3, [pc, 0x118] |
0x00008c34 str r2, [r7, 0x20] | *((r7 + 0x20)) = r2;
0x00008c36 add ip, pc | ip = 0x11984;
0x00008c38 ldr r2, [pc, 0x114] |
0x00008c3a ldr.w r6, [ip] | r6 = *(0x11984);
0x00008c3e add r3, pc | r3 = 0x11990;
0x00008c40 ldr r1, [pc, 0x110] | r1 = *(0x8d54);
0x00008c42 add r2, pc | r2 = 0x11996;
0x00008c44 str r6, [r7, 0x1c] | *((r7 + 0x1c)) = r6;
0x00008c46 ldr r6, [r2] | r6 = *(0x11996);
0x00008c48 str r0, [r2] | *(r2) = r0;
0x00008c4a ldrb r2, [r3] | r2 = *(r3);
0x00008c4c str r6, [r7, 0x14] | *((r7 + 0x14)) = r6;
0x00008c4e strb r0, [r3] | *(r3) = r0;
0x00008c50 mov r0, r8 | r0 = r8;
0x00008c52 str r2, [r7, 0x10] | *((r7 + 0x10)) = r2;
0x00008c54 ldr r2, [pc, 0x100] |
0x00008c56 ldr.w r3, [sb, r1] | r3 = *((sb + r1));
0x00008c5a str.w r8, [r7, 8] | __asm ("str.w r8, [r7, 8]");
0x00008c5e add r2, pc |
0x00008c60 ldr r2, [r2] | r2 = *(0x119ba);
0x00008c62 str r2, [r7, 0x18] | *((r7 + 0x18)) = r2;
0x00008c64 movs r2, 0 | r2 = 0;
0x00008c66 str r2, [r3] | *(r3) = r2;
0x00008c68 bl 0x3d398 | r0 = fcn_0003d398 (r0);
0x00008c6c mov r3, r0 | r3 = r0;
0x00008c6e mov r0, r4 | r0 = r4;
0x00008c70 str r3, [r7, 0x24] | *((r7 + 0x24)) = r3;
0x00008c72 ldr r3, [pc, 0xe8] |
0x00008c74 add r3, pc | r3 = 0x119d6;
0x00008c76 str r3, [r5] | *(r5) = r3;
0x00008c78 blx 0x3aa0 | r0 = strchrnul ();
0x00008c7c mov r4, r0 | r4 = r0;
| if (r0 == 0) {
0x00008c7e cbnz r0, 0x8cca |
0x00008c80 ldr r6, [r7, 0x24] | r6 = *((r7 + 0x24));
0x00008c82 mov r5, sp | r5 = sp;
0x00008c84 ldr.w r8, [r7, 8] | r8 = *((r7 + 8));
0x00008c88 adds r2, r6, 1 | r2 = r6 + 1;
0x00008c8a lsls r2, r2, 2 | r2 <<= 2;
0x00008c8c mov r1, r8 | r1 = r8;
0x00008c8e adds r3, r2, 7 | r3 = r2 + 7;
0x00008c90 bic r3, r3, 7 | r3 = BIT_MASK (r3, 7);
0x00008c94 sub.w sp, sp, r3 |
0x00008c98 mov r4, sp | r4 = sp;
0x00008c9a mov r0, r4 | r0 = r4;
0x00008c9c blx 0x3b30 | mmap64 ()
0x00008ca0 mov r1, r8 | r1 = r8;
0x00008ca2 ldr r3, [pc, 0xbc] |
0x00008ca4 ldr.w r8, [r7, 0xc] | r8 = *((r7 + 0xc));
0x00008ca8 ldr r2, [r4] | r2 = *(r4);
0x00008caa add r3, pc | r3 = 0x11a10;
0x00008cac mov r0, r8 | r0 = r8;
0x00008cae str r2, [r3] | *(r3) = r2;
0x00008cb0 bl 0x8580 | fcn_00008580 (r0, r1);
0x00008cb4 ldr r3, [pc, 0xac] |
0x00008cb6 mov r1, r4 | r1 = r4;
0x00008cb8 mov r0, r6 | r0 = r6;
0x00008cba add r3, pc |
0x00008cbc ldr.w r3, [r3, r8, lsl 2] | r3 = *(0x11a22);
0x00008cc0 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
0x00008cc2 mov r4, r0 | r4 = r0;
0x00008cc4 bl 0x3d7a4 | fcn_0003d7a4 ();
0x00008cc8 mov sp, r5 |
| }
0x00008cca ldr r0, [pc, 0x9c] |
0x00008ccc mov.w r2, 0x188 | r2 = 0x188;
0x00008cd0 add.w r1, r7, 0x28 | r1 = r7 + 0x28;
0x00008cd4 add r0, pc | r0 = 0x11a42;
0x00008cd6 blx 0x3b30 | mmap64 ()
0x00008cda ldr r3, [pc, 0x90] |
0x00008cdc uxtb r0, r4 | r0 = (int8_t) r4;
0x00008cde ldr r2, [r7, 0x20] | r2 = *((r7 + 0x20));
0x00008ce0 ldr r1, [r7, 0x14] | r1 = *((r7 + 0x14));
0x00008ce2 add r3, pc | r3 = 0x11a54;
0x00008ce4 str r2, [r3] | *(r3) = r2;
0x00008ce6 ldr r3, [pc, 0x88] |
0x00008ce8 ldr r2, [r7, 0x1c] | r2 = *((r7 + 0x1c));
0x00008cea add r3, pc | r3 = 0x11a60;
0x00008cec str r2, [r3] | *(r3) = r2;
0x00008cee ldr r3, [pc, 0x84] |
0x00008cf0 ldr r2, [r7, 0x18] | r2 = *((r7 + 0x18));
0x00008cf2 add r3, pc | r3 = 0x11a6c;
0x00008cf4 str r2, [r3] | *(r3) = r2;
0x00008cf6 ldr r3, [pc, 0x80] |
0x00008cf8 ldr r2, [pc, 0x80] |
0x00008cfa add r3, pc | r3 = 0x11a78;
0x00008cfc str r1, [r3] | *(r3) = r1;
0x00008cfe add r2, pc | r2 = 0x11a7e;
0x00008d00 ldr r1, [r7, 0x10] | r1 = *((r7 + 0x10));
0x00008d02 ldr r3, [pc, 0x50] | r3 = *(0x8d56);
0x00008d04 strb r1, [r2] | *(r2) = r1;
0x00008d06 movs r2, 0 | r2 = 0;
0x00008d08 ldr r1, [r7, 4] | r1 = *((r7 + 4));
0x00008d0a ldr r3, [r1, r3] | r3 = *((r1 + r3));
0x00008d0c str r2, [r3] | *(r3) = r2;
0x00008d0e ldr r2, [pc, 0x70] |
0x00008d10 ldr r3, [pc, 0x28] | r3 = *(0x8d3c);
0x00008d12 add r2, pc | r2 = 0x11a98;
0x00008d14 ldr r3, [r2, r3] | r3 = *(0x11a98);
0x00008d16 ldr r2, [r3] | r2 = *(0x11a98);
0x00008d18 ldr.w r3, [r7, 0x1cc] | r3 = *((r7 + 0x1cc));
0x00008d1c eors r2, r3 | r2 ^= r3;
0x00008d1e mov.w r3, 0 | r3 = 0;
| if (r2 == r3) {
0x00008d22 bne 0x8d2e |
0x00008d24 add.w r7, r7, 0x1d4 | r7 += 0x1d4;
0x00008d28 mov sp, r7 |
0x00008d2a pop.w {r4, r5, r6, r7, r8, sb, pc} |
| }
0x00008d2e blx 0x3c40 | fcn_00003c40 ();
0x00008d32 nop |
0x00008d34 ldr r7, [pc, 0x88] | r7 = *(0x8dc0);
0x00008d36 movs r4, r0 | r4 = r0;
0x00008d38 ldr r7, [pc, 0x68] | r7 = *(0x8da4);
0x00008d3a movs r4, r0 | r4 = r0;
0x00008d3c lsls r4, r5, 0x11 | r4 = r5 << 0x11;
0x00008d3e movs r0, r0 |
0x00008d40 strb r6, [r4, r4] | *((r4 + r4)) = r6;
0x00008d42 movs r4, r0 | r4 = r0;
0x00008d44 ldr r2, [r4, 0x30] | r2 = *((r4 + 0x30));
0x00008d46 movs r4, r0 | r4 = r0;
0x00008d48 ldr r2, [r7, 0x2c] | r2 = *(0x8dd0);
0x00008d4a movs r4, r0 | r4 = r0;
0x00008d4c strb r2, [r7, r3] | *((r7 + r3)) = r2;
0x00008d4e movs r4, r0 | r4 = r0;
0x00008d50 strh r2, [r0, r7] | *((r0 + r7)) = r2;
0x00008d52 movs r4, r0 | r4 = r0;
0x00008d54 lsls r4, r6, 0x11 | r4 = r6 << 0x11;
0x00008d56 movs r0, r0 |
0x00008d58 ldr r6, [r5, 0x2c] | r6 = *((r5 + 0x2c));
0x00008d5a movs r4, r0 | r4 = r0;
0x00008d5c mrc2 p15, 7, apsr_nzcv, c1, c15, 7 | __asm ("mrc2 p15, 7, apsr_nzcv, c1, c15, 7");
0x00008d60 ldr r6, [r0, 0x28] | r6 = *((r0 + 0x28));
0x00008d62 movs r4, r0 | r4 = r0;
0x00008d64 ldr r3, [pc, 0x328] | r3 = *(0x9090);
0x00008d66 movs r4, r0 | r4 = r0;
0x00008d68 strb r0, [r5, r1] | *((r5 + r1)) = r0;
0x00008d6a movs r4, r0 | r4 = r0;
0x00008d6c ldr r2, [r3, 0x24] | r2 = *(0x90b4);
0x00008d6e movs r4, r0 | r4 = r0;
0x00008d70 ldr r6, [r0, 0x24] | r6 = *((r0 + 0x24));
0x00008d72 movs r4, r0 | r4 = r0;
0x00008d74 ldr r2, [r3, 0x24] | r2 = *(0x90b4);
0x00008d76 movs r4, r0 | r4 = r0;
0x00008d78 strh r2, [r1, r4] | *((r1 + r4)) = r2;
0x00008d7a movs r4, r0 | r4 = r0;
0x00008d7c strb r2, [r7, r0] | *((r7 + r0)) = r2;
0x00008d7e movs r4, r0 | r4 = r0;
0x00008d80 ldr r6, [pc, 0x38] | r6 = *(0x8dbc);
0x00008d82 movs r4, r0 | r4 = r0;
0x00008e3c push {r3, r4, r5, lr} |
0x00008e3e mov r4, r0 | r4 = r0;
0x00008e40 ldr r0, [r0] | r0 = *(r0);
0x00008e42 bl 0x84e4 | r0 = fcn_000084e4 (r0);
0x00008e46 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 < r0) {
0x00008e48 bge 0x8e58 |
| label_0:
0x00008e4a mov r0, r4 | r0 = r4;
0x00008e4c bl 0x8dd4 | fcn_00008dd4 (r0);
| label_1:
0x00008e50 pop.w {r3, r4, r5, lr} |
0x00008e54 b.w 0x92a0 | goto label_3;
| }
0x00008e58 ldr r3, [pc, 0x3c] |
0x00008e5a asrs r2, r5, 2 | r2 = r5 >> 2;
0x00008e5c add r3, pc | r3 = 0x11cf8;
0x00008e5e ldrb r2, [r3, r2] | r2 = *((r3 + r2));
0x00008e60 and r3, r5, 3 | r3 = r5 & 3;
0x00008e64 lsls r3, r3, 1 | r3 <<= 1;
0x00008e66 asr.w r1, r2, r3 | r1 = r2 >> r3;
0x00008e6a lsls r1, r1, 0x1f | r1 <<= 0x1f;
| if (r1 >= r1) {
0x00008e6c bpl 0x8e78 | goto label_4;
| }
0x00008e6e mov r1, r4 | r1 = r4;
0x00008e70 pop.w {r3, r4, r5, lr} |
0x00008e74 b.w 0x8bec |
| } while (1);
| label_4:
0x00008e78 adds r3, 1 | r3++;
0x00008e7a asrs r2, r3 | r2 >>= r3;
0x00008e7c lsls r3, r2, 0x1f | r3 = r2 << 0x1f;
| if (r3 >= r2) {
0x00008e7e bpl 0x8e4a | goto label_0;
| }
0x00008e80 bl 0x3d7a4 | fcn_0003d7a4 ();
0x00008e84 blx 0x436c | r0 = fcn_0000436c ();
0x00008e88 cmp r0, 0 |
| if (r0 != 0) {
0x00008e8a bne 0x8e50 | goto label_1;
| }
0x00008e8c ldr r1, [r4] | r1 = *(r4);
0x00008e8e mov r2, r4 | r2 = r4;
0x00008e90 mov r0, r5 | r0 = r5;
0x00008e92 bl 0x8d84 | fcn_00008d84 (r0, r1, r2);
0x00008e96 nop |
0x00008e98 invalid |
| label_3:
0x000092a0 ldr r2, [pc, 0x64] |
0x000092a2 cmp r0, 0 |
0x000092a4 ldr r3, [pc, 0x64] | r3 = *(0x930c);
0x000092a6 push {lr} |
0x000092a8 sub sp, 0xc |
0x000092aa add r2, pc | r2 = 0x125b6;
0x000092ac ldr r3, [r2, r3] |
0x000092ae ldr r3, [r3] | r3 = *(0x125b6);
0x000092b0 str r3, [sp, 4] | var_4h = r3;
0x000092b2 mov.w r3, 0 | r3 = 0;
0x000092b6 bgt 0x92d6 |
| while (r0 == 1) {
0x000092b8 mov.w r0, -1 | r0 = -1;
| label_2:
0x000092bc ldr r2, [pc, 0x50] |
0x000092be ldr r3, [pc, 0x4c] | r3 = *(0x930e);
0x000092c0 add r2, pc | r2 = 0x125d4;
0x000092c2 ldr r3, [r2, r3] | r3 = *(0x125d4);
0x000092c4 ldr r2, [r3] | r2 = *(0x125d4);
0x000092c6 ldr r3, [sp, 4] | r3 = var_4h;
0x000092c8 eors r2, r3 | r2 ^= r3;
0x000092ca mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x000092ce bne 0x9302 | goto label_5;
| }
0x000092d0 add sp, 0xc |
0x000092d2 ldr pc, [sp], 4 | pc = *(sp);
| sp += 4;
0x000092d6 movs r2, 0 | r2 = 0;
0x000092d8 mov r1, sp | r1 = sp;
0x000092da bl 0x9278 | fcn_00009278 (r0, r1, r2);
0x000092de adds r0, 1 | r0++;
0x000092e0 beq 0x92b8 |
| }
0x000092e2 ldr r3, [sp] | r3 = *(sp);
0x000092e4 ands r0, r3, 0x7f | r0 = r3 & 0x7f;
0x000092e8 it eq |
| if (r0 != r3) {
0x000092ea ubfxeq r0, r3, 8, 8 | __asm ("ubfxeq r0, r3, 8, 8");
| goto label_6;
| }
| if (r0 == r3) {
| label_6:
0x000092ee beq 0x92bc | goto label_2;
| }
0x000092f0 adds r3, r0, 1 | r3 = r0 + 1;
0x000092f2 sbfx r3, r3, 1, 7 | __asm ("sbfx r3, r3, 1, 7");
0x000092f6 cmp r3, 0 |
0x000092f8 ite gt |
| if (r3 <= 0) {
0x000092fa addgt r0, r0, 0x180 | r0 += 0x180;
| }
| if (r3 <= 0) {
0x000092fe movs r0, 0 | r0 = 0;
| }
0x00009300 b 0x92bc | goto label_2;
| label_5:
0x00009302 blx 0x3c40 | fcn_00003c40 ();
0x00009306 nop |
0x00009308 ldr r0, [pc, 0x1d8] | r0 = *(0x94e4);
0x0000930a movs r4, r0 | r4 = r0;
0x0000930c lsls r4, r5, 0x11 | r4 = r5 << 0x11;
0x0000930e movs r0, r0 |
0x00009310 ldr r0, [pc, 0x180] | r0 = *(0x9494);
0x00009312 movs r4, r0 | r4 = r0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x9614 */
| #include <stdint.h>
|
; (fcn) fcn.00009614 () | void fcn_00009614 (int16_t arg1) {
| int16_t var_4h_4;
| int16_t var_74h;
| r0 = arg1;
0x00009614 teqhs sp, fp, lsl sl | __asm ("teqhs sp, fp, lsl sl");
0x00009618 ldr r3, [pc, 0x6c] |
0x0000961a push {r4, r5, r6, lr} |
0x0000961c sub sp, 0x78 |
0x0000961e add r2, pc | r2 += pc;
0x00009620 mov r4, r0 | r4 = r0;
0x00009622 ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x00009624 ldr r3, [r3] | r3 = *(0x9688);
0x00009626 str r3, [sp, 0x74] | var_74h = r3;
0x00009628 mov.w r3, 0 | r3 = 0;
0x0000962c blx 0x4098 | r0 = fcn_00004098 ();
0x00009630 mov r5, r0 | r5 = r0;
| if (r0 == 0) {
0x00009632 cbz r0, 0x964c | goto label_0;
| }
0x00009634 subs r6, r0, r4 | r6 = r0 - r4;
0x00009636 cmp r6, 0x6f |
| if (r6 > 0x6f) {
0x00009638 bhi 0x9676 | goto label_1;
| }
0x0000963a mov r1, r4 | r1 = r4;
0x0000963c add r4, sp, 4 | r4 += var_4h_4;
0x0000963e mov r2, r6 | r2 = r6;
0x00009640 mov r0, r4 | r0 = r4;
0x00009642 blx 0x3b30 | mmap64 ()
0x00009646 movs r2, 0 | r2 = 0;
0x00009648 mov r5, r2 | r5 = r2;
0x0000964a strb r2, [r0, r6] | *((r0 + r6)) = r2;
| do {
| label_0:
0x0000964c mov r0, r4 | r0 = r4;
0x0000964e blx 0x4580 | getgrgid ();
0x00009652 ldr r2, [pc, 0x38] |
0x00009654 ldr r3, [pc, 0x30] | r3 = *(0x9688);
0x00009656 add r2, pc | r2 = 0x12ce8;
0x00009658 ldr r3, [r2, r3] | r3 = *(0x12ce8);
0x0000965a ldr r2, [r3] | r2 = *(0x12ce8);
0x0000965c ldr r3, [sp, 0x74] | r3 = var_74h;
0x0000965e eors r2, r3 | r2 ^= r3;
0x00009660 mov.w r3, 0 | r3 = 0;
| if (r2 == r3) {
0x00009664 bne 0x9672 |
0x00009666 mov r0, r5 | r0 = r5;
0x00009668 add sp, 0x78 |
0x0000966a pop.w {r4, r5, r6, lr} |
0x0000966e b.w 0x3ac8 | void (*0x3ac8)() ();
| }
0x00009672 blx 0x3c40 | fcn_00003c40 ();
| label_1:
0x00009676 mov r0, r4 | r0 = r4;
0x00009678 mov r1, r6 | r1 = r6;
0x0000967a bl 0x9394 | r0 = fcn_00009394 ();
0x0000967e mov r4, r0 | r4 = r0;
0x00009680 mov r5, r0 | r5 = r0;
0x00009682 b 0x964c |
| } while (1);
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0xb6b0 */
| #include <stdint.h>
|
; (fcn) fcn.0000b6b0 () | void fcn_0000b6b0 () {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_ch;
| int16_t var_14h;
| int16_t var_10ch;
| label_1:
0x00003c58 bx pc | return void (*pc)() ();
0x0000b6b0 ldr r2, [pc, 0x120] |
0x0000b6b2 ldr r3, [pc, 0x124] | r3 = *(0xb7da);
0x0000b6b4 push {r4, r5, r6, lr} |
0x0000b6b6 sub sp, 0x110 |
0x0000b6b8 add r2, pc | r2 = 0x16e90;
0x0000b6ba ldr r3, [r2, r3] |
0x0000b6bc ldr r3, [r3] | r3 = *(0x16e90);
0x0000b6be str r3, [sp, 0x10c] | var_10ch = r3;
0x0000b6c0 mov.w r3, 0 | r3 = 0;
0x0000b6c4 bl 0xa554 | fcn_0000a554 ();
0x0000b6c8 ldr r3, [pc, 0x110] |
0x0000b6ca add r3, pc | r3 = 0x16eaa;
0x0000b6cc ldr r4, [r3] | r4 = *(0x16eaa);
0x0000b6ce ldr r3, [r4, 0x3c] | r3 = *(0x16ee6);
| if (r3 == 0) {
0x0000b6d0 cbnz r3, 0xb6d4 |
0x0000b6d2 str r0, [r4, 0x3c] | *((r4 + 0x3c)) = r0;
| }
0x0000b6d4 ldr r3, [r4, 0x30] | r3 = *((r4 + 0x30));
0x0000b6d6 cbnz r3, 0xb6dc |
| while (r1 <= r2) {
| label_0:
0x0000b6d8 bl 0xb63c | fcn_0000b63c ();
0x0000b6dc ldr r1, [r4, 0x38] | r1 = *((r4 + 0x38));
| if (r1 == 0) {
0x0000b6de cbz r1, 0xb6e8 | goto label_4;
| }
0x0000b6e0 ldr r2, [r4, 0x3c] | r2 = *((r4 + 0x3c));
0x0000b6e2 subs r2, r0, r2 | r2 = r0 - r2;
0x0000b6e4 cmp r1, r2 |
0x0000b6e6 blo 0xb6d8 |
| }
| label_4:
0x0000b6e8 ldr r2, [r4, 0x34] | r2 = *((r4 + 0x34));
0x0000b6ea cmp r3, 0 |
0x0000b6ec itt gt |
| if (r3 <= 0) {
0x0000b6ee addgt r3, r3, -1 | r3 += -1;
| }
| if (r3 > 0) {
0x0000b6f2 str r3, [r4, 0x30] | *((r4 + 0x30)) = r3;
| }
0x0000b6f4 cmp r2, 0 |
| if (r2 != 0) {
0x0000b6f6 bne 0xb7aa | goto label_5;
| }
| label_2:
0x0000b6f8 ldr r3, [pc, 0xe4] |
0x0000b6fa mov.w r1, 0x100 | r1 = 0x100;
0x0000b6fe add r6, sp, 0xc | r6 += var_ch;
0x0000b700 movt r1, 8 | r1 = (r1 & 0xFFFF) | 0x80000;
0x0000b704 ldrb r2, [r4, 0x13] | r2 = *((r4 + 0x13));
0x0000b706 add.w r5, r4, 0x14 | r5 = r4 + 0x14;
0x0000b70a add r3, pc |
0x0000b70c str r1, [r6] | *(r6) = r1;
0x0000b70e ldr r3, [r3] | r3 = *(0x16eee);
0x0000b710 movs r1, 4 | r1 = 4;
0x0000b712 strb r1, [r6, 5] | *((r6 + 5)) = r1;
0x0000b714 strb r2, [r6, 4] | *((r6 + 4)) = r2;
0x0000b716 lsls r1, r3, 0x1d | r1 = r3 << 0x1d;
| if (r1 < r3) {
0x0000b718 bmi 0xb7be | goto label_6;
| }
0x0000b71a mov.w r3, 0x100 | r3 = 0x100;
0x0000b71e mov r1, r5 | r1 = r5;
0x0000b720 strh r3, [r6, 6] | *((r6 + 6)) = r3;
0x0000b722 add r0, sp, 0x14 | r0 += var_14h;
0x0000b724 movs r3, 0xf8 | r3 = 0xf8;
0x0000b726 blx 0x4648 | fcn_00004648 ();
0x0000b72a mov r1, r4 | r1 = r4;
0x0000b72c ldr r3, [r1], 0x28 | r3 = *(r1);
| r1 += 0x28;
| label_3:
0x0000b730 str r3, [r0], 4 | *(r0) = r3;
| r0 += 4;
0x0000b734 ldrb r5, [r6, 4] | r5 = *((r6 + 4));
0x0000b736 mov r2, r5 | r2 = r5;
0x0000b738 blx 0x3b30 | mmap64 ()
0x0000b73c ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x0000b73e add r0, r5 | r0 += r5;
0x0000b740 add.w r3, r4, 0x1c | r3 = r4 + 0x1c;
0x0000b744 mov r1, r6 | r1 = r6;
0x0000b746 str r2, [r0], 4 | *(r0) = r2;
| r0 += 4;
0x0000b74a subs r5, r0, r6 | r5 = r0 - r6;
0x0000b74c movs r0, 0x14 | r0 = 0x14;
0x0000b74e str r3, [sp] | *(sp) = r3;
0x0000b750 str r0, [sp, 4] | var_4h = r0;
0x0000b752 movs r3, 0 | r3 = 0;
0x0000b754 mov r2, r5 | r2 = r5;
0x0000b756 movs r0, 3 | r0 = 3;
0x0000b758 blx 0x4344 | r0 = fcn_00004344 ();
0x0000b75c cmp r5, r0 |
| if (r5 == r0) {
0x0000b75e bne 0xb77c |
0x0000b760 bl 0xa554 | fcn_0000a554 ();
0x0000b764 ldr r2, [pc, 0x7c] |
0x0000b766 ldr r3, [r4, 0x40] | r3 = *((r4 + 0x40));
0x0000b768 str r0, [r4, 0x34] | *((r4 + 0x34)) = r0;
0x0000b76a add r2, pc |
0x0000b76c ldr r2, [r2] | r2 = *(0x16f52);
0x0000b76e adds r3, 1 | r3++;
0x0000b770 str r3, [r4, 0x40] | *((r4 + 0x40)) = r3;
0x0000b772 lsls r2, r2, 0x19 | r2 <<= 0x19;
0x0000b774 ittt pl |
| if (r2 < r2) {
0x0000b776 ldrpl r3, [r4, 0x44] | r3 = *((r4 + 0x44));
| }
| if (r2 < r2) {
0x0000b778 addpl r3, 1 | r3++;
| }
| if (r2 >= r2) {
0x0000b77a strpl r3, [r4, 0x44] | *((r4 + 0x44)) = r3;
| goto label_7;
| }
| }
| label_7:
0x0000b77c ldr r3, [r4, 0x30] | r3 = *((r4 + 0x30));
| if (r3 != 0) {
0x0000b77e cbnz r3, 0xb78a | goto label_8;
| }
0x0000b780 ldr r3, [pc, 0x64] |
0x0000b782 add r3, pc |
0x0000b784 ldr r3, [r3] | r3 = *(0x16f6e);
0x0000b786 lsls r3, r3, 0x1f | r3 <<= 0x1f;
| if (r3 < r3) {
0x0000b788 bmi 0xb6d8 | goto label_0;
| }
| do {
| label_8:
0x0000b78a ldr r2, [pc, 0x60] |
0x0000b78c ldr r3, [pc, 0x48] | r3 = *(0xb7d8);
0x0000b78e add r2, pc | r2 = 0x16f80;
0x0000b790 ldr r3, [r2, r3] | r3 = *(0x16f80);
0x0000b792 ldr r2, [r3] | r2 = *(0x16f80);
0x0000b794 ldr r3, [sp, 0x10c] | r3 = var_10ch;
0x0000b796 eors r2, r3 | r2 ^= r3;
0x0000b798 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000b79c bne 0xb7ba | goto label_9;
| }
0x0000b79e movs r0, 1 | r0 = 1;
0x0000b7a0 add sp, 0x110 |
0x0000b7a2 pop.w {r4, r5, r6, lr} |
0x0000b7a6 b.w 0x3c58 | goto label_1;
| label_5:
0x0000b7aa movw r3, 0xa120 |
0x0000b7ae subs r0, r0, r2 | r0 -= r2;
0x0000b7b0 movt r3, 7 | r3 = 0x7a120;
0x0000b7b4 cmp r0, r3 |
0x0000b7b6 bls 0xb78a |
| } while (r0 < r3);
0x0000b7b8 b 0xb6f8 | goto label_2;
| label_9:
0x0000b7ba blx 0x3c40 | fcn_00003c40 ();
| label_6:
0x0000b7be mov.w r3, 0x200 | r3 = 0x200;
0x0000b7c2 mov r1, r5 | r1 = r5;
0x0000b7c4 strh r3, [r6, 6] | *((r6 + 6)) = r3;
0x0000b7c6 add r0, sp, 0x14 | r0 += var_14h;
0x0000b7c8 movs r3, 0xf8 | r3 = 0xf8;
0x0000b7ca blx 0x4648 | fcn_00004648 ();
0x0000b7ce ldr r3, [r4] | r3 = *(r4);
0x0000b7d0 mov r1, r5 | r1 = r5;
0x0000b7d2 b 0xb730 | goto label_3;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0xe578 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.0000e578 () | void fcn_0000e578 (int16_t arg2) {
| int16_t var_0h;
| int16_t var_8h;
| int16_t var_ch;
| int32_t var_ch_2;
| int32_t var_14h;
| int32_t var_14h_2;
| int16_t var_1ch;
| int16_t var_20h;
| int16_t var_24h;
| int16_t var_28h;
| int16_t var_2ch;
| int16_t var_30h;
| int16_t var_34h;
| int16_t var_3ch;
| int16_t var_4ch;
| int16_t var_0h_2;
| int16_t var_cch;
| r1 = arg2;
0x0000e578 ldr r2, [pc, 0x3ac] |
0x0000e57a ldr r3, [pc, 0x3b0] | r3 = *(0xe92e);
0x0000e57c push {r4, r5, r6, r7, lr} |
0x0000e57e sub sp, 0xd4 |
0x0000e580 add r2, pc | r2 = 0x1ceac;
0x0000e582 ldr r0, [pc, 0x3ac] |
0x0000e584 mov r4, r1 | r4 = r1;
0x0000e586 ldr r3, [r2, r3] |
0x0000e588 ldrh r2, [r1, 4] | r2 = *((r1 + 4));
0x0000e58a add r0, pc | r0 = 0x1cec0;
0x0000e58c ldr r3, [r3] | r3 = *(0x1ceac);
0x0000e58e str r3, [sp, 0xcc] | var_cch = r3;
0x0000e590 mov.w r3, 0 | r3 = 0;
0x0000e594 ldr r3, [r1] | r3 = *(r1);
0x0000e596 sub.w r1, r2, 0x14 | r1 = r2 - 0x14;
0x0000e59a cmp r1, 1 |
| if (r1 > 1) {
0x0000e59c bhi.w 0xe81e | goto label_9;
| }
0x0000e5a0 subs r3, 0x18 | r3 -= 0x18;
| if (r3 >= 0x18) {
0x0000e5a2 bpl 0xe5b4 | goto label_11;
| }
0x0000e5a4 ldr r0, [pc, 0x38c] |
0x0000e5a6 mov r1, r3 | r1 = r3;
0x0000e5a8 add r0, pc | r0 = 0x1cee0;
0x0000e5aa bl 0x8a74 | fcn_00008a74 ();
| do {
0x0000e5ae mov.w r0, -1 | r0 = -1;
0x0000e5b2 b 0xe820 | goto label_12;
| label_11:
0x0000e5b4 ldr r1, [pc, 0x380] | r1 = *(0xe938);
0x0000e5b6 ldr r5, [r0, r1] | r5 = *((r0 + r1));
0x0000e5b8 ldr r1, [r5, 4] | r1 = *((r5 + 4));
0x0000e5ba cmp r1, 0 |
0x0000e5bc it ne |
| if (r1 != 0) {
0x0000e5be cmpne r2, 0x14 | __asm ("cmpne r2, 0x14");
| }
| if (r1 != 0) {
0x0000e5c0 bne.w 0xe81e | goto label_9;
| }
0x0000e5c4 add.w r2, r4, 0x18 | r2 = r4 + 0x18;
0x0000e5c8 movs r1, 0xb | r1 = 0xb;
0x0000e5ca add r0, sp, 0x1c | r0 += var_1ch;
0x0000e5cc bl 0x11724 | fcn_00011724 (r0, r1, r2, r3);
0x0000e5d0 ldr r3, [sp, 0x3c] | r3 = var_3ch;
0x0000e5d2 cmp r3, 0 |
| if (r3 == 0) {
0x0000e5d4 beq 0xe6d0 | goto label_13;
| }
0x0000e5d6 ldr r6, [r3, 4] | r6 = *((r3 + 4));
0x0000e5d8 ldrd r3, r2, [sp, 0x20] | __asm ("ldrd r3, r2, [var_20h]");
| if (r2 == 0) {
0x0000e5dc cbnz r2, 0xe5e0 |
| label_1:
0x0000e5de str r3, [sp, 0x24] | var_24h = r3;
| }
| if (r3 == 0) {
| label_0:
0x0000e5e0 cbnz r3, 0xe5e6 |
0x0000e5e2 ldr r3, [sp, 0x24] | r3 = var_24h;
0x0000e5e4 str r3, [sp, 0x20] | var_20h = r3;
| }
0x0000e5e6 ldr r3, [r5, 0x24] | r3 = *((r5 + 0x24));
| if (r3 != 0) {
0x0000e5e8 cbz r3, 0xe5f2 |
0x0000e5ea ldr r2, [r4, 0x14] | r2 = *((r4 + 0x14));
0x0000e5ec cmp r3, r2 |
| if (r3 != r2) {
0x0000e5ee bne.w 0xe81e | goto label_9;
| }
| }
0x0000e5f2 ldrb r2, [r4, 0x13] | r2 = *((r4 + 0x13));
0x0000e5f4 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x0000e5f6 eors r3, r2 | r3 ^= r2;
0x0000e5f8 ldr r2, [r5, 0x10] | r2 = *((r5 + 0x10));
0x0000e5fa tst r3, r2 |
| if ((r3 & r2) != 0) {
0x0000e5fc bne.w 0xe81e | goto label_9;
| }
0x0000e600 ldr r3, [r5, 0x14] | r3 = *((r5 + 0x14));
0x0000e602 ldr r2, [r5, 0x18] | r2 = *((r5 + 0x18));
0x0000e604 eors r3, r6 | r3 ^= r6;
0x0000e606 tst r3, r2 |
| if ((r3 & r2) != 0) {
0x0000e608 bne.w 0xe81e | goto label_9;
| }
0x0000e60c ldr r0, [r5] | r0 = *(r5);
| if (r0 != 0) {
0x0000e60e cbz r0, 0xe626 |
0x0000e610 ldr r1, [sp, 0x28] | r1 = var_28h;
0x0000e612 cmp r1, 0 |
| if (r1 == 0) {
0x0000e614 beq.w 0xe90e | goto label_14;
| }
0x0000e616 strh r3, [r7, 0xa] | *((r7 + 0xa)) = r3;
0x0000e618 adds r1, 4 | r1 += 4;
0x0000e61a movs r2, 0 | r2 = 0;
0x0000e61c blx 0x3ea0 | r0 = fcn_00003ea0 ();
0x0000e620 cmp r0, 0 |
| if (r0 != 0) {
0x0000e622 bne.w 0xe81e | goto label_9;
| }
| }
| label_10:
0x0000e626 ldrb.w r3, [r5, 0x3c] | r3 = *((r5 + 0x3c));
| if (r3 != 0) {
0x0000e62a cbz r3, 0xe666 |
0x0000e62c ldr r1, [sp, 0x24] | r1 = var_24h;
| if (r1 == 0) {
0x0000e62e cbz r1, 0xe666 | goto label_15;
| }
0x0000e630 ldrb r2, [r4, 0x10] | r2 = *((r4 + 0x10));
0x0000e632 movs r3, 0 | r3 = 0;
0x0000e634 str r3, [sp, 8] | var_8h = r3;
0x0000e636 add r7, sp, 8 | r7 += var_8h;
0x0000e638 strd r3, r3, [sp, 0xc] | __asm ("strd r3, r3, [var_ch]");
0x0000e63c add r0, sp, 0xc | r0 += var_ch;
0x0000e63e strd r3, r3, [sp, 0x14] | __asm ("strd r3, r3, [var_14h]");
0x0000e642 movs r3, 0x10 | r3 = 0x10;
0x0000e644 strb.w r2, [sp, 8] | var_8h = r2;
0x0000e648 ldrh r2, [r1], 4 | r2 = *(r1);
| r1 += 4;
0x0000e64c subs r2, 4 | r2 -= 4;
0x0000e64e blx 0x3d98 | fcn_00003d98 ();
0x0000e652 ldrsh.w r2, [r5, 0x3e] | r2 = *((r5 + 0x3e));
0x0000e656 mov r0, r7 | r0 = r7;
0x0000e658 add.w r1, r5, 0x3c | r1 = r5 + 0x3c;
0x0000e65c bl 0x3ddbc | r0 = fcn_0003ddbc (r0, r1, r2);
0x0000e660 cmp r0, 0 |
| if (r0 != 0) {
0x0000e662 bne.w 0xe81e | goto label_9;
| }
| }
| label_15:
0x0000e666 ldr r1, [r5, 4] | r1 = *((r5 + 4));
0x0000e668 cmp r1, 0 |
| if (r1 == 0) {
0x0000e66a beq 0xe6dc | goto label_16;
| }
0x0000e66c ldr r3, [r5, 0x1c] | r3 = *((r5 + 0x1c));
0x0000e66e ldr r2, [r4] | r2 = *(r4);
0x0000e670 ldr r0, [r5, 0x20] | r0 = *((r5 + 0x20));
0x0000e672 adds r3, 3 | r3 += 3;
0x0000e674 bic r3, r3, 3 | r3 = BIT_MASK (r3, 3);
0x0000e678 adds r6, r3, r2 | r6 = r3 + r2;
0x0000e67a cmp r6, r0 |
| if (r6 < r0) {
0x0000e67c bls 0xe692 | goto label_17;
| }
0x0000e67e bl 0xe240 | r0 = fcn_0000e240 ();
0x0000e682 cmp r0, 0 |
0x0000e684 bne 0xe5ae |
| } while (r0 != 0);
0x0000e686 ldr r3, [r5, 0x1c] | r3 = *((r5 + 0x1c));
0x0000e688 ldr r1, [r5, 4] | r1 = *((r5 + 4));
0x0000e68a ldr r2, [r4] | r2 = *(r4);
0x0000e68c adds r3, 3 | r3 += 3;
0x0000e68e bic r3, r3, 3 | r3 = BIT_MASK (r3, 3);
| label_17:
0x0000e692 add r3, r1 | r3 += r1;
0x0000e694 mov r1, r4 | r1 = r4;
0x0000e696 mov r0, r3 | r0 = r3;
0x0000e698 blx 0x3b30 | mmap64 ()
0x0000e69c movs r1, 0x15 | r1 = 0x15;
0x0000e69e ldr r2, [r4] | r2 = *(r4);
0x0000e6a0 movt r1, 1 | r1 = (r1 & 0xFFFF) | 0x10000;
0x0000e6a4 mov r3, r0 | r3 = r0;
0x0000e6a6 str r1, [r0, 4] | *((r0 + 4)) = r1;
0x0000e6a8 ldr r0, [r5, 8] | r0 = *((r5 + 8));
0x0000e6aa add r2, r3 | r2 += r3;
0x0000e6ac ldr r1, [r0, 0x1c] | r1 = *((r0 + 0x1c));
0x0000e6ae adds r1, 1 | r1++;
0x0000e6b0 str r1, [r0, 0x1c] | *((r0 + 0x1c)) = r1;
0x0000e6b2 movs r0, 1 | r0 = 1;
0x0000e6b4 str r1, [r3, 8] | *((r3 + 8)) = r1;
0x0000e6b6 movs r1, 0 | r1 = 0;
0x0000e6b8 ldr r3, [r5, 4] | r3 = *((r5 + 4));
0x0000e6ba strb.w r1, [r5, 0x39] | *((r5 + 0x39)) = r1;
0x0000e6be strb.w r0, [r5, 0x38] | *((r5 + 0x38)) = r0;
0x0000e6c2 subs r3, r2, r3 | r3 = r2 - r3;
0x0000e6c4 strb.w r1, [r5, 0x3a] | *((r5 + 0x3a)) = r1;
0x0000e6c8 strb.w r1, [r5, 0x3b] | *((r5 + 0x3b)) = r1;
0x0000e6cc str r3, [r5, 0x1c] | *((r5 + 0x1c)) = r3;
0x0000e6ce b 0xe81e | goto label_9;
| label_13:
0x0000e6d0 ldrd r3, r2, [sp, 0x20] | __asm ("ldrd r3, r2, [var_20h]");
0x0000e6d4 ldrb r6, [r4, 0x12] | r6 = *((r4 + 0x12));
0x0000e6d6 cmp r2, 0 |
| if (r2 != 0) {
0x0000e6d8 bne 0xe5e0 | goto label_0;
| }
0x0000e6da b 0xe5de | goto label_1;
| label_16:
0x0000e6dc ldrh r3, [r4, 4] | r3 = *((r4 + 4));
0x0000e6de cmp r3, 0x15 |
| if (r3 == 0x15) {
0x0000e6e0 bne 0xe6ec |
0x0000e6e2 ldr r1, [pc, 0x258] |
0x0000e6e4 movs r0, 1 | r0 = 1;
0x0000e6e6 add r1, pc | r1 = 0x1d028;
0x0000e6e8 blx 0x4224 | fcn_00004224 ();
| }
0x0000e6ec ldr r3, [r5, 0x30] | r3 = *((r5 + 0x30));
| if (r3 != 0) {
0x0000e6ee cbz r3, 0xe706 |
0x0000e6f0 ldr r5, [r4, 0x14] | r5 = *((r4 + 0x14));
0x0000e6f2 mov r0, r5 | r0 = r5;
0x0000e6f4 bl 0x11a18 | fcn_00011a18 (r0);
0x0000e6f8 ldr r1, [pc, 0x244] |
0x0000e6fa mov r3, r0 | r3 = r0;
0x0000e6fc mov r2, r5 | r2 = r5;
0x0000e6fe movs r0, 1 | r0 = 1;
0x0000e700 add r1, pc | r1 = 0x1d044;
0x0000e702 blx 0x4224 | fcn_00004224 ();
| }
0x0000e706 ldrb r2, [r4, 0x10] | r2 = *((r4 + 0x10));
0x0000e708 cmp r2, 2 |
| if (r2 == 2) {
0x0000e70a bne 0xe718 |
0x0000e70c ldr r1, [pc, 0x234] |
0x0000e70e movs r0, 1 | r0 = 1;
0x0000e710 add r1, pc | r1 = 0x1d058;
0x0000e712 blx 0x4224 | fcn_00004224 ();
0x0000e716 b 0xe728 |
| } else {
0x0000e718 cmp r2, 0xa |
| if (r2 == 0xa) {
0x0000e71a beq.w 0xe902 | goto label_18;
| }
0x0000e71e ldr r1, [pc, 0x228] |
0x0000e720 movs r0, 1 | r0 = 1;
0x0000e722 add r1, pc | r1 = 0x1d070;
0x0000e724 blx 0x4224 | fcn_00004224 ();
| }
| label_8:
0x0000e728 ldr r1, [sp, 0x24] | r1 = var_24h;
| if (r1 != 0) {
0x0000e72a cbz r1, 0xe74c |
0x0000e72c adds r1, 4 | r1 += 4;
0x0000e72e ldrb r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x0000e730 bl 0x1226c | r0 = fcn_0001226c (r0, r1);
0x0000e734 bl 0x958c | fcn_0000958c ();
0x0000e738 ldr r3, [sp, 0x20] | r3 = var_20h;
0x0000e73a cmp r3, 0 |
| if (r3 != 0) {
0x0000e73c bne.w 0xe8bc | goto label_19;
| }
| label_7:
0x0000e740 ldr r1, [pc, 0x208] |
0x0000e742 movs r0, 1 | r0 = 1;
0x0000e744 ldrb r2, [r4, 0x11] | r2 = *((r4 + 0x11));
0x0000e746 add r1, pc | r1 = 0x1d096;
0x0000e748 blx 0x4224 | fcn_00004224 ();
| }
0x0000e74c ldr r1, [sp, 0x2c] | r1 = var_2ch;
| if (r1 != 0) {
0x0000e74e cbz r1, 0xe764 |
| label_5:
0x0000e750 adds r1, 4 | r1 += 4;
0x0000e752 ldrb r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x0000e754 bl 0x1226c | fcn_0001226c (r0, r1);
0x0000e758 ldr r1, [pc, 0x1f4] |
0x0000e75a mov r2, r0 | r2 = r0;
0x0000e75c movs r0, 1 | r0 = 1;
0x0000e75e add r1, pc | r1 = 0x1d0b2;
0x0000e760 blx 0x4224 | fcn_00004224 ();
| }
| label_4:
0x0000e764 ldr r1, [sp, 0x30] | r1 = var_30h;
| if (r1 != 0) {
0x0000e766 cbz r1, 0xe77c |
0x0000e768 adds r1, 4 | r1 += 4;
0x0000e76a ldrb r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x0000e76c bl 0x1226c | fcn_0001226c (r0, r1);
0x0000e770 ldr r1, [pc, 0x1e0] |
0x0000e772 mov r2, r0 | r2 = r0;
0x0000e774 movs r0, 1 | r0 = 1;
0x0000e776 add r1, pc | r1 = 0x1d0ce;
0x0000e778 blx 0x4224 | fcn_00004224 ();
| }
0x0000e77c ldrb r0, [r4, 0x13] | r0 = *((r4 + 0x13));
0x0000e77e bl 0x11c9c | fcn_00011c9c (r0);
0x0000e782 ldr r1, [pc, 0x1d4] |
0x0000e784 mov r2, r0 | r2 = r0;
0x0000e786 movs r0, 1 | r0 = 1;
0x0000e788 add r1, pc | r1 = 0x1d0e6;
0x0000e78a blx 0x4224 | fcn_00004224 ();
0x0000e78e lsls r3, r6, 0x1f | r3 = r6 << 0x1f;
| if (r3 < r6) {
0x0000e790 bpl 0xe7a0 |
0x0000e792 ldr r1, [pc, 0x1c8] |
0x0000e794 movs r0, 1 | r0 = 1;
0x0000e796 bic r6, r6, 1 | r6 = BIT_MASK (r6, 1);
0x0000e79a add r1, pc | r1 = 0x1d0fc;
0x0000e79c blx 0x4224 | fcn_00004224 ();
| }
0x0000e7a0 lsls r7, r6, 0x19 | r7 = r6 << 0x19;
| if (r7 < r6) {
0x0000e7a2 bpl 0xe7b2 |
0x0000e7a4 ldr r1, [pc, 0x1b8] |
0x0000e7a6 movs r0, 1 | r0 = 1;
0x0000e7a8 bic r6, r6, 0x40 | r6 = BIT_MASK (r6, 0x40);
0x0000e7ac add r1, pc | r1 = 0x1d110;
0x0000e7ae blx 0x4224 | fcn_00004224 ();
| }
0x0000e7b2 lsls r5, r6, 0x1c | r5 = r6 << 0x1c;
| if (r5 < r6) {
0x0000e7b4 bpl 0xe7c4 |
0x0000e7b6 ldr r1, [pc, 0x1ac] |
0x0000e7b8 movs r0, 1 | r0 = 1;
0x0000e7ba bic r6, r6, 8 | r6 = BIT_MASK (r6, 8);
0x0000e7be add r1, pc | r1 = 0x1d128;
0x0000e7c0 blx 0x4224 | fcn_00004224 ();
| }
0x0000e7c4 lsls r4, r6, 0x1a | r4 = r6 << 0x1a;
| if (r4 < r6) {
0x0000e7c6 bpl 0xe7d6 |
0x0000e7c8 ldr r1, [pc, 0x19c] |
0x0000e7ca movs r0, 1 | r0 = 1;
0x0000e7cc bic r6, r6, 0x20 | r6 = BIT_MASK (r6, 0x20);
0x0000e7d0 add r1, pc | r1 = 0x1d13c;
0x0000e7d2 blx 0x4224 | fcn_00004224 ();
| }
0x0000e7d6 lsls r0, r6, 0x18 | r0 = r6 << 0x18;
0x0000e7d8 it mi |
| if (r0 < r6) {
0x0000e7da bicmi r6, r6, 0x80 | __asm ("bicmi r6, r6, 0x80");
| }
| if (r0 >= r6) {
0x0000e7de bmi 0xe7ea |
0x0000e7e0 ldr r1, [pc, 0x188] |
0x0000e7e2 movs r0, 1 | r0 = 1;
0x0000e7e4 add r1, pc | r1 = 0x1d154;
0x0000e7e6 blx 0x4224 | fcn_00004224 ();
| }
0x0000e7ea lsls r1, r6, 0x16 | r1 = r6 << 0x16;
| if (r1 < r6) {
0x0000e7ec bpl 0xe7fc |
0x0000e7ee ldr r1, [pc, 0x180] |
0x0000e7f0 movs r0, 1 | r0 = 1;
0x0000e7f2 bic r6, r6, 0x200 | r6 = BIT_MASK (r6, 0x200);
0x0000e7f4 strb r0, [r0, 0x18] | *((r0 + 0x18)) = r0;
0x0000e7f6 add r1, pc | r1 = 0x1d16c;
0x0000e7f8 blx 0x4224 | fcn_00004224 ();
| }
| if (r6 != 0) {
0x0000e7fc cbz r6, 0xe80a |
0x0000e7fe ldr r1, [pc, 0x174] |
0x0000e800 mov r2, r6 | r2 = r6;
0x0000e802 movs r0, 1 | r0 = 1;
0x0000e804 add r1, pc | r1 = 0x1d17e;
0x0000e806 blx 0x4224 | fcn_00004224 ();
| }
0x0000e80a ldr r0, [sp, 0x28] | r0 = var_28h;
| if (r0 != 0) {
0x0000e80c cbz r0, 0xe814 |
0x0000e80e adds r0, 4 | r0 += 4;
0x0000e810 bl 0x958c | fcn_0000958c ();
| }
0x0000e814 ldr r6, [sp, 0x34] | r6 = var_34h;
0x0000e816 cbnz r6, 0xe83c |
| while (1) {
0x0000e818 movs r0, 0xa | r0 = 0xa;
0x0000e81a bl 0x9558 | fcn_00009558 (r0);
| label_9:
0x0000e81e movs r0, 0 | r0 = 0;
| label_12:
0x0000e820 ldr r2, [pc, 0x154] |
0x0000e822 ldr r3, [pc, 0x108] | r3 = *(0xe92e);
0x0000e824 add r2, pc | r2 = 0x1d1a0;
0x0000e826 ldr r3, [r2, r3] | r3 = *(0x1d1a0);
0x0000e828 ldr r2, [r3] | r2 = *(0x1d1a0);
0x0000e82a ldr r3, [sp, 0xcc] | r3 = var_cch;
0x0000e82c eors r2, r3 | r2 ^= r3;
0x0000e82e mov.w r3, 0 | r3 = 0;
| if (r2 == r3) {
0x0000e832 bne 0xe838 |
0x0000e834 add sp, 0xd4 |
0x0000e836 pop {r4, r5, r6, r7, pc} |
| }
0x0000e838 blx 0x3c40 | fcn_00003c40 ();
0x0000e83c ldr r3, [pc, 0x13c] |
0x0000e83e add r3, pc | r3 = 0x1d1be;
0x0000e840 ldrb r0, [r3] | r0 = *(r3);
0x0000e842 bl 0x9558 | fcn_00009558 (r0);
0x0000e846 ldr r1, [r6, 8] | r1 = *((r6 + 8));
0x0000e848 adds r2, r1, 1 | r2 = r1 + 1;
| if (r2 == r1) {
0x0000e84a beq 0xe8aa | goto label_20;
| }
0x0000e84c ldr r3, [pc, 0x130] |
0x0000e84e add r7, sp, 0x4c | r7 += var_4ch;
0x0000e850 str r1, [sp] | *(sp) = r1;
0x0000e852 movs r2, 0x80 | r2 = 0x80;
0x0000e854 movs r1, 1 | r1 = 1;
0x0000e856 mov r0, r7 | r0 = r7;
0x0000e858 add r3, pc | r3 = 0x1d1dc;
0x0000e85a blx 0x4164 | fcn_00004164 ();
| label_3:
0x0000e85e ldr r4, [r6, 4] | r4 = *((r6 + 4));
0x0000e860 mov r0, r7 | r0 = r7;
0x0000e862 blx 0x4074 | r0 = fcn_00004074 ();
0x0000e866 mov r6, r0 | r6 = r0;
0x0000e868 adds r5, r7, r0 | r5 = r7 + r0;
0x0000e86a adds r3, r4, 1 | r3 = r4 + 1;
| if (r3 == r4) {
0x0000e86c beq 0xe88e | goto label_21;
| }
0x0000e86e ldr r3, [pc, 0x114] |
0x0000e870 mov.w r2, -1 | r2 = -1;
0x0000e874 mov r0, r5 | r0 = r5;
0x0000e876 movs r1, 1 | r1 = 1;
0x0000e878 str r4, [sp] | *(sp) = r4;
0x0000e87a add r3, pc | r3 = 0x1d204;
0x0000e87c blx 0x4164 | fcn_00004164 ();
| label_2:
0x0000e880 ldr r1, [pc, 0x104] |
0x0000e882 mov r2, r7 | r2 = r7;
0x0000e884 movs r0, 1 | r0 = 1;
0x0000e886 add r1, pc | r1 = 0x1d212;
0x0000e888 blx 0x4224 | fcn_00004224 ();
0x0000e88c b 0xe818 |
| }
| label_21:
0x0000e88e ldr r4, [pc, 0xfc] |
0x0000e890 add r4, pc | r4 = 0x1d222;
0x0000e892 ldm r4!, {r0, r1, r2, r3} | r0 = *(r4!);
| r1 = *((r4! + 4));
| r2 = *((r4! + 8));
| r3 = *((r4! + 12));
0x0000e894 str r0, [r7, r6] | *((r7 + r6)) = r0;
0x0000e896 ldr r0, [r4] | r0 = *(0x1d222);
0x0000e898 str r2, [r5, 8] | *((r5 + 8)) = r2;
0x0000e89a str r3, [r5, 0xc] | *((r5 + 0xc)) = r3;
0x0000e89c ldrh r2, [r4, 4] | r2 = *((r4 + 4));
0x0000e89e ldrb r3, [r4, 6] | r3 = *((r4 + 6));
0x0000e8a0 str r1, [r5, 4] | *((r5 + 4)) = r1;
0x0000e8a2 str r0, [r5, 0x10] | *((r5 + 0x10)) = r0;
0x0000e8a4 strh r2, [r5, 0x14] | *((r5 + 0x14)) = r2;
0x0000e8a6 strb r3, [r5, 0x16] | *((r5 + 0x16)) = r3;
0x0000e8a8 b 0xe880 | goto label_2;
| label_20:
0x0000e8aa ldr r5, [pc, 0xe4] |
0x0000e8ac add r7, sp, 0x4c | r7 += var_4ch;
0x0000e8ae mov r4, r7 | r4 = r7;
0x0000e8b0 add r5, pc | r5 = 0x1d246;
0x0000e8b2 ldm r5!, {r0, r1, r2, r3} | r0 = *(r5!);
| r1 = *((r5! + 4));
| r2 = *((r5! + 8));
| r3 = *((r5! + 12));
0x0000e8b4 stm r4!, {r0, r1, r2, r3} | *(r4!) = r0;
| *((r4! + 4)) = r1;
| *((r4! + 8)) = r2;
| *((r4! + 12)) = r3;
0x0000e8b6 ldr r3, [r5] | r3 = *(0x1d246);
0x0000e8b8 strh r3, [r4] | *(r4) = r3;
0x0000e8ba b 0xe85e | goto label_3;
| label_19:
0x0000e8bc ldr r2, [sp, 0x24] | r2 = var_24h;
0x0000e8be adds r1, r3, 4 | r1 = r3 + 4;
0x0000e8c0 ldrb r5, [r3, 4] | r5 = *((r3 + 4));
0x0000e8c2 ldrb r0, [r2, 4] | r0 = *((r2 + 4));
0x0000e8c4 cmp r5, r0 |
| if (r5 == r0) {
0x0000e8c6 beq 0xe8e6 | goto label_22;
| }
| label_6:
0x0000e8c8 ldrb r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x0000e8ca bl 0x1226c | fcn_0001226c (r0, r1);
0x0000e8ce ldr r1, [pc, 0xc4] |
0x0000e8d0 mov r2, r0 | r2 = r0;
0x0000e8d2 ldrb r3, [r4, 0x11] | r3 = *((r4 + 0x11));
0x0000e8d4 movs r0, 1 | r0 = 1;
0x0000e8d6 add r1, pc | r1 = 0x1d270;
0x0000e8d8 blx 0x4224 | fcn_00004224 ();
0x0000e8dc ldr r1, [sp, 0x2c] | r1 = var_2ch;
0x0000e8de cmp r1, 0 |
| if (r1 == 0) {
0x0000e8e0 beq.w 0xe764 | goto label_4;
| }
0x0000e8e4 b 0xe750 | goto label_5;
| label_22:
0x0000e8e6 ldrb r5, [r3, 5] | r5 = *((r3 + 5));
0x0000e8e8 ldrb r0, [r2, 5] | r0 = *((r2 + 5));
0x0000e8ea cmp r5, r0 |
| if (r5 != r0) {
0x0000e8ec bne 0xe8c8 | goto label_6;
| }
0x0000e8ee ldrb r5, [r3, 6] | r5 = *((r3 + 6));
0x0000e8f0 ldrb r0, [r2, 6] | r0 = *((r2 + 6));
0x0000e8f2 cmp r5, r0 |
| if (r5 != r0) {
0x0000e8f4 bne 0xe8c8 | goto label_6;
| }
0x0000e8f6 ldrb r0, [r3, 7] | r0 = *((r3 + 7));
0x0000e8f8 ldrb r3, [r2, 7] | r3 = *((r2 + 7));
0x0000e8fa cmp r0, r3 |
| if (r0 == r3) {
0x0000e8fc beq.w 0xe740 | goto label_7;
| }
0x0000e900 b 0xe8c8 | goto label_6;
| label_18:
0x0000e902 ldr r1, [pc, 0x94] |
0x0000e904 movs r0, 1 | r0 = 1;
0x0000e906 add r1, pc | r1 = 0x1d2a4;
0x0000e908 blx 0x4224 | fcn_00004224 ();
0x0000e90c b 0xe728 | goto label_8;
| label_14:
0x0000e90e ldr r0, [r4, 0x14] | r0 = *((r4 + 0x14));
0x0000e910 bl 0x11a18 | fcn_00011a18 (r0);
0x0000e914 movs r2, 0 | r2 = 0;
0x0000e916 mov r1, r0 | r1 = r0;
0x0000e918 ldr r0, [r5] | r0 = *(r5);
0x0000e91a blx 0x3ea0 | r0 = fcn_00003ea0 ();
0x0000e91e cmp r0, 0 |
| if (r0 != 0) {
0x0000e920 bne.w 0xe81e | goto label_9;
| }
0x0000e924 b 0xe626 | goto label_10;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x10904 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.00010904 () | void fcn_00010904 (int16_t arg2) {
| int32_t var_0h;
| int32_t var_0h_2;
| int16_t var_8h;
| int16_t var_9h;
| int16_t var_ah;
| int16_t var_ch;
| int32_t var_ch_2;
| int32_t var_14h;
| int32_t var_14h_2;
| int16_t var_1ch;
| int16_t var_1dh;
| int16_t var_1eh;
| int16_t var_20h;
| int32_t var_20h_2;
| int32_t var_28h;
| int32_t var_28h_2;
| int16_t var_30h;
| int16_t var_34h;
| int16_t var_38h;
| int16_t var_3ch;
| int16_t var_40h;
| int16_t var_44h;
| int16_t var_48h;
| int16_t var_4ch;
| int16_t var_60h;
| int16_t var_6ch;
| int16_t var_ach;
| r1 = arg2;
0x00010904 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00010908 mov r4, r1 | r4 = r1;
0x0001090a ldr.w r1, [pc, 0x528] |
0x0001090e sub sp, 0xb4 |
0x00010910 ldr.w r3, [pc, 0x524] | r3 = *(0x10e38);
0x00010914 add r1, pc | r1 = 0x2174e;
0x00010916 ldr.w r2, [pc, 0x524] |
0x0001091a ldr r3, [r1, r3] |
0x0001091c ldrh r1, [r4, 4] | r1 = *((r4 + 4));
0x0001091e add r2, pc | r2 = 0x21760;
0x00010920 ldr r3, [r3] | r3 = *(0x2174e);
0x00010922 str r3, [sp, 0xac] | var_ach = r3;
0x00010924 mov.w r3, 0 | r3 = 0;
0x00010928 ldr r3, [r4] | r3 = *(r4);
0x0001092a sub.w r0, r1, 0x18 | r0 = r1 - 0x18;
0x0001092e cmp r0, 1 |
| if (r0 >= 1) {
0x00010930 bls 0x1094e |
0x00010932 ldr.w r0, [pc, 0x50c] |
0x00010936 ldrh r4, [r4, 6] | r4 = *((r4 + 6));
0x00010938 ldr r0, [r2, r0] | r0 = *((r2 + r0));
0x0001093a ldr.w r2, [pc, 0x508] |
0x0001093e strd r1, r4, [sp] | __asm ("strd r1, r4, [sp]");
0x00010942 movs r1, 1 | r1 = 1;
0x00010944 ldr r0, [r0] | r0 = *(0x10e42);
0x00010946 add r2, pc | r2 = 0x21790;
0x00010948 blx 0x427c | fcn_0000427c ();
0x0001094c b 0x10d0a | void (*0x10d0a)() ();
| }
0x0001094e ldr.w r0, [pc, 0x4f8] | r0 = *(0x10e4a);
0x00010952 ldr r5, [r2, r0] | r5 = *((r2 + r0));
0x00010954 ldr r2, [r5, 8] | r2 = *((r5 + 8));
0x00010956 cmp r2, 0 |
0x00010958 it ne |
| if (r2 == 0) {
0x0001095a cmpne r1, 0x18 | __asm ("cmpne r1, 0x18");
| goto label_7;
| }
| if (r2 != 0) {
| label_7:
0x0001095c bne.w 0x10d0a | void (*0x10d0a)() ();
| }
0x00010960 subs r3, 0x1c | r3 -= 0x1c;
| if (r3 < 0x1c) {
0x00010962 bpl 0x10970 |
0x00010964 ldr.w r0, [pc, 0x4e4] |
0x00010968 mov r1, r3 | r1 = r3;
0x0001096a add r0, pc | r0 = 0x217ba;
0x0001096c bl 0x8a40 | fcn_00008a40 ();
| }
0x00010970 add.w r2, r4, 0x1c | r2 = r4 + 0x1c;
0x00010974 movs r1, 0x1e | r1 = 0x1e;
0x00010976 add r0, sp, 0x30 | r0 += var_30h;
0x00010978 bl 0x11724 | fcn_00011724 (r0, r1, r2, r3);
0x0001097c ldr r3, [sp, 0x6c] | r3 = var_6ch;
0x0001097e cmp r3, 0 |
| if (r3 == 0) {
0x00010980 beq.w 0x10b48 | goto label_8;
| }
0x00010984 ldrb r6, [r4, 0x10] | r6 = *((r4 + 0x10));
0x00010986 ldr r2, [r3, 4] | r2 = *((r3 + 4));
0x00010988 ldr r3, [r5] | r3 = *(r5);
0x0001098a cmp r6, 0xa |
| if (r6 != 0xa) {
0x0001098c bne.w 0x10b54 | goto label_9;
| }
| label_0:
0x00010990 cmp r3, 0 |
| if (r3 == 0) {
0x00010992 beq 0x109a4 | goto label_10;
| }
0x00010994 ldr r2, [r4, 0x18] | r2 = *((r4 + 0x18));
0x00010996 and r2, r2, 0x200 | r2 &= 0x200;
| if (r3 >= 0) {
0x0001099a bge.w 0x10e0c | goto label_11;
| }
0x0001099e cmp r2, 0 |
| if (r2 == 0) {
0x000109a0 beq.w 0x10d0a | void (*0x10d0a)() ();
| }
| label_10:
0x000109a4 movs r7, 0x80 | r7 = 0x80;
| label_1:
0x000109a6 ldrb r2, [r4, 0x16] | r2 = *((r4 + 0x16));
0x000109a8 ldr r3, [r5, 0x18] | r3 = *((r5 + 0x18));
0x000109aa eors r3, r2 | r3 ^= r2;
0x000109ac ldr r2, [r5, 0x1c] | r2 = *((r5 + 0x1c));
0x000109ae tst r3, r2 |
| if ((r3 & r2) != 0) {
0x000109b0 bne.w 0x10d0a | void (*0x10d0a)() ();
| }
0x000109b4 ldrb.w sb, [r5, 0x3c] | sb = *((r5 + 0x3c));
0x000109b8 cmp.w sb, 0 |
| if (sb == 0) {
0x000109bc beq 0x109d0 | goto label_12;
| }
0x000109be cmp r6, sb |
| if (r6 != sb) {
0x000109c0 bne.w 0x10d0a | void (*0x10d0a)() ();
| }
0x000109c4 ldrsh.w r2, [r5, 0x3e] | r2 = *((r5 + 0x3e));
0x000109c8 ldrb r3, [r4, 0x11] | r3 = *((r4 + 0x11));
0x000109ca cmp r2, r3 |
| if (r2 > r3) {
0x000109cc bgt.w 0x10d0a | void (*0x10d0a)() ();
| }
| label_12:
0x000109d0 ldrb.w r8, [r5, 0x50] | r8 = *((r5 + 0x50));
0x000109d4 cmp.w r8, 0 |
| if (r8 == 0) {
0x000109d8 beq 0x109f0 | goto label_13;
| }
0x000109da cmp r6, r8 |
| if (r6 != r8) {
0x000109dc bne.w 0x10d0a | void (*0x10d0a)() ();
| }
0x000109e0 ldrsh.w r3, [r5, 0x52] | r3 = *((r5 + 0x52));
0x000109e4 cmp r3, 0 |
| if (r3 < 0) {
0x000109e6 blt 0x109f0 | goto label_13;
| }
0x000109e8 ldrb r2, [r4, 0x11] | r2 = *((r4 + 0x11));
0x000109ea cmp r3, r2 |
| if (r3 < r2) {
0x000109ec blt.w 0x10d0a | void (*0x10d0a)() ();
| }
| label_13:
0x000109f0 ldrb.w r3, [r5, 0x64] | r3 = *((r5 + 0x64));
| if (r3 == 0) {
0x000109f4 cbz r3, 0x10a08 | goto label_14;
| }
0x000109f6 cmp r6, r3 |
| if (r6 != r3) {
0x000109f8 bne.w 0x10d0a | void (*0x10d0a)() ();
| }
0x000109fc ldrsh.w r2, [r5, 0x66] | r2 = *((r5 + 0x66));
0x00010a00 ldrb r3, [r4, 0x12] | r3 = *((r4 + 0x12));
0x00010a02 cmp r2, r3 |
| if (r2 > r3) {
0x00010a04 bgt.w 0x10d0a | void (*0x10d0a)() ();
| }
| label_14:
0x00010a08 ldrb.w r3, [r5, 0x78] | r3 = *((r5 + 0x78));
| if (r3 == 0) {
0x00010a0c cbz r3, 0x10a24 | goto label_15;
| }
0x00010a0e cmp r6, r3 |
| if (r6 != r3) {
0x00010a10 bne.w 0x10d0a | void (*0x10d0a)() ();
| }
0x00010a14 ldrsh.w r3, [r5, 0x7a] | r3 = *((r5 + 0x7a));
0x00010a18 cmp r3, 0 |
| if (r3 < 0) {
0x00010a1a blt 0x10a24 | goto label_15;
| }
0x00010a1c ldrb r2, [r4, 0x12] | r2 = *((r4 + 0x12));
0x00010a1e cmp r3, r2 |
| if (r3 < r2) {
0x00010a20 blt.w 0x10d0a | void (*0x10d0a)() ();
| }
| label_15:
0x00010a24 ldr r1, [sp, 0x38] | r1 = var_38h;
0x00010a26 movs r3, 0 | r3 = 0;
0x00010a28 add.w sl, sp, 0x1c | sl += var_1ch;
0x00010a2c add.w fp, sp, 8 |
0x00010a30 str r3, [sp, 0x1c] | var_1ch = r3;
0x00010a32 str r3, [sp, 8] | var_8h = r3;
0x00010a34 strd r3, r3, [sp, 0x20] | __asm ("strd r3, r3, [var_20h]");
0x00010a38 strd r3, r3, [sp, 0x28] | __asm ("strd r3, r3, [var_28h]");
0x00010a3c strd r3, r3, [sp, 0xc] | __asm ("strd r3, r3, [var_ch]");
0x00010a40 strd r3, r3, [sp, 0x14] | __asm ("strd r3, r3, [var_14h]");
| if (r1 != 0) {
0x00010a44 cbz r1, 0x10a60 |
0x00010a46 ldrb r3, [r4, 0x12] | r3 = *((r4 + 0x12));
0x00010a48 cmp r6, 0xa |
0x00010a4a ite ne |
| if (r6 == 0xa) {
0x00010a4c movne r2, 4 | r2 = 4;
| }
| if (r6 != 0xa) {
0x00010a4e moveq r2, 0x10 | r2 = 0x10;
| }
0x00010a50 adds r1, 4 | r1 += 4;
0x00010a52 add r0, sp, 0x20 | r0 += var_20h;
0x00010a54 strh.w r3, [sp, 0x1e] | var_1eh = r3;
0x00010a58 strb.w r2, [sp, 0x1d] | var_1dh = r2;
0x00010a5c blx 0x3b30 | mmap64 ()
| }
0x00010a60 ldr r1, [sp, 0x34] | r1 = var_34h;
| if (r1 != 0) {
0x00010a62 cbz r1, 0x10a7e |
0x00010a64 ldrb r3, [r4, 0x11] | r3 = *((r4 + 0x11));
0x00010a66 cmp r6, 0xa |
0x00010a68 ite eq |
| if (r6 != 0xa) {
0x00010a6a moveq r2, 0x10 | r2 = 0x10;
| }
| if (r6 == 0xa) {
0x00010a6c movne r2, 4 | r2 = 4;
| }
0x00010a6e adds r1, 4 | r1 += 4;
0x00010a70 add r0, sp, 0xc | r0 += var_ch;
0x00010a72 strh.w r3, [sp, 0xa] | var_ah = r3;
0x00010a76 strb.w r2, [sp, 9] | var_9h = r2;
0x00010a7a blx 0x3b30 | mmap64 ()
| }
0x00010a7e cmp.w sb, 0 |
| if (sb == 0) {
0x00010a82 beq 0x10a9c | goto label_16;
| }
0x00010a84 ldrsh.w r2, [r5, 0x3e] | r2 = *((r5 + 0x3e));
0x00010a88 add.w r1, r5, 0x3c | r1 = r5 + 0x3c;
0x00010a8c mov r0, fp | r0 = fp;
0x00010a8e bl 0x3ddbc | r0 = fcn_0003ddbc (r0, r1, r2);
0x00010a92 cmp r0, 0 |
| if (r0 != 0) {
0x00010a94 bne.w 0x10d0a | void (*0x10d0a)() ();
| }
0x00010a98 ldrb.w r8, [r5, 0x50] | r8 = *((r5 + 0x50));
| label_16:
0x00010a9c cmp.w r8, 0 |
| if (r8 == 0) {
0x00010aa0 beq 0x10abc | goto label_17;
| }
0x00010aa2 ldrsh.w r3, [r5, 0x52] | r3 = *((r5 + 0x52));
0x00010aa6 cmp r3, 0 |
| if (r3 < 0) {
0x00010aa8 blt 0x10abc | goto label_17;
| }
0x00010aaa ldrb r2, [r4, 0x11] | r2 = *((r4 + 0x11));
0x00010aac mov r0, fp | r0 = fp;
0x00010aae add.w r1, r5, 0x50 | r1 = r5 + 0x50;
0x00010ab2 bl 0x3ddbc | r0 = fcn_0003ddbc (r0, r1, r2);
0x00010ab6 cmp r0, 0 |
| if (r0 != 0) {
0x00010ab8 bne.w 0x10d0a | void (*0x10d0a)() ();
| }
| label_17:
0x00010abc ldrb.w r3, [r5, 0x64] | r3 = *((r5 + 0x64));
| if (r3 == 0) {
0x00010ac0 cbz r3, 0x10ad6 | goto label_18;
| }
0x00010ac2 ldrsh.w r2, [r5, 0x66] | r2 = *((r5 + 0x66));
0x00010ac6 add.w r1, r5, 0x64 | r1 = r5 + 0x64;
0x00010aca mov r0, sl | r0 = sl;
0x00010acc bl 0x3ddbc | r0 = fcn_0003ddbc (r0, r1, r2);
0x00010ad0 cmp r0, 0 |
| if (r0 != 0) {
0x00010ad2 bne.w 0x10d0a | void (*0x10d0a)() ();
| }
| label_18:
0x00010ad6 ldrb.w r3, [r5, 0x78] | r3 = *((r5 + 0x78));
| if (r3 == 0) {
0x00010ada cbz r3, 0x10af6 | goto label_19;
| }
0x00010adc ldrsh.w r3, [r5, 0x7a] | r3 = *((r5 + 0x7a));
0x00010ae0 cmp r3, 0 |
| if (r3 < 0) {
0x00010ae2 blt 0x10af6 | goto label_19;
| }
0x00010ae4 ldrb r2, [r4, 0x12] | r2 = *((r4 + 0x12));
0x00010ae6 mov r0, sl | r0 = sl;
0x00010ae8 add.w r1, r5, 0x78 | r1 = r5 + 0x78;
0x00010aec bl 0x3ddbc | r0 = fcn_0003ddbc (r0, r1, r2);
0x00010af0 cmp r0, 0 |
| if (r0 != 0) {
0x00010af2 bne.w 0x10d0a | void (*0x10d0a)() ();
| }
| label_19:
0x00010af6 ldr r3, [r5, 0x24] | r3 = *((r5 + 0x24));
| if (r3 == 0) {
0x00010af8 cbz r3, 0x10b0a | goto label_20;
| }
0x00010afa ldr r2, [sp, 0x40] | r2 = var_40h;
0x00010afc cmp r2, 0 |
| if (r2 == 0) {
0x00010afe beq.w 0x10d0a | void (*0x10d0a)() ();
| }
0x00010b02 ldr r2, [r2, 4] | r2 = *((r2 + 4));
0x00010b04 cmp r3, r2 |
| if (r3 != r2) {
0x00010b06 bne.w 0x10d0a | void (*0x10d0a)() ();
| }
| label_20:
0x00010b0a ldr r1, [r5, 8] | r1 = *((r5 + 8));
| if (r1 == 0) {
0x00010b0c cbz r1, 0x10b6c | goto label_21;
| }
0x00010b0e ldrh r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00010b10 cmp r3, 0xa |
| if (r3 != 0xa) {
0x00010b12 bne 0x10b26 | goto label_22;
| }
0x00010b14 ldrb r3, [r4, 0x17] | r3 = *((r4 + 0x17));
0x00010b16 cmp r3, 7 |
| if (r3 != 7) {
0x00010b18 bne 0x10b26 | goto label_22;
| }
0x00010b1a ldr r3, [sp, 0x48] | r3 = var_48h;
| if (r3 == 0) {
0x00010b1c cbz r3, 0x10b26 | goto label_22;
| }
0x00010b1e ldr r3, [r3, 4] | r3 = *((r3 + 4));
0x00010b20 adds r3, 1 | r3++;
| if (r3 == 1) {
0x00010b22 beq.w 0x10d0a | void (*0x10d0a)() ();
| }
| label_22:
0x00010b26 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x00010b28 ldr r2, [r4] | r2 = *(r4);
0x00010b2a ldr r0, [r5, 0x10] | r0 = *((r5 + 0x10));
0x00010b2c adds r3, 3 | r3 += 3;
0x00010b2e bic r3, r3, 3 | r3 = BIT_MASK (r3, 3);
0x00010b32 adds r6, r3, r2 | r6 = r3 + r2;
0x00010b34 cmp r6, r0 |
| if (r6 < r0) {
0x00010b36 bls.w 0x10dd6 | void (*0x10dd6)() ();
| }
0x00010b3a bl 0x10008 | r0 = fcn_00010008 ();
0x00010b3e cmp r0, 0 |
| if (r0 == 0) {
0x00010b40 beq.w 0x10dca | goto label_23;
| }
0x00010b44 bl 0x8f44 | fcn_00008f44 ();
| label_8:
0x00010b48 ldrb r6, [r4, 0x10] | r6 = *((r4 + 0x10));
0x00010b4a ldrb r2, [r4, 0x14] | r2 = *((r4 + 0x14));
0x00010b4c ldr r3, [r5] | r3 = *(r5);
0x00010b4e cmp r6, 0xa |
| if (r6 == 0xa) {
0x00010b50 beq.w 0x10990 | goto label_0;
| }
| label_9:
0x00010b54 cmp r6, 2 |
0x00010b56 ite eq |
| if (r6 != 2) {
0x00010b58 moveq r7, 0x20 | r7 = 0x20;
| }
| if (r6 == 2) {
0x00010b5a movne r7, -1 | r7 = -1;
| }
0x00010b5e cmp r3, 0 |
| if (r3 <= 0) {
0x00010b60 ble.w 0x109a6 | goto label_1;
| }
0x00010b64 cmp r3, r2 |
| if (r3 != r2) {
0x00010b66 bne.w 0x10d0a | void (*0x10d0a)() ();
| }
0x00010b6a b 0x109a6 | goto label_1;
| label_21:
0x00010b6c ldrh r3, [r4, 4] | r3 = *((r4 + 4));
0x00010b6e cmp r3, 0x19 |
| if (r3 == 0x19) {
0x00010b70 bne 0x10b7c |
0x00010b72 ldr r1, [pc, 0x2dc] |
0x00010b74 movs r0, 1 | r0 = 1;
0x00010b76 add r1, pc | r1 = 0x219cc;
0x00010b78 blx 0x4224 | fcn_00004224 ();
| }
0x00010b7c ldrb r0, [r4, 0x17] | r0 = *((r4 + 0x17));
0x00010b7e cmp r0, 1 |
| if (r0 != 1) {
0x00010b80 beq 0x10b92 |
0x00010b82 bl 0x11cf0 | fcn_00011cf0 (r0);
0x00010b86 ldr r1, [pc, 0x2cc] |
0x00010b88 mov r2, r0 | r2 = r0;
0x00010b8a movs r0, 1 | r0 = 1;
0x00010b8c add r1, pc | r1 = 0x219e6;
0x00010b8e blx 0x4224 | fcn_00004224 ();
| }
0x00010b92 ldr r1, [sp, 0x34] | r1 = var_34h;
0x00010b94 ldrb r2, [r4, 0x11] | r2 = *((r4 + 0x11));
| if (r1 != 0) {
0x00010b96 cbz r1, 0x10bb8 |
0x00010b98 cmp r2, r7 |
0x00010b9a ldrb r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x00010b9c add.w r1, r1, 4 | r1 += 4;
| if (r2 == r7) {
0x00010ba0 beq.w 0x10db8 | goto label_24;
| }
0x00010ba4 bl 0x1226c | fcn_0001226c (r0, r1);
0x00010ba8 ldr r1, [pc, 0x2ac] |
0x00010baa mov r2, r0 | r2 = r0;
0x00010bac ldrb r3, [r4, 0x11] | r3 = *((r4 + 0x11));
0x00010bae movs r0, 1 | r0 = 1;
0x00010bb0 add r1, pc | r1 = 0x21a0c;
0x00010bb2 blx 0x4224 | fcn_00004224 ();
0x00010bb6 b 0x10bc8 |
| } else {
0x00010bb8 cmp r2, 0 |
| if (r2 != 0) {
0x00010bba bne.w 0x10dac | goto label_25;
| }
0x00010bbe ldr r1, [pc, 0x29c] |
0x00010bc0 movs r0, 1 | r0 = 1;
0x00010bc2 add r1, pc | r1 = 0x21a24;
0x00010bc4 blx 0x4224 | fcn_00004224 ();
| }
| label_6:
0x00010bc8 ldr r1, [sp, 0x38] | r1 = var_38h;
0x00010bca ldrb r2, [r4, 0x12] | r2 = *((r4 + 0x12));
0x00010bcc cmp r1, 0 |
| if (r1 == 0) {
0x00010bce beq.w 0x10d26 | goto label_26;
| }
0x00010bd2 cmp r2, r7 |
0x00010bd4 ldrb r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x00010bd6 add.w r1, r1, 4 | r1 += 4;
| if (r2 == r7) {
0x00010bda beq.w 0x10d92 | goto label_27;
| }
0x00010bde bl 0x1226c | fcn_0001226c (r0, r1);
0x00010be2 ldr r1, [pc, 0x27c] |
0x00010be4 mov r2, r0 | r2 = r0;
0x00010be6 ldrb r3, [r4, 0x12] | r3 = *((r4 + 0x12));
0x00010be8 movs r0, 1 | r0 = 1;
0x00010bea add r1, pc | r1 = 0x21a50;
0x00010bec blx 0x4224 | fcn_00004224 ();
| label_2:
0x00010bf0 ldr r1, [sp, 0x44] | r1 = var_44h;
| if (r1 != 0) {
0x00010bf2 cbz r1, 0x10c10 |
| label_4:
0x00010bf4 ldrsh.w r3, [r5, 0x2a] | r3 = *((r5 + 0x2a));
0x00010bf8 cmp r3, r7 |
| if (r3 == r7) {
0x00010bfa beq 0x10c10 | goto label_3;
| }
0x00010bfc adds r1, 4 | r1 += 4;
0x00010bfe ldrb r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x00010c00 bl 0x1226c | fcn_0001226c (r0, r1);
0x00010c04 ldr r1, [pc, 0x25c] |
0x00010c06 mov r2, r0 | r2 = r0;
0x00010c08 movs r0, 1 | r0 = 1;
0x00010c0a add r1, pc | r1 = 0x21a72;
0x00010c0c blx 0x4224 | fcn_00004224 ();
| }
| label_3:
0x00010c10 ldr r3, [sp, 0x40] | r3 = var_40h;
| if (r3 != 0) {
0x00010c12 cbz r3, 0x10c26 |
0x00010c14 ldr r0, [r3, 4] | r0 = *((r3 + 4));
0x00010c16 bl 0x11a18 | fcn_00011a18 (r0);
0x00010c1a ldr r1, [pc, 0x24c] |
0x00010c1c mov r2, r0 | r2 = r0;
0x00010c1e movs r0, 1 | r0 = 1;
0x00010c20 add r1, pc | r1 = 0x21a8e;
0x00010c22 blx 0x4224 | fcn_00004224 ();
| }
0x00010c26 ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
0x00010c28 lsls r6, r3, 0x16 | r6 = r3 << 0x16;
| if (r6 >= r3) {
0x00010c2a bmi 0x10c46 |
0x00010c2c ldrb r0, [r4, 0x16] | r0 = *((r4 + 0x16));
| if (r0 == 0) {
0x00010c2e cbz r0, 0x10c46 | goto label_28;
| }
0x00010c30 ldr r3, [r5, 0x1c] | r3 = *((r5 + 0x1c));
0x00010c32 adds r3, 1 | r3++;
| if (r3 == 1) {
0x00010c34 beq 0x10c46 | goto label_28;
| }
0x00010c36 bl 0x11c9c | fcn_00011c9c (r0);
0x00010c3a ldr r1, [pc, 0x230] |
0x00010c3c mov r2, r0 | r2 = r0;
0x00010c3e movs r0, 1 | r0 = 1;
0x00010c40 add r1, pc | r1 = 0x21ab2;
0x00010c42 blx 0x4224 | fcn_00004224 ();
| }
| label_28:
0x00010c46 ldr r1, [sp, 0x4c] | r1 = var_4ch;
| if (r1 != 0) {
0x00010c48 cbz r1, 0x10c5e |
0x00010c4a adds r1, 4 | r1 += 4;
0x00010c4c ldrb r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x00010c4e bl 0x1226c | fcn_0001226c (r0, r1);
0x00010c52 ldr r1, [pc, 0x21c] |
0x00010c54 mov r2, r0 | r2 = r0;
0x00010c56 movs r0, 1 | r0 = 1;
0x00010c58 add r1, pc | r1 = 0x21ace;
0x00010c5a blx 0x4224 | fcn_00004224 ();
| }
0x00010c5e ldr r3, [sp, 0x48] | r3 = var_48h;
| if (r3 != 0) {
0x00010c60 cbz r3, 0x10c6e |
0x00010c62 ldr r1, [pc, 0x210] |
0x00010c64 movs r0, 1 | r0 = 1;
0x00010c66 ldr r2, [r3, 4] | r2 = *((r3 + 4));
0x00010c68 add r1, pc | r1 = 0x21ae2;
0x00010c6a blx 0x4224 | fcn_00004224 ();
| }
0x00010c6e ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
0x00010c70 lsls r0, r3, 0x1f | r0 = r3 << 0x1f;
| if (r0 < r3) {
0x00010c72 bpl 0x10c80 |
0x00010c74 ldr r1, [pc, 0x200] |
0x00010c76 movs r0, 1 | r0 = 1;
0x00010c78 add r1, pc | r1 = 0x21af4;
0x00010c7a blx 0x4224 | fcn_00004224 ();
0x00010c7e ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
| }
0x00010c80 lsls r1, r3, 0x1d | r1 = r3 << 0x1d;
| if (r1 < r3) {
0x00010c82 bpl 0x10c90 |
0x00010c84 ldr r1, [pc, 0x1f4] |
0x00010c86 movs r0, 1 | r0 = 1;
0x00010c88 add r1, pc | r1 = 0x21b08;
0x00010c8a blx 0x4224 | fcn_00004224 ();
0x00010c8e ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
| }
0x00010c90 lsls r2, r3, 0x1e | r2 = r3 << 0x1e;
| if (r2 < r3) {
0x00010c92 bpl 0x10ca0 |
0x00010c94 ldr r1, [pc, 0x1e8] |
0x00010c96 movs r0, 1 | r0 = 1;
0x00010c98 add r1, pc | r1 = 0x21b1c;
0x00010c9a blx 0x4224 | fcn_00004224 ();
0x00010c9e ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
| }
0x00010ca0 lsls r3, r3, 0x17 | r3 <<= 0x17;
| if (r3 < r3) {
0x00010ca2 bpl 0x10cae |
0x00010ca4 ldr r1, [pc, 0x1dc] |
0x00010ca6 movs r0, 1 | r0 = 1;
0x00010ca8 add r1, pc | r1 = 0x21b30;
0x00010caa blx 0x4224 | fcn_00004224 ();
| }
0x00010cae ldrb r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00010cb0 cmp r3, 0xa |
| if (r3 != 0xa) {
0x00010cb2 bne 0x10cfe | void (*0x10cfe)() ();
| }
0x00010cb4 ldr r6, [sp, 0x60] | r6 = var_60h;
0x00010cb6 ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
0x00010cb8 and r3, r3, 0x200 | r3 &= 0x200;
0x00010cbc cmp r6, 0 |
| if (r6 == 0) {
0x00010cbe beq 0x10d44 | void (*0x10d44)() ();
| }
0x00010cc0 cmp r3, 0 |
| if (r3 == 0) {
0x00010cc2 beq 0x10d5c | goto label_29;
| }
0x00010cc4 ldr r3, [pc, 0x1c0] |
0x00010cc6 movs r0, 1 | r0 = 1;
0x00010cc8 ldr r1, [pc, 0x1c0] |
0x00010cca add r3, pc | r3 = 0x21b56;
0x00010ccc ldrb r2, [r3] | r2 = *(r3);
0x00010cce add r1, pc | r1 = 0x21b5e;
0x00010cd0 blx 0x4224 | fcn_00004224 ();
0x00010cd4 ldr r4, [r6, 0xc] | r4 = *((r6 + 0xc));
| if (r4 != 0) {
0x00010cd6 cbz r4, 0x10cf0 |
| label_5:
0x00010cd8 bl 0x11e24 | r0 = fcn_00011e24 ();
0x00010cdc mov r1, r0 | r1 = r0;
0x00010cde mov r0, r4 | r0 = r4;
0x00010ce0 bl 0x7e80 | fcn_00007e80 (r0, r1, r2);
0x00010ce4 ldr r1, [pc, 0x1a8] |
0x00010ce6 mov r2, r0 | r2 = r0;
0x00010ce8 movs r0, 1 | r0 = 1;
0x00010cea add r1, pc | r1 = 0x21b7e;
0x00010cec blx 0x4224 | fcn_00004224 ();
| }
0x00010cf0 ldr r2, [r6, 0x10] | r2 = *((r6 + 0x10));
| if (r2 == 0) {
0x00010cf2 cbz r2, 0x10cfe | void (*0x10cfe)() ();
| }
0x00010cf4 ldr r1, [pc, 0x19c] |
0x00010cf6 movs r0, 1 | r0 = 1;
0x00010cf8 add r1, pc | r1 = 0x21b90;
0x00010cfa blx 0x4224 | fcn_00004224 ();
| label_26:
0x00010d26 cmp r2, 0 |
| if (r2 == 0) {
0x00010d28 beq.w 0x10bf0 | goto label_2;
| }
0x00010d2c ldr r1, [pc, 0x16c] |
0x00010d2e movs r0, 1 | r0 = 1;
0x00010d30 add r1, pc | r1 = 0x21bd0;
0x00010d32 blx 0x4224 | fcn_00004224 ();
0x00010d36 ldr r1, [sp, 0x44] | r1 = var_44h;
0x00010d38 cmp r1, 0 |
| if (r1 == 0) {
0x00010d3a beq.w 0x10c10 | goto label_3;
| }
0x00010d3e b 0x10bf4 | goto label_4;
| label_29:
0x00010d5c ldr r4, [r6, 0xc] | r4 = *((r6 + 0xc));
0x00010d5e cmp r4, 0 |
| if (r4 != 0) {
0x00010d60 bne 0x10cd8 | goto label_5;
| }
0x00010d62 ldr r2, [r6, 0x10] | r2 = *((r6 + 0x10));
0x00010d64 cmp r2, 0 |
| if (r2 == 0) {
0x00010d66 beq 0x10cfe | void (*0x10cfe)() ();
| }
0x00010d68 ldr r1, [pc, 0x13c] |
0x00010d6a movs r0, 1 | r0 = 1;
0x00010d6c add r1, pc | r1 = 0x21c18;
0x00010d6e blx 0x4224 | fcn_00004224 ();
0x00010d72 ldr r3, [sp, 0x3c] | r3 = var_3ch;
0x00010d74 cmp r3, 0 |
| if (r3 == 0) {
0x00010d76 beq 0x10d04 | void (*0x10d04)() ();
| }
| label_27:
0x00010d92 bl 0x1226c | fcn_0001226c (r0, r1);
0x00010d96 ldr r1, [pc, 0x118] |
0x00010d98 mov r2, r0 | r2 = r0;
0x00010d9a movs r0, 1 | r0 = 1;
0x00010d9c add r1, pc | r1 = 0x21c52;
0x00010d9e blx 0x4224 | fcn_00004224 ();
0x00010da2 ldr r1, [sp, 0x44] | r1 = var_44h;
0x00010da4 cmp r1, 0 |
| if (r1 == 0) {
0x00010da6 beq.w 0x10c10 | goto label_3;
| }
0x00010daa b 0x10bf4 | goto label_4;
| label_25:
0x00010dac ldr r1, [pc, 0x104] |
0x00010dae movs r0, 1 | r0 = 1;
0x00010db0 add r1, pc | r1 = 0x21c68;
0x00010db2 blx 0x4224 | fcn_00004224 ();
0x00010db6 b 0x10bc8 | goto label_6;
| label_24:
0x00010db8 bl 0x1226c | fcn_0001226c (r0, r1);
0x00010dbc ldr r1, [pc, 0xf8] |
0x00010dbe mov r2, r0 | r2 = r0;
0x00010dc0 movs r0, 1 | r0 = 1;
0x00010dc2 add r1, pc | r1 = 0x21c7e;
0x00010dc4 blx 0x4224 | fcn_00004224 ();
0x00010dc8 b 0x10bc8 | goto label_6;
| label_23:
0x00010dca ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x00010dcc ldr r1, [r5, 8] | r1 = *((r5 + 8));
0x00010dce ldr r2, [r4] | r2 = *(r4);
0x00010dd0 adds r3, 3 | r3 += 3;
0x00010dd2 bic r3, r3, 3 | r3 = BIT_MASK (r3, 3);
0x00010dd4 lsls r3, r0, 0xc | r3 = r0 << 0xc;
| label_11:
0x00010e0c cmp r2, 0 |
| if (r2 != 0) {
0x00010e0e bne.w 0x10d0a | void (*0x10d0a)() ();
| }
0x00010e12 cmp r3, 0xff |
| if (r3 != 0xff) {
0x00010e14 bne 0x10e22 | goto label_30;
| }
0x00010e16 ldrb r3, [r4, 0x17] | r3 = *((r4 + 0x17));
0x00010e18 cmp r3, 2 |
| if (r3 != 2) {
0x00010e1a bne.w 0x10d0a | void (*0x10d0a)() ();
| }
0x00010e1e movs r7, 0x80 | r7 = 0x80;
0x00010e20 b 0x109a6 | goto label_1;
| label_30:
0x00010e22 cmp r3, 0xfe |
| if (r3 != 0xfe) {
0x00010e24 bne.w 0x10d0a | void (*0x10d0a)() ();
| }
0x00010e28 ldrb r3, [r4, 0x17] | r3 = *((r4 + 0x17));
0x00010e2a cmp r3, 2 |
| if (r3 == 2) {
0x00010e2c beq.w 0x10d0a | void (*0x10d0a)() ();
| }
0x00010e30 movs r7, 0x80 | r7 = 0x80;
0x00010e32 b 0x109a6 | goto label_1;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x10dd4 */
| #include <stdint.h>
|
; (fcn) fcn.00010dd4 () | void fcn_00010dd4 (int16_t arg_3ch, int16_t arg_ach, int16_t arg1, int16_t arg2) {
| r0 = arg1;
| r1 = arg2;
| do {
0x00010cfe ldr r3, [sp, 0x3c] | r3 = *(arg_3ch);
0x00010d00 cmp r3, 0 |
| if (r3 != 0) {
0x00010d02 bne 0x10d78 | goto label_2;
| }
| label_0:
0x00010d04 movs r0, 0xa | r0 = 0xa;
0x00010d06 bl 0x9558 | fcn_00009558 (r0);
| label_1:
0x00010d0a ldr r2, [pc, 0x18c] |
0x00010d0c ldr r3, [pc, 0x128] | r3 = *(0x10e38);
0x00010d0e add r2, pc | r2 = 0x21bac;
0x00010d10 ldr r3, [r2, r3] | r3 = *(0x21bac);
0x00010d12 ldr r2, [r3] | r2 = *(0x21bac);
0x00010d14 ldr r3, [sp, 0xac] | r3 = *(arg_ach);
0x00010d16 eors r2, r3 | r2 ^= r3;
0x00010d18 mov.w r3, 0 | r3 = 0;
| if (r2 == r3) {
0x00010d1c bne 0x10d40 |
0x00010d1e movs r0, 0 | r0 = 0;
0x00010d20 add sp, 0xb4 |
0x00010d22 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
0x00010d40 blx 0x3c40 | fcn_00003c40 ();
0x00010d44 cmp r3, 0 |
0x00010d46 beq 0x10cfe |
| } while (r3 == 0);
0x00010d48 ldr r3, [pc, 0x154] |
0x00010d4a movs r0, 1 | r0 = 1;
0x00010d4c ldr r1, [pc, 0x154] |
0x00010d4e add r3, pc | r3 = 0x21bf2;
0x00010d50 ldrb r2, [r3] | r2 = *(r3);
0x00010d52 add r1, pc | r1 = 0x21bfa;
0x00010d54 blx 0x4224 | fcn_00004224 ();
0x00010d58 ldr r3, [r6, 8] | r3 = *((r6 + 8));
0x00010d5a udf 0xff | __asm ("udf 0xff");
| label_2:
0x00010d78 ldr r2, [r5, 0x20] | r2 = *((r5 + 0x20));
0x00010d7a cmp r2, 0 |
| if (r2 != 0) {
0x00010d7c bne 0x10d04 | goto label_0;
| }
0x00010d7e ldr r0, [r3, 4] | r0 = *((r3 + 4));
0x00010d80 bl 0x11a18 | fcn_00011a18 (r0);
0x00010d84 ldr r1, [pc, 0x124] |
0x00010d86 mov r2, r0 | r2 = r0;
0x00010d88 movs r0, 1 | r0 = 1;
0x00010d8a add r1, pc | r1 = 0x21c3a;
0x00010d8c blx 0x4224 | fcn_00004224 ();
0x00010d90 b 0x10d04 | goto label_0;
0x00010dd4 lsls r3, r0, 0xc | r3 = r0 << 0xc;
0x00010dd6 add r3, r1 | r3 += r1;
0x00010dd8 mov r1, r4 | r1 = r4;
0x00010dda mov r0, r3 | r0 = r3;
0x00010ddc blx 0x3b30 | mmap64 ()
0x00010de0 movs r1, 0x19 | r1 = 0x19;
0x00010de2 ldr r2, [r4] | r2 = *(r4);
0x00010de4 movt r1, 1 | r1 = (r1 & 0xFFFF) | 0x10000;
0x00010de8 mov r3, r0 | r3 = r0;
0x00010dea str r1, [r0, 4] | *((r0 + 4)) = r1;
0x00010dec ldr r0, [r5, 0x14] | r0 = *((r5 + 0x14));
0x00010dee add r2, r3 | r2 += r3;
0x00010df0 ldr r1, [r0, 0x1c] | r1 = *((r0 + 0x1c));
0x00010df2 adds r1, 1 | r1++;
0x00010df4 str r1, [r0, 0x1c] | *((r0 + 0x1c)) = r1;
0x00010df6 movs r0, 1 | r0 = 1;
0x00010df8 str r1, [r3, 8] | *((r3 + 8)) = r1;
0x00010dfa movs r1, 0 | r1 = 0;
0x00010dfc ldr r3, [r5, 8] | r3 = *((r5 + 8));
0x00010dfe strb r1, [r5, 5] | *((r5 + 5)) = r1;
0x00010e00 strb r0, [r5, 4] | *((r5 + 4)) = r0;
0x00010e02 subs r3, r2, r3 | r3 = r2 - r3;
0x00010e04 strb r1, [r5, 6] | *((r5 + 6)) = r1;
0x00010e06 strb r1, [r5, 7] | *((r5 + 7)) = r1;
0x00010e08 str r3, [r5, 0xc] | *((r5 + 0xc)) = r3;
0x00010e0a b 0x10d0a | goto label_1;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x1150c */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.0001150c () | void fcn_0001150c (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_14h;
| int16_t var_16h;
| int16_t var_18h;
| int16_t var_1ah;
| int16_t var_1eh;
| int16_t var_20h;
| int16_t var_24h;
| int16_t var_28h;
| int16_t var_2ch;
| int32_t var_30h;
| int32_t var_30h_2;
| int16_t var_38h;
| int16_t var_3ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x0001150c push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00011510 mov r4, r1 | r4 = r1;
0x00011512 ldr r3, [r1] | r3 = *(r1);
0x00011514 mov r6, r2 | r6 = r2;
0x00011516 sub sp, 0x44 |
0x00011518 mov r7, r0 | r7 = r0;
0x0001151a ldr r1, [pc, 0x1c8] |
0x0001151c mov.w r0, 0x2000 | r0 = 0x2000;
0x00011520 ldr r2, [pc, 0x1c4] | r2 = *(0x116e8);
0x00011522 add r1, pc | r1 = 0x22c0c;
0x00011524 ldr r2, [r1, r2] |
0x00011526 ldr r2, [r2] | r2 = *(0x22c0c);
0x00011528 str r2, [sp, 0x3c] | var_3ch = r2;
0x0001152a mov.w r2, 0 | r2 = 0;
0x0001152e strd r4, r3, [sp, 0xc] | __asm ("strd r4, r3, [var_ch]");
0x00011532 bl 0x9324 | fcn_00009324 (r0);
0x00011536 ldr r3, [r7, 0x1c] | r3 = *((r7 + 0x1c));
0x00011538 mov r8, r0 | r8 = r0;
0x0001153a add.w sb, r3, 1 | sb = r3 + 1;
0x0001153e movs r3, 0 | r3 = 0;
0x00011540 strh.w r3, [sp, 0x1e] | var_1eh = r3;
0x00011544 strd r3, r3, [sp, 0x30] | __asm ("strd r3, r3, [var_30h]");
0x00011548 str r3, [sp, 0x38] | var_38h = r3;
0x0001154a str.w r3, [sp, 0x16] | __asm ("str.w r3, [var_16h]");
0x0001154e str.w r3, [sp, 0x1a] | __asm ("str.w r3, [var_1ah]");
0x00011552 add r3, sp, 0x14 | r3 += var_14h;
0x00011554 str r3, [sp, 0x20] | var_20h = r3;
0x00011556 movs r3, 0xc | r3 = 0xc;
0x00011558 str r3, [sp, 0x24] | var_24h = r3;
0x0001155a add r3, sp, r3 | r3 = sp + r3;
0x0001155c str r3, [sp, 0x28] | var_28h = r3;
0x0001155e movs r3, 1 | r3 = 1;
0x00011560 str r3, [sp, 0x2c] | var_2ch = r3;
0x00011562 movs r3, 0x10 | r3 = 0x10;
0x00011564 str.w sb, [r7, 0x1c] | __asm ("str.w sb, [r7, 0x1c]");
0x00011568 strh.w r3, [sp, 0x14] | var_14h = r3;
0x0001156c str.w sb, [r4, 8] | __asm ("str.w sb, [r4, 8]");
| if (r6 == 0) {
0x00011570 cbnz r6, 0x1157a |
0x00011572 ldrh r3, [r4, 6] | r3 = *((r4 + 6));
0x00011574 orr r3, r3, 4 | r3 |= 4;
0x00011578 strh r3, [r4, 6] | *((r4 + 6)) = r3;
| }
0x0001157a add.w sl, sp, 0x20 | sl += var_20h;
0x0001157e ldr r0, [r7] | r0 = *(r7);
0x00011580 movs r2, 0 | r2 = 0;
0x00011582 mov r1, sl | r1 = sl;
0x00011584 blx 0x3ba0 | r0 = fcn_00003ba0 ();
0x00011588 cmp r0, 0 |
| if (r0 < 0) {
0x0001158a blt.w 0x116d8 | goto label_5;
| }
0x0001158e ldr.w fp, [pc, 0x15c] |
0x00011592 ldr r3, [pc, 0x15c] |
0x00011594 str.w r8, [sp, 0xc] | __asm ("str.w r8, [var_ch]");
0x00011598 add fp, pc | fp = 0x22c8a;
0x0001159a add r3, pc | r3 = 0x22c90;
0x0001159c str r3, [sp] | *(sp) = r3;
| do {
| label_0:
0x0001159e mov.w r3, 0x2000 | r3 = 0x2000;
0x000115a2 mov r1, sl | r1 = sl;
0x000115a4 ldr r0, [r7] | r0 = *(r7);
0x000115a6 movs r2, 0 | r2 = 0;
0x000115a8 str r3, [sp, 0x10] | var_10h = r3;
0x000115aa blx 0x446c | r0 = sched_getaffinity ();
0x000115ae subs r1, r0, 0 | r1 = r0 - 0;
| if (r1 >= r0) {
0x000115b0 bge 0x115c8 | goto label_6;
| }
0x000115b2 ldr r3, [pc, 0x140] |
0x000115b4 add r3, pc |
0x000115b6 ldr r3, [r3] |
0x000115b8 ldr r3, [r3] | r3 = *(0x22cae);
0x000115ba cmp r3, 4 |
0x000115bc beq 0x1159e |
| } while (r3 == 4);
0x000115be ldr r0, [pc, 0x138] |
0x000115c0 add r0, pc | r0 = 0x22cbe;
0x000115c2 bl 0xa31c | fcn_0000a31c (r0);
0x000115c6 b 0x1159e | goto label_0;
| if (r3 == 4) {
| label_6:
0x000115c8 bne 0x115d4 |
0x000115ca ldr r0, [pc, 0x130] |
0x000115cc add r0, pc | r0 = 0x22cce;
0x000115ce bl 0x8b48 | fcn_00008b48 (r0);
0x000115d0 invalid |
| }
0x000115d4 ldr r3, [sp, 0x24] | r3 = var_24h;
0x000115d6 cmp r3, 0xc |
| if (r3 != 0xc) {
0x000115d8 bne 0x116ce | goto label_7;
| }
0x000115da ldr.w ip, [sp, 0x18] | ip = var_18h;
0x000115de mov r4, r8 | r4 = r8;
| label_2:
0x000115e0 cmp r1, 0xf |
| if (r1 > 0xf) {
0x000115e2 ble 0x11608 |
0x000115e4 ldr r5, [r4] | r5 = *(r4);
0x000115e6 sub.w r0, r5, 0x10 | r0 = r5 - 0x10;
0x000115ea lsrs r3, r0, 0x1f | r3 = r0 >> 0x1f;
| label_1:
0x000115ec cmp r1, r5 |
0x000115ee ite ge |
| if (r1 < r5) {
0x000115f0 movge r2, r3 | r2 = r3;
| }
| if (r1 >= r5) {
0x000115f2 orrlt r2, r3, 1 | r2 = r3 | 1;
| }
| if (r2 == 0) {
0x000115f6 cbz r2, 0x11622 | goto label_8;
| }
0x000115f8 ldr r3, [sp, 0x38] | r3 = var_38h;
0x000115fa lsls r2, r3, 0x1a | r2 = r3 << 0x1a;
| if (r2 >= r3) {
0x000115fc bpl 0x116c4 | goto label_9;
| }
0x000115fe ldr r0, [pc, 0x100] |
0x00011600 add r0, pc | r0 = 0x22d06;
0x00011602 bl 0x8b48 | fcn_00008b48 (r0);
0x00011606 b 0x116ae | goto label_4;
| }
0x00011608 ldr r3, [sp, 0x38] | r3 = var_38h;
0x0001160a lsls r3, r3, 0x1a | r3 <<= 0x1a;
| if (r3 < r3) {
0x0001160c bpl 0x11616 |
0x0001160e ldr r0, [sp] | r0 = *(sp);
0x00011610 bl 0x8b48 | fcn_00008b48 (r0);
0x00011614 b 0x1159e | goto label_0;
| }
0x00011616 cmp r1, 0 |
| if (r1 == 0) {
0x00011618 beq 0x1159e | goto label_0;
| }
0x0001161a ldr r0, [pc, 0xe8] |
0x0001161c add r0, pc | r0 = 0x22d26;
0x0001161e bl 0x8a40 | fcn_00008a40 ();
| label_8:
0x00011622 cmp.w ip, 0 |
| if (ip != 0) {
0x00011626 bne 0x115ec | goto label_1;
| }
0x00011628 ldr r2, [r4, 0xc] | r2 = *((r4 + 0xc));
0x0001162a ldr r3, [r7, 8] | r3 = *((r7 + 8));
0x0001162c cmp r2, r3 |
| if (r2 != r3) {
0x0001162e bne 0x115e0 | goto label_2;
| }
0x00011630 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x00011632 cmp sb, r3 |
| if (sb != r3) {
0x00011634 bne 0x115e0 | goto label_2;
| }
0x00011636 ldrh r3, [r4, 4] | r3 = *((r4 + 4));
0x00011638 cmp r3, 2 |
| if (r3 == 2) {
0x0001163a bne 0x1164a |
0x0001163c cmp r0, 0x13 |
| if (r0 > 0x13) {
0x0001163e bgt 0x11698 | goto label_10;
| }
0x00011640 ldr r0, [pc, 0xc4] |
0x00011642 add r0, pc | r0 = 0x22d4e;
0x00011644 bl 0x8b48 | fcn_00008b48 (r0);
0x00011648 b 0x116ae | goto label_4;
| }
| if (r6 == 0) {
0x0001164a cbz r6, 0x1167a | goto label_11;
| }
0x0001164c mov r2, r5 | r2 = r5;
0x0001164e mov r1, r4 | r1 = r4;
0x00011650 mov r0, r6 | r0 = r6;
0x00011652 blx 0x3b30 | mmap64 ()
| label_3:
0x00011656 movs r4, 0 | r4 = 0;
| do {
0x00011658 mov r0, r8 | r0 = r8;
0x0001165a blx 0x3acc | fcn_00003acc ();
0x0001165e ldr r2, [pc, 0xac] |
0x00011660 ldr r3, [pc, 0x84] | r3 = *(0x116e8);
0x00011662 add r2, pc | r2 = 0x22d74;
0x00011664 ldr r3, [r2, r3] | r3 = *(0x22d74);
0x00011666 ldr r2, [r3] | r2 = *(0x22d74);
0x00011668 ldr r3, [sp, 0x3c] | r3 = var_3ch;
0x0001166a eors r2, r3 | r2 ^= r3;
0x0001166c mov.w r3, 0 | r3 = 0;
| if (r2 == r3) {
0x00011670 bne 0x11694 |
0x00011672 mov r0, r4 | r0 = r4;
0x00011674 add sp, 0x44 |
0x00011676 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_11:
0x0001167a mov r0, fp | r0 = fp;
0x0001167c str r1, [sp, 4] | var_4h = r1;
0x0001167e bl 0x8b48 | fcn_00008b48 (r0);
0x00011682 ldr r1, [sp, 4] | r1 = var_4h;
0x00011684 adds r5, 3 | r5 += 3;
0x00011686 bic r5, r5, 3 | r5 = BIT_MASK (r5, 3);
0x0001168a ldr.w ip, [sp, 0x18] | ip = var_18h;
0x0001168e add r4, r5 | r4 += r5;
0x00011690 subs r1, r1, r5 | r1 -= r5;
0x00011692 b 0x115e0 | goto label_2;
| }
0x00011694 blx 0x3c40 | fcn_00003c40 ();
| label_10:
0x00011698 ldr r3, [pc, 0x74] |
0x0001169a ldr r2, [r4, 0x10] | r2 = *((r4 + 0x10));
0x0001169c add r3, pc |
0x0001169e ldr r3, [r3] | r3 = *(0x22db0);
0x000116a0 rsbs r1, r2, 0 | r1 = r2 - ;
0x000116a2 str r1, [r3] | *(r3) = r1;
| if (r2 == 0) {
0x000116a4 cbz r2, 0x116b4 | goto label_12;
| }
0x000116a6 ldr r0, [pc, 0x6c] |
0x000116a8 add r0, pc | r0 = 0x22dc2;
0x000116aa bl 0xa31c | fcn_0000a31c (r0);
| label_4:
0x000116ae mov.w r4, -1 | r4 = -1;
0x000116b2 b 0x11658 |
| } while (1);
| label_12:
0x000116b4 cmp r6, 0 |
| if (r6 == 0) {
0x000116b6 beq 0x11656 | goto label_3;
| }
0x000116b8 ldr r2, [r4] | r2 = *(r4);
0x000116ba mov r1, r4 | r1 = r4;
0x000116bc mov r0, r6 | r0 = r6;
0x000116be blx 0x3b30 | mmap64 ()
0x000116c2 b 0x11656 | goto label_3;
| label_9:
0x000116c4 ldr r0, [pc, 0x50] |
0x000116c6 mov r1, r5 | r1 = r5;
0x000116c8 add r0, pc | r0 = 0x22de4;
0x000116ca bl 0x8a40 | fcn_00008a40 ();
| label_7:
0x000116ce ldr r0, [pc, 0x4c] |
0x000116d0 mov r1, r3 | r1 = r3;
0x000116d2 add r0, pc | r0 = 0x22df4;
0x000116d4 bl 0x8a40 | fcn_00008a40 ();
| label_5:
0x000116d8 ldr r0, [pc, 0x44] |
0x000116da add r0, pc | r0 = 0x22dfe;
0x000116dc bl 0xa31c | fcn_0000a31c (r0);
0x000116e0 b 0x116ae | goto label_4;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x1192c */
| #include <stdint.h>
|
; (fcn) fcn.0001192c () | void fcn_0001192c (int16_t arg2) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_ch;
| int16_t var_f4h;
| r1 = arg2;
0x0001192c ldr r2, [pc, 0xd8] |
0x0001192e ldr r3, [pc, 0xdc] | r3 = *(0x11a0e);
0x00011930 push {r4, r5, r6, lr} |
0x00011932 sub sp, 0xf8 |
0x00011934 add r2, pc | r2 = 0x23340;
0x00011936 ldr r3, [r2, r3] |
0x00011938 ldr r3, [r3] | r3 = *(0x23340);
0x0001193a str r3, [sp, 0xf4] | var_f4h = r3;
0x0001193c mov.w r3, 0 | r3 = 0;
0x00011940 ldrh r3, [r1, 4] | r3 = *((r1 + 4));
0x00011942 cmp r3, 0x10 |
| if (r3 != 0x10) {
0x00011944 bne 0x119bc | goto label_3;
| }
0x00011946 ldr r3, [r1] | r3 = *(r1);
0x00011948 mov r5, r1 | r5 = r1;
0x0001194a cmp r3, 0x13 |
0x0001194c it ls |
| if (r3 > 0x13) {
0x0001194e movls r0, -1 | r0 = -1;
| }
| if (r3 < 0x13) {
0x00011952 bls 0x119be | goto label_4;
| }
0x00011954 subs r3, 0x20 | r3 -= 0x20;
0x00011956 add.w r2, r1, 0x20 | r2 = r1 + 0x20;
0x0001195a mov r0, sp | r0 = sp;
0x0001195c movs r1, 0x3c | r1 = 0x3c;
0x0001195e bl 0x11724 | fcn_00011724 (r0, r1, r2, r3);
0x00011962 ldr r3, [sp, 0xc] | r3 = var_ch;
| if (r3 == 0) {
0x00011964 cbz r3, 0x119bc | goto label_3;
| }
0x00011966 ldr r4, [pc, 0xa8] |
0x00011968 add r4, pc | r4 = 0x2337e;
0x0001196a ldr r0, [r4] | r0 = *(0x2337e);
| if (r0 == 0) {
0x0001196c cbnz r0, 0x11976 |
0x0001196e movs r0, 0x40 | r0 = 0x40;
0x00011970 bl 0x3d706 | fcn_0003d706 (r0);
0x00011974 str r0, [r4] | *(r4) = r0;
| }
0x00011976 ldr r3, [r5, 0x14] | r3 = *((r5 + 0x14));
0x00011978 and r2, r3, 0xf | r2 = r3 & 0xf;
0x0001197a lsls r7, r1, 8 | r7 = r1 << 8;
0x0001197c ldr.w r4, [r0, r2, lsl 2] | offset_0 = r2 << 2;
| r4 = *((r0 + offset_0));
0x00011980 add.w r6, r0, r2, lsl 2 | r6 = r0 + (r2 << 2);
| if (r4 == 0) {
0x00011984 cbz r4, 0x119dc | goto label_5;
| }
0x00011986 ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x00011988 cmp r3, r2 |
0x0001198a bne 0x119d6 |
| while (1) {
| label_1:
0x0001198c ldr r1, [sp, 4] | r1 = var_4h;
0x0001198e add.w r0, r4, 0x14 | r0 = r4 + 0x14;
0x00011992 ldrh r2, [r5, 0x12] | r2 = *((r5 + 0x12));
0x00011994 ldr r3, [r5, 0x18] | r3 = *((r5 + 0x18));
0x00011996 str r2, [r4, 8] | *((r4 + 8)) = r2;
0x00011998 str r3, [r4, 0x10] | *((r4 + 0x10)) = r3;
| if (r1 == 0) {
0x0001199a cbz r1, 0x119f0 | goto label_6;
| }
0x0001199c ldrh r3, [r1], 4 | r3 = *(r1);
| r1 += 4;
0x000119a0 subs r3, 4 | r3 -= 4;
0x000119a2 cmp r3, 8 |
0x000119a4 mov r2, r3 | r2 = r3;
0x000119a6 str r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
0x000119a8 it ge |
| if (r3 < 8) {
0x000119aa movge r2, 8 | r2 = 8;
| }
0x000119ac blx 0x3b30 | mmap64 ()
| label_0:
0x000119b0 ldr r1, [sp, 0xc] | r1 = var_ch;
0x000119b2 add.w r0, r4, 0x1c | r0 = r4 + 0x1c;
0x000119b6 adds r1, 4 | r1 += 4;
0x000119b8 blx 0x3e3c | getmntent ();
| label_3:
0x000119bc movs r0, 0 | r0 = 0;
| label_4:
0x000119be ldr r2, [pc, 0x54] |
0x000119c0 ldr r3, [pc, 0x48] | r3 = *(0x11a0c);
0x000119c2 add r2, pc | r2 = 0x233dc;
0x000119c4 ldr r3, [r2, r3] | r3 = *(0x233dc);
0x000119c6 ldr r2, [r3] | r2 = *(0x233dc);
0x000119c8 ldr r3, [sp, 0xf4] | r3 = var_f4h;
0x000119ca eors r2, r3 | r2 ^= r3;
0x000119cc mov.w r3, 0 | r3 = 0;
0x000119ce lsls r0, r0, 0xc | r0 <<= 0xc;
| if (r0 != r0) {
0x000119d0 bne 0x119f8 | goto label_7;
| }
0x000119d2 add sp, 0xf8 |
0x000119d4 pop {r4, r5, r6, pc} |
| label_2:
0x000119d6 ldr r2, [r4] | r2 = *(r4);
| if (r2 != 0) {
0x000119d8 cbnz r2, 0x119fc | goto label_8;
| }
0x000119da mov r6, r4 | r6 = r4;
| label_5:
0x000119dc movs r0, 0x2c | r0 = 0x2c;
0x000119de bl 0x9324 | fcn_00009324 (r0);
0x000119e2 ldr r2, [r6] | r2 = *(r6);
0x000119e4 mov r4, r0 | r4 = r0;
0x000119e6 ldr r3, [r5, 0x14] | r3 = *((r5 + 0x14));
0x000119e8 strd r2, r3, [r0] | __asm ("strd r2, r3, [r0]");
0x000119ec str r0, [r6] | *(r6) = r0;
0x000119ee b 0x1198c |
| }
| label_6:
0x000119f0 str r1, [r4, 0xc] | *((r4 + 0xc)) = r1;
0x000119f2 str r1, [r4, 0x14] | *((r4 + 0x14)) = r1;
0x000119f4 str r1, [r0, 4] | *((r0 + 4)) = r1;
0x000119f6 b 0x119b0 | goto label_0;
| label_7:
0x000119f8 blx 0x3c40 | fcn_00003c40 ();
| label_8:
0x000119fc mov r4, r2 | r4 = r2;
0x000119fe ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x00011a00 cmp r3, r2 |
| if (r3 == r2) {
0x00011a02 beq 0x1198c | goto label_1;
| }
0x00011a04 b 0x119d6 | goto label_2;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x12558 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.00012558 () | void fcn_00012558 (int16_t arg1, int16_t arg2) {
| int16_t var_0h;
| int32_t var_4h;
| int16_t var_8h;
| int32_t var_0h_2;
| int32_t var_8h_2;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_14h;
| int32_t var_18h;
| int16_t var_24h;
| int32_t var_2h;
| int32_t var_4h_2;
| int8_t var_8h_3;
| int8_t var_9h;
| int32_t var_ah;
| int32_t var_16h;
| int32_t var_18h_2;
| int32_t var_1ah;
| int16_t var_40h;
| int32_t var_108h;
| int16_t var_2b4h;
| int16_t var_2d4h;
| int16_t var_2d8h;
| r0 = arg1;
| r1 = arg2;
0x00012558 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0001255c sub.w sp, sp, 0x2d8 |
0x00012560 mov r3, sp | r3 = sp;
0x00012562 mov r7, r1 | r7 = r1;
0x00012564 mov.w r2, 0x290 | r2 = 0x290;
0x00012568 add r5, sp, 8 | r5 += var_8h;
0x0001256a ldr r1, [pc, 0x164] |
0x0001256c add r4, sp, 0x24 | r4 += var_24h;
0x0001256e str r2, [r3, 4] | var_4h = r2;
0x00012570 mov r8, r0 | r8 = r0;
0x00012572 ldr r2, [pc, 0x160] | r2 = *(0x126d6);
0x00012574 mov r0, r7 | r0 = r7;
0x00012576 add r1, pc | r1 = 0x24c4c;
0x00012578 ldr.w sb, [pc, 0x15c] |
0x0001257c ldr.w sl, [pc, 0x15c] |
0x0001257e adr r1, 0x170 | r1 = 0x170;
0x00012580 ldr r2, [r1, r2] |
0x00012582 mov r1, r5 | r1 = r5;
0x00012584 add sb, pc | sb = 0x24c60;
0x00012586 add sl, pc | sl = 0x24c66;
0x00012588 ldr r2, [r2] | r2 = *(0x24c4c);
0x0001258a str r2, [sp, 0x2d4] | var_2d4h = r2;
0x0001258c mov.w r2, 0 | r2 = 0;
0x00012590 str r4, [r3] | *(r3) = r4;
0x00012592 str r3, [r5, 8] | var_8h_2 = r3;
0x00012594 movs r3, 0 | r3 = 0;
0x00012596 strd r3, r3, [r5] | __asm ("strd r3, r3, [r5]");
0x0001259a movs r2, 0 | r2 = 0;
0x0001259c str r3, [r5, 0x18] | var_18h = r3;
0x0001259e movs r3, 1 | r3 = 1;
0x000125a0 str r3, [r5, 0xc] | var_ch = r3;
0x000125a2 add r3, sp, 0x2b4 | r3 += var_2b4h;
0x000125a4 str r3, [r5, 0x10] | var_10h = r3;
0x000125a6 movs r3, 0x20 | r3 = 0x20;
0x000125a8 str r3, [r5, 0x14] | var_14h = r3;
0x000125aa blx 0x446c | r0 = sched_getaffinity ();
0x000125ae subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 >= r0) {
0x000125b0 bge 0x125ca | goto label_5;
| }
| do {
0x000125b2 ldr.w r3, [sl] | r3 = *(sl);
0x000125b6 ldr r3, [r3] | r3 = *(r3);
0x000125b8 cmp r3, 4 |
| if (r3 != 4) {
0x000125ba bne 0x12660 | goto label_2;
| }
0x000125bc movs r2, 0 | r2 = 0;
0x000125be mov r1, r5 | r1 = r5;
0x000125c0 mov r0, r7 | r0 = r7;
0x000125c2 blx 0x446c | r0 = sched_getaffinity ();
0x000125c6 subs r6, r0, 0 | r6 = r0 - 0;
0x000125c8 blt 0x125b2 |
| } while (r6 < r0);
| label_5:
0x000125ca cmp r6, 0x1b |
0x000125cc bgt 0x125d4 |
| while (r7 > r6) {
| label_0:
0x000125ce mvn r6, 1 | r6 = ~1;
0x000125d2 b 0x12660 | goto label_2;
0x000125d4 ldrh r7, [r4, 2] | r7 = var_2h;
0x000125d6 rev16 r7, r7 | __asm ("rev16 r7, r7");
0x000125d8 uxth r7, r7 | r7 = (int16_t) r7;
0x000125da cmp r7, r6 |
0x000125dc bgt 0x125ce |
| }
0x000125de ldrb r3, [r4, 9] | r3 = var_9h;
0x000125e0 cmp r3, 0x11 |
| if (r3 != 0x11) {
0x000125e2 bne 0x125ce | goto label_0;
| }
0x000125e4 ldrb r3, [r4] | r3 = *(r4);
0x000125e6 cmp r3, 0x45 |
| if (r3 != 0x45) {
0x000125e8 bne 0x125ce | goto label_0;
| }
0x000125ea ldr r3, [pc, 0xf4] | r3 = *(0x126e2);
0x000125ec ldrh r2, [r4, 0x16] | r2 = var_16h;
0x000125ee ldr.w r3, [sb, r3] | r3 = *((sb + r3));
0x000125f2 ldrh.w r3, [r3, 0x206] | r3 = *((r3 + 0x206));
0x000125f6 rev16 r3, r3 | __asm ("rev16 r3, r3");
0x000125f8 uxth r3, r3 | r3 = (int16_t) r3;
0x000125fa cmp r2, r3 |
| if (r2 != r3) {
0x000125fc bne 0x125ce | goto label_0;
| }
0x000125fe ldrh r3, [r4, 0x18] | r3 = var_18h_2;
0x00012600 sub.w r2, r7, 0x14 | r2 = r7 - 0x14;
0x00012604 uxth r2, r2 | r2 = (int16_t) r2;
0x00012606 rev16 r3, r3 | __asm ("rev16 r3, r3");
0x00012608 uxth r3, r3 | r3 = (int16_t) r3;
0x0001260a cmp r3, r2 |
| if (r3 != r2) {
0x0001260c bne 0x125ce | goto label_0;
| }
0x0001260e ldrh r6, [r4, 0xa] | r6 = var_ah;
0x00012610 movs r3, 0 | r3 = 0;
0x00012612 movs r1, 0x14 | r1 = 0x14;
0x00012614 mov r0, r4 | r0 = r4;
0x00012616 strh r3, [r4, 0xa] | var_ah = r3;
0x00012618 bl 0x4021e | r0 = fcn_0004021e (r0, r1);
0x0001261c cmp r0, r6 |
| if (r0 != r6) {
0x0001261e bne 0x125ce | goto label_0;
| }
0x00012620 ldrd r3, r2, [r5, 0x10] | __asm ("ldrd r3, r2, [var_10h]");
0x00012624 cmp r2, 0xb |
| if (r2 < 0xb) {
0x00012626 bls 0x12684 | goto label_3;
| }
0x00012628 adds r5, r3, r2 | r5 = r3 + r2;
0x0001262a movw r6, 0x107 | r6 = 0x107;
| if (r3 == 0) {
0x0001262e cbz r3, 0x12684 | goto label_3;
| }
| label_4:
0x00012630 ldr r2, [r3, 4] | r2 = *((r3 + 4));
0x00012632 cmp r2, r6 |
| if (r2 != r6) {
0x00012634 bne 0x1267e | goto label_6;
| }
0x00012636 ldr r2, [r3, 8] | r2 = *((r3 + 8));
0x00012638 cmp r2, 8 |
| if (r2 != 8) {
0x0001263a bne 0x1267e | goto label_6;
| }
0x0001263c ldr r2, [r3, 0xc] | r2 = *((r3 + 0xc));
0x0001263e lsls r2, r2, 0x1c | r2 <<= 0x1c;
| if (r2 >= r2) {
0x00012640 bpl 0x1267e | goto label_6;
| }
| label_1:
0x00012642 ldr.w r2, [r4, 0x108] | r2 = var_108h;
0x00012646 movw r3, 0x8263 |
0x0001264a movt r3, 0x6353 | r3 = 0x63538263;
0x0001264e cmp r2, r3 |
| if (r2 != r3) {
0x00012650 bne 0x125ce | goto label_0;
| }
0x00012652 sub.w r6, r7, 0x1c | r6 = r7 - 0x1c;
0x00012656 add r1, sp, 0x40 | r1 += var_40h;
0x00012658 mov r2, r6 | r2 = r6;
0x0001265a mov r0, r8 | r0 = r8;
0x0001265c blx 0x3b30 | mmap64 ()
| label_2:
0x00012660 ldr r2, [pc, 0x80] |
0x00012662 ldr r3, [pc, 0x70] | r3 = *(0x126d6);
0x00012664 add r2, pc | r2 = 0x24d4c;
0x00012666 ldr r3, [r2, r3] | r3 = *(0x24d4c);
0x00012668 ldr r2, [r3] | r2 = *(0x24d4c);
0x0001266a ldr r3, [sp, 0x2d4] | r3 = var_2d4h;
0x0001266c eors r2, r3 | r2 ^= r3;
0x0001266e mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00012672 bne 0x126aa | goto label_7;
| }
0x00012674 mov r0, r6 | r0 = r6;
0x00012676 add.w sp, sp, 0x2d8 |
0x0001267a pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_6:
0x0001267e ldr r2, [r3] | r2 = *(r3);
0x00012680 cmp r2, 0xb |
| if (r2 > 0xb) {
0x00012682 bhi 0x126ae | goto label_8;
| }
| label_3:
0x00012684 ldrh r5, [r4, 0x1a] | r5 = var_1ah;
0x00012686 movs r3, 0 | r3 = 0;
0x00012688 ldrh r2, [r4, 0x18] | r2 = var_18h_2;
0x0001268a str r3, [r4] | *(r4) = r3;
0x0001268c str r3, [r4, 4] | var_4h_2 = r3;
0x0001268e strh r2, [r4, 2] | var_2h = r2;
0x00012690 strb r3, [r4, 8] | var_8h_3 = r3;
0x00012692 strh r3, [r4, 0x1a] | var_1ah = r3;
0x00012694 cmp r5, 0 |
| if (r5 == 0) {
0x00012696 beq 0x12642 | goto label_1;
| }
0x00012698 mov r1, r7 | r1 = r7;
0x0001269a mov r0, r4 | r0 = r4;
0x0001269c bl 0x4021e | r0 = fcn_0004021e (r0, r1);
0x000126a0 cmp r0, r5 |
| if (r0 == r5) {
0x000126a2 beq 0x12642 | goto label_1;
| }
0x000126a4 mvn r6, 1 | r6 = ~1;
0x000126a8 b 0x12660 | goto label_2;
| label_7:
0x000126aa blx 0x3c40 | fcn_00003c40 ();
| label_8:
0x000126ae rsbs r1, r2, 0 | r1 = r2 - ;
0x000126b0 subs r0, r5, r3 | r0 = r5 - r3;
0x000126b2 and r1, r1, 3 | r1 &= 3;
0x000126b6 adds r1, 0xc | r1 += 0xc;
0x000126b8 cmp r1, r0 |
| if (r1 > r0) {
0x000126ba bhi 0x12684 | goto label_3;
| }
0x000126bc subs r0, r0, r1 | r0 -= r1;
0x000126be cmp r2, r0 |
| if (r2 > r0) {
0x000126c0 bhi 0x12684 | goto label_3;
| }
0x000126c2 adds r2, 3 | r2 += 3;
0x000126c4 bic r2, r2, 3 | r2 = BIT_MASK (r2, 3);
0x000126c8 add r3, r2 | r3 += r2;
0x000126ca cmp r3, 0 |
| if (r3 != 0) {
0x000126cc bne 0x12630 | goto label_4;
| }
0x000126ce b 0x12684 | goto label_3;
| }
r2dec has crashed (info: /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x12924).
Please report the bug at https://github.com/radareorg/r2dec-js/issues
Use the option '--issue' or the command 'pddi' to generate
the needed data for the issue.
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x13aa8 */
| #include <stdint.h>
|
; (fcn) fcn.00013aa8 () | void fcn_00013aa8 (int16_t arg_2d4h, int16_t arg_2d8h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_8h;
| int32_t var_10h_3;
| int32_t var_10h_4;
| int16_t var_18h;
| int16_t var_1ch;
| int32_t var_0h;
| int32_t var_8h_2;
| int32_t var_8h_3;
| int32_t var_10h;
| int32_t var_10h_2;
| int32_t var_18h_2;
| int16_t var_38h;
| int16_t var_2ach;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00013aa8 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00013aac mov r6, r2 | r6 = r2;
0x00013aae ldr r2, [pc, 0x14c] |
0x00013ab0 mov r7, r3 | r7 = r3;
0x00013ab2 sub.w sp, sp, 0x2b0 |
0x00013ab6 mov r4, r0 | r4 = r0;
0x00013ab8 ldr r3, [pc, 0x144] | r3 = *(0x13c00);
0x00013aba mov r8, r1 | r8 = r1;
0x00013abc add r2, pc | r2 = 0x276be;
0x00013abe movs r1, 2 | r1 = 2;
0x00013ac0 movs r0, 0x11 | r0 = 0x11;
0x00013ac2 ldr.w sb, [sp, 0x2d4] | sb = *(arg_2d4h);
0x00013ac6 ldr r3, [r2, r3] |
0x00013ac8 movs r2, 8 | r2 = 8;
0x00013aca ldr r3, [r3] | r3 = *(0x276be);
0x00013acc str r3, [sp, 0x2ac] | var_2ach = r3;
0x00013ace mov.w r3, 0 | r3 = 0;
0x00013ad2 blx 0x44e4 | r0 = isatty (r0);
0x00013ad6 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 < r0) {
0x00013ad8 bge 0x13b08 |
0x00013ada ldr r0, [pc, 0x128] |
0x00013adc mov.w r4, -1 | r4 = -1;
0x00013ae0 add r0, pc | r0 = 0x276ea;
| }
0x00013b08 mov.w sl, 0 | sl = 0;
0x00013b0c mov r1, r4 | r1 = r4;
0x00013b0e mov.w r2, 0x274 | r2 = 0x274;
0x00013b12 add r4, sp, 0x1c | r4 += var_1ch;
0x00013b14 add r0, sp, 0x38 | r0 += var_38h;
0x00013b16 strd sl, sl, [r4] | __asm ("strd sl, sl, [r4]");
0x00013b1a strd sl, sl, [r4, 8] | __asm ("strd sl, sl, [var_8h_2]");
0x00013b1e strd sl, sl, [r4, 0x10] | __asm ("strd sl, sl, [var_10h]");
0x00013b22 strd sl, sl, [sp, 0x10] | __asm ("strd sl, sl, [var_10h_3]");
0x00013b26 str.w sl, [sp, 0x18] | __asm ("str.w sl, [var_18h]");
0x00013b2a str.w sl, [r4, 0x18] | __asm ("str.w sl, [var_18h_2]");
0x00013b2e blx 0x3b30 | mmap64 ()
0x00013b32 ldr r3, [sp, 0x2d8] | r3 = *(arg_2d8h);
0x00013b34 ldr.w r0, [sb] | r0 = *(sb);
0x00013b38 ldrh.w r2, [sb, 4] | r2 = *((sb + 4));
0x00013b3c add.w sb, sp, 8 | sb += var_8h;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x142f8 */
| #include <stdint.h>
|
; (fcn) fcn.000142f8 () | void fcn_000142f8 (int16_t arg1, int16_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x000142f8 invalid |
0x000142fc lsls r0, r6, 0x13 | r0 = r6 << 0x13;
0x000142fe mov r5, r1 | r5 = r1;
0x00014300 mov r0, r4 | r0 = r4;
0x00014302 bl 0x3e02a | fcn_0003e02a (r0);
0x00014306 ldrb r2, [r5, 1] | r2 = *((r5 + 1));
0x00014308 adds r2, 2 | r2 += 2;
0x0001430a adds r6, r0, r2 | r6 = r0 + r2;
0x0001430c adds r3, r6, 1 | r3 = r6 + 1;
0x0001430e cmp.w r3, 0x134 |
| if (r3 > 0x134) {
0x00014312 blo 0x14322 |
0x00014314 ldr r0, [pc, 0x18] |
0x00014316 ldrb r1, [r5] | r1 = *(r5);
0x00014318 pop.w {r4, r5, r6, lr} |
0x0001431c add r0, pc | r0 = 0x28650;
0x0001431e b.w 0x8a74 | void (*0x8a74)() ();
| }
0x00014322 mov r1, r5 | r1 = r5;
0x00014324 add r0, r4 | r0 += r4;
0x00014326 blx 0x3b30 | mmap64 ()
0x0001432a movs r3, 0xff | r3 = 0xff;
0x0001432c strb r3, [r4, r6] | *((r4 + r6)) = r3;
0x0001432e pop {r4, r5, r6, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x143e0 */
| #include <stdint.h>
|
; (fcn) fcn.000143e0 () | void fcn_000143e0 (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_4h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x000143e0 mvnsmi lr, sp, lsr 18 | __asm ("mvnsmi lr, sp, lsr 18");
0x000143e4 sub sp, 8 |
0x000143e6 ldrb r5, [r1] | r5 = *(r1);
0x000143e8 mov r7, r1 | r7 = r1;
0x000143ea mov r8, r0 | r8 = r0;
0x000143ec mov r4, r2 | r4 = r2;
0x000143ee str r3, [sp, 4] | var_4h = r3;
0x000143f0 and r3, r5, 0xf | r3 = r5 & 0xf;
0x000143f4 cmp r3, 8 |
| if (r3 == 8) {
0x000143f6 beq 0x144ae | goto label_4;
| }
0x000143f8 movs r6, 0 | r6 = 0;
| label_3:
0x000143fa cmp r3, 0xb |
| if (r3 == 0xb) {
0x000143fc bne 0x1440a |
0x000143fe mov r0, r4 | r0 = r4;
0x00014400 add r1, sp, 4 | r1 += var_4h;
0x00014402 bl 0x3df20 | r0 = fcn_0003df20 (r0, r1);
0x00014406 mov r4, r0 | r4 = r0;
0x00014408 mov r6, r0 | r6 = r0;
| }
0x0001440a ldr.w r5, [r8] | r5 = *(r8);
0x0001440e ldrb r1, [r7, 1] | r1 = *((r7 + 1));
| if (r5 != 0) {
0x00014410 cbnz r5, 0x14436 | goto label_5;
| }
| do {
| label_1:
0x00014412 ldr r2, [sp, 4] | r2 = var_4h;
0x00014414 mov r0, r8 | r0 = r8;
0x00014416 bl 0x3e084 | fcn_0003e084 (r0, r1, r2);
0x0001441a ldr r2, [sp, 4] | r2 = var_4h;
0x0001441c mov r1, r4 | r1 = r4;
0x0001441e adds r0, 2 | r0 += 2;
0x00014420 blx 0x3b30 | mmap64 ()
| label_2:
0x00014424 mov r0, r6 | r0 = r6;
0x00014426 blx 0x3acc | fcn_00003acc ();
0x0001442a add sp, 8 |
0x0001442c pop.w {r4, r5, r6, r7, r8, pc} |
| label_0:
0x00014430 ldr r5, [r5, 4] | r5 = *((r5 + 4));
0x00014432 cmp r5, 0 |
0x00014434 beq 0x14412 |
| } while (r5 == 0);
| label_5:
0x00014436 ldr r0, [r5] | r0 = *(r5);
0x00014438 ldrb r3, [r0] | r3 = *(r0);
0x0001443a cmp r1, r3 |
| if (r1 > r3) {
0x0001443c bhi 0x14430 | goto label_0;
| }
| if (r1 != r3) {
0x0001443e bne 0x14412 | goto label_1;
| }
0x00014440 ldrb r3, [r7] | r3 = *(r7);
0x00014442 and r2, r3, 0xf | r2 = r3 & 0xf;
0x00014446 cmp r2, 3 |
0x00014448 it eq |
| if (r2 == 3) {
0x0001444a cmpeq r1, 0xc | __asm ("cmpeq r1, 0xc");
| }
| if (r2 != 3) {
0x0001444c bne 0x14478 | goto label_6;
| }
0x0001444e ldr r1, [sp, 4] | r1 = var_4h;
0x00014450 cmp r1, 0xfe |
| if (r1 > 0xfe) {
0x00014452 bgt 0x14424 | goto label_2;
| }
0x00014454 adds r1, 2 | r1 += 2;
0x00014456 bl 0x934c | fcn_0000934c (r0);
0x0001445a ldr r2, [sp, 4] | r2 = var_4h;
0x0001445c mov r1, r4 | r1 = r4;
0x0001445e str r0, [r5] | *(r5) = r0;
0x00014460 adds r0, 2 | r0 += 2;
0x00014462 blx 0x3b30 | mmap64 ()
0x00014466 ldr r3, [r5] | r3 = *(r5);
0x00014468 mov r0, r6 | r0 = r6;
0x0001446a ldr r2, [sp, 4] | r2 = var_4h;
0x0001446c strb r2, [r3, 1] | *((r3 + 1)) = r2;
0x0001446e blx 0x3acc | fcn_00003acc ();
0x00014472 add sp, 8 |
0x00014474 pop.w {r4, r5, r6, r7, r8, pc} |
| label_6:
0x00014478 lsls r3, r3, 0x1a | r3 <<= 0x1a;
| if (r3 >= r3) {
0x0001447a bpl 0x14424 | goto label_2;
| }
0x0001447c ldrb r7, [r0, 1] | r7 = *((r0 + 1));
0x0001447e ldr r1, [sp, 4] | r1 = var_4h;
0x00014480 add r1, r7 | r1 += r7;
0x00014482 cmp r1, 0xfe |
| if (r1 > 0xfe) {
0x00014484 bhi 0x14424 | goto label_2;
| }
0x00014486 adds r1, 3 | r1 += 3;
0x00014488 bl 0x934c | fcn_0000934c (r0);
0x0001448c adds r3, r7, 2 | r3 = r7 + 2;
0x0001448e ldr r2, [sp, 4] | r2 = var_4h;
0x00014490 mov r1, r4 | r1 = r4;
0x00014492 str r0, [r5] | *(r5) = r0;
0x00014494 add r0, r3 | r0 += r3;
0x00014496 blx 0x3b30 | mmap64 ()
0x0001449a ldr r2, [sp, 4] | r2 = var_4h;
0x0001449c mov r0, r6 | r0 = r6;
0x0001449e ldr r3, [r5] | r3 = *(r5);
0x000144a0 add r7, r2 | r7 += r2;
0x000144a2 strb r7, [r3, 1] | *((r3 + 1)) = r7;
0x000144a4 blx 0x3acc | fcn_00003acc ();
0x000144a8 add sp, 8 |
0x000144aa pop.w {r4, r5, r6, r7, r8, pc} |
| label_4:
0x000144ae mov r0, r2 | r0 = r2;
0x000144b0 bl 0x9374 | fcn_00009374 (r0);
0x000144b4 movs r2, 0xff | r2 = 0xff;
0x000144b6 mov r1, r4 | r1 = r4;
0x000144b8 mov r6, r0 | r6 = r0;
0x000144ba bl 0x8fe0 | fcn_00008fe0 (r0, r1, r2);
0x000144be ldr r3, [pc, 0x20] |
0x000144c0 add r3, pc |
0x000144c2 ldr r3, [r3] |
0x000144c4 ldr r3, [r3] | r3 = *(0x289a6);
| if (r3 != 0) {
0x000144c6 cbz r3, 0x144d2 |
0x000144c8 ldr r0, [pc, 0x18] |
0x000144ca mov r1, r4 | r1 = r4;
0x000144cc add r0, pc | r0 = 0x289b4;
0x000144ce bl 0x8a40 | fcn_00008a40 ();
| }
0x000144d2 ldrb r3, [r7] | r3 = *(r7);
0x000144d4 subs r0, r0, r6 | r0 -= r6;
0x000144d6 mov r4, r6 | r4 = r6;
0x000144d8 str r0, [sp, 4] | var_4h = r0;
0x000144da and r3, r3, 0xf | r3 &= 0xf;
0x000144de b 0x143fa | goto label_3;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x154b4 */
| #include <stdint.h>
|
; (fcn) fcn.000154b4 () | void fcn_000154b4 () {
| int16_t var_4h;
| int16_t var_8h;
| int32_t var_8h_2;
0x000154b4 ldr r0, [pc, 0x10c] |
0x000154b6 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000154ba sub sp, 0x14 |
0x000154bc add r0, pc | r0 = 0x2aa84;
0x000154be bl 0x3b680 | fcn_0003b680 (r0);
0x000154c2 ldr r3, [pc, 0x104] |
0x000154c4 movs r2, 0x50 | r2 = 0x50;
0x000154c6 mov r5, r0 | r5 = r0;
0x000154c8 add r3, pc | r3 = 0x2aa96;
0x000154ca ldr r4, [r3] | r4 = *(0x2aa96);
0x000154cc add.w r6, r4, 0x68 | r6 = r4 + 0x68;
0x000154d0 add.w r0, r4, 0xb8 | r0 = r4 + 0xb8;
0x000154d4 mov r1, r6 | r1 = r6;
0x000154d6 blx 0x3b30 | mmap64 ()
0x000154da mov r1, r6 | r1 = r6;
0x000154dc mov r0, r5 | r0 = r5;
0x000154de bl 0x153e0 | r0 = fcn_000153e0 (r0, r1);
0x000154e2 cmp r0, 3 |
| if (r0 <= 3) {
0x000154e4 bgt 0x154f2 |
0x000154e6 ldr r1, [pc, 0xe4] |
0x000154e8 ldr r0, [pc, 0xe4] |
0x000154ea add r1, pc | r1 = 0x2aabc;
0x000154ec add r0, pc | r0 = 0x2aac0;
0x000154ee bl 0x8a40 | fcn_00008a40 ();
| }
0x000154f2 mov r0, r5 | r0 = r5;
0x000154f4 movs r5, 0 | r5 = 0;
0x000154f6 blx 0x42c8 | uflow ();
0x000154fa ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x000154fc str.w r5, [r4, 0x108] | __asm ("str.w r5, aav.0x000000ff");
0x00015500 lsls r0, r0, 3 | r0 <<= 3;
0x00015502 bl 0x9324 | fcn_00009324 (r0);
0x00015506 ldr.w r8, [r4, 4] | r8 = *((r4 + 4));
0x0001550a mov r6, r0 | r6 = r0;
0x0001550c cmp r8, r5 |
0x0001550e it le |
| if (r8 > r5) {
0x00015510 ldrle fp, [r4, 0x5c] | fp = *((r4 + 0x5c));
| }
| if (r8 <= r5) {
0x00015514 ble 0x15586 | goto label_3;
| }
0x00015516 ldrd fp, r7, [r4, 0x5c] | __asm ("ldrd fp, r7, [r4, 0x5c]");
0x0001551a mov sb, r5 | sb = r5;
0x0001551c ldr r2, [r4] | r2 = *(r4);
0x0001551e add.w sl, r0, 4 | sl = r0 + 4;
0x00015522 str.w r8, [sp, 4] | __asm ("str.w r8, [var_4h]");
0x00015526 mov r8, r4 | r8 = r4;
0x00015528 mov r4, r7 | r4 = r7;
0x0001552a mov r7, r5 | r7 = r5;
0x0001552c mov r5, r2 | r5 = r2;
| do {
| label_1:
0x0001552e ldr r2, [r5, 0xc] | r2 = *((r5 + 0xc));
0x00015530 movs r1, 0 | r1 = 0;
0x00015532 ldr r3, [r5, 4] | r3 = *((r5 + 4));
0x00015534 str.w r3, [r6, sb, lsl 3] | __asm ("str.w r3, [r6, sb, lsl 3]");
0x00015538 str.w r2, [sl, sb, lsl 3] | __asm ("str.w r2, [sl, sb, lsl 3]");
0x0001553c str r1, [r5, 8] | *((r5 + 8)) = r1;
| if (r4 != 0) {
0x0001553e cbz r4, 0x15578 |
0x00015540 mov r0, sl | r0 = sl;
0x00015542 mov r1, r7 | r1 = r7;
0x00015544 mov sl, r8 | sl = r8;
0x00015546 mov r8, r6 | r8 = r6;
0x00015548 mov r6, r3 | r6 = r3;
0x0001554a mov r3, r5 | r3 = r5;
0x0001554c mov r5, r2 | r5 = r2;
0x0001554e mov r2, r0 | r2 = r0;
| label_0:
0x00015550 add.w r0, fp, r1, lsl 3 | r0 = fp + (r1 << 3);
0x00015554 ldr r0, [r0, 4] | r0 = *((r0 + 4));
0x00015556 cmp r0, r5 |
| if (r0 != r5) {
0x00015558 bne 0x15598 | goto label_4;
| }
0x0001555a mov r5, r3 | r5 = r3;
0x0001555c mov r3, r6 | r3 = r6;
0x0001555e mov r6, r8 | r6 = r8;
0x00015560 mov r8, sl | r8 = sl;
0x00015562 mov sl, r2 | sl = r2;
0x00015564 ldr.w r2, [fp, r1, lsl 3] | offset_0 = r1 << 3;
| r2 = *((fp + offset_0));
0x00015568 mov r7, r1 | r7 = r1;
0x0001556a subs r3, r3, r2 | r3 -= r2;
0x0001556c str r3, [r5, 8] | *((r5 + 8)) = r3;
0x0001556e ldr.w r2, [r8, 0x108] | r2 = *((r8 + 0x108));
0x00015572 add r2, r3 | r2 += r3;
0x00015574 str.w r2, [r8, 0x108] | __asm ("str.w r2, aav.0x000000ff");
| }
0x00015578 ldr r3, [sp, 4] | r3 = var_4h;
0x0001557a add.w sb, sb, 1 | sb++;
0x0001557e adds r5, 0x2c | r5 += 0x2c;
0x00015580 cmp sb, r3 |
0x00015582 bne 0x1552e |
| } while (sb != r3);
| label_2:
0x00015584 mov r4, r8 | r4 = r8;
| label_3:
0x00015586 mov r0, fp | r0 = fp;
0x00015588 blx 0x3acc | fcn_00003acc ();
0x0001558c ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x0001558e strd r6, r3, [r4, 0x5c] | __asm ("strd r6, r3, [r4, 0x5c]");
0x00015592 add sp, 0x14 |
0x00015594 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_4:
0x00015598 adds r0, r1, 1 | r0 = r1 + 1;
0x0001559a mov r1, r4 | r1 = r4;
0x0001559c strd r3, r2, [sp, 8] | __asm ("strd r3, r2, [var_8h]");
0x000155a0 bl 0x80dc | fcn_000080dc (r0, r1, r2);
0x000155a4 cmp r1, r7 |
0x000155a6 ldrd r3, r2, [sp, 8] | __asm ("ldrd r3, r2, [var_8h]");
| if (r1 != r7) {
0x000155aa bne 0x15550 | goto label_0;
| }
0x000155ac mov r5, r3 | r5 = r3;
0x000155ae ldr r3, [sp, 4] | r3 = var_4h;
0x000155b0 add.w sb, sb, 1 | sb++;
0x000155b4 mov r6, r8 | r6 = r8;
0x000155b6 adds r5, 0x2c | r5 += 0x2c;
0x000155b8 mov r8, sl | r8 = sl;
0x000155ba cmp sb, r3 |
0x000155bc mov sl, r2 | sl = r2;
| if (sb != r3) {
0x000155be bne 0x1552e | goto label_1;
| }
0x000155c0 b 0x15584 | goto label_2;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x17b1c */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.00017b1c () | void fcn_00017b1c (int16_t arg1) {
| r0 = arg1;
0x00017b1c ldr r2, [pc, 0x80] |
0x00017b1e push {r3, r4, r5, r6, r7, lr} |
0x00017b20 ldr r3, [pc, 0x80] | r3 = *(0x17ba4);
0x00017b22 add r2, pc | r2 = 0x2f6c6;
0x00017b24 ldr r1, [r2, r3] | r1 = *(0x2f6c6);
0x00017b26 ldr r5, [r1] | r5 = *(0x2f6c6);
0x00017b28 ldr r6, [r5, 0xc] | r6 = *(0x2f6d2);
0x00017b2a lsls r4, r6, 1 | r4 = r6 << 1;
0x00017b2c cmp r6, r4 |
| if (r6 >= r4) {
0x00017b2e bls 0x17b38 |
0x00017b30 ldr r0, [pc, 0x74] |
0x00017b32 add r0, pc | r0 = 0x2f6de;
0x00017b34 bl 0x174a0 | r0 = fcn_000174a0 ();
| }
0x00017b38 orr r3, r0, 0x80 | r3 = r0 | 0x80;
0x00017b3c adds r3, 7 | r3 += 7;
0x00017b3e bic r3, r3, 7 | r3 = BIT_MASK (r3, 7);
0x00017b42 cmp r4, r3 |
0x00017b44 it lo |
| if (r4 >= r3) {
0x00017b46 addlo r4, r4, r3 | r4 += r3;
| }
0x00017b48 ldrd r3, r7, [r5] | __asm ("ldrd r3, r7, [r5]");
0x00017b4a adds r7, 0 | r7 += 0;
0x00017b4c adds r0, r3, 4 | r0 = r3 + 4;
0x00017b4e cmp r7, r0 |
| if (r7 == r0) {
0x00017b50 bne 0x17b88 |
0x00017b52 add.w r0, r5, 0x10 | r0 = r5 + 0x10;
0x00017b56 cmp r3, r0 |
| if (r3 == r0) {
0x00017b58 beq 0x17b88 | goto label_0;
| }
0x00017b5a ldr r3, [pc, 0x50] | r3 = *(0x17bae);
0x00017b5c ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x00017b5e ldr r2, [r3] | r2 = *(0x17bae);
0x00017b60 ldr r3, [r2, 0x30] | r3 = *(0x17bde);
0x00017b62 adds r3, 1 | r3++;
0x00017b64 str r3, [r2, 0x30] | *((r2 + 0x30)) = r3;
0x00017b66 ldr r5, [r1] | r5 = *(r1);
0x00017b68 adds r1, r4, 4 | r1 = r4 + 4;
0x00017b6a ldr r0, [r5] | r0 = *(r5);
0x00017b6c ldr r6, [r0] | r6 = *(r0);
0x00017b6e bl 0x934c | r0 = fcn_0000934c (r0);
0x00017b72 adds r3, r0, 4 | r3 = r0 + 4;
0x00017b74 adds r2, r3, r4 | r2 = r3 + r4;
0x00017b76 str r6, [r0] | *(r0) = r6;
0x00017b78 str r0, [r5] | *(r5) = r0;
0x00017b7a str r3, [r5, 4] | *((r5 + 4)) = r3;
0x00017b7c strd r2, r4, [r5, 8] | __asm ("strd r2, r4, [r5, 8]");
0x00017b80 pop.w {r3, r4, r5, r6, r7, lr} |
0x00017b84 b.w 0x16830 | void (*0x16830)() ();
| }
| label_0:
0x00017b88 mov r0, r4 | r0 = r4;
0x00017b8a bl 0x17298 | fcn_00017298 (r0);
0x00017b8e mov r2, r6 | r2 = r6;
0x00017b90 mov r1, r7 | r1 = r7;
0x00017b92 blx 0x3b30 | mmap64 ()
0x00017b96 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x00017b98 str r0, [r5, 4] | *((r5 + 4)) = r0;
0x00017b9a add r3, r4 | r3 += r4;
0x00017b9c str r3, [r5, 0xc] | *((r5 + 0xc)) = r3;
0x00017b9e pop {r3, r4, r5, r6, r7, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x17bf8 */
| #include <stdint.h>
|
; (fcn) fcn.00017bf8 () | void fcn_00017bf8 (int16_t arg1) {
| r0 = arg1;
0x00017bf8 bmi 0x92a88c |
0x00017bfc push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00017c00 movs r7, 0x27 | r7 = 0x27;
0x00017c02 add r3, pc | r3 += pc;
0x00017c04 mov r8, r0 | r8 = r0;
0x00017c06 movs r6, 0x22 | r6 = 0x22;
0x00017c08 ldr r2, [r3, r2] | r2 = *((r3 + r2));
0x00017c0a ldr r5, [r2] | r5 = *(r2);
0x00017c0c ldr r4, [r5, 4] | r4 = *((r5 + 4));
| label_0:
0x00017c0e movs r1, 0x27 | r1 = 0x27;
0x00017c10 mov r0, r8 | r0 = r8;
0x00017c12 blx 0x3abc | fcn_00003abc ();
0x00017c16 mov r1, r4 | r1 = r4;
0x00017c18 sub.w r4, r0, r8 | r4 = r0 - r8;
0x00017c1c mov sb, r0 | sb = r0;
0x00017c1e adds r0, r4, 3 | r0 = r4 + 3;
0x00017c20 bl 0x17bd4 | fcn_00017bd4 (r0);
0x00017c24 mov r2, r4 | r2 = r4;
0x00017c26 mov r1, r8 | r1 = r8;
0x00017c28 strb r7, [r0], 1 | *(r0) = r7;
| r0++;
0x00017c2c blx 0x3b30 | mmap64 ()
0x00017c30 strb r7, [r0, r4] | *((r0 + r4)) = r7;
0x00017c32 add r4, r0 | r4 += r0;
0x00017c34 ldrb.w r3, [sb] | r3 = *(sb);
0x00017c38 adds r4, 1 | r4++;
0x00017c3a cmp r3, 0x27 |
| if (r3 != 0x27) {
0x00017c3c bne 0x17c7e | goto label_1;
| }
0x00017c3e mov r8, sb | r8 = sb;
0x00017c40 mov.w sb, 0 | sb = 0;
| do {
0x00017c44 ldrb r3, [r8, 1]! | r3 = *((r8 += 1));
0x00017c48 mov sl, sb | sl = sb;
0x00017c4a add.w sb, sb, 1 | sb++;
0x00017c4e cmp r3, 0x27 |
0x00017c50 beq 0x17c44 |
| } while (r3 == 0x27);
0x00017c52 mov r1, r4 | r1 = r4;
0x00017c54 add.w r0, sl, 4 | r0 = sl + 4;
0x00017c58 bl 0x17bd4 | fcn_00017bd4 (r0);
0x00017c5c mvn.w r1, sl | r1 = ~sl;
0x00017c60 mov r2, sb | r2 = sb;
0x00017c62 add r1, r8 | r1 += r8;
0x00017c64 strb r6, [r0], 1 | *(r0) = r6;
| r0++;
0x00017c68 blx 0x3b30 | mmap64 ()
0x00017c6c strb.w r6, [r0, sb] | *((r0 + sb)) = r6;
0x00017c70 add.w r4, r0, sb | r4 = r0 + sb;
0x00017c74 ldrb.w r3, [r8] | r3 = *(r8);
0x00017c78 adds r4, 1 | r4++;
0x00017c7a cmp r3, 0 |
| if (r3 != 0) {
0x00017c7c bne 0x17c0e | goto label_0;
| }
| label_1:
0x00017c7e movs r3, 0 | r3 = 0;
0x00017c80 strb r3, [r4] | *(r4) = r3;
0x00017c82 ldr r0, [r5, 4] | r0 = *((r5 + 4));
0x00017c84 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
0x00017c86 strh r0, [r6, 0x3e] | *((r6 + 0x3e)) = r0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x18264 */
| #include <stdint.h>
|
; (fcn) fcn.00018264 () | void fcn_00018264 (int16_t arg1, int16_t arg2, int16_t arg3) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x00018264 push.w {r3, r4, r5, r6, r7, r8, sb, lr} |
0x00018268 mov r4, r1 | r4 = r1;
0x0001826a mov r5, r0 | r5 = r0;
0x0001826c mov r6, r2 | r6 = r2;
0x0001826e bl 0x3fe9a | fcn_0003fe9a (r0);
0x00018272 movs r1, 0x3d | r1 = 0x3d;
0x00018274 mov r8, r0 | r8 = r0;
0x00018276 blx 0x3abc | r0 = fcn_00003abc ();
0x0001827a subs r7, r0, r5 | r7 = r0 - r5;
0x0001827c ldr.w sb, [pc, 0x7c] |
0x00018280 ite eq |
| if (r7 != r0) {
0x00018282 moveq r3, 1 | r3 = 1;
| }
| if (r7 == r0) {
0x00018284 movne r3, 0 | r3 = 0;
| }
0x00018286 cmp r8, r0 |
0x00018288 it ne |
| if (r8 == r0) {
0x0001828a orrne r3, r3, 1 | r3 |= 1;
| }
0x0001828e add sb, pc | sb = 0x3058e;
| if (r3 != 0) {
0x00018290 cbz r3, 0x1829e |
0x00018292 ldr r0, [pc, 0x6c] |
0x00018294 mov r2, r5 | r2 = r5;
0x00018296 mov r1, r7 | r1 = r7;
0x00018298 add r0, pc | r0 = 0x3059e;
0x0001829a bl 0x174a0 | fcn_000174a0 ();
| }
| if (r4 != 0) {
0x0001829e cbnz r4, 0x182f0 | goto label_0;
| }
0x000182a0 orr r6, r6, 0x20 | r6 |= 0x20;
0x000182a4 mov r8, r4 | r8 = r4;
| do {
0x000182a6 ldr r3, [pc, 0x5c] | r3 = *(0x18306);
0x000182a8 ldr.w r3, [sb, r3] | r3 = *((sb + r3));
0x000182ac ldr r2, [r3] | r2 = *(0x18306);
0x000182ae ldr r3, [r2, 0x30] | r3 = *(0x18336);
0x000182b0 adds r3, 1 | r3++;
0x000182b2 str r3, [r2, 0x30] | *((r2 + 0x30)) = r3;
0x000182b4 adds r0, r7, 2 | r0 = r7 + 2;
0x000182b6 add r0, r8 | r0 += r8;
0x000182b8 bl 0x3d706 | fcn_0003d706 (r0);
0x000182bc mov r1, r5 | r1 = r5;
0x000182be mov r2, r7 | r2 = r7;
0x000182c0 mov r5, r0 | r5 = r0;
0x000182c2 blx 0x3b30 | r0 = mmap64 ()
0x000182c6 mov r3, r0 | r3 = r0;
0x000182c8 add r0, r7 | r0 += r7;
| if (r4 != 0) {
0x000182ca cbz r4, 0x182da |
0x000182cc mov r1, r4 | r1 = r4;
0x000182ce movs r4, 0x3d | r4 = 0x3d;
0x000182d0 mov r2, r8 | r2 = r8;
0x000182d2 adds r0, 1 | r0++;
0x000182d4 strb r4, [r3, r7] | *((r3 + r7)) = r4;
0x000182d6 blx 0x3b30 | mmap64 ()
| }
0x000182da orr r1, r6, 0x100 | r1 = r6 | 0x100;
0x000182de mov r0, r5 | r0 = r5;
0x000182e0 bl 0x18154 | r0 = fcn_00018154 (r0, r1);
0x000182e4 mov r4, r0 | r4 = r0;
0x000182e6 bl 0x16830 | fcn_00016830 ();
0x000182ea mov r0, r4 | r0 = r4;
0x000182ec pop.w {r3, r4, r5, r6, r7, r8, sb, pc} |
| label_0:
0x000182f0 mov r0, r4 | r0 = r4;
0x000182f2 blx 0x4074 | r0 = fcn_00004074 ();
0x000182f6 mov r8, r0 | r8 = r0;
0x000182f8 b 0x182a6 |
| } while (1);
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x191f0 */
| #include <stdint.h>
|
; (fcn) fcn.000191f0 () | void fcn_000191f0 (int16_t arg1, int16_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x000191f0 push.w {r3, r4, r5, r6, r7, r8, sb, lr} |
0x000191f4 mov r7, r1 | r7 = r1;
0x000191f6 ldr r1, [pc, 0x12c] |
0x000191f8 mov r4, r0 | r4 = r0;
0x000191fa ldr.w sb, [pc, 0x12c] |
0x000191fe add r1, pc | r1 = 0x32528;
0x00019200 blx 0x44a4 | fcn_000044a4 ();
0x00019204 add sb, pc | sb = 0x32532;
0x00019206 cmp r0, 0 |
| if (r0 == 0) {
0x00019208 beq 0x192b0 | goto label_3;
| }
0x0001920a lsls r2, r7, 0x1f | r2 = r7 << 0x1f;
0x0001920c mov r5, r0 | r5 = r0;
0x0001920e and r6, r7, 8 | r6 = r7 & 8;
0x00019212 itt pl |
| if (r2 < r7) {
0x00019214 movpl r3, r4 | r3 = r4;
| }
| if (r2 < r7) {
0x00019216 movpl r2, r0 | r2 = r0;
| }
| if (r2 < r7) {
0x00019218 bpl 0x1926a |
0x0001921a sub.w r8, r5, r4 | r8 = r5 - r4;
0x0001921e blx 0x4074 | fcn_00004074 ();
0x00019222 add.w r3, r8, 1 | r3 = r8 + 1;
0x00019226 add r0, r3 | r0 += r3;
0x00019228 cmp r6, 0 |
| if (r6 == 0) {
0x0001922a beq 0x192c0 | goto label_4;
| }
0x0001922c ldr r3, [pc, 0xfc] | r3 = *(0x1932c);
0x0001922e ldr.w r3, [sb, r3] | r3 = *((sb + r3));
0x00019232 ldr.w sb, [r3] | sb = *(0x1932c);
0x00019234 str r0, [sp] | *(sp) = r0;
0x00019236 ldr r3, [pc, 0xf8] |
0x00019238 add r3, pc | r3 = 0x3256e;
0x0001923a ldr r1, [r3] | r1 = *(0x3256e);
0x0001923c ldr.w r3, [sb, 4] | r3 = *(0x19330);
0x00019240 subs r5, r4, r3 | r5 = r4 - r3;
0x00019242 bl 0x17bd4 | fcn_00017bd4 (r0);
0x00019246 ldr.w r4, [sb, 4] | r4 = *(0x19330);
0x00019248 ands r4, r0 | r4 &= r0;
0x0001924a mov r3, r0 | r3 = r0;
0x0001924c mov r2, r3 | r2 = r3;
0x0001924e add r4, r5 | r4 += r5;
0x00019250 add.w r5, r4, r8 | r5 = r4 + r8;
0x00019254 cmp.w r8, 0 |
0x00019256 lsrs r0, r0, 0x1c | r0 >>= 0x1c;
| if (r0 == r0) {
0x00019258 beq 0x1926a | goto label_0;
| }
| label_1:
0x0001925a mov r2, r8 | r2 = r8;
0x0001925c mov r0, r3 | r0 = r3;
0x0001925e mov r1, r4 | r1 = r4;
0x00019260 blx 0x3b30 | r0 = mmap64 ()
0x00019264 mov r3, r0 | r3 = r0;
0x00019266 add.w r2, r0, r8 | r2 = r0 + r8;
| }
| label_0:
0x0001926a ldrb r0, [r5] | r0 = *(r5);
| if (r0 == 0) {
0x0001926c cbz r0, 0x192a8 | goto label_5;
| }
0x0001926e and r1, r7, 2 | r1 = r7 & 2;
0x00019272 mov.w ip, 0x5c |
0x00019276 mov r4, r1 | r4 = r1;
| do {
0x00019278 cmp r0, 0x88 |
0x0001927a add.w r7, r5, 1 | r7 = r5 + 1;
0x0001927e itt eq |
| if (r0 != 0x88) {
0x00019280 moveq r5, r7 | r5 = r7;
| }
| if (r0 != 0x88) {
0x00019282 moveq r4, r1 | r4 = r1;
| }
| if (r0 != 0x88) {
0x00019284 beq 0x192a2 |
0x00019286 cmp r0, 0x5c |
| if (r0 == 0x5c) {
0x00019288 bne 0x19292 |
0x0001928a ldrb r0, [r5] | r0 = *(r5);
0x0001928c mov r7, r5 | r7 = r5;
0x0001928e movs r4, 0 | r4 = 0;
0x00019290 b 0x1929c |
| } else {
0x00019292 cmp r0, 0x81 |
| if (r0 == 0x81) {
0x00019294 beq 0x192e4 | goto label_6;
| }
0x00019296 ldrb r0, [r5] | r0 = *(r5);
0x00019298 mov r7, r5 | r7 = r5;
0x0001929a mov r4, r1 | r4 = r1;
| }
| label_2:
0x0001929c adds r5, r7, 1 | r5 = r7 + 1;
0x0001929e strb r0, [r2], 1 | *(r2) = r0;
| r2++;
| }
0x000192a2 ldrb r0, [r5] | r0 = *(r5);
0x000192a4 cmp r0, 0 |
0x000192a6 bne 0x19278 |
| } while (r0 != 0);
| label_5:
0x000192a8 movs r1, 0 | r1 = 0;
0x000192aa strb r1, [r2] | *(r2) = r1;
0x000192ac cbnz r6, 0x192b6 |
| while (1) {
0x000192ae mov r4, r3 | r4 = r3;
| label_3:
0x000192b0 mov r0, r4 | r0 = r4;
0x000192b2 pop.w {r3, r4, r5, r6, r7, r8, sb, pc} |
0x000192b6 ldr r1, [pc, 0x7c] |
0x000192b8 adds r2, 1 | r2++;
0x000192ba add r1, pc | r1 = 0x325f4;
0x000192bc str r2, [r1] | *(r1) = r2;
0x000192be b 0x192ae |
| }
| label_4:
0x000192c0 lsls r3, r7, 0x1b | r3 = r7 << 0x1b;
| if (r3 >= r7) {
0x000192c2 bpl 0x192d4 | goto label_7;
| }
0x000192c4 bl 0x9324 | r0 = fcn_00009324 (r0);
0x000192c8 mov r3, r0 | r3 = r0;
0x000192ca mov r2, r3 | r2 = r3;
0x000192cc cmp.w r8, 0 |
| if (r8 == 0) {
0x000192d0 beq 0x1926a | goto label_0;
| }
0x000192d2 b 0x1925a | goto label_1;
| label_7:
0x000192d4 bl 0x17298 | r0 = fcn_00017298 (r0);
0x000192d8 mov r3, r0 | r3 = r0;
0x000192da mov r2, r3 | r2 = r3;
0x000192dc cmp.w r8, 0 |
| if (r8 == 0) {
0x000192e0 beq 0x1926a | goto label_0;
| }
0x000192e2 b 0x1925a | goto label_1;
| label_6:
0x000192e4 ldrb r0, [r5, 1] | r0 = *((r5 + 1));
| if (r4 != 0) {
0x000192e6 cbz r4, 0x1931e |
0x000192e8 cmp r0, 0x3f |
0x000192ea it ne |
| if (r0 != 0x3f) {
0x000192ec cmpne r0, 0x2a | __asm ("cmpne r0, 0x2a");
| }
0x000192ee sub.w lr, r0, 0x5b | lr = r0 - 0x5b;
0x000192f2 ite eq |
| if (r0 != 0x3f) {
0x000192f4 moveq r4, 1 | r4 = 1;
| }
| if (r0 == 0x3f) {
0x000192f6 movne r4, 0 | r4 = 0;
| }
0x000192f8 cmp r0, 0x2d |
0x000192fa it eq |
| if (r0 != 0x2d) {
0x000192fc orreq r4, r4, 1 | r4 |= 1;
| }
0x00019300 cmp r0, 0x21 |
0x00019302 it eq |
| if (r0 != 0x21) {
0x00019304 orreq r4, r4, 1 | r4 |= 1;
| }
0x00019308 cmp.w lr, 3 |
0x0001930c it ls |
| if (lr > 3) {
0x0001930e orrls r4, r4, 1 | r4 |= 1;
| }
| if (r4 == 0) {
0x00019312 cbz r4, 0x1931e | goto label_8;
| }
0x00019314 strb ip, [r2], 1 | *(r2) = ip;
| r2++;
0x00019318 mov r4, r1 | r4 = r1;
0x0001931a ldrb r0, [r5, 1] | r0 = *((r5 + 1));
0x0001931c b 0x1929c | goto label_2;
| }
| label_8:
0x0001931e mov r4, r1 | r4 = r1;
0x00019320 b 0x1929c | goto label_2;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x1cb58 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.0001cb58 () | void fcn_0001cb58 (int16_t arg1, char * arg2) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_20h;
| int16_t var_24h;
| int16_t var_bch;
| r0 = arg1;
| r1 = arg2;
0x0001cb58 tst.w r1, 4 |
0x0001cb5c push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001cb60 ubfx r2, r1, 5, 1 | r2 = (r1 >> 5) & ((1 << 1) - 1);
0x0001cb64 ite eq |
| if ((r1 & 4) != 0) {
0x0001cb66 moveq r4, 1 | r4 = 1;
| }
| if ((r1 & 4) == 0) {
0x0001cb68 movne r4, 0 | r4 = 0;
| }
0x0001cb6a sub sp, 0xc4 |
0x0001cb6c ldr.w r6, [pc, 0x4cc] |
0x0001cb70 add.w r2, r2, r4, lsl 1 | r2 += (r4 << 1);
0x0001cb74 ldr.w r5, [pc, 0x4c8] |
0x0001cb78 ldr.w r4, [pc, 0x4c8] | r4 = *(0x1d044);
0x0001cb7c ldr.w r3, [pc, 0x4c8] |
0x0001cb80 add r6, pc | r6 = 0x39bc0;
0x0001cb82 add r5, pc | r5 = 0x39bc6;
0x0001cb84 str r6, [sp, 0x14] | var_14h = r6;
0x0001cb86 ldr r4, [r5, r4] |
0x0001cb88 add r3, pc | r3 = 0x39bd4;
0x0001cb8a adds r3, r2, r3 | r3 = r2 + r3;
0x0001cb8c ldr r4, [r4] | r4 = *(0x39bc6);
0x0001cb8e str r4, [sp, 0xbc] | var_bch = r4;
0x0001cb90 mov.w r4, 0 | r4 = 0;
0x0001cb94 str r3, [sp, 8] | var_8h = r3;
0x0001cb96 ands r3, r1, 2 | r3 = r1 & 2;
0x0001cb9a mov r4, r0 | r4 = r0;
0x0001cb9c str r3, [sp] | *(sp) = r3;
| if (r3 != r1) {
0x0001cb9e bne.w 0x1d026 | goto label_10;
| }
0x0001cba2 ldr.w r3, [pc, 0x4a8] | r3 = *(0x1d04e);
0x0001cba6 mov fp, r1 |
0x0001cba8 ldr r2, [sp, 0x14] | r2 = var_14h;
0x0001cbaa and sb, r1, 0x140 | sb = r1 & 0x140;
0x0001cbae ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x0001cbb0 str r3, [sp, 0xc] | var_ch = r3;
| label_2:
0x0001cbb2 ldr.w r3, [pc, 0x49c] |
0x0001cbb6 add r3, pc |
0x0001cbb8 adds r3, 1 | r3++;
0x0001cbba str r3, [sp, 0x20] | var_20h = r3;
0x0001cbbc ldr r3, [sp, 0xc] | r3 = var_ch;
0x0001cbbe ldr r3, [r3] | r3 = *(0x39c0c);
0x0001cbc0 str r3, [sp, 4] | var_4h = r3;
0x0001cbc2 ldr.w r3, [pc, 0x490] |
0x0001cbc6 add r3, pc | r3 = 0x39c20;
0x0001cbc8 str r3, [sp, 0x24] | var_24h = r3;
0x0001cbca sub.w r3, sb, 0x40 | r3 = sb - 0x40;
0x0001cbce clz r3, r3 | r3 &= r3;
0x0001cbd2 lsrs r3, r3, 5 | r3 >>= 5;
0x0001cbd4 str r3, [sp, 0x18] | var_18h = r3;
0x0001cbd6 ldr.w r3, [pc, 0x480] |
0x0001cbda mov r8, r4 | r8 = r4;
0x0001cbdc ldr r2, [sp, 4] | r2 = var_4h;
0x0001cbde movs r5, 0 | r5 = 0;
0x0001cbe0 add r3, pc |
0x0001cbe2 ldr r3, [r3] | r3 = *(0x39c3e);
0x0001cbe4 ldr r2, [r2, 4] | r2 = *((r2 + 4));
0x0001cbe6 sub.w sl, r3, r2 | sl = r3 - r2;
0x0001cbea mov r3, sb | r3 = sb;
0x0001cbec mov sb, fp | sb = fp;
0x0001cbee mov fp, r3 |
| label_0:
0x0001cbf0 adds r0, r4, r5 | r0 = r4 + r5;
0x0001cbf2 ldr r1, [sp, 8] | r1 = var_8h;
0x0001cbf4 blx 0x3a04 | times ();
0x0001cbf6 vshl.s8 d4, d5, d6 | __asm ("vshl.s8 d4, d5, d6");
0x0001cbfa ldrb r7, [r4, r5] | r7 = *((r4 + r5));
0x0001cbfc mvns r6, r7 | r6 = ~r7;
0x0001cbfe and r2, r7, 0xfb | r2 = r7 & 0xfb;
0x0001cc02 ubfx r6, r6, 7, 1 | r6 = (r6 >> 7) & ((1 << 1) - 1);
0x0001cc06 cmp r2, 0x83 |
0x0001cc08 it eq |
| if (r2 != 0x83) {
0x0001cc0a orreq r6, r6, 1 | r6 |= 1;
| }
0x0001cc0e cmp r6, 0 |
| if (r6 == 0) {
0x0001cc10 beq 0x1ccb6 | goto label_11;
| }
0x0001cc12 adds r5, 1 | r5++;
0x0001cc14 add.w r6, r7, -1 | r6 = r7 + -1;
0x0001cc18 it eq |
| if (r5 != 1) {
0x0001cc1a moveq r3, 1 | r3 = 1;
| }
0x0001cc1c ubfx r6, r6, 7, 1 | r6 = (r6 >> 7) & ((1 << 1) - 1);
0x0001cc20 it eq |
| if (r5 != 1) {
0x0001cc22 streq r3, [sp, 0x10] | var_10h = r3;
| }
0x0001cc24 beq 0x1cc96 |
| while (r5 != 0) {
0x0001cc26 tst.w sb, 0x400 |
0x0001cc2a add.w r3, r5, 1 | r3 = r5 + 1;
0x0001cc2e str r3, [sp, 0x10] | var_10h = r3;
| if ((sb & 0x400) == 0) {
0x0001cc30 bne 0x1cc96 |
0x0001cc32 ldr r3, [sp, 0x24] | r3 = var_24h;
0x0001cc34 mov r0, r5 | r0 = r5;
0x0001cc36 ldr r1, [r3] | r1 = *(r3);
0x0001cc38 bl 0x17bd4 | fcn_00017bd4 (r0);
0x0001cc3c mov r2, r5 | r2 = r5;
0x0001cc3e mov r1, r4 | r1 = r4;
0x0001cc40 blx 0x3b30 | mmap64 ()
0x0001cc44 add r0, r5 | r0 += r5;
0x0001cc46 ldr r3, [sp, 4] | r3 = var_4h;
0x0001cc48 ldrb r2, [r0, -0x1] | r2 = *((r0 - 0x1));
0x0001cc4c subs r1, r6, 1 | r1 = r6 - 1;
0x0001cc4e tst.w sb, 0x40 |
0x0001cc52 and.w r2, r2, r1 | r2 &= r1;
0x0001cc56 strb r2, [r0, -0x1] | *((r0 - 0x1)) = r2;
0x0001cc5a it ne |
| if ((sb & 0x40) == 0) {
0x0001cc5c subne r2, r0, r6 | r2 = r0 - r6;
| }
0x0001cc5e ldr r1, [r3, 4] | r1 = *((r3 + 4));
0x0001cc60 it eq |
| if ((sb & 0x40) != 0) {
0x0001cc62 moveq r2, r0 | r2 = r0;
| }
0x0001cc64 ldr r3, [sp] | r3 = *(sp);
0x0001cc66 subs r0, r0, r1 | r0 -= r1;
0x0001cc68 subs r1, r0, r6 | r1 = r0 - r6;
0x0001cc6a ldr r0, [pc, 0x3f0] |
0x0001cc6c add r0, pc | r0 = 0x39cce;
0x0001cc6e str r2, [r0] | *(r0) = r2;
0x0001cc70 ldr r2, [sp, 0x18] | r2 = var_18h;
0x0001cc72 cmp r3, 0 |
0x0001cc74 ite ne |
| if (r3 == 0) {
0x0001cc76 movne r2, 0 | r2 = 0;
| }
| if (r3 != 0) {
0x0001cc78 andeq r2, r2, 1 | r2 &= 1;
| }
0x0001cc7c cmp sl, r1 |
0x0001cc7e ite ge |
| if (sl < r1) {
0x0001cc80 movge r2, 0 | r2 = 0;
| }
| if (sl >= r1) {
0x0001cc82 andlt r2, r2, 1 | r2 &= 1;
| }
| if (r2 != 0) {
0x0001cc86 cbz r2, 0x1cc94 |
0x0001cc88 mov r0, sl | r0 = sl;
0x0001cc8a movs r2, 0 | r2 = 0;
0x0001cc8c str r1, [sp, 0x1c] | var_1ch = r1;
0x0001cc8e bl 0x170f4 | fcn_000170f4 (r0, r1, r2);
0x0001cc92 ldr r1, [sp, 0x1c] | r1 = var_1ch;
| }
0x0001cc94 mov sl, r1 | sl = r1;
| }
| if (r6 == 0) {
0x0001cc96 cbz r6, 0x1cccc | goto label_12;
| }
0x0001cc98 ldr r2, [pc, 0x3c4] |
0x0001cc9a adds r0, r4, r5 | r0 = r4 + r5;
0x0001cc9c ldr r3, [pc, 0x3a4] | r3 = *(0x1d044);
0x0001cc9e add r2, pc | r2 = 0x39d02;
0x0001cca0 ldr r3, [r2, r3] | r3 = *(0x39d02);
0x0001cca2 ldr r2, [r3] | r2 = *(0x39d02);
0x0001cca4 ldr r3, [sp, 0xbc] | r3 = var_bch;
0x0001cca6 eors r2, r3 | r2 ^= r3;
0x0001cca8 mov.w r3, 0 | r3 = 0;
0x0001ccaa lsls r0, r0, 0xc | r0 <<= 0xc;
| if (r0 != r0) {
0x0001ccac bne.w 0x1d022 | goto label_13;
| }
0x0001ccb0 add sp, 0xc4 |
0x0001ccb2 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_11:
0x0001ccb6 cmp r5, 0 |
0x0001ccb8 bne 0x1cc26 |
| }
0x0001ccba cmp r7, 0x88 |
0x0001ccbc add.w r4, r4, 1 | r4++;
| if (r7 > 0x88) {
0x0001ccc0 bhi 0x1ccc8 | goto label_14;
| }
0x0001ccc2 cmp r7, 0x80 |
| if (r7 != 0x80) {
0x0001ccc4 bne 0x1ccda | goto label_15;
| }
| do {
| label_1:
0x0001ccc6 invalid |
| label_14:
0x0001ccc8 mov r8, r4 | r8 = r4;
0x0001ccca b 0x1cbf0 | goto label_0;
| label_12:
0x0001cccc ldr r3, [sp, 0x10] | r3 = var_10h;
0x0001ccce cmp r7, 0x88 |
0x0001ccd0 add r4, r3 | r4 += r3;
0x0001ccd2 bhi 0x1ccc6 |
| } while (r7 > 0x88);
0x0001ccd4 cmp r7, 0x80 |
| if (r7 < 0x80) {
0x0001ccd6 bls.w 0x1cf46 | goto label_16;
| }
| label_15:
0x0001ccda subs r7, 0x81 | r7 -= 0x81;
0x0001ccdc mov r6, r5 | r6 = r5;
0x0001ccde cmp r7, 7 |
| if (r7 > 7) {
0x0001cce0 bhi 0x1ccc6 | goto label_1;
| }
0x0001cce2 adr r2, 8 | r2 = 8;
0x0001cce4 ldr.w r7, [r2, r7, lsl 2] | offset_0 = r7 << 2;
| r7 = *((r2 + offset_0));
0x0001cce8 add r2, r7 | r2 += r7;
| /* switch table (8 cases) at 0x1ccec */
0x0001ccea bx r2 | return uint32_t (*r2)() ();
| label_16:
0x0001cf46 cmp r7, 0x3a |
| if (r7 != 0x3a) {
0x0001cf48 bne 0x1cfcc | goto label_17;
| }
0x0001cf4a mov r2, r4 | r2 = r4;
| label_4:
0x0001cf4c ldrb r2, [r2, -0x1] | r2 = *((r2 - 0x1));
0x0001cf50 add.w r4, r8, r5 | r4 = r8 + r5;
0x0001cf54 cmp r2, 0x7e |
| if (r2 != 0x7e) {
0x0001cf56 bne.w 0x1ccc6 | goto label_1;
| }
0x0001cf5a mov r3, fp | r3 = fp;
0x0001cf5c mov fp, sb |
0x0001cf5e mov sb, r3 | sb = r3;
| label_9:
0x0001cf60 ldrb r3, [r4] | r3 = *(r4);
0x0001cf62 cmp r3, 0x7e |
| if (r3 != 0x7e) {
0x0001cf64 bne.w 0x1cbb2 | goto label_2;
| }
0x0001cf68 ldrb r5, [r4, 1] | r5 = *((r4 + 1));
0x0001cf6a adds r0, r4, 1 | r0 = r4 + 1;
0x0001cf6c mov r6, r0 | r6 = r0;
0x0001cf6e and r2, fp, 4 | r2 = fp & 4;
0x0001cf72 cmp r5, 0 |
| if (r5 != 0) {
0x0001cf74 bne 0x1d002 | goto label_18;
| }
0x0001cf76 mov r8, r4 | r8 = r4;
| label_5:
0x0001cf78 ands r3, fp, 0x400 | r3 = fp & 0x400;
| if (r3 != fp) {
0x0001cf7c beq 0x1cf82 |
0x0001cf7e mov r4, r6 | r4 = r6;
0x0001cf80 b 0x1cbb2 | goto label_2;
| }
0x0001cf82 strb.w r3, [r8, 1] | *((r8 + 1)) = r3;
0x0001cf86 ldrb r3, [r4, 1] | r3 = *((r4 + 1));
| if (r3 != 0) {
0x0001cf88 cbnz r3, 0x1cfb4 | goto label_19;
| }
0x0001cf8a ldr r0, [pc, 0x100] |
0x0001cf8c add r0, pc | r0 = 0x3a01e;
0x0001cf8e bl 0x195f8 | r0 = fcn_000195f8 (r0);
0x0001cf92 mov r7, r0 | r7 = r0;
0x0001cf94 strb.w r5, [r8, 1] | *((r8 + 1)) = r5;
0x0001cf98 cmp r7, 0 |
| if (r7 == 0) {
0x0001cf9a beq.w 0x1cbb2 | goto label_2;
| }
| label_3:
0x0001cf9e mov r0, r7 | r0 = r7;
0x0001cfa0 mov r4, r6 | r4 = r6;
0x0001cfa2 blx 0x4074 | fcn_00004074 ();
0x0001cfa6 orr r2, fp, 0x100 | r2 = fp | 0x100;
0x0001cfaa mov r1, r0 | r1 = r0;
0x0001cfac mov r0, r7 | r0 = r7;
0x0001cfae bl 0x17c90 | fcn_00017c90 (r0, r1, r2);
0x0001cfb2 b 0x1cbb2 | goto label_2;
| label_19:
0x0001cfb4 blx 0x3984 | r0 = fcn_00003984 ();
0x0001cfb8 cmp r0, 0 |
| if (r0 == 0) {
0x0001cfba beq.w 0x1cbb2 | goto label_2;
| }
0x0001cfbc add r5, sp, 0x3e8 | r5 = sp + 0x3e8;
0x0001cfbe ldr r7, [r0, 0x14] | r7 = *((r0 + 0x14));
0x0001cfc0 strb.w r5, [r8, 1] | *((r8 + 1)) = r5;
0x0001cfc4 cmp r7, 0 |
| if (r7 == 0) {
0x0001cfc6 beq.w 0x1cbb2 | goto label_2;
| }
0x0001cfca b 0x1cf9e | goto label_3;
| label_17:
0x0001cfcc cmp r7, 0x3d |
| if (r7 != 0x3d) {
0x0001cfce bne.w 0x1ccc6 | goto label_1;
| }
0x0001cfd2 ldr r3, [sp, 8] | r3 = var_8h;
0x0001cfd4 orr sb, sb, 0x20 | sb |= 0x20;
0x0001cfd8 mov r2, r4 | r2 = r4;
0x0001cfda adds r3, 1 | r3++;
0x0001cfdc str r3, [sp, 8] | var_8h = r3;
0x0001cfde b 0x1cf4c | goto label_4;
| if (r3 > 1) {
| label_6:
0x0001cfe0 bhi 0x1cffa | goto label_20;
| }
0x0001cfe2 cmp r5, 0x83 |
| if (r5 == 0x83) {
0x0001cfe4 beq 0x1cf78 | goto label_5;
| }
| if (r5 > 0x83) {
0x0001cfe6 bhi 0x1cffa | goto label_20;
| }
0x0001cfe8 cmp r5, 0x81 |
| if (r5 == 0x81) {
0x0001cfea beq.w 0x1cbb2 | goto label_2;
| }
0x0001cfec add r5, sp, 0x388 | r5 = sp + 0x388;
0x0001cfee cmp r5, 0x82 |
| if (r5 == 0x82) {
0x0001cff0 beq 0x1cffa | goto label_20;
| }
0x0001cff2 cmp r5, 0x2f |
| if (r5 == 0x2f) {
0x0001cff4 beq 0x1cf78 | goto label_5;
| }
0x0001cff6 cmp r5, 0x3a |
| if (r5 == 0x3a) {
0x0001cff8 beq 0x1d014 | goto label_21;
| }
| label_20:
0x0001cffa ldrb r5, [r6, 1] | r5 = *((r6 + 1));
0x0001cffc adds r3, r6, 1 | r3 = r6 + 1;
| if (r5 == 0) {
0x0001cffe cbz r5, 0x1d00e | goto label_8;
| }
| label_7:
0x0001d000 mov r6, r3 | r6 = r3;
| label_18:
0x0001d002 cmp r5, 0x88 |
0x0001d004 add.w r8, r6, -1 | r8 = r6 + -1;
| if (r5 == 0x88) {
0x0001d008 beq.w 0x1cbb2 | goto label_2;
| }
0x0001d00c b 0x1cfe0 | goto label_6;
| label_8:
0x0001d00e mov r8, r6 | r8 = r6;
0x0001d010 mov r6, r3 | r6 = r3;
0x0001d012 b 0x1cf78 | goto label_5;
| label_21:
0x0001d014 cmp r2, 0 |
| if (r2 != 0) {
0x0001d016 bne 0x1cf78 | goto label_5;
| }
0x0001d018 ldrb r5, [r6, 1] | r5 = *((r6 + 1));
0x0001d01a adds r3, r6, 1 | r3 = r6 + 1;
0x0001d01c cmp r5, 0 |
| if (r5 != 0) {
0x0001d01e bne 0x1d000 | goto label_7;
| }
0x0001d020 b 0x1d00e | goto label_8;
| label_13:
0x0001d022 blx 0x3c40 | fcn_00003c40 ();
| label_10:
0x0001d026 ldr r3, [pc, 0x24] | r3 = *(0x1d04e);
0x0001d028 bic fp, r1, 2 | fp = BIT_MASK (r1, 2);
0x0001d02c and sb, r1, 0x140 | sb = r1 & 0x140;
0x0001d030 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x0001d032 str r3, [sp, 0xc] | var_ch = r3;
0x0001d034 movs r3, 0 | r3 = 0;
0x0001d036 str r3, [sp] | *(sp) = r3;
0x0001d038 b 0x1cf60 | goto label_9;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x25be0 */
| #include <stdint.h>
|
; (fcn) fcn.00025be0 () | void fcn_00025be0 (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h;
| int32_t var_8h;
| int32_t var_8h_2;
| int16_t var_10h;
| int16_t var_2ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00025be0 push {r4, r5, r6, lr} |
0x00025be2 mov r6, r0 | r6 = r0;
0x00025be4 sub sp, 0x30 |
0x00025be6 ldr r0, [pc, 0x58] |
0x00025be8 mov r4, r1 | r4 = r1;
0x00025bea add r5, sp, 0x10 | r5 += var_10h;
0x00025bec str r1, [sp] | *(sp) = r1;
0x00025bee ldr r1, [pc, 0x54] | r1 = *(0x25c46);
0x00025bf0 add r0, pc | r0 = 0x4b836;
0x00025bf2 strd r2, r3, [sp, 8] | __asm ("strd r2, r3, [var_8h]");
0x00025bf6 movs r2, 0x19 | r2 = 0x19;
0x00025bf8 ldr r3, [pc, 0x4c] |
0x00025bfa ldr r1, [r0, r1] |
0x00025bfc mov r0, r5 | r0 = r5;
0x00025bfe add r3, pc | r3 = 0x4b84a;
0x00025c00 ldr r1, [r1] | r1 = *(0x4b836);
0x00025c02 str r1, [sp, 0x2c] | var_2ch = r1;
0x00025c04 mov.w r1, 0 | r1 = 0;
0x00025c08 movs r1, 1 | r1 = 1;
0x00025c0a blx 0x4164 | r0 = fcn_00004164 ();
0x00025c0e subs r3, r0, r4 | r3 = r0 - r4;
0x00025c10 mov r2, r4 | r2 = r4;
0x00025c12 adds r1, r5, r3 | r1 = r5 + r3;
0x00025c14 ldrb r3, [r5, r3] | r3 = *((r5 + r3));
0x00025c16 mov r0, r6 | r0 = r6;
0x00025c18 cmp r3, 0x30 |
0x00025c1a it eq |
| if (r3 != 0x30) {
0x00025c1c addeq r1, 1 | r1++;
| }
0x00025c1e blx 0x3b30 | mmap64 ()
0x00025c22 ldr r2, [pc, 0x28] |
0x00025c24 ldr r3, [pc, 0x1c] | r3 = *(0x25c44);
0x00025c26 add r2, pc | r2 = 0x4b878;
0x00025c28 ldr r3, [r2, r3] | r3 = *(0x4b878);
0x00025c2a ldr r2, [r3] | r2 = *(0x4b878);
0x00025c2c ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x00025c2e eors r2, r3 | r2 ^= r3;
0x00025c30 mov.w r3, 0 | r3 = 0;
| if (r2 == r3) {
0x00025c34 bne 0x25c3a |
0x00025c36 add sp, 0x30 |
0x00025c38 pop {r4, r5, r6, pc} |
| }
0x00025c3a blx 0x3c40 | fcn_00003c40 ();
0x00025c3e nop |
0x00025c40 ldrb r0, [r6, 0x1c] | r0 = *((r6 + 0x1c));
0x00025c42 movs r2, r0 | r2 = r0;
0x00025c44 lsls r4, r5, 0x11 | r4 = r5 << 0x11;
0x00025c46 movs r0, r0 |
0x00025c48 cdp2 p0, 9, c0, c2, c1, 0 | __asm ("cdp2 p0, 9, c0, c2, c1, 0");
0x00025c4c ldrb r2, [r7, 0x1b] | r2 = *((r7 + 0x1b));
0x00025c4e movs r2, r0 | r2 = r0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x27564 */
| #include <stdint.h>
|
; (fcn) fcn.00027564 () | void fcn_00027564 (int16_t arg1) {
| r0 = arg1;
0x00027564 push {r0, r1, r6, sb, sl, fp, sp, lr} |
0x00027568 rors r0, r6 | __asm ("rors r0, r6");
0x0002756a mov r4, r0 | r4 = r0;
0x0002756c cmp r3, 0 |
| if (r3 != 0) {
0x0002756e bne.w 0x27786 | goto label_7;
| }
| label_4:
0x00027572 ldr r7, [pc, 0x218] |
0x00027574 add.w r6, r4, 0x44 | r6 = r4 + 0x44;
0x00027578 add r7, pc | r7 = 0x4ed0a;
| label_0:
0x0002757a ldr r3, [r4, 0x54] | r3 = *((r4 + 0x54));
0x0002757c mov r2, r6 | r2 = r6;
0x0002757e ldr r1, [r4, 0x40] | r1 = *((r4 + 0x40));
0x00027580 mov r0, r4 | r0 = r4;
0x00027582 bl 0x26ba8 | fcn_00026ba8 (r0, r1, r2, r3);
0x00027586 ldr r3, [r4, 0x38] | r3 = *((r4 + 0x38));
0x00027588 ldr r2, [r4, 0x4c] | r2 = *((r4 + 0x4c));
0x0002758a str r0, [r4, 0x40] | *((r4 + 0x40)) = r0;
0x0002758c ands r3, r0 | r3 &= r0;
0x0002758e ldrb.w r5, [r2, r3, lsl 3] | offset_0 = r3 << 3;
| r5 = *((r2 + offset_0));
0x00027592 add.w r8, r2, r3, lsl 3 | r8 = r2 + (r3 << 3);
0x00027596 cmp r5, 0x10 |
| if (r5 < 0x10) {
0x00027598 bls 0x275d8 | goto label_8;
| }
| do {
0x0002759a cmp r5, 0x63 |
| if (r5 == 0x63) {
0x0002759c bne 0x275a4 |
| label_1:
0x0002759e mov r0, r4 | r0 = r4;
0x000275a0 bl 0x3ead6 | fcn_0003ead6 (r0);
| }
0x000275a4 ldrb.w r3, [r8, 1] | r3 = *((r8 + 1));
0x000275a8 subs r5, 0x10 | r5 -= 0x10;
0x000275aa ldr r1, [r4, 0x40] | r1 = *((r4 + 0x40));
0x000275ac mov r0, r4 | r0 = r4;
0x000275ae ldr r2, [r4, 0x44] | r2 = *((r4 + 0x44));
0x000275b0 lsrs r1, r3 | r1 >>= r3;
0x000275b2 subs r2, r2, r3 | r2 -= r3;
0x000275b4 str r2, [r4, 0x44] | *((r4 + 0x44)) = r2;
0x000275b6 mov r3, r5 | r3 = r5;
0x000275b8 mov r2, r6 | r2 = r6;
0x000275ba str r1, [r4, 0x40] | *((r4 + 0x40)) = r1;
0x000275bc bl 0x26ba8 | fcn_00026ba8 (r0, r1, r2, r3);
0x000275c0 ldrh.w r3, [r7, r5, lsl 1] | offset_1 = r5 << 1;
| r3 = *((r7 + offset_1));
0x000275c4 ldr.w r2, [r8, 4] | r2 = *((r8 + 4));
0x000275c8 str r0, [r4, 0x40] | *((r4 + 0x40)) = r0;
0x000275ca ands r3, r0 | r3 &= r0;
0x000275cc ldrb.w r5, [r2, r3, lsl 3] | offset_2 = r3 << 3;
| r5 = *((r2 + offset_2));
0x000275d0 add.w r8, r2, r3, lsl 3 | r8 = r2 + (r3 << 3);
0x000275d4 cmp r5, 0x10 |
0x000275d6 bhi 0x2759a |
| } while (r5 > 0x10);
| label_8:
0x000275d8 ldrb.w r2, [r8, 1] | r2 = *((r8 + 1));
0x000275dc cmp r5, 0x10 |
0x000275de ldr r3, [r4, 0x44] | r3 = *((r4 + 0x44));
0x000275e0 lsr.w r1, r0, r2 | r1 = r0 >> r2;
0x000275e4 sub.w r3, r3, r2 | r3 -= r2;
0x000275e8 str r3, [r4, 0x44] | *((r4 + 0x44)) = r3;
0x000275ea str r1, [r4, 0x40] | *((r4 + 0x40)) = r1;
| if (r5 != 0x10) {
0x000275ec bne 0x27610 | goto label_9;
| }
0x000275ee ldr r3, [r4, 0x48] | r3 = *((r4 + 0x48));
0x000275f0 ldr.w r1, [r8, 4] | r1 = *((r8 + 4));
0x000275f4 ldr r2, [r4, 0x14] | r2 = *((r4 + 0x14));
0x000275f6 adds r0, r3, 1 | r0 = r3 + 1;
0x000275f8 str r0, [r4, 0x48] | *((r4 + 0x48)) = r0;
0x000275fa strb r1, [r2, r3] | *((r2 + r3)) = r1;
0x000275fc ldr r3, [r4, 0x48] | r3 = *((r4 + 0x48));
0x000275fe cmp.w r3, 0x8000 |
| if (r3 != 0x8000) {
0x00027602 bne 0x2757a | goto label_0;
| }
0x00027604 str r3, [r4, 0x10] | *((r4 + 0x10)) = r3;
| label_3:
0x00027606 movs r3, 0 | r3 = 0;
0x00027608 movs r0, 1 | r0 = 1;
0x0002760a str r3, [r4, 0x48] | *((r4 + 0x48)) = r3;
0x0002760c pop.w {r4, r5, r6, r7, r8, pc} |
| label_9:
0x00027610 cmp r5, 0xf |
| if (r5 == 0xf) {
0x00027612 bne 0x2763e |
0x00027614 ldrd r2, r0, [r4, 0x48] | __asm ("ldrd r2, r0, [r4, 0x48]");
0x00027618 adds r4, 0x4c | r4 += 0x4c;
0x0002761a str r1, [r4, -0x30] | *((r4 - 0x30)) = r1;
0x0002761e strb r3, [r4, -0x2c] | *((r4 - 0x2c)) = r3;
0x00027622 str r2, [r4, -0x3c] | *((r4 - 0x3c)) = r2;
0x00027626 bl 0x3eab8 | fcn_0003eab8 (r0);
0x0002762a ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x0002762c bl 0x3eab8 | fcn_0003eab8 (r0);
0x00027630 vmov.i32 d16, 0 | __asm ("vmov.i32 d16, 0");
0x00027634 movs r0, 0 | r0 = 0;
0x00027636 vst1.32 {d16}, [r4] | __asm ("vst1.32 {d16}, [r4]");
0x0002763a pop.w {r4, r5, r6, r7, r8, pc} |
| }
0x0002763e mov r3, r5 | r3 = r5;
0x00027640 mov r2, r6 | r2 = r6;
0x00027642 mov r0, r4 | r0 = r4;
0x00027644 bl 0x26ba8 | fcn_00026ba8 (r0, r1, r2, r3);
0x00027648 ldr r3, [pc, 0x144] |
0x0002764a lsr.w r1, r0, r5 | r1 = r0 >> r5;
0x0002764e ldr.w r2, [r8, 4] | r2 = *((r8 + 4));
0x00027652 str r1, [r4, 0x40] | *((r4 + 0x40)) = r1;
0x00027654 add r3, pc | r3 = 0x4ede8;
0x00027656 ldrh.w r3, [r3, r5, lsl 1] | offset_3 = r5 << 1;
| r3 = *((r3 + offset_3));
0x0002765a ands r3, r0 | r3 &= r0;
0x0002765c mov r0, r4 | r0 = r4;
0x0002765e add r3, r2 | r3 += r2;
0x00027660 mov r2, r6 | r2 = r6;
0x00027662 str r3, [r4, 0x5c] | *((r4 + 0x5c)) = r3;
0x00027664 ldr r3, [r4, 0x44] | r3 = *((r4 + 0x44));
0x00027666 subs r5, r3, r5 | r5 = r3 - r5;
0x00027668 ldr r3, [r4, 0x58] | r3 = *((r4 + 0x58));
0x0002766a str r5, [r4, 0x44] | *((r4 + 0x44)) = r5;
0x0002766c bl 0x26ba8 | fcn_00026ba8 (r0, r1, r2, r3);
0x00027670 ldr r3, [r4, 0x3c] | r3 = *((r4 + 0x3c));
0x00027672 ldr r5, [r4, 0x50] | r5 = *((r4 + 0x50));
0x00027674 str r0, [r4, 0x40] | *((r4 + 0x40)) = r0;
0x00027676 ands r3, r0 | r3 &= r0;
0x00027678 ldrb.w r7, [r5, r3, lsl 3] | offset_4 = r3 << 3;
| r7 = *((r5 + offset_4));
0x0002767c add.w r5, r5, r3, lsl 3 | r5 += (r3 << 3);
0x00027680 cmp r7, 0x10 |
| if (r7 < 0x10) {
0x00027682 bls 0x276be | goto label_10;
| }
0x00027684 ldr.w r8, [pc, 0x10c] |
0x00027688 add r8, pc | r8 = 0x4ee20;
| label_2:
0x0002768a cmp r7, 0x63 |
| if (r7 == 0x63) {
0x0002768c beq 0x2759e | goto label_1;
| }
0x0002768e ldrb r3, [r5, 1] | r3 = *((r5 + 1));
0x00027690 subs r7, 0x10 | r7 -= 0x10;
0x00027692 ldr r1, [r4, 0x40] | r1 = *((r4 + 0x40));
0x00027694 mov r0, r4 | r0 = r4;
0x00027696 ldr r2, [r4, 0x44] | r2 = *((r4 + 0x44));
0x00027698 lsrs r1, r3 | r1 >>= r3;
0x0002769a subs r2, r2, r3 | r2 -= r3;
0x0002769c str r2, [r4, 0x44] | *((r4 + 0x44)) = r2;
0x0002769e mov r3, r7 | r3 = r7;
0x000276a0 mov r2, r6 | r2 = r6;
0x000276a2 str r1, [r4, 0x40] | *((r4 + 0x40)) = r1;
0x000276a4 bl 0x26ba8 | fcn_00026ba8 (r0, r1, r2, r3);
0x000276a6 invalid |
0x000276aa adds r0, 0x17 | r0 += 0x17;
0x000276ac ldr r5, [r5, 4] | r5 = *((r5 + 4));
0x000276ae str r0, [r4, 0x40] | *((r4 + 0x40)) = r0;
0x000276b0 ands r3, r0 | r3 &= r0;
0x000276b2 ldrb.w r7, [r5, r3, lsl 3] | offset_5 = r3 << 3;
| r7 = *((r5 + offset_5));
0x000276b6 add.w r5, r5, r3, lsl 3 | r5 += (r3 << 3);
0x000276ba cmp r7, 0x10 |
| if (r7 > 0x10) {
0x000276bc bhi 0x2768a | goto label_2;
| }
| label_10:
0x000276be mov r2, r6 | r2 = r6;
0x000276c0 ldrb r6, [r5, 1] | r6 = *((r5 + 1));
0x000276c2 ldr r3, [r4, 0x44] | r3 = *((r4 + 0x44));
0x000276c4 lsr.w r1, r0, r6 | r1 = r0 >> r6;
0x000276c8 subs r3, r3, r6 | r3 -= r6;
0x000276ca str r3, [r4, 0x44] | *((r4 + 0x44)) = r3;
0x000276cc mov r0, r4 | r0 = r4;
0x000276ce mov r3, r7 | r3 = r7;
0x000276d0 str r1, [r4, 0x40] | *((r4 + 0x40)) = r1;
0x000276d2 bl 0x26ba8 | fcn_00026ba8 (r0, r1, r2, r3);
0x000276d6 ldr r3, [pc, 0xc0] |
0x000276d8 ldr r1, [r5, 4] | r1 = *((r5 + 4));
0x000276da ldr r5, [r4, 0x48] | r5 = *((r4 + 0x48));
0x000276dc add r3, pc | r3 = 0x4ee7a;
0x000276de ldrh.w r3, [r3, r7, lsl 1] | offset_6 = r7 << 1;
| r3 = *((r3 + offset_6));
0x000276e2 subs r1, r5, r1 | r1 = r5 - r1;
0x000276e4 ands r3, r0 | r3 &= r0;
0x000276e6 lsrs r0, r7 | r0 >>= r7;
0x000276e8 subs r1, r1, r3 | r1 -= r3;
0x000276ea ldr r3, [r4, 0x44] | r3 = *((r4 + 0x44));
0x000276ec str r0, [r4, 0x40] | *((r4 + 0x40)) = r0;
0x000276ee subs r3, r3, r7 | r3 -= r7;
0x000276f0 str r3, [r4, 0x44] | *((r4 + 0x44)) = r3;
| label_6:
0x000276f2 ldr r2, [r4, 0x5c] | r2 = *((r4 + 0x5c));
| do {
0x000276f4 ubfx r3, r1, 0, 0xf | r3 = (r1 >> 0) & ((1 << 0xf) - 1);
0x000276f8 ldr r1, [r4, 0x14] | r1 = *((r4 + 0x14));
0x000276fa cmp r3, r5 |
0x000276fc mov r6, r3 | r6 = r3;
0x000276fe ite lo |
| if (r3 >= r5) {
0x00027700 sublo r0, r5, r3 | r0 = r5 - r3;
| }
| if (r3 < r5) {
0x00027702 subhs r0, r3, r5 | r0 = r3 - r5;
| }
0x00027704 cmp r3, r5 |
0x00027706 str r3, [r4, 0x60] | *((r4 + 0x60)) = r3;
0x00027708 it lo |
| if (r3 >= r5) {
0x0002770a movlo r6, r5 | r6 = r5;
| }
0x0002770c rsb.w r6, r6, 0x8000 | r6 = 0x8000 - r6;
0x00027710 cmp r6, r2 |
0x00027712 it hs |
| if (r6 < r2) {
0x00027714 movhs r6, r2 | r6 = r2;
| }
0x00027716 cmp r0, r6 |
0x00027718 sub.w r2, r2, r6 | r2 -= r6;
0x0002771c str r2, [r4, 0x5c] | *((r4 + 0x5c)) = r2;
| if (r0 > r6) {
0x0002771e blo 0x27738 |
0x00027720 adds r0, r1, r5 | r0 = r1 + r5;
0x00027722 mov r2, r6 | r2 = r6;
0x00027724 add r1, r3 | r1 += r3;
0x00027726 blx 0x3b30 | mmap64 ()
0x0002772a ldr r5, [r4, 0x48] | r5 = *((r4 + 0x48));
0x0002772c ldr r3, [r4, 0x60] | r3 = *((r4 + 0x60));
0x0002772e add r5, r6 | r5 += r6;
0x00027730 add r3, r6 | r3 += r6;
0x00027732 str r5, [r4, 0x48] | *((r4 + 0x48)) = r5;
0x00027734 str r3, [r4, 0x60] | *((r4 + 0x60)) = r3;
0x00027736 b 0x2774c |
| } else {
0x00027738 adds r2, r3, 1 | r2 = r3 + 1;
0x0002773a subs r6, 1 | r6--;
0x0002773c str r2, [r4, 0x60] | *((r4 + 0x60)) = r2;
0x0002773e add.w r2, r5, 1 | r2 = r5 + 1;
0x00027742 str r2, [r4, 0x48] | *((r4 + 0x48)) = r2;
0x00027744 ldrb r3, [r1, r3] | r3 = *((r1 + r3));
0x00027746 strb r3, [r1, r5] | *((r1 + r5)) = r3;
| if (r6 != 1) {
0x00027748 bne 0x2776a | goto label_11;
| }
| label_5:
0x0002774a ldr r5, [r4, 0x48] | r5 = *((r4 + 0x48));
| }
0x0002774c cmp.w r5, 0x8000 |
0x00027750 ldr r2, [r4, 0x5c] | r2 = *((r4 + 0x5c));
| if (r5 == 0x8000) {
0x00027752 bne 0x27760 |
0x00027754 subs r2, 0 |
0x00027756 str r5, [r4, 0x10] | *((r4 + 0x10)) = r5;
0x00027758 it ne |
| if (r2 == 0) {
0x0002775a movne r2, 1 | r2 = 1;
| }
0x0002775c str r2, [r4, 0x64] | *((r4 + 0x64)) = r2;
0x0002775e b 0x27606 | goto label_3;
| }
| if (r2 == 0) {
0x00027760 cbz r2, 0x27766 | goto label_12;
| }
0x00027762 ldr r1, [r4, 0x60] | r1 = *((r4 + 0x60));
0x00027764 b 0x276f4 |
| } while (1);
| label_12:
0x00027766 str r2, [r4, 0x64] | *((r4 + 0x64)) = r2;
0x00027768 b 0x27572 | goto label_4;
| do {
| label_11:
0x0002776a ldr r1, [r4, 0x60] | r1 = *((r4 + 0x60));
0x0002776c subs r6, 1 | r6--;
0x0002776e ldr r3, [r4, 0x48] | r3 = *((r4 + 0x48));
0x00027770 ldr r2, [r4, 0x14] | r2 = *((r4 + 0x14));
0x00027772 add.w r0, r1, 1 | r0 = r1 + 1;
0x00027776 str r0, [r4, 0x60] | *((r4 + 0x60)) = r0;
0x00027778 add.w r0, r3, 1 | r0 = r3 + 1;
0x0002777c str r0, [r4, 0x48] | *((r4 + 0x48)) = r0;
0x0002777e ldrb r1, [r2, r1] | r1 = *((r2 + r1));
0x00027780 strb r1, [r2, r3] | *((r2 + r3)) = r1;
0x00027782 bne 0x2776a |
| } while (r6 != 1);
0x00027784 b 0x2774a | goto label_5;
| label_7:
0x00027786 ldr r1, [r0, 0x60] | r1 = *((r0 + 0x60));
0x00027788 ldr r5, [r0, 0x48] | r5 = *((r0 + 0x48));
0x0002778a b 0x276f2 | goto label_6;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x2843c */
| #include <stdint.h>
|
; (fcn) fcn.0002843c () | void fcn_0002843c (int16_t arg1, int16_t arg2, int16_t arg3) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x0002843c ldr r3, [r0, 0x10] | r3 = *((r0 + 0x10));
0x0002843e push.w {r4, r5, r6, r7, r8, lr} |
0x00028442 mov r4, r0 | r4 = r0;
0x00028444 mov r5, r2 | r5 = r2;
| if (r3 != 0) {
0x00028446 cbz r3, 0x2846a |
0x00028448 ldrd r8, r0, [r0, 0x14] | __asm ("ldrd r8, r0, [r0, 0x14]");
0x0002844c add.w r6, r2, r8 | r6 = r2 + r8;
0x00028450 cmp r3, r6 |
0x00028452 str r6, [r4, 0x14] | *((r4 + 0x14)) = r6;
| if (r3 >= r6) {
0x00028454 bhs 0x28484 | goto label_0;
| }
0x00028456 blx 0x3acc | fcn_00003acc ();
0x0002845a ldr r0, [pc, 0x4c] |
0x0002845c movs r3, 0 | r3 = 0;
0x0002845e ldr r1, [r4, 0x10] | r1 = *((r4 + 0x10));
0x00028460 str r3, [r4, 0x18] | *((r4 + 0x18)) = r3;
0x00028462 add r0, pc | r0 = 0x50910;
0x00028464 bl 0xa268 | fcn_0000a268 ();
0x00028468 b 0x2847c |
| } else {
0x0002846a ldr r0, [r0, 0xc] | r0 = *((r0 + 0xc));
0x0002846c bl 0x3d7f4 | r0 = fcn_0003d7f4 (r0, r1, r2);
0x00028470 cmp r5, r0 |
| if (r5 == r0) {
0x00028472 beq 0x28480 | goto label_1;
| }
0x00028474 ldr r0, [pc, 0x34] |
0x00028476 add r0, pc | r0 = 0x50926;
0x00028478 bl 0xa31c | fcn_0000a31c (r0);
| }
0x0002847c mov.w r0, -1 | r0 = -1;
| label_1:
0x00028480 pop.w {r4, r5, r6, r7, r8, pc} |
| label_0:
0x00028484 mov r7, r1 | r7 = r1;
0x00028486 adds r1, r6, 1 | r1 = r6 + 1;
0x00028488 bl 0x934c | r0 = fcn_0000934c (r0);
0x0002848c mov r3, r0 | r3 = r0;
0x0002848e mov r2, r5 | r2 = r5;
0x00028490 str r3, [r4, 0x18] | *((r4 + 0x18)) = r3;
0x00028492 mov r1, r7 | r1 = r7;
0x00028494 add r0, r8 | r0 += r8;
0x00028496 blx 0x3b30 | mmap64 ()
0x0002849a ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
0x0002849c movs r2, 0 | r2 = 0;
0x0002849e mov r0, r5 | r0 = r5;
0x000284a0 strb r2, [r3, r6] | *((r3 + r6)) = r2;
0x000284a2 pop.w {r4, r5, r6, r7, r8, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x2d454 */
| #include <stdint.h>
|
; (fcn) fcn.0002d454 () | void fcn_0002d454 (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h;
| int16_t var_4h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0002d454 svcmi 0xf0e92d | __asm ("svcmi aav.0x000000ff");
0x0002d458 sub sp, 0xc |
0x0002d45a ldr.w fp, [pc, 0x94] |
0x0002d45e mov sb, r1 | sb = r1;
0x0002d460 mov r8, r2 | r8 = r2;
0x0002d462 mov.w sl, 0 | sl = 0;
0x0002d466 str r3, [sp] | *(sp) = r3;
0x0002d468 bl 0x9374 | r0 = fcn_00009374 (r0);
0x0002d46c mov r6, r0 | r6 = r0;
0x0002d46e add fp, pc | fp = 0x5a964;
0x0002d470 blx 0x4074 | fcn_00004074 ();
0x0002d474 adds r0, 3 | r0 += 3;
0x0002d476 bl 0x9324 | fcn_00009324 (r0);
0x0002d47a str.w sb, [sp, 4] | __asm ("str.w sb, [var_4h]");
0x0002d47e mov r5, r0 | r5 = r0;
0x0002d480 mov sb, r6 | sb = r6;
| do {
0x0002d482 mov r0, sb | r0 = sb;
0x0002d484 movs r1, 0x25 | r1 = 0x25;
0x0002d486 blx 0x4098 | r0 = fcn_00004098 ();
0x0002d48a mov r7, r0 | r7 = r0;
| if (r0 == 0) {
0x0002d48c cbnz r0, 0x2d496 |
0x0002d48e mov r0, sb | r0 = sb;
0x0002d490 blx 0x3ef8 | fcn_00003ef8 ();
0x0002d494 b 0x2d4c4 |
| } else {
0x0002d496 mov r1, fp | r1 = fp;
0x0002d498 adds r0, 1 | r0++;
0x0002d49a blx 0x463c | r0 = fcn_0000463c ();
0x0002d49e adds r4, r0, 1 | r4 = r0 + 1;
0x0002d4a0 mov r1, r7 | r1 = r7;
0x0002d4a2 mov r2, r4 | r2 = r4;
0x0002d4a4 mov r0, r5 | r0 = r5;
0x0002d4a6 blx 0x3b30 | mmap64 ()
0x0002d4aa strb.w sl, [r7] | *(r7) = sl;
0x0002d4ae mov r0, sb | r0 = sb;
0x0002d4b0 strb.w sl, [r5, r4] | *((r5 + r4)) = sl;
0x0002d4b4 bl 0x958c | fcn_0000958c ();
0x0002d4b8 ldrb r1, [r7, r4] | r1 = *((r7 + r4));
0x0002d4ba add r7, r4 | r7 += r4;
| if (r1 != 0) {
0x0002d4bc cbnz r1, 0x2d4d6 | goto label_1;
| }
0x0002d4be movs r0, 0x25 | r0 = 0x25;
0x0002d4c0 bl 0x9558 | fcn_00009558 (r0);
| }
0x0002d4c4 mov r0, r6 | r0 = r6;
0x0002d4c6 blx 0x3acc | fcn_00003acc ();
0x0002d4c8 add.w r6, r2, r8, asr 16 | r6 = r2 + (r8 >> 16);
0x0002d4cc add sp, 0xc |
0x0002d4ce pop.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0002d4d2 b.w 0x3ac8 | void (*0x3ac8)() ();
| label_1:
0x0002d4d6 cmp r1, 0x25 |
| if (r1 != 0x25) {
0x0002d4d8 bne 0x2d4e6 | goto label_2;
| }
0x0002d4da mov r0, r1 | r0 = r1;
0x0002d4dc bl 0x9558 | fcn_00009558 (r0);
| label_0:
0x0002d4e0 add.w sb, r7, 1 | sb = r7 + 1;
0x0002d4e4 b 0x2d482 |
| } while (1);
| label_2:
0x0002d4e6 ldrd r3, r2, [sp] | __asm ("ldrd r3, r2, [sp]");
0x0002d4ea mov r0, r5 | r0 = r5;
0x0002d4ec blx r8 | uint32_t (*r8)(uint32_t, uint32_t) (r0, r3);
0x0002d4ee b 0x2d4e0 | goto label_0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x39e74 */
| #include <stdint.h>
|
; (fcn) fcn.00039e74 () | void fcn_00039e74 (int16_t arg_0h, int16_t arg_8h, int16_t arg_ch, int16_t arg_10h, int16_t arg_18h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_20h;
| int16_t var_24h;
| int16_t var_28h;
| int16_t var_2ch;
| int16_t var_30h;
| int16_t var_34h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00039e74 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00039e78 sub sp, 0x3c |
0x00039e7a str r1, [sp, 0xc] | var_ch = r1;
| if (r0 == 0) {
0x00039e7c cbz r0, 0x39ee4 | goto label_11;
| }
0x00039e7e mov r7, r3 | r7 = r3;
0x00039e80 ands r3, r2, 0x800000 | r3 = r2 & 0x800000;
0x00039e84 it ne |
| if (r3 == r2) {
0x00039e86 movne r3, r7 | r3 = r7;
| }
0x00039e88 mov r6, r2 | r6 = r2;
0x00039e8a it ne |
| if (r3 == r2) {
0x00039e8c ldrbne r2, [r3], 1 | r2 = *(r3);
| r3++;
| }
0x00039e90 uxtb.w sb, r6 | sb = (int8_t) r6;
0x00039e94 it eq |
| if (r3 != r2) {
0x00039e96 streq r3, [sp, 4] | var_4h = r3;
| }
0x00039e98 mov fp, r0 |
0x00039e9a it ne |
| if (r3 == r2) {
0x00039e9c movne r7, r3 | r7 = r3;
| }
0x00039e9e ldr r3, [pc, 0x228] |
0x00039ea0 it ne |
| if (r3 == r2) {
0x00039ea2 strne r2, [sp, 4] | var_4h = r2;
| }
0x00039ea4 add r3, pc | r3 = 0x73f72;
0x00039ea6 str r3, [sp, 0x30] | var_30h = r3;
0x00039ea8 ubfx r3, r6, 8, 8 | r3 = (r6 >> 8) & ((1 << 8) - 1);
0x00039eaa movs r3, 7 | r3 = 7;
0x00039eac str r3, [sp, 0x18] | var_18h = r3;
0x00039eae add.w r3, r0, 8 | r3 = r0 + 8;
0x00039eb2 str r3, [sp, 0x20] | var_20h = r3;
0x00039eb4 lsl.w r3, sb, 2 | r3 = sb << 2;
0x00039eb8 str r3, [sp, 0x14] | var_14h = r3;
0x00039eba add.w r3, r0, 0x10 | r3 = r0 + 0x10;
0x00039ebe str r3, [sp, 0x1c] | var_1ch = r3;
0x00039ec0 add.w r3, r0, 0x14 | r3 = r0 + 0x14;
0x00039ec4 str r3, [sp, 0x2c] | var_2ch = r3;
| do {
| label_0:
0x00039ec6 ldr r2, [sp, 0x14] | r2 = var_14h;
0x00039ec8 movs r1, 0 | r1 = 0;
0x00039eca ldr r0, [sp, 0xc] | r0 = var_ch;
0x00039ecc blx 0x41c8 | fcn_000041c8 ();
0x00039ed0 ldr.w r3, [fp] | r3 = *(fp);
0x00039ed4 movs r2, 0xa | r2 = 0xa;
0x00039ed6 ldrd r1, r0, [sp, 0x1c] | __asm ("ldrd r1, r0, [var_20h]");
0x00039eda blx 0x396c | r0 = fcn_0000396c ();
0x00039ede subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 <= r0) {
0x00039ee0 bgt 0x39ef0 |
| if (r5 == r0) {
0x00039ee2 beq 0x39f4c | goto label_12;
| }
| label_11:
0x00039ee4 mov.w sl, 0 | sl = 0;
| label_1:
0x00039ee8 mov r0, sl | r0 = sl;
0x00039eea add sp, 0x3c |
0x00039eec pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
0x00039ef0 ldr.w r4, [fp, 8] | r4 = *(arg_8h);
0x00039ef4 add.w r3, fp, 0xc | r3 += arg_ch;
0x00039ef6 lsls r4, r1, 0xc | r4 = r1 << 0xc;
0x00039ef8 str r3, [sp] | *(sp) = r3;
| label_10:
0x00039efa ldr.w r3, [fp, 0x18] | r3 = *(arg_18h);
0x00039efe add.w r8, r5, -1 | r8 = r5 + -1;
0x00039f02 add.w sl, r4, r8 | sl = r4 + r8;
0x00039f06 adds r3, 1 | r3++;
0x00039f08 str.w r3, [fp, 0x18] | __asm ("str.w r3, [arg_18h]");
0x00039f0c mov r3, r5 | r3 = r5;
0x00039f0e ldrb.w r2, [r4, r8] | r2 = *((r4 + r8));
0x00039f12 cmp r2, 0xa |
| if (r2 == 0xa) {
0x00039f14 bne 0x39f28 |
0x00039f16 mov r5, r8 | r5 = r8;
| if (r5 == 0) {
0x00039f18 cbz r5, 0x39f48 | goto label_13;
| }
0x00039f1a sub.w r8, r3, 2 | r8 = r3 - 2;
0x00039f1e mov r3, r5 | r3 = r5;
0x00039f20 ldrb.w r2, [r4, r8] | r2 = *((r4 + r8));
0x00039f24 add.w sl, r4, r8 | sl = r4 + r8;
| }
0x00039f28 cmp r2, 0x5c |
| if (r2 != 0x5c) {
0x00039f2a beq 0x39f30 |
0x00039f2c add r4, r3 | r4 += r3;
0x00039f2e b 0x39f48 |
| } else {
0x00039f30 movs r2, 0xa | r2 = 0xa;
0x00039f32 ldr.w r3, [fp] | r3 = *(fp);
0x00039f36 ldr r1, [sp, 0x2c] | r1 = var_2ch;
0x00039f38 subs r5, 1 | r5--;
0x00039f3a ldr r0, [sp] | r0 = *(sp);
0x00039f3c blx 0x396c | r0 = fcn_0000396c ();
0x00039f40 subs r2, r0, 0 | r2 = r0 - 0;
| if (r2 > r0) {
0x00039f42 bgt.w 0x3a098 | goto label_14;
| }
0x00039f46 add r4, r5 | r4 += r5;
| }
| label_13:
0x00039f48 movs r3, 0 | r3 = 0;
0x00039f4a strb r3, [r4] | *(r4) = r3;
| label_12:
0x00039f4c ands r3, r6, 0x20000 | r3 = r6 & 0x20000;
0x00039f50 ldr.w r8, [fp, 8] | r8 = *(arg_8h);
0x00039f54 str r3, [sp] | *(sp) = r3;
| if (r3 != r6) {
0x00039f56 beq 0x39f62 |
0x00039f58 mov r0, r8 | r0 = r8;
0x00039f5a adds r1, r7, 1 | r1 = r7 + 1;
0x00039f5c blx 0x463c | r0 = fcn_0000463c ();
0x00039f60 add r8, r0 | r8 += r0;
| }
0x00039f62 lsls r2, r6, 7 | r2 = r6 << 7;
0x00039f64 mov r0, r8 | r0 = r8;
| if (r2 < r6) {
0x00039f66 bpl 0x39f6c |
0x00039f68 bl 0x408a2 | r0 = fcn_000408a2 (r0);
| }
0x00039f6c ldrb r2, [r0] | r2 = *(r0);
0x00039f6e cmp r2, 0 |
0x00039f70 beq 0x39ec6 |
| } while (r2 == 0);
0x00039f72 ldrb r1, [r7] | r1 = *(r7);
0x00039f74 ldr r3, [sp, 4] | r3 = var_4h;
0x00039f76 cmp r2, r3 |
0x00039f78 it ne |
| if (r2 != r3) {
0x00039f7a cmpne r1, r2 | __asm ("cmpne r1, r2");
| }
0x00039f7c ite eq |
| if (r2 != r3) {
0x00039f7e moveq r2, 1 | r2 = 1;
| }
| if (r2 != r3) {
0x00039f80 movne r2, 0 | r2 = 0;
| goto label_15;
| }
| if (r2 == r3) {
| label_15:
0x00039f82 beq 0x39ec6 | goto label_0;
| }
0x00039f84 add.w r3, sb, -1 | r3 = sb + -1;
0x00039f88 mov sl, r2 | sl = r2;
0x00039f8a str r3, [sp, 0x24] | var_24h = r3;
0x00039f8c and r5, r6, 0x400000 | r5 = r6 & 0x400000;
0x00039f90 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00039f92 adds r4, r7, 1 | r4 = r7 + 1;
0x00039f94 subs r3, 4 | r3 -= 4;
0x00039f96 str r3, [sp, 8] | var_8h = r3;
0x00039f98 and r3, r6, 0x10000 | r3 = r6 & 0x10000;
0x00039f9c str r3, [sp, 0x10] | var_10h = r3;
0x00039f9e and r3, r6, 0x40000 | r3 = r6 & 0x40000;
0x00039fa2 str r3, [sp, 0x28] | var_28h = r3;
| label_8:
0x00039fa4 ldr r3, [sp, 8] | r3 = var_8h;
0x00039fa6 str r8, [r3, 4]! | *((r3 += 4)) = r8;
0x00039faa str r3, [sp, 8] | var_8h = r3;
0x00039fac ldr r3, [sp, 0x24] | r3 = var_24h;
0x00039fae cmp sl, r3 |
| if (sl == r3) {
0x00039fb0 beq 0x3a000 | goto label_16;
| }
| label_2:
0x00039fb2 ldrb r3, [r7] | r3 = *(r7);
0x00039fb4 str r3, [sp, 0x34] | var_34h = r3;
0x00039fb6 cmp r3, 0 |
| if (r3 != 0) {
0x00039fb8 bne 0x3a07c | goto label_17;
| }
0x00039fba mov r1, r4 | r1 = r4;
0x00039fbc mov r0, r8 | r0 = r8;
0x00039fbe blx 0x3a04 | times ();
0x00039fc2 add r0, r8 | r0 += r8;
0x00039fc4 cmp r5, 0 |
| if (r5 == 0) {
0x00039fc6 beq 0x3a046 | goto label_9;
| }
| label_4:
0x00039fc8 ldrb r3, [r7] | r3 = *(r7);
| label_3:
0x00039fca ldrb r2, [r0] | r2 = *(r0);
0x00039fcc cmp r2, r3 |
0x00039fce ittt eq |
| if (r2 != r3) {
0x00039fd0 moveq r3, 0 | r3 = 0;
| }
| if (r2 != r3) {
0x00039fd2 moveq r8, r0 | r8 = r0;
| }
| if (r2 != r3) {
0x00039fd4 strbeq r3, [r0] | *(r0) = r3;
| }
| if (r2 != r3) {
0x00039fd6 bne 0x3a048 | goto label_18;
| }
| label_6:
0x00039fd8 ldr r3, [sp, 0x10] | r3 = var_10h;
0x00039fda cmp r3, 0 |
| if (r3 != 0) {
0x00039fdc bne 0x3a05a | goto label_19;
| }
0x00039fde add.w sl, sl, 1 | sl++;
| label_7:
0x00039fe2 ldr r3, [sp, 0x18] | r3 = var_18h;
0x00039fe4 cmp r3, sl |
| if (r3 <= sl) {
0x00039fe6 ble.w 0x39ee8 | goto label_1;
| }
0x00039fea ldr.w r1, [fp, 0x18] | r1 = *(arg_18h);
0x00039fee mov r2, sl | r2 = sl;
0x00039ff0 ldr r0, [sp, 0x30] | r0 = var_30h;
0x00039ff2 bl 0x8a74 | fcn_00008a74 ();
0x00039ff6 lsls r3, r6, 0xb | r3 = r6 << 0xb;
| if (r3 >= r6) {
0x00039ff8 bpl.w 0x39ec6 | goto label_0;
| }
0x00039ffc bl 0x8f44 | fcn_00008f44 ();
| label_16:
0x0003a000 ldr r3, [sp, 0x28] | r3 = var_28h;
0x0003a002 cmp r3, 0 |
| if (r3 == 0) {
0x0003a004 beq 0x39fb2 | goto label_2;
| }
0x0003a006 mov r0, r8 | r0 = r8;
| if (r5 == 0) {
0x0003a008 cbz r5, 0x3a03a | goto label_20;
| }
0x0003a00a ldrb r3, [r7] | r3 = *(r7);
0x0003a00c mov r1, r3 | r1 = r3;
0x0003a00e str r3, [sp, 0x34] | var_34h = r3;
0x0003a010 blx 0x3abc | fcn_00003abc ();
0x0003a014 ldr r2, [sp] | r2 = *(sp);
0x0003a016 ldr r3, [sp, 0x34] | r3 = var_34h;
0x0003a018 cmp r2, 0 |
| if (r2 == 0) {
0x0003a01a beq 0x39fca | goto label_3;
| }
| label_5:
0x0003a01c mov r8, r0 | r8 = r0;
0x0003a01e str r5, [sp, 0x34] | var_34h = r5;
| do {
0x0003a020 mov r5, r8 | r5 = r8;
0x0003a022 mov r0, r4 | r0 = r4;
0x0003a024 ldrb r1, [r8, -0x1]! | r1 = *((r8 -= 0x1));
0x0003a028 blx 0x4098 | r0 = fcn_00004098 ();
0x0003a02c cmp r0, 0 |
0x0003a02e bne 0x3a020 |
| } while (r0 != 0);
0x0003a030 mov r8, r5 | r8 = r5;
0x0003a032 ldr r5, [sp, 0x34] | r5 = var_34h;
0x0003a034 mov r0, r8 | r0 = r8;
| if (r5 == 0) {
0x0003a036 cbz r5, 0x3a046 | goto label_9;
| }
0x0003a038 b 0x39fc8 | goto label_4;
| label_20:
0x0003a03a mov r1, r5 | r1 = r5;
0x0003a03c blx 0x3abc | fcn_00003abc ();
0x0003a040 ldr r3, [sp] | r3 = *(sp);
0x0003a042 cmp r3, 0 |
| if (r3 != 0) {
0x0003a044 bne 0x3a01c | goto label_5;
| }
| label_9:
0x0003a046 ldrb r2, [r0] | r2 = *(r0);
| label_18:
0x0003a048 mov r8, r0 | r8 = r0;
0x0003a04a cmp r2, 0 |
| if (r2 == 0) {
0x0003a04c beq 0x39fd8 | goto label_6;
| }
0x0003a04e mov.w r3, 0 | r3 = 0;
0x0003a052 strb r3, [r8], 1 | *(r8) = r3;
| r8++;
0x0003a056 ldr r3, [sp, 0x10] | r3 = var_10h;
| if (r3 != 0) {
0x0003a058 cbz r3, 0x3a064 |
| label_19:
0x0003a05a mov r0, r8 | r0 = r8;
0x0003a05c mov r1, r4 | r1 = r4;
0x0003a05e blx 0x463c | r0 = fcn_0000463c ();
0x0003a062 add r8, r0 | r8 += r0;
| }
0x0003a064 ldrb.w r3, [r8] | r3 = *(r8);
0x0003a068 add.w sl, sl, 1 | sl++;
0x0003a06c cmp r3, 0 |
| if (r3 == 0) {
0x0003a06e beq 0x39fe2 | goto label_7;
| }
0x0003a070 ldrb r1, [r7] | r1 = *(r7);
0x0003a072 cmp r1, r3 |
0x0003a074 it ne |
| if (r1 == r3) {
0x0003a076 cmpne sb, sl | __asm ("cmpne sb, sl");
| goto label_21;
| }
| if (r1 > r3) {
| label_21:
0x0003a078 bgt 0x39fa4 | goto label_8;
| }
0x0003a07a b 0x39fe2 | goto label_7;
| if (r5 == 0) {
| label_17:
0x0003a07c cbnz r5, 0x3a08a |
0x0003a07e mov r1, r4 | r1 = r4;
0x0003a080 mov r0, r8 | r0 = r8;
0x0003a082 blx 0x3a04 | times ();
0x0003a086 add r0, r8 | r0 += r8;
0x0003a088 b 0x3a046 | goto label_9;
| }
0x0003a08a mov r1, r7 | r1 = r7;
0x0003a08c mov r0, r8 | r0 = r8;
0x0003a08e blx 0x3a04 | times ();
0x0003a092 ldr r3, [sp, 0x34] | r3 = var_34h;
0x0003a094 add r0, r8 | r0 += r8;
0x0003a096 b 0x39fca | goto label_3;
| label_14:
0x0003a098 ldr.w r3, [fp, 0x10] | r3 = *(arg_10h);
0x0003a09c add r5, r2 | r5 += r2;
0x0003a09e adds r1, r5, 1 | r1 = r5 + 1;
0x0003a0a0 cmp r3, r1 |
| if (r3 < r1) {
0x0003a0a2 bhs 0x3a0bc |
0x0003a0a4 mov r0, r4 | r0 = r4;
0x0003a0a6 str.w r1, [fp, 0x10] | __asm ("str.w r1, [arg_10h]");
0x0003a0aa str r2, [sp, 8] | var_8h = r2;
0x0003a0ac bl 0x934c | fcn_0000934c (r0);
0x0003a0b0 ldr r2, [sp, 8] | r2 = var_8h;
0x0003a0b2 mov r4, r0 | r4 = r0;
0x0003a0b4 add.w sl, r0, r8 | sl = r0 + r8;
0x0003a0b8 str.w r0, [fp, 8] | __asm ("str.w r0, [arg_8h]");
| }
0x0003a0bc ldr.w r1, [fp, 0xc] | r1 = *(arg_ch);
0x0003a0c0 mov r0, sl | r0 = sl;
0x0003a0c2 blx 0x3b30 | mmap64 ()
0x0003a0c6 b 0x39efa | goto label_10;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x3c5c8 */
| #include <stdint.h>
|
; (fcn) fcn.0003c5c8 () | uint32_t fcn_0003c5c8 (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_1e8h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x0003c5c8 add.w ip, r1, 4 |
0x0003c5cc push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0003c5d0 ldr.w r8, [r0, 0xc] | r8 = *(var_0hxc);
0x0003c5d4 mov r4, r2 | r4 = r2;
0x0003c5d6 mov r6, r0 | r6 = r0;
0x0003c5d8 sub.w sp, sp, 0x3cc |
0x0003c5dc ldr.w sb, [r0, 0x18] | sb = *(var_0hx18);
0x0003c5e0 add.w sl, sp, 0xc | sl += var_ch;
0x0003c5e4 ldm.w ip!, {r0, r1, r2, r3} | r0 = *(ip!);
| r1 = *((ip! + 4));
| r2 = *((ip! + 8));
| r3 = *((ip! + 12));
0x0003c5e8 mov lr, sl | lr = sl;
0x0003c5ea add r5, sp, 8 | r5 += var_8h;
0x0003c5ec mov.w fp, 0 |
0x0003c5f0 add r7, sp, 0x1e8 | r7 += var_1e8h;
0x0003c5f2 stm.w lr!, {r0, r1, r2, r3} | *(lr!) = r0;
| *((lr! + 4)) = r1;
| *((lr! + 8)) = r2;
| *((lr! + 12)) = r3;
0x0003c5f6 ldm.w ip!, {r0, r1, r2, r3} | r0 = *(ip!);
| r1 = *((ip! + 4));
| r2 = *((ip! + 8));
| r3 = *((ip! + 12));
0x0003c5fa stm.w lr!, {r0, r1, r2, r3} | *(lr!) = r0;
| *((lr! + 4)) = r1;
| *((lr! + 8)) = r2;
| *((lr! + 12)) = r3;
0x0003c5fe ldm.w ip!, {r0, r1, r2, r3} | r0 = *(ip!);
| r1 = *((ip! + 4));
| r2 = *((ip! + 8));
| r3 = *((ip! + 12));
0x0003c602 stm.w lr!, {r0, r1, r2, r3} | *(lr!) = r0;
| *((lr! + 4)) = r1;
| *((lr! + 8)) = r2;
| *((lr! + 12)) = r3;
0x0003c606 ldm.w ip, {r0, r1, r2, r3} | r0 = *(ip);
| r1 = *((ip + 4));
| r2 = *((ip + 8));
| r3 = *((ip + 12));
0x0003c60a stm.w lr, {r0, r1, r2, r3} | *(lr) = r0;
| *((lr + 4)) = r1;
| *((lr + 8)) = r2;
| *((lr + 12)) = r3;
0x0003c60e str.w fp, [r5] | __asm ("str.w fp, [r5]");
0x0003c612 b 0x3c65a |
| while (r0 == 0) {
0x0003c614 ldr r3, [r5, 0x40] | r3 = *((r5 + 0x40));
0x0003c616 mov.w r2, 0x1e0 | r2 = 0x1e0;
0x0003c61a mov r1, r5 | r1 = r5;
0x0003c61c mov r0, r7 | r0 = r7;
0x0003c61e str r3, [r6, 0x14] | *((r6 + 0x14)) = r3;
0x0003c620 blx 0x3b30 | mmap64 ()
0x0003c624 ldr r3, [r6, 0x10] | r3 = *((r6 + 0x10));
0x0003c626 mov r2, r7 | r2 = r7;
0x0003c628 mov r1, r6 | r1 = r6;
0x0003c62a mov r0, r4 | r0 = r4;
0x0003c62c blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x0003c62e str.w sb, [sp, 4] | __asm ("str.w sb, [var_4h]");
0x0003c632 mov r1, r4 | r1 = r4;
0x0003c634 ldr r4, [r7, 0x38] | r4 = *((r7 + 0x38));
0x0003c636 mov fp, r0 |
0x0003c638 mov r3, r6 | r3 = r6;
0x0003c63a mov r2, r6 | r2 = r6;
0x0003c63c movs r0, 1 | r0 = 1;
0x0003c63e str r4, [r5, 0x44] | *((r5 + 0x44)) = r4;
0x0003c640 str r5, [sp] | *(sp) = r5;
0x0003c642 blx r8 | r0 = uint32_t (*r8)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x0003c644 mov r4, r0 | r4 = r0;
| if (r0 != 0) {
0x0003c646 cbnz r0, 0x3c692 | goto label_0;
| }
0x0003c648 mov.w r2, 0x1e0 | r2 = 0x1e0;
0x0003c64c mov r1, r7 | r1 = r7;
0x0003c64e mov r0, r5 | r0 = r5;
0x0003c650 blx 0x3b30 | mmap64 ()
0x0003c654 cmp.w fp, 8 |
| if (fp != 8) {
0x0003c658 bne 0x3c68c | goto label_1;
| }
0x0003c65a ldr r1, [r5, 0x40] | r1 = *((r5 + 0x40));
0x0003c65c mov r0, r6 | r0 = r6;
0x0003c65e bl 0x3c480 | fcn_0003c480 (r0, r1);
0x0003c662 adds r4, 9 | r4 += 9;
0x0003c664 mov fp, r0 |
0x0003c666 cmp r0, 0 |
0x0003c668 beq 0x3c614 |
| }
0x0003c66a ldr r7, [r5, 0x38] | r7 = *((r5 + 0x38));
0x0003c66c mov r3, r6 | r3 = r6;
0x0003c66e str.w sb, [sp, 4] | __asm ("str.w sb, [var_4h]");
0x0003c672 mov r2, r6 | r2 = r6;
0x0003c674 orr r1, r4, 0x10 | r1 = r4 | 0x10;
0x0003c678 movs r0, 1 | r0 = 1;
0x0003c67a str r7, [r5, 0x44] | *((r5 + 0x44)) = r7;
0x0003c67c str r5, [sp] | *(sp) = r5;
0x0003c67e blx r8 | r0 = uint32_t (*r8)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
| if (r0 == 0) {
0x0003c680 cbnz r0, 0x3c692 |
0x0003c682 mov r0, fp | r0 = fp;
0x0003c684 add.w sp, sp, 0x3cc |
0x0003c688 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_1:
0x0003c68c cmp.w fp, 7 |
| if (fp == 7) {
0x0003c690 beq 0x3c6a0 | goto label_2;
| }
| }
| label_0:
0x0003c692 mov.w fp, 9 |
0x0003c696 mov r0, fp | r0 = fp;
0x0003c698 add.w sp, sp, 0x3cc |
0x0003c69c pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_2:
0x0003c6a0 mov r0, r4 | r0 = r4;
0x0003c6a2 ldr r1, [r5, 0x40] | r1 = *((r5 + 0x40));
0x0003c6a4 bl 0x3c584 | fcn_0003c584 ();
0x0003c6a8 mov r0, sl | r0 = sl;
0x0003c6aa bl 0x3ce80 | fcn_0003ce80 (r0, r1);
0x0003c6ae nop |
0x0003c6b0 ldr r0, [r0, 0x44] | r0 = *((r0 + 0x44));
0x0003c6b2 bx lr | return r0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x3dcb0 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.0003dcb0 () | void fcn_0003dcb0 (int16_t arg_10h, int16_t arg1, uint32_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0003dcb0 push {r4, r5, r6, lr} |
0x0003dcb2 mov r4, r0 | r4 = r0;
0x0003dcb4 ldr r6, [sp, 0x10] | r6 = *(arg_10h);
0x0003dcb6 mov lr, r2 | lr = r2;
0x0003dcb8 ldr r0, [r0] | r0 = *(r0);
0x0003dcba adds r5, r6, 4 | r5 = r6 + 4;
0x0003dcbc add.w ip, r0, 3 |
0x0003dcc0 add.w r2, r5, ip | r2 = r5 + ip;
0x0003dcc4 bic r2, r2, 3 | r2 = BIT_MASK (r2, 3);
0x0003dcc8 cmp r2, r1 |
0x0003dcca it gt |
| if (r2 <= r1) {
0x0003dccc movgt r0, -1 | r0 = -1;
| }
| if (r2 > r1) {
0x0003dcd0 ble 0x3dcd4 |
0x0003dcd2 pop {r4, r5, r6, pc} |
| }
0x0003dcd4 bic ip, ip, 3 | ip = BIT_MASK (ip, 3);
0x0003dcd8 mov r1, r3 | r1 = r3;
0x0003dcda add.w r0, r4, ip | r0 = r4 + ip;
0x0003dcde mov r2, r6 | r2 = r6;
0x0003dce0 strh.w lr, [r0, 2] |
0x0003dce4 adds r0, 4 | r0 += 4;
0x0003dce6 strh.w r5, [r4, ip] | *((r4 + ip)) = r5;
0x0003dcea blx 0x3b30 | mmap64 ()
0x0003dcee ldr r3, [r4] | r3 = *(r4);
0x0003dcf0 movs r0, 0 | r0 = 0;
0x0003dcf2 adds r3, 3 | r3 += 3;
0x0003dcf4 add r3, r5 | r3 += r5;
0x0003dcf6 bic r3, r3, 3 | r3 = BIT_MASK (r3, 3);
0x0003dcfa str r3, [r4] | *(r4) = r3;
0x0003dcfc pop {r4, r5, r6, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x3de22 */
| #include <stdint.h>
|
; (fcn) fcn.0003de22 () | void fcn_0003de22 (int16_t arg_0h, int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_4h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x0003de24 ssub8mi r4, r4, r0 | __asm ("ssub8mi r4, r4, r0");
0x0003de28 sub sp, 0xc |
0x0003de2a mov sl, r0 | sl = r0;
0x0003de2c mov r0, r2 | r0 = r2;
0x0003de2e mov sb, r1 | sb = r1;
0x0003de30 mov.w r8, 0 | r8 = 0;
0x0003de34 blx 0x4074 | r0 = fcn_00004074 ();
0x0003de38 mov r7, r0 | r7 = r0;
0x0003de3a mov r0, r4 | r0 = r4;
0x0003de3c bl 0x9374 | fcn_00009374 (r0);
0x0003de40 mov r4, r8 | r4 = r8;
0x0003de42 mov r6, r0 | r6 = r0;
0x0003de44 mov r5, r8 | r5 = r8;
0x0003de46 movw r3, 0x1806 | r3 = 0x1806;
| label_2:
0x0003de4a cmp r5, sb |
| if (r5 >= sb) {
0x0003de4c bhs 0x3de74 | goto label_4;
| }
0x0003de4e ldrb.w r2, [sl, r5] | r2 = *((sl + r5));
0x0003de52 add.w fp, sl, r5 |
0x0003de56 and r1, r2, 0xc0 | r1 = r2 & 0xc0;
0x0003de58 lsls r0, r0, 7 | r0 <<= 7;
0x0003de5a cmp r1, 0xc0 |
| if (r1 != 0xc0) {
0x0003de5c bne 0x3de88 | goto label_5;
| }
0x0003de5e adds r1, r5, 2 | r1 = r5 + 2;
0x0003de60 cmp r1, sb |
| if (r1 < sb) {
0x0003de62 bls 0x3defe | goto label_6;
| }
| label_1:
0x0003de64 mov r0, r6 | r0 = r6;
0x0003de66 movs r6, 0 | r6 = 0;
0x0003de68 blx 0x3acc | fcn_00003acc ();
| do {
| label_0:
0x0003de6c mov r0, r6 | r0 = r6;
0x0003de6e add sp, 0xc |
0x0003de70 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_4:
0x0003de74 cmp r6, r0 |
0x0003de76 itt ne |
| if (r6 == r0) {
0x0003de78 movne r3, 0 | r3 = 0;
| }
| if (r6 == r0) {
0x0003de7a strbne r3, [r0] | *(r0) = r3;
| }
0x0003de7c bne 0x3de6c |
| } while (r6 != r0);
0x0003de7e mov r0, r6 | r0 = r6;
0x0003de80 movs r6, 0 | r6 = 0;
0x0003de82 blx 0x3acc | fcn_00003acc ();
0x0003de86 b 0x3de6c | goto label_0;
| if (r2 == 0) {
| label_5:
0x0003de88 cbz r2, 0x3dec8 | goto label_7;
| }
0x0003de8a adds r1, r5, 1 | r1 = r5 + 1;
0x0003de8c add r1, r2 | r1 += r2;
0x0003de8e cmp r1, sb |
| if (r1 > sb) {
0x0003de90 bhi 0x3de64 | goto label_1;
| }
0x0003de92 adds r1, r7, 1 | r1 = r7 + 1;
0x0003de94 mov r0, r6 | r0 = r6;
0x0003de96 add r1, r2 | r1 += r2;
0x0003de98 bl 0x934c | fcn_0000934c (r0);
0x0003de9c mov r1, fp | r1 = fp;
0x0003de9e mov r6, r0 | r6 = r0;
0x0003dea0 ldrb r2, [r1], 1 | r2 = *(r1);
| r1++;
0x0003dea4 add r0, r7 | r0 += r7;
0x0003dea6 str r2, [sp, 4] | var_4h = r2;
0x0003dea8 blx 0x3b30 | mmap64 ()
0x0003deac ldr r2, [sp, 4] | r2 = var_4h;
0x0003deae mov r1, r4 | r1 = r4;
0x0003deb0 movs r4, 0x2e | r4 = 0x2e;
0x0003deb2 movw r3, 0x1806 | r3 = 0x1806;
0x0003deb6 strb r4, [r0, r2] | *((r0 + r2)) = r4;
0x0003deb8 add r0, r2 | r0 += r2;
0x0003deba ldrb.w r4, [fp] | r4 = *(fp);
0x0003debe movs r2, 0 | r2 = 0;
0x0003dec0 adds r4, 1 | r4++;
0x0003dec2 add r7, r4 | r7 += r4;
0x0003dec4 add r4, r5 | r4 += r5;
0x0003dec6 b 0x3dedc | goto label_3;
| if (r4 != 0) {
| label_7:
0x0003dec8 cbnz r4, 0x3def0 | goto label_8;
| }
0x0003deca adds r4, r5, 1 | r4 = r5 + 1;
| if (r7 == 0) {
0x0003decc cbz r7, 0x3def6 | goto label_9;
| }
| do {
0x0003dece movs r2, 0 | r2 = 0;
0x0003ded0 adds r5, r6, r7 | r5 = r6 + r7;
0x0003ded2 mov r1, r2 | r1 = r2;
0x0003ded4 mov.w ip, 0x20 |
0x0003ded8 strb ip, [r5, -0x1] | *((r5 - 0x1)) = ip;
| label_3:
0x0003dedc cmp r7, r3 |
0x0003dede it hi |
| if (r7 <= r3) {
0x0003dee0 orrhi r2, r2, 1 | r2 |= 1;
| }
| if (r2 == 0) {
0x0003dee4 cbz r2, 0x3def8 | goto label_10;
| }
0x0003dee6 mov r0, r6 | r0 = r6;
0x0003dee8 movs r6, 0 | r6 = 0;
0x0003deea blx 0x3acc | fcn_00003acc ();
0x0003deee b 0x3de6c | goto label_0;
| label_8:
0x0003def0 mov r8, r2 | r8 = r2;
0x0003def2 cmp r7, 0 |
0x0003def4 bne 0x3dece |
| } while (r7 != 0);
| label_9:
0x0003def6 mov r1, r7 | r1 = r7;
| label_10:
0x0003def8 mov r5, r4 | r5 = r4;
0x0003defa mov r4, r1 | r4 = r1;
0x0003defc b 0x3de4a | goto label_2;
| label_6:
0x0003defe cmp r4, 0 |
0x0003df00 it ne |
| if (r4 == 0) {
0x0003df02 movne r1, r4 | r1 = r4;
| }
0x0003df04 ldrh.w r4, [fp] | r4 = *(fp);
0x0003df08 add.w r8, r8, 1 | r8++;
0x0003df0c cmp.w r8, 6 |
0x0003df10 rev16 r4, r4 | __asm ("rev16 r4, r4");
0x0003df12 it ls |
| if (r8 > 6) {
0x0003df14 movls r2, 0 | r2 = 0;
| }
0x0003df16 ubfx r4, r4, 0, 0xe | r4 = (r4 >> 0) & ((1 << 0xe) - 1);
0x0003df1a it hi |
| if (r8 <= 6) {
0x0003df1c movhi r2, 1 | r2 = 1;
| }
0x0003df1e b 0x3dedc | goto label_3;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x3e34c */
| #include <stdint.h>
|
; (fcn) fcn.0003e34c () | void fcn_0003e34c (int16_t arg1, int16_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x0003e34c push {r4, r5, r6, lr} |
0x0003e34e mov r6, r1 | r6 = r1;
0x0003e350 mov r5, r0 | r5 = r0;
0x0003e352 blx 0x4074 | fcn_00004074 ();
0x0003e356 mov r1, r6 | r1 = r6;
0x0003e358 mov r4, r0 | r4 = r0;
0x0003e35a bl 0x17bd4 | fcn_00017bd4 (r0);
0x0003e35e mov r2, r4 | r2 = r4;
0x0003e360 mov r1, r5 | r1 = r5;
0x0003e362 blx 0x3b30 | mmap64 ()
0x0003e366 add r0, r4 | r0 += r4;
0x0003e368 pop {r4, r5, r6, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x3fa08 */
| #include <stdint.h>
|
; (fcn) fcn.0003fa08 () | void fcn_0003fa08 (int16_t arg1, int16_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x0003fa08 invalid |
0x0003fa0c mov r0, r1 | r0 = r1;
0x0003fa0e mov r6, r1 | r6 = r1;
0x0003fa10 blx 0x4074 | r0 = fcn_00004074 ();
0x0003fa14 mov r7, r0 | r7 = r0;
0x0003fa16 mov r0, r5 | r0 = r5;
0x0003fa18 mov r1, r7 | r1 = r7;
0x0003fa1a bl 0x3297c | fcn_0003297c (r0, r1);
0x0003fa1e mov r2, r7 | r2 = r7;
0x0003fa20 mov r4, r0 | r4 = r0;
0x0003fa22 mov r1, r6 | r1 = r6;
0x0003fa24 adds r0, r5, r0 | r0 = r5 + r0;
0x0003fa26 blx 0x3b30 | mmap64 ()
0x0003fa2a mov r0, r4 | r0 = r4;
0x0003fa2c pop {r3, r4, r5, r6, r7, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x401c4 */
| #include <stdint.h>
|
; (fcn) fcn.000401c4 () | void fcn_000401c4 (int16_t arg1, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r2 = arg3;
| r3 = arg4;
0x000401c4 invalid |
0x000401c8 lsls r7, r7, 0x10 | r7 <<= 0x10;
0x000401ca adc r3, r3, 0 | __asm ("adc r3, r3, 0");
0x000401ce str r2, [r0, 0x48] | *((r0 + 0x48)) = r2;
0x000401d0 str r3, [r0, 0x4c] | *((r0 + 0x4c)) = r3;
| do {
0x000401d2 rsb.w r7, r4, 0x40 | r7 = 0x40 - r4;
0x000401d6 adds r0, r5, r4 | r0 = r5 + r4;
0x000401d8 cmp r7, r6 |
0x000401da mov r1, r8 | r1 = r8;
0x000401dc it hs |
| if (r7 < r6) {
0x000401de movhs r7, r6 | r7 = r6;
| }
0x000401e0 mov r2, r7 | r2 = r7;
0x000401e2 add r4, r7 | r4 += r7;
0x000401e4 blx 0x3b30 | mmap64 ()
0x000401e8 cmp r4, 0x40 |
| if (r4 != 0x40) {
0x000401ea beq 0x401f0 |
0x000401ec pop.w {r4, r5, r6, r7, r8, pc} |
| }
0x000401f0 ldr r3, [r5, 0x40] | r3 = *((r5 + 0x40));
0x000401f2 mov r0, r5 | r0 = r5;
0x000401f4 subs r6, r6, r7 | r6 -= r7;
0x000401f6 add r8, r7 | r8 += r7;
0x000401f8 movs r4, 0 | r4 = 0;
0x000401fa blx r3 | uint32_t (*r3)(uint32_t, uint32_t) (r0, r3);
0x000401fc b 0x401d2 |
| } while (1);
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x407e8 */
| #include <stdint.h>
|
; (fcn) fcn.000407e8 () | void fcn_000407e8 (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x000407e8 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x000407ec mov sb, r3 | sb = r3;
0x000407ee mov r4, r0 | r4 = r0;
0x000407f0 mov r0, r2 | r0 = r2;
0x000407f2 mov r5, r1 | r5 = r1;
0x000407f4 mov sl, r2 | sl = r2;
0x000407f6 blx 0x4074 | r0 = fcn_00004074 ();
0x000407fa mov r8, r0 | r8 = r0;
0x000407fc mov r0, sb | r0 = sb;
0x000407fe blx 0x4074 | r0 = fcn_00004074 ();
0x00040802 mov r6, r0 | r6 = r0;
0x00040804 mov r0, r4 | r0 = r4;
0x00040806 blx 0x4074 | fcn_00004074 ();
0x0004080a sub.w r3, r6, r8 | r3 = r6 - r8;
0x0004080e adds r0, 1 | r0++;
0x00040810 mla r0, r5, r3, r0 | __asm ("mla r0, r5, r3, r0");
0x00040814 bl 0x9324 | r0 = fcn_00009324 (r0);
0x00040818 mov r7, r0 | r7 = r0;
0x0004081a mov r5, r0 | r5 = r0;
| do {
0x0004081c mov r1, sl | r1 = sl;
0x0004081e mov r0, r4 | r0 = r4;
0x00040820 blx 0x3930 | r0 = fcn_00003930 ();
0x00040824 mov r3, r0 | r3 = r0;
| if (r0 == 0) {
0x00040826 cbz r0, 0x40846 | goto label_0;
| }
0x00040828 mov r0, r5 | r0 = r5;
0x0004082a subs r5, r3, r4 | r5 = r3 - r4;
0x0004082c mov r1, r4 | r1 = r4;
0x0004082e mov r2, r5 | r2 = r5;
0x00040830 add.w r4, r3, r8 | r4 = r3 + r8;
0x00040834 blx 0x3b30 | mmap64 ()
0x00040838 mov r2, r6 | r2 = r6;
0x0004083a add r0, r5 | r0 += r5;
0x0004083c mov r1, sb | r1 = sb;
0x0004083e blx 0x3b30 | r0 = mmap64 ()
0x00040842 adds r5, r0, r6 | r5 = r0 + r6;
0x00040844 b 0x4081c |
| } while (1);
| label_0:
0x00040846 mov r1, r4 | r1 = r4;
0x00040848 mov r0, r5 | r0 = r5;
0x0004084a blx 0x3e3c | getmntent ();
0x0004084e mov r0, r7 | r0 = r7;
0x00040850 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| }
r2dec has crashed (info: /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/busybox.nosuid @ 0x409a8).
Please report the bug at https://github.com/radareorg/r2dec-js/issues
Use the option '--issue' or the command 'pddi' to generate
the needed data for the issue.
[*] Function mmap used 42 times busybox.nosuid