[*] Binary protection state of libapr-1.so.0.7.2
Full RELRO Canary found NX enabled DSO No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of libapr-1.so.0.7.2
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0xee9c */
| #include <stdint.h>
|
; (fcn) fcn.0000ee9c () | void fcn_0000ee9c (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;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x0000ee9c svcmi 0xf0e92d | __asm ("svcmi 0xf0e92d");
0x0000eea0 mov r6, r1 | r6 = r1;
0x0000eea2 ldr r7, [r0] | r7 = *(r0);
0x0000eea4 sub sp, 0x14 |
0x0000eea6 mov r5, r0 | r5 = r0;
0x0000eea8 and r1, r2, 8 | r1 = r2 & 8;
0x0000eeac and sb, r2, 1 | sb = r2 & 1;
0x0000eeb0 and r4, r2, 2 | r4 = r2 & 2;
0x0000eeb4 ldrb.w sl, [r7] | sl = *(r7);
0x0000eeb8 cmp.w sl, 0x5b |
| if (sl == 0x5b) {
0x0000eebc beq 0xef58 | goto label_12;
| }
0x0000eebe cmp.w sl, 0x3f |
| if (sl == 0x3f) {
0x0000eec2 beq 0xef26 | goto label_13;
| }
0x0000eec4 eor r3, sb, 1 | r3 = sb ^ 1;
0x0000eec8 cmp.w sl, 0x5c |
0x0000eecc ite ne |
| if (sl == 0x5c) {
0x0000eece movne r3, 0 | r3 = 0;
| }
| if (sl != 0x5c) {
0x0000eed0 andeq r3, r3, 1 | r3 &= 1;
| }
0x0000eed4 cmp r3, 0 |
| if (r3 != 0) {
0x0000eed6 bne 0xef84 | goto label_14;
| }
| do {
| label_8:
0x0000eed8 ldr r3, [r6] | r3 = *(r6);
0x0000eeda ldrb.w r8, [r3] | r8 = *(r3);
0x0000eede cmp r8, sl |
0x0000eee0 it eq |
| if (r8 != sl) {
0x0000eee2 moveq r0, 0 | r0 = 0;
| }
| if (r8 != sl) {
0x0000eee4 beq 0xef14 |
| label_0:
0x0000eee6 cmp r1, 0 |
| if (r1 == 0) {
0x0000eee8 beq 0xefb8 | goto label_15;
| }
0x0000eeea blx 0xab10 | r0 = fcn_0000ab10 ();
0x0000eeee ldr r3, [r0] | r3 = *(r0);
0x0000eef0 sxth.w sb, r8 | __asm ("sxth.w sb, r8");
0x0000eef4 sxth.w fp, sl | __asm ("sxth.w fp, sl");
0x0000eef8 ldrh.w r2, [r3, sb, lsl 1] | offset_0 = sb << 1;
| r2 = *((r3 + offset_0));
0x0000eefc lsls r2, r2, 0x17 | r2 <<= 0x17;
| if (r2 >= r2) {
0x0000eefe bpl 0xefb0 | goto label_16;
| }
| label_3:
0x0000ef00 blx 0xa7cc | r0 = dlopen ();
0x0000ef04 ldr r3, [r0] | r3 = *(r0);
0x0000ef06 ldr.w r0, [r3, sb, lsl 2] | offset_1 = sb << 2;
| r0 = *((r3 + offset_1));
0x0000ef0a ldr.w r3, [r3, fp, lsl 2] | offset_2 = fp << 2;
| r3 = *((r3 + offset_2));
0x0000ef0e subs r0, r0, r3 | r0 -= r3;
0x0000ef10 it ne |
| if (r0 != r0) {
0x0000ef12 movne r0, 1 | r0 = 1;
| goto label_4;
| }
| }
| label_4:
0x0000ef14 cmp.w r8, 0 |
0x0000ef18 it ne |
| if (r8 != 0) {
0x0000ef1a cmpne sl, 0 | __asm ("cmpne sl, 0");
| }
| if (r8 != 0) {
0x0000ef1e bne 0xef9e | goto label_17;
| }
| label_2:
0x0000ef20 add sp, 0x14 |
0x0000ef22 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_13:
0x0000ef26 ldr r3, [r6] | r3 = *(r6);
0x0000ef28 ldrb r0, [r3] | r0 = *(r3);
0x0000ef2a cmp r0, 0 |
| if (r0 == 0) {
0x0000ef2c beq.w 0xf062 | goto label_18;
| }
0x0000ef30 sub.w r0, r0, 0x2f | r0 -= 0x2f;
0x0000ef34 cmp r4, 0 |
0x0000ef36 clz r0, r0 | r0 &= r0;
0x0000ef3a lsr.w r0, r0, 5 | r0 >>= 5;
0x0000ef3e it eq |
| if (r4 != 0) {
0x0000ef40 moveq r0, 0 | r0 = 0;
| }
0x0000ef42 cmp r0, 0 |
| if (r0 != 0) {
0x0000ef44 bne.w 0xf062 | goto label_18;
| }
| label_1:
0x0000ef48 adds r7, 1 | r7++;
0x0000ef4a str r7, [r5] | *(r5) = r7;
0x0000ef4c ldr r3, [r6] | r3 = *(r6);
0x0000ef4e adds r3, 1 | r3++;
0x0000ef50 str r3, [r6] | *(r6) = r3;
0x0000ef52 add sp, 0x14 |
0x0000ef54 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_12:
0x0000ef58 adds r3, r7, 1 | r3 = r7 + 1;
0x0000ef5a str r3, [r0] | *(r0) = r3;
0x0000ef5c ldrb r2, [r7, 1] | r2 = *((r7 + 1));
0x0000ef5e cmp r2, 0x5e |
0x0000ef60 it ne |
| if (r2 != 0x5e) {
0x0000ef62 cmpne r2, 0x21 | __asm ("cmpne r2, 0x21");
| }
0x0000ef64 ittte eq |
| if (r2 != 0x5e) {
0x0000ef66 addeq r3, r7, 2 | r3 = r7 + 2;
| }
| if (r2 != 0x5e) {
0x0000ef68 moveq r8, 1 | r8 = 1;
| }
| if (r2 == 0x5e) {
0x0000ef6c strne r3, [r0] | *(r0) = r3;
| }
| if (r2 != 0x5e) {
0x0000ef6e mov.w r8, 0 | r8 = 0;
| }
0x0000ef72 it eq |
| if (r2 != 0x5e) {
0x0000ef74 ldrbeq r2, [r7, 2] | r2 = *((r7 + 2));
| }
0x0000ef76 cmp r2, 0x5d |
| if (r2 == 0x5d) {
0x0000ef78 beq 0xf06a | goto label_19;
| }
| if (r2 != 0) {
0x0000ef7a cbnz r2, 0xefbc | goto label_20;
| }
| label_5:
0x0000ef7c str r7, [r5] | *(r5) = r7;
0x0000ef7e ldrb.w sl, [r7] | sl = *(r7);
0x0000ef82 b 0xeed8 |
| } while (1);
| label_14:
0x0000ef84 ldrb r0, [r7, 1] | r0 = *((r7 + 1));
0x0000ef86 cmp r0, 0 |
| if (r0 != 0) {
0x0000ef88 bne 0xf070 | goto label_21;
| }
0x0000ef8a ldr r3, [r6] | r3 = *(r6);
0x0000ef8c ldrb.w r8, [r3] | r8 = *(r3);
0x0000ef90 cmp.w r8, 0x5c |
0x0000ef94 it ne |
| if (r8 != 0x5c) {
0x0000ef96 movne sl, 0x5c | sl = 0x5c;
| goto label_22;
| }
| if (r8 != 0x5c) {
| label_22:
0x0000ef9a bne 0xeee6 | goto label_0;
| }
0x0000ef9c mov sl, r8 | sl = r8;
| label_17:
0x0000ef9e cmp r4, 0 |
| if (r4 == 0) {
0x0000efa0 beq 0xef48 | goto label_1;
| }
0x0000efa2 cmp.w r8, 0x2f |
0x0000efa6 it ne |
| if (r8 == 0x2f) {
0x0000efa8 cmpne sl, 0x2f | __asm ("cmpne sl, 0x2f");
| goto label_23;
| }
| if (r8 != 0x2f) {
| label_23:
0x0000efac bne 0xef48 | goto label_1;
| }
0x0000efae b 0xef20 | goto label_2;
| label_16:
0x0000efb0 ldrh.w r3, [r3, fp, lsl 1] | offset_3 = fp << 1;
| r3 = *((r3 + offset_3));
0x0000efb4 lsls r3, r3, 0x17 | r3 <<= 0x17;
| if (r3 < r3) {
0x0000efb6 bmi 0xef00 | goto label_3;
| }
| label_15:
0x0000efb8 movs r0, 1 | r0 = 1;
0x0000efba b 0xef14 | goto label_4;
| label_20:
0x0000efbc mov.w fp, 1 |
| label_6:
0x0000efc0 eor r0, sb, 1 | r0 = sb ^ 1;
0x0000efc4 cmp r2, 0x5c |
0x0000efc6 ite ne |
| if (r2 == 0x5c) {
0x0000efc8 movne r0, 0 | r0 = 0;
| }
| if (r2 != 0x5c) {
0x0000efca andeq r0, r0, 1 | r0 &= 1;
| }
0x0000efce cmp r0, 0 |
| if (r0 != 0) {
0x0000efd0 bne.w 0xf138 | goto label_24;
| }
0x0000efd4 ldr r3, [r5] | r3 = *(r5);
| if (r4 == 0) {
| label_11:
0x0000efd6 cbz r4, 0xefde | goto label_7;
| }
0x0000efd8 ldrb r2, [r3] | r2 = *(r3);
0x0000efda cmp r2, 0x2f |
| if (r2 == 0x2f) {
0x0000efdc beq 0xef7c | goto label_5;
| }
| label_7:
0x0000efde ldrb r2, [r3, 1] | r2 = *((r3 + 1));
0x0000efe0 cmp r2, 0x2d |
| if (r2 == 0x2d) {
0x0000efe2 beq 0xf07c | goto label_25;
| }
| label_9:
0x0000efe4 ldr r2, [r6] | r2 = *(r6);
0x0000efe6 ldrb.w sl, [r2] | sl = *(r2);
0x0000efea ldrb r2, [r3] | r2 = *(r3);
0x0000efec cmp sl, r2 |
0x0000efee str r2, [sp] | *(sp) = r2;
0x0000eff0 it eq |
| if (sl != r2) {
0x0000eff2 moveq fp, 0 |
| }
| if (sl != r2) {
0x0000eff6 beq 0xf044 |
| if (r1 == 0) {
0x0000eff8 cbz r1, 0xf044 | goto label_26;
| }
0x0000effa strd r1, r3, [sp, 4] | __asm ("strd r1, r3, [var_4h]");
0x0000effe sxth.w sl, sl | __asm ("sxth.w sl, sl");
0x0000f002 blx 0xab10 | r0 = fcn_0000ab10 ();
0x0000f006 ldr r0, [r0] | r0 = *(r0);
0x0000f008 ldr r2, [sp] | r2 = *(sp);
0x0000f00a ldrd r1, r3, [sp, 4] | __asm ("ldrd r1, r3, [var_4h]");
0x0000f00e ldrh.w ip, [r0, sl, lsl 1] | offset_4 = sl << 1;
| ip = *((r0 + offset_4));
0x0000f012 sxth r2, r2 | __asm ("sxth r2, r2");
0x0000f014 tst.w ip, 0x100 |
| if ((ip & 0x100) == 0) {
0x0000f018 bne 0xf022 |
0x0000f01a ldrh.w r0, [r0, r2, lsl 1] | offset_5 = r2 << 1;
| r0 = *((r0 + offset_5));
0x0000f01e lsls r0, r0, 0x17 | r0 <<= 0x17;
| if (r0 >= r0) {
0x0000f020 bpl 0xf044 | goto label_26;
| }
| }
0x0000f022 strd r3, r2, [sp, 4] | __asm ("strd r3, r2, [var_4h]");
0x0000f026 str r1, [sp] | *(sp) = r1;
0x0000f028 blx 0xa7cc | dlopen ();
0x0000f02c ldr r2, [sp, 8] | r2 = var_8h;
0x0000f02e ldr r0, [r0] | r0 = *(r0);
0x0000f030 ldrd r1, r3, [sp] | __asm ("ldrd r1, r3, [sp]");
0x0000f034 ldr.w ip, [r0, r2, lsl 2] | offset_6 = r2 << 2;
| ip = *((r0 + offset_6));
0x0000f038 ldr.w r2, [r0, sl, lsl 2] | offset_7 = sl << 2;
| r2 = *((r0 + offset_7));
0x0000f03c cmp ip, r2 |
0x0000f03e it eq |
| if (ip == r2) {
0x0000f040 moveq fp, 0 | goto label_26;
| }
| }
| label_26:
0x0000f044 adds r3, 1 | r3++;
| label_10:
0x0000f046 str r3, [r5] | *(r5) = r3;
0x0000f048 ldrb r2, [r3] | r2 = *(r3);
0x0000f04a cmp r2, 0 |
| if (r2 == 0) {
0x0000f04c beq 0xef7c | goto label_5;
| }
0x0000f04e cmp r2, 0x5d |
| if (r2 != 0x5d) {
0x0000f050 bne 0xefc0 | goto label_6;
| }
0x0000f052 adds r3, 1 | r3++;
0x0000f054 eor.w r0, r8, fp | r0 = r8 ^ fp;
0x0000f058 str r3, [r5] | *(r5) = r3;
0x0000f05a ldr r3, [r6] | r3 = *(r6);
0x0000f05c adds r3, 1 | r3++;
0x0000f05e str r3, [r6] | *(r6) = r3;
0x0000f060 b 0xef20 | goto label_2;
| label_18:
0x0000f062 movs r0, 1 | r0 = 1;
0x0000f064 add sp, 0x14 |
0x0000f066 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_19:
0x0000f06a mov.w fp, 1 |
0x0000f06e b 0xefde | goto label_7;
| label_21:
0x0000f070 adds r3, r7, 1 | r3 = r7 + 1;
0x0000f072 str r3, [r5] | *(r5) = r3;
0x0000f074 ldrb.w sl, [r7, 1] | sl = *((r7 + 1));
0x0000f078 mov r7, r3 | r7 = r3;
0x0000f07a b 0xeed8 | goto label_8;
| label_25:
0x0000f07c ldrb r2, [r3, 2] | r2 = *((r3 + 2));
0x0000f07e cmp r2, 0x5d |
| if (r2 == 0x5d) {
0x0000f080 beq 0xefe4 | goto label_9;
| }
0x0000f082 eor r0, sb, 1 | r0 = sb ^ 1;
0x0000f086 cmp r2, 0x5c |
0x0000f088 ite ne |
| if (r2 == 0x5c) {
0x0000f08a movne r0, 0 | r0 = 0;
| }
| if (r2 != 0x5c) {
0x0000f08c andeq r0, r0, 1 | r0 &= 1;
| }
0x0000f090 adds r0, 2 | r0 += 2;
0x0000f092 adds r2, r3, r0 | r2 = r3 + r0;
0x0000f094 str r2, [r5] | *(r5) = r2;
0x0000f096 ldrb.w sl, [r3, r0] | sl = *((r3 + r0));
0x0000f09a cmp.w sl, 0 |
| if (sl == 0) {
0x0000f09e beq.w 0xef7c | goto label_5;
| }
0x0000f0a2 sub.w ip, sl, 0x2f |
0x0000f0a6 cmp r4, 0 |
0x0000f0a8 clz ip, ip |
0x0000f0ac lsr.w ip, ip, 5 |
0x0000f0b0 it eq |
| if (r4 != 0) {
0x0000f0b2 moveq ip, 0 |
| }
0x0000f0b6 cmp.w ip, 0 |
| if (ip != 0) {
0x0000f0ba bne.w 0xef7c | goto label_5;
| }
0x0000f0be ldr r0, [r6] | r0 = *(r6);
0x0000f0c0 ldrb r3, [r3] | r3 = *(r3);
0x0000f0c2 ldrb r0, [r0] | r0 = *(r0);
0x0000f0c4 str r3, [sp] | *(sp) = r3;
0x0000f0c6 cmp r0, r3 |
0x0000f0c8 it hs |
| if (r0 >= r3) {
0x0000f0ca cmphs sl, r0 | __asm ("cmphs sl, r0");
| }
0x0000f0cc it hs |
| if (r0 < r3) {
0x0000f0ce movhs fp, ip |
| }
| if (r0 < r3) {
0x0000f0d0 bhs 0xf134 |
| if (r1 == 0) {
0x0000f0d2 cbz r1, 0xf134 | goto label_27;
| }
0x0000f0d4 sxth r3, r0 | __asm ("sxth r3, r0");
0x0000f0d6 strd r1, r2, [sp, 8] | __asm ("strd r1, r2, [var_8h]");
0x0000f0da str r3, [sp, 4] | var_4h = r3;
0x0000f0dc blx 0xab10 | fcn_0000ab10 ();
0x0000f0e0 ldr r3, [sp, 4] | r3 = var_4h;
0x0000f0e2 ldr r0, [r0] | r0 = *(r0);
0x0000f0e4 ldrd r1, r2, [sp, 8] | __asm ("ldrd r1, r2, [var_8h]");
0x0000f0e8 ldrh.w ip, [r0, r3, lsl 1] | offset_8 = r3 << 1;
| ip = *((r0 + offset_8));
0x0000f0ec ldr r3, [sp] | r3 = *(sp);
0x0000f0ee tst.w ip, 0x100 |
0x0000f0f2 sxth r3, r3 | __asm ("sxth r3, r3");
| if ((ip & 0x100) == 0) {
0x0000f0f4 bne 0xf108 |
0x0000f0f6 ldrh.w ip, [r0, r3, lsl 1] | offset_9 = r3 << 1;
| ip = *((r0 + offset_9));
0x0000f0fa tst.w ip, 0x100 |
| if ((ip & 0x100) != 0) {
0x0000f0fe bne 0xf108 | goto label_28;
| }
0x0000f100 ldrh.w r0, [r0, sl, lsl 1] | offset_10 = sl << 1;
| r0 = *((r0 + offset_10));
0x0000f104 lsls r0, r0, 0x17 | r0 <<= 0x17;
| if (r0 >= r0) {
0x0000f106 bpl 0xf134 | goto label_27;
| }
| }
| label_28:
0x0000f108 strd r2, r3, [sp, 8] | __asm ("strd r2, r3, [var_8h]");
0x0000f10c str r1, [sp] | *(sp) = r1;
0x0000f10e blx 0xa7cc | dlopen ();
0x0000f112 ldr r3, [sp, 4] | r3 = var_4h;
0x0000f114 ldr r0, [r0] | r0 = *(r0);
0x0000f116 ldr r1, [sp] | r1 = *(sp);
0x0000f118 ldr r2, [sp, 8] | r2 = var_8h;
0x0000f11a ldr.w ip, [r0, r3, lsl 2] | offset_11 = r3 << 2;
| ip = *((r0 + offset_11));
0x0000f11e ldr r3, [sp, 0xc] | r3 = var_ch;
0x0000f120 ldr.w r3, [r0, r3, lsl 2] | offset_12 = r3 << 2;
| r3 = *((r0 + offset_12));
0x0000f124 cmp ip, r3 |
| if (ip < r3) {
0x0000f126 blt 0xf134 | goto label_27;
| }
0x0000f128 ldr.w r3, [r0, sl, lsl 2] | offset_13 = sl << 2;
| r3 = *((r0 + offset_13));
0x0000f12c cmp r3, ip |
0x0000f12e it ge |
| if (r3 >= ip) {
0x0000f130 movge fp, 0 | goto label_27;
| }
| }
| label_27:
0x0000f134 adds r3, r2, 1 | r3 = r2 + 1;
0x0000f136 b 0xf046 | goto label_10;
| label_24:
0x0000f138 adds r2, r3, 1 | r2 = r3 + 1;
0x0000f13a str r2, [r5] | *(r5) = r2;
0x0000f13c ldrb r3, [r3, 1] | r3 = *((r3 + 1));
0x0000f13e cmp r3, 0 |
| if (r3 == 0) {
0x0000f140 beq.w 0xef7c | goto label_5;
| }
0x0000f144 mov r3, r2 | r3 = r2;
0x0000f146 b 0xefd6 | goto label_11;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0xf778 */
| #include <stdint.h>
|
; (fcn) fcn.0000f778 () | void fcn_0000f778 (int16_t arg_0h, int16_t arg_58h, uint32_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_1h;
| int16_t var_0h;
| int16_t var_8h;
| int16_t var_14h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0000f778 cmp r0, 0x4e |
0x0000f77a push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0000f77e it ge |
| if (arg_0hx4e < ) {
0x0000f780 movge r0, 0x4e | r0 = 0x4e;
| }
0x0000f782 ldr r4, [pc, 0x1fc] |
0x0000f784 mov r8, r0 | r8 = r0;
0x0000f786 mov r7, r3 | r7 = r3;
0x0000f788 ldr r0, [pc, 0x1f8] | r0 = *(0xf984);
0x0000f78a mov r6, r1 | r6 = r1;
0x0000f78c add r4, pc | r4 = 0x1f112;
0x0000f78e vpush {d8, d9, d10} | __asm ("vpush {d8, d9, d10}");
0x0000f790 ldrh r6, [r0, 0x18] | r6 = *((r0 + 0x18));
0x0000f792 vcmpe.f64 d0, 0 | __asm ("vcmpe.f64 d0, 0");
0x0000f796 sub sp, 0x1c |
0x0000f798 ldr r0, [r4, r0] |
0x0000f79a mov sb, sp | sb = sp;
0x0000f79c vmrs apsr_nzcv, fpscr | __asm ("vmrs apsr_nzcv, fpscr");
0x0000f7a0 ite mi |
| if (arg_0hx4e >= ) {
0x0000f7a2 movmi r3, 1 | r3 = 1;
| }
| if (arg_0hx4e < ) {
0x0000f7a4 movpl r3, 0 | r3 = 0;
| }
0x0000f7a6 ldr r0, [r0] | r0 = *(0x1f112);
0x0000f7a8 str r0, [sp, 0x14] | var_14h = r0;
0x0000f7aa mov.w r0, 0 | r0 = 0;
0x0000f7ae it mi |
| if (arg_0hx4e < ) {
0x0000f7b0 vnegmi d0, d0 | __asm ("vnegmi d0, d0");
| }
0x0000f7b4 mov r0, sb | r0 = sb;
0x0000f7b6 str r3, [r2] | *(r2) = r3;
0x0000f7b8 ldr r5, [sp, 0x58] | r5 = *(arg_58h);
0x0000f7ba blx 0xa2fc | fcn_0000a2fc ();
0x0000f7be vldr d16, [sp] | __asm ("vldr d16, [sp]");
0x0000f7c2 vmov.f64 d9, d0 | __asm ("vmov.f64 d9, d0");
0x0000f7c6 vcmp.f64 d16, 0 | __asm ("vcmp.f64 d16, 0");
0x0000f7ca vmrs apsr_nzcv, fpscr | __asm ("vmrs apsr_nzcv, fpscr");
| if (arg_0hx4e == ) {
0x0000f7ce beq.w 0xf8e4 | goto label_2;
| }
0x0000f7d2 vldr d8, [pc, 0x1a4] | __asm ("vldr d8, [0x0000f97c]");
0x0000f7d6 add.w r4, r5, 0x50 | r4 = r5 + 0x50;
0x0000f7da vmov.f64 d10, 1.000000e+01 | __asm ("vmov.f64 d10, 1");
0x0000f7de mov.w sl, 0 | sl = 0;
0x0000f7e2 mov fp, r4 |
| do {
0x0000f7e4 vdiv.f64 d0, d16, d10 | __asm ("vdiv.f64 d0, d16, d10");
0x0000f7e8 mov r0, sb | r0 = sb;
0x0000f7ea blx 0xa2fc | fcn_0000a2fc ();
0x0000f7ee vadd.f64 d16, d0, d8 | __asm ("vadd.f64 d16, d0, d8");
0x0000f7f2 add.w sl, sl, 1 | sl++;
0x0000f7f6 cmp.w sl, 0x50 |
0x0000f7fa vstr d0, [sp, 8] | __asm ("vstr d0, [sp, 8]");
0x0000f7fe vmul.f64 d16, d16, d10 | __asm ("vmul.f64 d16, d16, d10");
0x0000f802 vcvt.s32.f64 s15, d16 | __asm ("vcvt.s32.f64 s15, d16");
0x0000f806 vmov r2, s15 | __asm ("vmov r2, s15");
0x0000f80a add.w r2, r2, 0x30 | r2 += 0x30;
0x0000f80e strb r2, [fp, -0x1]! | *((fp -= 0x1)) = r2;
| if (sl == 0x50) {
0x0000f812 beq 0xf822 | goto label_3;
| }
0x0000f814 vldr d16, [sp] | __asm ("vldr d16, [sp]");
0x0000f818 vcmp.f64 d16, 0 | __asm ("vcmp.f64 d16, 0");
0x0000f81c vmrs apsr_nzcv, fpscr | __asm ("vmrs apsr_nzcv, fpscr");
0x0000f820 bne 0xf7e4 |
| } while (sl != 0x50);
| label_3:
0x0000f822 cmp r4, fp |
| if (r4 < fp) {
0x0000f824 bls.w 0xf962 | goto label_4;
| }
0x0000f828 subs r2, r5, 1 | r2 = r5 - 1;
0x0000f82a mov r3, fp | r3 = fp;
| do {
0x0000f82c ldrb r1, [r3], 1 | r1 = *(r3);
| r3++;
0x0000f830 cmp r4, r3 |
0x0000f832 strb r1, [r2, 1]! | *((r2 += 1)) = r1;
0x0000f836 bne 0xf82c |
| } while (r4 != r3);
0x0000f838 sub.w r4, r4, fp | r4 -= fp;
0x0000f83c add r4, r5 | r4 += r5;
| label_1:
0x0000f83e add.w fp, r5, r8 |
| if (r7 == 0) {
0x0000f842 cbnz r7, 0xf846 |
0x0000f844 add fp, sl |
| }
0x0000f846 cmp fp, r5 |
| if (fp <= r5) {
0x0000f848 blo.w 0xf956 | goto label_5;
| }
0x0000f84c cmp r4, fp |
0x0000f84e add.w r8, r5, 0x50 | r8 = r5 + 0x50;
0x0000f852 str.w sl, [r6] | __asm ("str.w sl, [r6]");
| if (r4 > fp) {
0x0000f856 bhi 0xf88e | goto label_6;
| }
0x0000f858 cmp r4, r8 |
| if (r4 >= r8) {
0x0000f85a bhs 0xf88e | goto label_6;
| }
0x0000f85c vmov.f64 d8, 1.000000e+01 | __asm ("vmov.f64 d8, 1");
0x0000f860 add.w sb, sp, 8 | sb += var_8h;
0x0000f864 b 0xf86a |
| while (fp >= r4) {
0x0000f866 cmp r4, r8 |
| if (r4 == r8) {
0x0000f868 beq 0xf88e | goto label_6;
| }
0x0000f86a vmul.f64 d0, d9, d8 | __asm ("vmul.f64 d0, d9, d8");
0x0000f86e mov r0, sb | r0 = sb;
0x0000f870 blx 0xa2fc | fcn_0000a2fc ();
0x0000f874 vldr d16, [sp, 8] | __asm ("vldr d16, [sp, 8]");
0x0000f878 vmov.f64 d9, d0 | __asm ("vmov.f64 d9, d0");
0x0000f87c vcvt.s32.f64 s15, d16 | __asm ("vcvt.s32.f64 s15, d16");
0x0000f880 vmov r2, s15 | __asm ("vmov r2, s15");
0x0000f884 adds r2, 0x30 | r2 += 0x30;
0x0000f886 strb r2, [r4], 1 | *(r4) = r2;
| r4++;
0x0000f88a cmp fp, r4 |
0x0000f88c bhs 0xf866 |
| }
| label_6:
0x0000f88e cmp fp, r8 |
| if (fp >= r8) {
0x0000f890 bhs 0xf930 | goto label_7;
| }
0x0000f892 ldrb.w r3, [fp] | r3 = *(fp);
0x0000f896 adds r3, 5 | r3 += 5;
0x0000f898 uxtb r3, r3 | r3 = (int8_t) r3;
0x0000f89a cmp r3, 0x39 |
0x0000f89c strb.w r3, [fp] | *(fp) = r3;
| if (r3 < 0x39) {
0x0000f8a0 bls 0xf8dc | goto label_8;
| }
0x0000f8a2 mov r3, fp | r3 = fp;
0x0000f8a4 movs r1, 0x30 | r1 = 0x30;
0x0000f8a6 movs r0, 0x31 | r0 = 0x31;
0x0000f8a8 b 0xf8ba |
| while (r5 <= r3) {
0x0000f8aa ldrb r2, [r3, -0x1] | r2 = *((r3 - 0x1));
0x0000f8ae subs r3, 1 | r3--;
0x0000f8b0 adds r2, 1 | r2++;
0x0000f8b2 uxtb r2, r2 | r2 = (int8_t) r2;
0x0000f8b4 cmp r2, 0x39 |
0x0000f8b6 strb r2, [r3] | *(r3) = r2;
| if (r2 < 0x39) {
0x0000f8b8 bls 0xf8dc | goto label_8;
| }
| label_0:
0x0000f8ba cmp r5, r3 |
0x0000f8bc strb r1, [r3] | *(r3) = r1;
0x0000f8be blo 0xf8aa |
| }
0x0000f8c0 strb r0, [r3] | *(r3) = r0;
0x0000f8c2 ldr r2, [r6] | r2 = *(r6);
0x0000f8c4 adds r2, 1 | r2++;
0x0000f8c6 str r2, [r6] | *(r6) = r2;
| if (r7 == 0) {
0x0000f8c8 cbnz r7, 0xf8d6 |
0x0000f8ca cmp r5, fp |
0x0000f8cc add.w fp, fp, 1 |
0x0000f8d0 it lo |
| if (r5 < fp) {
0x0000f8d2 strblo r1, [fp, -0x1] | *((fp - 0x1)) = r1;
| goto label_9;
| }
| }
| label_9:
0x0000f8d6 ldrb r2, [r3] | r2 = *(r3);
0x0000f8d8 cmp r2, 0x39 |
| if (r2 > 0x39) {
0x0000f8da bhi 0xf8ba | goto label_0;
| }
| label_8:
0x0000f8dc movs r3, 0 | r3 = 0;
0x0000f8de strb.w r3, [fp] | *(fp) = r3;
0x0000f8e2 b 0xf936 | goto label_10;
| label_2:
0x0000f8e4 vcmpe.f64 d0, 0 | __asm ("vcmpe.f64 d0, 0");
0x0000f8e8 vmrs apsr_nzcv, fpscr | __asm ("vmrs apsr_nzcv, fpscr");
0x0000f8ec itt le |
| if (r3 > 0) {
0x0000f8ee movle r4, r5 | r4 = r5;
| }
| if (r3 <= 0) {
0x0000f8f0 movle sl, 0 | sl = 0;
| goto label_11;
| }
| if (r3 <= 0) {
| label_11:
0x0000f8f4 ble 0xf83e | goto label_1;
| }
0x0000f8f6 vmov.f64 d17, 1.000000e+01 | __asm ("vmov.f64 d17, 1");
0x0000f8fa vmov.f64 d18, 1.000000e+00 | __asm ("vmov.f64 d18, 1");
0x0000f8fe vmul.f64 d16, d0, d17 | __asm ("vmul.f64 d16, d0, d17");
0x0000f902 vcmpe.f64 d16, d18 | __asm ("vcmpe.f64 d16, d18");
0x0000f906 vmrs apsr_nzcv, fpscr | __asm ("vmrs apsr_nzcv, fpscr");
0x0000f90a it mi |
| if (r3 >= 0) {
0x0000f90c movmi sl, 0 | sl = 0;
| }
| if (r3 >= 0) {
0x0000f910 bpl 0xf966 | goto label_12;
| }
| do {
0x0000f912 vmov.f64 d9, d16 | __asm ("vmov.f64 d9, d16");
0x0000f916 add.w sl, sl, -1 | sl += -1;
0x0000f91a vmul.f64 d16, d16, d17 | __asm ("vmul.f64 d16, d16, d17");
0x0000f91e vcmpe.f64 d16, d18 | __asm ("vcmpe.f64 d16, d18");
0x0000f922 vmrs apsr_nzcv, fpscr | __asm ("vmrs apsr_nzcv, fpscr");
0x0000f926 bmi 0xf912 |
| } while (r3 < 0);
0x0000f928 mov r4, r5 | r4 = r5;
0x0000f92a vstr d16, [sp, 8] | __asm ("vstr d16, [sp, 8]");
0x0000f92e b 0xf83e | goto label_1;
| label_7:
0x0000f930 movs r3, 0 | r3 = 0;
0x0000f932 strb.w r3, [r5, 0x4f] | *((r5 + 0x4f)) = r3;
| do {
| label_10:
0x0000f936 ldr r2, [pc, 0x50] |
0x0000f938 ldr r3, [pc, 0x48] | r3 = *(0xf984);
0x0000f93a add r2, pc | r2 = 0x1f2c8;
0x0000f93c ldr r3, [r2, r3] | r3 = *(0x1f2c8);
0x0000f93e ldr r2, [r3] | r2 = *(0x1f2c8);
0x0000f940 ldr r3, [sp, 0x14] | r3 = var_14h;
0x0000f942 eors r2, r3 | r2 ^= r3;
0x0000f944 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000f948 bne 0xf972 | goto label_13;
| }
0x0000f94a mov r0, r5 | r0 = r5;
0x0000f94c add sp, 0x1c |
0x0000f94e vpop {d8, d9, d10} | __asm ("vpop {d8, d9, d10}");
0x0000f952 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_5:
0x0000f956 rsb.w r3, r8, 0 | r3 = r8 - ;
0x0000f95a movs r2, 0 | r2 = 0;
0x0000f95c str r3, [r6] | *(r6) = r3;
0x0000f95e strb r2, [r5] | *(r5) = r2;
0x0000f960 b 0xf936 |
| } while (1);
| label_4:
0x0000f962 mov r4, r5 | r4 = r5;
0x0000f964 b 0xf83e | goto label_1;
| label_12:
0x0000f966 mov r4, r5 | r4 = r5;
0x0000f968 mov.w sl, 0 | sl = 0;
0x0000f96c vstr d16, [sp, 8] | __asm ("vstr d16, [sp, 8]");
0x0000f970 b 0xf83e | goto label_1;
| label_13:
0x0000f972 blx 0xabc8 | pthread_attr_getdetachstate ();
0x0000f976 nop |
0x0000f978 subs r0, r7, 2 | r0 = r7 - 2;
0x0000f97a invalid |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x11fac */
| #include <stdint.h>
|
; (fcn) fcn.00011fac () | void fcn_00011fac (int16_t arg1, uint32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x00011fac invalid |
0x00011fb0 ldrd r2, r1, [r0, 4] | __asm ("ldrd r2, r1, [r0, 4]");
0x00011fb4 mov r4, r0 | r4 = r0;
0x00011fb6 cmp r1, r2 |
| if (r1 >= r2) {
0x00011fb8 bhs 0x11fc6 | goto label_3;
| }
0x00011fba ldr r5, [r0] | r5 = *(r0);
| label_0:
0x00011fbc adds r2, r1, 1 | r2 = r1 + 1;
0x00011fbe str r2, [r4, 8] | *((r4 + 8)) = r2;
0x00011fc0 str.w r6, [r5, r1, lsl 2] | __asm ("str.w r6, [r5, r1, lsl 2]");
| do {
| label_2:
0x00011fc4 pop {r3, r4, r5, r6, r7, pc} |
| if (r1 != 0) {
| label_3:
0x00011fc6 cbnz r1, 0x11fee | goto label_4;
| }
0x00011fc8 ldr r0, [r4, 0xc] | r0 = *((r4 + 0xc));
0x00011fca movs r1, 0x80 | r1 = 0x80;
0x00011fcc movs r7, 0x20 | r7 = 0x20;
| if (r0 == 0) {
0x00011fce cbz r0, 0x11ff8 | goto label_5;
| }
| label_1:
0x00011fd0 blx 0xa974 | r0 = fcn_0000a974 ();
0x00011fd4 mov r5, r0 | r5 = r0;
0x00011fd6 cmp r0, 0 |
0x00011fd8 beq 0x11fc4 |
| } while (r0 == 0);
0x00011fda ldr r1, [r4] | r1 = *(r4);
| if (r1 != 0) {
0x00011fdc cbz r1, 0x11fe6 |
0x00011fde ldr r2, [r4, 8] | r2 = *((r4 + 8));
0x00011fe0 lsls r2, r2, 2 | r2 <<= 2;
0x00011fe2 blx 0xa78c | fcn_0000a78c ();
| }
0x00011fe6 ldr r1, [r4, 8] | r1 = *((r4 + 8));
0x00011fe8 strd r5, r7, [r4] | __asm ("strd r5, r7, [r4]");
0x00011fec b 0x11fbc | goto label_0;
| label_4:
0x00011fee ldr r0, [r4, 0xc] | r0 = *((r4 + 0xc));
0x00011ff0 lsls r7, r1, 1 | r7 = r1 << 1;
0x00011ff2 lsls r1, r1, 3 | r1 <<= 3;
0x00011ff4 cmp r0, 0 |
| if (r0 != 0) {
0x00011ff6 bne 0x11fd0 | goto label_1;
| }
| label_5:
0x00011ff8 ldr r0, [r4] | r0 = *(r4);
0x00011ffa blx 0xafdc | r0 = pthread_self ();
0x00011ffe mov r5, r0 | r5 = r0;
0x00012000 cmp r0, 0 |
| if (r0 == 0) {
0x00012002 beq 0x11fc4 | goto label_2;
| }
0x00012004 ldr r1, [r4, 8] | r1 = *((r4 + 8));
0x00012006 strd r5, r7, [r4] | __asm ("strd r5, r7, [r4]");
0x0001200a b 0x11fbc | 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/lib/libapr-1.so.0.7.2 @ 0x148ec */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.000148ec () | void fcn_000148ec (int16_t arg1, int16_t arg2, int16_t arg3, uint32_t arg4) {
| int16_t var_0h;
| int16_t var_4h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x000148ec push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x000148f0 cmp r3, 2 |
0x000148f2 ldr.w r8, [pc, 0x15c] |
0x000148f6 sub sp, 8 |
0x000148f8 mov r6, r3 | r6 = r3;
0x000148fa mov r5, r0 | r5 = r0;
0x000148fc mov r4, r1 | r4 = r1;
0x000148fe mov r7, r2 | r7 = r2;
0x00014900 add r8, pc | r8 = 0x29356;
| if (r3 != 2) {
0x00014902 bne 0x149c8 | goto label_5;
| }
0x00014904 ldr r3, [r0] | r3 = *(r0);
0x00014906 movs r0, 0x16 | r0 = 0x16;
0x00014908 cmp r3, 0 |
| if (r3 == 0) {
0x0001490a beq 0x149b2 | goto label_6;
| }
0x0001490c ldr r1, [r3, 4] | r1 = *((r3 + 4));
0x0001490e ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x00014910 blx 0xadb4 | sem_close ();
0x00014914 ldr.w sb, [r5] | sb = *(r5);
0x00014916 str r0, [sp] | *(sp) = r0;
0x00014918 mov.w r3, 0x800 |
0x0001491c movt r3, 0x100 | r3 = 0x1000800;
0x00014920 ldr.w r2, [sb, 0xc] | r2 = *((sb + 0xc));
0x00014924 ands r3, r2 | r3 &= r2;
0x00014926 cmp r3, 0 |
| if (r3 != 0) {
0x00014928 bne 0x149b8 | goto label_7;
| }
0x0001492a adds r0, 1 | r0++;
| if (r0 == 1) {
0x0001492c beq 0x149bc | goto label_8;
| }
0x0001492e ldr.w r0, [sb, 4] | r0 = *((sb + 4));
0x00014932 movs r1, 1 | r1 = 1;
0x00014934 blx 0xaf60 | r0 = fcn_0000af60 ();
0x00014938 adds r3, r0, 1 | r3 = r0 + 1;
| if (r3 == r0) {
0x0001493a beq 0x149bc | goto label_8;
| }
0x0001493c ldr r3, [r5] | r3 = *(r5);
0x0001493e orr r2, r0, 1 | r2 = r0 | 1;
0x00014942 mov r1, r6 | r1 = r6;
0x00014944 ldr r0, [r3, 4] | r0 = *((r3 + 4));
0x00014946 blx 0xaf60 | fcn_0000af60 ();
0x0001494a adds r0, 1 | r0++;
| if (r0 == 1) {
0x0001494c beq 0x149bc | goto label_8;
| }
0x0001494e ldr.w sb, [r5] | sb = *(r5);
| do {
0x00014952 ldr r1, [r4, 8] | r1 = *((r4 + 8));
0x00014954 mov r0, r7 | r0 = r7;
0x00014956 blx 0xad9c | fcn_0000ad9c ();
0x0001495a ldr r3, [r4, 0x20] | r3 = *((r4 + 0x20));
0x0001495c str.w r0, [sb, 8] | __asm ("str.w r0, [sb, 8]");
0x00014960 ldr.w sb, [r5] | sb = *(r5);
0x00014964 str.w r3, [sb, 0x20] | __asm ("str.w r3, [sb, 0x20]");
0x00014968 cmp r3, 0 |
| if (r3 == 0) {
0x0001496a beq 0x14a10 | goto label_9;
| }
| label_0:
0x0001496c ldr.w r1, [sb, 0x48] | r1 = *((sb + 0x48));
0x00014970 cmp r1, 0 |
| if (r1 == 0) {
0x00014972 beq 0x14a1a | goto label_10;
| }
| label_3:
0x00014974 ldr.w r3, [sb, 0x2c] | r3 = *((sb + 0x2c));
0x00014978 mov r1, sb | r1 = sb;
0x0001497a cmp r3, 0 |
| if (r3 == 0) {
0x0001497c beq 0x14a3a | goto label_11;
| }
| label_4:
0x0001497e ldr r3, [r4, 0x24] | r3 = *((r4 + 0x24));
0x00014980 cmp r6, 2 |
0x00014982 str r3, [r1, 0x24] | *((r1 + 0x24)) = r3;
0x00014984 ldr r3, [r4, 0x28] | r3 = *((r4 + 0x28));
0x00014986 str r3, [r1, 0x28] | *((r1 + 0x28)) = r3;
| if (r6 != 2) {
0x00014988 beq 0x149b0 |
| label_1:
0x0001498a ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x0001498c ldr r0, [pc, 0xc4] | r0 = *(0x14a54);
0x0001498e ldr r2, [pc, 0xc8] | r2 = *(0x14a5a);
0x00014990 bic r3, r3, 0x1000000 | r3 = BIT_MASK (r3, 0x1000000);
0x00014994 bic r3, r3, 0x800 | r3 = BIT_MASK (r3, 0x800);
0x00014998 str r3, [r1, 0xc] | *((r1 + 0xc)) = r3;
0x0001499a ldr.w r3, [r8, r0] | r3 = *((r8 + r0));
0x0001499e ldr r0, [r1] | r0 = *(r1);
0x000149a0 str r3, [sp] | *(sp) = r3;
0x000149a2 ldr.w r3, [r8, r2] | r3 = *((r8 + r2));
0x000149a6 str r3, [sp, 4] | var_4h = r3;
0x000149a8 ldrd r3, r2, [sp] | __asm ("ldrd r3, r2, [sp]");
0x000149ac blx 0xa000 | fcn_0000a000 ();
| }
| label_2:
0x000149b0 movs r0, 0 | r0 = 0;
| label_6:
0x000149b2 add sp, 8 |
0x000149b4 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_7:
0x000149b8 adds r0, 1 | r0++;
0x000149ba bne 0x14952 |
| } while (r0 != 1);
| do {
| label_8:
0x000149bc blx 0xb12c | r0 = fcn_0000b12c ();
0x000149c0 ldr r0, [r0] | r0 = *(r0);
0x000149c2 add sp, 8 |
0x000149c4 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_5:
0x000149c8 ldr r0, [r1, 4] | r0 = *((r1 + 4));
0x000149ca blx 0xae28 | r0 = fcn_0000ae28 ();
0x000149ce cmp.w r0, -1 |
0x000149d2 mov sb, r0 | sb = r0;
0x000149d4 beq 0x149bc |
| } while (r0 == -1);
0x000149d6 movs r1, 0x50 | r1 = 0x50;
0x000149d8 mov r0, r7 | r0 = r7;
0x000149da blx 0xa974 | fcn_0000a974 ();
0x000149de movs r2, 0x50 | r2 = 0x50;
0x000149e0 movs r1, 0 | r1 = 0;
0x000149e2 blx 0xa210 | fcn_0000a210 ();
0x000149e6 ldr r1, [r4, 8] | r1 = *((r4 + 8));
0x000149e8 mov sl, r0 | sl = r0;
0x000149ea str r0, [r5] | *(r5) = r0;
0x000149ec strd r7, sb, [r0] | __asm ("strd r7, sb, [r0]");
0x000149f0 mov r0, r7 | r0 = r7;
0x000149f2 blx 0xad9c | fcn_0000ad9c ();
0x000149f6 ldr r3, [r4, 0x20] | r3 = *((r4 + 0x20));
0x000149f8 ldr r1, [r5] | r1 = *(r5);
0x000149fa str.w r0, [sl, 8] | __asm ("str.w r0, [sl, 8]");
0x000149fe mov sb, r1 | sb = r1;
0x00014a00 str r3, [r1, 0x20] | *((r1 + 0x20)) = r3;
0x00014a02 cmp r3, 0 |
| if (r3 != 0) {
0x00014a04 bne 0x1496c | goto label_0;
| }
0x00014a06 ldrd r2, r3, [r4, 0x24] | __asm ("ldrd r2, r3, [r4, 0x24]");
0x00014a0a strd r2, r3, [r1, 0x24] | __asm ("strd r2, r3, [r1, 0x24]");
0x00014a0e b 0x1498a | goto label_1;
| label_9:
0x00014a10 ldrd r2, r3, [r4, 0x24] | __asm ("ldrd r2, r3, [r4, 0x24]");
0x00014a14 strd r2, r3, [sb, 0x24] | __asm ("strd r2, r3, [sb, 0x24]");
0x00014a18 b 0x149b0 | goto label_2;
| label_10:
0x00014a1a ldr r3, [r4, 0x48] | r3 = *((r4 + 0x48));
0x00014a1c cmp r3, 0 |
| if (r3 == 0) {
0x00014a1e beq 0x14974 | goto label_3;
| }
0x00014a20 add.w r0, sb, 0x48 | r0 = sb + 0x48;
0x00014a24 mov r2, r7 | r2 = r7;
0x00014a26 blx 0xa2cc | fcn_0000a2cc ();
0x00014a2a ldr.w sb, [r5] | sb = *(r5);
0x00014a2e ldr.w r3, [sb, 0x20] | r3 = *((sb + 0x20));
0x00014a32 mov r1, sb | r1 = sb;
0x00014a34 cmp r3, 0 |
| if (r3 != 0) {
0x00014a36 bne 0x14974 | goto label_3;
| }
0x00014a38 b 0x1497e | goto label_4;
| label_11:
0x00014a3a ldr r1, [r4, 0x34] | r1 = *((r4 + 0x34));
0x00014a3c mov r0, r7 | r0 = r7;
0x00014a3e blx 0xa974 | fcn_0000a974 ();
0x00014a42 ldr r1, [r5] | r1 = *(r5);
0x00014a44 ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x00014a46 str.w r0, [sb, 0x2c] | __asm ("str.w r0, [sb, 0x2c]");
0x00014a4a str r3, [r1, 0x34] | *((r1 + 0x34)) = r3;
0x00014a4c b 0x1497e | goto label_4;
| }
r2dec has crashed (info: /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x15060).
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/lib/libapr-1.so.0.7.2 @ 0x16204 */
| #include <stdint.h>
|
; (fcn) fcn.00016204 () | void fcn_00016204 (int16_t arg_0h, int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_4h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x00016204 ldr r3, [r0, 0x3c] | r3 = *(arg_0hx3c);
0x00016206 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001620a sub sp, 0xc |
0x0001620c ldr r4, [r2] | r4 = *(r2);
0x0001620e mov r5, r0 | r5 = r0;
0x00016210 cmp r3, 1 |
0x00016212 mov sb, r2 | sb = r2;
0x00016214 mov.w fp, 0 |
0x00016218 str r1, [sp, 4] | var_4h = r1;
0x0001621a mov r6, r4 | r6 = r4;
| if (r3 == 1) {
0x0001621c beq 0x162fa | goto label_5;
| }
| label_4:
0x0001621e ldr r3, [r5, 0x28] | r3 = *((r5 + 0x28));
0x00016220 adds r2, r3, 1 | r2 = r3 + 1;
| if (r2 == r3) {
0x00016222 beq 0x162d0 | goto label_6;
| }
0x00016224 ldr r7, [sp, 4] | r7 = var_4h;
0x00016226 subs r4, 1 | r4--;
0x00016228 sbc.w fp, fp, fp | __asm ("sbc.w fp, fp, fp");
0x0001622c mov r6, r4 | r6 = r4;
0x0001622e strb r3, [r7], 1 | *(r7) = r3;
| r7++;
0x00016232 mov.w r3, -1 | r3 = -1;
0x00016236 str r3, [r5, 0x28] | *((r5 + 0x28)) = r3;
0x00016238 orrs.w r3, r4, fp | r3 = r4 | fp;
0x0001623c itt eq |
| if (r3 != r4) {
0x0001623e moveq r3, 1 | r3 = 1;
| }
| if (r3 != r4) {
0x00016240 streq r3, [sb] | *(sb) = r3;
| }
| if (r3 == r4) {
0x00016244 beq 0x162c8 | goto label_1;
| }
| label_0:
0x00016246 ldr r4, [r5, 0x30] | r4 = *((r5 + 0x30));
0x00016248 mov.w r8, 0 | r8 = 0;
| do {
0x0001624c ldr r3, [r5, 0x38] | r3 = *((r5 + 0x38));
0x0001624e ldr r1, [r5, 0x2c] | r1 = *((r5 + 0x2c));
0x00016250 cmp r3, r4 |
0x00016252 it hi |
| if (r3 <= r4) {
0x00016254 subhi ip, r3, r4 |
| }
| if (r3 <= r4) {
0x00016258 bhi 0x16288 |
0x0001625a ldr r2, [r5, 0x34] | r2 = *((r5 + 0x34));
0x0001625c movs r4, 0 | r4 = 0;
0x0001625e ldr r0, [r5, 4] | r0 = *((r5 + 4));
0x00016260 blx 0xa47c | r0 = fcn_0000a47c ();
0x00016264 mov ip, r0 |
0x00016266 cmp r0, 0 |
| if (r0 == 0) {
0x00016268 beq 0x162dc | goto label_7;
| }
0x0001626a adds r0, 1 | r0++;
| if (r0 == 1) {
0x0001626c beq 0x162ee | goto label_8;
| }
0x0001626e ldrd r3, r2, [r5, 0x40] | __asm ("ldrd r3, r2, [r5, 0x40]");
0x00016272 ldr r1, [r5, 0x2c] | r1 = *((r5 + 0x2c));
0x00016274 str.w ip, [r5, 0x38] | __asm ("str.w ip, [r5, 0x38]");
0x00016278 adds.w r3, r3, ip | r3 += ip;
0x0001627c str.w r8, [r5, 0x30] | __asm ("str.w r8, [r5, 0x30]");
0x00016280 adc r2, r2, 0 | __asm ("adc r2, r2, 0");
0x00016284 strd r3, r2, [r5, 0x40] | __asm ("strd r3, r2, [r5, 0x40]");
| }
0x00016288 cmp r6, ip |
0x0001628a add r1, r4 | r1 += r4;
0x0001628c sbcs r2, fp, 0 | __asm ("sbcs r2, arg_0h");
0x00016290 mov r4, ip | r4 = ip;
0x00016292 it lo |
| if (r6 >= ip) {
0x00016294 movlo r4, r6 | r4 = r6;
| }
0x00016296 mov r0, r7 | r0 = r7;
0x00016298 mov r2, r4 | r2 = r4;
0x0001629a mov.w sl, 0 | sl = 0;
0x0001629e it lo |
| if (r6 >= ip) {
0x000162a0 movlo sl, fp | sl = fp;
| }
0x000162a2 add r7, r4 | r7 += r4;
0x000162a4 blx 0xa78c | fcn_0000a78c ();
0x000162a8 subs r6, r6, r4 | r6 -= r4;
0x000162aa ldr r2, [r5, 0x30] | r2 = *((r5 + 0x30));
0x000162ac sbc.w r3, fp, sl | __asm ("sbc.w r3, fp, sl");
0x000162b0 mov fp, r3 |
0x000162b2 orrs.w r3, r6, fp | r3 = r6 | fp;
0x000162b6 add r4, r2 | r4 += r2;
0x000162b8 str r4, [r5, 0x30] | *((r5 + 0x30)) = r4;
0x000162ba bne 0x1624c |
| } while (r3 != r6);
0x000162bc ldr r3, [sp, 4] | r3 = var_4h;
0x000162be movs r0, 0 | r0 = 0;
0x000162c0 subs r7, r7, r3 | r7 -= r3;
| label_2:
0x000162c2 str.w r7, [sb] | __asm ("str.w r7, [sb]");
| if (r7 != 0) {
0x000162c6 cbz r7, 0x162ca |
| label_1:
0x000162c8 movs r0, 0 | r0 = 0;
| }
| label_3:
0x000162ca add sp, 0xc |
0x000162cc pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_6:
0x000162d0 ldr r7, [sp, 4] | r7 = var_4h;
0x000162d2 cmp r4, 0 |
| if (r4 != 0) {
0x000162d4 bne 0x16246 | goto label_0;
| }
0x000162d6 str.w r4, [sb] | __asm ("str.w r4, [sb]");
0x000162da b 0x162c8 | goto label_1;
| label_7:
0x000162dc ldr r2, [sp, 4] | r2 = var_4h;
0x000162de movs r3, 1 | r3 = 1;
0x000162e0 movw r0, 0x117e |
0x000162e4 str r3, [r5, 0x10] | *((r5 + 0x10)) = r3;
0x000162e6 movt r0, 1 | r0 = 0x1117e;
0x000162ea subs r7, r7, r2 | r7 -= r2;
0x000162ec b 0x162c2 | goto label_2;
| label_8:
0x000162ee blx 0xb12c | fcn_0000b12c ();
0x000162f2 ldr r3, [sp, 4] | r3 = var_4h;
0x000162f4 ldr r0, [r0] | r0 = *(r0);
0x000162f6 subs r7, r7, r3 | r7 -= r3;
0x000162f8 b 0x162c2 | goto label_2;
| label_5:
0x000162fa blx 0xa1a4 | r0 = fcn_0000a1a4 ();
0x000162fe cmp r0, 0 |
| if (r0 != 0) {
0x00016300 bne 0x162ca | goto label_3;
| }
0x00016302 str.w fp, [r5, 0x30] | __asm ("str.w fp, [r5, 0x30]");
0x00016306 strd fp, fp, [r5, 0x38] | __asm ("strd fp, fp, [r5, 0x38]");
0x0001630a b 0x1621e | 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/lib/libapr-1.so.0.7.2 @ 0x17a10 */
| #include <stdint.h>
|
; (fcn) fcn.00017a10 () | void fcn_00017a10 (int16_t arg1) {
| r0 = arg1;
0x00017a10 push {r3, r4, r5, lr} |
0x00017a12 mov r5, r0 | r5 = r0;
0x00017a14 ldr r3, [r0, 8] | r3 = *((r0 + 8));
0x00017a16 cmp r3, 1 |
0x00017a18 beq 0x17a48 |
| while (r0 >= 0) {
| label_2:
0x00017a1a ldr r0, [r5, 0x20] | r0 = *((r5 + 0x20));
| if (r0 != 0) {
0x00017a1c cbz r0, 0x17a22 |
0x00017a1e blx 0xb108 | fcn_0000b108 ();
| }
0x00017a22 ldr r3, [r5, 0x24] | r3 = *((r5 + 0x24));
0x00017a24 mov r4, r0 | r4 = r0;
| if (r3 == 0) {
0x00017a26 cbnz r3, 0x17a3c |
0x00017a28 ldr r0, [r5, 0x10] | r0 = *((r5 + 0x10));
0x00017a2a adds r3, r0, 1 | r3 = r0 + 1;
| if (r3 == r0) {
0x00017a2c beq 0x17a3c | goto label_3;
| }
0x00017a2e blx 0xaa44 | fcn_0000aa44 ();
0x00017a32 cmp r4, 0 |
0x00017a34 it eq |
| if (r4 == 0) {
0x00017a36 cmpeq r0, -1 | __asm ("cmpeq r0, -1");
| }
| if (r4 == 0) {
0x00017a3a beq 0x17a68 | goto label_4;
| }
| }
| label_3:
0x00017a3c ldr r0, [r5, 0xc] | r0 = *((r5 + 0xc));
| if (r0 != 0) {
0x00017a3e cbz r0, 0x17a44 |
0x00017a40 blx 0xa748 | fcn_0000a748 ();
| }
| label_1:
0x00017a44 mov r0, r4 | r0 = r4;
0x00017a46 pop {r3, r4, r5, pc} |
0x00017a48 movs r3, 0 | r3 = 0;
0x00017a4a str r3, [r0, 8] | *((r0 + 8)) = r3;
| label_0:
0x00017a4c ldr r0, [r5, 0x10] | r0 = *((r5 + 0x10));
0x00017a4e movs r1, 8 | r1 = 8;
0x00017a50 blx 0xae34 | r0 = fcn_0000ae34 ();
0x00017a54 cmp r0, 0 |
0x00017a56 bge 0x17a1a |
| }
0x00017a58 blx 0xb12c | r0 = fcn_0000b12c ();
0x00017a5c ldr r4, [r0] | r4 = *(r0);
0x00017a5e cmp r4, 4 |
| if (r4 == 4) {
0x00017a60 beq 0x17a4c | goto label_0;
| }
0x00017a62 cmp r4, 0 |
| if (r4 != 0) {
0x00017a64 bne 0x17a44 | goto label_1;
| }
0x00017a66 b 0x17a1a | goto label_2;
| label_4:
0x00017a68 blx 0xb12c | r0 = fcn_0000b12c ();
0x00017a6c ldr r4, [r0] | r4 = *(r0);
0x00017a6e b 0x17a3c | 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/lib/libapr-1.so.0.7.2 @ 0x182dc */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.000182dc () | void fcn_000182dc (int16_t arg1, uint32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x000182dc add.w r3, r1, 0x1000 | r3 = r1 + 0x1000;
0x000182e0 push.w {r4, r5, r6, r7, r8, lr} |
0x000182e4 adds r3, 0x17 | r3 += 0x17;
0x000182e6 bic r3, r3, 0xff0 | r3 = BIT_MASK (r3, 0xff0);
0x000182ea bic r3, r3, 0xf | r3 = BIT_MASK (r3, 0xf);
0x000182ee cmp r1, r3 |
| if (r1 > r3) {
0x000182f0 bhi 0x183d2 | goto label_2;
| }
0x000182f2 cmp.w r3, 0x2000 |
0x000182f6 ldr r7, [r0] | r7 = *(r0);
0x000182f8 it lo |
| if (r3 >= 0x2000) {
0x000182fa movlo r3, 0x2000 | r3 = 0x2000;
| }
0x000182fe mov r6, r0 | r6 = r0;
0x00018300 lsrs r4, r3, 0xc | r4 = r3 >> 0xc;
0x00018302 mov r5, r3 | r5 = r3;
0x00018304 add.w r8, r4, -1 | r8 = r4 + -1;
0x00018308 cmp r7, r8 |
| if (r7 >= r8) {
0x0001830a bhs 0x1834e | goto label_3;
| }
0x0001830c ldr r4, [r0, 0x14] | r4 = *((r0 + 0x14));
0x0001830e cmp r4, 0 |
| if (r4 == 0) {
0x00018310 beq 0x183b0 | goto label_4;
| }
0x00018312 ldr r0, [r0, 0xc] | r0 = *((r0 + 0xc));
| if (r0 != 0) {
0x00018314 cbz r0, 0x18322 |
0x00018316 blx 0xa3d8 | fcn_0000a3d8 ();
0x0001831a ldr r4, [r6, 0x14] | r4 = *((r6 + 0x14));
0x0001831c ldr r0, [r6, 0xc] | r0 = *((r6 + 0xc));
0x0001831e cmp r4, 0 |
| if (r4 == 0) {
0x00018320 beq 0x183aa | goto label_5;
| }
| }
0x00018322 add.w r2, r6, 0x14 | r2 = r6 + 0x14;
0x00018326 b 0x18330 |
| while (r3 <= r8) {
0x00018328 mov r2, r4 | r2 = r4;
0x0001832a ldr r4, [r4] | r4 = *(r4);
0x0001832c cmp r4, 0 |
| if (r4 == 0) {
0x0001832e beq 0x183aa | goto label_5;
| }
0x00018330 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x00018332 cmp r3, r8 |
0x00018334 blo 0x18328 |
| }
0x00018336 ldr r1, [r6, 8] | r1 = *((r6 + 8));
0x00018338 adds r1, 1 | r1++;
0x0001833a add r1, r3 | r1 += r3;
0x0001833c ldr r3, [r6, 4] | r3 = *((r6 + 4));
0x0001833e cmp r1, r3 |
0x00018340 it hs |
| if (r1 < r3) {
0x00018342 movhs r1, r3 | r1 = r3;
| }
0x00018344 ldr r3, [r4] | r3 = *(r4);
0x00018346 str r3, [r2] | *(r2) = r3;
0x00018348 str r1, [r6, 8] | *((r6 + 8)) = r1;
| if (r0 != 0) {
0x0001834a cbnz r0, 0x183a4 | goto label_6;
| }
0x0001834c b 0x183c2 | goto label_7;
| label_3:
0x0001834e ldr r0, [r0, 0xc] | r0 = *((r0 + 0xc));
| if (r0 != 0) {
0x00018350 cbz r0, 0x1835a |
0x00018352 blx 0xa3d8 | fcn_0000a3d8 ();
0x00018356 ldr r7, [r6] | r7 = *(r6);
0x00018358 ldr r0, [r6, 0xc] | r0 = *((r6 + 0xc));
| }
0x0001835a add.w r3, r6, r8, lsl 2 | r3 = r6 + (r8 << 2);
0x0001835e adds r1, r4, 4 | r1 = r4 + 4;
0x00018360 add.w r1, r6, r1, lsl 2 | r1 = r6 + (r1 << 2);
0x00018364 ldr r4, [r3, 0x14] | r4 = *((r3 + 0x14));
0x00018366 cmp r4, 0 |
| if (r4 != 0) {
0x00018368 bne 0x183ea | goto label_8;
| }
0x0001836a cmp r7, r8 |
| if (r7 < r8) {
0x0001836c bls 0x183aa | goto label_5;
| }
0x0001836e adds r2, r1, 4 | r2 = r1 + 4;
0x00018370 mov r3, r8 | r3 = r8;
0x00018372 b 0x18378 |
| while (r4 == 0) {
0x00018374 cmp r7, r3 |
| if (r7 == r3) {
0x00018376 beq 0x183aa | goto label_5;
| }
0x00018378 mov r1, r2 | r1 = r2;
0x0001837a ldr r4, [r2], 4 | r4 = *(r2);
| r2 += 4;
0x0001837e adds r3, 1 | r3++;
0x00018380 cmp r4, 0 |
0x00018382 beq 0x18374 |
| }
| label_1:
0x00018384 ldr r2, [r4] | r2 = *(r4);
0x00018386 cmp r7, r3 |
0x00018388 it ls |
| if (r7 <= r3) {
0x0001838a cmpls r2, 0 | __asm ("cmpls r2, 0");
| }
0x0001838c str r2, [r1] | *(r1) = r2;
| if (r7 == r3) {
0x0001838e beq 0x183dc | goto label_9;
| }
| label_0:
0x00018390 ldr r3, [r6, 8] | r3 = *((r6 + 8));
0x00018392 ldr r2, [r4, 8] | r2 = *((r4 + 8));
0x00018394 adds r3, 1 | r3++;
0x00018396 add r3, r2 | r3 += r2;
0x00018398 ldr r2, [r6, 4] | r2 = *((r6 + 4));
0x0001839a cmp r3, r2 |
0x0001839c it hs |
| if (r3 < r2) {
0x0001839e movhs r3, r2 | r3 = r2;
| }
0x000183a0 str r3, [r6, 8] | *((r6 + 8)) = r3;
| if (r0 != 0) {
0x000183a2 cbz r0, 0x183c2 |
| label_6:
0x000183a4 blx 0xa090 | fcn_0000a090 ();
0x000183a8 b 0x183c2 | goto label_7;
| if (r0 != 0) {
| label_5:
0x000183aa cbz r0, 0x183b0 |
0x000183ac blx 0xa090 | fcn_0000a090 ();
| }
| label_4:
0x000183b0 mov r0, r5 | r0 = r5;
0x000183b2 blx 0xab6c | r0 = fcn_0000ab6c ();
0x000183b6 mov r4, r0 | r4 = r0;
| if (r0 == 0) {
0x000183b8 cbz r0, 0x183d2 | goto label_2;
| }
0x000183ba add r5, r0 | r5 += r0;
0x000183bc str.w r8, [r0, 8] | __asm ("str.w r8, [r0, 8]");
0x000183c0 str r5, [r0, 0x14] | *((r0 + 0x14)) = r5;
| }
| label_7:
0x000183c2 mov r3, r4 | r3 = r4;
0x000183c4 movs r2, 0 | r2 = 0;
0x000183c6 str r2, [r3], 0x18 | *(r3) = r2;
| r3 += 0x18;
0x000183ca mov r0, r4 | r0 = r4;
0x000183cc str r3, [r4, 0x10] | *((r4 + 0x10)) = r3;
0x000183ce pop.w {r4, r5, r6, r7, r8, pc} |
| label_2:
0x000183d2 movs r4, 0 | r4 = 0;
0x000183d4 mov r0, r4 | r0 = r4;
0x000183d6 pop.w {r4, r5, r6, r7, r8, pc} |
| if (r7 == 0) {
| do {
0x000183da cbz r7, 0x183e6 | goto label_10;
| }
| label_9:
0x000183dc ldr r3, [r1, -0x4]! | r3 = *((r1 -= 0x4));
0x000183e0 subs r7, 1 | r7--;
0x000183e2 cmp r3, 0 |
0x000183e4 beq 0x183da |
| } while (r3 == 0);
| label_10:
0x000183e6 str r7, [r6] | *(r6) = r7;
0x000183e8 b 0x18390 | goto label_0;
| label_8:
0x000183ea mov r3, r8 | r3 = r8;
0x000183ec b 0x18384 | 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/lib/libapr-1.so.0.7.2 @ 0x1dec4 */
| #include <stdint.h>
|
; (fcn) fcn.0001dec4 () | void fcn_0001dec4 (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_4h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x0001dec4 push {r4, r5, lr} |
0x0001dec6 mov r4, r0 | r4 = r0;
0x0001dec8 ldr r0, [r0, 0x20] | r0 = *((r0 + 0x20));
0x0001deca sub sp, 0xc |
0x0001decc mov r5, r1 | r5 = r1;
0x0001dece str r2, [sp, 4] | var_4h = r2;
0x0001ded0 ldr r3, [r0] | r3 = *(r0);
0x0001ded2 blx r3 | uint32_t (*r3)(uint32_t, uint32_t) (r2, r3);
0x0001ded4 ldrd r0, r2, [r4, 0x20] | __asm ("ldrd r0, r2, [r4, 0x20]");
0x0001ded8 mov r1, r5 | r1 = r5;
0x0001deda ldr r3, [r0, 0xc] | r3 = *((r0 + 0xc));
0x0001dedc ldr r2, [r2, 0xc] | r2 = *((r2 + 0xc));
0x0001dede add r2, r3 | r2 += r3;
0x0001dee0 ldr r3, [r0, 4] | r3 = *((r0 + 4));
0x0001dee2 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x0001dee4 ldr r0, [r4, 0x20] | r0 = *((r4 + 0x20));
0x0001dee6 movs r2, 4 | r2 = 4;
0x0001dee8 add.w r1, sp, r2 | r1 = sp + r2;
0x0001deec ldr r3, [r0, 4] | r3 = *((r0 + 4));
0x0001deee blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x0001def0 ldr r0, [r4, 0x20] | r0 = *((r4 + 0x20));
0x0001def2 mov r1, r5 | r1 = r5;
0x0001def4 ldr r3, [r0, 8] | r3 = *((r0 + 8));
0x0001def6 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
0x0001def8 add sp, 0xc |
0x0001defa pop {r4, r5, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x1defc */
| #include <stdint.h>
|
; (fcn) fcn.0001defc () | void fcn_0001defc (int16_t arg1, int16_t arg2, uint32_t arg3) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x0001defc cmp r2, 0 |
| if (r2 == 0) {
0x0001defe beq 0x1df8a | goto label_1;
| }
0x0001df00 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0001df04 mov r4, r0 | r4 = r0;
0x0001df06 ldr r5, [r0, 0x34] | r5 = *((r0 + 0x34));
0x0001df08 mov sb, r1 | sb = r1;
0x0001df0a mov r8, r2 | r8 = r2;
0x0001df0c movs r6, 0 | r6 = 0;
0x0001df0e b 0x1df3a |
| while (r5 != 0) {
0x0001df10 ldr r1, [r0, 0xc] | r1 = *((r0 + 0xc));
0x0001df12 subs r1, r1, r5 | r1 -= r5;
| label_0:
0x0001df14 sub.w r7, r8, r6 | r7 = r8 - r6;
0x0001df18 ldr r3, [r4, 0x30] | r3 = *((r4 + 0x30));
0x0001df1a cmp r7, r5 |
0x0001df1c add.w r0, sb, r6 | r0 = sb + r6;
0x0001df20 it hs |
| if (r7 < r5) {
0x0001df22 movhs r7, r5 | r7 = r5;
| }
0x0001df24 mov r2, r7 | r2 = r7;
0x0001df26 add r1, r3 | r1 += r3;
0x0001df28 blx 0xa78c | fcn_0000a78c ();
0x0001df2c ldr r5, [r4, 0x34] | r5 = *((r4 + 0x34));
0x0001df2e add r6, r7 | r6 += r7;
0x0001df30 cmp r8, r6 |
0x0001df32 sub.w r5, r5, r7 | r5 -= r7;
0x0001df36 str r5, [r4, 0x34] | *((r4 + 0x34)) = r5;
| if (r8 < r6) {
0x0001df38 bls 0x1df86 | goto label_2;
| }
0x0001df3a ldr r0, [r4, 0x24] | r0 = *((r4 + 0x24));
0x0001df3c cmp r5, 0 |
0x0001df3e bne 0x1df10 |
| }
0x0001df40 ldr r3, [r0] | r3 = *(r0);
0x0001df42 ldr r7, [r4, 0x30] | r7 = *((r4 + 0x30));
0x0001df44 blx r3 | uint32_t (*r3)(uint32_t) (r3);
0x0001df46 ldrd r0, r1, [r4, 0x24] | __asm ("ldrd r0, r1, [r4, 0x24]");
0x0001df4a ldr r3, [r4, 0x20] | r3 = *((r4 + 0x20));
0x0001df4c ldr r2, [r0, 0xc] | r2 = *((r0 + 0xc));
0x0001df4e ldr.w ip, [r3, 0xc] | ip = *((r3 + 0xc));
0x0001df52 ldr.w sl, [r0, 4] | sl = *((r0 + 4));
0x0001df56 add r2, ip | r2 += ip;
0x0001df58 blx sl | sl (r0, r2, r3);
0x0001df5a ldrd r0, r1, [r4, 0x24] | __asm ("ldrd r0, r1, [r4, 0x24]");
0x0001df5e ldr r3, [r0, 8] | r3 = *((r0 + 8));
0x0001df60 blx r3 | uint32_t (*r3)(uint32_t, uint32_t) (r0, r3);
0x0001df62 ldr r0, [r4, 0x24] | r0 = *((r4 + 0x24));
0x0001df64 ldr r3, [r0] | r3 = *(r0);
0x0001df66 blx r3 | uint32_t (*r3)(uint32_t, uint32_t) (r0, r3);
0x0001df68 ldrd r0, r1, [r4, 0x24] | __asm ("ldrd r0, r1, [r4, 0x24]");
0x0001df6c ldr r2, [r0, 0xc] | r2 = *((r0 + 0xc));
0x0001df6e ldr r3, [r0, 4] | r3 = *((r0 + 4));
0x0001df70 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r2, r3);
0x0001df72 ldr r0, [r4, 0x24] | r0 = *((r4 + 0x24));
0x0001df74 mov r1, r7 | r1 = r7;
0x0001df76 ldr r3, [r0, 8] | r3 = *((r0 + 8));
0x0001df78 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
0x0001df7a ldr r3, [r4, 0x24] | r3 = *((r4 + 0x24));
0x0001df7c mov r1, r5 | r1 = r5;
0x0001df7e ldr r3, [r3, 0xc] | r3 = *((r3 + 0xc));
0x0001df80 mov r5, r3 | r5 = r3;
0x0001df82 str r3, [r4, 0x34] | *((r4 + 0x34)) = r3;
0x0001df84 b 0x1df14 | goto label_0;
| label_2:
0x0001df86 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_1:
0x0001df8a bx lr | return;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x1ea2c */
| #include <stdint.h>
|
; (fcn) fcn.0001ea2c () | void fcn_0001ea2c (int16_t arg1, int16_t arg2) {
| int16_t var_0h;
| int16_t var_4h;
| r0 = arg1;
| r1 = arg2;
0x0001ea2c ldr r2, [pc, 0x74] |
0x0001ea2e ldr r3, [pc, 0x78] | r3 = *(0x1eaaa);
0x0001ea30 push {r4, r5, r6, lr} |
0x0001ea32 sub sp, 8 |
0x0001ea34 add r2, pc | r2 = 0x3d4dc;
0x0001ea36 mov r4, r0 | r4 = r0;
0x0001ea38 ldr r3, [r2, r3] |
0x0001ea3a ldr r3, [r3] | r3 = *(0x3d4dc);
0x0001ea3c str r3, [sp, 4] | var_4h = r3;
0x0001ea3e mov.w r3, 0 | r3 = 0;
| if (r0 == 0) {
0x0001ea42 cbz r0, 0x1ea84 | goto label_0;
| }
0x0001ea44 mov r6, r1 | r6 = r1;
0x0001ea46 blx 0xa6d8 | fcn_0000a6d8 ();
0x0001ea4a mov r1, sp | r1 = sp;
0x0001ea4c mov r3, r0 | r3 = r0;
0x0001ea4e mov r0, r4 | r0 = r4;
0x0001ea50 str r3, [sp] | *(sp) = r3;
0x0001ea52 blx 0xade8 | fcn_0000ade8 ();
0x0001ea56 ldrb r5, [r4] | r5 = *(r4);
0x0001ea58 mov r2, r0 | r2 = r0;
| if (r5 == 0) {
0x0001ea5a cbz r5, 0x1ea9c | goto label_1;
| }
0x0001ea5c movw lr, 0xc6b7 |
0x0001ea60 movs r3, 0 | r3 = 0;
0x0001ea62 movt lr, 5 | lr = 0x5c6b7;
0x0001ea66 movw ip, 0xf8c9 | ip = 0xf8c9;
| do {
0x0001ea6a mla r3, r3, ip, r5 | __asm ("mla r3, r3, ip, r5");
0x0001ea6e ldrb r5, [r4, 1]! | r5 = *((r4 += 1));
0x0001ea72 mul ip, lr, ip |
0x0001ea76 cmp r5, 0 |
0x0001ea78 bne 0x1ea6a |
| } while (r5 != 0);
| do {
0x0001ea7a ldr r1, [pc, 0x30] |
0x0001ea7c mov r0, r6 | r0 = r6;
0x0001ea7e add r1, pc | r1 = 0x3d530;
0x0001ea80 blx 0xa954 | fcn_0000a954 ();
| label_0:
0x0001ea84 ldr r2, [pc, 0x28] |
0x0001ea86 ldr r3, [pc, 0x20] | r3 = *(0x1eaaa);
0x0001ea88 add r2, pc | r2 = 0x3d53c;
0x0001ea8a ldr r3, [r2, r3] | r3 = *(0x3d53c);
0x0001ea8c ldr r2, [r3] | r2 = *(0x3d53c);
0x0001ea8e ldr r3, [sp, 4] | r3 = var_4h;
0x0001ea90 eors r2, r3 | r2 ^= r3;
0x0001ea92 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0001ea96 bne 0x1eaa0 | goto label_2;
| }
0x0001ea98 add sp, 8 |
0x0001ea9a pop {r4, r5, r6, pc} |
| label_1:
0x0001ea9c mov r3, r5 | r3 = r5;
0x0001ea9e b 0x1ea7a |
| } while (1);
| label_2:
0x0001eaa0 blx 0xabc8 | pthread_attr_getdetachstate ();
0x0001eaa4 ldrsh r0, [r7, r3] | r0 = *((r7 + r3));
0x0001eaa6 movs r0, r0 |
0x0001eaa8 lsls r0, r4, 0x1a | r0 = r4 << 0x1a;
0x0001eaaa movs r0, r0 |
0x0001eaac subs r4, 0x8e | r4 -= 0x8e;
0x0001eaae movs r0, r0 |
0x0001eab0 ldrsh r4, [r4, r2] | r4 = *((r4 + r2));
0x0001eab2 movs r0, r0 |
0x0001eab4 ldr r3, [r0, 0x14] | r3 = *((r0 + 0x14));
0x0001eab6 push {r4, lr} |
0x0001eab8 mov r4, r0 | r4 = r0;
0x0001eaba ldr r1, [r4, 0x10] | r1 = *((r4 + 0x10));
0x0001eabc ldr r0, [r0, 4] | r0 = *((r0 + 4));
| if (r3 != 0) {
0x0001eabe cbz r3, 0x1eae4 |
0x0001eac0 blx 0xaeb8 | fcn_0000aeb8 ();
0x0001eac4 adds r0, 1 | r0++;
| if (r0 == 1) {
0x0001eac6 beq 0x1eaec | goto label_3;
| }
0x0001eac8 ldr r1, [r4] | r1 = *(r4);
0x0001eaca ldr r0, [r4, 0x14] | r0 = *((r4 + 0x14));
0x0001eacc bl 0x1ea2c | r0 = fcn_0001ea2c (r0, r1);
0x0001ead0 blx 0x9d58 | shm_unlink ();
0x0001ead4 adds r0, 1 | r0++;
| if (r0 != 1) {
0x0001ead6 bne 0x1eaf4 | goto label_4;
| }
0x0001ead8 blx 0xb12c | r0 = fcn_0000b12c ();
0x0001eadc ldr r0, [r0] | r0 = *(r0);
0x0001eade cmp r0, 2 |
| if (r0 == 2) {
0x0001eae0 beq 0x1eaf4 | goto label_4;
| }
0x0001eae2 pop {r4, pc} |
| }
0x0001eae4 blx 0xaeb8 | fcn_0000aeb8 ();
0x0001eae8 adds r0, 1 | r0++;
| if (r0 == 1) {
0x0001eaea bne 0x1eaf4 |
| label_3:
0x0001eaec blx 0xb12c | r0 = fcn_0000b12c ();
0x0001eaf0 ldr r0, [r0] | r0 = *(r0);
0x0001eaf2 pop {r4, pc} |
| }
| label_4:
0x0001eaf4 movs r0, 0 | r0 = 0;
0x0001eaf6 pop {r4, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x13f44 */
| #include <stdint.h>
|
; (fcn) sym.apr__atomic_generic64_init () | void apr_atomic_generic64_init (int16_t arg1) {
| int16_t var_4h;
| r0 = arg1;
0x00013f44 strdlt fp, ip, [r3], r0 | __asm ("strdlt fp, ip, [r3], r0");
0x00013f48 ldr r7, [pc, 0x44] |
0x00013f4a ldr r5, [pc, 0x48] |
0x00013f4c add r7, pc | r7 = 0x27ee0;
0x00013f4e ldr r4, [r7] | r4 = *(0x27ee0);
0x00013f50 add r5, pc | r5 = 0x27eea;
| if (r4 == 0) {
0x00013f52 cbz r4, 0x13f5a | goto label_2;
| }
| label_1:
0x00013f54 movs r0, 0 | r0 = 0;
| do {
0x00013f56 add sp, 0xc |
0x00013f58 pop {r4, r5, r6, r7, pc} |
| label_2:
0x00013f5a movs r1, 0x1c | r1 = 0x1c;
0x00013f5c mov r6, r0 | r6 = r0;
0x00013f5e blx 0xa974 | fcn_0000a974 ();
0x00013f62 ldr r3, [pc, 0x34] | r3 = *(0x13f9a);
0x00013f64 mov r1, r0 | r1 = r0;
0x00013f66 ldr r2, [pc, 0x34] |
0x00013f68 str r0, [r7] | *(r7) = r0;
0x00013f6a mov r0, r6 | r0 = r6;
0x00013f6c ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x00013f6e add r2, pc | r2 = 0x27f10;
0x00013f70 str r3, [sp, 4] | var_4h = r3;
0x00013f72 blx 0xa000 | fcn_0000a000 ();
| label_0:
0x00013f76 ldr r0, [r7] | r0 = *(r7);
0x00013f78 mov r2, r6 | r2 = r6;
0x00013f7a movs r1, 0 | r1 = 0;
0x00013f7c add r0, r4 | r0 += r4;
0x00013f7e adds r4, 4 | r4 += 4;
0x00013f80 blx 0xa2cc | r0 = fcn_0000a2cc ();
0x00013f84 cmp r0, 0 |
0x00013f86 bne 0x13f56 |
| } while (r0 != 0);
0x00013f88 cmp r4, 0x1c |
| if (r4 != 0x1c) {
0x00013f8a bne 0x13f76 | goto label_0;
| }
0x00013f8c b 0x13f54 | 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/lib/libapr-1.so.0.7.2 @ 0x12d94 */
| #include <stdint.h>
|
; (fcn) sym.apr_array_pstrcat () | void apr_array_pstrcat (int16_t arg1, int16_t arg2, int16_t arg3) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x00012d94 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00012d98 mov sl, r0 | sl = r0;
0x00012d9a ldr.w sb, [r1, 8] | sb = *((r1 + 8));
0x00012d9e cmp.w sb, 0 |
| if (sb <= 0) {
0x00012da2 ble 0x12e3c | goto label_3;
| }
0x00012da4 ldr r7, [r1, 0x10] | r7 = *((r1 + 0x10));
0x00012da6 mov r8, r1 | r8 = r1;
0x00012da8 cmp r7, 0 |
| if (r7 == 0) {
0x00012daa beq 0x12e3c | goto label_3;
| }
0x00012dac movs r4, 0 | r4 = 0;
0x00012dae mov r5, r2 | r5 = r2;
0x00012db0 subs r7, 4 | r7 -= 4;
0x00012db2 mov r6, r4 | r6 = r4;
| do {
0x00012db4 ldr r0, [r7, 4]! | r0 = *((r7 += 4));
0x00012db8 adds r4, 1 | r4++;
| if (r0 != 0) {
0x00012dba cbz r0, 0x12dc2 |
| label_0:
0x00012dbc blx 0xa6d8 | r0 = fcn_0000a6d8 ();
0x00012dc0 add r6, r0 | r6 += r0;
| }
0x00012dc2 cmp sb, r4 |
| if (sb == r4) {
0x00012dc4 beq 0x12dda | goto label_4;
| }
| label_1:
0x00012dc6 cmp r5, 0 |
0x00012dc8 beq 0x12db4 |
| } while (r5 == 0);
0x00012dca ldr r0, [r7, 4]! | r0 = *((r7 += 4));
0x00012dce adds r6, 1 | r6++;
0x00012dd0 adds r4, 1 | r4++;
0x00012dd2 cmp r0, 0 |
| if (r0 != 0) {
0x00012dd4 bne 0x12dbc | goto label_0;
| }
0x00012dd6 cmp sb, r4 |
| if (sb != r4) {
0x00012dd8 bne 0x12dc6 | goto label_1;
| }
| label_4:
0x00012dda mov r0, sl | r0 = sl;
0x00012ddc adds r1, r6, 1 | r1 = r6 + 1;
0x00012dde blx 0xa974 | fcn_0000a974 ();
0x00012de2 ldr.w sl, [r8, 0x10] | sl = *((r8 + 0x10));
0x00012de6 mov sb, r0 | sb = r0;
0x00012de8 mov r4, r0 | r4 = r0;
0x00012dea mov r7, sl | r7 = sl;
0x00012dec cmp.w sl, 0 |
| if (sl == 0) {
0x00012df0 beq 0x12dfa | goto label_5;
| }
0x00012df2 ldr.w r6, [sl] | r6 = *(sl);
0x00012df6 movs r7, 0 | r7 = 0;
| if (r6 != 0) {
0x00012df8 cbnz r6, 0x12e16 | goto label_6;
| }
| do {
| label_5:
0x00012dfa ldr.w r3, [r8, 8] | r3 = *((r8 + 8));
0x00012dfe adds r7, 1 | r7++;
0x00012e00 cmp r3, r7 |
| if (r3 <= r7) {
0x00012e02 ble 0x12e32 | goto label_7;
| }
| if (r5 != 0) {
| label_2:
0x00012e04 cbz r5, 0x12e0a |
0x00012e06 strb r5, [r4], 1 | *(r4) = r5;
| r4++;
| }
0x00012e0a ldr.w r6, [sl, 4] | r6 = *((sl + 4));
0x00012e0e add.w sl, sl, 4 | sl += 4;
0x00012e12 cmp r6, 0 |
0x00012e14 beq 0x12dfa |
| } while (r6 == 0);
| label_6:
0x00012e16 mov r0, r6 | r0 = r6;
0x00012e18 adds r7, 1 | r7++;
0x00012e1a blx 0xa6d8 | fcn_0000a6d8 ();
0x00012e1e mov r1, r6 | r1 = r6;
0x00012e20 mov r2, r0 | r2 = r0;
0x00012e22 mov r0, r4 | r0 = r4;
0x00012e24 add r4, r2 | r4 += r2;
0x00012e26 blx 0xa78c | fcn_0000a78c ();
0x00012e2a ldr.w r3, [r8, 8] | r3 = *((r8 + 8));
0x00012e2e cmp r3, r7 |
| if (r3 > r7) {
0x00012e30 bgt 0x12e04 | goto label_2;
| }
| label_7:
0x00012e32 movs r3, 0 | r3 = 0;
0x00012e34 mov r0, sb | r0 = sb;
0x00012e36 strb r3, [r4] | *(r4) = r3;
0x00012e38 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_3:
0x00012e3c movs r1, 1 | r1 = 1;
0x00012e3e mov r0, sl | r0 = sl;
0x00012e40 blx 0xa974 | fcn_0000a974 ();
0x00012e44 movs r3, 0 | r3 = 0;
0x00012e46 mov sb, r0 | sb = r0;
0x00012e48 strb r3, [r0] | *(r0) = r3;
0x00012e4a mov r0, sb | r0 = sb;
0x00012e4c 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/lib/libapr-1.so.0.7.2 @ 0x13ff4).
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.
r2dec has crashed (info: /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x13dd0).
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/lib/libapr-1.so.0.7.2 @ 0x13c2c */
| #include <stdint.h>
|
; (fcn) sym.apr_atomic_init () | void apr_atomic_init (int16_t arg1) {
| int16_t var_4h;
| r0 = arg1;
| label_1:
0x0000a754 invalid | void (*0xa758)() ();
0x00013c2c push {r4, r5, r6, r7, lr} |
0x00013c2e sub sp, 0xc |
0x00013c30 ldr r7, [pc, 0x4c] |
0x00013c32 ldr r5, [pc, 0x50] |
0x00013c34 add r7, pc | r7 = 0x278b8;
0x00013c36 ldr r4, [r7] | r4 = *(0x278b8);
0x00013c38 add r5, pc | r5 = 0x278c2;
| if (r4 == 0) {
0x00013c3a cbz r4, 0x13c42 | goto label_2;
| }
0x00013c3c movs r0, 0 | r0 = 0;
| do {
0x00013c3e add sp, 0xc |
0x00013c40 pop {r4, r5, r6, r7, pc} |
| label_2:
0x00013c42 movs r1, 0x1c | r1 = 0x1c;
0x00013c44 mov r6, r0 | r6 = r0;
0x00013c46 blx 0xa974 | fcn_0000a974 ();
0x00013c4a ldr r3, [pc, 0x3c] | r3 = *(0x13c8a);
0x00013c4c mov r1, r0 | r1 = r0;
0x00013c4e ldr r2, [pc, 0x3c] |
0x00013c50 str r0, [r7] | *(r7) = r0;
0x00013c52 mov r0, r6 | r0 = r6;
0x00013c54 ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x00013c56 add r2, pc | r2 = 0x278e8;
0x00013c58 str r3, [sp, 4] | var_4h = r3;
0x00013c5a blx 0xa000 | fcn_0000a000 ();
| label_0:
0x00013c5e ldr r0, [r7] | r0 = *(r7);
0x00013c60 mov r2, r6 | r2 = r6;
0x00013c62 movs r1, 0 | r1 = 0;
0x00013c64 add r0, r4 | r0 += r4;
0x00013c66 adds r4, 4 | r4 += 4;
0x00013c68 blx 0xa2cc | r0 = fcn_0000a2cc ();
0x00013c6c cmp r0, 0 |
0x00013c6e bne 0x13c3e |
| } while (r0 != 0);
0x00013c70 cmp r4, 0x1c |
| if (r4 != 0x1c) {
0x00013c72 bne 0x13c5e | goto label_0;
| }
0x00013c74 mov r0, r6 | r0 = r6;
0x00013c76 add sp, 0xc |
0x00013c78 pop.w {r4, r5, r6, r7, lr} |
0x00013c7c b.w 0xa754 | goto label_1;
| }
r2dec has crashed (info: /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x13c94).
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.
r2dec has crashed (info: /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x13fa8).
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.
r2dec has crashed (info: /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x13e2c).
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.
r2dec has crashed (info: /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x20640).
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/lib/libapr-1.so.0.7.2 @ 0xc244 */
| #include <stdint.h>
|
; (fcn) sym.apr_decode_base32 () | void apr_decode_base32 (int16_t arg_20h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0000c244 invalid |
0x0000c248 mov r8, r3 | r8 = r3;
0x0000c24a subs r3, r1, 0 | r3 = r1 - 0;
0x0000c24c mov r7, r0 | r7 = r0;
0x0000c24e it ne |
| if (r3 == r1) {
0x0000c250 movne r3, 1 | r3 = 1;
| }
0x0000c252 adds r0, r2, 1 | r0 = r2 + 1;
0x0000c254 it ne |
| if (r0 == r2) {
0x0000c256 movne r3, 0 | r3 = 0;
| }
0x0000c258 ldr r4, [sp, 0x20] | r4 = *(arg_20h);
0x0000c25a mov r6, r1 | r6 = r1;
0x0000c25c cmp r3, 0 |
| if (r3 == 0) {
0x0000c25e beq.w 0xc44c | goto label_9;
| }
0x0000c262 mov r0, r1 | r0 = r1;
0x0000c264 blx 0xa6d8 | r0 = fcn_0000a6d8 ();
0x0000c268 mov r5, r0 | r5 = r0;
| label_0:
0x0000c26a tst.w r8, 8 |
| if ((r8 & 8) == 0) {
0x0000c26e beq.w 0xc488 | goto label_10;
| }
0x0000c272 ldr r2, [pc, 0x2d4] |
0x0000c274 add r2, pc |
0x0000c276 add.w r2, r2, 0x1e0 | r2 = 0x189a2;
| label_2:
0x0000c27a cmp r5, 0 |
| if (r5 == 0) {
0x0000c27c beq.w 0xc52a | goto label_11;
| }
0x0000c280 mov r1, r6 | r1 = r6;
0x0000c282 b 0xc28a |
| while (lr < 0x1f) {
0x0000c284 subs r5, 1 | r5--;
| if (r5 == 1) {
0x0000c286 beq.w 0xc492 | goto label_12;
| }
0x0000c28a mov ip, r1 |
0x0000c28c ldrb lr, [r1], 1 |
0x0000c290 ldrb.w lr, [r2, lr] |
0x0000c294 cmp.w lr, 0x1f |
0x0000c298 bls 0xc284 |
| }
0x0000c29a ands r0, r8, 1 | r0 = r8 & 1;
0x0000c29e it ne |
| if (r0 == r8) {
0x0000c2a0 movne r0, 0 | r0 = 0;
| }
| if (r0 != r8) {
0x0000c2a2 bne 0xc2c4 | goto label_13;
| }
0x0000c2a4 cmp r5, 6 |
| if (r5 > 6) {
0x0000c2a6 bhi 0xc2bc | goto label_14;
| }
0x0000c2a8 add.w r3, ip, r5 | r3 = ip + r5;
0x0000c2ac b 0xc2b0 |
| while (r1 > 0x20) {
| if (r5 == 0) {
0x0000c2ae cbz r5, 0xc2c4 | goto label_13;
| }
0x0000c2b0 ldrb r1, [r3, -0x1]! | r1 = *((r3 -= 0x1));
0x0000c2b4 subs r5, 1 | r5--;
0x0000c2b6 ldrb r1, [r2, r1] | r1 = *((r2 + r1));
0x0000c2b8 cmp r1, 0x20 |
0x0000c2ba bhi 0xc2ae |
| }
| label_14:
0x0000c2bc movw r0, 0x117c |
0x0000c2c0 movt r0, 1 | r0 = 0x1117c;
| label_13:
0x0000c2c4 sub.w r5, ip, r6 | r5 = ip - r6;
0x0000c2c8 cmp r7, 0 |
| if (r7 == 0) {
0x0000c2ca beq.w 0xc4a0 | goto label_5;
| }
| label_3:
0x0000c2ce cmp r5, 7 |
| if (r5 < 7) {
0x0000c2d0 bls.w 0xc538 | goto label_15;
| }
0x0000c2d4 subs r5, 8 | r5 -= 8;
0x0000c2d6 add.w r1, r7, 0xa | r1 = r7 + 0xa;
0x0000c2da lsr.w r8, r5, 3 | r8 = r5 >> 3;
0x0000c2de add.w lr, r7, 5 | lr = r7 + 5;
0x0000c2e2 add.w ip, r6, 8 |
0x0000c2e6 add.w r3, r8, r8, lsl 2 | r3 = r8 + (r8 << 2);
0x0000c2ea add r1, r3 | r1 += r3;
| do {
0x0000c2ec ldrb r3, [ip, -0x7] | r3 = *((ip - 0x7));
0x0000c2f0 add.w lr, lr, 5 | lr += 5;
0x0000c2f4 add.w ip, ip, 8 |
0x0000c2f8 ldrb.w sb, [r2, r3] | sb = *((r2 + r3));
0x0000c2fc ldrb r3, [ip, -0x10] | r3 = *((ip - 0x10));
0x0000c300 ldrb r3, [r2, r3] | r3 = *((r2 + r3));
0x0000c302 lsls r3, r3, 3 | r3 <<= 3;
0x0000c304 orr.w r3, r3, sb, lsr 2 | r3 |= (sb >> 2);
0x0000c308 strb r3, [lr, -0xa] | *((lr - 0xa)) = r3;
0x0000c30c ldrb r3, [ip, -0xf] | r3 = *((ip - 0xf));
0x0000c310 ldrb.w sb, [r2, r3] | sb = *((r2 + r3));
0x0000c314 ldrb r3, [ip, -0xe] | r3 = *((ip - 0xe));
0x0000c318 ldrb r3, [r2, r3] | r3 = *((r2 + r3));
0x0000c31a lsls r3, r3, 1 | r3 <<= 1;
0x0000c31c orr.w r3, r3, sb, lsl 6 | r3 |= (sb << 6);
0x0000c320 ldrb sb, [ip, -0xd] | sb = *((ip - 0xd));
0x0000c324 ldrb.w sb, [r2, sb] | sb = *((r2 + sb));
0x0000c328 orr.w r3, r3, sb, lsr 4 | r3 |= (sb >> 4);
0x0000c32c strb r3, [lr, -0x9] | *((lr - 0x9)) = r3;
0x0000c330 ldrb r3, [ip, -0xc] | r3 = *((ip - 0xc));
0x0000c334 ldrb.w sb, [r2, r3] | sb = *((r2 + r3));
0x0000c338 ldrb r3, [ip, -0xd] | r3 = *((ip - 0xd));
0x0000c33c ldrb r3, [r2, r3] | r3 = *((r2 + r3));
0x0000c33e lsls r3, r3, 4 | r3 <<= 4;
0x0000c340 orr.w r3, r3, sb, lsr 1 | r3 |= (sb >> 1);
0x0000c344 strb r3, [lr, -0x8] | *((lr - 0x8)) = r3;
0x0000c348 ldrb r3, [ip, -0xc] | r3 = *((ip - 0xc));
0x0000c34c ldrb.w sb, [r2, r3] | sb = *((r2 + r3));
0x0000c350 ldrb r3, [ip, -0xb] | r3 = *((ip - 0xb));
0x0000c354 ldrb r3, [r2, r3] | r3 = *((r2 + r3));
0x0000c356 lsls r3, r3, 2 | r3 <<= 2;
0x0000c358 orr.w r3, r3, sb, lsl 7 | r3 |= (sb << 7);
0x0000c35c ldrb sb, [ip, -0xa] | sb = *((ip - 0xa));
0x0000c360 ldrb.w sb, [r2, sb] | sb = *((r2 + sb));
0x0000c364 orr.w r3, r3, sb, lsr 3 | r3 |= (sb >> 3);
0x0000c368 strb r3, [lr, -0x7] | *((lr - 0x7)) = r3;
0x0000c36c ldrb r3, [ip, -0xa] | r3 = *((ip - 0xa));
0x0000c370 ldrb.w sb, [r2, r3] | sb = *((r2 + r3));
0x0000c374 ldrb r3, [ip, -0x9] | r3 = *((ip - 0x9));
0x0000c378 ldrb r3, [r2, r3] | r3 = *((r2 + r3));
0x0000c37a orr.w r3, r3, sb, lsl 5 | r3 |= (sb << 5);
0x0000c37e strb r3, [lr, -0x6] | *((lr - 0x6)) = r3;
0x0000c382 cmp r1, lr |
0x0000c384 bne 0xc2ec |
| } while (r1 != lr);
0x0000c386 sub.w r5, r5, r8, lsl 3 | r5 -= (r8 << 3);
0x0000c38a add.w r8, r8, 1 | r8++;
0x0000c38e add.w r3, r8, r8, lsl 2 | r3 = r8 + (r8 << 2);
0x0000c392 add.w r8, r6, r8, lsl 3 | r8 = r6 + (r8 << 3);
0x0000c396 add r3, r7 | r3 += r7;
| label_8:
0x0000c398 cmp r5, 1 |
| if (r5 == 1) {
0x0000c39a beq.w 0xc4ce | goto label_16;
| }
| if (r5 < 1) {
0x0000c39e bls.w 0xc4c0 | goto label_17;
| }
0x0000c3a2 ldrb.w r1, [r8] | r1 = *(r8);
0x0000c3a6 cmp r5, 3 |
0x0000c3a8 ldrb.w ip, [r2, r1] | ip = *((r2 + r1));
0x0000c3ac ldrb.w r1, [r8, 1] | r1 = *((r8 + 1));
0x0000c3b0 ldrb r1, [r2, r1] | r1 = *((r2 + r1));
0x0000c3b2 lsl.w ip, ip, 3 |
0x0000c3b6 orr.w ip, ip, r1, lsr 2 |
0x0000c3ba mov r1, r3 | r1 = r3;
0x0000c3bc strb ip, [r1], 1 | *(r1) = ip;
| r1++;
| if (r5 == 3) {
0x0000c3c0 beq.w 0xc4ee | goto label_18;
| }
| if (r5 < 3) {
0x0000c3c4 bls.w 0xc542 | goto label_19;
| }
0x0000c3c8 ldrb.w r1, [r8, 2] | r1 = *((r8 + 2));
0x0000c3cc cmp r5, 4 |
0x0000c3ce ldrb.w ip, [r8, 1] | ip = *((r8 + 1));
0x0000c3d2 ldrb r1, [r2, r1] | r1 = *((r2 + r1));
0x0000c3d4 ldrb.w ip, [r2, ip] | ip = *((r2 + ip));
0x0000c3d8 lsl.w r1, r1, 1 | r1 <<= 1;
0x0000c3dc orr.w r1, r1, ip, lsl 6 | r1 |= (ip << 6);
0x0000c3e0 ldrb.w ip, [r8, 3] | ip = *((r8 + 3));
0x0000c3e4 ldrb.w ip, [r2, ip] | ip = *((r2 + ip));
0x0000c3e8 orr.w r1, r1, ip, lsr 4 | r1 |= (ip >> 4);
0x0000c3ec strb r1, [r3, 1] | *((r3 + 1)) = r1;
| if (r5 == 4) {
0x0000c3ee beq.w 0xc50c | goto label_20;
| }
0x0000c3f2 ldrb.w r1, [r8, 3] | r1 = *((r8 + 3));
0x0000c3f6 cmp r5, 6 |
0x0000c3f8 ldrb.w ip, [r8, 4] | ip = *((r8 + 4));
0x0000c3fc ldrb r1, [r2, r1] | r1 = *((r2 + r1));
0x0000c3fe ldrb.w ip, [r2, ip] | ip = *((r2 + ip));
0x0000c402 lsl.w r1, r1, 4 | r1 <<= 4;
0x0000c406 orr.w r1, r1, ip, lsr 1 | r1 |= (ip >> 1);
0x0000c40a strb r1, [r3, 2] | *((r3 + 2)) = r1;
0x0000c40c add.w r1, r3, 3 | r1 = r3 + 3;
| if (r5 == 6) {
0x0000c410 beq 0xc4dc | goto label_21;
| }
0x0000c412 cmp r5, 7 |
| if (r5 != 7) {
0x0000c414 bne.w 0xc53e | goto label_22;
| }
0x0000c418 ldrb.w r1, [r8, 5] | r1 = *((r8 + 5));
0x0000c41c ldrb.w ip, [r8, 4] | ip = *((r8 + 4));
0x0000c420 ldrb.w r5, [r8, 6] | r5 = *((r8 + 6));
0x0000c424 ldrb r1, [r2, r1] | r1 = *((r2 + r1));
0x0000c426 ldrb.w ip, [r2, ip] | ip = *((r2 + ip));
0x0000c42a ldrb r5, [r2, r5] | r5 = *((r2 + r5));
0x0000c42c lsls r1, r1, 2 | r1 <<= 2;
0x0000c42e orr.w r2, r1, ip, lsl 7 | r2 = r1 | (ip << 7);
0x0000c432 adds r1, r3, 4 | r1 = r3 + 4;
0x0000c434 subs r1, r1, r7 | r1 -= r7;
0x0000c436 orr.w r2, r2, r5, lsr 3 | r2 |= (r5 >> 3);
0x0000c43a strb r2, [r3, 3] | *((r3 + 3)) = r2;
0x0000c43c movs r2, 0 | r2 = 0;
0x0000c43e strb r2, [r3, 4] | *((r3 + 4)) = r2;
0x0000c440 cmp r6, 0 |
| if (r6 == 0) {
0x0000c442 beq 0xc51c | goto label_23;
| }
| if (r4 != 0) {
| label_1:
0x0000c444 cbz r4, 0xc448 |
0x0000c446 str r1, [r4] | *(r4) = r1;
| }
0x0000c448 pop.w {r3, r4, r5, r6, r7, r8, sb, pc} |
| label_9:
0x0000c44c cmp r2, 0 |
| if (r2 < 0) {
0x0000c44e blt 0xc4ae | goto label_24;
| }
0x0000c450 subs r3, r7, 0 | r3 = r7 - 0;
0x0000c452 it ne |
| if (r3 == r7) {
0x0000c454 movne r3, 1 | r3 = 1;
| }
0x0000c456 cmp r1, 0 |
0x0000c458 it ne |
| if (r1 == 0) {
0x0000c45a movne r3, 0 | r3 = 0;
| }
0x0000c45c cmp r3, 0 |
| if (r3 != 0) {
0x0000c45e bne 0xc500 | goto label_25;
| }
0x0000c460 mov r5, r2 | r5 = r2;
0x0000c462 cmp r1, 0 |
| if (r1 != 0) {
0x0000c464 bne.w 0xc26a | goto label_0;
| }
0x0000c468 lsrs r3, r2, 3 | r3 = r2 >> 3;
0x0000c46a mov r0, r1 | r0 = r1;
0x0000c46c and r2, r2, 7 | r2 &= 7;
0x0000c470 add.w r6, r3, r3, lsl 2 | r6 = r3 + (r3 << 2);
0x0000c474 adds r1, r6, 1 | r1 = r6 + 1;
| label_4:
0x0000c476 subs r2, 1 | r2--;
0x0000c478 cmp r2, 6 |
| if (r2 > 6) {
0x0000c47a bhi 0xc444 | goto label_1;
| }
| /* switch table (7 cases) at 0xc480 */
0x0000c47c tbb [pc, r2] | __asm ("tbb [0x0000c484]");
| label_10:
0x0000c488 ldr r2, [pc, 0xc0] |
0x0000c48a add r2, pc |
0x0000c48c add.w r2, r2, 0x2e0 | r2 = 0x18cba;
0x0000c490 b 0xc27a | goto label_2;
| label_12:
0x0000c492 mov ip, r1 |
0x0000c494 mov r0, r5 | r0 = r5;
0x0000c496 sub.w r5, ip, r6 | r5 = ip - r6;
0x0000c49a cmp r7, 0 |
| if (r7 != 0) {
0x0000c49c bne.w 0xc2ce | goto label_3;
| }
| label_5:
0x0000c4a0 lsrs r3, r5, 3 | r3 = r5 >> 3;
0x0000c4a2 and r2, r5, 7 | r2 = r5 & 7;
0x0000c4a6 add.w r6, r3, r3, lsl 2 | r6 = r3 + (r3 << 2);
0x0000c4aa adds r1, r6, 1 | r1 = r6 + 1;
0x0000c4ac b 0xc476 | goto label_4;
| label_24:
0x0000c4ae cmp r1, 0 |
0x0000c4b0 movw r0, 0x117f |
0x0000c4b4 movt r0, 1 | r0 = 0x1117f;
0x0000c4b8 it ne |
| if (r1 == 0) {
0x0000c4ba movne r0, 0x16 | r0 = 0x16;
| }
0x0000c4bc pop.w {r3, r4, r5, r6, r7, r8, sb, pc} |
| label_17:
0x0000c4c0 movs r5, 0 | r5 = 0;
| label_7:
0x0000c4c2 movs r2, 0 | r2 = 0;
0x0000c4c4 subs r1, r3, r7 | r1 = r3 - r7;
0x0000c4c6 strb r2, [r3] | *(r3) = r2;
0x0000c4c8 cmp r6, 0 |
| if (r6 != 0) {
0x0000c4ca bne 0xc444 | goto label_1;
| }
0x0000c4cc b 0xc4a0 | goto label_5;
| label_16:
0x0000c4ce movs r2, 0 | r2 = 0;
0x0000c4d0 subs r1, r3, r7 | r1 = r3 - r7;
0x0000c4d2 strb r2, [r3] | *(r3) = r2;
| if (r6 == 0) {
0x0000c4d4 cbz r6, 0xc526 | goto label_26;
| }
| do {
| label_6:
0x0000c4d6 movw r0, 0x4e36 | r0 = 0x4e36;
0x0000c4da b 0xc444 | goto label_1;
| label_21:
0x0000c4dc movs r2, 0 | r2 = 0;
0x0000c4de subs r1, r1, r7 | r1 -= r7;
0x0000c4e0 strb r2, [r3, 3] | *((r3 + 3)) = r2;
0x0000c4e2 cmp r6, 0 |
0x0000c4e4 bne 0xc4d6 |
| } while (r6 != 0);
0x0000c4e6 movw r0, 0x4e36 | r0 = 0x4e36;
0x0000c4ea adds r1, r6, 4 | r1 = r6 + 4;
0x0000c4ec b 0xc444 | goto label_1;
| label_18:
0x0000c4ee movs r2, 0 | r2 = 0;
0x0000c4f0 subs r1, r1, r7 | r1 -= r7;
0x0000c4f2 strb r2, [r3, 1] | *((r3 + 1)) = r2;
0x0000c4f4 cmp r6, 0 |
| if (r6 != 0) {
0x0000c4f6 bne 0xc4d6 | goto label_6;
| }
0x0000c4f8 movw r0, 0x4e36 | r0 = 0x4e36;
0x0000c4fc adds r1, r6, 2 | r1 = r6 + 2;
0x0000c4fe b 0xc444 | goto label_1;
| label_25:
0x0000c500 movw r0, 0x117f |
0x0000c504 movt r0, 1 | r0 = 0x1117f;
0x0000c508 pop.w {r3, r4, r5, r6, r7, r8, sb, pc} |
| label_20:
0x0000c50c adds r1, r3, 2 | r1 = r3 + 2;
0x0000c50e movs r2, 0 | r2 = 0;
0x0000c510 subs r1, r1, r7 | r1 -= r7;
0x0000c512 strb r2, [r3, 2] | *((r3 + 2)) = r2;
0x0000c514 cmp r6, 0 |
| if (r6 != 0) {
0x0000c516 bne 0xc444 | goto label_1;
| }
0x0000c518 adds r1, r6, 3 | r1 = r6 + 3;
0x0000c51a b 0xc444 | goto label_1;
| label_23:
0x0000c51c mov r3, r6 | r3 = r6;
0x0000c51e adds r3, 1 | r3++;
0x0000c520 add.w r1, r3, r3, lsl 2 | r1 = r3 + (r3 << 2);
0x0000c524 b 0xc444 | goto label_1;
| label_26:
0x0000c526 mov r1, r5 | r1 = r5;
0x0000c528 b 0xc4d6 | goto label_6;
| label_11:
0x0000c52a movs r1, 1 | r1 = 1;
0x0000c52c mov r0, r7 | r0 = r7;
0x0000c52e cmp r7, 0 |
| if (r7 == 0) {
0x0000c530 beq 0xc444 | goto label_1;
| }
0x0000c532 mov r3, r7 | r3 = r7;
0x0000c534 mov r0, r5 | r0 = r5;
0x0000c536 b 0xc4c2 | goto label_7;
| label_15:
0x0000c538 mov r3, r7 | r3 = r7;
0x0000c53a mov r8, r6 | r8 = r6;
0x0000c53c b 0xc398 | goto label_8;
| label_22:
0x0000c53e mov r3, r1 | r3 = r1;
0x0000c540 b 0xc4c2 | goto label_7;
| label_19:
0x0000c542 mov r3, r1 | r3 = r1;
0x0000c544 movs r5, 2 | r5 = 2;
0x0000c546 b 0xc4c2 | goto label_7;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0xc550 */
| #include <stdint.h>
|
; (fcn) sym.apr_decode_base32_binary () | void apr_decode_base32_binary (int16_t arg_20h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0000c550 push.w {r3, r4, r5, r6, r7, r8, sb, lr} |
0x0000c554 mov r8, r3 | r8 = r3;
0x0000c556 subs r3, r1, 0 | r3 = r1 - 0;
0x0000c558 mov r7, r0 | r7 = r0;
0x0000c55a it ne |
| if (r3 == r1) {
0x0000c55c movne r3, 1 | r3 = 1;
| }
0x0000c55e adds r0, r2, 1 | r0 = r2 + 1;
0x0000c560 it ne |
| if (r0 == r2) {
0x0000c562 movne r3, 0 | r3 = 0;
| }
0x0000c564 ldr r4, [sp, 0x20] | r4 = *(arg_20h);
0x0000c566 mov r6, r1 | r6 = r1;
0x0000c568 cmp r3, 0 |
| if (r3 == 0) {
0x0000c56a beq.w 0xc758 | goto label_8;
| }
0x0000c56e mov r0, r1 | r0 = r1;
0x0000c570 blx 0xa6d8 | r0 = fcn_0000a6d8 ();
0x0000c574 mov r2, r0 | r2 = r0;
| label_0:
0x0000c576 tst.w r8, 8 |
| if ((r8 & 8) == 0) {
0x0000c57a beq.w 0xc790 | goto label_9;
| }
0x0000c57e ldr.w ip, [pc, 0x2c0] | ip = *(0x0000c840);
0x0000c582 add ip, pc |
0x0000c584 add.w ip, ip, 0x1e0 |
| label_2:
0x0000c588 cmp r2, 0 |
| if (r2 == 0) {
0x0000c58a beq.w 0xc822 | goto label_10;
| }
0x0000c58e mov r1, r6 | r1 = r6;
0x0000c590 b 0xc598 |
| while (lr < 0x1f) {
0x0000c592 subs r2, 1 | r2--;
| if (r2 == 1) {
0x0000c594 beq.w 0xc79c | goto label_11;
| }
0x0000c598 mov r5, r1 | r5 = r1;
0x0000c59a ldrb lr, [r1], 1 |
0x0000c59e ldrb.w lr, [ip, lr] |
0x0000c5a2 cmp.w lr, 0x1f |
0x0000c5a6 bls 0xc592 |
| }
0x0000c5a8 ands r0, r8, 1 | r0 = r8 & 1;
0x0000c5ac it ne |
| if (r0 == r8) {
0x0000c5ae movne r0, 0 | r0 = 0;
| }
| if (r0 != r8) {
0x0000c5b0 bne 0xc5d2 | goto label_12;
| }
0x0000c5b2 cmp r2, 6 |
| if (r2 > 6) {
0x0000c5b4 bhi 0xc5ca | goto label_13;
| }
0x0000c5b6 adds r3, r5, r2 | r3 = r5 + r2;
0x0000c5b8 b 0xc5bc |
| if (r2 == 0) {
| while (r1 > 0x20) {
0x0000c5ba cbz r2, 0xc5d2 | goto label_12;
| }
0x0000c5bc ldrb r1, [r3, -0x1]! | r1 = *((r3 -= 0x1));
0x0000c5c0 subs r2, 1 | r2--;
0x0000c5c2 ldrb.w r1, [ip, r1] | r1 = *((ip + r1));
0x0000c5c6 cmp r1, 0x20 |
0x0000c5c8 bhi 0xc5ba |
| }
| label_13:
0x0000c5ca movw r0, 0x117c |
0x0000c5ce movt r0, 1 | r0 = 0x1117c;
| label_12:
0x0000c5d2 subs r2, r5, r6 | r2 = r5 - r6;
0x0000c5d4 cmp r7, 0 |
| if (r7 == 0) {
0x0000c5d6 beq.w 0xc7a8 | goto label_14;
| }
0x0000c5d8 strh r7, [r4, 6] | *((r4 + 6)) = r7;
| label_3:
0x0000c5da cmp r2, 7 |
| if (r2 < 7) {
0x0000c5dc bls.w 0xc82e | goto label_15;
| }
0x0000c5e0 sub.w lr, r2, 8 | lr = r2 - 8;
0x0000c5e4 add.w r8, r7, 0xa | r8 = r7 + 0xa;
0x0000c5e8 lsr.w r1, lr, 3 | r1 = lr >> 3;
0x0000c5ec adds r3, r7, 5 | r3 = r7 + 5;
0x0000c5ee add.w r2, r6, 8 | r2 = r6 + 8;
0x0000c5f2 add.w r5, r1, r1, lsl 2 | r5 = r1 + (r1 << 2);
0x0000c5f6 add r8, r5 | r8 += r5;
| do {
0x0000c5f8 ldrb r5, [r2, -0x7] | r5 = *((r2 - 0x7));
0x0000c5fc adds r3, 5 | r3 += 5;
0x0000c5fe adds r2, 8 | r2 += 8;
0x0000c600 ldrb.w sb, [ip, r5] | sb = *((ip + r5));
0x0000c604 ldrb r5, [r2, -0x10] | r5 = *((r2 - 0x10));
0x0000c608 ldrb.w r5, [ip, r5] | r5 = *((ip + r5));
0x0000c60c lsls r5, r5, 3 | r5 <<= 3;
0x0000c60e orr.w r5, r5, sb, lsr 2 | r5 |= (sb >> 2);
0x0000c612 strb r5, [r3, -0xa] | *((r3 - 0xa)) = r5;
0x0000c616 ldrb r5, [r2, -0xf] | r5 = *((r2 - 0xf));
0x0000c61a ldrb.w sb, [ip, r5] | sb = *((ip + r5));
0x0000c61e ldrb r5, [r2, -0xe] | r5 = *((r2 - 0xe));
0x0000c622 ldrb.w r5, [ip, r5] | r5 = *((ip + r5));
0x0000c626 lsls r5, r5, 1 | r5 <<= 1;
0x0000c628 orr.w r5, r5, sb, lsl 6 | r5 |= (sb << 6);
0x0000c62c ldrb sb, [r2, -0xd] | sb = *((r2 - 0xd));
0x0000c630 ldrb.w sb, [ip, sb] | sb = *((ip + sb));
0x0000c634 orr.w r5, r5, sb, lsr 4 | r5 |= (sb >> 4);
0x0000c638 strb r5, [r3, -0x9] | *((r3 - 0x9)) = r5;
0x0000c63c ldrb r5, [r2, -0xc] | r5 = *((r2 - 0xc));
0x0000c640 ldrb.w sb, [ip, r5] | sb = *((ip + r5));
0x0000c644 ldrb r5, [r2, -0xd] | r5 = *((r2 - 0xd));
0x0000c648 ldrb.w r5, [ip, r5] | r5 = *((ip + r5));
0x0000c64c lsls r5, r5, 4 | r5 <<= 4;
0x0000c64e orr.w r5, r5, sb, lsr 1 | r5 |= (sb >> 1);
0x0000c652 strb r5, [r3, -0x8] | *((r3 - 0x8)) = r5;
0x0000c656 ldrb r5, [r2, -0xc] | r5 = *((r2 - 0xc));
0x0000c65a ldrb.w sb, [ip, r5] | sb = *((ip + r5));
0x0000c65e ldrb r5, [r2, -0xb] | r5 = *((r2 - 0xb));
0x0000c662 ldrb.w r5, [ip, r5] | r5 = *((ip + r5));
0x0000c666 lsls r5, r5, 2 | r5 <<= 2;
0x0000c668 orr.w r5, r5, sb, lsl 7 | r5 |= (sb << 7);
0x0000c66c ldrb sb, [r2, -0xa] | sb = *((r2 - 0xa));
0x0000c670 ldrb.w sb, [ip, sb] | sb = *((ip + sb));
0x0000c674 orr.w r5, r5, sb, lsr 3 | r5 |= (sb >> 3);
0x0000c678 strb r5, [r3, -0x7] | *((r3 - 0x7)) = r5;
0x0000c67c ldrb r5, [r2, -0xa] | r5 = *((r2 - 0xa));
0x0000c680 ldrb.w sb, [ip, r5] | sb = *((ip + r5));
0x0000c684 ldrb r5, [r2, -0x9] | r5 = *((r2 - 0x9));
0x0000c688 ldrb.w r5, [ip, r5] | r5 = *((ip + r5));
0x0000c68c orr.w r5, r5, sb, lsl 5 | r5 |= (sb << 5);
0x0000c690 strb r5, [r3, -0x6] | *((r3 - 0x6)) = r5;
0x0000c694 cmp r8, r3 |
0x0000c696 bne 0xc5f8 |
| } while (r8 != r3);
0x0000c698 sub.w r2, lr, r1, lsl 3 | r2 = lr - (r1 << 3);
0x0000c69c adds r1, 1 | r1++;
0x0000c69e add.w r3, r1, r1, lsl 2 | r3 = r1 + (r1 << 2);
0x0000c6a2 add.w r1, r6, r1, lsl 3 | r1 = r6 + (r1 << 3);
0x0000c6a6 add r3, r7 | r3 += r7;
| label_7:
0x0000c6a8 cmp r2, 1 |
| if (r2 == 1) {
0x0000c6aa beq.w 0xc7d2 | goto label_16;
| }
| if (r2 < 1) {
0x0000c6ae bls.w 0xc7c6 | goto label_17;
| }
0x0000c6b2 ldrb r5, [r1] | r5 = *(r1);
0x0000c6b4 cmp r2, 3 |
0x0000c6b6 ldrb.w lr, [r1, 1] |
0x0000c6ba ldrb.w r5, [ip, r5] | r5 = *((ip + r5));
0x0000c6be ldrb.w lr, [ip, lr] |
0x0000c6c2 lsl.w r5, r5, 3 | r5 <<= 3;
0x0000c6c6 orr.w r5, r5, lr, lsr 2 | r5 |= (lr >> 2);
0x0000c6ca mov lr, r3 | lr = r3;
0x0000c6cc strb r5, [lr], 1 | *(lr) = r5;
| lr++;
| if (r2 == 3) {
0x0000c6d0 beq.w 0xc7ec | goto label_18;
| }
| if (r2 < 3) {
0x0000c6d4 bls.w 0xc838 | goto label_19;
| }
0x0000c6d8 ldrb r5, [r1, 2] | r5 = *((r1 + 2));
0x0000c6da cmp r2, 4 |
0x0000c6dc ldrb.w lr, [r1, 1] |
0x0000c6e0 ldrb.w r5, [ip, r5] | r5 = *((ip + r5));
0x0000c6e4 ldrb.w lr, [ip, lr] |
0x0000c6e8 lsl.w r5, r5, 1 | r5 <<= 1;
0x0000c6ec orr.w r5, r5, lr, lsl 6 | r5 |= (lr << 6);
0x0000c6f0 ldrb.w lr, [r1, 3] |
0x0000c6f4 ldrb.w lr, [ip, lr] |
0x0000c6f8 orr.w r5, r5, lr, lsr 4 | r5 |= (lr >> 4);
0x0000c6fc strb r5, [r3, 1] | *((r3 + 1)) = r5;
| if (r2 == 4) {
0x0000c6fe beq.w 0xc80a | goto label_20;
| }
0x0000c702 ldrb r5, [r1, 3] | r5 = *((r1 + 3));
0x0000c704 cmp r2, 6 |
0x0000c706 ldrb.w lr, [r1, 4] |
0x0000c70a ldrb.w r5, [ip, r5] | r5 = *((ip + r5));
0x0000c70e ldrb.w lr, [ip, lr] |
0x0000c712 lsl.w r5, r5, 4 | r5 <<= 4;
0x0000c716 orr.w r5, r5, lr, lsr 1 | r5 |= (lr >> 1);
0x0000c71a strb r5, [r3, 2] | *((r3 + 2)) = r5;
0x0000c71c add.w r5, r3, 3 | r5 = r3 + 3;
| if (r2 == 6) {
0x0000c720 beq 0xc7dc | goto label_21;
| }
0x0000c722 cmp r2, 7 |
| if (r2 != 7) {
0x0000c724 bne.w 0xc834 | goto label_22;
| }
0x0000c728 ldrb r2, [r1, 5] | r2 = *((r1 + 5));
0x0000c72a adds r3, 4 | r3 += 4;
0x0000c72c ldrb r5, [r1, 4] | r5 = *((r1 + 4));
0x0000c72e ldrb r1, [r1, 6] | r1 = *((r1 + 6));
0x0000c730 ldrb.w r2, [ip, r2] | r2 = *((ip + r2));
0x0000c734 ldrb.w r5, [ip, r5] | r5 = *((ip + r5));
0x0000c738 ldrb.w r1, [ip, r1] | r1 = *((ip + r1));
0x0000c73c lsls r2, r2, 2 | r2 <<= 2;
0x0000c73e orr.w r2, r2, r5, lsl 7 | r2 |= (r5 << 7);
0x0000c742 orr.w r2, r2, r1, lsr 3 | r2 |= (r1 >> 3);
0x0000c746 strb r2, [r3, -0x1] | *((r3 - 0x1)) = r2;
0x0000c74a subs r2, r3, r7 | r2 = r3 - r7;
0x0000c74c cmp r6, 0 |
| if (r6 == 0) {
0x0000c74e beq 0xc818 | goto label_23;
| }
| if (r4 != 0) {
| label_1:
0x0000c750 cbz r4, 0xc754 |
0x0000c752 str r2, [r4] | *(r4) = r2;
| }
0x0000c754 pop.w {r3, r4, r5, r6, r7, r8, sb, pc} |
| label_8:
0x0000c758 cmp r2, 0 |
| if (r2 < 0) {
0x0000c75a blt 0xc7b4 | goto label_24;
| }
0x0000c75c subs r3, r7, 0 | r3 = r7 - 0;
0x0000c75e it ne |
| if (r3 == r7) {
0x0000c760 movne r3, 1 | r3 = 1;
| }
0x0000c762 cmp r1, 0 |
0x0000c764 it ne |
| if (r1 == 0) {
0x0000c766 movne r3, 0 | r3 = 0;
| }
0x0000c768 cmp r3, 0 |
| if (r3 != 0) {
0x0000c76a bne 0xc7fe | goto label_25;
| }
0x0000c76c cmp r1, 0 |
| if (r1 != 0) {
0x0000c76e bne.w 0xc576 | goto label_0;
| }
0x0000c772 lsrs r1, r2, 3 | r1 = r2 >> 3;
0x0000c774 and r3, r2, 7 | r3 = r2 & 7;
0x0000c778 mov r0, r6 | r0 = r6;
0x0000c77a add.w r2, r1, r1, lsl 2 | r2 = r1 + (r1 << 2);
| label_4:
0x0000c77e subs r3, 1 | r3--;
0x0000c780 cmp r3, 6 |
| if (r3 > 6) {
0x0000c782 bhi 0xc750 | goto label_1;
| }
| /* switch table (7 cases) at 0xc788 */
0x0000c784 tbb [pc, r3] | __asm ("tbb [0x0000c78c]");
| label_9:
0x0000c790 ldr.w ip, [pc, 0xb0] |
0x0000c794 add ip, pc |
0x0000c796 add.w ip, ip, 0x2e0 | ip = 0x192bc;
0x0000c79a b 0xc588 | goto label_2;
| label_11:
0x0000c79c mov r5, r1 | r5 = r1;
0x0000c79e mov r0, r2 | r0 = r2;
0x0000c7a0 subs r2, r5, r6 | r2 = r5 - r6;
0x0000c7a2 cmp r7, 0 |
| if (r7 != 0) {
0x0000c7a4 bne.w 0xc5da | goto label_3;
| }
| do {
| label_14:
0x0000c7a8 lsrs r1, r2, 3 | r1 = r2 >> 3;
0x0000c7aa and r3, r2, 7 | r3 = r2 & 7;
0x0000c7ae add.w r2, r1, r1, lsl 2 | r2 = r1 + (r1 << 2);
0x0000c7b2 b 0xc77e | goto label_4;
| label_24:
0x0000c7b4 cmp r1, 0 |
0x0000c7b6 movw r0, 0x117f |
0x0000c7ba movt r0, 1 | r0 = 0x1117f;
0x0000c7be it ne |
| if (r1 == 0) {
0x0000c7c0 movne r0, 0x16 | r0 = 0x16;
| }
0x0000c7c2 pop.w {r3, r4, r5, r6, r7, r8, sb, pc} |
| label_17:
0x0000c7c6 movs r2, 0 | r2 = 0;
| label_6:
0x0000c7c8 subs r3, r3, r7 | r3 -= r7;
0x0000c7ca cmp r6, 0 |
0x0000c7cc beq 0xc7a8 |
| } while (r6 == 0);
0x0000c7ce mov r2, r3 | r2 = r3;
0x0000c7d0 b 0xc750 | goto label_1;
| label_16:
0x0000c7d2 subs r2, r3, r7 | r2 = r3 - r7;
| if (r6 == 0) {
0x0000c7d4 cbz r6, 0xc81e | goto label_26;
| }
| do {
| label_5:
0x0000c7d6 movw r0, 0x4e36 | r0 = 0x4e36;
0x0000c7da b 0xc750 | goto label_1;
| label_21:
0x0000c7dc subs r2, r5, r7 | r2 = r5 - r7;
0x0000c7de cmp r6, 0 |
0x0000c7e0 bne 0xc7d6 |
| } while (r6 != 0);
0x0000c7e2 mov r2, r6 | r2 = r6;
0x0000c7e4 movw r0, 0x4e36 | r0 = 0x4e36;
0x0000c7e8 adds r2, 3 | r2 += 3;
0x0000c7ea b 0xc750 | goto label_1;
| label_18:
0x0000c7ec sub.w r2, lr, r7 | r2 = lr - r7;
0x0000c7f0 cmp r6, 0 |
| if (r6 != 0) {
0x0000c7f2 bne 0xc7d6 | goto label_5;
| }
0x0000c7f4 mov r2, r6 | r2 = r6;
0x0000c7f6 movw r0, 0x4e36 | r0 = 0x4e36;
0x0000c7fa adds r2, 1 | r2++;
0x0000c7fc b 0xc750 | goto label_1;
| label_25:
0x0000c7fe movw r0, 0x117f |
0x0000c802 movt r0, 1 | r0 = 0x1117f;
0x0000c804 movs r1, r0 | r1 = r0;
0x0000c806 pop.w {r3, r4, r5, r6, r7, r8, sb, pc} |
| label_20:
0x0000c80a adds r3, 2 | r3 += 2;
0x0000c80c subs r2, r3, r7 | r2 = r3 - r7;
0x0000c80e cmp r6, 0 |
| if (r6 != 0) {
0x0000c810 bne 0xc750 | goto label_1;
| }
0x0000c812 mov r2, r6 | r2 = r6;
0x0000c814 adds r2, 2 | r2 += 2;
0x0000c816 b 0xc750 | goto label_1;
| label_23:
0x0000c818 mov r2, r6 | r2 = r6;
0x0000c81a adds r2, 4 | r2 += 4;
0x0000c81c b 0xc750 | goto label_1;
| label_26:
0x0000c81e mov r2, r6 | r2 = r6;
0x0000c820 b 0xc7d6 | goto label_5;
| label_10:
0x0000c822 mov r0, r2 | r0 = r2;
0x0000c824 cmp r7, 0 |
| if (r7 == 0) {
0x0000c826 beq 0xc750 | goto label_1;
| }
0x0000c828 mov r3, r7 | r3 = r7;
0x0000c82a mov r0, r2 | r0 = r2;
0x0000c82c b 0xc7c8 | goto label_6;
| label_15:
0x0000c82e mov r3, r7 | r3 = r7;
0x0000c830 mov r1, r6 | r1 = r6;
0x0000c832 b 0xc6a8 | goto label_7;
| label_22:
0x0000c834 mov r3, r5 | r3 = r5;
0x0000c836 b 0xc7c8 | goto label_6;
| label_19:
0x0000c838 mov r3, lr | r3 = lr;
0x0000c83a movs r2, 2 | r2 = 2;
0x0000c83c b 0xc7c8 | 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/lib/libapr-1.so.0.7.2 @ 0xc550 */
| #include <stdint.h>
|
; (fcn) sym.apr_decode_base32_binary () | void apr_decode_base32_binary (int16_t arg_20h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0000c550 push.w {r3, r4, r5, r6, r7, r8, sb, lr} |
0x0000c554 mov r8, r3 | r8 = r3;
0x0000c556 subs r3, r1, 0 | r3 = r1 - 0;
0x0000c558 mov r7, r0 | r7 = r0;
0x0000c55a it ne |
| if (r3 == r1) {
0x0000c55c movne r3, 1 | r3 = 1;
| }
0x0000c55e adds r0, r2, 1 | r0 = r2 + 1;
0x0000c560 it ne |
| if (r0 == r2) {
0x0000c562 movne r3, 0 | r3 = 0;
| }
0x0000c564 ldr r4, [sp, 0x20] | r4 = *(arg_20h);
0x0000c566 mov r6, r1 | r6 = r1;
0x0000c568 cmp r3, 0 |
| if (r3 == 0) {
0x0000c56a beq.w 0xc758 | goto label_8;
| }
0x0000c56e mov r0, r1 | r0 = r1;
0x0000c570 blx 0xa6d8 | r0 = fcn_0000a6d8 ();
0x0000c574 mov r2, r0 | r2 = r0;
| label_0:
0x0000c576 tst.w r8, 8 |
| if ((r8 & 8) == 0) {
0x0000c57a beq.w 0xc790 | goto label_9;
| }
0x0000c57e ldr.w ip, [pc, 0x2c0] | ip = *(0x0000c840);
0x0000c582 add ip, pc |
0x0000c584 add.w ip, ip, 0x1e0 |
| label_2:
0x0000c588 cmp r2, 0 |
| if (r2 == 0) {
0x0000c58a beq.w 0xc822 | goto label_10;
| }
0x0000c58e mov r1, r6 | r1 = r6;
0x0000c590 b 0xc598 |
| while (lr < 0x1f) {
0x0000c592 subs r2, 1 | r2--;
| if (r2 == 1) {
0x0000c594 beq.w 0xc79c | goto label_11;
| }
0x0000c598 mov r5, r1 | r5 = r1;
0x0000c59a ldrb lr, [r1], 1 |
0x0000c59e ldrb.w lr, [ip, lr] |
0x0000c5a2 cmp.w lr, 0x1f |
0x0000c5a6 bls 0xc592 |
| }
0x0000c5a8 ands r0, r8, 1 | r0 = r8 & 1;
0x0000c5ac it ne |
| if (r0 == r8) {
0x0000c5ae movne r0, 0 | r0 = 0;
| }
| if (r0 != r8) {
0x0000c5b0 bne 0xc5d2 | goto label_12;
| }
0x0000c5b2 cmp r2, 6 |
| if (r2 > 6) {
0x0000c5b4 bhi 0xc5ca | goto label_13;
| }
0x0000c5b6 adds r3, r5, r2 | r3 = r5 + r2;
0x0000c5b8 b 0xc5bc |
| if (r2 == 0) {
| while (r1 > 0x20) {
0x0000c5ba cbz r2, 0xc5d2 | goto label_12;
| }
0x0000c5bc ldrb r1, [r3, -0x1]! | r1 = *((r3 -= 0x1));
0x0000c5c0 subs r2, 1 | r2--;
0x0000c5c2 ldrb.w r1, [ip, r1] | r1 = *((ip + r1));
0x0000c5c6 cmp r1, 0x20 |
0x0000c5c8 bhi 0xc5ba |
| }
| label_13:
0x0000c5ca movw r0, 0x117c |
0x0000c5ce movt r0, 1 | r0 = 0x1117c;
| label_12:
0x0000c5d2 subs r2, r5, r6 | r2 = r5 - r6;
0x0000c5d4 cmp r7, 0 |
| if (r7 == 0) {
0x0000c5d6 beq.w 0xc7a8 | goto label_14;
| }
0x0000c5d8 strh r7, [r4, 6] | *((r4 + 6)) = r7;
| label_3:
0x0000c5da cmp r2, 7 |
| if (r2 < 7) {
0x0000c5dc bls.w 0xc82e | goto label_15;
| }
0x0000c5e0 sub.w lr, r2, 8 | lr = r2 - 8;
0x0000c5e4 add.w r8, r7, 0xa | r8 = r7 + 0xa;
0x0000c5e8 lsr.w r1, lr, 3 | r1 = lr >> 3;
0x0000c5ec adds r3, r7, 5 | r3 = r7 + 5;
0x0000c5ee add.w r2, r6, 8 | r2 = r6 + 8;
0x0000c5f2 add.w r5, r1, r1, lsl 2 | r5 = r1 + (r1 << 2);
0x0000c5f6 add r8, r5 | r8 += r5;
| do {
0x0000c5f8 ldrb r5, [r2, -0x7] | r5 = *((r2 - 0x7));
0x0000c5fc adds r3, 5 | r3 += 5;
0x0000c5fe adds r2, 8 | r2 += 8;
0x0000c600 ldrb.w sb, [ip, r5] | sb = *((ip + r5));
0x0000c604 ldrb r5, [r2, -0x10] | r5 = *((r2 - 0x10));
0x0000c608 ldrb.w r5, [ip, r5] | r5 = *((ip + r5));
0x0000c60c lsls r5, r5, 3 | r5 <<= 3;
0x0000c60e orr.w r5, r5, sb, lsr 2 | r5 |= (sb >> 2);
0x0000c612 strb r5, [r3, -0xa] | *((r3 - 0xa)) = r5;
0x0000c616 ldrb r5, [r2, -0xf] | r5 = *((r2 - 0xf));
0x0000c61a ldrb.w sb, [ip, r5] | sb = *((ip + r5));
0x0000c61e ldrb r5, [r2, -0xe] | r5 = *((r2 - 0xe));
0x0000c622 ldrb.w r5, [ip, r5] | r5 = *((ip + r5));
0x0000c626 lsls r5, r5, 1 | r5 <<= 1;
0x0000c628 orr.w r5, r5, sb, lsl 6 | r5 |= (sb << 6);
0x0000c62c ldrb sb, [r2, -0xd] | sb = *((r2 - 0xd));
0x0000c630 ldrb.w sb, [ip, sb] | sb = *((ip + sb));
0x0000c634 orr.w r5, r5, sb, lsr 4 | r5 |= (sb >> 4);
0x0000c638 strb r5, [r3, -0x9] | *((r3 - 0x9)) = r5;
0x0000c63c ldrb r5, [r2, -0xc] | r5 = *((r2 - 0xc));
0x0000c640 ldrb.w sb, [ip, r5] | sb = *((ip + r5));
0x0000c644 ldrb r5, [r2, -0xd] | r5 = *((r2 - 0xd));
0x0000c648 ldrb.w r5, [ip, r5] | r5 = *((ip + r5));
0x0000c64c lsls r5, r5, 4 | r5 <<= 4;
0x0000c64e orr.w r5, r5, sb, lsr 1 | r5 |= (sb >> 1);
0x0000c652 strb r5, [r3, -0x8] | *((r3 - 0x8)) = r5;
0x0000c656 ldrb r5, [r2, -0xc] | r5 = *((r2 - 0xc));
0x0000c65a ldrb.w sb, [ip, r5] | sb = *((ip + r5));
0x0000c65e ldrb r5, [r2, -0xb] | r5 = *((r2 - 0xb));
0x0000c662 ldrb.w r5, [ip, r5] | r5 = *((ip + r5));
0x0000c666 lsls r5, r5, 2 | r5 <<= 2;
0x0000c668 orr.w r5, r5, sb, lsl 7 | r5 |= (sb << 7);
0x0000c66c ldrb sb, [r2, -0xa] | sb = *((r2 - 0xa));
0x0000c670 ldrb.w sb, [ip, sb] | sb = *((ip + sb));
0x0000c674 orr.w r5, r5, sb, lsr 3 | r5 |= (sb >> 3);
0x0000c678 strb r5, [r3, -0x7] | *((r3 - 0x7)) = r5;
0x0000c67c ldrb r5, [r2, -0xa] | r5 = *((r2 - 0xa));
0x0000c680 ldrb.w sb, [ip, r5] | sb = *((ip + r5));
0x0000c684 ldrb r5, [r2, -0x9] | r5 = *((r2 - 0x9));
0x0000c688 ldrb.w r5, [ip, r5] | r5 = *((ip + r5));
0x0000c68c orr.w r5, r5, sb, lsl 5 | r5 |= (sb << 5);
0x0000c690 strb r5, [r3, -0x6] | *((r3 - 0x6)) = r5;
0x0000c694 cmp r8, r3 |
0x0000c696 bne 0xc5f8 |
| } while (r8 != r3);
0x0000c698 sub.w r2, lr, r1, lsl 3 | r2 = lr - (r1 << 3);
0x0000c69c adds r1, 1 | r1++;
0x0000c69e add.w r3, r1, r1, lsl 2 | r3 = r1 + (r1 << 2);
0x0000c6a2 add.w r1, r6, r1, lsl 3 | r1 = r6 + (r1 << 3);
0x0000c6a6 add r3, r7 | r3 += r7;
| label_7:
0x0000c6a8 cmp r2, 1 |
| if (r2 == 1) {
0x0000c6aa beq.w 0xc7d2 | goto label_16;
| }
| if (r2 < 1) {
0x0000c6ae bls.w 0xc7c6 | goto label_17;
| }
0x0000c6b2 ldrb r5, [r1] | r5 = *(r1);
0x0000c6b4 cmp r2, 3 |
0x0000c6b6 ldrb.w lr, [r1, 1] |
0x0000c6ba ldrb.w r5, [ip, r5] | r5 = *((ip + r5));
0x0000c6be ldrb.w lr, [ip, lr] |
0x0000c6c2 lsl.w r5, r5, 3 | r5 <<= 3;
0x0000c6c6 orr.w r5, r5, lr, lsr 2 | r5 |= (lr >> 2);
0x0000c6ca mov lr, r3 | lr = r3;
0x0000c6cc strb r5, [lr], 1 | *(lr) = r5;
| lr++;
| if (r2 == 3) {
0x0000c6d0 beq.w 0xc7ec | goto label_18;
| }
| if (r2 < 3) {
0x0000c6d4 bls.w 0xc838 | goto label_19;
| }
0x0000c6d8 ldrb r5, [r1, 2] | r5 = *((r1 + 2));
0x0000c6da cmp r2, 4 |
0x0000c6dc ldrb.w lr, [r1, 1] |
0x0000c6e0 ldrb.w r5, [ip, r5] | r5 = *((ip + r5));
0x0000c6e4 ldrb.w lr, [ip, lr] |
0x0000c6e8 lsl.w r5, r5, 1 | r5 <<= 1;
0x0000c6ec orr.w r5, r5, lr, lsl 6 | r5 |= (lr << 6);
0x0000c6f0 ldrb.w lr, [r1, 3] |
0x0000c6f4 ldrb.w lr, [ip, lr] |
0x0000c6f8 orr.w r5, r5, lr, lsr 4 | r5 |= (lr >> 4);
0x0000c6fc strb r5, [r3, 1] | *((r3 + 1)) = r5;
| if (r2 == 4) {
0x0000c6fe beq.w 0xc80a | goto label_20;
| }
0x0000c702 ldrb r5, [r1, 3] | r5 = *((r1 + 3));
0x0000c704 cmp r2, 6 |
0x0000c706 ldrb.w lr, [r1, 4] |
0x0000c70a ldrb.w r5, [ip, r5] | r5 = *((ip + r5));
0x0000c70e ldrb.w lr, [ip, lr] |
0x0000c712 lsl.w r5, r5, 4 | r5 <<= 4;
0x0000c716 orr.w r5, r5, lr, lsr 1 | r5 |= (lr >> 1);
0x0000c71a strb r5, [r3, 2] | *((r3 + 2)) = r5;
0x0000c71c add.w r5, r3, 3 | r5 = r3 + 3;
| if (r2 == 6) {
0x0000c720 beq 0xc7dc | goto label_21;
| }
0x0000c722 cmp r2, 7 |
| if (r2 != 7) {
0x0000c724 bne.w 0xc834 | goto label_22;
| }
0x0000c728 ldrb r2, [r1, 5] | r2 = *((r1 + 5));
0x0000c72a adds r3, 4 | r3 += 4;
0x0000c72c ldrb r5, [r1, 4] | r5 = *((r1 + 4));
0x0000c72e ldrb r1, [r1, 6] | r1 = *((r1 + 6));
0x0000c730 ldrb.w r2, [ip, r2] | r2 = *((ip + r2));
0x0000c734 ldrb.w r5, [ip, r5] | r5 = *((ip + r5));
0x0000c738 ldrb.w r1, [ip, r1] | r1 = *((ip + r1));
0x0000c73c lsls r2, r2, 2 | r2 <<= 2;
0x0000c73e orr.w r2, r2, r5, lsl 7 | r2 |= (r5 << 7);
0x0000c742 orr.w r2, r2, r1, lsr 3 | r2 |= (r1 >> 3);
0x0000c746 strb r2, [r3, -0x1] | *((r3 - 0x1)) = r2;
0x0000c74a subs r2, r3, r7 | r2 = r3 - r7;
0x0000c74c cmp r6, 0 |
| if (r6 == 0) {
0x0000c74e beq 0xc818 | goto label_23;
| }
| if (r4 != 0) {
| label_1:
0x0000c750 cbz r4, 0xc754 |
0x0000c752 str r2, [r4] | *(r4) = r2;
| }
0x0000c754 pop.w {r3, r4, r5, r6, r7, r8, sb, pc} |
| label_8:
0x0000c758 cmp r2, 0 |
| if (r2 < 0) {
0x0000c75a blt 0xc7b4 | goto label_24;
| }
0x0000c75c subs r3, r7, 0 | r3 = r7 - 0;
0x0000c75e it ne |
| if (r3 == r7) {
0x0000c760 movne r3, 1 | r3 = 1;
| }
0x0000c762 cmp r1, 0 |
0x0000c764 it ne |
| if (r1 == 0) {
0x0000c766 movne r3, 0 | r3 = 0;
| }
0x0000c768 cmp r3, 0 |
| if (r3 != 0) {
0x0000c76a bne 0xc7fe | goto label_25;
| }
0x0000c76c cmp r1, 0 |
| if (r1 != 0) {
0x0000c76e bne.w 0xc576 | goto label_0;
| }
0x0000c772 lsrs r1, r2, 3 | r1 = r2 >> 3;
0x0000c774 and r3, r2, 7 | r3 = r2 & 7;
0x0000c778 mov r0, r6 | r0 = r6;
0x0000c77a add.w r2, r1, r1, lsl 2 | r2 = r1 + (r1 << 2);
| label_4:
0x0000c77e subs r3, 1 | r3--;
0x0000c780 cmp r3, 6 |
| if (r3 > 6) {
0x0000c782 bhi 0xc750 | goto label_1;
| }
| /* switch table (7 cases) at 0xc788 */
0x0000c784 tbb [pc, r3] | __asm ("tbb [0x0000c78c]");
| label_9:
0x0000c790 ldr.w ip, [pc, 0xb0] |
0x0000c794 add ip, pc |
0x0000c796 add.w ip, ip, 0x2e0 | ip = 0x192bc;
0x0000c79a b 0xc588 | goto label_2;
| label_11:
0x0000c79c mov r5, r1 | r5 = r1;
0x0000c79e mov r0, r2 | r0 = r2;
0x0000c7a0 subs r2, r5, r6 | r2 = r5 - r6;
0x0000c7a2 cmp r7, 0 |
| if (r7 != 0) {
0x0000c7a4 bne.w 0xc5da | goto label_3;
| }
| do {
| label_14:
0x0000c7a8 lsrs r1, r2, 3 | r1 = r2 >> 3;
0x0000c7aa and r3, r2, 7 | r3 = r2 & 7;
0x0000c7ae add.w r2, r1, r1, lsl 2 | r2 = r1 + (r1 << 2);
0x0000c7b2 b 0xc77e | goto label_4;
| label_24:
0x0000c7b4 cmp r1, 0 |
0x0000c7b6 movw r0, 0x117f |
0x0000c7ba movt r0, 1 | r0 = 0x1117f;
0x0000c7be it ne |
| if (r1 == 0) {
0x0000c7c0 movne r0, 0x16 | r0 = 0x16;
| }
0x0000c7c2 pop.w {r3, r4, r5, r6, r7, r8, sb, pc} |
| label_17:
0x0000c7c6 movs r2, 0 | r2 = 0;
| label_6:
0x0000c7c8 subs r3, r3, r7 | r3 -= r7;
0x0000c7ca cmp r6, 0 |
0x0000c7cc beq 0xc7a8 |
| } while (r6 == 0);
0x0000c7ce mov r2, r3 | r2 = r3;
0x0000c7d0 b 0xc750 | goto label_1;
| label_16:
0x0000c7d2 subs r2, r3, r7 | r2 = r3 - r7;
| if (r6 == 0) {
0x0000c7d4 cbz r6, 0xc81e | goto label_26;
| }
| do {
| label_5:
0x0000c7d6 movw r0, 0x4e36 | r0 = 0x4e36;
0x0000c7da b 0xc750 | goto label_1;
| label_21:
0x0000c7dc subs r2, r5, r7 | r2 = r5 - r7;
0x0000c7de cmp r6, 0 |
0x0000c7e0 bne 0xc7d6 |
| } while (r6 != 0);
0x0000c7e2 mov r2, r6 | r2 = r6;
0x0000c7e4 movw r0, 0x4e36 | r0 = 0x4e36;
0x0000c7e8 adds r2, 3 | r2 += 3;
0x0000c7ea b 0xc750 | goto label_1;
| label_18:
0x0000c7ec sub.w r2, lr, r7 | r2 = lr - r7;
0x0000c7f0 cmp r6, 0 |
| if (r6 != 0) {
0x0000c7f2 bne 0xc7d6 | goto label_5;
| }
0x0000c7f4 mov r2, r6 | r2 = r6;
0x0000c7f6 movw r0, 0x4e36 | r0 = 0x4e36;
0x0000c7fa adds r2, 1 | r2++;
0x0000c7fc b 0xc750 | goto label_1;
| label_25:
0x0000c7fe movw r0, 0x117f |
0x0000c802 movt r0, 1 | r0 = 0x1117f;
0x0000c804 movs r1, r0 | r1 = r0;
0x0000c806 pop.w {r3, r4, r5, r6, r7, r8, sb, pc} |
| label_20:
0x0000c80a adds r3, 2 | r3 += 2;
0x0000c80c subs r2, r3, r7 | r2 = r3 - r7;
0x0000c80e cmp r6, 0 |
| if (r6 != 0) {
0x0000c810 bne 0xc750 | goto label_1;
| }
0x0000c812 mov r2, r6 | r2 = r6;
0x0000c814 adds r2, 2 | r2 += 2;
0x0000c816 b 0xc750 | goto label_1;
| label_23:
0x0000c818 mov r2, r6 | r2 = r6;
0x0000c81a adds r2, 4 | r2 += 4;
0x0000c81c b 0xc750 | goto label_1;
| label_26:
0x0000c81e mov r2, r6 | r2 = r6;
0x0000c820 b 0xc7d6 | goto label_5;
| label_10:
0x0000c822 mov r0, r2 | r0 = r2;
0x0000c824 cmp r7, 0 |
| if (r7 == 0) {
0x0000c826 beq 0xc750 | goto label_1;
| }
0x0000c828 mov r3, r7 | r3 = r7;
0x0000c82a mov r0, r2 | r0 = r2;
0x0000c82c b 0xc7c8 | goto label_6;
| label_15:
0x0000c82e mov r3, r7 | r3 = r7;
0x0000c830 mov r1, r6 | r1 = r6;
0x0000c832 b 0xc6a8 | goto label_7;
| label_22:
0x0000c834 mov r3, r5 | r3 = r5;
0x0000c836 b 0xc7c8 | goto label_6;
| label_19:
0x0000c838 mov r3, lr | r3 = lr;
0x0000c83a movs r2, 2 | r2 = 2;
0x0000c83c b 0xc7c8 | 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/lib/libapr-1.so.0.7.2 @ 0xb6ac */
| #include <stdint.h>
|
; (fcn) sym.apr_decode_base64 () | void apr_decode_base64 (int16_t arg_20h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0000b6ac push.w {r3, r4, r5, r6, r7, r8, sb, lr} |
0x0000b6b0 mov r8, r3 | r8 = r3;
0x0000b6b2 subs r3, r1, 0 | r3 = r1 - 0;
0x0000b6b4 mov r7, r0 | r7 = r0;
0x0000b6b6 it ne |
| if (r3 == r1) {
0x0000b6b8 movne r3, 1 | r3 = 1;
| }
0x0000b6ba adds r0, r2, 1 | r0 = r2 + 1;
0x0000b6bc it ne |
| if (r0 == r2) {
0x0000b6be movne r3, 0 | r3 = 0;
| }
0x0000b6c0 ldr r4, [sp, 0x20] | r4 = *(arg_20h);
0x0000b6c2 mov r6, r1 | r6 = r1;
0x0000b6c4 cmp r3, 0 |
| if (r3 == 0) {
0x0000b6c6 beq.w 0xb80a | goto label_7;
| }
0x0000b6ca mov r0, r1 | r0 = r1;
0x0000b6cc blx 0xa6d8 | r0 = fcn_0000a6d8 ();
0x0000b6d0 mov r1, r0 | r1 = r0;
| label_0:
0x0000b6d2 cmp r1, 0 |
| if (r1 == 0) {
0x0000b6d4 beq.w 0xb8bc | goto label_8;
| }
0x0000b6d8 ldr r3, [pc, 0x1f4] |
0x0000b6da mov r2, r6 | r2 = r6;
0x0000b6dc add r3, pc | r3 = 0x16fb0;
0x0000b6de b 0xb6e6 |
| while (r5 < 0x3f) {
0x0000b6e0 subs r1, 1 | r1--;
| if (r1 == 1) {
0x0000b6e2 beq.w 0xb850 | goto label_9;
| }
0x0000b6e6 mov ip, r2 |
0x0000b6e8 ldrb lr, [r2], 1 |
0x0000b6ec add lr, r3 | lr += r3;
0x0000b6ee ldrb.w r5, [lr, 0x90] | r5 = *((lr + 0x90));
0x0000b6f2 cmp r5, 0x3f |
0x0000b6f4 bls 0xb6e0 |
| }
0x0000b6f6 ands r0, r8, 1 | r0 = r8 & 1;
0x0000b6fa it ne |
| if (r0 == r8) {
0x0000b6fc movne r0, 0 | r0 = 0;
| }
| if (r0 == r8) {
0x0000b6fe bne 0xb728 |
0x0000b700 cmp r1, 2 |
| if (r1 > 2) {
0x0000b702 bhi.w 0xb894 | goto label_10;
| }
0x0000b706 subs r1, 1 | r1--;
0x0000b708 ldrb.w r2, [ip, r1] | r2 = *((ip + r1));
0x0000b70c add r3, r2 | r3 += r2;
0x0000b70e ldrb.w r3, [r3, 0x90] | r3 = *((r3 + 0x90));
0x0000b712 cmp r3, 0x40 |
| if (r3 < 0x40) {
0x0000b714 bls.w 0xb894 | goto label_10;
| }
| if (r1 == 0) {
0x0000b718 cbz r1, 0xb728 | goto label_4;
| }
0x0000b71a movw r3, 0x117c |
0x0000b71e movt r3, 1 | r3 = 0x1117c;
0x0000b722 cmp r5, 0x40 |
0x0000b724 it ls |
| if (r5 <= 0x40) {
0x0000b726 movls r0, r3 | r0 = r3;
| goto label_4;
| }
| }
| label_4:
0x0000b728 sub.w ip, ip, r6 |
0x0000b72c cmp r7, 0 |
| if (r7 == 0) {
0x0000b72e beq.w 0xb85e | goto label_11;
| }
| label_2:
0x0000b732 cmp.w ip, 3 |
| if (ip < 3) {
0x0000b736 bls.w 0xb8ca | goto label_12;
| }
0x0000b73a sub.w ip, ip, 4 |
0x0000b73e ldr r5, [pc, 0x194] |
0x0000b740 lsr.w r3, ip, 2 | r3 = ip >> 2;
0x0000b744 adds r1, r7, 6 | r1 = r7 + 6;
0x0000b746 add.w lr, r7, 3 | lr = r7 + 3;
0x0000b74a add.w r8, r3, r3, lsl 1 | r8 = r3 + (r3 << 1);
0x0000b74e add r5, pc | r5 = 0x17028;
0x0000b750 adds r2, r6, 4 | r2 = r6 + 4;
0x0000b752 add r8, r1 | r8 += r1;
| do {
0x0000b754 ldrb r1, [r2, -0x3] | r1 = *((r2 - 0x3));
0x0000b758 add.w lr, lr, 3 | lr += 3;
0x0000b75c adds r2, 4 | r2 += 4;
0x0000b75e add r1, r5 | r1 += r5;
0x0000b760 ldrb.w sb, [r1, 0x90] | sb = *((r1 + 0x90));
0x0000b764 ldrb r1, [r2, -0x8] | r1 = *((r2 - 0x8));
0x0000b768 add r1, r5 | r1 += r5;
0x0000b76a ldrb.w r1, [r1, 0x90] | r1 = *((r1 + 0x90));
0x0000b76e lsls r1, r1, 2 | r1 <<= 2;
0x0000b770 orr.w r1, r1, sb, lsr 4 | r1 |= (sb >> 4);
0x0000b774 strb r1, [lr, -0x6] | *((lr - 0x6)) = r1;
0x0000b778 ldrb r1, [r2, -0x6] | r1 = *((r2 - 0x6));
0x0000b77c add r1, r5 | r1 += r5;
0x0000b77e ldrb.w sb, [r1, 0x90] | sb = *((r1 + 0x90));
0x0000b782 ldrb r1, [r2, -0x7] | r1 = *((r2 - 0x7));
0x0000b786 add r1, r5 | r1 += r5;
0x0000b788 ldrb.w r1, [r1, 0x90] | r1 = *((r1 + 0x90));
0x0000b78c lsls r1, r1, 4 | r1 <<= 4;
0x0000b78e orr.w r1, r1, sb, lsr 2 | r1 |= (sb >> 2);
0x0000b792 strb r1, [lr, -0x5] | *((lr - 0x5)) = r1;
0x0000b796 ldrb r1, [r2, -0x6] | r1 = *((r2 - 0x6));
0x0000b79a add r1, r5 | r1 += r5;
0x0000b79c ldrb.w sb, [r1, 0x90] | sb = *((r1 + 0x90));
0x0000b7a0 ldrb r1, [r2, -0x5] | r1 = *((r2 - 0x5));
0x0000b7a4 add r1, r5 | r1 += r5;
0x0000b7a6 ldrb.w r1, [r1, 0x90] | r1 = *((r1 + 0x90));
0x0000b7aa orr.w r1, r1, sb, lsl 6 | r1 |= (sb << 6);
0x0000b7ae strb r1, [lr, -0x4] | *((lr - 0x4)) = r1;
0x0000b7b2 cmp r8, lr |
0x0000b7b4 bne 0xb754 |
| } while (r8 != lr);
0x0000b7b6 sub.w ip, ip, r3, lsl 2 |
0x0000b7ba adds r3, 1 | r3++;
0x0000b7bc add.w r6, r6, r3, lsl 2 | r6 += (r3 << 2);
0x0000b7c0 add.w r3, r3, r3, lsl 1 | r3 += (r3 << 1);
0x0000b7c4 add r3, r7 | r3 += r7;
| label_6:
0x0000b7c6 cmp.w ip, 1 |
0x0000b7ca it eq |
| if (ip == 1) {
0x0000b7cc movweq r0, 0x4e36 | __asm ("movweq r0, 0x4e36");
| }
| if (ip != 1) {
0x0000b7d0 beq 0xb7fc |
| if (ip < 1) {
0x0000b7d2 bls 0xb7fc | goto label_5;
| }
0x0000b7d4 ldr r1, [pc, 0x100] |
0x0000b7d6 cmp.w ip, 3 |
0x0000b7da ldrb r2, [r6] | r2 = *(r6);
0x0000b7dc ldrb r5, [r6, 1] | r5 = *((r6 + 1));
0x0000b7de add r1, pc | r1 = 0x170ba;
0x0000b7e0 add r2, r1 | r2 += r1;
0x0000b7e2 ldrb.w r2, [r2, 0x90] | r2 = *((r2 + 0x90));
0x0000b7e6 add r5, r1 | r5 += r1;
0x0000b7e8 ldrb.w r5, [r5, 0x90] | r5 = *((r5 + 0x90));
0x0000b7ec lsl.w r2, r2, 2 | r2 <<= 2;
0x0000b7f0 orr.w r2, r2, r5, lsr 4 | r2 |= (r5 >> 4);
0x0000b7f4 strb r2, [r3] | *(r3) = r2;
0x0000b7f6 it ne |
| if (ip == 3) {
0x0000b7f8 addne r3, 1 | r3++;
| }
| if (ip == 3) {
0x0000b7fa beq 0xb89e | goto label_13;
| }
| }
| label_5:
0x0000b7fc subs r7, r3, r7 | r7 = r3 - r7;
0x0000b7fe movs r2, 0 | r2 = 0;
0x0000b800 strb r2, [r3] | *(r3) = r2;
| if (r4 != 0) {
| label_1:
0x0000b802 cbz r4, 0xb806 |
0x0000b804 str r7, [r4] | *(r4) = r7;
| }
0x0000b806 pop.w {r3, r4, r5, r6, r7, r8, sb, pc} |
| label_7:
0x0000b80a cmp r2, 0 |
| if (r2 < 0) {
0x0000b80c blt 0xb86e | goto label_14;
| }
0x0000b80e subs r3, r7, 0 | r3 = r7 - 0;
0x0000b810 it ne |
| if (r3 == r7) {
0x0000b812 movne r3, 1 | r3 = 1;
| }
0x0000b814 cmp r1, 0 |
0x0000b816 it ne |
| if (r1 == 0) {
0x0000b818 movne r3, 0 | r3 = 0;
| }
| if (r3 != 0) {
0x0000b81a cbnz r3, 0xb880 | goto label_15;
| }
0x0000b81c mov r1, r2 | r1 = r2;
0x0000b81e cmp r6, 0 |
| if (r6 != 0) {
0x0000b820 bne.w 0xb6d2 | goto label_0;
| }
0x0000b824 lsrs r3, r2, 2 | r3 = r2 >> 2;
0x0000b826 and ip, r2, 3 |
0x0000b82a mov r0, r6 | r0 = r6;
0x0000b82c add.w r2, r3, r3, lsl 1 | r2 = r3 + (r3 << 1);
0x0000b830 adds r7, r2, 1 | r7 = r2 + 1;
| label_3:
0x0000b832 cmp.w ip, 2 |
0x0000b836 it eq |
| if (ip == 2) {
0x0000b838 addeq r7, r2, 2 | r7 = r2 + 2;
| goto label_16;
| }
| if (ip == 2) {
| label_16:
0x0000b83a beq 0xb802 | goto label_1;
| }
0x0000b83c cmp.w ip, 3 |
| if (ip == 3) {
0x0000b840 beq 0xb88c | goto label_17;
| }
0x0000b842 movw r3, 0x4e36 | r3 = 0x4e36;
0x0000b846 cmp.w ip, 1 |
0x0000b84a it eq |
| if (ip != 1) {
0x0000b84c moveq r0, r3 | r0 = r3;
| }
0x0000b84e b 0xb802 | goto label_1;
| label_9:
0x0000b850 mov ip, r2 |
0x0000b852 mov r0, r1 | r0 = r1;
0x0000b854 sub.w ip, ip, r6 |
0x0000b858 cmp r7, 0 |
| if (r7 != 0) {
0x0000b85a bne.w 0xb732 | goto label_2;
| }
| label_11:
0x0000b85e lsr.w r3, ip, 2 | r3 = ip >> 2;
0x0000b862 and ip, ip, 3 |
0x0000b866 add.w r2, r3, r3, lsl 1 | r2 = r3 + (r3 << 1);
0x0000b86a adds r7, r2, 1 | r7 = r2 + 1;
0x0000b86c b 0xb832 | goto label_3;
| label_14:
0x0000b86e cmp r1, 0 |
0x0000b870 movw r0, 0x117f |
0x0000b874 movt r0, 1 | r0 = 0x1117f;
0x0000b878 it ne |
| if (r1 == 0) {
0x0000b87a movne r0, 0x16 | r0 = 0x16;
| }
0x0000b87c pop.w {r3, r4, r5, r6, r7, r8, sb, pc} |
| label_15:
0x0000b880 movw r0, 0x117f |
0x0000b884 movt r0, 1 | r0 = 0x1117f;
0x0000b888 pop.w {r3, r4, r5, r6, r7, r8, sb, pc} |
| label_17:
0x0000b88c adds r7, r3, 1 | r7 = r3 + 1;
0x0000b88e add.w r7, r7, r7, lsl 1 | r7 += (r7 << 1);
0x0000b892 b 0xb802 | goto label_1;
| label_10:
0x0000b894 movw r0, 0x117c |
0x0000b898 movt r0, 1 | r0 = 0x1117c;
0x0000b89c b 0xb728 | goto label_4;
| label_13:
0x0000b89e ldrb r2, [r6, 1] | r2 = *((r6 + 1));
0x0000b8a0 adds r3, 2 | r3 += 2;
0x0000b8a2 ldrb r5, [r6, 2] | r5 = *((r6 + 2));
0x0000b8a4 add r2, r1 | r2 += r1;
0x0000b8a6 ldrb.w r2, [r2, 0x90] | r2 = *((r2 + 0x90));
0x0000b8aa add r1, r5 | r1 += r5;
0x0000b8ac ldrb.w r1, [r1, 0x90] | r1 = *((r1 + 0x90));
0x0000b8b0 lsls r2, r2, 4 | r2 <<= 4;
0x0000b8b2 orr.w r2, r2, r1, lsr 2 | r2 |= (r1 >> 2);
0x0000b8b6 strb r2, [r3, -0x1] | *((r3 - 0x1)) = r2;
0x0000b8ba b 0xb7fc | goto label_5;
| label_8:
0x0000b8bc mov r3, r7 | r3 = r7;
0x0000b8be mov r0, r1 | r0 = r1;
0x0000b8c0 cmp r7, 0 |
| if (r7 != 0) {
0x0000b8c2 bne 0xb7fc | goto label_5;
| }
0x0000b8c4 mov r0, r7 | r0 = r7;
0x0000b8c6 movs r7, 1 | r7 = 1;
0x0000b8c8 b 0xb802 | goto label_1;
| label_12:
0x0000b8ca mov r3, r7 | r3 = r7;
0x0000b8cc b 0xb7c6 | 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/lib/libapr-1.so.0.7.2 @ 0xb8dc */
| #include <stdint.h>
|
; (fcn) sym.apr_decode_base64_binary () | void apr_decode_base64_binary (int16_t arg_20h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0000b8dc push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0000b8e0 mov sb, r3 | sb = r3;
0x0000b8e2 subs r3, r1, 0 | r3 = r1 - 0;
0x0000b8e4 mov r7, r0 | r7 = r0;
0x0000b8e6 it ne |
| if (r3 == r1) {
0x0000b8e8 movne r3, 1 | r3 = 1;
| }
0x0000b8ea adds r0, r2, 1 | r0 = r2 + 1;
0x0000b8ec it ne |
| if (r0 == r2) {
0x0000b8ee movne r3, 0 | r3 = 0;
| }
0x0000b8f0 ldr r4, [sp, 0x20] | r4 = *(arg_20h);
0x0000b8f2 mov r6, r1 | r6 = r1;
0x0000b8f4 cmp r3, 0 |
| if (r3 == 0) {
0x0000b8f6 beq.w 0xba38 | goto label_7;
| }
0x0000b8fa mov r0, r1 | r0 = r1;
0x0000b8fc blx 0xa6d8 | r0 = fcn_0000a6d8 ();
0x0000b900 mov r2, r0 | r2 = r0;
| label_0:
0x0000b902 cmp r2, 0 |
| if (r2 == 0) {
0x0000b904 beq.w 0xbae0 | goto label_8;
| }
0x0000b908 ldr r5, [pc, 0x1e4] |
0x0000b90a mov ip, r6 |
0x0000b90c add r5, pc | r5 = 0x17400;
0x0000b90e b 0xb916 |
| while (r1 < 0x3f) {
0x0000b910 subs r2, 1 | r2--;
| if (r2 == 1) {
0x0000b912 beq.w 0xba7e | goto label_9;
| }
0x0000b916 mov r8, ip | r8 = ip;
0x0000b918 ldrb lr, [ip], 1 |
0x0000b91c add lr, r5 | lr += r5;
0x0000b91e ldrb.w r1, [lr, 0x90] | r1 = *((lr + 0x90));
0x0000b922 cmp r1, 0x3f |
0x0000b924 bls 0xb910 |
| }
0x0000b926 ands r0, sb, 1 | r0 = sb & 1;
0x0000b92a it ne |
| if (r0 == sb) {
0x0000b92c movne r0, 0 | r0 = 0;
| }
| if (r0 == sb) {
0x0000b92e bne 0xb958 |
0x0000b930 cmp r2, 2 |
| if (r2 > 2) {
0x0000b932 bhi.w 0xbab8 | goto label_10;
| }
0x0000b936 subs r2, 1 | r2--;
0x0000b938 ldrb.w r3, [r8, r2] | r3 = *((r8 + r2));
0x0000b93c add r5, r3 | r5 += r3;
0x0000b93e ldrb.w r3, [r5, 0x90] | r3 = *((r5 + 0x90));
0x0000b942 cmp r3, 0x40 |
| if (r3 < 0x40) {
0x0000b944 bls.w 0xbab8 | goto label_10;
| }
| if (r2 == 0) {
0x0000b948 cbz r2, 0xb958 | goto label_4;
| }
0x0000b94a movw r3, 0x117c |
0x0000b94e movt r3, 1 | r3 = 0x1117c;
0x0000b952 cmp r1, 0x40 |
0x0000b954 it ls |
| if (r1 <= 0x40) {
0x0000b956 movls r0, r3 | r0 = r3;
| goto label_4;
| }
| }
| label_4:
0x0000b958 sub.w r8, r8, r6 | r8 -= r6;
0x0000b95c cmp r7, 0 |
| if (r7 == 0) {
0x0000b95e beq.w 0xba8c | goto label_11;
| }
| label_2:
0x0000b962 cmp.w r8, 3 |
| if (r8 < 3) {
0x0000b966 bls.w 0xbaec | goto label_12;
| }
0x0000b96a sub.w r8, r8, 4 | r8 -= 4;
0x0000b96e ldr.w lr, [pc, 0x184] |
0x0000b972 lsr.w r3, r8, 2 | r3 = r8 >> 2;
0x0000b976 adds r1, r7, 6 | r1 = r7 + 6;
0x0000b978 add.w ip, r7, 3 |
0x0000b97c add.w sb, r3, r3, lsl 1 | sb = r3 + (r3 << 1);
0x0000b980 add lr, pc | lr = 0x1747a;
0x0000b982 adds r2, r6, 4 | r2 = r6 + 4;
0x0000b984 add sb, r1 | sb += r1;
| do {
0x0000b986 ldrb r1, [r2, -0x3] | r1 = *((r2 - 0x3));
0x0000b98a add.w ip, ip, 3 |
0x0000b98e adds r2, 4 | r2 += 4;
0x0000b990 add r1, lr | r1 += lr;
0x0000b992 ldrb.w r5, [r1, 0x90] | r5 = *((r1 + 0x90));
0x0000b996 ldrb r1, [r2, -0x8] | r1 = *((r2 - 0x8));
0x0000b99a add r1, lr | r1 += lr;
0x0000b99c ldrb.w r1, [r1, 0x90] | r1 = *((r1 + 0x90));
0x0000b9a0 lsls r1, r1, 2 | r1 <<= 2;
0x0000b9a2 orr.w r1, r1, r5, lsr 4 | r1 |= (r5 >> 4);
0x0000b9a6 strb r1, [ip, -0x6] | *((ip - 0x6)) = r1;
0x0000b9aa ldrb r1, [r2, -0x6] | r1 = *((r2 - 0x6));
0x0000b9ae add r1, lr | r1 += lr;
0x0000b9b0 ldrb.w sl, [r1, 0x90] | sl = *((r1 + 0x90));
0x0000b9b4 ldrb r1, [r2, -0x7] | r1 = *((r2 - 0x7));
0x0000b9b8 add r1, lr | r1 += lr;
0x0000b9ba ldrb.w r5, [r1, 0x90] | r5 = *((r1 + 0x90));
0x0000b9be lsls r5, r5, 4 | r5 <<= 4;
0x0000b9c0 orr.w r5, r5, sl, lsr 2 | r5 |= (sl >> 2);
0x0000b9c4 strb r5, [ip, -0x5] | *((ip - 0x5)) = r5;
0x0000b9c8 ldrb r1, [r2, -0x6] | r1 = *((r2 - 0x6));
0x0000b9cc add r1, lr | r1 += lr;
0x0000b9ce ldrb.w r5, [r1, 0x90] | r5 = *((r1 + 0x90));
0x0000b9d2 ldrb r1, [r2, -0x5] | r1 = *((r2 - 0x5));
0x0000b9d6 add r1, lr | r1 += lr;
0x0000b9d8 ldrb.w r1, [r1, 0x90] | r1 = *((r1 + 0x90));
0x0000b9dc orr.w r1, r1, r5, lsl 6 | r1 |= (r5 << 6);
0x0000b9e0 strb r1, [ip, -0x4] | *((ip - 0x4)) = r1;
0x0000b9e4 cmp sb, ip |
0x0000b9e6 bne 0xb986 |
| } while (sb != ip);
0x0000b9e8 sub.w r8, r8, r3, lsl 2 | r8 -= (r3 << 2);
0x0000b9ec adds r3, 1 | r3++;
0x0000b9ee add.w r6, r6, r3, lsl 2 | r6 += (r3 << 2);
0x0000b9f2 add.w r3, r3, r3, lsl 1 | r3 += (r3 << 1);
0x0000b9f6 add r3, r7 | r3 += r7;
| label_6:
0x0000b9f8 cmp.w r8, 1 |
0x0000b9fc it eq |
| if (r8 == 1) {
0x0000b9fe movweq r0, 0x4e36 | __asm ("movweq r0, 0x4e36");
| }
| if (r8 != 1) {
0x0000ba02 beq 0xba2e |
| if (r8 < 1) {
0x0000ba04 bls 0xba2e | goto label_5;
| }
0x0000ba06 ldr r1, [pc, 0xf0] |
0x0000ba08 cmp.w r8, 3 |
0x0000ba0c ldrb r2, [r6] | r2 = *(r6);
0x0000ba0e ldrb r5, [r6, 1] | r5 = *((r6 + 1));
0x0000ba10 add r1, pc | r1 = 0x1750e;
0x0000ba12 add r2, r1 | r2 += r1;
0x0000ba14 ldrb.w r2, [r2, 0x90] | r2 = *((r2 + 0x90));
0x0000ba18 add r5, r1 | r5 += r1;
0x0000ba1a ldrb.w r5, [r5, 0x90] | r5 = *((r5 + 0x90));
0x0000ba1e lsl.w r2, r2, 2 | r2 <<= 2;
0x0000ba22 orr.w r2, r2, r5, lsr 4 | r2 |= (r5 >> 4);
0x0000ba26 strb r2, [r3] | *(r3) = r2;
0x0000ba28 it ne |
| if (r8 == 3) {
0x0000ba2a addne r3, 1 | r3++;
| }
| if (r8 == 3) {
0x0000ba2c beq 0xbac2 | goto label_13;
| }
| }
| label_5:
0x0000ba2e subs r2, r3, r7 | r2 = r3 - r7;
| if (r4 != 0) {
| label_1:
0x0000ba30 cbz r4, 0xba34 |
0x0000ba32 str r2, [r4] | *(r4) = r2;
| }
0x0000ba34 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_7:
0x0000ba38 cmp r2, 0 |
| if (r2 < 0) {
0x0000ba3a blt 0xba9a | goto label_14;
| }
0x0000ba3c subs r3, r7, 0 | r3 = r7 - 0;
0x0000ba3e it ne |
| if (r3 == r7) {
0x0000ba40 movne r3, 1 | r3 = 1;
| }
0x0000ba42 cmp r1, 0 |
0x0000ba44 it ne |
| if (r1 == 0) {
0x0000ba46 movne r3, 0 | r3 = 0;
| }
| if (r3 != 0) {
0x0000ba48 cbnz r3, 0xbaac | goto label_15;
| }
0x0000ba4a cmp r1, 0 |
| if (r1 != 0) {
0x0000ba4c bne.w 0xb902 | goto label_0;
| }
0x0000ba50 lsrs r3, r2, 2 | r3 = r2 >> 2;
0x0000ba52 and r8, r2, 3 | r8 = r2 & 3;
0x0000ba56 mov r0, r1 | r0 = r1;
0x0000ba58 add.w r2, r3, r3, lsl 1 | r2 = r3 + (r3 << 1);
| label_3:
0x0000ba5c cmp.w r8, 2 |
0x0000ba60 it eq |
| if (r8 == 2) {
0x0000ba62 addeq r2, 1 | r2++;
| goto label_16;
| }
| if (r8 == 2) {
| label_16:
0x0000ba64 beq 0xba30 | goto label_1;
| }
0x0000ba66 cmp.w r8, 3 |
0x0000ba6a it eq |
| if (r8 == 3) {
0x0000ba6c addeq r2, 2 | r2 += 2;
| goto label_17;
| }
| if (r8 == 3) {
| label_17:
0x0000ba6e beq 0xba30 | goto label_1;
| }
0x0000ba70 movw r3, 0x4e36 | r3 = 0x4e36;
0x0000ba74 cmp.w r8, 1 |
0x0000ba78 it eq |
| if (r8 != 1) {
0x0000ba7a moveq r0, r3 | r0 = r3;
| }
0x0000ba7c b 0xba30 | goto label_1;
| label_9:
0x0000ba7e mov r8, ip | r8 = ip;
0x0000ba80 mov r0, r2 | r0 = r2;
0x0000ba82 sub.w r8, r8, r6 | r8 -= r6;
0x0000ba86 cmp r7, 0 |
| if (r7 != 0) {
0x0000ba88 bne.w 0xb962 | goto label_2;
| }
| label_11:
0x0000ba8c lsr.w r2, r8, 2 | r2 = r8 >> 2;
0x0000ba90 and r8, r8, 3 | r8 &= 3;
0x0000ba94 add.w r2, r2, r2, lsl 1 | r2 += (r2 << 1);
0x0000ba98 b 0xba5c | goto label_3;
| label_14:
0x0000ba9a cmp r1, 0 |
0x0000ba9c movw r0, 0x117f |
0x0000baa0 movt r0, 1 | r0 = 0x1117f;
0x0000baa4 it ne |
| if (r1 == 0) {
0x0000baa6 movne r0, 0x16 | r0 = 0x16;
| }
0x0000baa8 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_15:
0x0000baac movw r0, 0x117f |
0x0000bab0 movt r0, 1 | r0 = 0x1117f;
0x0000bab4 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_10:
0x0000bab8 movw r0, 0x117c |
0x0000babc movt r0, 1 | r0 = 0x1117c;
0x0000bac0 b 0xb958 | goto label_4;
| label_13:
0x0000bac2 ldrb r2, [r6, 1] | r2 = *((r6 + 1));
0x0000bac4 adds r3, 2 | r3 += 2;
0x0000bac6 ldrb r5, [r6, 2] | r5 = *((r6 + 2));
0x0000bac8 add r2, r1 | r2 += r1;
0x0000baca ldrb.w r2, [r2, 0x90] | r2 = *((r2 + 0x90));
0x0000bace add r1, r5 | r1 += r5;
0x0000bad0 ldrb.w r1, [r1, 0x90] | r1 = *((r1 + 0x90));
0x0000bad4 lsls r2, r2, 4 | r2 <<= 4;
0x0000bad6 orr.w r2, r2, r1, lsr 2 | r2 |= (r1 >> 2);
0x0000bada strb r2, [r3, -0x1] | *((r3 - 0x1)) = r2;
0x0000bade b 0xba2e | goto label_5;
| label_8:
0x0000bae0 mov r0, r2 | r0 = r2;
0x0000bae2 cmp r7, 0 |
| if (r7 == 0) {
0x0000bae4 beq 0xba30 | goto label_1;
| }
0x0000bae6 mov r3, r7 | r3 = r7;
0x0000bae8 mov r0, r2 | r0 = r2;
0x0000baea b 0xba2e | goto label_5;
| label_12:
0x0000baec mov r3, r7 | r3 = r7;
0x0000baee b 0xb9f8 | 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/lib/libapr-1.so.0.7.2 @ 0xb8dc */
| #include <stdint.h>
|
; (fcn) sym.apr_decode_base64_binary () | void apr_decode_base64_binary (int16_t arg_20h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0000b8dc push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0000b8e0 mov sb, r3 | sb = r3;
0x0000b8e2 subs r3, r1, 0 | r3 = r1 - 0;
0x0000b8e4 mov r7, r0 | r7 = r0;
0x0000b8e6 it ne |
| if (r3 == r1) {
0x0000b8e8 movne r3, 1 | r3 = 1;
| }
0x0000b8ea adds r0, r2, 1 | r0 = r2 + 1;
0x0000b8ec it ne |
| if (r0 == r2) {
0x0000b8ee movne r3, 0 | r3 = 0;
| }
0x0000b8f0 ldr r4, [sp, 0x20] | r4 = *(arg_20h);
0x0000b8f2 mov r6, r1 | r6 = r1;
0x0000b8f4 cmp r3, 0 |
| if (r3 == 0) {
0x0000b8f6 beq.w 0xba38 | goto label_7;
| }
0x0000b8fa mov r0, r1 | r0 = r1;
0x0000b8fc blx 0xa6d8 | r0 = fcn_0000a6d8 ();
0x0000b900 mov r2, r0 | r2 = r0;
| label_0:
0x0000b902 cmp r2, 0 |
| if (r2 == 0) {
0x0000b904 beq.w 0xbae0 | goto label_8;
| }
0x0000b908 ldr r5, [pc, 0x1e4] |
0x0000b90a mov ip, r6 |
0x0000b90c add r5, pc | r5 = 0x17400;
0x0000b90e b 0xb916 |
| while (r1 < 0x3f) {
0x0000b910 subs r2, 1 | r2--;
| if (r2 == 1) {
0x0000b912 beq.w 0xba7e | goto label_9;
| }
0x0000b916 mov r8, ip | r8 = ip;
0x0000b918 ldrb lr, [ip], 1 |
0x0000b91c add lr, r5 | lr += r5;
0x0000b91e ldrb.w r1, [lr, 0x90] | r1 = *((lr + 0x90));
0x0000b922 cmp r1, 0x3f |
0x0000b924 bls 0xb910 |
| }
0x0000b926 ands r0, sb, 1 | r0 = sb & 1;
0x0000b92a it ne |
| if (r0 == sb) {
0x0000b92c movne r0, 0 | r0 = 0;
| }
| if (r0 == sb) {
0x0000b92e bne 0xb958 |
0x0000b930 cmp r2, 2 |
| if (r2 > 2) {
0x0000b932 bhi.w 0xbab8 | goto label_10;
| }
0x0000b936 subs r2, 1 | r2--;
0x0000b938 ldrb.w r3, [r8, r2] | r3 = *((r8 + r2));
0x0000b93c add r5, r3 | r5 += r3;
0x0000b93e ldrb.w r3, [r5, 0x90] | r3 = *((r5 + 0x90));
0x0000b942 cmp r3, 0x40 |
| if (r3 < 0x40) {
0x0000b944 bls.w 0xbab8 | goto label_10;
| }
| if (r2 == 0) {
0x0000b948 cbz r2, 0xb958 | goto label_4;
| }
0x0000b94a movw r3, 0x117c |
0x0000b94e movt r3, 1 | r3 = 0x1117c;
0x0000b952 cmp r1, 0x40 |
0x0000b954 it ls |
| if (r1 <= 0x40) {
0x0000b956 movls r0, r3 | r0 = r3;
| goto label_4;
| }
| }
| label_4:
0x0000b958 sub.w r8, r8, r6 | r8 -= r6;
0x0000b95c cmp r7, 0 |
| if (r7 == 0) {
0x0000b95e beq.w 0xba8c | goto label_11;
| }
| label_2:
0x0000b962 cmp.w r8, 3 |
| if (r8 < 3) {
0x0000b966 bls.w 0xbaec | goto label_12;
| }
0x0000b96a sub.w r8, r8, 4 | r8 -= 4;
0x0000b96e ldr.w lr, [pc, 0x184] |
0x0000b972 lsr.w r3, r8, 2 | r3 = r8 >> 2;
0x0000b976 adds r1, r7, 6 | r1 = r7 + 6;
0x0000b978 add.w ip, r7, 3 |
0x0000b97c add.w sb, r3, r3, lsl 1 | sb = r3 + (r3 << 1);
0x0000b980 add lr, pc | lr = 0x1747a;
0x0000b982 adds r2, r6, 4 | r2 = r6 + 4;
0x0000b984 add sb, r1 | sb += r1;
| do {
0x0000b986 ldrb r1, [r2, -0x3] | r1 = *((r2 - 0x3));
0x0000b98a add.w ip, ip, 3 |
0x0000b98e adds r2, 4 | r2 += 4;
0x0000b990 add r1, lr | r1 += lr;
0x0000b992 ldrb.w r5, [r1, 0x90] | r5 = *((r1 + 0x90));
0x0000b996 ldrb r1, [r2, -0x8] | r1 = *((r2 - 0x8));
0x0000b99a add r1, lr | r1 += lr;
0x0000b99c ldrb.w r1, [r1, 0x90] | r1 = *((r1 + 0x90));
0x0000b9a0 lsls r1, r1, 2 | r1 <<= 2;
0x0000b9a2 orr.w r1, r1, r5, lsr 4 | r1 |= (r5 >> 4);
0x0000b9a6 strb r1, [ip, -0x6] | *((ip - 0x6)) = r1;
0x0000b9aa ldrb r1, [r2, -0x6] | r1 = *((r2 - 0x6));
0x0000b9ae add r1, lr | r1 += lr;
0x0000b9b0 ldrb.w sl, [r1, 0x90] | sl = *((r1 + 0x90));
0x0000b9b4 ldrb r1, [r2, -0x7] | r1 = *((r2 - 0x7));
0x0000b9b8 add r1, lr | r1 += lr;
0x0000b9ba ldrb.w r5, [r1, 0x90] | r5 = *((r1 + 0x90));
0x0000b9be lsls r5, r5, 4 | r5 <<= 4;
0x0000b9c0 orr.w r5, r5, sl, lsr 2 | r5 |= (sl >> 2);
0x0000b9c4 strb r5, [ip, -0x5] | *((ip - 0x5)) = r5;
0x0000b9c8 ldrb r1, [r2, -0x6] | r1 = *((r2 - 0x6));
0x0000b9cc add r1, lr | r1 += lr;
0x0000b9ce ldrb.w r5, [r1, 0x90] | r5 = *((r1 + 0x90));
0x0000b9d2 ldrb r1, [r2, -0x5] | r1 = *((r2 - 0x5));
0x0000b9d6 add r1, lr | r1 += lr;
0x0000b9d8 ldrb.w r1, [r1, 0x90] | r1 = *((r1 + 0x90));
0x0000b9dc orr.w r1, r1, r5, lsl 6 | r1 |= (r5 << 6);
0x0000b9e0 strb r1, [ip, -0x4] | *((ip - 0x4)) = r1;
0x0000b9e4 cmp sb, ip |
0x0000b9e6 bne 0xb986 |
| } while (sb != ip);
0x0000b9e8 sub.w r8, r8, r3, lsl 2 | r8 -= (r3 << 2);
0x0000b9ec adds r3, 1 | r3++;
0x0000b9ee add.w r6, r6, r3, lsl 2 | r6 += (r3 << 2);
0x0000b9f2 add.w r3, r3, r3, lsl 1 | r3 += (r3 << 1);
0x0000b9f6 add r3, r7 | r3 += r7;
| label_6:
0x0000b9f8 cmp.w r8, 1 |
0x0000b9fc it eq |
| if (r8 == 1) {
0x0000b9fe movweq r0, 0x4e36 | __asm ("movweq r0, 0x4e36");
| }
| if (r8 != 1) {
0x0000ba02 beq 0xba2e |
| if (r8 < 1) {
0x0000ba04 bls 0xba2e | goto label_5;
| }
0x0000ba06 ldr r1, [pc, 0xf0] |
0x0000ba08 cmp.w r8, 3 |
0x0000ba0c ldrb r2, [r6] | r2 = *(r6);
0x0000ba0e ldrb r5, [r6, 1] | r5 = *((r6 + 1));
0x0000ba10 add r1, pc | r1 = 0x1750e;
0x0000ba12 add r2, r1 | r2 += r1;
0x0000ba14 ldrb.w r2, [r2, 0x90] | r2 = *((r2 + 0x90));
0x0000ba18 add r5, r1 | r5 += r1;
0x0000ba1a ldrb.w r5, [r5, 0x90] | r5 = *((r5 + 0x90));
0x0000ba1e lsl.w r2, r2, 2 | r2 <<= 2;
0x0000ba22 orr.w r2, r2, r5, lsr 4 | r2 |= (r5 >> 4);
0x0000ba26 strb r2, [r3] | *(r3) = r2;
0x0000ba28 it ne |
| if (r8 == 3) {
0x0000ba2a addne r3, 1 | r3++;
| }
| if (r8 == 3) {
0x0000ba2c beq 0xbac2 | goto label_13;
| }
| }
| label_5:
0x0000ba2e subs r2, r3, r7 | r2 = r3 - r7;
| if (r4 != 0) {
| label_1:
0x0000ba30 cbz r4, 0xba34 |
0x0000ba32 str r2, [r4] | *(r4) = r2;
| }
0x0000ba34 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_7:
0x0000ba38 cmp r2, 0 |
| if (r2 < 0) {
0x0000ba3a blt 0xba9a | goto label_14;
| }
0x0000ba3c subs r3, r7, 0 | r3 = r7 - 0;
0x0000ba3e it ne |
| if (r3 == r7) {
0x0000ba40 movne r3, 1 | r3 = 1;
| }
0x0000ba42 cmp r1, 0 |
0x0000ba44 it ne |
| if (r1 == 0) {
0x0000ba46 movne r3, 0 | r3 = 0;
| }
| if (r3 != 0) {
0x0000ba48 cbnz r3, 0xbaac | goto label_15;
| }
0x0000ba4a cmp r1, 0 |
| if (r1 != 0) {
0x0000ba4c bne.w 0xb902 | goto label_0;
| }
0x0000ba50 lsrs r3, r2, 2 | r3 = r2 >> 2;
0x0000ba52 and r8, r2, 3 | r8 = r2 & 3;
0x0000ba56 mov r0, r1 | r0 = r1;
0x0000ba58 add.w r2, r3, r3, lsl 1 | r2 = r3 + (r3 << 1);
| label_3:
0x0000ba5c cmp.w r8, 2 |
0x0000ba60 it eq |
| if (r8 == 2) {
0x0000ba62 addeq r2, 1 | r2++;
| goto label_16;
| }
| if (r8 == 2) {
| label_16:
0x0000ba64 beq 0xba30 | goto label_1;
| }
0x0000ba66 cmp.w r8, 3 |
0x0000ba6a it eq |
| if (r8 == 3) {
0x0000ba6c addeq r2, 2 | r2 += 2;
| goto label_17;
| }
| if (r8 == 3) {
| label_17:
0x0000ba6e beq 0xba30 | goto label_1;
| }
0x0000ba70 movw r3, 0x4e36 | r3 = 0x4e36;
0x0000ba74 cmp.w r8, 1 |
0x0000ba78 it eq |
| if (r8 != 1) {
0x0000ba7a moveq r0, r3 | r0 = r3;
| }
0x0000ba7c b 0xba30 | goto label_1;
| label_9:
0x0000ba7e mov r8, ip | r8 = ip;
0x0000ba80 mov r0, r2 | r0 = r2;
0x0000ba82 sub.w r8, r8, r6 | r8 -= r6;
0x0000ba86 cmp r7, 0 |
| if (r7 != 0) {
0x0000ba88 bne.w 0xb962 | goto label_2;
| }
| label_11:
0x0000ba8c lsr.w r2, r8, 2 | r2 = r8 >> 2;
0x0000ba90 and r8, r8, 3 | r8 &= 3;
0x0000ba94 add.w r2, r2, r2, lsl 1 | r2 += (r2 << 1);
0x0000ba98 b 0xba5c | goto label_3;
| label_14:
0x0000ba9a cmp r1, 0 |
0x0000ba9c movw r0, 0x117f |
0x0000baa0 movt r0, 1 | r0 = 0x1117f;
0x0000baa4 it ne |
| if (r1 == 0) {
0x0000baa6 movne r0, 0x16 | r0 = 0x16;
| }
0x0000baa8 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_15:
0x0000baac movw r0, 0x117f |
0x0000bab0 movt r0, 1 | r0 = 0x1117f;
0x0000bab4 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_10:
0x0000bab8 movw r0, 0x117c |
0x0000babc movt r0, 1 | r0 = 0x1117c;
0x0000bac0 b 0xb958 | goto label_4;
| label_13:
0x0000bac2 ldrb r2, [r6, 1] | r2 = *((r6 + 1));
0x0000bac4 adds r3, 2 | r3 += 2;
0x0000bac6 ldrb r5, [r6, 2] | r5 = *((r6 + 2));
0x0000bac8 add r2, r1 | r2 += r1;
0x0000baca ldrb.w r2, [r2, 0x90] | r2 = *((r2 + 0x90));
0x0000bace add r1, r5 | r1 += r5;
0x0000bad0 ldrb.w r1, [r1, 0x90] | r1 = *((r1 + 0x90));
0x0000bad4 lsls r2, r2, 4 | r2 <<= 4;
0x0000bad6 orr.w r2, r2, r1, lsr 2 | r2 |= (r1 >> 2);
0x0000bada strb r2, [r3, -0x1] | *((r3 - 0x1)) = r2;
0x0000bade b 0xba2e | goto label_5;
| label_8:
0x0000bae0 mov r0, r2 | r0 = r2;
0x0000bae2 cmp r7, 0 |
| if (r7 == 0) {
0x0000bae4 beq 0xba30 | goto label_1;
| }
0x0000bae6 mov r3, r7 | r3 = r7;
0x0000bae8 mov r0, r2 | r0 = r2;
0x0000baea b 0xba2e | goto label_5;
| label_12:
0x0000baec mov r3, r7 | r3 = r7;
0x0000baee b 0xb9f8 | 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/lib/libapr-1.so.0.7.2 @ 0xc948 */
| #include <stdint.h>
|
; (fcn) sym.apr_encode_base16 () | void apr_encode_base16 (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_20h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0000c948 push.w {r3, r4, r5, r6, r7, r8, sb, lr} |
0x0000c94c mov sb, r3 | sb = r3;
0x0000c94e subs r3, r1, 0 | r3 = r1 - 0;
0x0000c950 mov r7, r0 | r7 = r0;
0x0000c952 it ne |
| if (r3 == r1) {
0x0000c954 movne r3, 1 | r3 = 1;
| }
0x0000c956 adds r0, r2, 1 | r0 = r2 + 1;
0x0000c958 it ne |
| if (r0 == r2) {
0x0000c95a movne r3, 0 | r3 = 0;
| }
0x0000c95c mov r6, r1 | r6 = r1;
0x0000c95e cmp r3, 0 |
| if (r3 == 0) {
0x0000c960 beq 0xc9d6 | goto label_5;
| }
0x0000c962 mov r0, r1 | r0 = r1;
0x0000c964 blx 0xa6d8 | r0 = fcn_0000a6d8 ();
0x0000c968 mov r2, r0 | r2 = r0;
| label_1:
0x0000c96a cmp r7, 0 |
| if (r7 == 0) {
0x0000c96c beq 0xca14 | goto label_6;
| }
0x0000c96e tst.w sb, 0x20 |
| if ((sb & 0x20) == 0) {
0x0000c972 beq 0xc9f6 | goto label_7;
| }
0x0000c974 ldr.w r8, [pc, 0xdc] |
0x0000c978 add r8, pc |
0x0000c97a add.w r8, r8, 0x3e0 | r8 = 0x197b0;
| label_2:
0x0000c97e cmp r2, 0 |
| if (r2 == 0) {
0x0000c980 beq 0xca4e | goto label_8;
| }
0x0000c982 add.w ip, r6, -1 |
0x0000c986 ubfx r3, sb, 4, 1 | r3 = (sb >> 4) & ((1 << 1) - 1);
0x0000c98a add.w r5, ip, r2 | r5 = ip + r2;
0x0000c98e rsb.w r6, r6, 1 | r6 = 1 - r6;
0x0000c992 mov r2, r7 | r2 = r7;
0x0000c994 movs r0, 0x3a | r0 = 0x3a;
0x0000c996 b 0xc9be |
| while (r4 == 0) {
| label_0:
0x0000c998 ldrb lr, [ip, 1]! |
0x0000c99c mov r2, r1 | r2 = r1;
0x0000c99e cmp r5, ip |
0x0000c9a0 lsr.w lr, lr, 4 | lr >>= 4;
0x0000c9a4 ldrb.w lr, [r8, lr] |
0x0000c9a8 strb lr, [r2], 2 |
0x0000c9ac ldrb.w lr, [ip] |
0x0000c9b0 and lr, lr, 0xf | lr &= 0xf;
0x0000c9b4 ldrb.w lr, [r8, lr] |
0x0000c9b8 strb.w lr, [r1, 1] |
| if (r5 == ip) {
0x0000c9bc beq 0xca02 | goto label_9;
| }
0x0000c9be cmn.w r6, ip |
0x0000c9c2 and r4, r3, 1 | r4 = r3 & 1;
0x0000c9c6 it eq |
| if (r6 != ip) {
0x0000c9c8 moveq r4, 0 | r4 = 0;
| }
0x0000c9ca mov r1, r2 | r1 = r2;
0x0000c9cc cmp r4, 0 |
0x0000c9ce beq 0xc998 |
| }
0x0000c9d0 strb r0, [r1], 1 | *(r1) = r0;
| r1++;
0x0000c9d4 b 0xc998 | goto label_0;
| label_5:
0x0000c9d6 cmp r2, 0 |
| if (r2 < 0) {
0x0000c9d8 blt 0xca3c | goto label_10;
| }
0x0000c9da subs r3, r7, 0 | r3 = r7 - 0;
0x0000c9dc it ne |
| if (r3 == r7) {
0x0000c9de movne r3, 1 | r3 = 1;
| }
0x0000c9e0 cmp r1, 0 |
0x0000c9e2 it ne |
| if (r1 == 0) {
0x0000c9e4 movne r3, 0 | r3 = 0;
| }
0x0000c9e6 cmp r3, 0 |
| if (r3 == 0) {
0x0000c9e8 beq 0xc96a | goto label_1;
| }
0x0000c9ea movw r0, 0x117f |
0x0000c9ee movt r0, 1 | r0 = 0x1117f;
0x0000c9f2 pop.w {r3, r4, r5, r6, r7, r8, sb, pc} |
| label_7:
0x0000c9f6 ldr.w r8, [pc, 0x60] | r8 = *(0x0000ca58);
0x0000c9fa add r8, pc | r8 += pc;
0x0000c9fc add.w r8, r8, 0x3f8 | r8 += 0x3f8;
0x0000ca00 b 0xc97e | goto label_2;
| label_9:
0x0000ca02 subs r1, r2, r7 | r1 = r2 - r7;
| label_4:
0x0000ca04 movs r3, 0 | r3 = 0;
0x0000ca06 mov r0, r3 | r0 = r3;
0x0000ca08 strb r3, [r2] | *(r2) = r3;
| do {
| label_3:
0x0000ca0a ldr r3, [sp, 0x20] | r3 = var_20h;
| if (r3 != 0) {
0x0000ca0c cbz r3, 0xca10 |
0x0000ca0e str r1, [r3] | *(r3) = r1;
| }
0x0000ca10 pop.w {r3, r4, r5, r6, r7, r8, sb, pc} |
| label_6:
0x0000ca14 lsls r1, r2, 1 | r1 = r2 << 1;
0x0000ca16 adds r1, 1 | r1++;
0x0000ca18 cmp r2, r1 |
0x0000ca1a ite hs |
| if (r2 < r1) {
0x0000ca1c movhs r0, 0x1c | r0 = 0x1c;
| }
| if (r2 >= r1) {
0x0000ca1e movlo r0, 0 | r0 = 0;
| }
0x0000ca20 cmp r2, 1 |
0x0000ca22 ite ls |
| if (r2 > 1) {
0x0000ca24 movls r3, 0 | r3 = 0;
| }
| if (r2 <= 1) {
0x0000ca26 movhi r3, 1 | r3 = 1;
| }
0x0000ca28 ands.w r3, r3, sb, lsr 4 | r3 &= (sb >> 4);
0x0000ca2c beq 0xca0a |
| } while (r3 == r3);
0x0000ca2e subs r2, 1 | r2--;
0x0000ca30 adds r3, r2, r1 | r3 = r2 + r1;
0x0000ca32 cmp r1, r3 |
0x0000ca34 mov r1, r3 | r1 = r3;
0x0000ca36 it hs |
| if (r1 < r3) {
0x0000ca38 movhs r0, 0x1c | r0 = 0x1c;
| }
0x0000ca3a b 0xca0a | goto label_3;
| label_10:
0x0000ca3c cmp r1, 0 |
0x0000ca3e movw r0, 0x117f |
0x0000ca42 movt r0, 1 | r0 = 0x1117f;
0x0000ca46 it ne |
| if (r1 == 0) {
0x0000ca48 movne r0, 0x16 | r0 = 0x16;
| }
0x0000ca4a pop.w {r3, r4, r5, r6, r7, r8, sb, pc} |
| label_8:
0x0000ca4e mov r1, r2 | r1 = r2;
0x0000ca50 mov r2, r7 | r2 = r7;
0x0000ca52 b 0xca04 | 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/lib/libapr-1.so.0.7.2 @ 0xca5c */
| #include <stdint.h>
|
; (fcn) sym.apr_encode_base16_binary () | uint32_t apr_encode_base16_binary (int16_t arg_14h, uint32_t arg1, uint32_t arg2, uint32_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0000ca5c cmp r2, 0 |
| if (r2 < 0) {
0x0000ca5e blt 0xcae4 | goto label_4;
| }
0x0000ca60 push {r4, r5, r6, r7, lr} |
0x0000ca62 subs r4, r0, 0 | r4 -= arg_14h;
0x0000ca64 it ne |
| if (r4 == arg_14h) {
0x0000ca66 movne r4, 1 | r4 = 1;
| }
0x0000ca68 cmp r1, 0 |
0x0000ca6a it ne |
| if (r1 == 0) {
0x0000ca6c movne r4, 0 | r4 = 0;
| }
| if (r4 != 0) {
0x0000ca6e cbnz r4, 0xcada | goto label_5;
| }
0x0000ca70 cmp r0, 0 |
| if (arg_14h == ) {
0x0000ca72 beq 0xcb10 | goto label_6;
| }
0x0000ca74 lsls r4, r3, 0x1a | r4 = r3 << 0x1a;
| if (r4 >= r3) {
0x0000ca76 bpl 0xcaf4 | goto label_7;
| }
0x0000ca78 ldr r6, [pc, 0xc4] |
0x0000ca7a add r6, pc |
0x0000ca7c add.w r6, r6, 0x3e0 | r6 = 0x1999e;
| label_1:
0x0000ca80 cmp r2, 0 |
| if (r2 == 0) {
0x0000ca82 beq 0xcb38 | goto label_8;
| }
0x0000ca84 add.w ip, r1, -1 |
0x0000ca88 rsb.w r4, r1, 1 | r4 = 1 - r1;
0x0000ca8c ubfx r5, r3, 4, 1 | r5 = (r3 >> 4) & ((1 << 1) - 1);
0x0000ca90 add r2, ip | r2 += ip;
0x0000ca92 mov r1, r0 | r1 = r0;
0x0000ca94 movs r7, 0x3a | r7 = 0x3a;
0x0000ca96 b 0xcabe |
| while (lr == 0) {
| label_0:
0x0000ca98 ldrb lr, [ip, 1]! |
0x0000ca9c mov r1, r3 | r1 = r3;
0x0000ca9e cmp ip, r2 |
0x0000caa0 lsr.w lr, lr, 4 | lr >>= 4;
0x0000caa4 ldrb.w lr, [r6, lr] |
0x0000caa8 strb lr, [r1], 2 |
0x0000caac ldrb.w lr, [ip] |
0x0000cab0 and lr, lr, 0xf | lr &= 0xf;
0x0000cab4 ldrb.w lr, [r6, lr] |
0x0000cab8 strb.w lr, [r3, 1] |
| if (ip == r2) {
0x0000cabc beq 0xcafe | goto label_9;
| }
0x0000cabe cmn.w r4, ip |
0x0000cac2 and lr, r5, 1 | lr = r5 & 1;
0x0000cac6 it eq |
| if (r4 != ip) {
0x0000cac8 moveq lr, 0 | lr = 0;
| }
0x0000cacc mov r3, r1 | r3 = r1;
0x0000cace cmp.w lr, 0 |
0x0000cad2 beq 0xca98 |
| }
0x0000cad4 strb r7, [r3], 1 | *(r3) = r7;
| r3++;
0x0000cad8 b 0xca98 | goto label_0;
| label_5:
0x0000cada movw r0, 0x117f |
0x0000cade movt r0, 1 | r0 = 0x1117f;
| do {
0x0000cae2 pop {r4, r5, r6, r7, pc} |
| label_4:
0x0000cae4 cmp r1, 0 |
0x0000cae6 movw r0, 0x117f |
0x0000caea movt r0, 1 | r0 = 0x1117f;
0x0000caee it ne |
| if (r1 == 0) {
0x0000caf0 movne r0, 0x16 | r0 = 0x16;
| }
0x0000caf2 bx lr | return r0;
| label_7:
0x0000caf4 ldr r6, [pc, 0x4c] |
0x0000caf6 add r6, pc |
0x0000caf8 add.w r6, r6, 0x3f8 | r6 = 0x19a36;
0x0000cafc b 0xca80 | goto label_1;
| label_9:
0x0000cafe subs r4, r1, r0 | r4 = r1 - r0;
| label_3:
0x0000cb00 movs r3, 0 | r3 = 0;
0x0000cb02 mov r0, r3 | r0 = r3;
0x0000cb04 strb r3, [r1] | *(r1) = r3;
| label_2:
0x0000cb06 ldr r3, [sp, 0x14] | r3 = *(arg_14h);
0x0000cb08 cmp r3, 0 |
0x0000cb0a beq 0xcae2 |
| } while (r3 == 0);
0x0000cb0c str r4, [r3] | *(r3) = r4;
0x0000cb0e pop {r4, r5, r6, r7, pc} |
| label_6:
0x0000cb10 lsls r4, r2, 1 | r4 = r2 << 1;
0x0000cb12 cmp r2, 1 |
0x0000cb14 ite ls |
| if (r2 > 1) {
0x0000cb16 movls r1, 0 | r1 = 0;
| }
| if (r2 <= 1) {
0x0000cb18 movhi r1, 1 | r1 = 1;
| }
0x0000cb1a adds r4, 1 | r4++;
0x0000cb1c cmp r2, r4 |
0x0000cb1e ite hs |
| if (r2 < r4) {
0x0000cb20 movhs r0, 0x1c | r0 = 0x1c;
| }
| if (r2 >= r4) {
0x0000cb22 movlo r0, 0 | r0 = 0;
| }
0x0000cb24 ands.w r1, r1, r3, lsr 4 | r1 &= (r3 >> 4);
| if (r1 == r1) {
0x0000cb28 beq 0xcb06 | goto label_2;
| }
0x0000cb2a subs r2, 1 | r2--;
0x0000cb2c adds r3, r2, r4 | r3 = r2 + r4;
0x0000cb2e cmp r4, r3 |
0x0000cb30 mov r4, r3 | r4 = r3;
0x0000cb32 it hs |
| if (r4 < r3) {
0x0000cb34 movhs r0, 0x1c | r0 = 0x1c;
| }
0x0000cb36 b 0xcb06 | goto label_2;
| label_8:
0x0000cb38 mov r4, r2 | r4 = r2;
0x0000cb3a mov r1, r0 | r1 = r0;
0x0000cb3c b 0xcb00 | 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/lib/libapr-1.so.0.7.2 @ 0xca5c */
| #include <stdint.h>
|
; (fcn) sym.apr_encode_base16_binary () | uint32_t apr_encode_base16_binary (int16_t arg_14h, uint32_t arg1, uint32_t arg2, uint32_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0000ca5c cmp r2, 0 |
| if (r2 < 0) {
0x0000ca5e blt 0xcae4 | goto label_4;
| }
0x0000ca60 push {r4, r5, r6, r7, lr} |
0x0000ca62 subs r4, r0, 0 | r4 -= arg_14h;
0x0000ca64 it ne |
| if (r4 == arg_14h) {
0x0000ca66 movne r4, 1 | r4 = 1;
| }
0x0000ca68 cmp r1, 0 |
0x0000ca6a it ne |
| if (r1 == 0) {
0x0000ca6c movne r4, 0 | r4 = 0;
| }
| if (r4 != 0) {
0x0000ca6e cbnz r4, 0xcada | goto label_5;
| }
0x0000ca70 cmp r0, 0 |
| if (arg_14h == ) {
0x0000ca72 beq 0xcb10 | goto label_6;
| }
0x0000ca74 lsls r4, r3, 0x1a | r4 = r3 << 0x1a;
| if (r4 >= r3) {
0x0000ca76 bpl 0xcaf4 | goto label_7;
| }
0x0000ca78 ldr r6, [pc, 0xc4] |
0x0000ca7a add r6, pc |
0x0000ca7c add.w r6, r6, 0x3e0 | r6 = 0x1999e;
| label_1:
0x0000ca80 cmp r2, 0 |
| if (r2 == 0) {
0x0000ca82 beq 0xcb38 | goto label_8;
| }
0x0000ca84 add.w ip, r1, -1 |
0x0000ca88 rsb.w r4, r1, 1 | r4 = 1 - r1;
0x0000ca8c ubfx r5, r3, 4, 1 | r5 = (r3 >> 4) & ((1 << 1) - 1);
0x0000ca90 add r2, ip | r2 += ip;
0x0000ca92 mov r1, r0 | r1 = r0;
0x0000ca94 movs r7, 0x3a | r7 = 0x3a;
0x0000ca96 b 0xcabe |
| while (lr == 0) {
| label_0:
0x0000ca98 ldrb lr, [ip, 1]! |
0x0000ca9c mov r1, r3 | r1 = r3;
0x0000ca9e cmp ip, r2 |
0x0000caa0 lsr.w lr, lr, 4 | lr >>= 4;
0x0000caa4 ldrb.w lr, [r6, lr] |
0x0000caa8 strb lr, [r1], 2 |
0x0000caac ldrb.w lr, [ip] |
0x0000cab0 and lr, lr, 0xf | lr &= 0xf;
0x0000cab4 ldrb.w lr, [r6, lr] |
0x0000cab8 strb.w lr, [r3, 1] |
| if (ip == r2) {
0x0000cabc beq 0xcafe | goto label_9;
| }
0x0000cabe cmn.w r4, ip |
0x0000cac2 and lr, r5, 1 | lr = r5 & 1;
0x0000cac6 it eq |
| if (r4 != ip) {
0x0000cac8 moveq lr, 0 | lr = 0;
| }
0x0000cacc mov r3, r1 | r3 = r1;
0x0000cace cmp.w lr, 0 |
0x0000cad2 beq 0xca98 |
| }
0x0000cad4 strb r7, [r3], 1 | *(r3) = r7;
| r3++;
0x0000cad8 b 0xca98 | goto label_0;
| label_5:
0x0000cada movw r0, 0x117f |
0x0000cade movt r0, 1 | r0 = 0x1117f;
| do {
0x0000cae2 pop {r4, r5, r6, r7, pc} |
| label_4:
0x0000cae4 cmp r1, 0 |
0x0000cae6 movw r0, 0x117f |
0x0000caea movt r0, 1 | r0 = 0x1117f;
0x0000caee it ne |
| if (r1 == 0) {
0x0000caf0 movne r0, 0x16 | r0 = 0x16;
| }
0x0000caf2 bx lr | return r0;
| label_7:
0x0000caf4 ldr r6, [pc, 0x4c] |
0x0000caf6 add r6, pc |
0x0000caf8 add.w r6, r6, 0x3f8 | r6 = 0x19a36;
0x0000cafc b 0xca80 | goto label_1;
| label_9:
0x0000cafe subs r4, r1, r0 | r4 = r1 - r0;
| label_3:
0x0000cb00 movs r3, 0 | r3 = 0;
0x0000cb02 mov r0, r3 | r0 = r3;
0x0000cb04 strb r3, [r1] | *(r1) = r3;
| label_2:
0x0000cb06 ldr r3, [sp, 0x14] | r3 = *(arg_14h);
0x0000cb08 cmp r3, 0 |
0x0000cb0a beq 0xcae2 |
| } while (r3 == 0);
0x0000cb0c str r4, [r3] | *(r3) = r4;
0x0000cb0e pop {r4, r5, r6, r7, pc} |
| label_6:
0x0000cb10 lsls r4, r2, 1 | r4 = r2 << 1;
0x0000cb12 cmp r2, 1 |
0x0000cb14 ite ls |
| if (r2 > 1) {
0x0000cb16 movls r1, 0 | r1 = 0;
| }
| if (r2 <= 1) {
0x0000cb18 movhi r1, 1 | r1 = 1;
| }
0x0000cb1a adds r4, 1 | r4++;
0x0000cb1c cmp r2, r4 |
0x0000cb1e ite hs |
| if (r2 < r4) {
0x0000cb20 movhs r0, 0x1c | r0 = 0x1c;
| }
| if (r2 >= r4) {
0x0000cb22 movlo r0, 0 | r0 = 0;
| }
0x0000cb24 ands.w r1, r1, r3, lsr 4 | r1 &= (r3 >> 4);
| if (r1 == r1) {
0x0000cb28 beq 0xcb06 | goto label_2;
| }
0x0000cb2a subs r2, 1 | r2--;
0x0000cb2c adds r3, r2, r4 | r3 = r2 + r4;
0x0000cb2e cmp r4, r3 |
0x0000cb30 mov r4, r3 | r4 = r3;
0x0000cb32 it hs |
| if (r4 < r3) {
0x0000cb34 movhs r0, 0x1c | r0 = 0x1c;
| }
0x0000cb36 b 0xcb06 | goto label_2;
| label_8:
0x0000cb38 mov r4, r2 | r4 = r2;
0x0000cb3a mov r1, r0 | r1 = r0;
0x0000cb3c b 0xcb00 | 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/lib/libapr-1.so.0.7.2 @ 0xd47c */
| #include <stdint.h>
|
; (fcn) sym.apr_escape_path_segment () | uint32_t apr_escape_path_segment (uint32_t arg1, uint32_t arg2, uint32_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0000d47c cmp r1, 0 |
| if (r1 == 0) {
0x0000d47e beq 0xd540 | goto label_1;
| }
0x0000d480 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0000d484 ldrb r4, [r1] | r4 = *(r1);
0x0000d486 cmp r2, 0 |
0x0000d488 it ne |
| if (r2 != 0) {
0x0000d48a cmpne r4, 0 | __asm ("cmpne r4, 0");
| }
0x0000d48c mov ip, r4 |
0x0000d48e ite ne |
| if (r2 == 0) {
0x0000d490 movne r5, 1 | r5 = 1;
| }
| if (r2 != 0) {
0x0000d492 moveq r5, 0 | r5 = 0;
| }
0x0000d494 cmp r0, 0 |
| if (r0 == 0) {
0x0000d496 beq 0xd516 | goto label_2;
| }
0x0000d498 cmp r5, 0 |
| if (r5 == 0) {
0x0000d49a beq 0xd550 | goto label_3;
| }
0x0000d49c ldr r7, [pc, 0xc4] |
0x0000d49e mov r6, r1 | r6 = r1;
0x0000d4a0 mov.w sb, 0 | sb = 0;
0x0000d4a4 movs r5, 1 | r5 = 1;
0x0000d4a6 add r7, pc | r7 = 0x1aa0e;
| do {
0x0000d4a8 ldrb.w r8, [r7, r4] | r8 = *((r7 + r4));
0x0000d4ac and lr, ip, 0xf | lr = ip & 0xf;
0x0000d4b0 add.w r4, r7, r4, lsr 4 | r4 = r7 + (r4 >> 4);
0x0000d4b4 add lr, r7 | lr += r7;
0x0000d4b6 add.w sl, r0, 1 | sl = r0 + 1;
0x0000d4ba tst.w r8, 2 |
| if ((r8 & 2) != 0) {
0x0000d4be beq 0xd4dc |
0x0000d4c0 ldrb.w r8, [r4, 0x100] | r8 = *((r4 + 0x100));
0x0000d4c4 add.w sl, r0, 3 | sl = r0 + 3;
0x0000d4c8 ldrb.w r4, [lr, 0x100] | r4 = *((lr + 0x100));
0x0000d4cc adds r5, 2 | r5 += 2;
0x0000d4ce mov.w ip, 0x25 |
0x0000d4d2 mov.w sb, 1 | sb = 1;
0x0000d4d6 strb.w r8, [r0, 1] | *((r0 + 1)) = r8;
0x0000d4da strb r4, [r0, 2] | *((r0 + 2)) = r4;
| }
0x0000d4dc strb.w ip, [r0] | *(r0) = ip;
0x0000d4e0 adds r5, 1 | r5++;
0x0000d4e2 ldrb ip, [r6, 1]! | ip = *((r6 += 1));
0x0000d4e6 mov r0, sl | r0 = sl;
0x0000d4e8 sub.w lr, r6, r2 | lr = r6 - r2;
0x0000d4ec mov r4, ip | r4 = ip;
0x0000d4ee cmp.w ip, 0 |
0x0000d4f2 it ne |
| if (ip != 0) {
0x0000d4f4 cmpne r1, lr | __asm ("cmpne r1, lr");
| }
0x0000d4f6 ite ne |
| if (ip == 0) {
0x0000d4f8 movne lr, 1 | lr = 1;
| }
| if (ip == 0) {
0x0000d4fc mov.w lr, 0 | lr = 0;
| }
0x0000d500 bne 0xd4a8 |
| } while (ip != 0);
0x0000d502 strb.w lr, [sl] |
| if (r3 != 0) {
| label_0:
0x0000d506 cbz r3, 0xd50a |
0x0000d508 str r5, [r3] | *(r3) = r5;
| }
0x0000d50a cmp.w sb, 0 |
| if (sb == 0) {
0x0000d50e beq 0xd558 | goto label_4;
| }
0x0000d510 movs r0, 0 | r0 = 0;
0x0000d512 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| if (r5 == 0) {
| label_2:
0x0000d516 cbz r5, 0xd552 | goto label_5;
| }
0x0000d518 ldr r7, [pc, 0x4c] |
0x0000d51a mov sb, r0 | sb = r0;
0x0000d51c movs r5, 1 | r5 = 1;
0x0000d51e mov r0, r1 | r0 = r1;
0x0000d520 add r7, pc | r7 = 0x1aa8c;
| do {
0x0000d522 ldrb r4, [r7, r4] | r4 = *((r7 + r4));
0x0000d524 lsls r4, r4, 0x1e | r4 <<= 0x1e;
0x0000d526 ldrb r4, [r0, 1]! | r4 = *((r0 += 1));
0x0000d52a itt mi |
| if (r4 >= r4) {
0x0000d52c addmi r5, 2 | r5 += 2;
| }
| if (r4 >= r4) {
0x0000d52e movmi sb, 1 | sb = 1;
| }
0x0000d532 adds r5, 1 | r5++;
0x0000d534 subs r6, r0, r2 | r6 = r0 - r2;
0x0000d536 cmp r4, 0 |
0x0000d538 it ne |
| if (r4 != 0) {
0x0000d53a cmpne r1, r6 | __asm ("cmpne r1, r6");
| }
0x0000d53c bne 0xd522 |
| } while (r4 != 0);
0x0000d53e b 0xd506 | goto label_0;
| if (r3 != 0) {
| label_1:
0x0000d540 cbz r3, 0xd546 |
0x0000d542 movs r2, 1 | r2 = 1;
0x0000d544 str r2, [r3] | *(r3) = r2;
| }
0x0000d546 movw r0, 0x117f |
0x0000d54a movt r0, 1 | r0 = 0x1117f;
0x0000d54e bx lr | return r0;
| label_3:
0x0000d550 strb r5, [r0] | *(r0) = r5;
| if (r3 != 0) {
| label_5:
0x0000d552 cbz r3, 0xd558 |
0x0000d554 movs r2, 1 | r2 = 1;
0x0000d556 str r2, [r3] | *(r3) = r2;
| }
| label_4:
0x0000d558 movw r0, 0x117f |
0x0000d55c movt r0, 1 | r0 = 0x1117f;
0x0000d560 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0xd5d8 */
| #include <stdint.h>
|
; (fcn) sym.apr_escape_path () | void apr_escape_path (int16_t arg_20h, int16_t arg1, uint32_t arg2, int16_t arg3, uint32_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0000d5d8 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0000d5dc ldr r6, [sp, 0x20] | r6 = *(arg_20h);
0x0000d5de cmp r1, 0 |
| if (r1 == 0) {
0x0000d5e0 beq 0xd6a6 | goto label_3;
| }
0x0000d5e2 mov r4, r0 | r4 = r0;
0x0000d5e4 mov r8, r2 | r8 = r2;
0x0000d5e6 mov r7, r1 | r7 = r1;
0x0000d5e8 cmp r3, 0 |
| if (r3 == 0) {
0x0000d5ea beq 0xd66a | goto label_4;
| }
| label_0:
0x0000d5ec mov sl, r4 | sl = r4;
0x0000d5ee movs r0, 1 | r0 = 1;
0x0000d5f0 cmp r4, 0 |
| if (r4 == 0) {
0x0000d5f2 beq 0xd6b8 | goto label_5;
| }
0x0000d5f4 mov.w sl, 0 | sl = 0;
0x0000d5f8 movs r0, 1 | r0 = 1;
| label_1:
0x0000d5fa ldrb r3, [r7] | r3 = *(r7);
0x0000d5fc cmp r3, 0 |
0x0000d5fe it ne |
| if (r3 != 0) {
0x0000d600 cmpne r8, 0 | __asm ("cmpne r8, 0");
| }
0x0000d604 it eq |
| if (r3 != 0) {
0x0000d606 moveq r1, r4 | r1 = r4;
| }
| if (r3 == 0) {
0x0000d608 beq 0xd656 | goto label_6;
| }
0x0000d60a ldr r2, [pc, 0xe0] |
0x0000d60c mov r5, r7 | r5 = r7;
0x0000d60e add r2, pc | r2 = 0x1ad00;
| do {
0x0000d610 ldrb.w ip, [r2, r3] | ip = *((r2 + r3));
0x0000d614 and lr, r3, 0xf | lr = r3 & 0xf;
0x0000d618 add.w sb, r2, r3, lsr 4 | sb = r2 + (r3 >> 4);
0x0000d61c adds r1, r4, 1 | r1 = r4 + 1;
0x0000d61e add lr, r2 | lr += r2;
0x0000d620 tst.w ip, 4 |
| if ((ip & 4) != 0) {
0x0000d624 beq 0xd640 |
0x0000d626 ldrb.w sb, [sb, 0x100] | sb = *((sb + 0x100));
0x0000d62a adds r1, r4, 3 | r1 = r4 + 3;
0x0000d62c ldrb.w ip, [lr, 0x100] | ip = *((lr + 0x100));
0x0000d630 adds r0, 2 | r0 += 2;
0x0000d632 movs r3, 0x25 | r3 = 0x25;
0x0000d634 mov.w sl, 1 | sl = 1;
0x0000d638 strb.w sb, [r4, 1] | *((r4 + 1)) = sb;
0x0000d63c strb.w ip, [r4, 2] | *((r4 + 2)) = ip;
| }
0x0000d640 strb r3, [r4] | *(r4) = r3;
0x0000d642 adds r0, 1 | r0++;
0x0000d644 ldrb r3, [r5, 1]! | r3 = *((r5 += 1));
0x0000d648 mov r4, r1 | r4 = r1;
0x0000d64a sub.w ip, r5, r8 |
0x0000d64e cmp r3, 0 |
0x0000d650 it ne |
| if (r3 != 0) {
0x0000d652 cmpne r7, ip | __asm ("cmpne r7, ip");
| }
0x0000d654 bne 0xd610 |
| } while (r3 != 0);
| label_6:
0x0000d656 movs r3, 0 | r3 = 0;
0x0000d658 strb r3, [r1] | *(r1) = r3;
| if (r6 != 0) {
| label_2:
0x0000d65a cbz r6, 0xd65e |
0x0000d65c str r0, [r6] | *(r6) = r0;
| }
0x0000d65e cmp.w sl, 0 |
| if (sl == 0) {
0x0000d662 beq 0xd6a6 | goto label_3;
| }
0x0000d664 movs r0, 0 | r0 = 0;
0x0000d666 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
0x0000d668 strh r0, [r6, 0x3e] | *((r6 + 0x3e)) = r0;
| label_4:
0x0000d66a movs r1, 0x3a | r1 = 0x3a;
0x0000d66c mov r0, r7 | r0 = r7;
0x0000d66e blx 0xa0f4 | r0 = strcasecmp (r0, r1);
0x0000d672 mov r5, r0 | r5 = r0;
0x0000d674 cmp r0, 0 |
| if (r0 == 0) {
0x0000d676 beq 0xd5ec | goto label_0;
| }
0x0000d678 movs r1, 0x2f | r1 = 0x2f;
0x0000d67a mov r0, r7 | r0 = r7;
0x0000d67c blx 0xa0f4 | r0 = strcasecmp (r0, r1);
0x0000d680 cmp r5, r0 |
0x0000d682 ite hs |
| if (r5 < r0) {
0x0000d684 movhs r5, 0 | r5 = 0;
| }
| if (r5 >= r0) {
0x0000d686 movlo r5, 1 | r5 = 1;
| }
0x0000d688 cmp r0, 0 |
0x0000d68a it eq |
| if (r0 != 0) {
0x0000d68c orreq r5, r5, 1 | r5 |= 1;
| }
0x0000d690 cmp r5, 0 |
| if (r5 == 0) {
0x0000d692 beq 0xd5ec | goto label_0;
| }
| if (r4 != 0) {
0x0000d694 cbz r4, 0xd6b2 |
0x0000d696 movw r3, 0x2f2e | r3 = 0x2f2e;
0x0000d69a mov.w sl, 1 | sl = 1;
0x0000d69e movs r0, 3 | r0 = 3;
0x0000d6a0 strh r3, [r4], 2 | *(r4) = r3;
| r4 += 2;
0x0000d6a4 b 0xd5fa | goto label_1;
| label_3:
0x0000d6a6 movw r0, 0x117f |
0x0000d6aa movt r0, 1 | r0 = 0x1117f;
0x0000d6ae pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| }
0x0000d6b2 mov.w sl, 1 | sl = 1;
0x0000d6b6 movs r0, 3 | r0 = 3;
| label_5:
0x0000d6b8 ldrb r3, [r7] | r3 = *(r7);
0x0000d6ba cmp.w r8, 0 |
0x0000d6be it ne |
| if (r8 == 0) {
0x0000d6c0 cmpne r3, 0 | __asm ("cmpne r3, 0");
| goto label_7;
| }
| if (r8 == 0) {
| label_7:
0x0000d6c2 beq 0xd65a | goto label_2;
| }
0x0000d6c4 ldr r4, [pc, 0x28] |
0x0000d6c6 mov r2, r7 | r2 = r7;
0x0000d6c8 add r4, pc | r4 = 0x1adbc;
| do {
0x0000d6ca ldrb r3, [r4, r3] | r3 = *((r4 + r3));
0x0000d6cc lsls r3, r3, 0x1d | r3 <<= 0x1d;
0x0000d6ce ldrb r3, [r2, 1]! | r3 = *((r2 += 1));
0x0000d6d2 itt mi |
| if (r3 >= r3) {
0x0000d6d4 addmi r0, 2 | r0 += 2;
| }
| if (r3 >= r3) {
0x0000d6d6 movmi sl, 1 | sl = 1;
| }
0x0000d6da adds r0, 1 | r0++;
0x0000d6dc sub.w r1, r2, r8 | r1 = r2 - r8;
0x0000d6e0 cmp r3, 0 |
0x0000d6e2 it ne |
| if (r3 != 0) {
0x0000d6e4 cmpne r7, r1 | __asm ("cmpne r7, r1");
| }
0x0000d6e6 bne 0xd6ca |
| } while (r3 != 0);
0x0000d6e8 b 0xd65a | 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/lib/libapr-1.so.0.7.2 @ 0x16194 */
| #include <stdint.h>
|
; (fcn) sym.apr_file_flush_locked () | uint32_t apr_file_flush_locked (int16_t arg1) {
| r0 = arg1;
0x00016194 ldr r3, [r0, 0x3c] | r3 = *((r0 + 0x3c));
0x00016196 cmp r3, 1 |
| if (r3 != 1) {
0x00016198 beq 0x1619e |
0x0001619a movs r0, 0 | r0 = 0;
0x0001619c bx lr | return r0;
| }
0x0001619e push {r4, r5, r6, lr} |
0x000161a0 mov r4, r0 | r4 = r0;
0x000161a2 ldr r6, [r0, 0x30] | r6 = *((r0 + 0x30));
| if (r6 == 0) {
0x000161a4 cbz r6, 0x161d2 | goto label_3;
| }
0x000161a6 movs r5, 0 | r5 = 0;
| do {
| label_0:
0x000161a8 ldr r1, [r4, 0x2c] | r1 = *((r4 + 0x2c));
0x000161aa subs r2, r6, r5 | r2 = r6 - r5;
0x000161ac ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x000161ae add r1, r5 | r1 += r5;
0x000161b0 blx 0xa4a4 | r0 = fcn_0000a4a4 ();
0x000161b4 cmp r0, 0 |
0x000161b6 ldr r6, [r4, 0x30] | r6 = *((r4 + 0x30));
| if (r0 <= 0) {
0x000161b8 ble 0x161d6 | goto label_4;
| }
0x000161ba add r5, r0 | r5 += r0;
0x000161bc cmp r6, r5 |
0x000161be bhi 0x161a8 |
| } while (r6 > r5);
| label_1:
0x000161c0 ldrd r3, r2, [r4, 0x40] | __asm ("ldrd r3, r2, [r4, 0x40]");
0x000161c4 movs r1, 0 | r1 = 0;
0x000161c6 str r1, [r4, 0x30] | *((r4 + 0x30)) = r1;
0x000161c8 adds r3, r3, r5 | r3 += r5;
0x000161ca adc.w r2, r2, r5, asr 31 | __asm ("adc.w r2, r2, r5, asr 31");
0x000161ce strd r3, r2, [r4, 0x40] | __asm ("strd r3, r2, [r4, 0x40]");
| label_3:
0x000161d2 movs r0, 0 | r0 = 0;
0x000161d4 pop {r4, r5, r6, pc} |
| label_4:
0x000161d6 sub.w r3, r0, -1 | r3 = r0 - -1;
0x000161da cmp r5, r6 |
0x000161dc clz r3, r3 | r3 &= r3;
0x000161e0 lsr.w r3, r3, 5 | r3 >>= 5;
0x000161e4 it hs |
| if (r5 < r6) {
0x000161e6 movhs r3, 0 | r3 = 0;
| }
| if (r3 == 0) {
0x000161e8 cbz r3, 0x161fc | goto label_5;
| }
0x000161ea blx 0xb12c | r0 = fcn_0000b12c ();
0x000161ee ldr r3, [r0] | r3 = *(r0);
0x000161f0 cmp r3, 4 |
| if (r3 == 4) {
0x000161f2 beq 0x161a8 | goto label_0;
| }
| label_2:
0x000161f4 blx 0xb12c | r0 = fcn_0000b12c ();
0x000161f8 ldr r0, [r0] | r0 = *(r0);
0x000161fa pop {r4, r5, r6, pc} |
| label_5:
0x000161fc adds r0, 1 | r0++;
| if (r0 != 1) {
0x000161fe bne 0x161c0 | goto label_1;
| }
0x00016200 b 0x161f4 | 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/lib/libapr-1.so.0.7.2 @ 0x155ac */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) sym.apr_file_read_full () | void apr_file_read_full (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h_2;
| int16_t var_4h_2;
| int16_t var_0h;
| int16_t var_4h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x000155ac push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x000155b0 mov r5, r2 | r5 = r2;
0x000155b2 ldr r2, [pc, 0x6c] |
0x000155b4 mov r8, r3 | r8 = r3;
0x000155b6 sub sp, 8 |
0x000155b8 mov r6, r0 | r6 = r0;
0x000155ba ldr r3, [pc, 0x68] | r3 = *(0x15626);
0x000155bc mov sl, r1 | sl = r1;
0x000155be add r2, pc | r2 = 0x2abe4;
0x000155c0 mov.w sb, 0 | sb = 0;
0x000155c4 mov r7, sp | r7 = sp;
0x000155c6 ldr r3, [r2, r3] |
0x000155c8 ldr r3, [r3] | r3 = *(0x2abe4);
0x000155ca str r3, [sp, 4] | var_4h = r3;
0x000155cc mov.w r3, 0 | r3 = 0;
| do {
0x000155d0 mov r2, r7 | r2 = r7;
0x000155d2 mov r1, sl | r1 = sl;
0x000155d4 mov r0, r6 | r0 = r6;
0x000155d6 str r5, [sp] | *(sp) = r5;
0x000155d8 blx 0xa1b0 | fcn_0000a1b0 ();
0x000155dc ldr r4, [sp] | r4 = *(sp);
0x000155de subs r5, r5, r4 | r5 -= r4;
0x000155e0 add sl, r4 | sl += r4;
0x000155e2 ite ne |
| if (r5 == r5) {
0x000155e4 movne r2, 1 | r2 = 1;
| }
| if (r5 != r5) {
0x000155e6 moveq r2, 0 | r2 = 0;
| }
0x000155e8 cmp r0, 0 |
0x000155ea ite ne |
| if (r0 == 0) {
0x000155ec movne r2, 0 | r2 = 0;
| }
| if (r0 != 0) {
0x000155ee andeq r2, r2, 1 | r2 &= 1;
| }
0x000155f2 add sb, r4 | sb += r4;
0x000155f4 cmp r2, 0 |
0x000155f6 bne 0x155d0 |
| } while (r2 != 0);
0x000155f8 cmp.w r8, 0 |
| if (r8 != 0) {
0x000155fc beq 0x15602 |
0x000155fe str.w sb, [r8] | __asm ("str.w sb, [r8]");
| }
0x00015602 ldr r2, [pc, 0x24] |
0x00015604 ldr r3, [pc, 0x1c] | r3 = *(0x15624);
0x00015606 add r2, pc | r2 = 0x2ac34;
0x00015608 ldr r3, [r2, r3] | r3 = *(0x2ac34);
0x0001560a ldr r2, [r3] | r2 = *(0x2ac34);
0x0001560c ldr r3, [sp, 4] | r3 = var_4h;
0x0001560e eors r2, r3 | r2 ^= r3;
0x00015610 mov.w r3, 0 | r3 = 0;
| if (r2 == r3) {
0x00015614 bne 0x1561c |
0x00015616 add sp, 8 |
0x00015618 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| }
0x0001561c blx 0xabc8 | pthread_attr_getdetachstate ();
0x00015620 bfi r0, lr, 0, 1 | value_0 = BIT_MASK (0, 1);
| value_1 = lr & value_0;
| value_0 = ~value_0;
| r0 &= value_0;
| r0 |= value_1;
0x00015624 lsls r0, r4, 0x1a | r0 = r4 << 0x1a;
0x00015626 movs r0, r0 |
0x00015628 ssat16 r0, 1, r6 | __asm ("ssat16 r0, 1, r6");
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x169f8 */
| #include <stdint.h>
|
; (fcn) sym.apr_file_seek () | void apr_file_seek (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h;
| int16_t var_8h;
| int16_t var_38h;
| int16_t var_3ch;
| int16_t var_74h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x000169f8 invalid |
0x000169fc ldr r1, [pc, 0xec] |
0x000169fe mov r5, r2 | r5 = r2;
0x00016a00 sub sp, 0x7c |
0x00016a02 movs r3, 0 | r3 = 0;
0x00016a04 ldr r2, [pc, 0xe8] | r2 = *(0x16af0);
0x00016a06 mov r4, r0 | r4 = r0;
0x00016a08 add r1, pc | r1 = 0x2d4f8;
0x00016a0a ldr r7, [r0, 0x20] | r7 = *((r0 + 0x20));
0x00016a0c ldr r2, [r1, r2] |
0x00016a0e ldr r2, [r2] | r2 = *(0x2d4f8);
0x00016a10 str r2, [sp, 0x74] | var_74h = r2;
0x00016a12 mov.w r2, 0 | r2 = 0;
0x00016a16 str r3, [r0, 0x10] | *((r0 + 0x10)) = r3;
| if (r7 == 0) {
0x00016a18 cbz r7, 0x16a6a | goto label_2;
| }
0x00016a1a ldr r0, [r0, 0x48] | r0 = *((r0 + 0x48));
| if (r0 != 0) {
0x00016a1c cbz r0, 0x16a22 |
0x00016a1e blx 0xa3d8 | fcn_0000a3d8 ();
| }
0x00016a22 cmp r6, 1 |
| if (r6 == 1) {
0x00016a24 beq 0x16ac0 | goto label_3;
| }
0x00016a26 cmp r6, 2 |
| if (r6 == 2) {
0x00016a28 beq 0x16aa6 | goto label_4;
| }
0x00016a2a movs r7, 0x16 | r7 = 0x16;
0x00016a2c cmp r6, 0 |
| if (r6 == 0) {
0x00016a2e beq 0x16a98 | goto label_5;
| }
| label_1:
0x00016a30 ldr r2, [r4, 0x38] | r2 = *((r4 + 0x38));
0x00016a32 ldr r3, [r4, 0x40] | r3 = *((r4 + 0x40));
0x00016a34 ldr r1, [r4, 0x30] | r1 = *((r4 + 0x30));
0x00016a36 ldr r0, [r4, 0x48] | r0 = *((r4 + 0x48));
0x00016a38 subs r3, r3, r2 | r3 -= r2;
0x00016a3a ldr r2, [r4, 0x44] | r2 = *((r4 + 0x44));
0x00016a3c sbc r2, r2, 0 | __asm ("sbc r2, r2, 0");
0x00016a40 adds r3, r3, r1 | r3 += r1;
0x00016a42 adc r2, r2, 0 | __asm ("adc r2, r2, 0");
0x00016a46 strd r3, r2, [r5] | __asm ("strd r3, r2, [r5]");
| if (r0 == 0) {
0x00016a4a cbz r0, 0x16a50 | goto label_0;
| }
0x00016a4c blx 0xa090 | fcn_0000a090 ();
| do {
| label_0:
0x00016a50 ldr r2, [pc, 0xa0] |
0x00016a52 ldr r3, [pc, 0x9c] | r3 = *(0x16af2);
0x00016a54 add r2, pc | r2 = 0x2d54c;
0x00016a56 ldr r3, [r2, r3] | r3 = *(0x2d54c);
0x00016a58 ldr r2, [r3] | r2 = *(0x2d54c);
0x00016a5a ldr r3, [sp, 0x74] | r3 = var_74h;
0x00016a5c eors r2, r3 | r2 ^= r3;
0x00016a5e mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00016a62 bne 0x16ae8 | goto label_6;
| }
0x00016a64 mov r0, r7 | r0 = r7;
0x00016a66 add sp, 0x7c |
0x00016a68 pop {r4, r5, r6, r7, pc} |
| label_2:
0x00016a6a ldr r0, [r0, 4] | r0 = *((r0 + 4));
0x00016a6c str r6, [sp] | *(sp) = r6;
0x00016a6e ldrd r2, r3, [r5] | __asm ("ldrd r2, r3, [r5]");
0x00016a72 blx 0xab5c | pthread_key_delete ();
0x00016a76 cmp.w r1, -1 |
0x00016a7a it eq |
| if (r1 == -1) {
0x00016a7c cmpeq r0, -1 | __asm ("cmpeq r0, -1");
| }
0x00016a80 it ne |
| if (r1 != -1) {
0x00016a82 strdne r0, r1, [r5] | __asm ("strdne r0, r1, [r5]");
| }
0x00016a86 bne 0x16a50 |
| } while (r1 != -1);
0x00016a88 vmov.i8 d16, 0xff | __asm ("vmov.i8 d16, 0xff");
0x00016a8c vstr d16, [r5] | __asm ("vstr d16, [r5]");
0x00016a90 blx 0xb12c | r0 = fcn_0000b12c ();
0x00016a94 ldr r7, [r0] | r7 = *(r0);
0x00016a96 b 0x16a50 | goto label_0;
| label_5:
0x00016a98 ldrd r2, r3, [r5] | __asm ("ldrd r2, r3, [r5]");
0x00016a9c mov r0, r4 | r0 = r4;
0x00016a9e bl 0x16980 | r0 = fcn_00016980 (r0, r1, r2);
0x00016aa2 mov r7, r0 | r7 = r0;
0x00016aa4 b 0x16a30 | goto label_1;
| label_4:
0x00016aa6 mov r2, r4 | r2 = r4;
0x00016aa8 mov.w r1, 0x100 | r1 = 0x100;
0x00016aac add r0, sp, 8 | r0 += var_8h;
0x00016aae blx 0xa5d4 | r0 = fcn_0000a5d4 ();
0x00016ab2 mov r7, r0 | r7 = r0;
0x00016ab4 cmp r0, 0 |
| if (r0 != 0) {
0x00016ab6 bne 0x16a30 | goto label_1;
| }
0x00016ab8 ldr r2, [sp, 0x38] | r2 = var_38h;
0x00016aba ldr r1, [r5] | r1 = *(r5);
0x00016abc ldr r3, [sp, 0x3c] | r3 = var_3ch;
0x00016abe b 0x16ad6 | goto label_7;
| label_3:
0x00016ac0 ldr r1, [r4, 0x38] | r1 = *((r4 + 0x38));
0x00016ac2 ldrd r2, r3, [r4, 0x40] | __asm ("ldrd r2, r3, [r4, 0x40]");
0x00016ac6 subs r2, r2, r1 | r2 -= r1;
0x00016ac8 ldr r1, [r4, 0x30] | r1 = *((r4 + 0x30));
0x00016aca sbc r3, r3, 0 | __asm ("sbc r3, r3, 0");
0x00016ace adds r2, r2, r1 | r2 += r1;
0x00016ad0 ldr r1, [r5] | r1 = *(r5);
0x00016ad2 adc r3, r3, 0 | __asm ("adc r3, r3, 0");
| label_7:
0x00016ad6 adds r2, r2, r1 | r2 += r1;
0x00016ad8 ldr r1, [r5, 4] | r1 = *((r5 + 4));
0x00016ada mov r0, r4 | r0 = r4;
0x00016adc adc.w r3, r3, r1 | __asm ("adc.w r3, r3, r1");
0x00016ae0 bl 0x16980 | r0 = fcn_00016980 (r0, r1, r2);
0x00016ae4 mov r7, r0 | r7 = r0;
0x00016ae6 b 0x16a30 | goto label_1;
| label_6:
0x00016ae8 blx 0xabc8 | pthread_attr_getdetachstate ();
0x00016aec svc 0x24 | __asm ("svc 0x24");
0x00016aee movs r0, r0 |
0x00016af0 lsls r0, r4, 0x1a | r0 = r4 << 0x1a;
0x00016af2 movs r0, r0 |
0x00016af4 udf 0xd8 | __asm ("udf 0xd8");
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x16af8 */
| #include <stdint.h>
|
; (fcn) sym.apr_file_trunc () | void apr_file_trunc (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;
| if (? >= ?) {
0x00016af8 addlt fp, r2, r0, ror r5 |
| }
0x00016afc strd r2, r3, [sp] | __asm ("strd r2, r3, [sp]");
0x00016b00 mov r4, r0 | r4 = r0;
0x00016b02 ldr r3, [r0, 0x20] | r3 = *((r0 + 0x20));
| if (r3 == 0) {
0x00016b04 cbz r3, 0x16b24 | goto label_0;
| }
0x00016b06 ldr r0, [r0, 0x48] | r0 = *((r0 + 0x48));
| if (r0 != 0) {
0x00016b08 cbz r0, 0x16b0e |
0x00016b0a blx 0xa3d8 | fcn_0000a3d8 ();
| }
0x00016b0e ldr r3, [r4, 0x3c] | r3 = *((r4 + 0x3c));
0x00016b10 cmp r3, 1 |
| if (r3 == 1) {
0x00016b12 beq 0x16b44 | goto label_1;
| }
0x00016b14 ldr r0, [r4, 0x48] | r0 = *((r4 + 0x48));
0x00016b16 cmp r3, 0 |
| if (r3 != 0) {
0x00016b18 bne 0x16ba6 | goto label_2;
| }
0x00016b1a str r3, [r4, 0x30] | *((r4 + 0x30)) = r3;
0x00016b1c str r3, [r4, 0x38] | *((r4 + 0x38)) = r3;
| if (r0 == 0) {
0x00016b1e cbz r0, 0x16b24 | goto label_0;
| }
0x00016b20 blx 0xa090 | fcn_0000a090 ();
| do {
| label_0:
0x00016b24 ldrd r2, r3, [sp] | __asm ("ldrd r2, r3, [sp]");
0x00016b28 ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x00016b2a blx 0xaff4 | fcn_0000aff4 ();
0x00016b2e adds r0, 1 | r0++;
| if (r0 == 1) {
0x00016b30 beq 0x16b98 | goto label_3;
| }
0x00016b32 mov r2, sp | r2 = sp;
0x00016b34 movs r1, 0 | r1 = 0;
0x00016b36 mov r0, r4 | r0 = r4;
0x00016b38 blx 0xa340 | r0 = fcn_0000a340 ();
0x00016b3c mov r5, r0 | r5 = r0;
0x00016b3e mov r0, r5 | r0 = r5;
0x00016b40 add sp, 8 |
0x00016b42 pop {r4, r5, r6, pc} |
| label_1:
0x00016b44 ldr r3, [r4, 0x30] | r3 = *((r4 + 0x30));
| if (r3 == 0) {
0x00016b46 cbz r3, 0x16ba4 | goto label_4;
| }
0x00016b48 ldrd r2, r1, [r4, 0x40] | __asm ("ldrd r2, r1, [r4, 0x40]");
0x00016b4c movs r6, 0 | r6 = 0;
0x00016b4e ldr r0, [sp] | r0 = *(sp);
0x00016b50 ldr r5, [sp, 4] | r5 = var_4h;
0x00016b52 adds r2, r3, r2 | r2 = r3 + r2;
0x00016b54 adc r1, r1, 0 | __asm ("adc r1, r1, 0");
0x00016b58 cmp r0, r2 |
0x00016b5a sbcs.w ip, r5, r1 | __asm ("sbcs.w ip, r5, r1");
| if (r0 < r2) {
0x00016b5e bge 0x16b74 |
0x00016b60 subs r2, r2, r0 | r2 -= r0;
0x00016b62 sbc.w r1, r1, r5 | __asm ("sbc.w r1, r1, r5");
0x00016b66 cmp r3, r2 |
0x00016b68 sbcs.w r1, r6, r1 | __asm ("sbcs.w r1, r6, r1");
0x00016b6c itet ge |
| if (r3 < r2) {
0x00016b6e subge r3, r3, r2 | r3 -= r2;
| }
| if (r3 >= r2) {
0x00016b70 strlt r6, [r4, 0x30] | *((r4 + 0x30)) = r6;
| }
| if (r3 >= r2) {
0x00016b72 strge r3, [r4, 0x30] | *((r4 + 0x30)) = r3;
| goto label_5;
| }
| }
| label_5:
0x00016b74 mov r0, r4 | r0 = r4;
0x00016b76 blx 0xa1a4 | fcn_0000a1a4 ();
0x00016b7a ldr r2, [r4, 0x48] | r2 = *((r4 + 0x48));
0x00016b7c movs r3, 0 | r3 = 0;
0x00016b7e mov r5, r0 | r5 = r0;
0x00016b80 strd r3, r3, [r4, 0x38] | __asm ("strd r3, r3, [r4, 0x38]");
0x00016b84 str r3, [r4, 0x30] | *((r4 + 0x30)) = r3;
| if (r2 != 0) {
0x00016b86 cbz r2, 0x16b8e |
0x00016b88 mov r0, r2 | r0 = r2;
0x00016b8a blx 0xa090 | fcn_0000a090 ();
| }
0x00016b8e cmp r5, 0 |
0x00016b90 beq 0x16b24 |
| } while (r5 == 0);
0x00016b92 mov r0, r5 | r0 = r5;
0x00016b94 add sp, 8 |
0x00016b96 pop {r4, r5, r6, pc} |
| label_3:
0x00016b98 blx 0xb12c | r0 = fcn_0000b12c ();
0x00016b9c ldr r5, [r0] | r5 = *(r0);
0x00016b9e mov r0, r5 | r0 = r5;
0x00016ba0 add sp, 8 |
0x00016ba2 pop {r4, r5, r6, pc} |
| label_4:
0x00016ba4 ldr r0, [r4, 0x48] | r0 = *((r4 + 0x48));
| label_2:
0x00016ba6 cmp r0, 0 |
| if (r0 == 0) {
0x00016ba8 beq 0x16b24 | goto label_0;
| }
0x00016baa blx 0xa090 | fcn_0000a090 ();
0x00016bae b 0x16b24 | 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/lib/libapr-1.so.0.7.2 @ 0x15530 */
| #include <stdint.h>
|
; (fcn) sym.apr_file_unlock () | void apr_file_unlock (int16_t arg1) {
| int16_t var_4h;
| int16_t var_6h;
| int16_t var_ah;
| int16_t var_eh;
| int16_t var_12h;
| int16_t var_14h;
| r0 = arg1;
0x00015530 push {r4, r5, r6, lr} |
0x00015532 mov r5, r0 | r5 = r0;
0x00015534 ldr r0, [pc, 0x68] |
0x00015536 sub sp, 0x18 |
0x00015538 add r6, sp, 4 | r6 += var_4h;
0x0001553a movs r3, 0 | r3 = 0;
0x0001553c ldr r1, [pc, 0x64] | r1 = *(0x155a4);
0x0001553e movs r2, 2 | r2 = 2;
0x00015540 add r0, pc | r0 = 0x2aae4;
0x00015542 ldr r1, [r0, r1] |
0x00015544 ldr r1, [r1] | r1 = *(0x2aae4);
0x00015546 str r1, [sp, 0x14] | var_14h = r1;
0x00015548 mov.w r1, 0 | r1 = 0;
0x0001554c str.w r3, [sp, 6] | __asm ("str.w r3, [var_6h]");
0x00015550 str.w r3, [sp, 0xa] | __asm ("str.w r3, [var_ah]");
0x00015554 str.w r3, [sp, 0xe] | __asm ("str.w r3, [var_eh]");
0x00015558 strh.w r2, [sp, 4] | var_4h = r2;
0x0001555c strh.w r3, [sp, 0x12] | var_12h = r3;
| do {
0x00015560 ldr r0, [r5, 4] | r0 = *((r5 + 4));
0x00015562 mov r2, r6 | r2 = r6;
0x00015564 movs r1, 7 | r1 = 7;
0x00015566 blx 0xaf60 | r0 = fcn_0000af60 ();
0x0001556a subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 >= r0) {
0x0001556c bge 0x15596 | goto label_0;
| }
0x0001556e blx 0xb12c | r0 = fcn_0000b12c ();
0x00015572 ldr r0, [r0] | r0 = *(r0);
0x00015574 cmp r0, 4 |
0x00015576 beq 0x15560 |
| } while (r0 == 4);
0x00015578 adds r4, 1 | r4++;
0x0001557a it ne |
0x0001557c movne r0, 0 | r0 = 0;
| while (1) {
0x0001557e ldr r2, [pc, 0x28] |
0x00015580 ldr r3, [pc, 0x20] | r3 = *(0x155a4);
0x00015582 add r2, pc | r2 = 0x2ab30;
0x00015584 ldr r3, [r2, r3] | r3 = *(0x2ab30);
0x00015586 ldr r2, [r3] | r2 = *(0x2ab30);
0x00015588 ldr r3, [sp, 0x14] | r3 = var_14h;
0x0001558a eors r2, r3 | r2 ^= r3;
0x0001558c mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00015590 bne 0x1559a | goto label_1;
| }
0x00015592 add sp, 0x18 |
0x00015594 pop {r4, r5, r6, pc} |
| label_0:
0x00015596 movs r0, 0 | r0 = 0;
0x00015598 b 0x1557e |
| }
| label_1:
0x0001559a blx 0xabc8 | pthread_attr_getdetachstate ();
0x0001559e nop |
0x000155a0 invalid |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x1562c */
| #include <stdint.h>
|
; (fcn) sym.apr_file_write_full () | void apr_file_write_full (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;
| if (? >= ?) {
0x0001562c ldrbmi lr, [r0, sp, lsr 18]! |
| }
0x00015630 mov r5, r2 | r5 = r2;
0x00015632 ldr r2, [pc, 0x6c] |
0x00015634 mov r8, r3 | r8 = r3;
0x00015636 sub sp, 8 |
0x00015638 mov r6, r0 | r6 = r0;
0x0001563a ldr r3, [pc, 0x68] | r3 = *(0x156a6);
0x0001563c mov sl, r1 | sl = r1;
0x0001563e add r2, pc | r2 = 0x2ace4;
0x00015640 mov.w sb, 0 | sb = 0;
0x00015644 mov r7, sp | r7 = sp;
0x00015646 ldr r3, [r2, r3] |
0x00015648 ldr r3, [r3] | r3 = *(0x2ace4);
0x0001564a str r3, [sp, 4] | var_4h = r3;
0x0001564c mov.w r3, 0 | r3 = 0;
| do {
0x00015650 mov r2, r7 | r2 = r7;
0x00015652 mov r1, sl | r1 = sl;
0x00015654 mov r0, r6 | r0 = r6;
0x00015656 str r5, [sp] | *(sp) = r5;
0x00015658 blx 0xaa38 | fcn_0000aa38 ();
0x0001565c ldr r4, [sp] | r4 = *(sp);
0x0001565e subs r5, r5, r4 | r5 -= r4;
0x00015660 add sl, r4 | sl += r4;
0x00015662 ite ne |
| if (r5 == r5) {
0x00015664 movne r2, 1 | r2 = 1;
| }
| if (r5 != r5) {
0x00015666 moveq r2, 0 | r2 = 0;
| }
0x00015668 cmp r0, 0 |
0x0001566a ite ne |
| if (r0 == 0) {
0x0001566c movne r2, 0 | r2 = 0;
| }
| if (r0 != 0) {
0x0001566e andeq r2, r2, 1 | r2 &= 1;
| }
0x00015672 add sb, r4 | sb += r4;
0x00015674 cmp r2, 0 |
0x00015676 bne 0x15650 |
| } while (r2 != 0);
0x00015678 cmp.w r8, 0 |
| if (r8 != 0) {
0x0001567c beq 0x15682 |
0x0001567e str.w sb, [r8] | __asm ("str.w sb, [r8]");
| }
0x00015682 ldr r2, [pc, 0x24] |
0x00015684 ldr r3, [pc, 0x1c] | r3 = *(0x156a4);
0x00015686 add r2, pc | r2 = 0x2ad34;
0x00015688 ldr r3, [r2, r3] | r3 = *(0x2ad34);
0x0001568a ldr r2, [r3] | r2 = *(0x2ad34);
0x0001568c ldr r3, [sp, 4] | r3 = var_4h;
0x0001568e eors r2, r3 | r2 ^= r3;
0x00015690 mov.w r3, 0 | r3 = 0;
| if (r2 == r3) {
0x00015694 bne 0x1569c |
0x00015696 add sp, 8 |
0x00015698 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| }
0x0001569c blx 0xabc8 | pthread_attr_getdetachstate ();
0x000156a0 invalid |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x14c0c */
| #include <stdint.h>
|
; (fcn) sym.apr_filepath_merge () | void apr_filepath_merge (int16_t arg_1h, int16_t arg_38h, int16_t arg1, int16_t arg2, uint32_t arg3, int16_t arg4) {
| int16_t var_bp_4h;
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00014c0c svcmi 0xf0e92d | __asm ("svcmi 0xf0e92d");
0x00014c10 mov r8, r1 | r8 = r1;
0x00014c12 ldr r1, [pc, 0x2bc] |
0x00014c14 mov sb, r3 | sb = r3;
0x00014c16 sub sp, 0x14 |
0x00014c18 ldr r3, [pc, 0x2b8] | r3 = *(0x14ed4);
0x00014c1a add r1, pc | r1 = 0x29af0;
0x00014c1c str r0, [sp, 4] | var_4h = r0;
0x00014c1e ldr r4, [sp, 0x38] | r4 = *(arg_38h);
0x00014c20 ldr r3, [r1, r3] |
0x00014c22 ldr r3, [r3] | r3 = *(0x29af0);
0x00014c24 str r3, [sp, 0xc] | var_ch = r3;
0x00014c26 mov.w r3, 0 | r3 = 0;
0x00014c2a cmp r2, 0 |
| if (r2 == 0) {
0x00014c2c beq.w 0x14d88 | goto label_15;
| }
0x00014c30 ldrb r3, [r2] | r3 = *(r2);
0x00014c32 mov r6, r2 | r6 = r2;
0x00014c34 cmp r3, 0x2f |
| if (r3 == 0x2f) {
0x00014c36 beq.w 0x14d64 | goto label_16;
| }
0x00014c3a tst.w sb, 8 |
| if ((sb & 8) != 0) {
0x00014c3e bne.w 0x14d4c | goto label_4;
| }
| label_3:
0x00014c42 cmp.w r8, 0 |
| if (r8 == 0) {
0x00014c46 beq.w 0x14df0 | goto label_17;
| }
| label_0:
0x00014c4a mov r0, r8 | r0 = r8;
0x00014c4c blx 0xa6d8 | r0 = fcn_0000a6d8 ();
0x00014c50 mov sl, r0 | sl = r0;
| label_2:
0x00014c52 mov r0, r6 | r0 = r6;
0x00014c54 blx 0xa6d8 | r0 = fcn_0000a6d8 ();
0x00014c58 add.w r1, r0, sl | r1 = r0 + sl;
0x00014c5c adds r1, 4 | r1 += 4;
0x00014c5e cmp.w r1, 0x1000 |
0x00014c62 it hi |
| if (r1 <= 0x1000) {
0x00014c64 movhi r0, 0x24 | r0 = 0x24;
| }
| if (r1 > 0x1000) {
0x00014c66 bhi 0x14d30 | goto label_1;
| }
0x00014c68 mov r0, r4 | r0 = r4;
0x00014c6a blx 0xa974 | fcn_0000a974 ();
0x00014c6e ldrb r3, [r6] | r3 = *(r6);
0x00014c70 mov r7, r0 | r7 = r0;
0x00014c72 cmp r3, 0x2f |
| if (r3 == 0x2f) {
0x00014c74 beq 0x14cbc | goto label_18;
| }
0x00014c76 ldrb.w r3, [r8] | r3 = *(r8);
0x00014c7a cmp r3, 0x2f |
| if (r3 != 0x2f) {
0x00014c7c beq 0x14c8a |
0x00014c7e tst.w sb, 4 |
0x00014c82 it ne |
| if ((sb & 4) != 0) {
0x00014c84 movwne r0, 0x4e35 | __asm ("movwne r0, 0x4e35");
| }
| if ((sb & 4) != 0) {
0x00014c88 bne 0x14d30 | goto label_1;
| }
| }
0x00014c8a mov r2, sl | r2 = sl;
0x00014c8c mov r1, r8 | r1 = r8;
0x00014c8e mov r0, r7 | r0 = r7;
0x00014c90 blx 0xa78c | fcn_0000a78c ();
0x00014c94 cmp.w sl, 0 |
| if (sl == 0) {
0x00014c98 beq.w 0x14de8 | goto label_19;
| }
0x00014c9c add.w r3, r7, sl | r3 = r7 + sl;
0x00014ca0 ldrb r3, [r3, -0x1] | r3 = *((r3 - 0x1));
0x00014ca4 cmp r3, 0x2f |
| if (r3 == 0x2f) {
0x00014ca6 beq.w 0x14de8 | goto label_19;
| }
0x00014caa add.w r3, sl, 1 | r3 = sl + 1;
0x00014cae mov r2, r3 | r2 = r3;
0x00014cb0 str r3, [sp] | *(sp) = r3;
0x00014cb2 movs r3, 0x2f | r3 = 0x2f;
0x00014cb4 mov fp, r2 |
0x00014cb6 strb.w r3, [r7, sl] | *((r7 + sl)) = r3;
0x00014cba b 0x14cd0 | goto label_7;
| do {
| label_18:
0x00014cbc ldrb r3, [r6, 1]! | r3 = *((r6 += 1));
0x00014cc0 cmp r3, 0x2f |
0x00014cc2 beq 0x14cbc |
| } while (r3 == 0x2f);
0x00014cc4 movs r3, 0x2f | r3 = 0x2f;
0x00014cc6 mov.w fp, 1 |
0x00014cca strb r3, [r7] | *(r7) = r3;
0x00014ccc movs r3, 0 | r3 = 0;
0x00014cce str r3, [sp] | *(sp) = r3;
| label_7:
0x00014cd0 ldrb r0, [r6] | r0 = *(r6);
| if (r0 == 0) {
0x00014cd2 cbz r0, 0x14d12 | goto label_9;
| }
| label_8:
0x00014cd4 cmp r0, 0x2f |
0x00014cd6 mov r4, r6 | r4 = r6;
| if (r0 == 0x2f) {
0x00014cd8 beq.w 0x14e0c | goto label_20;
| }
| do {
0x00014cdc mov r5, r4 | r5 = r4;
0x00014cde ldrb r1, [r4, 1]! | r1 = *((r4 += 1));
0x00014ce2 cmp r1, 0 |
0x00014ce4 it ne |
| if (r1 != 0) {
0x00014ce6 cmpne r1, 0x2f | __asm ("cmpne r1, 0x2f");
| }
0x00014ce8 bne 0x14cdc |
| } while (r1 != 0);
0x00014cea subs r2, r4, r6 | r2 = r4 - r6;
| if (r2 != r4) {
0x00014cec beq 0x14d0e |
0x00014cee cmp r2, 1 |
| if (r2 == 1) {
0x00014cf0 beq.w 0x14e18 | goto label_21;
| }
0x00014cf4 cmp r2, 2 |
0x00014cf6 it eq |
| if (r2 == 2) {
0x00014cf8 cmpeq r0, 0x2e | __asm ("cmpeq r0, 0x2e");
| }
| if (r2 == 2) {
0x00014cfa beq 0x14d96 | goto label_22;
| }
| if (r1 != 0) {
| label_5:
0x00014cfc cbz r1, 0x14d00 |
0x00014cfe adds r2, 1 | r2++;
| }
0x00014d00 add.w r0, r7, fp | r0 = r7 + fp;
0x00014d04 mov r1, r6 | r1 = r6;
0x00014d06 add fp, r2 |
0x00014d08 blx 0xa78c | fcn_0000a78c ();
| label_6:
0x00014d0c ldrb r1, [r5, 1] | r1 = *((r5 + 1));
| }
| label_10:
0x00014d0e cmp r1, 0 |
| if (r1 != 0) {
0x00014d10 bne 0x14e0c | goto label_20;
| }
| label_9:
0x00014d12 ldr r3, [sp] | r3 = *(sp);
0x00014d14 movs r1, 0 | r1 = 0;
0x00014d16 strb.w r1, [r7, fp] | *((r7 + fp)) = r1;
0x00014d1a cmp sl, r3 |
0x00014d1c ite ls |
| if (sl > r3) {
0x00014d1e movls r2, 0 | r2 = 0;
| }
| if (sl <= r3) {
0x00014d20 andhi r2, sb, 1 | r2 = sb & 1;
| }
0x00014d24 cmp r2, 0 |
| if (r2 != 0) {
0x00014d26 bne.w 0x14e68 | goto label_23;
| }
| label_13:
0x00014d2a ldr r3, [sp, 4] | r3 = var_4h;
0x00014d2c movs r0, 0 | r0 = 0;
0x00014d2e str r7, [r3] | *(r3) = r7;
| label_1:
0x00014d30 ldr r2, [pc, 0x1a4] |
0x00014d32 ldr r3, [pc, 0x1a0] | r3 = *(0x14ed6);
0x00014d34 add r2, pc | r2 = 0x29c10;
0x00014d36 ldr r3, [r2, r3] | r3 = *(0x29c10);
0x00014d38 ldr r2, [r3] | r2 = *(0x29c10);
0x00014d3a ldr r3, [sp, 0xc] | r3 = var_ch;
0x00014d3c eors r2, r3 | r2 ^= r3;
0x00014d3e mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00014d42 bne.w 0x14ecc | goto label_24;
| }
0x00014d46 add sp, 0x14 |
0x00014d48 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_4:
0x00014d4c cmp.w r8, 0 |
| if (r8 == 0) {
0x00014d50 beq.w 0x14ea2 | goto label_25;
| }
0x00014d54 ldrb.w r3, [r8] | r3 = *(r8);
0x00014d58 cmp r3, 0x2f |
| if (r3 != 0x2f) {
0x00014d5a bne.w 0x14c4a | goto label_0;
| }
| do {
0x00014d5e movw r0, 0x4e34 | r0 = 0x4e34;
0x00014d62 b 0x14d30 | goto label_1;
| label_16:
0x00014d64 tst.w sb, 2 |
| if ((sb & 2) != 0) {
0x00014d68 bne 0x14de2 | goto label_12;
| }
0x00014d6a tst.w sb, 8 |
0x00014d6e bne 0x14d5e |
| } while ((sb & 8) != 0);
0x00014d70 cmp.w r8, 0 |
| if (r8 != 0) {
0x00014d74 bne.w 0x14c4a | goto label_0;
| }
0x00014d78 tst.w sb, 1 |
| if ((sb & 1) != 0) {
0x00014d7c bne 0x14df0 | goto label_17;
| }
0x00014d7e mov sl, r8 | sl = r8;
0x00014d80 ldr.w r8, [pc, 0x158] |
0x00014d84 add r8, pc | r8 = 0x29c64;
0x00014d86 b 0x14c52 | goto label_2;
| label_15:
0x00014d88 ldr r6, [pc, 0x154] |
0x00014d8a tst.w sb, 8 |
0x00014d8e add r6, pc | r6 = 0x29c72;
| if ((sb & 8) == 0) {
0x00014d90 beq.w 0x14c42 | goto label_3;
| }
0x00014d94 b 0x14d4c | goto label_4;
| label_22:
0x00014d96 ldrb r0, [r6, 1] | r0 = *((r6 + 1));
0x00014d98 cmp r0, 0x2e |
| if (r0 != 0x2e) {
0x00014d9a bne 0x14cfc | goto label_5;
| }
0x00014d9c cmp.w fp, 1 |
| if (fp == 1) {
0x00014da0 beq 0x14e92 | goto label_26;
| }
0x00014da2 cmp.w fp, 0 |
| if (fp == 0) {
0x00014da6 beq 0x14e32 | goto label_14;
| }
0x00014da8 cmp.w fp, 3 |
| if (fp == 3) {
0x00014dac beq 0x14e20 | goto label_27;
| }
| if (fp < 3) {
0x00014dae bls.w 0x14ec6 | goto label_28;
| }
0x00014db2 sub.w r2, fp, 4 | r2 = fp - 4;
0x00014db6 ldrb r0, [r7, r2] | r0 = *((r7 + r2));
0x00014db8 add r2, r7 | r2 += r7;
0x00014dba cmp r0, 0x2f |
| if (r0 == 0x2f) {
0x00014dbc beq 0x14eac | goto label_29;
| }
| label_11:
0x00014dbe add.w r2, fp, -1 | r2 = fp + -1;
0x00014dc2 adds r1, r7, r2 | r1 = r7 + r2;
0x00014dc4 b 0x14dd0 |
| while (r2 != 0) {
0x00014dc6 ldrb r0, [r1, -0x1]! | r0 = *((r1 -= 0x1));
0x00014dca cmp r0, 0x2f |
| if (r0 == 0x2f) {
0x00014dcc beq 0x14dd6 | goto label_30;
| }
0x00014dce subs r2, 1 | r2--;
0x00014dd0 mov fp, r2 |
0x00014dd2 cmp r2, 0 |
0x00014dd4 bne 0x14dc6 |
| }
| label_30:
0x00014dd6 ldr r3, [sp] | r3 = *(sp);
0x00014dd8 cmp r2, r3 |
| if (r2 >= r3) {
0x00014dda bhs 0x14d0c | goto label_6;
| }
0x00014ddc tst.w sb, 2 |
| if ((sb & 2) == 0) {
0x00014de0 beq 0x14e60 | goto label_31;
| }
| label_12:
0x00014de2 movw r0, 0x4e37 | r0 = 0x4e37;
0x00014de6 b 0x14d30 | goto label_1;
| label_19:
0x00014de8 mov fp, sl |
0x00014dea str.w sl, [sp] | __asm ("str.w sl, [sp]");
0x00014dee b 0x14cd0 | goto label_7;
| label_17:
0x00014df0 mov r2, r4 | r2 = r4;
0x00014df2 mov r1, sb | r1 = sb;
0x00014df4 add r0, sp, 8 | r0 += var_8h;
0x00014df6 blx 0xb09c | fcn_0000b09c ();
0x00014dfa ldr.w r8, [sp, 8] | r8 = var_8h;
0x00014dfe cmp r0, 0 |
| if (r0 == 0) {
0x00014e00 beq.w 0x14c4a | goto label_0;
| }
0x00014e04 blx 0xb12c | r0 = fcn_0000b12c ();
0x00014e08 ldr r0, [r0] | r0 = *(r0);
0x00014e0a b 0x14d30 | goto label_1;
| label_20:
0x00014e0c ldrb r0, [r4, 1] | r0 = *((r4 + 1));
0x00014e0e adds r6, r4, 1 | r6 = r4 + 1;
0x00014e10 cmp r0, 0 |
| if (r0 != 0) {
0x00014e12 bne.w 0x14cd4 | goto label_8;
| }
0x00014e16 b 0x14d12 | goto label_9;
| label_21:
0x00014e18 cmp r0, 0x2e |
| if (r0 != 0x2e) {
0x00014e1a bne.w 0x14cfc | goto label_5;
| }
0x00014e1e b 0x14d0e | goto label_10;
| label_27:
0x00014e20 ldrb r2, [r7] | r2 = *(r7);
0x00014e22 cmp r2, 0x2e |
| if (r2 != 0x2e) {
0x00014e24 bne 0x14dbe | goto label_11;
| }
0x00014e26 ldrb r0, [r7, 1] | r0 = *((r7 + 1));
0x00014e28 cmp r0, 0x2e |
| if (r0 != 0x2e) {
0x00014e2a bne 0x14dbe | goto label_11;
| }
0x00014e2c ldrb r2, [r7, 2] | r2 = *((r7 + 2));
0x00014e2e cmp r2, 0x2f |
| if (r2 != 0x2f) {
0x00014e30 bne 0x14dbe | goto label_11;
| }
| label_14:
0x00014e32 tst.w sb, 2 |
| if ((sb & 2) != 0) {
0x00014e36 bne 0x14de2 | goto label_12;
| }
0x00014e38 cmp r1, 0 |
0x00014e3a ldr r1, [pc, 0xa8] |
0x00014e3c ite eq |
| if (r1 != 0) {
0x00014e3e moveq r2, 2 | r2 = 2;
| }
| if (r1 == 0) {
0x00014e40 movne r2, 3 | r2 = 3;
| }
0x00014e42 add.w r0, r7, fp | r0 = r7 + fp;
0x00014e46 add r1, pc | r1 = 0x29d30;
0x00014e48 blx 0xa78c | fcn_0000a78c ();
0x00014e4c ldrb r2, [r4] | r2 = *(r4);
0x00014e4e ldr r3, [sp] | r3 = *(sp);
0x00014e50 cmp r2, 0 |
0x00014e52 ite eq |
| if (r2 != 0) {
0x00014e54 moveq r2, 2 | r2 = 2;
| }
| if (r2 == 0) {
0x00014e56 movne r2, 3 | r2 = 3;
| }
0x00014e58 add fp, r2 |
0x00014e5a cmp fp, r3 |
| if (fp >= r3) {
0x00014e5c bhs.w 0x14d0c | goto label_6;
| }
| label_31:
0x00014e60 ldrb r1, [r5, 1] | r1 = *((r5 + 1));
0x00014e62 str.w fp, [sp] | __asm ("str.w fp, [sp]");
0x00014e66 b 0x14d0e | goto label_10;
| label_23:
0x00014e68 mov r2, sl | r2 = sl;
0x00014e6a mov r1, r7 | r1 = r7;
0x00014e6c mov r0, r8 | r0 = r8;
0x00014e6e blx 0xaf78 | r0 = fcn_0000af78 ();
0x00014e72 cmp r0, 0 |
| if (r0 != 0) {
0x00014e74 bne 0x14de2 | goto label_12;
| }
0x00014e76 add r8, sl | r8 += sl;
0x00014e78 ldrb r3, [r8, -0x1] | r3 = *((r8 - 0x1));
0x00014e7c cmp r3, 0x2f |
| if (r3 == 0x2f) {
0x00014e7e beq.w 0x14d2a | goto label_13;
| }
0x00014e82 ldrb.w r3, [r7, sl] | r3 = *((r7 + sl));
0x00014e86 cmp r3, 0x2f |
0x00014e88 it ne |
| if (r3 == 0x2f) {
0x00014e8a cmpne r3, 0 | __asm ("cmpne r3, 0");
| goto label_32;
| }
| if (r3 == 0x2f) {
| label_32:
0x00014e8c beq.w 0x14d2a | goto label_13;
| }
0x00014e90 b 0x14de2 | goto label_12;
| label_26:
0x00014e92 ldrb r2, [r7] | r2 = *(r7);
0x00014e94 cmp r2, 0x2f |
| if (r2 != 0x2f) {
0x00014e96 bne 0x14dbe | goto label_11;
| }
0x00014e98 ands r3, sb, 2 | r3 = sb & 2;
| if (r3 != sb) {
0x00014e9c bne 0x14de2 | goto label_12;
| }
0x00014e9e str r3, [sp] | *(sp) = r3;
0x00014ea0 b 0x14d0e | goto label_10;
| label_25:
0x00014ea2 mov sl, r8 | sl = r8;
0x00014ea4 ldr.w r8, [pc, 0x40] |
0x00014ea8 add r8, pc | r8 = 0x29d94;
0x00014eaa b 0x14c52 | goto label_2;
| label_29:
0x00014eac ldrb r0, [r2, 1]! | r0 = *((r2 += 1));
0x00014eb0 cmp r0, 0x2e |
| if (r0 != 0x2e) {
0x00014eb2 bne 0x14dbe | goto label_11;
| }
0x00014eb4 ldrb r0, [r2, 1]! | r0 = *((r2 += 1));
0x00014eb8 cmp r0, 0x2e |
| if (r0 != 0x2e) {
0x00014eba bne 0x14dbe | goto label_11;
| }
0x00014ebc ldrb r2, [r2, 1] | r2 = *((r2 + 1));
0x00014ebe cmp r2, 0x2f |
| if (r2 != 0x2f) {
0x00014ec0 bne.w 0x14dbe | goto label_11;
| }
0x00014ec4 b 0x14e32 | goto label_14;
| label_28:
0x00014ec6 mov.w fp, 2 |
0x00014eca b 0x14dbe | goto label_11;
| label_24:
0x00014ecc blx 0xabc8 | pthread_attr_getdetachstate ();
0x00014ed0 ldc2 p0, c0, [r2, -0] | __asm ("ldc2 p0, c0, [r2, -0]");
0x00014ed4 lsls r0, r4, 0x1a | r0 = r4 << 0x1a;
0x00014ed6 movs r0, r0 |
0x00014ed8 invalid |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0xf148 */
| #include <stdint.h>
|
; (fcn) sym.apr_fnmatch () | void apr_fnmatch (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_10h;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_24h;
| int16_t var_28h;
| int16_t var_2ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x0000f148 svcmi 0xf0e92d | __asm ("svcmi 0xf0e92d");
0x0000f14c mov r7, r2 | r7 = r2;
0x0000f14e ldr.w r2, [pc, 0x43c] |
0x0000f152 sub sp, 0x34 |
0x0000f154 mov r6, r0 | r6 = r0;
0x0000f156 and sb, r7, 1 | sb = r7 & 1;
0x0000f15a ldr.w r3, [pc, 0x434] | r3 = *(0xf592);
0x0000f15e and fp, r7, 2 |
0x0000f162 ldrb r4, [r0] | r4 = *(r0);
0x0000f164 add r2, pc | r2 = 0x1e6f6;
0x0000f166 str r0, [sp, 0x1c] | var_1ch = r0;
0x0000f168 str r1, [sp, 0x18] | var_18h = r1;
0x0000f16a ldr r3, [r2, r3] |
0x0000f16c cmp r4, 0x2a |
0x0000f16e ldr r3, [r3] | r3 = *(0x1e6f6);
0x0000f170 str r3, [sp, 0x2c] | var_2ch = r3;
0x0000f172 mov.w r3, 0 | r3 = 0;
| if (r4 == 0x2a) {
0x0000f176 beq.w 0xf504 | goto label_26;
| }
0x0000f17a mov.w r8, 0 | r8 = 0;
0x0000f17e mov sl, r8 | sl = r8;
0x0000f180 str.w r8, [sp] | __asm ("str.w r8, [sp]");
| label_15:
0x0000f184 ldr r5, [sp, 0x18] | r5 = var_18h;
0x0000f186 ldrb r0, [r5] | r0 = *(r5);
| if (r4 == 0) {
0x0000f188 cbnz r4, 0xf1ae |
| label_22:
0x0000f18a subs r0, 0 |
0x0000f18c it ne |
| if (r0 == 0) {
0x0000f18e movne r0, 1 | r0 = 1;
| }
| label_1:
0x0000f190 ldr.w r2, [pc, 0x400] | r2 = *(0x0000f594);
0x0000f194 ldr r3, [pc, 0x3f8] | r3 = *(0xf590);
0x0000f196 add r2, pc | r2 += pc;
0x0000f198 ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x0000f19a ldr r2, [r3] | r2 = *(0xf590);
0x0000f19c ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x0000f19e eors r2, r3 | r2 ^= r3;
0x0000f1a0 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000f1a4 bne.w 0xf588 | goto label_27;
| }
0x0000f1a8 add sp, 0x34 |
0x0000f1aa pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
0x0000f1ae cmp r0, 0 |
| if (r0 == 0) {
0x0000f1b0 beq.w 0xf31a | goto label_10;
| }
0x0000f1b4 and r3, r7, 4 | r3 = r7 & 4;
0x0000f1b8 str r3, [sp, 4] | var_4h = r3;
| label_21:
0x0000f1ba eor r1, sb, 1 | r1 = sb ^ 1;
0x0000f1be eor ip, sb, 1 |
0x0000f1c2 cmp.w fp, 0 |
0x0000f1c6 ite eq |
| if (fp != 0) {
0x0000f1c8 moveq r1, 0 | r1 = 0;
| }
| if (fp == 0) {
0x0000f1ca andne r1, r1, 1 | r1 &= 1;
| }
0x0000f1ce cmp r4, 0x5c |
0x0000f1d0 ite ne |
| if (r4 == 0x5c) {
0x0000f1d2 movne r1, 0 | r1 = 0;
| }
| if (r4 != 0x5c) {
0x0000f1d4 andeq r1, r1, 1 | r1 &= 1;
| }
0x0000f1d8 cmp r1, 0 |
| if (r1 != 0) {
0x0000f1da bne.w 0xf366 | goto label_28;
| }
0x0000f1de ldr r6, [sp, 0x1c] | r6 = var_1ch;
0x0000f1e0 ldrb r4, [r6] | r4 = *(r6);
0x0000f1e2 cmp.w fp, 0 |
| if (fp != 0) {
0x0000f1e6 bne.w 0xf378 | goto label_29;
| }
0x0000f1ea ldr r3, [sp, 4] | r3 = var_4h;
0x0000f1ec ldr r5, [sp, 0x18] | r5 = var_18h;
0x0000f1ee cmp r3, 0 |
| if (r3 == 0) {
0x0000f1f0 beq.w 0xf31e | goto label_30;
| }
| label_8:
0x0000f1f4 ldrb r1, [r5] | r1 = *(r5);
0x0000f1f6 cmp r1, 0x2e |
| if (r1 == 0x2e) {
0x0000f1f8 beq.w 0xf444 | goto label_31;
| }
| label_14:
0x0000f1fc cmp.w fp, 0 |
| if (fp == 0) {
0x0000f200 beq.w 0xf31e | goto label_30;
| }
| label_9:
0x0000f204 movs r1, 0x2f | r1 = 0x2f;
0x0000f206 mov r0, r5 | r0 = r5;
0x0000f208 blx 0xa0f4 | r0 = strcasecmp (r0, r1);
0x0000f20c mov r3, r0 | r3 = r0;
0x0000f20e cmp r0, 0 |
| if (r0 == 0) {
0x0000f210 beq.w 0xf31e | goto label_30;
| }
| label_2:
0x0000f214 cmp r4, 0 |
| if (r4 == 0) {
0x0000f216 beq.w 0xf522 | goto label_32;
| }
0x0000f21a add r2, sp, 0x24 | r2 += var_24h;
0x0000f21c mov r1, r3 | r1 = r3;
0x0000f21e str r2, [sp, 8] | var_8h = r2;
0x0000f220 add r2, sp, 0x28 | r2 += var_28h;
0x0000f222 mov r3, sl | r3 = sl;
0x0000f224 str r2, [sp, 0xc] | var_ch = r2;
0x0000f226 mov sl, r1 | sl = r1;
0x0000f228 mov r2, r6 | r2 = r6;
0x0000f22a mov r6, fp | r6 = fp;
0x0000f22c mov fp, sb |
| label_19:
0x0000f22e cmp sl, r5 |
| if (sl <= r5) {
0x0000f230 blo.w 0xf428 | goto label_33;
| }
| if (sl == r5) {
0x0000f234 beq.w 0xf422 | goto label_34;
| }
| if (r6 != 0) {
0x0000f238 cbz r6, 0xf254 |
0x0000f23a cmp r4, 0x2f |
| if (r4 == 0x2f) {
0x0000f23c beq.w 0xf578 | goto label_35;
| }
0x0000f240 eor r1, fp, 1 | r1 = fp ^ 1;
0x0000f244 cmp r4, 0x5c |
0x0000f246 ite ne |
| if (r4 == 0x5c) {
0x0000f248 movne r1, 0 | r1 = 0;
| }
| if (r4 != 0x5c) {
0x0000f24a andeq r1, r1, 1 | r1 &= 1;
| }
0x0000f24e cmp r1, 0 |
| if (r1 != 0) {
0x0000f250 bne.w 0xf470 | goto label_36;
| }
| }
| label_13:
0x0000f254 ldr r2, [sp, 0x1c] | r2 = var_1ch;
0x0000f256 ldrb r4, [r2] | r4 = *(r2);
0x0000f258 cmp r4, 0x2a |
0x0000f25a it ne |
| if (r4 != 0x2a) {
0x0000f25c cmpne r4, 0x3f | __asm ("cmpne r4, 0x3f");
| }
0x0000f25e ittet eq |
| if (r4 != 0x2a) {
0x0000f260 moveq r0, 0 | r0 = 0;
| }
| if (r4 != 0x2a) {
0x0000f262 moveq lr, 1 | lr = 1;
| }
| if (r4 != 0x2a) {
0x0000f266 moveq lr, 0 | lr = 0;
| }
| if (r4 == 0x2a) {
0x0000f26a mov r1, r0 | r1 = r0;
| }
| if (r4 == 0x2a) {
0x0000f26c beq 0xf284 | goto label_0;
| }
0x0000f26e b 0xf4ae | goto label_37;
| do {
0x0000f270 cmp r5, sl |
| if (r5 >= sl) {
0x0000f272 bhs 0xf31a | goto label_10;
| }
0x0000f274 ldrb r4, [r2, 1]! | r4 = *((r2 += 1));
0x0000f278 adds r5, 1 | r5++;
0x0000f27a mov r0, lr | r0 = lr;
0x0000f27c cmp r4, 0x3f |
0x0000f27e it ne |
| if (r4 != 0x3f) {
0x0000f280 cmpne r4, 0x2a | __asm ("cmpne r4, 0x2a");
| }
| if (r4 != 0x3f) {
0x0000f282 bne 0xf296 | goto label_38;
| }
| label_0:
0x0000f284 cmp r4, 0x2a |
0x0000f286 bne 0xf270 |
| } while (r4 != 0x2a);
0x0000f288 ldrb r4, [r2, 1]! | r4 = *((r2 += 1));
0x0000f28c movs r1, 1 | r1 = 1;
0x0000f28e cmp r4, 0x3f |
0x0000f290 it ne |
| if (r4 == 0x3f) {
0x0000f292 cmpne r4, 0x2a | __asm ("cmpne r4, 0x2a");
| goto label_39;
| }
| if (r4 == 0x3f) {
| label_39:
0x0000f294 beq 0xf284 | goto label_0;
| }
| if (r0 != 0) {
| label_38:
0x0000f296 cbz r0, 0xf29a |
0x0000f298 str r5, [sp, 0x18] | var_18h = r5;
| }
0x0000f29a ldr r5, [sp, 0x18] | r5 = var_18h;
0x0000f29c str r2, [sp, 0x1c] | var_1ch = r2;
0x0000f29e cmp r1, 0 |
| if (r1 == 0) {
0x0000f2a0 beq 0xf3a0 | goto label_16;
| }
0x0000f2a2 ldr r3, [sp, 0x18] | r3 = var_18h;
0x0000f2a4 str r2, [sp, 0x28] | var_28h = r2;
0x0000f2a6 str r3, [sp] | *(sp) = r3;
0x0000f2a8 cmp r4, 0 |
| if (r4 == 0) {
0x0000f2aa beq.w 0xf570 | goto label_40;
| }
0x0000f2ae ldr r5, [pc, 0x2e8] |
0x0000f2b0 eor sb, fp, 1 | sb = fp ^ 1;
0x0000f2b4 mov r3, sb | r3 = sb;
0x0000f2b6 strd r2, r1, [sp, 0x10] | __asm ("strd r2, r1, [var_10h]");
0x0000f2ba mov r1, r2 | r1 = r2;
0x0000f2bc mov r0, r4 | r0 = r4;
0x0000f2be add r5, pc | r5 = 0x1e85c;
0x0000f2c0 mov sb, r7 | sb = r7;
0x0000f2c2 mov r2, r5 | r2 = r5;
0x0000f2c4 mov r7, r4 | r7 = r4;
0x0000f2c6 mov r5, fp | r5 = fp;
0x0000f2c8 mov.w r8, 0 | r8 = 0;
0x0000f2cc mov r4, r3 | r4 = r3;
0x0000f2ce mov fp, r2 |
| do {
| if (r6 == 0) {
0x0000f2d0 cbz r6, 0xf328 | goto label_41;
| }
0x0000f2d2 cmp r0, 0x2f |
| if (r0 == 0x2f) {
0x0000f2d4 beq 0xf2f2 | goto label_7;
| }
| if (r5 == 0) {
0x0000f2d6 cbnz r5, 0xf2dc |
0x0000f2d8 cmp r0, 0x5c |
| if (r0 == 0x5c) {
0x0000f2da beq 0xf35e | goto label_42;
| }
| }
0x0000f2dc cmp r0, 0x2a |
| if (r0 == 0x2a) {
0x0000f2de beq 0xf38a | goto label_43;
| }
| label_3:
0x0000f2e0 cmp r0, 0x5b |
| if (r0 == 0x5b) {
0x0000f2e2 beq 0xf34a | goto label_44;
| }
0x0000f2e4 ldrb r0, [r1, 1]! | r0 = *((r1 += 1));
0x0000f2e8 str r1, [sp, 0x28] | var_28h = r1;
| label_5:
0x0000f2ea add.w r8, r8, 1 | r8++;
0x0000f2ee cmp r0, 0 |
0x0000f2f0 bne 0xf2d0 |
| } while (r0 != 0);
| label_7:
0x0000f2f2 mov r4, r7 | r4 = r7;
0x0000f2f4 ldr r2, [sp, 0x10] | r2 = var_10h;
0x0000f2f6 mov r7, sb | r7 = sb;
0x0000f2f8 mov fp, r5 |
0x0000f2fa b 0xf30c | goto label_45;
| label_4:
0x0000f2fc ldr r2, [sp, 0x10] | r2 = var_10h;
0x0000f2fe mov r4, r7 | r4 = r7;
0x0000f300 mov fp, r5 |
0x0000f302 mov r7, sb | r7 = sb;
0x0000f304 add.w r8, r8, 1 | r8++;
0x0000f308 adds r1, 1 | r1++;
0x0000f30a str r1, [sp, 0x28] | var_28h = r1;
| label_45:
0x0000f30c ldr r3, [sp] | r3 = *(sp);
0x0000f30e mov r5, r8 | r5 = r8;
0x0000f310 add.w r1, r3, r8 | r1 = r3 + r8;
| label_23:
0x0000f314 cmp sl, r1 |
| if (sl >= r1) {
0x0000f316 bhs.w 0xf4a6 | goto label_46;
| }
| label_10:
0x0000f31a movs r0, 1 | r0 = 1;
0x0000f31c b 0xf190 | goto label_1;
| label_30:
0x0000f31e mov r0, r5 | r0 = r5;
0x0000f320 blx 0xa6d8 | r0 = fcn_0000a6d8 ();
0x0000f324 adds r3, r5, r0 | r3 = r5 + r0;
0x0000f326 b 0xf214 | goto label_2;
| label_41:
0x0000f328 cmp r0, 0x2a |
| if (r0 == 0x2a) {
0x0000f32a beq 0xf38a | goto label_43;
| }
0x0000f32c cmp r0, 0x5c |
0x0000f32e ite ne |
| if (r0 == 0x5c) {
0x0000f330 movne r3, 0 | r3 = 0;
| }
| if (r0 != 0x5c) {
0x0000f332 andeq r3, r4, 1 | r3 = r4 & 1;
| }
0x0000f336 cmp r3, 0 |
| if (r3 == 0) {
0x0000f338 beq 0xf2e0 | goto label_3;
| }
0x0000f33a ldrb r0, [r1, 1] | r0 = *((r1 + 1));
| label_6:
0x0000f33c cmp r0, 0 |
| if (r0 == 0) {
0x0000f33e beq 0xf2fc | goto label_4;
| }
0x0000f340 adds r3, r1, 2 | r3 = r1 + 2;
0x0000f342 ldrb r0, [r1, 2] | r0 = *((r1 + 2));
0x0000f344 str r3, [sp, 0x28] | var_28h = r3;
0x0000f346 mov r1, r3 | r1 = r3;
0x0000f348 b 0xf2ea | goto label_5;
| label_44:
0x0000f34a ldrd r1, r0, [sp, 8] | __asm ("ldrd r1, r0, [var_8h]");
0x0000f34e mov r2, sb | r2 = sb;
0x0000f350 str.w fp, [sp, 0x24] | __asm ("str.w fp, [var_24h]");
0x0000f354 bl 0xee9c | fcn_0000ee9c (r0, r1, r2);
0x0000f358 ldr r1, [sp, 0x28] | r1 = var_28h;
0x0000f35a ldrb r0, [r1] | r0 = *(r1);
0x0000f35c b 0xf2ea | goto label_5;
| label_42:
0x0000f35e ldrb r0, [r1, 1] | r0 = *((r1 + 1));
0x0000f360 cmp r0, 0x2f |
| if (r0 != 0x2f) {
0x0000f362 bne 0xf33c | goto label_6;
| }
0x0000f364 b 0xf2f2 | goto label_7;
| label_28:
0x0000f366 ldrb r1, [r6, 1] | r1 = *((r6 + 1));
0x0000f368 cmp r1, 0x2f |
0x0000f36a itt eq |
| if (r1 != 0x2f) {
0x0000f36c addeq r6, 1 | r6++;
| }
| if (r1 != 0x2f) {
0x0000f36e streq r6, [sp, 0x1c] | var_1ch = r6;
| }
| if (r1 == 0x2f) {
0x0000f370 beq.w 0xf4b2 | goto label_47;
| }
0x0000f374 ldr r6, [sp, 0x1c] | r6 = var_1ch;
0x0000f376 ldrb r4, [r6] | r4 = *(r6);
| label_29:
0x0000f378 cmp r4, 0x2f |
| if (r4 == 0x2f) {
0x0000f37a beq.w 0xf4b2 | goto label_47;
| }
0x0000f37e ldr r3, [sp, 4] | r3 = var_4h;
0x0000f380 ldr r5, [sp, 0x18] | r5 = var_18h;
0x0000f382 cmp r3, 0 |
| if (r3 != 0) {
0x0000f384 bne.w 0xf1f4 | goto label_8;
| }
0x0000f388 b 0xf204 | goto label_9;
| label_43:
0x0000f38a mov fp, r5 |
0x0000f38c ldr r5, [sp] | r5 = *(sp);
0x0000f38e mov r4, r7 | r4 = r7;
0x0000f390 ldrd r2, r1, [sp, 0x10] | __asm ("ldrd r2, r1, [var_10h]");
0x0000f394 mov r7, sb | r7 = sb;
0x0000f396 add.w r0, r5, r8 | r0 = r5 + r8;
0x0000f39a cmp sl, r0 |
| if (sl <= r0) {
0x0000f39c blo 0xf31a | goto label_10;
| }
0x0000f39e mov r3, r2 | r3 = r2;
| label_16:
0x0000f3a0 eor r0, fp, 1 | r0 = fp ^ 1;
0x0000f3a4 mov ip, r5 |
0x0000f3a6 add.w sb, sp, 0x18 | sb += var_18h;
0x0000f3aa mov r5, r1 | r5 = r1;
0x0000f3ac str r0, [sp, 0x10] | var_10h = r0;
0x0000f3ae mov r1, ip | r1 = ip;
0x0000f3b0 mov r0, r4 | r0 = r4;
0x0000f3b2 str.w fp, [sp, 0x14] | __asm ("str.w fp, [var_14h]");
0x0000f3b6 mov r4, sb | r4 = sb;
0x0000f3b8 mov fp, r3 |
0x0000f3ba mov r3, r2 | r3 = r2;
| label_11:
0x0000f3bc add.w sb, sp, 0x1c | sb += var_1ch;
| label_12:
0x0000f3c0 cmp r0, 0 |
| if (r0 == 0) {
0x0000f3c2 beq.w 0xf516 | goto label_48;
| }
0x0000f3c6 cmp r0, 0x2a |
0x0000f3c8 it ne |
| if (r0 != 0x2a) {
0x0000f3ca cmpne sl, r1 | __asm ("cmpne sl, r1");
| }
| if (r0 < 0x2a) {
0x0000f3cc bls.w 0xf4e0 | goto label_49;
| }
| if (r6 != 0) {
0x0000f3d0 cbz r6, 0xf3ee |
0x0000f3d2 ldrb r2, [r1] | r2 = *(r1);
0x0000f3d4 cmp r0, 0x2f |
0x0000f3d6 it ne |
| if (r0 != 0x2f) {
0x0000f3d8 cmpne r2, 0x2f | __asm ("cmpne r2, 0x2f");
| }
| if (r0 == 0x2f) {
0x0000f3da beq.w 0xf4e0 | goto label_49;
| }
0x0000f3de ldr r2, [sp, 0x10] | r2 = var_10h;
0x0000f3e0 cmp r0, 0x5c |
0x0000f3e2 ite ne |
| if (r0 == 0x5c) {
0x0000f3e4 movne r2, 0 | r2 = 0;
| }
| if (r0 != 0x5c) {
0x0000f3e6 andeq r2, r2, 1 | r2 &= 1;
| }
0x0000f3ea cmp r2, 0 |
| if (r2 != 0) {
0x0000f3ec bne 0xf4cc | goto label_50;
| }
| }
| label_18:
0x0000f3ee mov r2, r7 | r2 = r7;
0x0000f3f0 mov r1, r4 | r1 = r4;
0x0000f3f2 mov r0, sb | r0 = sb;
0x0000f3f4 bl 0xee9c | r0 = fcn_0000ee9c (r0, r1, r2);
| if (r0 == 0) {
0x0000f3f8 cbz r0, 0xf41a | goto label_51;
| }
0x0000f3fa cmp r5, 0 |
| if (r5 == 0) {
0x0000f3fc beq 0xf31a | goto label_10;
| }
0x0000f3fe ldr r1, [sp] | r1 = *(sp);
0x0000f400 adds r1, 1 | r1++;
0x0000f402 add.w r2, r1, r8 | r2 = r1 + r8;
0x0000f406 str r1, [sp, 0x18] | var_18h = r1;
0x0000f408 cmp sl, r2 |
| if (sl <= r2) {
0x0000f40a blo 0xf31a | goto label_10;
| }
0x0000f40c ldrb.w r0, [fp] | r0 = *(fp);
0x0000f410 mov r3, fp | r3 = fp;
0x0000f412 str.w fp, [sp, 0x1c] | __asm ("str.w fp, [var_1ch]");
0x0000f416 str r1, [sp] | *(sp) = r1;
0x0000f418 b 0xf3bc | goto label_11;
| label_51:
0x0000f41a ldrd r1, r3, [sp, 0x18] | __asm ("ldrd r1, r3, [var_1ch]");
0x0000f41e ldrb r0, [r3] | r0 = *(r3);
0x0000f420 b 0xf3c0 | goto label_12;
| label_34:
0x0000f422 cmp r4, 0x2a |
| if (r4 == 0x2a) {
0x0000f424 beq.w 0xf254 | goto label_13;
| }
| label_33:
0x0000f428 ldrb r1, [r5] | r1 = *(r5);
0x0000f42a mov sb, fp | sb = fp;
0x0000f42c mov sl, r3 | sl = r3;
0x0000f42e mov fp, r6 |
0x0000f430 mov r6, r2 | r6 = r2;
0x0000f432 cmp r1, 0 |
| if (r1 != 0) {
0x0000f434 bne 0xf528 | goto label_25;
| }
0x0000f436 cmp.w fp, 0 |
| if (fp == 0) {
0x0000f43a beq.w 0xf31a | goto label_10;
| }
| label_20:
0x0000f43e cmp r4, 0x2f |
| if (r4 != 0x2f) {
0x0000f440 bne 0xf488 | goto label_52;
| }
0x0000f442 b 0xf4a0 | goto label_24;
| label_31:
0x0000f444 cmp r4, 0x2e |
0x0000f446 it eq |
| if (r4 != 0x2e) {
0x0000f448 addeq r6, 1 | r6++;
| }
| if (r4 == 0x2e) {
0x0000f44a beq 0xf466 | goto label_53;
| }
| label_17:
0x0000f44c cmp r4, 0x5c |
0x0000f44e ite ne |
| if (r4 == 0x5c) {
0x0000f450 movne r1, 0 | r1 = 0;
| }
| if (r4 != 0x5c) {
0x0000f452 andeq r1, ip, 1 | r1 = ip & 1;
| }
0x0000f456 cmp r1, 0 |
| if (r1 == 0) {
0x0000f458 beq.w 0xf31a | goto label_10;
| }
0x0000f45c ldrb r1, [r6, 1] | r1 = *((r6 + 1));
0x0000f45e cmp r1, 0x2e |
| if (r1 != 0x2e) {
0x0000f460 bne.w 0xf31a | goto label_10;
| }
0x0000f464 adds r6, 2 | r6 += 2;
| label_53:
0x0000f466 adds r5, 1 | r5++;
0x0000f468 strd r5, r6, [sp, 0x18] | __asm ("strd r5, r6, [var_1ch]");
0x0000f46c ldrb r4, [r6] | r4 = *(r6);
0x0000f46e b 0xf1fc | goto label_14;
| label_36:
0x0000f470 ldrb r1, [r2, 1] | r1 = *((r2 + 1));
0x0000f472 cmp r1, 0x2f |
| if (r1 != 0x2f) {
0x0000f474 bne.w 0xf254 | goto label_13;
| }
0x0000f478 ldrb r1, [r5] | r1 = *(r5);
0x0000f47a mov sb, fp | sb = fp;
0x0000f47c mov sl, r3 | sl = r3;
0x0000f47e mov fp, r6 |
0x0000f480 movs r4, 0x5c | r4 = 0x5c;
0x0000f482 mov r6, r2 | r6 = r2;
0x0000f484 cmp r1, 0 |
| if (r1 != 0) {
0x0000f486 bne 0xf528 | goto label_25;
| }
| label_52:
0x0000f488 cmp r4, 0x5c |
0x0000f48a ite eq |
| if (r4 != 0x5c) {
0x0000f48c moveq r1, sb | r1 = sb;
| }
| if (r4 == 0x5c) {
0x0000f48e orrne r1, sb, 1 | r1 = sb | 1;
| }
0x0000f492 cmp r1, 0 |
| if (r1 != 0) {
0x0000f494 bne.w 0xf31a | goto label_10;
| }
0x0000f498 ldrb r1, [r6, 1] | r1 = *((r6 + 1));
0x0000f49a cmp r1, 0x2f |
| if (r1 != 0x2f) {
0x0000f49c bne.w 0xf31a | goto label_10;
| }
| label_24:
0x0000f4a0 ldr r6, [sp, 0x1c] | r6 = var_1ch;
0x0000f4a2 ldrb r4, [r6] | r4 = *(r6);
0x0000f4a4 b 0xf184 | goto label_15;
| label_46:
0x0000f4a6 mov r3, r2 | r3 = r2;
0x0000f4a8 sub.w r5, sl, r5 | r5 = sl - r5;
0x0000f4ac str r5, [sp, 0x18] | var_18h = r5;
| label_37:
0x0000f4ae movs r1, 0 | r1 = 0;
0x0000f4b0 b 0xf3a0 | goto label_16;
| label_47:
0x0000f4b2 cmp r0, 0x2f |
| if (r0 == 0x2f) {
0x0000f4b4 beq 0xf4ee | goto label_54;
| }
0x0000f4b6 ldr r3, [sp, 4] | r3 = var_4h;
0x0000f4b8 movs r4, 0x2f | r4 = 0x2f;
0x0000f4ba ldr r5, [sp, 0x18] | r5 = var_18h;
0x0000f4bc cmp r3, 0 |
| if (r3 == 0) {
0x0000f4be beq.w 0xf204 | goto label_9;
| }
0x0000f4c2 ldrb r1, [r5] | r1 = *(r5);
0x0000f4c4 cmp r1, 0x2e |
| if (r1 != 0x2e) {
0x0000f4c6 bne.w 0xf1fc | goto label_14;
| }
0x0000f4ca b 0xf44c | goto label_17;
| label_50:
0x0000f4cc ldrb r2, [r3, 1] | r2 = *((r3 + 1));
0x0000f4ce cmp r2, 0x2f |
| if (r2 != 0x2f) {
0x0000f4d0 bne 0xf3ee | goto label_18;
| }
0x0000f4d2 mov r2, r3 | r2 = r3;
0x0000f4d4 mov r5, r1 | r5 = r1;
0x0000f4d6 mov r3, fp | r3 = fp;
0x0000f4d8 movs r4, 0x5c | r4 = 0x5c;
0x0000f4da ldr.w fp, [sp, 0x14] | fp = var_14h;
0x0000f4de b 0xf22e | goto label_19;
| label_49:
0x0000f4e0 mov r2, r3 | r2 = r3;
0x0000f4e2 mov r5, r1 | r5 = r1;
0x0000f4e4 mov r3, fp | r3 = fp;
0x0000f4e6 mov r4, r0 | r4 = r0;
0x0000f4e8 ldr.w fp, [sp, 0x14] | fp = var_14h;
0x0000f4ec b 0xf22e | goto label_19;
| label_54:
0x0000f4ee ldr r3, [sp, 4] | r3 = var_4h;
0x0000f4f0 adds r1, r6, 1 | r1 = r6 + 1;
0x0000f4f2 adds r5, 1 | r5++;
0x0000f4f4 ldrb r4, [r6, 1] | r4 = *((r6 + 1));
0x0000f4f6 str r5, [sp, 0x18] | var_18h = r5;
0x0000f4f8 mov r6, r1 | r6 = r1;
0x0000f4fa str r1, [sp, 0x1c] | var_1ch = r1;
0x0000f4fc cmp r3, 0 |
| if (r3 != 0) {
0x0000f4fe bne.w 0xf1f4 | goto label_8;
| }
0x0000f502 b 0xf204 | goto label_9;
| label_26:
0x0000f504 and r3, r7, 4 | r3 = r7 & 4;
0x0000f508 mov r5, r1 | r5 = r1;
0x0000f50a mov r8, r3 | r8 = r3;
0x0000f50c str r3, [sp, 4] | var_4h = r3;
| if (r3 != 0) {
0x0000f50e cbnz r3, 0xf550 | goto label_55;
| }
0x0000f510 mov sl, r3 | sl = r3;
0x0000f512 str r3, [sp] | *(sp) = r3;
0x0000f514 b 0xf1fc | goto label_14;
| label_48:
0x0000f516 ldr.w sb, [sp, 0x14] | sb = var_14h;
0x0000f51a mov sl, fp | sl = fp;
0x0000f51c mov r5, r1 | r5 = r1;
0x0000f51e mov fp, r6 |
0x0000f520 mov r6, r3 | r6 = r3;
| label_32:
0x0000f522 ldrb r1, [r5] | r1 = *(r5);
0x0000f524 movs r4, 0 | r4 = 0;
| if (r1 == 0) {
0x0000f526 cbz r1, 0xf564 | goto label_56;
| }
| label_25:
0x0000f528 clz r0, fp | r0 &= fp;
0x0000f52c lsrs r0, r0, 5 | r0 >>= 5;
0x0000f52e cmp r1, 0x2f |
0x0000f530 it ne |
| if (r1 == 0x2f) {
0x0000f532 orrne r0, r0, 1 | r0 |= 1;
| }
0x0000f536 cmp r0, 0 |
| if (r0 != 0) {
0x0000f538 bne.w 0xf31a | goto label_10;
| }
0x0000f53c cmp r4, 0 |
| if (r4 != 0) {
0x0000f53e bne.w 0xf43e | goto label_20;
| }
0x0000f542 ldr r6, [sp, 0x1c] | r6 = var_1ch;
0x0000f544 movs r0, 0x2f | r0 = 0x2f;
0x0000f546 ldrb r4, [r6] | r4 = *(r6);
0x0000f548 cmp r4, 0 |
| if (r4 != 0) {
0x0000f54a bne.w 0xf1ba | goto label_21;
| }
0x0000f54e b 0xf18a | goto label_22;
| label_55:
0x0000f550 ldrb r2, [r1] | r2 = *(r1);
0x0000f552 cmp r2, 0x2e |
| if (r2 == 0x2e) {
0x0000f554 beq.w 0xf31a | goto label_10;
| }
0x0000f558 mov.w r8, 0 | r8 = 0;
0x0000f55c mov sl, r8 | sl = r8;
0x0000f55e str.w r8, [sp] | __asm ("str.w r8, [sp]");
0x0000f562 b 0xf1fc | goto label_14;
| label_56:
0x0000f564 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x0000f566 ldrb r0, [r3] | r0 = *(r3);
0x0000f568 cmp r0, 0 |
| if (r0 != 0) {
0x0000f56a bne.w 0xf31a | goto label_10;
| }
0x0000f56e b 0xf18a | goto label_22;
| label_40:
0x0000f570 ldr r1, [sp] | r1 = *(sp);
0x0000f572 mov r5, r4 | r5 = r4;
0x0000f574 mov r8, r4 | r8 = r4;
0x0000f576 b 0xf314 | goto label_23;
| label_35:
0x0000f578 ldrb r1, [r5] | r1 = *(r5);
0x0000f57a mov sb, fp | sb = fp;
0x0000f57c mov sl, r3 | sl = r3;
0x0000f57e mov fp, r6 |
0x0000f580 mov r6, r2 | r6 = r2;
0x0000f582 cmp r1, 0 |
| if (r1 == 0) {
0x0000f584 beq 0xf4a0 | goto label_24;
| }
0x0000f586 b 0xf528 | goto label_25;
| label_27:
0x0000f588 blx 0xabc8 | pthread_attr_getdetachstate ();
0x0000f58c ldrsb r0, [r1, r7] | r0 = *((r1 + r7));
0x0000f58e movs r1, r0 | r1 = r0;
0x0000f590 lsls r0, r4, 0x1a | r0 = r4 << 0x1a;
0x0000f592 movs r0, r0 |
0x0000f594 ldrsb r6, [r2, r6] | r6 = *((r2 + r6));
0x0000f596 movs r1, r0 | r1 = r0;
0x0000f598 movs r6, 0xc6 | r6 = 0xc6;
0x0000f59a movs r1, r0 | r1 = r0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0xf59c */
| #include <stdint.h>
|
; (fcn) sym.apr_fnmatch_test () | uint32_t apr_fnmatch_test (int16_t arg1) {
| r0 = arg1;
0x0000f59c movwlt r7, 0x2802 | __asm ("movwlt r7, 0x2802");
0x0000f5a0 movs r1, 0 | r1 = 0;
| do {
| label_2:
0x0000f5a2 cmp r2, 0x2a |
0x0000f5a4 sub.w r3, r2, 0x3f | r3 = r2 - 0x3f;
0x0000f5a8 uxtb r2, r3 | r2 = (int8_t) r3;
| if (r2 == 0x2a) {
0x0000f5aa beq 0xf5ea | goto label_3;
| }
0x0000f5ac cmp r2, 0x1e |
| if (r2 <= 0x1e) {
0x0000f5ae bhi 0xf5da |
0x0000f5b0 cmp r3, 0x1e |
| if (r3 > 0x1e) {
0x0000f5b2 bhi 0xf5da | goto label_0;
| }
| /* switch table (31 cases) at 0xf5b8 */
0x0000f5b4 tbb [pc, r3] | __asm ("tbb [0x0000f5bc]");
0x0000f5d8 adds r1, 1 | r1++;
| }
| label_0:
0x0000f5da ldrb r2, [r0, 1] | r2 = *((r0 + 1));
0x0000f5dc adds r0, 1 | r0++;
0x0000f5de cmp r2, 0 |
0x0000f5e0 bne 0xf5a2 |
| } while (r2 != 0);
| label_1:
0x0000f5e2 mov r0, r2 | r0 = r2;
0x0000f5e4 bx lr | return r0;
0x0000f5e6 cmp r1, 0 |
| if (r1 == 0) {
0x0000f5e8 beq 0xf5da | goto label_0;
| }
| label_3:
0x0000f5ea movs r0, 1 | r0 = 1;
0x0000f5ec bx lr | return r0;
0x0000f5ee ldrb r2, [r0, 1] | r2 = *((r0 + 1));
0x0000f5f0 adds r0, 1 | r0++;
0x0000f5f2 cmp r2, 0 |
| if (r2 == 0) {
0x0000f5f4 beq 0xf5e2 | goto label_1;
| }
0x0000f5f6 ldrb r2, [r0, 1] | r2 = *((r0 + 1));
0x0000f5f8 adds r0, 1 | r0++;
0x0000f5fa cmp r2, 0 |
| if (r2 != 0) {
0x0000f5fc bne 0xf5a2 | goto label_2;
| }
0x0000f5fe b 0xf5e2 | 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/lib/libapr-1.so.0.7.2 @ 0x197f8 */
| #include <stdint.h>
|
; (fcn) sym.apr_getopt_init () | void apr_getopt_init (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x000197f8 push.w {r4, r5, r6, r7, r8, lr} |
0x000197fc mov r8, r1 | r8 = r1;
0x000197fe mov r5, r0 | r5 = r0;
0x00019800 movs r1, 0x30 | r1 = 0x30;
0x00019802 mov r0, r8 | r0 = r8;
0x00019804 mov r4, r2 | r4 = r2;
0x00019806 ldr r7, [pc, 0x70] |
0x00019808 mov r6, r3 | r6 = r3;
0x0001980a blx 0xa974 | fcn_0000a974 ();
0x0001980e ldr r3, [pc, 0x6c] | r3 = *(0x1987e);
0x00019810 mov r2, r0 | r2 = r0;
0x00019812 str r0, [r5] | *(r5) = r0;
0x00019814 add r7, pc | r7 = 0x33092;
0x00019816 str.w r8, [r0] | __asm ("str.w r8, [r0]");
0x0001981a mov r0, r8 | r0 = r8;
0x0001981c mov.w r8, 0 | r8 = 0;
0x00019820 str.w r8, [r2, 0x14] | __asm ("str.w r8, [r2, 0x14]");
0x00019824 ldr r3, [r7, r3] | r3 = *(0x33092);
0x00019826 str r3, [r2, 4] | *((r2 + 4)) = r3;
0x00019828 ldr r3, [pc, 0x54] | r3 = *(0x19880);
0x0001982a ldr r3, [r7, r3] |
0x0001982c ldr r3, [r3] | r3 = *(0x33092);
0x0001982e str r3, [r2, 8] | *((r2 + 8)) = r3;
0x00019830 ldr r2, [r5] | r2 = *(r5);
0x00019832 ldr r3, [pc, 0x50] |
0x00019834 str r4, [r2, 0x18] | *((r2 + 0x18)) = r4;
0x00019836 adds r4, 1 | r4++;
0x00019838 lsls r4, r4, 2 | r4 <<= 2;
0x0001983a add r3, pc | r3 = 0x330c4;
0x0001983c str r3, [r2, 0x20] | *((r2 + 0x20)) = r3;
0x0001983e mov r1, r4 | r1 = r4;
0x00019840 subs r4, 4 | r4 -= 4;
0x00019842 blx 0xa974 | fcn_0000a974 ();
0x00019846 mov r1, r6 | r1 = r6;
0x00019848 mov r2, r4 | r2 = r4;
0x0001984a mov r6, r0 | r6 = r0;
0x0001984c blx 0xa78c | fcn_0000a78c ();
0x00019850 ldr r3, [r5] | r3 = *(r5);
0x00019852 movs r2, 1 | r2 = 1;
0x00019854 vldr d16, [pc, 0x18] | __asm ("vldr d16, [0x00019874]");
0x00019858 mov r0, r8 | r0 = r8;
0x0001985a add.w r1, r3, 0x24 | r1 = r3 + 0x24;
0x0001985e str r6, [r3, 0x1c] | *((r3 + 0x1c)) = r6;
0x00019860 str.w r8, [r6, r4] | __asm ("str.w r8, [r6, r4]");
0x00019864 str r2, [r3, 0xc] | *((r3 + 0xc)) = r2;
0x00019866 vst1.32 {d16}, [r1] | __asm ("vst1.32 {d16}, [r1]");
0x0001986a str r2, [r3, 0x2c] | *((r3 + 0x2c)) = r2;
0x0001986c 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/lib/libapr-1.so.0.7.2 @ 0x19888 */
| #include <stdint.h>
|
; (fcn) sym.apr_getopt () | void apr_getopt (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
| if (? >= ?) {
0x00019888 ldrbmi lr, [r0, sp, lsr 18]! |
| }
0x0001988c mov r4, r0 | r4 = r0;
0x0001988e ldr r0, [r0, 0x14] | r0 = *((r0 + 0x14));
0x00019890 mov sb, r1 | sb = r1;
0x00019892 mov r6, r2 | r6 = r2;
0x00019894 mov r8, r3 | r8 = r3;
| if (r0 == 0) {
0x00019896 cbnz r0, 0x1989e |
0x00019898 ldr r5, [r4, 0x20] | r5 = *((r4 + 0x20));
0x0001989a ldrb r3, [r5] | r3 = *(r5);
| if (r3 != 0) {
0x0001989c cbnz r3, 0x198ca | goto label_3;
| }
| }
0x0001989e movs r3, 0 | r3 = 0;
0x000198a0 ldr r2, [r4, 0xc] | r2 = *((r4 + 0xc));
0x000198a2 str r3, [r4, 0x14] | *((r4 + 0x14)) = r3;
0x000198a4 ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
0x000198a6 cmp r2, r3 |
| if (r2 < r3) {
0x000198a8 bge 0x19904 |
0x000198aa ldr r3, [r4, 0x1c] | r3 = *((r4 + 0x1c));
0x000198ac ldr.w r5, [r3, r2, lsl 2] | offset_0 = r2 << 2;
| r5 = *((r3 + offset_0));
0x000198b0 str r5, [r4, 0x20] | *((r4 + 0x20)) = r5;
0x000198b2 ldrb r3, [r5] | r3 = *(r5);
0x000198b4 cmp r3, 0x2d |
| if (r3 != 0x2d) {
0x000198b6 bne 0x19904 | goto label_4;
| }
0x000198b8 ldrb r3, [r5, 1] | r3 = *((r5 + 1));
| if (r3 != 0) {
0x000198ba cbz r3, 0x198ca |
0x000198bc adds r3, r5, 1 | r3 = r5 + 1;
0x000198be str r3, [r4, 0x20] | *((r4 + 0x20)) = r3;
0x000198c0 ldrb r1, [r5, 1] | r1 = *((r5 + 1));
0x000198c2 cmp r1, 0x2d |
0x000198c4 it ne |
| if (r1 == 0x2d) {
0x000198c6 movne r5, r3 | r5 = r3;
| }
| if (r1 == 0x2d) {
0x000198c8 beq 0x199b8 | goto label_5;
| }
| }
| label_3:
0x000198ca add.w sl, r5, 1 | sl = r5 + 1;
0x000198ce str.w sl, [r4, 0x20] | __asm ("str.w sl, [r4, 0x20]");
0x000198d2 ldrb r7, [r5] | r7 = *(r5);
0x000198d4 cmp r7, 0x3a |
0x000198d6 str r7, [r4, 0x10] | *((r4 + 0x10)) = r7;
| if (r7 == 0x3a) {
0x000198d8 beq 0x19928 | goto label_6;
| }
0x000198da mov r1, r7 | r1 = r7;
0x000198dc mov r0, sb | r0 = sb;
0x000198de blx 0xa0f4 | r0 = strcasecmp (r0, r1);
| if (r0 == 0) {
0x000198e2 cbz r0, 0x1991a | goto label_7;
| }
0x000198e4 ldrb r3, [r0, 1] | r3 = *((r0 + 1));
0x000198e6 cmp r3, 0x3a |
| if (r3 == 0x3a) {
0x000198e8 beq 0x19964 | goto label_8;
| }
0x000198ea movs r3, 0 | r3 = 0;
0x000198ec str.w r3, [r8] | __asm ("str.w r3, [r8]");
0x000198f0 ldr r3, [r4, 0x20] | r3 = *((r4 + 0x20));
0x000198f2 ldrb r3, [r3] | r3 = *(r3);
| if (r3 == 0) {
0x000198f4 cbnz r3, 0x198fc |
0x000198f6 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x000198f8 adds r3, 1 | r3++;
0x000198fa str r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
| }
| label_1:
0x000198fc movs r0, 0 | r0 = 0;
0x000198fe strb r7, [r6] | *(r6) = r7;
0x00019900 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| }
| label_4:
0x00019904 ldr r3, [pc, 0xd0] |
0x00019906 movw r0, 0x117e |
0x0001990a ldrb r7, [r4, 0x10] | r7 = *((r4 + 0x10));
0x0001990c movt r0, 1 | r0 = 0x1117e;
0x00019910 add r3, pc | r3 = 0x332ec;
0x00019912 str r3, [r4, 0x20] | *((r4 + 0x20)) = r3;
| do {
| label_2:
0x00019914 strb r7, [r6] | *(r6) = r7;
0x00019916 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_7:
0x0001991a cmp r7, 0x2d |
0x0001991c itt eq |
| if (r7 == 0x2d) {
0x0001991e movweq r0, 0x117e |
| }
| if (r7 == 0x2d) {
0x00019922 movt r0, 1 | r0 = 0x1117e;
| }
0x00019926 beq 0x19914 |
| } while (r7 == 0x2d);
| label_6:
0x00019928 ldrb r3, [r5, 1] | r3 = *((r5 + 1));
| if (r3 == 0) {
0x0001992a cbnz r3, 0x19932 |
0x0001992c ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x0001992e adds r3, 1 | r3++;
0x00019930 str r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
| }
0x00019932 ldr r5, [r4, 4] | r5 = *((r4 + 4));
| if (r5 == 0) {
0x00019934 cbz r5, 0x19956 | goto label_0;
| }
0x00019936 ldrb.w r3, [sb] | r3 = *(sb);
0x0001993a cmp r3, 0x3a |
| if (r3 == 0x3a) {
0x0001993c beq 0x19956 | goto label_0;
| }
0x0001993e ldr r3, [r4, 0x1c] | r3 = *((r4 + 0x1c));
0x00019940 ldr r7, [r4, 8] | r7 = *((r4 + 8));
0x00019942 ldr r0, [r3] | r0 = *(r3);
0x00019944 blx 0xa308 | fcn_0000a308 ();
0x00019948 ldr r1, [pc, 0x90] |
0x0001994a mov r2, r0 | r2 = r0;
0x0001994c ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x0001994e mov r0, r7 | r0 = r7;
0x00019950 add r1, pc | r1 = 0x33330;
0x00019952 blx r5 | uint32_t (*r5)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00019954 ldrb r7, [r4, 0x10] | r7 = *((r4 + 0x10));
| do {
| label_0:
0x00019956 movw r0, 0x117c |
0x0001995a strb r7, [r6] | *(r6) = r7;
0x0001995c movt r0, 1 | r0 = 0x1117c;
0x00019960 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_8:
0x00019964 ldrb r2, [r5, 1] | r2 = *((r5 + 1));
0x00019966 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
| if (r2 != 0) {
0x00019968 cbnz r2, 0x199a8 | goto label_9;
| }
0x0001996a ldr r2, [r4, 0x18] | r2 = *((r4 + 0x18));
0x0001996c adds r3, 1 | r3++;
0x0001996e str r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
0x00019970 cmp r2, r3 |
| if (r2 > r3) {
0x00019972 bgt 0x199a2 | goto label_10;
| }
0x00019974 ldr r3, [pc, 0x68] |
0x00019976 add r3, pc | r3 = 0x3335a;
0x00019978 str r3, [r4, 0x20] | *((r4 + 0x20)) = r3;
0x0001997a ldrb.w r3, [sb] | r3 = *(sb);
0x0001997e cmp r3, 0x3a |
| if (r3 == 0x3a) {
0x00019980 beq 0x199ce | goto label_11;
| }
0x00019982 ldr r5, [r4, 4] | r5 = *((r4 + 4));
0x00019984 cmp r5, 0 |
0x00019986 beq 0x19956 |
| } while (r5 == 0);
0x00019988 ldr r3, [r4, 0x1c] | r3 = *((r4 + 0x1c));
0x0001998a ldr r7, [r4, 8] | r7 = *((r4 + 8));
0x0001998c ldr r0, [r3] | r0 = *(r3);
0x0001998e blx 0xa308 | fcn_0000a308 ();
0x00019992 ldr r1, [pc, 0x50] |
0x00019994 mov r2, r0 | r2 = r0;
0x00019996 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00019998 mov r0, r7 | r0 = r7;
0x0001999a add r1, pc | r1 = 0x33384;
0x0001999c blx r5 | uint32_t (*r5)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x0001999e ldrb r7, [r4, 0x10] | r7 = *((r4 + 0x10));
0x000199a0 b 0x19956 | goto label_0;
| label_10:
0x000199a2 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x000199a4 ldr.w sl, [r2, r3, lsl 2] | offset_1 = r3 << 2;
| sl = *((r2 + offset_1));
| label_9:
0x000199a8 ldr r2, [pc, 0x3c] |
0x000199aa adds r3, 1 | r3++;
0x000199ac str.w sl, [r8] | __asm ("str.w sl, [r8]");
0x000199b0 str r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
0x000199b2 add r2, pc | r2 = 0x3339e;
0x000199b4 str r2, [r4, 0x20] | *((r4 + 0x20)) = r2;
0x000199b6 b 0x198fc | goto label_1;
| label_5:
0x000199b8 ldr r3, [pc, 0x30] |
0x000199ba adds r2, 1 | r2++;
0x000199bc movw r0, 0x117e |
0x000199c0 ldrb r7, [r4, 0x10] | r7 = *((r4 + 0x10));
0x000199c2 movt r0, 1 | r0 = 0x1117e;
0x000199c6 str r2, [r4, 0xc] | *((r4 + 0xc)) = r2;
0x000199c8 add r3, pc | r3 = 0x333b8;
0x000199ca str r3, [r4, 0x20] | *((r4 + 0x20)) = r3;
0x000199cc b 0x19914 | goto label_2;
| label_11:
0x000199ce movw r0, 0x117d |
0x000199d2 movt r0, 1 | r0 = 0x1117d;
0x000199d6 b 0x19914 | 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/lib/libapr-1.so.0.7.2 @ 0x199f0 */
| #include <stdint.h>
|
; (fcn) sym.apr_getopt_long () | void apr_getopt_long (int16_t arg_0h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h;
| int16_t var_8h;
| int16_t var_ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x000199f0 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000199f4 mov r6, r0 | r6 = r0;
0x000199f6 ldr r0, [r0, 0x14] | r0 = *(arg_0hx14);
0x000199f8 sub sp, 0x14 |
0x000199fa mov r4, r1 | r4 = r1;
0x000199fc mov r8, r2 | r8 = r2;
0x000199fe mov sb, r3 | sb = r3;
0x00019a00 cmp r0, 0 |
| if (r0 == 0) {
0x00019a02 beq 0x19a86 | goto label_6;
| }
0x00019a04 ldr r3, [pc, 0x23c] |
0x00019a06 movs r1, 1 | r1 = 1;
0x00019a08 str r1, [r6, 0xc] | *((r6 + 0xc)) = r1;
0x00019a0a add r3, pc | r3 = 0x33652;
0x00019a0c str r3, [r6, 0x20] | *((r6 + 0x20)) = r3;
0x00019a0e movs r3, 0 | r3 = 0;
0x00019a10 str r3, [r6, 0x14] | *((r6 + 0x14)) = r3;
| label_5:
0x00019a12 ldr r3, [r6, 0x24] | r3 = *((r6 + 0x24));
0x00019a14 ldr r0, [r6, 0x18] | r0 = *((r6 + 0x18));
| if (r3 == 0) {
0x00019a16 cbz r3, 0x19a40 | goto label_7;
| }
0x00019a18 cmp r1, r0 |
0x00019a1a it ge |
| if (r1 < r0) {
0x00019a1c strge r1, [r6, 0x2c] | *((r6 + 0x2c)) = r1;
| }
| if (r1 >= r0) {
0x00019a1e bge 0x19b0a | goto label_8;
| }
0x00019a20 ldr r3, [r6, 0x1c] | r3 = *((r6 + 0x1c));
0x00019a22 add.w r3, r3, r1, lsl 2 | r3 += (r1 << 2);
0x00019a26 b 0x19a30 |
| while (r2 != 0x2d) {
0x00019a28 adds r1, 1 | r1++;
0x00019a2a cmp r1, r0 |
0x00019a2c str r1, [r6, 0xc] | *((r6 + 0xc)) = r1;
| if (r1 == r0) {
0x00019a2e beq 0x19b30 | goto label_9;
| }
0x00019a30 ldr r2, [r3], 4 | r2 = *(r3);
| r3 += 4;
0x00019a34 ldrb r2, [r2] | r2 = *(r2);
0x00019a36 cmp r2, 0x2d |
0x00019a38 bne 0x19a28 |
| }
0x00019a3a mov r3, r1 | r3 = r1;
0x00019a3c ldr r1, [r6, 0xc] | r1 = *((r6 + 0xc));
| label_0:
0x00019a3e str r3, [r6, 0x2c] | *((r6 + 0x2c)) = r3;
| label_7:
0x00019a40 cmp r1, r0 |
| if (r1 >= r0) {
0x00019a42 bge 0x19b0a | goto label_8;
| }
0x00019a44 ldr.w fp, [r6, 0x1c] | fp = *((r6 + 0x1c));
0x00019a48 ldr.w r5, [fp, r1, lsl 2] | offset_0 = r1 << 2;
| r5 = *((fp + offset_0));
0x00019a4c ldrb r3, [r5] | r3 = *(r5);
0x00019a4e cmp r3, 0x2d |
| if (r3 != 0x2d) {
0x00019a50 bne 0x19b0a | goto label_8;
| }
0x00019a52 adds r1, 1 | r1++;
0x00019a54 add.w sl, r5, 1 | sl = r5 + 1;
0x00019a58 str r1, [r6, 0xc] | *((r6 + 0xc)) = r1;
0x00019a5a ldrb r7, [r5, 1] | r7 = *((r5 + 1));
0x00019a5c cmp r7, 0x2d |
| if (r7 == 0x2d) {
0x00019a5e beq 0x19b00 | goto label_10;
| }
| if (r7 == 0) {
0x00019a60 cbnz r7, 0x19a94 |
0x00019a62 ldr r4, [r6, 4] | r4 = *((r6 + 4));
0x00019a64 cmp r4, 0 |
| if (r4 == 0) {
0x00019a66 beq 0x19af6 | goto label_1;
| }
0x00019a68 ldr.w r0, [fp] | r0 = *(fp);
0x00019a6c ldr r5, [r6, 8] | r5 = *((r6 + 8));
0x00019a6e blx 0xa308 | fcn_0000a308 ();
0x00019a72 ldr r3, [pc, 0x1d4] |
0x00019a74 mov r2, r0 | r2 = r0;
0x00019a76 ldr r1, [pc, 0x1d4] |
0x00019a78 mov r0, r5 | r0 = r5;
0x00019a7a str.w sl, [sp] | __asm ("str.w sl, [sp]");
0x00019a7e add r3, pc | r3 = 0x336cc;
0x00019a80 add r1, pc | r1 = 0x336d2;
0x00019a82 blx r4 | uint32_t (*r4)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00019a84 b 0x19af6 | goto label_1;
| label_6:
0x00019a86 ldr.w sl, [r6, 0x20] | sl = *((r6 + 0x20));
0x00019a8a ldrb.w r7, [sl] | r7 = *(sl);
0x00019a8e cmp r7, 0 |
| if (r7 == 0) {
0x00019a90 beq.w 0x19c40 | goto label_11;
| }
| }
0x00019a94 ldr r5, [r4, 4] | r5 = *((r4 + 4));
0x00019a96 mov r1, r4 | r1 = r4;
| if (r5 != 0) {
0x00019a98 cbnz r5, 0x19aa2 | goto label_12;
| }
0x00019a9a b 0x19ad8 | goto label_13;
| do {
0x00019a9c ldr r5, [r1, 0x14] | r5 = *((r1 + 0x14));
0x00019a9e adds r1, 0x10 | r1 += 0x10;
| if (r5 == 0) {
0x00019aa0 cbz r5, 0x19ad8 | goto label_13;
| }
| label_12:
0x00019aa2 cmp r5, r7 |
0x00019aa4 bne 0x19a9c |
| } while (r5 != r7);
0x00019aa6 str.w r5, [r8] | __asm ("str.w r5, [r8]");
0x00019aaa add.w r2, sl, 1 | r2 = sl + 1;
0x00019aae ldr r3, [r1, 8] | r3 = *((r1 + 8));
0x00019ab0 cmp r3, 0 |
| if (r3 != 0) {
0x00019ab2 beq 0x19b1c |
0x00019ab4 ldrb.w r3, [sl, 1] | r3 = *((sl + 1));
| if (r3 == 0) {
0x00019ab8 cbnz r3, 0x19acc |
0x00019aba ldr r3, [r6, 0xc] | r3 = *((r6 + 0xc));
0x00019abc ldr r2, [r6, 0x18] | r2 = *((r6 + 0x18));
0x00019abe cmp r3, r2 |
| if (r3 >= r2) {
0x00019ac0 bge 0x19b90 | goto label_14;
| }
0x00019ac2 ldr r2, [r6, 0x1c] | r2 = *((r6 + 0x1c));
0x00019ac4 adds r1, r3, 1 | r1 = r3 + 1;
0x00019ac6 str r1, [r6, 0xc] | *((r6 + 0xc)) = r1;
0x00019ac8 ldr.w r2, [r2, r3, lsl 2] | offset_1 = r3 << 2;
| r2 = *((r2 + offset_1));
| }
0x00019acc ldr r3, [pc, 0x180] |
0x00019ace str.w r2, [sb] | __asm ("str.w r2, [sb]");
0x00019ad2 add r3, pc | r3 = 0x33726;
0x00019ad4 str r3, [r6, 0x20] | *((r6 + 0x20)) = r3;
0x00019ad6 b 0x19b22 | goto label_3;
| label_13:
0x00019ad8 ldr r4, [r6, 4] | r4 = *((r6 + 4));
| if (r4 != 0) {
0x00019ada cbz r4, 0x19af6 |
0x00019adc ldr r3, [r6, 0x1c] | r3 = *((r6 + 0x1c));
0x00019ade ldr r5, [r6, 8] | r5 = *((r6 + 8));
0x00019ae0 ldr r0, [r3] | r0 = *(r3);
0x00019ae2 blx 0xa308 | fcn_0000a308 ();
0x00019ae6 ldr r3, [pc, 0x16c] |
0x00019ae8 mov r2, r0 | r2 = r0;
0x00019aea ldr r1, [pc, 0x16c] |
0x00019aec mov r0, r5 | r0 = r5;
0x00019aee str r7, [sp] | *(sp) = r7;
0x00019af0 add r3, pc | r3 = 0x3374a;
0x00019af2 add r1, pc | r1 = 0x33750;
0x00019af4 blx r4 | uint32_t (*r4)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
| }
| label_1:
0x00019af6 movw r0, 0x117c |
0x00019afa movt r0, 1 | r0 = 0x1117c;
0x00019afe b 0x19b16 | goto label_2;
| label_10:
0x00019b00 ldrb r3, [r5, 2] | r3 = *((r5 + 2));
| if (r3 != 0) {
0x00019b02 cbnz r3, 0x19b34 | goto label_15;
| }
0x00019b04 mov r0, r6 | r0 = r6;
0x00019b06 bl 0x19740 | fcn_00019740 (r0);
| label_8:
0x00019b0a ldr r3, [r6, 0x28] | r3 = *((r6 + 0x28));
0x00019b0c movw r0, 0x117e |
0x00019b10 movt r0, 1 | r0 = 0x1117e;
0x00019b14 str r3, [r6, 0xc] | *((r6 + 0xc)) = r3;
| label_2:
0x00019b16 add sp, 0x14 |
0x00019b18 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
0x00019b1c str.w r3, [sb] | __asm ("str.w r3, [sb]");
0x00019b20 str r2, [r6, 0x20] | *((r6 + 0x20)) = r2;
| label_3:
0x00019b22 mov r0, r6 | r0 = r6;
0x00019b24 bl 0x19740 | fcn_00019740 (r0);
0x00019b28 movs r0, 0 | r0 = 0;
0x00019b2a add sp, 0x14 |
0x00019b2c pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_9:
0x00019b30 mov r3, r1 | r3 = r1;
0x00019b32 b 0x19a3e | goto label_0;
| label_15:
0x00019b34 ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x00019b36 adds r2, r5, 2 | r2 = r5 + 2;
0x00019b38 str r2, [sp, 0xc] | var_ch = r2;
| if (r3 == 0) {
0x00019b3a cbz r3, 0x19b6e | goto label_16;
| }
| do {
0x00019b3c ldr r7, [r4] | r7 = *(r4);
0x00019b3e str r3, [sp, 8] | var_8h = r3;
0x00019b40 mov r0, r7 | r0 = r7;
| if (r7 != 0) {
0x00019b42 cbz r7, 0x19b66 |
0x00019b44 blx 0xa6d8 | fcn_0000a6d8 ();
0x00019b48 mov r1, r7 | r1 = r7;
0x00019b4a ldr r7, [sp, 0xc] | r7 = var_ch;
0x00019b4c mov sl, r0 | sl = r0;
0x00019b4e mov r2, r0 | r2 = r0;
0x00019b50 mov r0, r7 | r0 = r7;
0x00019b52 blx 0xaf78 | r0 = fcn_0000af78 ();
| if (r0 != 0) {
0x00019b56 cbnz r0, 0x19b66 | goto label_17;
| }
0x00019b58 ldrb.w r1, [r7, sl] | r1 = *((r7 + sl));
0x00019b5c ldr r3, [sp, 8] | r3 = var_8h;
0x00019b5e cmp r1, 0x3d |
0x00019b60 it ne |
| if (r1 != 0x3d) {
0x00019b62 cmpne r1, 0 | __asm ("cmpne r1, 0");
| }
| if (r1 == 0x3d) {
0x00019b64 beq 0x19bb8 | goto label_18;
| }
| }
| label_17:
0x00019b66 ldr r3, [r4, 0x14] | r3 = *((r4 + 0x14));
0x00019b68 adds r4, 0x10 | r4 += 0x10;
0x00019b6a cmp r3, 0 |
0x00019b6c bne 0x19b3c |
| } while (r3 != 0);
| label_16:
0x00019b6e ldr r4, [r6, 4] | r4 = *((r6 + 4));
0x00019b70 cmp r4, 0 |
| if (r4 == 0) {
0x00019b72 beq 0x19af6 | goto label_1;
| }
0x00019b74 ldr.w r0, [fp] | r0 = *(fp);
0x00019b78 ldr r6, [r6, 8] | r6 = *((r6 + 8));
0x00019b7a blx 0xa308 | fcn_0000a308 ();
0x00019b7e ldr r3, [pc, 0xdc] |
0x00019b80 mov r2, r0 | r2 = r0;
0x00019b82 ldr r1, [pc, 0xdc] |
0x00019b84 mov r0, r6 | r0 = r6;
0x00019b86 str r5, [sp] | *(sp) = r5;
0x00019b88 add r3, pc | r3 = 0x337ea;
0x00019b8a add r1, pc | r1 = 0x337f0;
0x00019b8c blx r4 | uint32_t (*r4)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00019b8e b 0x19af6 | goto label_1;
| label_14:
0x00019b90 ldr r4, [r6, 4] | r4 = *((r6 + 4));
| if (r4 != 0) {
0x00019b92 cbz r4, 0x19bae |
0x00019b94 ldr r3, [r6, 0x1c] | r3 = *((r6 + 0x1c));
0x00019b96 ldr r6, [r6, 8] | r6 = *((r6 + 8));
0x00019b98 ldr r0, [r3] | r0 = *(r3);
0x00019b9a blx 0xa308 | fcn_0000a308 ();
0x00019b9e ldr r3, [pc, 0xc4] |
0x00019ba0 mov r2, r0 | r2 = r0;
0x00019ba2 ldr r1, [pc, 0xc4] |
0x00019ba4 mov r0, r6 | r0 = r6;
0x00019ba6 str r5, [sp] | *(sp) = r5;
0x00019ba8 add r3, pc | r3 = 0x33812;
0x00019baa add r1, pc | r1 = 0x33818;
0x00019bac blx r4 | uint32_t (*r4)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
| }
| label_4:
0x00019bae movw r0, 0x117d |
0x00019bb2 movt r0, 1 | r0 = 0x1117d;
0x00019bb6 b 0x19b16 | goto label_2;
| label_18:
0x00019bb8 str.w r3, [r8] | __asm ("str.w r3, [r8]");
0x00019bbc ldr r3, [r4, 8] | r3 = *((r4 + 8));
| if (r3 != 0) {
0x00019bbe cbz r3, 0x19be0 |
0x00019bc0 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00019bc2 ldrb.w r3, [r3, sl] | r3 = *((r3 + sl));
0x00019bc6 cmp r3, 0x3d |
| if (r3 == 0x3d) {
0x00019bc8 beq 0x19c32 | goto label_19;
| }
0x00019bca ldr r3, [r6, 0xc] | r3 = *((r6 + 0xc));
0x00019bcc ldr r2, [r6, 0x18] | r2 = *((r6 + 0x18));
0x00019bce cmp r3, r2 |
| if (r3 >= r2) {
0x00019bd0 bge 0x19c10 | goto label_20;
| }
0x00019bd2 ldr.w r2, [fp, r3, lsl 2] | offset_2 = r3 << 2;
| r2 = *((fp + offset_2));
0x00019bd6 adds r3, 1 | r3++;
0x00019bd8 str r3, [r6, 0xc] | *((r6 + 0xc)) = r3;
0x00019bda str.w r2, [sb] | __asm ("str.w r2, [sb]");
0x00019bde b 0x19b22 | goto label_3;
| }
0x00019be0 str.w r3, [sb] | __asm ("str.w r3, [sb]");
0x00019be4 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00019be6 ldrb.w r3, [r3, sl] | r3 = *((r3 + sl));
0x00019bea cmp r3, 0x3d |
| if (r3 != 0x3d) {
0x00019bec bne 0x19b22 | goto label_3;
| }
0x00019bee ldr r4, [r6, 4] | r4 = *((r6 + 4));
0x00019bf0 cmp r4, 0 |
| if (r4 == 0) {
0x00019bf2 beq 0x19bae | goto label_4;
| }
0x00019bf4 ldr.w r0, [fp] | r0 = *(fp);
0x00019bf8 ldr r6, [r6, 8] | r6 = *((r6 + 8));
0x00019bfa blx 0xa308 | fcn_0000a308 ();
0x00019bfe ldr r3, [pc, 0x6c] |
0x00019c00 mov r2, r0 | r2 = r0;
0x00019c02 ldr r1, [pc, 0x6c] |
0x00019c04 mov r0, r6 | r0 = r6;
0x00019c06 str r5, [sp] | *(sp) = r5;
0x00019c08 add r3, pc | r3 = 0x3387a;
0x00019c0a add r1, pc | r1 = 0x33880;
0x00019c0c blx r4 | uint32_t (*r4)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00019c0e b 0x19bae | goto label_4;
| label_20:
0x00019c10 ldr r4, [r6, 4] | r4 = *((r6 + 4));
0x00019c12 cmp r4, 0 |
| if (r4 == 0) {
0x00019c14 beq 0x19bae | goto label_4;
| }
0x00019c16 ldr.w r0, [fp] | r0 = *(fp);
0x00019c1a ldr r6, [r6, 8] | r6 = *((r6 + 8));
0x00019c1c blx 0xa308 | fcn_0000a308 ();
0x00019c20 ldr r3, [pc, 0x50] |
0x00019c22 mov r2, r0 | r2 = r0;
0x00019c24 ldr r1, [pc, 0x50] |
0x00019c26 mov r0, r6 | r0 = r6;
0x00019c28 str r5, [sp] | *(sp) = r5;
0x00019c2a add r3, pc | r3 = 0x338a2;
0x00019c2c add r1, pc | r1 = 0x338a8;
0x00019c2e blx r4 | uint32_t (*r4)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00019c30 b 0x19bae | goto label_4;
| label_19:
0x00019c32 ldr r2, [sp, 0xc] | r2 = var_ch;
0x00019c34 add.w r3, sl, 1 | r3 = sl + 1;
0x00019c38 add r2, r3 | r2 += r3;
0x00019c3a str.w r2, [sb] | __asm ("str.w r2, [sb]");
0x00019c3e b 0x19b22 | goto label_3;
| label_11:
0x00019c40 ldr r1, [r6, 0xc] | r1 = *((r6 + 0xc));
0x00019c42 b 0x19a12 | goto label_5;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x16e34 */
| #include <stdint.h>
|
; (fcn) sym.apr_global_mutex_timedlock () | void apr_global_mutex_timedlock (int16_t arg1, uint32_t arg3, int16_t arg4) {
| r0 = arg1;
| r2 = arg3;
| r3 = arg4;
0x00016e34 push.w {r3, r4, r5, r6, r7, r8, sb, lr} |
0x00016e38 mov r7, r0 | r7 = r0;
0x00016e3a ldr r0, [r0, 8] | r0 = *((r0 + 8));
0x00016e3c mov r6, r2 | r6 = r2;
0x00016e3e mov r5, r3 | r5 = r3;
| if (r0 != 0) {
0x00016e40 cbz r0, 0x16e52 |
0x00016e42 cmp r2, 1 |
0x00016e44 sbcs r1, r3, 0 | __asm ("sbcs r1, r3, 0");
| if (r2 >= 1) {
0x00016e48 bge 0x16e6e | goto label_3;
| }
0x00016e4a blx 0xa498 | r0 = fcn_0000a498 ();
0x00016e4e mov r4, r0 | r4 = r0;
| if (r0 != 0) {
0x00016e50 cbnz r0, 0x16e68 | goto label_1;
| }
| }
| label_0:
0x00016e52 ldr r0, [r7, 4] | r0 = *((r7 + 4));
0x00016e54 mov r2, r6 | r2 = r6;
0x00016e56 mov r3, r5 | r3 = r5;
0x00016e58 blx 0xa04c | r0 = sched_yield ();
0x00016e5c mov r4, r0 | r4 = r0;
| if (r0 == 0) {
0x00016e5e cbz r0, 0x16e68 | goto label_1;
| }
| label_2:
0x00016e60 ldr r0, [r7, 8] | r0 = *((r7 + 8));
| if (r0 == 0) {
0x00016e62 cbz r0, 0x16e68 | goto label_1;
| }
0x00016e64 blx 0xa090 | fcn_0000a090 ();
| do {
| label_1:
0x00016e68 mov r0, r4 | r0 = r4;
0x00016e6a pop.w {r3, r4, r5, r6, r7, r8, sb, pc} |
| label_3:
0x00016e6e blx 0xa834 | fcn_0000a834 ();
0x00016e72 mov r2, r6 | r2 = r6;
0x00016e74 mov r8, r0 | r8 = r0;
0x00016e76 mov r3, r5 | r3 = r5;
0x00016e78 ldr r0, [r7, 8] | r0 = *((r7 + 8));
0x00016e7a mov sb, r1 | sb = r1;
0x00016e7c blx 0xa498 | r0 = fcn_0000a498 ();
0x00016e80 mov r4, r0 | r4 = r0;
0x00016e82 cmp r0, 0 |
0x00016e84 bne 0x16e68 |
| } while (r0 != 0);
0x00016e86 adds.w r8, r8, r6 | r8 += r6;
0x00016e8a adc.w sb, sb, r5 | __asm ("adc.w sb, sb, r5");
0x00016e8e orrs.w r3, r8, sb | r3 = r8 | sb;
| if (r3 == r8) {
0x00016e92 beq 0x16e52 | goto label_0;
| }
0x00016e94 blx 0xa834 | r0 = fcn_0000a834 ();
0x00016e98 subs.w r6, r8, r0 | r6 = r8 - r0;
0x00016e9c ldr r0, [r7, 4] | r0 = *((r7 + 4));
0x00016e9e sbc.w r5, sb, r1 | __asm ("sbc.w r5, sb, r1");
0x00016ea2 cmp r5, 0 |
0x00016ea4 itt lt |
| if (r5 >= 0) {
0x00016ea6 movlt r6, 0 | r6 = 0;
| }
| if (r5 >= 0) {
0x00016ea8 movlt r5, 0 | r5 = 0;
| }
0x00016eaa mov r2, r6 | r2 = r6;
0x00016eac mov r3, r5 | r3 = r5;
0x00016eae blx 0xa04c | r0 = sched_yield ();
0x00016eb2 mov r4, r0 | r4 = r0;
0x00016eb4 cmp r0, 0 |
| if (r0 == 0) {
0x00016eb6 beq 0x16e68 | goto label_1;
| }
0x00016eb8 b 0x16e60 | 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/lib/libapr-1.so.0.7.2 @ 0x11af4 */
| #include <stdint.h>
|
; (fcn) sym.apr_hash_copy () | void apr_hash_copy (int16_t arg1, int16_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x00011af4 ldrd r3, r2, [r1, 0x18] | __asm ("ldrd r3, r2, [r1, 0x18]");
0x00011af8 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00011afc mov r4, r1 | r4 = r1;
0x00011afe mov r5, r0 | r5 = r0;
0x00011b00 adds r2, 0xc | r2 += 0xc;
0x00011b02 add.w r3, r3, r3, lsl 2 | r3 += (r3 << 2);
0x00011b06 adds r1, r3, r2 | r1 = r3 + r2;
0x00011b08 lsls r1, r1, 2 | r1 <<= 2;
0x00011b0a blx 0xa974 | fcn_0000a974 ();
0x00011b0e add.w r1, r4, 0x18 | r1 = r4 + 0x18;
0x00011b12 add.w r2, r0, 0x18 | r2 = r0 + 0x18;
0x00011b16 movs r3, 0 | r3 = 0;
0x00011b18 add.w r7, r0, 0x2c | r7 = r0 + 0x2c;
0x00011b1c vld1.32 {d16}, [r1] | __asm ("vld1.32 {d16}, [r1]");
0x00011b20 mov ip, r3 |
0x00011b22 str r3, [r0, 0x28] | *((r0 + 0x28)) = r3;
0x00011b24 mov sl, ip | sl = ip;
0x00011b26 str r5, [r0] | *(r0) = r5;
0x00011b28 vst1.32 {d16}, [r2] | __asm ("vst1.32 {d16}, [r2]");
0x00011b2c ldr r3, [r4, 0x20] | r3 = *((r4 + 0x20));
0x00011b2e vmov.32 r8, d16[1] | __asm ("vmov.32 r8, d16[1]");
0x00011b32 add.w r8, r8, 0xc | r8 += 0xc;
0x00011b36 str r3, [r0, 0x20] | *((r0 + 0x20)) = r3;
0x00011b38 lsl.w r8, r8, 2 | r8 <<= 2;
0x00011b3c ldr r3, [r4, 0x24] | r3 = *((r4 + 0x24));
0x00011b3e str r7, [r0, 4] | *((r0 + 4)) = r7;
0x00011b40 sub.w sb, r8, 0x30 | sb = r8 - 0x30;
0x00011b44 str r3, [r0, 0x24] | *((r0 + 0x24)) = r3;
0x00011b46 ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x00011b48 add sb, r3 | sb += r3;
0x00011b4a sub.w lr, r3, 4 | lr = r3 - 4;
| label_0:
0x00011b4e ldr r3, [lr, 4]! | r3 = *((lr += 4));
0x00011b52 mov r1, r7 | r1 = r7;
| if (r3 == 0) {
0x00011b54 cbz r3, 0x11b86 | goto label_1;
| }
0x00011b56 add.w r2, ip, ip, lsl 2 | r2 = ip + (ip << 2);
0x00011b5a add.w r2, r8, r2, lsl 2 | r2 = r8 + (r2 << 2);
0x00011b5e add r2, r0 | r2 += r0;
| do {
0x00011b60 str r2, [r1] | *(r1) = r2;
0x00011b62 add.w ip, ip, 1 |
0x00011b66 ldrd r4, r6, [r3, 4] | __asm ("ldrd r4, r6, [r3, 4]");
0x00011b6a adds r2, 0x14 | r2 += 0x14;
0x00011b6c str r4, [r2, -0x10] | *((r2 - 0x10)) = r4;
0x00011b70 ldr r5, [r3, 0xc] | r5 = *((r3 + 0xc));
0x00011b72 str r6, [r2, -0xc] | *((r2 - 0xc)) = r6;
0x00011b76 ldr r6, [r3, 0x10] | r6 = *((r3 + 0x10));
0x00011b78 ldr r3, [r3] | r3 = *(r3);
0x00011b7a ldr r4, [r1] | r4 = *(r1);
0x00011b7c strd r5, r6, [r4, 0xc] | __asm ("strd r5, r6, [r4, 0xc]");
0x00011b80 ldr r1, [r1] | r1 = *(r1);
0x00011b82 cmp r3, 0 |
0x00011b84 bne 0x11b60 |
| } while (r3 != 0);
| label_1:
0x00011b86 cmp lr, sb |
0x00011b88 add.w r7, r7, 4 | r7 += 4;
0x00011b8c str.w sl, [r1] | __asm ("str.w sl, [r1]");
| if (lr != sb) {
0x00011b90 bne 0x11b4e | goto label_0;
| }
0x00011b92 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x11c48 */
| #include <stdint.h>
|
; (fcn) sym.apr_hash_merge () | void apr_hash_merge (int16_t arg_48h, 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;
| int32_t var_14h_2;
| int16_t var_1ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00011c48 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00011c4c mov r4, r2 | r4 = r2;
0x00011c4e sub sp, 0x24 |
0x00011c50 mov r7, r1 | r7 = r1;
0x00011c52 movs r1, 0x2c | r1 = 0x2c;
0x00011c54 mov r5, r0 | r5 = r0;
0x00011c56 str r3, [sp, 0x10] | var_10h = r3;
0x00011c58 str r0, [sp, 0x1c] | var_1ch = r0;
0x00011c5a blx 0xa974 | fcn_0000a974 ();
0x00011c5e ldr r3, [r4, 0x24] | r3 = *((r4 + 0x24));
0x00011c60 mov sb, r0 | sb = r0;
0x00011c62 ldr r2, [r4, 0x18] | r2 = *((r4 + 0x18));
0x00011c64 ldr r1, [r7, 0x1c] | r1 = *((r7 + 0x1c));
0x00011c66 str r3, [r0, 0x24] | *((r0 + 0x24)) = r3;
0x00011c68 ldr r3, [r4, 0x1c] | r3 = *((r4 + 0x1c));
0x00011c6a str r2, [r0, 0x18] | *((r0 + 0x18)) = r2;
0x00011c6c str r5, [r0] | *(r0) = r5;
0x00011c6e cmp r3, r1 |
0x00011c70 it lo |
| if (r3 >= r1) {
0x00011c72 movlo r3, r1 | r3 = r1;
| }
0x00011c74 ldr r1, [r7, 0x18] | r1 = *((r7 + 0x18));
0x00011c76 str r3, [r0, 0x1c] | *((r0 + 0x1c)) = r3;
0x00011c78 add r2, r1 | r2 += r1;
0x00011c7a movs r1, 0 | r1 = 0;
0x00011c7c cmp r3, r2 |
0x00011c7e str r1, [r0, 0x28] | *((r0 + 0x28)) = r1;
0x00011c80 ittt lo |
| if (r3 >= r2) {
0x00011c82 lsllo r3, r3, 1 | r3 <<= 1;
| }
| if (r3 >= r2) {
0x00011c84 addlo r3, 1 | r3++;
| }
| if (r3 >= r2) {
0x00011c86 strlo r3, [r0, 0x1c] | *((r0 + 0x1c)) = r3;
| }
0x00011c88 adds r3, 1 | r3++;
0x00011c8a lsls r5, r3, 2 | r5 = r3 << 2;
0x00011c8c ldr r3, [r4, 0x20] | r3 = *((r4 + 0x20));
0x00011c8e mov r1, r5 | r1 = r5;
0x00011c90 str r3, [r0, 0x20] | *((r0 + 0x20)) = r3;
0x00011c92 ldr r0, [sp, 0x1c] | r0 = var_1ch;
0x00011c94 blx 0xa974 | fcn_0000a974 ();
0x00011c98 movs r1, 0 | r1 = 0;
0x00011c9a mov r2, r5 | r2 = r5;
0x00011c9c blx 0xa210 | fcn_0000a210 ();
0x00011ca0 ldr r1, [r4, 0x18] | r1 = *((r4 + 0x18));
0x00011ca2 ldr r3, [r7, 0x18] | r3 = *((r7 + 0x18));
0x00011ca4 str.w r0, [sb, 4] | __asm ("str.w r0, [sb, 4]");
0x00011ca8 adds r1, r1, r3 | r1 += r3;
0x00011caa it eq |
| if (r1 != r1) {
0x00011cac moveq lr, r1 | lr = r1;
| }
| if (r1 != r1) {
0x00011cae bne.w 0x11e14 | goto label_7;
| }
| label_6:
0x00011cb2 ldr r5, [r4, 4] | r5 = *((r4 + 4));
0x00011cb4 mov.w sl, 0 | sl = 0;
0x00011cb8 ldr r3, [r4, 0x1c] | r3 = *((r4 + 0x1c));
0x00011cba add.w ip, r5, r3, lsl 2 |
0x00011cbe subs r5, 4 | r5 -= 4;
| label_0:
0x00011cc0 ldr r2, [r5, 4]! | r2 = *((r5 += 4));
| if (r2 == 0) {
0x00011cc4 cbz r2, 0x11d02 | goto label_8;
| }
0x00011cc6 add.w r3, sl, sl, lsl 2 | r3 = sl + (sl << 2);
0x00011cca ldr.w r6, [sb, 0x1c] | r6 = *((sb + 0x1c));
0x00011cce ldr.w r0, [sb, 4] | r0 = *((sb + 4));
0x00011cd2 mov r8, r5 | r8 = r5;
0x00011cd4 add.w r3, lr, r3, lsl 2 | r3 = lr + (r3 << 2);
| do {
0x00011cd8 ldrd r5, r4, [r2, 8] | __asm ("ldrd r5, r4, [r2, 8]");
0x00011cdc add.w sl, sl, 1 | sl++;
0x00011ce0 ldr r1, [r2, 4] | r1 = *((r2 + 4));
0x00011ce2 strd r5, r4, [r3, 8] | __asm ("strd r5, r4, [r3, 8]");
0x00011ce6 ldr r4, [r2, 0x10] | r4 = *((r2 + 0x10));
0x00011ce8 str r1, [r3, 4] | *((r3 + 4)) = r1;
0x00011cea ands r1, r6 | r1 &= r6;
0x00011cec str r4, [r3, 0x10] | *((r3 + 0x10)) = r4;
0x00011cee ldr.w r4, [r0, r1, lsl 2] | offset_0 = r1 << 2;
| r4 = *((r0 + offset_0));
0x00011cf2 str r4, [r3] | *(r3) = r4;
0x00011cf4 str.w r3, [r0, r1, lsl 2] | __asm ("str.w r3, [r0, r1, lsl 2]");
0x00011cf8 adds r3, 0x14 | r3 += 0x14;
0x00011cfa ldr r2, [r2] | r2 = *(r2);
0x00011cfc cmp r2, 0 |
0x00011cfe bne 0x11cd8 |
| } while (r2 != 0);
0x00011d00 mov r5, r8 | r5 = r8;
| label_8:
0x00011d02 cmp ip, r5 |
| if (ip != r5) {
0x00011d04 bne 0x11cc0 | goto label_0;
| }
0x00011d06 movs r4, 0 | r4 = 0;
0x00011d08 strd lr, sl, [sp, 8] | __asm ("strd lr, sl, [var_ch]");
0x00011d0c mov fp, r4 |
0x00011d0e mov r4, r7 | r4 = r7;
| label_3:
0x00011d10 ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x00011d12 ldr.w r7, [r3, fp, lsl 2] | offset_1 = fp << 2;
| r7 = *((r3 + offset_1));
0x00011d16 cmp r7, 0 |
| if (r7 == 0) {
0x00011d18 beq 0x11d88 | goto label_9;
| }
0x00011d1a strd fp, r4, [sp, 0x14] | __asm ("strd fp, r4, [var_14h]");
| label_2:
0x00011d1e ldr.w r3, [sb, 0x24] | r3 = *((sb + 0x24));
0x00011d22 ldr.w sl, [r7, 8] | sl = *((r7 + 8));
0x00011d26 cmp r3, 0 |
| if (r3 == 0) {
0x00011d28 beq 0x11dd2 | goto label_10;
| }
0x00011d2a mov r0, sl | r0 = sl;
0x00011d2c add.w r1, r7, 0xc | r1 = r7 + 0xc;
0x00011d30 blx r3 | uint32_t (*r3)(uint32_t, uint32_t) (r0, r1);
0x00011d32 ldrd sl, r6, [r7, 8] | __asm ("ldrd sl, r6, [r7, 8]");
0x00011d36 mov fp, r0 |
| label_5:
0x00011d38 ldr.w r2, [sb, 0x1c] | r2 = *((sb + 0x1c));
0x00011d3c ldr.w r4, [sb, 4] | r4 = *((sb + 4));
0x00011d40 and.w r8, fp, r2 | r8 = fp & r2;
0x00011d44 ldr.w r5, [r4, r8, lsl 2] | offset_2 = r8 << 2;
| r5 = *((r4 + offset_2));
| if (r5 != 0) {
0x00011d48 cbnz r5, 0x11d50 | goto label_11;
| }
0x00011d4a b 0x11d9a | goto label_12;
| do {
| label_1:
0x00011d4c ldr r5, [r5] | r5 = *(r5);
| if (r5 == 0) {
0x00011d4e cbz r5, 0x11d9a | goto label_12;
| }
| label_11:
0x00011d50 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x00011d52 cmp r3, r6 |
0x00011d54 bne 0x11d4c |
| } while (r3 != r6);
0x00011d56 ldr r0, [r5, 8] | r0 = *((r5 + 8));
0x00011d58 mov r2, r6 | r2 = r6;
0x00011d5a mov r1, sl | r1 = sl;
0x00011d5c blx 0x9f1c | r0 = fcn_00009f1c ();
0x00011d60 cmp r0, 0 |
| if (r0 != 0) {
0x00011d62 bne 0x11d4c | goto label_1;
| }
0x00011d64 ldr r4, [sp, 0x10] | r4 = var_10h;
0x00011d66 ldr r3, [r7, 0x10] | r3 = *((r7 + 0x10));
| if (r4 != 0) {
0x00011d68 cbz r4, 0x11d7c |
0x00011d6a ldr r2, [sp, 0x48] | r2 = *(arg_48h);
0x00011d6c mov r1, sl | r1 = sl;
0x00011d6e str r2, [sp, 4] | var_4h = r2;
0x00011d70 mov r2, r6 | r2 = r6;
0x00011d72 ldr r0, [r5, 0x10] | r0 = *((r5 + 0x10));
0x00011d74 str r0, [sp] | *(sp) = r0;
0x00011d76 ldr r0, [sp, 0x1c] | r0 = var_1ch;
0x00011d78 blx r4 | r0 = uint32_t (*r4)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x00011d7a mov r3, r0 | r3 = r0;
| }
0x00011d7c str r3, [r5, 0x10] | *((r5 + 0x10)) = r3;
| label_4:
0x00011d7e ldr r7, [r7] | r7 = *(r7);
0x00011d80 cmp r7, 0 |
| if (r7 != 0) {
0x00011d82 bne 0x11d1e | goto label_2;
| }
0x00011d84 ldrd fp, r4, [sp, 0x14] | __asm ("ldrd fp, r4, [var_14h]");
| label_9:
0x00011d88 ldr r3, [r4, 0x1c] | r3 = *((r4 + 0x1c));
0x00011d8a add.w fp, fp, 1 |
0x00011d8e cmp r3, fp |
| if (r3 >= fp) {
0x00011d90 bhs 0x11d10 | goto label_3;
| }
0x00011d92 mov r0, sb | r0 = sb;
0x00011d94 add sp, 0x24 |
0x00011d96 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_12:
0x00011d9a ldr r1, [sp, 0xc] | r1 = var_ch;
0x00011d9c ldr r0, [sp, 8] | r0 = var_8h;
0x00011d9e ldr r2, [r7, 0x10] | r2 = *((r7 + 0x10));
0x00011da0 ldr.w r3, [sb, 0x18] | r3 = *((sb + 0x18));
0x00011da4 add.w r5, r1, r1, lsl 2 | r5 = r1 + (r1 << 2);
0x00011da8 adds r1, 1 | r1++;
0x00011daa str r1, [sp, 0xc] | var_ch = r1;
0x00011dac add.w r0, r0, r5, lsl 2 | r0 += (r5 << 2);
0x00011db0 adds r3, 1 | r3++;
0x00011db2 strd r6, r2, [r0, 0xc] | __asm ("strd r6, r2, [r0, 0xc]");
0x00011db6 str.w sl, [r0, 8] | __asm ("str.w sl, [r0, 8]");
0x00011dba ldr r2, [sp, 8] | r2 = var_8h;
0x00011dbc ldr.w r1, [r4, r8, lsl 2] | offset_3 = r8 << 2;
| r1 = *((r4 + offset_3));
0x00011dc0 str.w fp, [r0, 4] | __asm ("str.w fp, [r0, 4]");
0x00011dc4 str.w r1, [r2, r5, lsl 2] | __asm ("str.w r1, [r2, r5, lsl 2]");
0x00011dc8 str.w r0, [r4, r8, lsl 2] | __asm ("str.w r0, [r4, r8, lsl 2]");
0x00011dcc str.w r3, [sb, 0x18] | __asm ("str.w r3, [sb, 0x18]");
0x00011dd0 b 0x11d7e | goto label_4;
| label_10:
0x00011dd2 ldr r6, [r7, 0xc] | r6 = *((r7 + 0xc));
0x00011dd4 ldr.w fp, [sb, 0x20] | fp = *((sb + 0x20));
0x00011dd8 adds r3, r6, 1 | r3 = r6 + 1;
| if (r3 == r6) {
0x00011dda beq 0x11df6 | goto label_13;
| }
0x00011ddc add.w r0, sl, r6 | r0 = sl + r6;
0x00011de0 mov r3, sl | r3 = sl;
0x00011de2 cmp r6, 0 |
| if (r6 == 0) {
0x00011de4 beq 0x11d38 | goto label_5;
| }
| do {
0x00011de6 ldrb r2, [r3], 1 | r2 = *(r3);
| r3++;
0x00011dea add.w fp, fp, fp, lsl 5 |
0x00011dee cmp r3, r0 |
0x00011df0 add fp, r2 |
0x00011df2 bne 0x11de6 |
| } while (r3 != r0);
0x00011df4 b 0x11d38 | goto label_5;
| label_13:
0x00011df6 ldrb.w r6, [sl] | r6 = *(sl);
| if (r6 == 0) {
0x00011dfa cbz r6, 0x11e10 | goto label_14;
| }
0x00011dfc mov r3, sl | r3 = sl;
| do {
0x00011dfe add.w fp, fp, fp, lsl 5 |
0x00011e02 add fp, r6 |
0x00011e04 ldrb r6, [r3, 1]! | r6 = *((r3 += 1));
0x00011e08 cmp r6, 0 |
0x00011e0a bne 0x11dfe |
| } while (r6 != 0);
0x00011e0c sub.w r6, r3, sl | r6 = r3 - sl;
| label_14:
0x00011e10 str r6, [r7, 0xc] | *((r7 + 0xc)) = r6;
0x00011e12 b 0x11d38 | goto label_5;
| label_7:
0x00011e14 add.w r1, r1, r1, lsl 2 | r1 += (r1 << 2);
0x00011e18 ldr r0, [sp, 0x1c] | r0 = var_1ch;
0x00011e1a lsls r1, r1, 2 | r1 <<= 2;
0x00011e1c blx 0xa974 | r0 = fcn_0000a974 ();
0x00011e20 mov lr, r0 | lr = r0;
0x00011e22 b 0x11cb2 | 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/lib/libapr-1.so.0.7.2 @ 0x11910 */
| #include <stdint.h>
|
; (fcn) sym.apr_hash_next () | void apr_hash_next (int16_t arg1) {
| r0 = arg1;
0x00011910 mov ip, r0 |
0x00011912 ldr r0, [r0, 8] | r0 = *((r0 + 8));
0x00011914 str.w r0, [ip, 4] | __asm ("str.w r0, [ip, 4]");
| if (r0 != 0) {
0x00011918 cbnz r0, 0x11952 | goto label_0;
| }
0x0001191a ldr.w r3, [ip, 0xc] | r3 = *((ip + 0xc));
0x0001191e push {r4, r5} |
0x00011920 ldr.w r4, [ip] | r4 = *(ip);
0x00011924 lsls r2, r3, 2 | r2 = r3 << 2;
0x00011926 ldr r5, [r4, 0x1c] | r5 = *((r4 + 0x1c));
0x00011928 b 0x1193a |
| while (r5 >= r3) {
0x0001192a ldr r1, [r4, 4] | r1 = *((r4 + 4));
0x0001192c str.w r3, [ip, 0xc] | __asm ("str.w r3, [ip, 0xc]");
0x00011930 ldr r1, [r1, r2] | r1 = *((r1 + r2));
0x00011932 adds r2, 4 | r2 += 4;
0x00011934 str.w r1, [ip, 4] | __asm ("str.w r1, [ip, 4]");
| if (r1 != 0) {
0x00011938 cbnz r1, 0x11946 | goto label_1;
| }
0x0001193a cmp r5, r3 |
0x0001193c add.w r3, r3, 1 | r3++;
0x00011940 bhs 0x1192a |
| }
0x00011942 pop {r4, r5} |
0x00011944 bx lr | return;
| label_1:
0x00011946 ldr r3, [r1] | r3 = *(r1);
0x00011948 mov r0, ip | r0 = ip;
0x0001194a pop {r4, r5} |
0x0001194c str.w r3, [ip, 8] | __asm ("str.w r3, [ip, 8]");
0x00011950 bx lr | return;
| label_0:
0x00011952 ldr r3, [r0] | r3 = *(r0);
0x00011954 mov r0, ip | r0 = ip;
0x00011956 str.w r3, [ip, 8] | __asm ("str.w r3, [ip, 8]");
0x0001195a bx lr | return;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x11ab0 */
| #include <stdint.h>
|
; (fcn) sym.apr_hashfunc_default () | void apr_hashfunc_default (int16_t arg1, int16_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x00011ab0 mov r3, r0 | r3 = r0;
0x00011ab2 ldr r0, [r1] | r0 = *(r1);
0x00011ab4 adds r2, r0, 1 | r2 = r0 + 1;
| if (r2 == r0) {
0x00011ab6 beq 0x11ace | goto label_0;
| }
| if (r0 == 0) {
0x00011ab8 cbz r0, 0x11aec | goto label_1;
| }
0x00011aba adds r1, r3, r0 | r1 = r3 + r0;
0x00011abc movs r0, 0 | r0 = 0;
| do {
0x00011abe ldrb r2, [r3], 1 | r2 = *(r3);
| r3++;
0x00011ac2 add.w r0, r0, r0, lsl 5 | r0 += (r0 << 5);
0x00011ac6 cmp r3, r1 |
0x00011ac8 add r0, r2 | r0 += r2;
0x00011aca bne 0x11abe |
| } while (r3 != r1);
0x00011acc bx lr | return;
| label_0:
0x00011ace ldrb r2, [r3] | r2 = *(r3);
| if (r2 == 0) {
0x00011ad0 cbz r2, 0x11aee | goto label_2;
| }
0x00011ad2 mov ip, r3 |
0x00011ad4 movs r0, 0 | r0 = 0;
| do {
0x00011ad6 add.w r0, r0, r0, lsl 5 | r0 += (r0 << 5);
0x00011ada add r0, r2 | r0 += r2;
0x00011adc ldrb r2, [ip, 1]! | r2 = *((ip += 1));
0x00011ae0 cmp r2, 0 |
0x00011ae2 bne 0x11ad6 |
| } while (r2 != 0);
0x00011ae4 sub.w r2, ip, r3 | r2 = ip - r3;
| do {
0x00011ae8 str r2, [r1] | *(r1) = r2;
0x00011aea bx lr | return;
| label_1:
0x00011aec bx lr | return;
| label_2:
0x00011aee mov r0, r2 | r0 = r2;
0x00011af0 b 0x11ae8 |
| } 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/lib/libapr-1.so.0.7.2 @ 0xf600 */
| #include <stdint.h>
|
; (fcn) sym.apr_match_glob () | void apr_match_glob (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_64h;
| int16_t var_74h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x0000f600 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0000f604 mov r6, r2 | r6 = r2;
0x0000f606 ldr r2, [pc, 0xb8] |
0x0000f608 sub sp, 0x78 |
0x0000f60a mov r7, r1 | r7 = r1;
0x0000f60c movs r1, 0x2f | r1 = 0x2f;
0x0000f60e ldr r3, [pc, 0xb4] | r3 = *(0xf6c6);
0x0000f610 mov r4, r0 | r4 = r0;
0x0000f612 add r2, pc | r2 = 0x1ecd8;
0x0000f614 ldr r3, [r2, r3] |
0x0000f616 ldr r3, [r3] | r3 = *(0x1ecd8);
0x0000f618 str r3, [sp, 0x74] | var_74h = r3;
0x0000f61a mov.w r3, 0 | r3 = 0;
0x0000f61e blx 0xa28c | r0 = strerror_r ();
0x0000f622 cmp r0, 0 |
| if (r0 == 0) {
0x0000f624 beq 0xf6aa | goto label_3;
| }
| label_1:
0x0000f626 subs r2, r0, r4 | r2 = r0 - r4;
0x0000f628 mov r1, r4 | r1 = r4;
0x0000f62a adds r4, r0, 1 | r4 = r0 + 1;
0x0000f62c mov r0, r6 | r0 = r6;
0x0000f62e blx 0xaf84 | r0 = fcn_0000af84 ();
0x0000f632 mov r5, r0 | r5 = r0;
| label_2:
0x0000f634 movs r2, 4 | r2 = 4;
0x0000f636 movs r1, 0 | r1 = 0;
0x0000f638 mov r0, r6 | r0 = r6;
0x0000f63a blx 0xb0fc | fcn_0000b0fc ();
0x0000f63c stcl p6, c4, [r0, -0xa4]! | __asm ("stcl p6, c4, [r0, -0xa4]!");
0x0000f640 str r0, [r7] | *(r7) = r0;
0x0000f642 mov r2, r6 | r2 = r6;
0x0000f644 add r0, sp, 4 | r0 += var_4h;
0x0000f646 blx 0xa024 | fcn_0000a024 ();
0x0000f64a add r5, sp, 8 | r5 += var_8h;
0x0000f64c mov r8, r0 | r8 = r0;
| if (r0 == 0) {
0x0000f64e cbz r0, 0xf65c | goto label_0;
| }
0x0000f650 b 0xf674 | goto label_4;
| do {
0x0000f652 ldr r1, [sp, 0x64] | r1 = var_64h;
0x0000f654 mov r0, r4 | r0 = r4;
0x0000f656 blx 0xaca0 | r0 = fcn_0000aca0 ();
| if (r0 == 0) {
0x0000f65a cbz r0, 0xf690 | goto label_5;
| }
| label_0:
0x0000f65c ldr r2, [sp, 4] | r2 = var_4h;
0x0000f65e mov.w r1, 0x2000000 | r1 = 0x2000000;
0x0000f662 mov r0, r5 | r0 = r5;
0x0000f664 blx 0xaeec | r0 = pipe ();
0x0000f668 mov r2, r0 | r2 = r0;
0x0000f66a cmp r0, 0 |
0x0000f66c beq 0xf652 |
| } while (r0 == 0);
0x0000f66e ldr r0, [sp, 4] | r0 = var_4h;
0x0000f670 blx 0xa678 | fcn_0000a678 ();
| label_4:
0x0000f674 ldr r2, [pc, 0x50] |
0x0000f676 ldr r3, [pc, 0x4c] | r3 = *(0xf6c6);
0x0000f678 add r2, pc | r2 = 0x1ed44;
0x0000f67a ldr r3, [r2, r3] | r3 = *(0x1ed44);
0x0000f67c ldr r2, [r3] | r2 = *(0x1ed44);
0x0000f67e ldr r3, [sp, 0x74] | r3 = var_74h;
0x0000f680 eors r2, r3 | r2 ^= r3;
0x0000f682 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000f686 bne 0xf6bc | goto label_6;
| }
0x0000f688 mov r0, r8 | r0 = r8;
0x0000f68a add sp, 0x78 |
0x0000f68c pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_5:
0x0000f690 ldr.w sl, [sp, 0x64] | sl = var_64h;
0x0000f694 ldr r0, [r7] | r0 = *(r7);
0x0000f696 blx 0xa234 | fcn_0000a234 ();
0x0000f69a mov r1, sl | r1 = sl;
0x0000f69c mov sb, r0 | sb = r0;
0x0000f69e mov r0, r6 | r0 = r6;
0x0000f6a0 blx 0xad9c | fcn_0000ad9c ();
0x0000f6a4 str.w r0, [sb] | __asm ("str.w r0, [sb]");
0x0000f6a8 b 0xf65c | goto label_0;
| label_3:
0x0000f6aa movs r1, 0x5c | r1 = 0x5c;
0x0000f6ac mov r0, r4 | r0 = r4;
0x0000f6ae blx 0xa28c | r0 = strerror_r ();
0x0000f6b2 cmp r0, 0 |
| if (r0 != 0) {
0x0000f6b4 bne 0xf626 | goto label_1;
| }
0x0000f6b6 ldr r5, [pc, 0x14] |
0x0000f6b8 add r5, pc | r5 = 0x1ed8a;
0x0000f6ba b 0xf634 | goto label_2;
| label_6:
0x0000f6bc blx 0xabc8 | pthread_attr_getdetachstate ();
0x0000f6c0 strh r2, [r3, r4] | *((r3 + r4)) = r2;
0x0000f6c2 movs r1, r0 | r1 = r0;
0x0000f6c4 lsls r0, r4, 0x1a | r0 = r4 << 0x1a;
0x0000f6c6 movs r0, r0 |
0x0000f6c8 strh r4, [r6, r2] | *((r6 + r2)) = r4;
0x0000f6ca movs r1, r0 | r1 = r0;
0x0000f6cc movs r5, 0x3c | r5 = 0x3c;
0x0000f6ce movs r1, r0 | r1 = r0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x1b368 */
| #include <stdint.h>
|
; (fcn) sym.apr_parse_addr_port () | void apr_parse_addr_port (int16_t arg_1h, int16_t arg_48h, int16_t arg_2c8h, int16_t arg_328h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_24h;
| int16_t var_ch_2;
| int16_t var_1ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0001b368 svcmi 0xf0e92d | __asm ("svcmi 0xf0e92d");
0x0001b36c mov r7, r2 | r7 = r2;
0x0001b36e ldr r2, [pc, 0x158] |
0x0001b370 mov r5, r3 | r5 = r3;
0x0001b372 sub sp, 0x24 |
0x0001b374 mov r6, r0 | r6 = r0;
0x0001b376 ldr r3, [pc, 0x154] | r3 = *(0x1b4ce);
0x0001b378 mov r8, r1 | r8 = r1;
0x0001b37a add r2, pc | r2 = 0x36848;
0x0001b37c ldr.w sb, [sp, 0x48] | sb = *(arg_48h);
0x0001b380 ldr r3, [r2, r3] |
0x0001b382 ldr r3, [r3] | r3 = *(0x36848);
0x0001b384 str r3, [sp, 0x1c] | var_1ch = r3;
0x0001b386 mov.w r3, 0 | r3 = 0;
0x0001b38a movs r3, 0 | r3 = 0;
0x0001b38c str r3, [r0] | *(r0) = r3;
0x0001b38e mov r0, r5 | r0 = r5;
0x0001b390 str r3, [r1] | *(r1) = r3;
0x0001b392 strh r3, [r7] | *(r7) = r3;
0x0001b394 blx 0xa6d8 | r0 = fcn_0000a6d8 ();
0x0001b398 add.w sl, r0, -1 | sl = r0 + -1;
0x0001b39c adds.w sl, r5, sl | sl = r5 + sl;
| if (sl >= r5) {
0x0001b3a0 bhs 0x1b486 | goto label_4;
| }
0x0001b3a2 blx 0xab10 | fcn_0000ab10 ();
0x0001b3a6 mov ip, sl |
0x0001b3a8 ldr r2, [r0] | r2 = *(r0);
0x0001b3aa b 0x1b3b0 |
| while (r1 != r1) {
0x0001b3ac cmp r5, ip |
| if (r5 > ip) {
0x0001b3ae bhi 0x1b486 | goto label_4;
| }
0x0001b3b0 mov r4, ip | r4 = ip;
0x0001b3b2 add.w ip, ip, -1 |
0x0001b3b6 ldrb r3, [r4] | r3 = *(r4);
0x0001b3b8 ldrh.w r1, [r2, r3, lsl 1] | offset_0 = r3 << 1;
| r1 = *((r2 + offset_0));
0x0001b3bc ands r1, r1, 0x800 | r1 &= 0x800;
0x0001b3c0 bne 0x1b3ac |
| }
0x0001b3c2 cmp r5, r4 |
| if (r5 > r4) {
0x0001b3c4 bhi 0x1b486 | goto label_4;
| }
0x0001b3c6 sub.w r3, r3, 0x3a | r3 -= 0x3a;
0x0001b3ca cmp sl, r4 |
0x0001b3cc clz r3, r3 | r3 &= r3;
0x0001b3d0 lsr.w r3, r3, 5 | r3 >>= 5;
0x0001b3d4 it ls |
| if (sl > r4) {
0x0001b3d6 movls r3, 0 | r3 = 0;
| }
0x0001b3d8 cmp r3, 0 |
| if (r3 != 0) {
0x0001b3da bne 0x1b4a6 | goto label_5;
| }
| label_3:
0x0001b3dc ldrb r3, [r5] | r3 = *(r5);
0x0001b3de sub.w fp, sl, r5 |
0x0001b3e2 add.w r2, fp, 1 | r2 += arg_1h;
0x0001b3e6 cmp r3, 0x5b |
| if (r3 != 0x5b) {
0x0001b3e8 bne 0x1b478 | goto label_6;
| }
0x0001b3ea movs r1, 0x5d | r1 = 0x5d;
0x0001b3ec mov r0, r5 | r0 = r5;
0x0001b3ee str r2, [sp, 4] | var_24h = r2;
0x0001b3f0 blx 0xb0b4 | r0 = fcn_0000b0b4 ();
0x0001b3f4 subs.w r3, sl, r0 | r3 = sl - r0;
0x0001b3f8 mov r4, r0 | r4 = r0;
0x0001b3fa it ne |
| if (r3 == sl) {
0x0001b3fc movne r3, 1 | r3 = 1;
| }
0x0001b3fe cmp r0, 0 |
0x0001b400 it eq |
| if (r0 != 0) {
0x0001b402 orreq r3, r3, 1 | r3 |= 1;
| }
| if (r3 == 0) {
0x0001b406 cbnz r3, 0x1b458 |
0x0001b408 ldr r2, [sp, 4] | r2 = var_24h;
0x0001b40a movs r1, 0x25 | r1 = 0x25;
0x0001b40c mov r0, r5 | r0 = r5;
0x0001b40e blx 0xb0b4 | r0 = fcn_0000b0b4 ();
0x0001b412 cmp r0, 0 |
| if (r0 == 0) {
0x0001b414 beq 0x1b4a0 | goto label_7;
| }
0x0001b416 subs r3, r4, 1 | r3 = r4 - 1;
0x0001b418 cmp r0, r3 |
| if (r0 == r3) {
0x0001b41a beq 0x1b458 | goto label_8;
| }
0x0001b41c sub.w fp, r0, r5 |
0x0001b420 subs r2, r4, r0 | r2 = r4 - r0;
0x0001b422 add.w fp, fp, -1 |
0x0001b426 adds r1, r0, 1 | r1 = r0 + 1;
0x0001b428 subs r2, 1 | r2--;
0x0001b42a mov r0, sb | r0 = sb;
0x0001b42c blx 0xaf84 | fcn_0000af84 ();
0x0001b430 str.w r0, [r8] | __asm ("str.w r0, [r8]");
| label_2:
0x0001b434 mov r2, fp | r2 = fp;
0x0001b436 adds r1, r5, 1 | r1 = r5 + 1;
0x0001b438 mov r0, sb | r0 = sb;
0x0001b43a blx 0xaf84 | fcn_0000af84 ();
0x0001b43e add r2, sp, 0xc | r2 += var_ch_2;
0x0001b440 mov r1, r0 | r1 = r0;
0x0001b442 str r0, [r6] | *(r6) = r0;
0x0001b444 movs r0, 0xa | r0 = 0xa;
0x0001b446 blx 0xa3cc | r0 = fcn_0000a3cc ();
0x0001b44a cmp r0, 1 |
0x0001b44c ittt ne |
| if (r0 == 1) {
0x0001b44e movne r3, 0 | r3 = 0;
| }
| if (r0 == 1) {
0x0001b450 strne r3, [r6] | *(r6) = r3;
| }
| if (r0 == 1) {
0x0001b452 strne r3, [r8] | *(r8) = r3;
| }
| if (r0 == 1) {
0x0001b456 beq 0x1b482 | goto label_0;
| }
| }
| label_8:
0x0001b458 movs r3, 0 | r3 = 0;
0x0001b45a strh r3, [r7] | *(r7) = r3;
| label_1:
0x0001b45c movs r0, 0x16 | r0 = 0x16;
| do {
0x0001b45e ldr r2, [pc, 0x70] |
0x0001b460 ldr r3, [pc, 0x68] | r3 = *(0x1b4cc);
0x0001b462 add r2, pc | r2 = 0x36938;
0x0001b464 ldr r3, [r2, r3] | r3 = *(0x36938);
0x0001b466 ldr r2, [r3] | r2 = *(0x36938);
0x0001b468 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x0001b46a eors r2, r3 | r2 ^= r3;
0x0001b46c mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0001b470 bne 0x1b4c4 | goto label_9;
| }
0x0001b472 add sp, 0x24 |
0x0001b474 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_6:
0x0001b478 mov r1, r5 | r1 = r5;
0x0001b47a mov r0, sb | r0 = sb;
0x0001b47c blx 0xaf84 | fcn_0000af84 ();
0x0001b480 str r0, [r6] | *(r6) = r0;
| label_0:
0x0001b482 movs r0, 0 | r0 = 0;
0x0001b484 b 0x1b45e |
| } while (1);
| label_4:
0x0001b486 movs r2, 0xa | r2 = 0xa;
0x0001b488 movs r1, 0 | r1 = 0;
0x0001b48a mov r0, r5 | r0 = r5;
0x0001b48c blx 0xa850 | raise (r0);
0x0001b490 movw r3, 0xfffe | r3 = 0xfffe;
0x0001b494 subs r2, r0, 1 | r2 = r0 - 1;
0x0001b496 cmp r2, r3 |
0x0001b498 it ls |
| if (r2 > r3) {
0x0001b49a strhls r0, [r7] | __asm ("strhls r0, [r7]");
| goto label_10;
| }
| if (r2 < r3) {
| label_10:
0x0001b49c bls 0x1b482 | goto label_0;
| }
0x0001b49e b 0x1b45c | goto label_1;
| label_7:
0x0001b4a0 add.w fp, fp, -1 |
0x0001b4a4 b 0x1b434 | goto label_2;
| label_5:
0x0001b4a6 cmp r5, r4 |
| if (r5 == r4) {
0x0001b4a8 beq 0x1b45c | goto label_1;
| }
0x0001b4aa movs r2, 0xa | r2 = 0xa;
0x0001b4ac adds r0, r4, 1 | r0 = r4 + 1;
0x0001b4ae blx 0xa850 | raise (r0);
0x0001b4b2 movw r3, 0xfffe | r3 = 0xfffe;
0x0001b4b6 subs r2, r0, 1 | r2 = r0 - 1;
0x0001b4b8 cmp r2, r3 |
| if (r2 > r3) {
0x0001b4ba bhi 0x1b45c | goto label_1;
| }
0x0001b4bc add.w sl, r4, -1 | sl = r4 + -1;
0x0001b4c0 strh r0, [r7] | *(r7) = r0;
0x0001b4c2 b 0x1b3dc | goto label_3;
| label_9:
0x0001b4c4 blx 0xabc8 | pthread_attr_getdetachstate ();
0x0001b4c8 str r5, [sp, 0x2c8] | *(arg_2c8h) = r5;
0x0001b4ca movs r0, r0 |
0x0001b4cc lsls r0, r4, 0x1a | r0 = r4 << 0x1a;
0x0001b4ce movs r0, r0 |
0x0001b4d0 str r4, [sp, 0x328] | *(arg_328h) = r4;
0x0001b4d2 movs r0, r0 |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x1dd78 */
| #include <stdint.h>
|
; (fcn) sym.apr_poll_create_wakeup_pipe () | void apr_poll_create_wakeup_pipe (int16_t arg1, int16_t arg2, int16_t arg3) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x0001dd78 mvnsmi lr, sp, lsr 18 | __asm ("mvnsmi lr, sp, lsr 18");
0x0001dd7c mov r4, r2 | r4 = r2;
0x0001dd7e movs r2, 4 | r2 = 4;
0x0001dd80 mov r3, r0 | r3 = r0;
0x0001dd82 mov r7, r0 | r7 = r0;
0x0001dd84 mov r6, r1 | r6 = r1;
0x0001dd86 mov r0, r4 | r0 = r4;
0x0001dd88 adds r1, r4, r2 | r1 = r4 + r2;
0x0001dd8a blx 0xa440 | r0 = fcn_0000a440 ();
0x0001dd8e mov r5, r0 | r5 = r0;
0x0001dd90 cbz r0, 0x1dd98 |
| while (r0 != 1) {
0x0001dd92 mov r0, r5 | r0 = r5;
0x0001dd94 pop.w {r4, r5, r6, r7, r8, pc} |
0x0001dd98 ldr r3, [r4] | r3 = *(r4);
0x0001dd9a mov.w r8, 1 | r8 = 1;
0x0001dd9e str r7, [r6] | *(r6) = r7;
0x0001dda0 movs r7, 2 | r7 = 2;
0x0001dda2 mov r1, r8 | r1 = r8;
0x0001dda4 strh.w r8, [r6, 8] | *((r6 + 8)) = r8;
0x0001dda8 ldr r0, [r3, 4] | r0 = *((r3 + 4));
0x0001ddaa str r3, [r6, 0xc] | *((r6 + 0xc)) = r3;
0x0001ddac str r7, [r6, 4] | *((r6 + 4)) = r7;
0x0001ddae blx 0xaf60 | r0 = fcn_0000af60 ();
0x0001ddb2 adds r2, r0, 1 | r2 = r0 + 1;
| if (r2 == r0) {
0x0001ddb4 beq 0x1dde8 | goto label_0;
| }
0x0001ddb6 ldr r3, [r4] | r3 = *(r4);
0x0001ddb8 orr r2, r0, 1 | r2 = r0 | 1;
0x0001ddbc mov r1, r7 | r1 = r7;
0x0001ddbe ldr r0, [r3, 4] | r0 = *((r3 + 4));
0x0001ddc0 blx 0xaf60 | fcn_0000af60 ();
0x0001ddc4 adds r0, 1 | r0++;
| if (r0 == 1) {
0x0001ddc6 beq 0x1dde8 | goto label_0;
| }
0x0001ddc8 ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x0001ddca mov r1, r8 | r1 = r8;
0x0001ddcc ldr r0, [r3, 4] | r0 = *((r3 + 4));
0x0001ddce blx 0xaf60 | r0 = fcn_0000af60 ();
0x0001ddd2 adds r3, r0, 1 | r3 = r0 + 1;
| if (r3 == r0) {
0x0001ddd4 beq 0x1dde8 | goto label_0;
| }
0x0001ddd6 ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x0001ddd8 orr r2, r0, 1 | r2 = r0 | 1;
0x0001dddc mov r1, r7 | r1 = r7;
0x0001ddde ldr r0, [r3, 4] | r0 = *((r3 + 4));
0x0001dde0 blx 0xaf60 | fcn_0000af60 ();
0x0001dde4 adds r0, 1 | r0++;
0x0001dde6 bne 0x1dd92 |
| }
| label_0:
0x0001dde8 blx 0xb12c | r0 = fcn_0000b12c ();
0x0001ddec ldr r5, [r0] | r5 = *(r0);
0x0001ddee mov r0, r5 | r0 = r5;
0x0001ddf0 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/lib/libapr-1.so.0.7.2 @ 0x1d600 */
| #include <stdint.h>
|
; (fcn) sym.apr_pollcb_create_ex () | void apr_pollcb_create_ex (int16_t arg_30h, 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;
0x0001d600 svcmi 0xf0e92d | __asm ("svcmi 0xf0e92d");
0x0001d604 sub sp, 0xc |
0x0001d606 ldr r4, [sp, 0x30] | r4 = *(arg_30h);
0x0001d608 mov r8, r2 | r8 = r2;
0x0001d60a movs r2, 0 | r2 = 0;
0x0001d60c mov sl, r1 | sl = r1;
0x0001d60e ldr r6, [pc, 0xec] |
0x0001d610 mov fp, r3 |
0x0001d612 str r0, [sp] | *(sp) = r0;
0x0001d614 str r2, [r0] | *(r0) = r2;
0x0001d616 add r6, pc | r6 = 0x3ad18;
| if (r4 != 0) {
0x0001d618 cbz r4, 0x1d630 |
0x0001d61a ldr r2, [pc, 0xe4] | r2 = *(0x1d702);
0x0001d61c cmp r4, 4 |
0x0001d61e ldr r2, [r6, r2] | r2 = *((r6 + r2));
0x0001d620 ldr r5, [r2] | r5 = *(0x1d702);
| if (r4 == 4) {
0x0001d622 beq 0x1d630 | goto label_4;
| }
0x0001d624 cmp r4, 5 |
| if (r4 == 5) {
0x0001d626 bne 0x1d62a |
| if (r5 != 0) {
0x0001d628 cbnz r5, 0x1d648 | goto label_5;
| }
| }
0x0001d62a tst.w fp, 0x10 |
| if ((fp & 0x10) != 0) {
0x0001d62e bne 0x1d638 | goto label_0;
| }
| }
| label_4:
0x0001d630 ldr r2, [pc, 0xd0] | r2 = *(0x1d704);
0x0001d632 ldr r2, [r6, r2] | r2 = *((r6 + r2));
0x0001d634 ldr r5, [r2] | r5 = *(0x1d704);
| if (r5 != 0) {
0x0001d636 cbnz r5, 0x1d646 | goto label_6;
| }
| label_0:
0x0001d638 movw r0, 0x1187 |
0x0001d63c movt r0, 1 | r0 = 0x11187;
| do {
| label_1:
0x0001d640 add sp, 0xc |
0x0001d642 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_6:
0x0001d646 movs r4, 4 | r4 = 4;
| label_5:
0x0001d648 ands r3, fp, 4 | r3 = fp & 4;
0x0001d64c mov.w r1, 0x3c | r1 = 0x3c;
0x0001d650 mov r0, r8 | r0 = r8;
0x0001d652 it ne |
| if (r3 == fp) {
0x0001d654 addne sl, sl, 1 | sl++;
| }
0x0001d658 str r3, [sp, 4] | var_4h = r3;
0x0001d65a blx 0xa974 | fcn_0000a974 ();
0x0001d65e movs r2, 0 | r2 = 0;
0x0001d660 ldr r7, [r5] | r7 = *(r5);
0x0001d662 str r2, [r0, 4] | *((r0 + 4)) = r2;
0x0001d664 mov r3, fp | r3 = fp;
0x0001d666 mov r2, r8 | r2 = r8;
0x0001d668 mov r1, sl | r1 = sl;
0x0001d66a strd sl, fp, [r0, 8] | __asm ("strd sl, fp, [r0, 8]");
0x0001d66e mov sb, r0 | sb = r0;
0x0001d670 str.w r8, [r0] | __asm ("str.w r8, [r0]");
0x0001d674 str r5, [r0, 0x38] | *((r0 + 0x38)) = r5;
0x0001d676 blx r7 | uint32_t (*r7)(uint32_t, uint32_t, uint32_t) (r1, r2, r3);
0x0001d678 movw r2, 0x1187 |
0x0001d67c movt r2, 1 | r2 = 0x11187;
0x0001d680 cmp r0, r2 |
| if (r0 == r2) {
0x0001d682 beq 0x1d6b0 | goto label_7;
| }
0x0001d684 cmp r0, 0 |
0x0001d686 bne 0x1d640 |
| } while (r0 != 0);
| label_2:
0x0001d688 ldr r3, [sp, 4] | r3 = var_4h;
| if (r3 != 0) {
0x0001d68a cbnz r3, 0x1d6da | goto label_8;
| }
0x0001d68c ldr r3, [r5, 0x10] | r3 = *((r5 + 0x10));
| if (r3 != 0) {
0x0001d68e cbz r3, 0x1d6a2 |
| label_3:
0x0001d690 ldr r3, [pc, 0x74] | r3 = *(0x1d708);
0x0001d692 mov r0, r8 | r0 = r8;
0x0001d694 ldr r2, [pc, 0x74] |
0x0001d696 mov r1, sb | r1 = sb;
0x0001d698 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x0001d69a add r2, pc | r2 = 0x3adaa;
0x0001d69c str r3, [sp, 4] | var_4h = r3;
0x0001d69e blx 0xa000 | fcn_0000a000 ();
| }
0x0001d6a2 ldr r3, [sp] | r3 = *(sp);
0x0001d6a4 movs r0, 0 | r0 = 0;
0x0001d6a6 str.w sb, [r3] | __asm ("str.w sb, [r3]");
0x0001d6aa add sp, 0xc |
0x0001d6ac pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_7:
0x0001d6b0 cmp r4, 4 |
| if (r4 == 4) {
0x0001d6b2 beq 0x1d638 | goto label_0;
| }
0x0001d6b4 tst.w fp, 0x10 |
| if ((fp & 0x10) != 0) {
0x0001d6b8 bne 0x1d638 | goto label_0;
| }
0x0001d6ba ldr r2, [pc, 0x48] | r2 = *(0x1d706);
0x0001d6bc ldr r2, [r6, r2] | r2 = *((r6 + r2));
0x0001d6be ldr r5, [r2] | r5 = *(0x1d706);
0x0001d6c0 cmp r5, 0 |
| if (r5 == 0) {
0x0001d6c2 beq 0x1d638 | goto label_0;
| }
0x0001d6c4 ldr r4, [r5] | r4 = *(r5);
0x0001d6c6 mov r3, fp | r3 = fp;
0x0001d6c8 mov r1, sl | r1 = sl;
0x0001d6ca mov r2, r8 | r2 = r8;
0x0001d6cc mov r0, sb | r0 = sb;
0x0001d6ce blx r4 | r0 = uint32_t (*r4)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x0001d6d0 cmp r0, 0 |
| if (r0 != 0) {
0x0001d6d2 bne 0x1d640 | goto label_1;
| }
0x0001d6d4 str.w r5, [sb, 0x38] | __asm ("str.w r5, [sb, 0x38]");
0x0001d6d8 b 0x1d688 | goto label_2;
| label_8:
0x0001d6da add.w r4, sb, 0x18 | r4 = sb + 0x18;
0x0001d6de mov r2, sb | r2 = sb;
0x0001d6e0 ldr r0, [r2], 0x10 | r0 = *(r2);
| r2 += 0x10;
0x0001d6e4 mov r1, r4 | r1 = r4;
0x0001d6e6 blx 0xa240 | r0 = fcn_0000a240 ();
0x0001d6ea cmp r0, 0 |
| if (r0 != 0) {
0x0001d6ec bne 0x1d640 | goto label_1;
| }
0x0001d6ee mov r1, r4 | r1 = r4;
0x0001d6f0 mov r0, sb | r0 = sb;
0x0001d6f2 blx 0xae1c | r0 = fcn_0000ae1c ();
0x0001d6f6 cmp r0, 0 |
| if (r0 == 0) {
0x0001d6f8 beq 0x1d690 | goto label_3;
| }
0x0001d6fa b 0x1d640 | 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/lib/libapr-1.so.0.7.2 @ 0x18998 */
| #include <stdint.h>
|
; (fcn) sym.apr_pool_destroy () | void apr_pool_destroy (int16_t arg1, int16_t arg2, int16_t arg3) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x00018998 push.w {r3, r4, r5, r6, r7, r8, sb, lr} |
0x0001899c mov r4, r0 | r4 = r0;
0x0001899e ldr r3, [r0, 0x38] | r3 = *((r0 + 0x38));
| if (r3 == 0) {
0x000189a0 cbz r3, 0x189b2 | goto label_5;
| }
| do {
0x000189a2 ldr r1, [r3] | r1 = *(r3);
0x000189a4 ldr r2, [r3, 8] | r2 = *((r3 + 8));
0x000189a6 str r1, [r4, 0x38] | *((r4 + 0x38)) = r1;
0x000189a8 ldr r0, [r3, 4] | r0 = *((r3 + 4));
0x000189aa blx r2 | uint32_t (*r2)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x000189ac ldr r3, [r4, 0x38] | r3 = *((r4 + 0x38));
0x000189ae cmp r3, 0 |
0x000189b0 bne 0x189a2 |
| } while (r3 != 0);
| label_5:
0x000189b2 ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x000189b4 movs r3, 0 | r3 = 0;
0x000189b6 str r3, [r4, 0x38] | *((r4 + 0x38)) = r3;
| if (r0 == 0) {
0x000189b8 cbz r0, 0x189d2 | goto label_6;
| }
| do {
0x000189ba bl 0x18998 | apr_pool_destroy ();
0x000189be ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x000189c0 cmp r0, 0 |
0x000189c2 bne 0x189ba |
| } while (r0 != 0);
0x000189c4 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
| if (r3 == 0) {
0x000189c6 cbz r3, 0x189d8 | goto label_7;
| }
| do {
0x000189c8 ldr r1, [r3] | r1 = *(r3);
0x000189ca ldr r2, [r3, 8] | r2 = *((r3 + 8));
0x000189cc str r1, [r4, 0x10] | *((r4 + 0x10)) = r1;
0x000189ce ldr r0, [r3, 4] | r0 = *((r3 + 4));
0x000189d0 blx r2 | uint32_t (*r2)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
| label_6:
0x000189d2 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x000189d4 cmp r3, 0 |
0x000189d6 bne 0x189c8 |
| } while (r3 != 0);
| label_7:
0x000189d8 ldr r0, [r4, 0x1c] | r0 = *((r4 + 0x1c));
| if (r0 != 0) {
0x000189da cbz r0, 0x189e0 |
0x000189dc bl 0x184e0 | fcn_000184e0 (r0);
| }
0x000189e0 ldr r3, [r4] | r3 = *(r4);
| if (r3 != 0) {
0x000189e2 cbz r3, 0x18a04 |
0x000189e4 ldr r3, [r3, 0x18] | r3 = *((r3 + 0x18));
0x000189e6 ldr r0, [r3, 0xc] | r0 = *((r3 + 0xc));
| if (r0 != 0) {
0x000189e8 cbz r0, 0x189ee |
0x000189ea blx 0xa3d8 | fcn_0000a3d8 ();
| }
0x000189ee ldrd r3, r2, [r4, 8] | __asm ("ldrd r3, r2, [r4, 8]");
0x000189f2 str r3, [r2] | *(r2) = r3;
| if (r3 != 0) {
0x000189f4 cbz r3, 0x189f8 |
0x000189f6 str r2, [r3, 0xc] | *((r3 + 0xc)) = r2;
| }
0x000189f8 ldr r3, [r4] | r3 = *(r4);
0x000189fa ldr r3, [r3, 0x18] | r3 = *((r3 + 0x18));
0x000189fc ldr r0, [r3, 0xc] | r0 = *((r3 + 0xc));
| if (r0 == 0) {
0x000189fe cbz r0, 0x18a04 | goto label_8;
| }
0x00018a00 blx 0xa090 | fcn_0000a090 ();
| }
| label_8:
0x00018a04 ldr r6, [r4, 0x30] | r6 = *((r4 + 0x30));
0x00018a06 movs r5, 0 | r5 = 0;
0x00018a08 ldr r7, [r4, 0x18] | r7 = *((r4 + 0x18));
0x00018a0a ldr r3, [r6, 4] | r3 = *((r6 + 4));
0x00018a0c mov r0, r7 | r0 = r7;
0x00018a0e str r5, [r3] | *(r3) = r5;
0x00018a10 blx 0xa98c | r0 = fcn_0000a98c ();
0x00018a14 cmp r4, r0 |
| if (r4 == r0) {
0x00018a16 beq 0x18ae0 | goto label_9;
| }
| label_4:
0x00018a18 ldr r0, [r7, 0xc] | r0 = *((r7 + 0xc));
| if (r0 != 0) {
0x00018a1a cbz r0, 0x18a20 |
0x00018a1c blx 0xa3d8 | fcn_0000a3d8 ();
| }
0x00018a20 ldrd sb, lr, [r7] | __asm ("ldrd sb, lr, [r7]");
0x00018a24 movs r5, 0 | r5 = 0;
0x00018a26 ldr r1, [r7, 8] | r1 = *((r7 + 8));
| do {
| label_1:
0x00018a28 mov r3, r6 | r3 = r6;
0x00018a2a ldr r6, [r6] | r6 = *(r6);
0x00018a2c ldr r2, [r3, 8] | r2 = *((r3 + 8));
0x00018a2e add.w ip, r2, 1 |
0x00018a32 cmp.w lr, 0 |
| if (lr == 0) {
0x00018a36 beq 0x18a8c | goto label_10;
| }
0x00018a38 cmp r1, ip |
0x00018a3a itt lo |
| if (r1 >= ip) {
0x00018a3c strlo r5, [r3] | *(r3) = r5;
| }
| if (r1 >= ip) {
0x00018a3e movlo r5, r3 | r5 = r3;
| }
| if (r1 > ip) {
0x00018a40 blo 0x18a5e |
0x00018a42 cmp r2, 0x13 |
| if (r2 > 0x13) {
0x00018a44 bhi 0x18ac6 | goto label_11;
| }
0x00018a46 add.w r0, r7, r2, lsl 2 | r0 = r7 + (r2 << 2);
0x00018a4a ldr.w r8, [r0, 0x14] | r8 = *((r0 + 0x14));
0x00018a4e str.w r8, [r3] | __asm ("str.w r8, [r3]");
0x00018a52 cmp.w r8, 0 |
| if (r8 == 0) {
0x00018a56 beq 0x18ace | goto label_12;
| }
0x00018a58 str r3, [r0, 0x14] | *((r0 + 0x14)) = r3;
| label_0:
0x00018a5a subs r1, 1 | r1--;
0x00018a5c subs r1, r1, r2 | r1 -= r2;
| }
0x00018a5e cmp r6, 0 |
0x00018a60 bne 0x18a28 |
| } while (r6 != 0);
| label_2:
0x00018a62 ldr r0, [r7, 0xc] | r0 = *((r7 + 0xc));
0x00018a64 str.w sb, [r7] | __asm ("str.w sb, [r7]");
0x00018a68 str r1, [r7, 8] | *((r7 + 8)) = r1;
| if (r0 != 0) {
0x00018a6a cbz r0, 0x18a70 |
0x00018a6c blx 0xa090 | fcn_0000a090 ();
| }
| if (r5 == 0) {
0x00018a70 cbz r5, 0x18a7e | goto label_13;
| }
| do {
0x00018a72 mov r0, r5 | r0 = r5;
0x00018a74 ldr r5, [r5] | r5 = *(r5);
0x00018a76 blx 0xa470 | fcn_0000a470 ();
0x00018a7a cmp r5, 0 |
0x00018a7c bne 0x18a72 |
| } while (r5 != 0);
| label_13:
0x00018a7e mov r0, r7 | r0 = r7;
0x00018a80 blx 0xa98c | r0 = fcn_0000a98c ();
0x00018a84 cmp r4, r0 |
| if (r4 == r0) {
0x00018a86 beq 0x18ad6 | goto label_14;
| }
0x00018a88 pop.w {r3, r4, r5, r6, r7, r8, sb, pc} |
| label_10:
0x00018a8c cmp r2, 0x13 |
| if (r2 > 0x13) {
0x00018a8e bhi 0x18ab2 | goto label_15;
| }
0x00018a90 add.w r0, r7, r2, lsl 2 | r0 = r7 + (r2 << 2);
0x00018a94 ldr.w r8, [r0, 0x14] | r8 = *((r0 + 0x14));
0x00018a98 str.w r8, [r3] | __asm ("str.w r8, [r3]");
0x00018a9c cmp.w r8, 0 |
| if (r8 == 0) {
0x00018aa0 beq 0x18ace | goto label_12;
| }
| label_3:
0x00018aa2 cmp r1, ip |
0x00018aa4 str r3, [r0, 0x14] | *((r0 + 0x14)) = r3;
0x00018aa6 it lo |
| if (r1 < ip) {
0x00018aa8 movlo r1, 0 | r1 = 0;
| goto label_16;
| }
| if (r1 >= ip) {
| label_16:
0x00018aaa bhs 0x18a5a | goto label_0;
| }
0x00018aac cmp r6, 0 |
| if (r6 != 0) {
0x00018aae bne 0x18a28 | goto label_1;
| }
0x00018ab0 b 0x18a62 | goto label_2;
| label_15:
0x00018ab2 ldr r0, [r7, 0x14] | r0 = *((r7 + 0x14));
0x00018ab4 cmp r1, ip |
0x00018ab6 it lo |
| if (r1 >= ip) {
0x00018ab8 movlo r1, lr | r1 = lr;
| }
0x00018aba str r0, [r3] | *(r3) = r0;
0x00018abc str r3, [r7, 0x14] | *((r7 + 0x14)) = r3;
| if (r1 >= ip) {
0x00018abe bhs 0x18a5a | goto label_0;
| }
0x00018ac0 cmp r6, 0 |
| if (r6 != 0) {
0x00018ac2 bne 0x18a28 | goto label_1;
| }
0x00018ac4 b 0x18a62 | goto label_2;
| label_11:
0x00018ac6 ldr r0, [r7, 0x14] | r0 = *((r7 + 0x14));
0x00018ac8 str r0, [r3] | *(r3) = r0;
0x00018aca str r3, [r7, 0x14] | *((r7 + 0x14)) = r3;
0x00018acc b 0x18a5a | goto label_0;
| label_12:
0x00018ace cmp sb, r2 |
0x00018ad0 it lo |
| if (sb >= r2) {
0x00018ad2 movlo sb, r2 | sb = r2;
| }
0x00018ad4 b 0x18aa2 | goto label_3;
| label_14:
0x00018ad6 mov r0, r7 | r0 = r7;
0x00018ad8 pop.w {r3, r4, r5, r6, r7, r8, sb, lr} |
0x00018adc b.w 0xa4e4 | void (*0xa4e4)() ();
| label_9:
0x00018ae0 mov r1, r5 | r1 = r5;
0x00018ae2 mov r0, r7 | r0 = r7;
0x00018ae4 blx 0x9d88 | fcn_00009d88 ();
0x00018ae8 b 0x18a18 | 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/lib/libapr-1.so.0.7.2 @ 0x193b8 */
| #include <stdint.h>
|
; (fcn) sym.apr_pool_destroy_debug () | void apr_pool_destroy_debug () {
0x000193b8 b.w 0xa55c | return void (*0xa55c)() ();
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x1f2f0 */
| #include <stdint.h>
|
; (fcn) sym.apr_proc_create () | void apr_proc_create (int16_t arg_48h, int16_t arg_4ch, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_1h;
| 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;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0001f2f0 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001f2f4 sub sp, 0x24 |
0x0001f2f6 str r1, [sp] | *(sp) = r1;
0x0001f2f8 mov r8, r2 | r8 = r2;
0x0001f2fa mov r5, r0 | r5 = r0;
0x0001f2fc add r6, sp, 8 | r6 += var_8h;
0x0001f2fe ldr r1, [pc, 0x3e8] |
0x0001f300 ldr r2, [pc, 0x3e8] | r2 = *(0x1f6ec);
0x0001f302 ldr.w sb, [pc, 0x3ec] |
0x0001f306 add r1, pc | r1 = 0x3e9f4;
0x0001f308 ldr r4, [sp, 0x48] | r4 = *(arg_48h);
0x0001f30a ldr r2, [r1, r2] |
0x0001f30c add sb, pc | sb = 0x3ea02;
0x0001f30e ldr.w sl, [sp, 0x4c] | sl = *(arg_4ch);
0x0001f312 ldr r2, [r2] | r2 = *(0x3e9f4);
0x0001f314 str r2, [sp, 0x1c] | var_1ch = r2;
0x0001f316 mov.w r2, 0 | r2 = 0;
0x0001f31a movs r2, 0 | r2 = 0;
0x0001f31c str r2, [sp, 8] | var_8h = r2;
| if (r3 != 0) {
0x0001f31e cbz r3, 0x1f322 |
0x0001f320 mov r6, r3 | r6 = r3;
| }
0x0001f322 adds r3, r4, 4 | r3 = r4 + 4;
0x0001f324 ldr r2, [r4, 0x14] | r2 = *((r4 + 0x14));
0x0001f326 vld1.32 {d16}, [r3] | __asm ("vld1.32 {d16}, [r3]");
0x0001f32a add.w r3, r4, 0xc | r3 = r4 + 0xc;
0x0001f32e vld1.32 {d17}, [r3] | __asm ("vld1.32 {d17}, [r3]");
0x0001f332 ldr r3, [r4, 0x3c] | r3 = *((r4 + 0x3c));
0x0001f334 vtrn.32 d16, d17 | __asm ("vtrn.32 d16, d17");
0x0001f338 str r2, [r5, 0xc] | *((r5 + 0xc)) = r2;
0x0001f33a adds r2, r5, 4 | r2 = r5 + 4;
0x0001f33c vst1.32 {d16}, [r2] | __asm ("vst1.32 {d16}, [r2]");
| if (r3 != 0) {
0x0001f340 cbz r3, 0x1f366 |
0x0001f342 ldr r0, [r4, 0x1c] | r0 = *((r4 + 0x1c));
| if (r0 != 0) {
0x0001f344 cbz r0, 0x1f352 |
0x0001f346 movs r1, 1 | r1 = 1;
0x0001f348 blx 0xa4c0 | fcn_0000a4c0 ();
0x0001f34c adds r0, 1 | r0++;
| if (r0 == 1) {
0x0001f34e beq.w 0x1f4d0 | goto label_16;
| }
| }
0x0001f352 ldr r3, [r4, 0x20] | r3 = *((r4 + 0x20));
0x0001f354 subs r3, 1 | r3--;
0x0001f356 cmp r3, 1 |
| if (r3 < 1) {
0x0001f358 bls.w 0x1f4c2 | goto label_17;
| }
0x0001f35c ldr r3, [sp] | r3 = *(sp);
0x0001f35e ldrb r3, [r3] | r3 = *(r3);
0x0001f360 cmp r3, 0x2f |
| if (r3 == 0x2f) {
0x0001f362 beq.w 0x1f4c2 | goto label_17;
| }
| }
| label_0:
0x0001f366 blx 0xae58 | r0 = fcn_0000ae58 ();
0x0001f36a cmp r0, 0 |
0x0001f36c str r0, [r5] | *(r5) = r0;
| if (r0 < 0) {
0x0001f36e blt.w 0x1f4d0 | goto label_16;
| }
0x0001f372 ldr r0, [r4, 8] | r0 = *((r4 + 8));
| if (r0 != 0) {
0x0001f374 beq 0x1f39c |
| if (r0 != 0) {
0x0001f376 cbz r0, 0x1f380 |
0x0001f378 ldr r3, [r0, 4] | r3 = *((r0 + 4));
0x0001f37a adds r3, 1 | r3++;
| if (r3 != 1) {
0x0001f37c bne.w 0x1f620 | goto label_18;
| }
| }
| label_5:
0x0001f380 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
| if (r0 != 0) {
0x0001f382 cbz r0, 0x1f38c |
0x0001f384 ldr r3, [r0, 4] | r3 = *((r0 + 4));
0x0001f386 adds r3, 1 | r3++;
| if (r3 != 1) {
0x0001f388 bne.w 0x1f61a | goto label_19;
| }
| }
| label_4:
0x0001f38c ldr r0, [r4, 0x18] | r0 = *((r4 + 0x18));
| if (r0 != 0) {
0x0001f38e cbz r0, 0x1f398 |
0x0001f390 ldr r3, [r0, 4] | r3 = *((r0 + 4));
0x0001f392 adds r3, 1 | r3++;
| if (r3 != 1) {
0x0001f394 bne.w 0x1f626 | goto label_20;
| }
| }
0x0001f398 movs r0, 0 | r0 = 0;
0x0001f39a b 0x1f4d6 | goto label_6;
| }
| if (r0 != 0) {
0x0001f39c cbz r0, 0x1f3b2 |
0x0001f39e blx 0xb154 | fcn_0000b154 ();
0x0001f3a2 ldr r3, [pc, 0x350] | r3 = *(0x1f6f6);
0x0001f3a4 ldr r1, [r4, 8] | r1 = *((r4 + 8));
0x0001f3a6 ldr.w r3, [sb, r3] | r3 = *((sb + r3));
0x0001f3aa mov r2, r3 | r2 = r3;
0x0001f3ac str r3, [sp, 4] | var_4h = r3;
0x0001f3ae blx 0xaa20 | fcn_0000aa20 ();
| }
0x0001f3b2 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
| if (r0 != 0) {
0x0001f3b4 cbz r0, 0x1f3ca |
0x0001f3b6 blx 0xb154 | fcn_0000b154 ();
0x0001f3ba ldr r3, [pc, 0x338] | r3 = *(0x1f6f6);
0x0001f3bc ldr r1, [r4, 0x10] | r1 = *((r4 + 0x10));
0x0001f3be ldr.w r3, [sb, r3] | r3 = *((sb + r3));
0x0001f3c2 mov r2, r3 | r2 = r3;
0x0001f3c4 str r3, [sp, 4] | var_4h = r3;
0x0001f3c6 blx 0xaa20 | fcn_0000aa20 ();
| }
0x0001f3ca ldr r0, [r4, 0x18] | r0 = *((r4 + 0x18));
| if (r0 != 0) {
0x0001f3cc cbz r0, 0x1f3e2 |
0x0001f3ce blx 0xb154 | fcn_0000b154 ();
0x0001f3d2 ldr r3, [pc, 0x320] | r3 = *(0x1f6f6);
0x0001f3d4 ldr r1, [r4, 0x18] | r1 = *((r4 + 0x18));
0x0001f3d6 ldr.w r3, [sb, r3] | r3 = *((sb + r3));
0x0001f3da mov r2, r3 | r2 = r3;
0x0001f3dc str r3, [sp, 4] | var_4h = r3;
0x0001f3de blx 0xaa20 | fcn_0000aa20 ();
| }
0x0001f3e2 blx 0xaf38 | fcn_0000af38 ();
0x0001f3e6 ldr r3, [r4, 8] | r3 = *((r4 + 8));
| if (r3 != 0) {
0x0001f3e8 cbz r3, 0x1f400 |
0x0001f3ea ldr r0, [r3, 4] | r0 = *((r3 + 4));
0x0001f3ec adds r1, r0, 1 | r1 = r0 + 1;
| if (r1 == r0) {
0x0001f3ee beq.w 0x1f670 | goto label_21;
| }
| if (r0 == 0) {
0x0001f3f2 cbz r0, 0x1f400 | goto label_10;
| }
0x0001f3f4 movs r1, 0 | r1 = 0;
0x0001f3f6 blx 0xadb4 | sem_close ();
0x0001f3fa ldr r0, [r4, 8] | r0 = *((r4 + 8));
0x0001f3fc blx 0xb108 | fcn_0000b108 ();
| }
| label_10:
0x0001f400 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
| if (r3 != 0) {
0x0001f402 cbz r3, 0x1f41c |
0x0001f404 ldr r0, [r3, 4] | r0 = *((r3 + 4));
0x0001f406 adds r2, r0, 1 | r2 = r0 + 1;
| if (r2 == r0) {
0x0001f408 beq.w 0x1f678 | goto label_22;
| }
0x0001f40c cmp r0, 1 |
| if (r0 == 1) {
0x0001f40e beq 0x1f41c | goto label_11;
| }
0x0001f410 movs r1, 1 | r1 = 1;
0x0001f412 blx 0xadb4 | sem_close ();
0x0001f416 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x0001f418 blx 0xb108 | fcn_0000b108 ();
| }
| label_11:
0x0001f41c ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
| if (r3 != 0) {
0x0001f41e cbz r3, 0x1f438 |
0x0001f420 ldr r0, [r3, 4] | r0 = *((r3 + 4));
0x0001f422 adds r3, r0, 1 | r3 = r0 + 1;
| if (r3 == r0) {
0x0001f424 beq.w 0x1f668 | goto label_23;
| }
0x0001f428 cmp r0, 2 |
| if (r0 == 2) {
0x0001f42a beq 0x1f438 | goto label_9;
| }
0x0001f42c movs r1, 2 | r1 = 2;
0x0001f42e blx 0xadb4 | sem_close ();
0x0001f432 ldr r0, [r4, 0x18] | r0 = *((r4 + 0x18));
0x0001f434 blx 0xb108 | fcn_0000b108 ();
| }
| label_9:
0x0001f438 movs r1, 0 | r1 = 0;
0x0001f43a movs r0, 0x11 | r0 = 0x11;
0x0001f43c blx 0xaac8 | fcn_0000aac8 ();
0x0001f440 ldr r0, [r4, 0x1c] | r0 = *((r4 + 0x1c));
| if (r0 != 0) {
0x0001f442 cbz r0, 0x1f44e |
0x0001f444 blx 0xac14 | fcn_0000ac14 ();
0x0001f448 adds r0, 1 | r0++;
| if (r0 == 1) {
0x0001f44a beq.w 0x1f6ce | goto label_24;
| }
| }
0x0001f44e blx 0x9e80 | r0 = fcn_00009e80 ();
| if (r0 != 0) {
0x0001f452 cbnz r0, 0x1f47a | goto label_25;
| }
0x0001f454 ldr r5, [r4, 0x48] | r5 = *((r4 + 0x48));
| if (r5 == 0) {
0x0001f456 cbz r5, 0x1f47a | goto label_25;
| }
0x0001f458 movw sb, 0x1187 |
0x0001f45c movt sb, 1 | sb = 0x11187;
| do {
0x0001f460 ldrd r2, r3, [r4, 0x40] | __asm ("ldrd r2, r3, [r4, 0x40]");
0x0001f464 ldrd r1, r0, [r5, 8] | __asm ("ldrd r1, r0, [r5, 8]");
0x0001f468 ldr r7, [r5, 4] | r7 = *((r5 + 4));
0x0001f46a blx r7 | r0 = uint32_t (*r7)(uint32_t, uint32_t) (r1, r2);
0x0001f46c cmp r0, 0 |
0x0001f46e it ne |
| if (r0 != 0) {
0x0001f470 cmpne r0, sb | __asm ("cmpne r0, sb");
| }
| if (r0 != 0) {
0x0001f472 bne 0x1f4ba | goto label_2;
| }
0x0001f474 ldr r5, [r5] | r5 = *(r5);
0x0001f476 cmp r5, 0 |
0x0001f478 bne 0x1f460 |
| } while (r5 != 0);
| label_25:
0x0001f47a ldr r3, [r4, 0x44] | r3 = *((r4 + 0x44));
0x0001f47c adds r3, 1 | r3++;
| if (r3 != 1) {
0x0001f47e bne.w 0x1f5ec | goto label_26;
| }
| label_3:
0x0001f482 ldr r3, [r4, 0x40] | r3 = *((r4 + 0x40));
0x0001f484 adds r3, 1 | r3++;
| if (r3 != 1) {
0x0001f486 beq 0x1f492 |
0x0001f488 blx 0x9e80 | r0 = fcn_00009e80 ();
0x0001f48c cmp r0, 0 |
| if (r0 == 0) {
0x0001f48e beq.w 0x1f62e | goto label_27;
| }
| }
| label_7:
0x0001f492 ldr r1, [r4, 0x28] | r1 = *((r4 + 0x28));
| if (r1 == 0) {
0x0001f494 cbz r1, 0x1f4f2 | goto label_28;
| }
0x0001f496 movs r0, 0 | r0 = 0;
0x0001f498 blx 0xa130 | r0 = calloc (r0, r1);
| if (r0 == 0) {
0x0001f49c cbz r0, 0x1f4f2 | goto label_28;
| }
| label_1:
0x0001f49e blx 0xb12c | r0 = fcn_0000b12c ();
0x0001f4a2 ldr r3, [r0] | r3 = *(r0);
0x0001f4a4 cmp r3, 0 |
| if (r3 == 0) {
0x0001f4a6 beq 0x1f51c | goto label_29;
| }
0x0001f4a8 ldr r4, [r4, 0x38] | r4 = *((r4 + 0x38));
| if (r4 != 0) {
0x0001f4aa cbz r4, 0x1f4ba |
0x0001f4ac blx 0xb12c | fcn_0000b12c ();
0x0001f4b0 ldr r2, [pc, 0x244] |
0x0001f4b2 ldr r1, [r0] | r1 = *(r0);
0x0001f4b4 mov r0, sl | r0 = sl;
0x0001f4b6 add r2, pc | r2 = 0x3ebb2;
0x0001f4b8 blx r4 | uint32_t (*r4)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
| }
| label_2:
0x0001f4ba mov.w r0, -1 | r0 = -1;
0x0001f4be blx 0xa428 | fcn_0000a428 ();
| label_17:
0x0001f4c2 ldr r0, [sp] | r0 = *(sp);
0x0001f4c4 movs r1, 1 | r1 = 1;
0x0001f4c6 blx 0xa4c0 | fcn_0000a4c0 ();
0x0001f4ca adds r0, 1 | r0++;
| if (r0 != 1) {
0x0001f4cc bne.w 0x1f366 | goto label_0;
| }
| label_16:
0x0001f4d0 blx 0xb12c | r0 = fcn_0000b12c ();
0x0001f4d4 ldr r0, [r0] | r0 = *(r0);
| label_6:
0x0001f4d6 ldr r2, [pc, 0x224] |
0x0001f4d8 ldr r3, [pc, 0x210] | r3 = *(0x1f6ec);
0x0001f4da add r2, pc | r2 = 0x3ebdc;
0x0001f4dc ldr r3, [r2, r3] | r3 = *(0x3ebdc);
0x0001f4de ldr r2, [r3] | r2 = *(0x3ebdc);
0x0001f4e0 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x0001f4e2 eors r2, r3 | r2 ^= r3;
0x0001f4e4 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0001f4e8 bne.w 0x1f6ca | goto label_30;
| }
0x0001f4ec add sp, 0x24 |
0x0001f4ee pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_28:
0x0001f4f2 ldr r1, [r4, 0x30] | r1 = *((r4 + 0x30));
| if (r1 == 0) {
0x0001f4f4 cbz r1, 0x1f500 | goto label_31;
| }
0x0001f4f6 movs r0, 6 | r0 = 6;
0x0001f4f8 blx 0xa130 | r0 = calloc (r0, r1);
0x0001f4fc cmp r0, 0 |
| if (r0 != 0) {
0x0001f4fe bne 0x1f49e | goto label_1;
| }
| label_31:
0x0001f500 ldr r1, [r4, 0x34] | r1 = *((r4 + 0x34));
| if (r1 == 0) {
0x0001f502 cbz r1, 0x1f50e | goto label_32;
| }
0x0001f504 movs r0, 7 | r0 = 7;
0x0001f506 blx 0xa130 | r0 = calloc (r0, r1);
0x0001f50a cmp r0, 0 |
| if (r0 != 0) {
0x0001f50c bne 0x1f49e | goto label_1;
| }
| label_32:
0x0001f50e ldr r1, [r4, 0x2c] | r1 = *((r4 + 0x2c));
| if (r1 == 0) {
0x0001f510 cbz r1, 0x1f51c | goto label_29;
| }
0x0001f512 movs r0, 9 | r0 = 9;
0x0001f514 blx 0xa130 | r0 = calloc (r0, r1);
0x0001f518 cmp r0, 0 |
| if (r0 != 0) {
0x0001f51a bne 0x1f49e | goto label_1;
| }
| label_29:
0x0001f51c ldr r0, [r4, 0x20] | r0 = *((r4 + 0x20));
0x0001f51e bics sb, r0, 4 | __asm ("bics sb, r0, 4");
| if (r0 != 0) {
0x0001f522 bne.w 0x1f652 | goto label_33;
| }
0x0001f526 ldr r3, [pc, 0x1d8] |
0x0001f528 ldr.w r0, [r8] | r0 = *(r8);
0x0001f52c add r3, pc | r3 = 0x3ec32;
0x0001f52e str r3, [sp, 0xc] | var_ch = r3;
0x0001f530 ldr r3, [pc, 0x1d0] |
0x0001f532 str r0, [sp, 4] | var_4h = r0;
0x0001f534 add r3, pc | r3 = 0x3ec3c;
0x0001f536 str r3, [sp, 0x10] | var_10h = r3;
| if (r0 == 0) {
0x0001f538 cbz r0, 0x1f5aa | goto label_12;
| }
0x0001f53a mov r7, r8 | r7 = r8;
0x0001f53c mov r5, r8 | r5 = r8;
0x0001f53e mov fp, sb |
| do {
0x0001f540 blx 0xa6d8 | fcn_0000a6d8 ();
0x0001f544 add r0, sb | r0 += sb;
0x0001f546 add.w fp, fp, 1 |
0x0001f54a add.w sb, r0, 1 | sb = r0 + 1;
0x0001f54e ldr r0, [r5, 4]! | r0 = *((r5 += 4));
0x0001f552 cmp r0, 0 |
0x0001f554 bne 0x1f540 |
| } while (r0 != 0);
0x0001f556 cmp.w fp, 1 |
| if (fp == 1) {
0x0001f55a beq.w 0x1f68c | goto label_34;
| }
0x0001f55e mov r1, sb | r1 = sb;
0x0001f560 mov r0, sl | r0 = sl;
0x0001f562 blx 0xa974 | fcn_0000a974 ();
0x0001f566 ldr.w sb, [r8] | sb = *(r8);
0x0001f56a mov r5, r0 | r5 = r0;
0x0001f56c mov fp, r0 |
0x0001f56e cmp.w sb, 0 |
| if (sb == 0) {
0x0001f572 beq 0x1f5a2 | goto label_35;
| }
| do {
0x0001f574 mov r0, sb | r0 = sb;
0x0001f576 blx 0xa6d8 | r0 = fcn_0000a6d8 ();
0x0001f57a mov r8, r0 | r8 = r0;
0x0001f57c mov r1, sb | r1 = sb;
0x0001f57e mov r0, fp | r0 = fp;
0x0001f580 mov r2, r8 | r2 = r8;
0x0001f582 blx 0xa78c | fcn_0000a78c ();
0x0001f586 mov.w r3, 0x20 | r3 = 0x20;
0x0001f58a strb.w r3, [fp, r8] | *((fp + r8)) = r3;
0x0001f58e mov r3, r7 | r3 = r7;
0x0001f590 ldr sb, [r3, 4]! | sb = *((r3 += 4));
0x0001f594 add r8, fp | r8 += fp;
0x0001f596 add.w fp, r8, 1 |
0x0001f59a mov r7, r3 | r7 = r3;
0x0001f59c cmp.w sb, 0 |
0x0001f5a0 bne 0x1f574 |
| } while (sb != 0);
| label_35:
0x0001f5a2 movs r2, 0 | r2 = 0;
0x0001f5a4 strb r2, [fp, -0x1] | *((fp - 0x1)) = r2;
0x0001f5a8 str r5, [sp, 0x14] | var_14h = r5;
| label_12:
0x0001f5aa movs r3, 0 | r3 = 0;
0x0001f5ac str r3, [sp, 0x18] | var_18h = r3;
0x0001f5ae ldr r3, [r4, 0x24] | r3 = *((r4 + 0x24));
0x0001f5b0 cmp r3, 0 |
| if (r3 != 0) {
0x0001f5b2 bne 0x1f6ac | goto label_36;
| }
| label_13:
0x0001f5b4 ldr r3, [r4, 0x20] | r3 = *((r4 + 0x20));
0x0001f5b6 cmp r3, 0 |
| if (r3 != 0) {
0x0001f5b8 bne 0x1f680 | goto label_37;
| }
0x0001f5ba ldr r0, [pc, 0x14c] |
0x0001f5bc mov r2, r6 | r2 = r6;
0x0001f5be add r1, sp, 0xc | r1 += var_ch;
0x0001f5c0 add r0, pc | r0 = 0x3ecce;
0x0001f5c2 blx 0xab34 | fcn_0000ab34 ();
| label_8:
0x0001f5c6 ldr r3, [r4, 0x38] | r3 = *((r4 + 0x38));
0x0001f5c8 cmp r3, 0 |
| if (r3 == 0) {
0x0001f5ca beq.w 0x1f4ba | goto label_2;
| }
0x0001f5ce ldr r1, [pc, 0x13c] |
0x0001f5d0 mov r0, sl | r0 = sl;
0x0001f5d2 ldr r2, [sp] | r2 = *(sp);
0x0001f5d4 add r1, pc | r1 = 0x3ece6;
0x0001f5d6 blx 0xa954 | r0 = fcn_0000a954 ();
0x0001f5da mov r5, r0 | r5 = r0;
0x0001f5dc ldr r4, [r4, 0x38] | r4 = *((r4 + 0x38));
0x0001f5de blx 0xb12c | fcn_0000b12c ();
0x0001f5e2 mov r2, r5 | r2 = r5;
0x0001f5e4 ldr r1, [r0] | r1 = *(r0);
0x0001f5e6 mov r0, sl | r0 = sl;
0x0001f5e8 blx r4 | uint32_t (*r4)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x0001f5ea b 0x1f4ba | goto label_2;
| label_26:
0x0001f5ec blx 0x9e80 | r0 = fcn_00009e80 ();
0x0001f5f0 cmp r0, 0 |
| if (r0 != 0) {
0x0001f5f2 bne.w 0x1f482 | goto label_3;
| }
0x0001f5f6 ldr r0, [r4, 0x44] | r0 = *((r4 + 0x44));
0x0001f5f8 blx 0xafb8 | r0 = fcn_0000afb8 ();
0x0001f5fc cmp r0, 0 |
| if (r0 == 0) {
0x0001f5fe beq.w 0x1f482 | goto label_3;
| }
0x0001f602 ldr r4, [r4, 0x38] | r4 = *((r4 + 0x38));
0x0001f604 cmp r4, 0 |
| if (r4 == 0) {
0x0001f606 beq.w 0x1f4ba | goto label_2;
| }
0x0001f60a blx 0xb12c | fcn_0000b12c ();
0x0001f60e ldr r2, [pc, 0x100] |
0x0001f610 ldr r1, [r0] | r1 = *(r0);
0x0001f612 mov r0, sl | r0 = sl;
0x0001f614 add r2, pc | r2 = 0x3ed2a;
0x0001f616 blx r4 | uint32_t (*r4)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x0001f618 b 0x1f4ba | goto label_2;
| label_19:
0x0001f61a blx 0xb108 | fcn_0000b108 ();
0x0001f61e b 0x1f38c | goto label_4;
| label_18:
0x0001f620 blx 0xb108 | fcn_0000b108 ();
0x0001f624 b 0x1f380 | goto label_5;
| label_20:
0x0001f626 blx 0xb108 | fcn_0000b108 ();
0x0001f62a movs r0, 0 | r0 = 0;
0x0001f62c b 0x1f4d6 | goto label_6;
| label_27:
0x0001f62e ldr r0, [r4, 0x40] | r0 = *((r4 + 0x40));
0x0001f630 blx 0xa61c | r0 = fcn_0000a61c ();
0x0001f634 cmp r0, 0 |
| if (r0 == 0) {
0x0001f636 beq.w 0x1f492 | goto label_7;
| }
0x0001f63a ldr r4, [r4, 0x38] | r4 = *((r4 + 0x38));
0x0001f63c cmp r4, 0 |
| if (r4 == 0) {
0x0001f63e beq.w 0x1f4ba | goto label_2;
| }
0x0001f642 blx 0xb12c | fcn_0000b12c ();
0x0001f646 ldr r2, [pc, 0xcc] |
0x0001f648 ldr r1, [r0] | r1 = *(r0);
0x0001f64a mov r0, sl | r0 = sl;
0x0001f64c add r2, pc | r2 = 0x3ed66;
0x0001f64e blx r4 | uint32_t (*r4)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x0001f650 b 0x1f4ba | goto label_2;
| label_33:
0x0001f652 cmp r0, 1 |
0x0001f654 ldr r3, [r4, 0x24] | r3 = *((r4 + 0x24));
| if (r0 == 1) {
0x0001f656 beq 0x1f69e | goto label_38;
| }
0x0001f658 cmp r0, 2 |
| if (r0 == 2) {
0x0001f65a beq 0x1f692 | goto label_39;
| }
0x0001f65c cbnz r3, 0x1f6b4 |
| while (1) {
0x0001f65e ldr r0, [sp] | r0 = *(sp);
0x0001f660 mov r1, r8 | r1 = r8;
0x0001f662 blx 0xa2bc | fcn_0000a2bc ();
0x0001f666 b 0x1f5c6 | goto label_8;
| label_23:
0x0001f668 movs r0, 2 | r0 = 2;
0x0001f66a blx 0xaa44 | fcn_0000aa44 ();
0x0001f66e b 0x1f438 | goto label_9;
| label_21:
0x0001f670 movs r0, 0 | r0 = 0;
0x0001f672 blx 0xaa44 | fcn_0000aa44 ();
0x0001f676 b 0x1f400 | goto label_10;
| label_22:
0x0001f678 movs r0, 1 | r0 = 1;
0x0001f67a blx 0xaa44 | fcn_0000aa44 ();
0x0001f67e b 0x1f41c | goto label_11;
| label_37:
0x0001f680 ldr r0, [pc, 0x94] |
0x0001f682 add r1, sp, 0xc | r1 += var_ch;
0x0001f684 add r0, pc | r0 = 0x3eda0;
0x0001f686 blx 0xa764 | fcn_0000a764 ();
0x0001f68a b 0x1f5c6 | goto label_8;
| label_34:
0x0001f68c ldr r3, [sp, 4] | r3 = var_4h;
0x0001f68e str r3, [sp, 0x14] | var_14h = r3;
0x0001f690 b 0x1f5aa | goto label_12;
| if (r3 != 0) {
| label_39:
0x0001f692 cbnz r3, 0x1f6c2 | goto label_40;
| }
| label_15:
0x0001f694 ldr r0, [sp] | r0 = *(sp);
0x0001f696 mov r1, r8 | r1 = r8;
0x0001f698 blx 0xa764 | fcn_0000a764 ();
0x0001f69c b 0x1f5c6 | goto label_8;
| if (r3 != 0) {
| label_38:
0x0001f69e cbnz r3, 0x1f6bc | goto label_41;
| }
| label_14:
0x0001f6a0 ldr r0, [sp] | r0 = *(sp);
0x0001f6a2 mov r2, r6 | r2 = r6;
0x0001f6a4 mov r1, r8 | r1 = r8;
0x0001f6a6 blx 0xab34 | fcn_0000ab34 ();
0x0001f6aa b 0x1f5c6 | goto label_8;
| label_36:
0x0001f6ac movs r0, 1 | r0 = 1;
0x0001f6ae blx 0xb0c0 | fcn_0000b0c0 ();
0x0001f6b2 b 0x1f5b4 | goto label_13;
0x0001f6b4 movs r0, 1 | r0 = 1;
0x0001f6b6 blx 0xb0c0 | fcn_0000b0c0 ();
0x0001f6ba b 0x1f65e |
| }
| label_41:
0x0001f6bc blx 0xb0c0 | fcn_0000b0c0 ();
0x0001f6c0 b 0x1f6a0 | goto label_14;
| label_40:
0x0001f6c2 movs r0, 1 | r0 = 1;
0x0001f6c4 blx 0xb0c0 | fcn_0000b0c0 ();
0x0001f6c8 b 0x1f694 | goto label_15;
| label_30:
0x0001f6ca blx 0xabc8 | pthread_attr_getdetachstate ();
| label_24:
0x0001f6ce ldr r4, [r4, 0x38] | r4 = *((r4 + 0x38));
0x0001f6d0 cmp r4, 0 |
| if (r4 == 0) {
0x0001f6d2 beq.w 0x1f4ba | goto label_2;
| }
0x0001f6d6 blx 0xb12c | fcn_0000b12c ();
0x0001f6da ldr r2, [pc, 0x40] |
0x0001f6dc ldr r1, [r0] | r1 = *(r0);
0x0001f6de mov r0, sl | r0 = sl;
0x0001f6e0 add r2, pc | r2 = 0x3ee02;
0x0001f6e2 blx r4 | uint32_t (*r4)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x0001f6e4 b 0x1f4ba | 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/lib/libapr-1.so.0.7.2 @ 0x1f270 */
| #include <stdint.h>
|
; (fcn) sym.apr_procattr_user_set () | void apr_procattr_user_set (int16_t arg1, int16_t arg2) {
| int16_t var_0h;
| int16_t var_4h;
| r0 = arg1;
| r1 = arg2;
0x0001f270 push {r4, lr} |
0x0001f272 sub sp, 8 |
0x0001f274 ldr.w lr, [pc, 0x54] |
0x0001f278 mov r2, r1 | r2 = r1;
0x0001f27a mov r4, r0 | r4 = r0;
0x0001f27c mov r1, sp | r1 = sp;
0x0001f27e ldr.w ip, [pc, 0x50] |
0x0001f282 add lr, pc | lr += pc;
0x0001f284 ldr r3, [r0], 0x40 | r3 = *(r0);
| r0 += 0x40;
0x0001f288 ldr.w ip, [lr, ip] | ip = *((lr + ip));
0x0001f28c ldr.w ip, [ip] | ip = *(0x1f2d2);
0x0001f290 str.w ip, [sp, 4] | __asm ("str.w ip, [var_4h]");
0x0001f294 mov.w ip, 0 |
0x0001f298 blx 0xa810 | r0 = fcn_0000a810 ();
| if (r0 != 0) {
0x0001f29c cbnz r0, 0x1f2c0 | goto label_0;
| }
0x0001f29e ldr r3, [r4, 0x44] | r3 = *((r4 + 0x44));
0x0001f2a0 adds r3, 1 | r3++;
0x0001f2a2 itt eq |
| if (r3 != 1) {
0x0001f2a4 ldreq r3, [sp] | r3 = *(sp);
| }
0x0001f2a6 streq r3, [r4, 0x44] | *((r4 + 0x44)) = r3;
| while (1) {
0x0001f2a8 ldr r2, [pc, 0x28] |
0x0001f2aa ldr r3, [pc, 0x24] | r3 = *(0x1f2d2);
0x0001f2ac add r2, pc | r2 = 0x3e584;
0x0001f2ae ldr r3, [r2, r3] | r3 = *(0x3e584);
0x0001f2b0 ldr r2, [r3] | r2 = *(0x3e584);
0x0001f2b2 ldr r3, [sp, 4] | r3 = var_4h;
0x0001f2b4 eors r2, r3 | r2 ^= r3;
0x0001f2b6 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0001f2ba bne 0x1f2c8 | goto label_1;
| }
0x0001f2bc add sp, 8 |
0x0001f2be pop {r4, pc} |
| label_0:
0x0001f2c0 mov.w r3, -1 | r3 = -1;
0x0001f2c4 str r3, [r4, 0x40] | *((r4 + 0x40)) = r3;
0x0001f2c6 b 0x1f2a8 |
| }
| label_1:
0x0001f2c8 blx 0xabc8 | pthread_attr_getdetachstate ();
0x0001f2cc ldrsb r2, [r5, r2] | r2 = *((r5 + r2));
0x0001f2ce movs r0, r0 |
0x0001f2d0 lsls r0, r4, 0x1a | r0 = r4 << 0x1a;
0x0001f2d2 movs r0, r0 |
0x0001f2d4 ldrsb r0, [r0, r2] | r0 = *((r0 + r2));
0x0001f2d6 movs r0, r0 |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x11194 */
| #include <stdint.h>
|
; (fcn) sym.apr_pstrcat () | void apr_pstrcat () {
| int16_t var_0h;
| int32_t var_1ch_2;
| int16_t var_1ch;
| int16_t var_20h;
| int16_t var_40h;
| int16_t var_44h;
| int16_t var_4h;
| int16_t var_4h_2;
0x00011194 teqge r3, pc, lsl 8 | __asm ("teqge r3, pc, lsl 8");
0x00011198 lsls r1, r2, 4 | r1 = r2 << 4;
0x0001119a orrs r0, r0 | r0 |= r0;
0x0001119c sub sp, 0x24 |
0x0001119e ldr r3, [pc, 0xc8] |
0x000111a0 add r4, sp, 0x40 | r4 += var_40h;
0x000111a2 add r2, pc | r2 += pc;
0x000111a4 ldr r8, [r4], 4 | r8 = *(r4);
| r4 += 4;
0x000111a8 ldr r0, [sp, 0x44] | r0 = var_44h;
0x000111aa ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x000111ac adds r5, r4, 4 | r5 += var_4h;
0x000111ae ldr r3, [r3] | r3 = *(0x1126a);
0x000111b0 str r3, [sp, 0x1c] | var_1ch = r3;
0x000111b2 mov.w r3, 0 | r3 = 0;
0x000111b6 str r5, [sp] | *(sp) = r5;
0x000111b8 cmp r0, 0 |
| if (r0 == 0) {
0x000111ba beq 0x1125c | goto label_2;
| }
0x000111bc movs r7, 0 | r7 = 0;
0x000111be mov r6, r7 | r6 = r7;
| do {
0x000111c0 blx 0xa6d8 | fcn_0000a6d8 ();
0x000111c4 cmp r6, 5 |
0x000111c6 mov r3, r0 | r3 = r0;
0x000111c8 it le |
| if (r6 > 5) {
0x000111ca addle r2, sp, 0x20 | r2 += var_20h;
| }
0x000111cc add.w r5, r5, 4 | r5 += var_4h_2;
0x000111d0 it le |
| if (r6 > 5) {
0x000111d2 addle r2, r2, r6, lsl 2 | r2 += (r6 << 2);
| }
0x000111d6 add r7, r3 | r7 += r3;
0x000111d8 itt le |
| if (r6 > 5) {
0x000111da addle r6, 1 | r6++;
| }
| if (r6 > 5) {
0x000111dc strle r0, [r2, -0x1c] | var_1ch_2 = r0;
| }
0x000111e0 ldr r0, [r5, -0x4] | r0 = *((r5 - 0x4));
0x000111e4 str r5, [sp] | *(sp) = r5;
0x000111e6 cmp r0, 0 |
0x000111e8 bne 0x111c0 |
| } while (r0 != 0);
0x000111ea adds r1, r7, 1 | r1 = r7 + 1;
| label_1:
0x000111ec mov r0, r8 | r0 = r8;
0x000111ee adds r4, 4 | r4 += 4;
0x000111f0 blx 0xa974 | fcn_0000a974 ();
0x000111f4 ldr r6, [sp, 0x44] | r6 = var_44h;
0x000111f6 mov sb, r0 | sb = r0;
0x000111f8 mov r7, r0 | r7 = r0;
0x000111fa str r4, [sp] | *(sp) = r4;
| if (r6 == 0) {
0x000111fc cbz r6, 0x11238 | goto label_3;
| }
0x000111fe mov.w r8, 0 | r8 = 0;
0x00011202 b 0x11228 |
| while (r8 <= 5) {
0x00011204 add r3, sp, 0x20 | r3 += var_20h;
0x00011206 add.w r3, r3, r8, lsl 2 | r3 += (r8 << 2);
0x0001120a add.w r8, r8, 1 | r8++;
0x0001120e ldr r5, [r3, -0x1c] | r5 = var_1ch_2;
| label_0:
0x00011212 mov r1, r6 | r1 = r6;
0x00011214 mov r0, r7 | r0 = r7;
0x00011216 adds r4, 4 | r4 += 4;
0x00011218 mov r2, r5 | r2 = r5;
0x0001121a blx 0xa78c | fcn_0000a78c ();
0x0001121e ldr r6, [r4, -0x4] | r6 = *((r4 - 0x4));
0x00011222 add r7, r5 | r7 += r5;
0x00011224 str r4, [sp] | *(sp) = r4;
| if (r6 == 0) {
0x00011226 cbz r6, 0x11238 | goto label_3;
| }
0x00011228 cmp.w r8, 5 |
0x0001122c ble 0x11204 |
| }
0x0001122e mov r0, r6 | r0 = r6;
0x00011230 blx 0xa6d8 | r0 = fcn_0000a6d8 ();
0x00011234 mov r5, r0 | r5 = r0;
0x00011236 b 0x11212 | goto label_0;
| label_3:
0x00011238 movs r3, 0 | r3 = 0;
0x0001123a ldr r2, [pc, 0x30] |
0x0001123c strb r3, [r7] | *(r7) = r3;
0x0001123e ldr r3, [pc, 0x28] | r3 = *(0x1126a);
0x00011240 add r2, pc | r2 = 0x224b2;
0x00011242 ldr r3, [r2, r3] | r3 = *(0x224b2);
0x00011244 ldr r2, [r3] | r2 = *(0x224b2);
0x00011246 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x00011248 eors r2, r3 | r2 ^= r3;
0x0001124a mov.w r3, 0 | r3 = 0;
| if (r2 == r3) {
0x0001124e bne 0x11260 |
0x00011250 mov r0, sb | r0 = sb;
0x00011252 add sp, 0x24 |
0x00011254 pop.w {r4, r5, r6, r7, r8, sb, lr} |
0x00011258 add sp, 0x10 |
0x0001125a bx lr | return;
| label_2:
0x0001125c movs r1, 1 | r1 = 1;
0x0001125e b 0x111ec | goto label_1;
| }
0x00011260 blx 0xabc8 | pthread_attr_getdetachstate ();
0x00011264 adds r7, 0x8a | r7 += 0x8a;
0x00011266 movs r1, r0 | r1 = r0;
0x00011268 lsls r0, r4, 0x1a | r0 = r4 << 0x1a;
0x0001126a movs r0, r0 |
0x0001126c adds r6, 0xec | r6 += 0xec;
0x0001126e movs r1, r0 | r1 = r0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x11270 */
| #include <stdint.h>
|
; (fcn) sym.apr_pstrcatv () | void apr_pstrcatv (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00011270 ssub8mi fp, r5, r8 | __asm ("ssub8mi fp, r5, r8");
| if (r2 == 0) {
0x00011274 cbz r2, 0x112c4 | goto label_2;
| }
0x00011276 mov ip, r0 |
0x00011278 mov r4, r1 | r4 = r1;
0x0001127a movs r6, 0 | r6 = 0;
| do {
0x0001127c ldr r7, [r1, 4] | r7 = *((r1 + 4));
0x0001127e subs r2, 1 | r2--;
0x00011280 add.w r1, r1, 8 | r1 += 8;
0x00011284 add r6, r7 | r6 += r7;
0x00011286 bne 0x1127c |
| } while (r2 != 1);
0x00011288 adds r1, r6, 1 | r1 = r6 + 1;
| if (r3 == 0) {
0x0001128a cbz r3, 0x112ba | goto label_3;
| }
0x0001128c str r6, [r3] | *(r3) = r6;
0x0001128e mov r0, ip | r0 = ip;
0x00011290 blx 0xa974 | r0 = fcn_0000a974 ();
0x00011294 mov r6, r0 | r6 = r0;
| label_0:
0x00011296 adds r4, 8 | r4 += 8;
0x00011298 mov r3, r6 | r3 = r6;
| do {
0x0001129a ldrd r1, r2, [r4, -0x8] | __asm ("ldrd r1, r2, [r4, -0x8]");
0x0001129e mov r0, r3 | r0 = r3;
0x000112a0 adds r4, 8 | r4 += 8;
0x000112a2 blx 0xa78c | fcn_0000a78c ();
0x000112a6 ldr r2, [r4, -0xc] | r2 = *((r4 - 0xc));
0x000112aa subs r5, 1 | r5--;
0x000112ac mov r3, r0 | r3 = r0;
0x000112ae add r3, r2 | r3 += r2;
0x000112b0 bne 0x1129a |
| } while (r5 != 1);
| do {
| label_1:
0x000112b2 movs r2, 0 | r2 = 0;
0x000112b4 mov r0, r6 | r0 = r6;
0x000112b6 strb r2, [r3] | *(r3) = r2;
0x000112b8 pop {r3, r4, r5, r6, r7, pc} |
| label_3:
0x000112ba mov r0, ip | r0 = ip;
0x000112bc blx 0xa974 | r0 = fcn_0000a974 ();
0x000112c0 mov r6, r0 | r6 = r0;
0x000112c2 b 0x11296 | goto label_0;
| if (r3 == 0) {
| label_2:
0x000112c4 cbz r3, 0x112d4 | goto label_4;
| }
0x000112c6 str r5, [r3] | *(r3) = r5;
0x000112c8 movs r1, 1 | r1 = 1;
0x000112ca blx 0xa974 | r0 = fcn_0000a974 ();
0x000112ce mov r3, r0 | r3 = r0;
0x000112d0 mov r6, r0 | r6 = r0;
0x000112d2 b 0x112b2 |
| } while (1);
| label_4:
0x000112d4 movs r1, 1 | r1 = 1;
0x000112d6 blx 0xa974 | r0 = fcn_0000a974 ();
0x000112da mov r3, r0 | r3 = r0;
0x000112dc mov r6, r0 | r6 = r0;
0x000112de b 0x112b2 | 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/lib/libapr-1.so.0.7.2 @ 0x18dd8 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
| #define SWAP32(n) ((uint32_t) (((n & 0x000000ff) << 24) | \
| ((n & 0x0000ff00) << 8) | \
| ((n & 0x00ff0000) >> 8) | \
| ((n & 0xff000000) >> 24)))
|
; (fcn) sym.apr_pvsprintf () | void apr_pvsprintf (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h_2;
| int16_t var_4h_2;
| int16_t var_ch;
| int16_t var_0h;
| int16_t var_4h;
| int32_t var_8h;
| int32_t var_8h_2;
| floating_point * iptr;
| int16_t var_18h;
| int16_t var_20h;
| int16_t var_24h;
| int16_t var_2ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x00018dd8 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00018ddc mov r7, r0 | r7 = r0;
0x00018dde ldr r4, [pc, 0x290] |
0x00018de0 mov r8, r2 | r8 = r2;
0x00018de2 sub sp, 0x30 |
0x00018de4 mov r6, r1 | r6 = r1;
0x00018de6 ldr r0, [r0, 0x2c] | r0 = *((r0 + 0x2c));
0x00018de8 ldr r2, [pc, 0x288] | r2 = *(0x19074);
0x00018dea add r4, pc | r4 = 0x31e60;
0x00018dec ldr r2, [r4, r2] |
0x00018dee ldrd r5, r4, [r0, 0x10] | __asm ("ldrd r5, r4, [r0, 0x10]");
0x00018df2 ldr r2, [r2] | r2 = *(0x31e60);
0x00018df4 str r2, [sp, 0x2c] | var_2ch = r2;
0x00018df6 mov.w r2, 0 | r2 = 0;
0x00018dfa strd r0, r7, [sp, 8] | __asm ("strd r0, r7, [var_8h]");
0x00018dfe subs r0, r4, 1 | r0 = r4 - 1;
0x00018e00 str r5, [sp] | *(sp) = r5;
0x00018e02 str r0, [sp, 4] | var_4h = r0;
0x00018e04 cmp r5, r4 |
0x00018e06 vld1.64 {d16, d17}, [sp:0x40] | __asm ("vld1.64 {d16, d17}, [sp:0x40]");
0x00018e0a mov.w r0, 0 | r0 = 0;
0x00018e0e add r4, sp, 0x10 | r4 += iptr;
0x00018e10 strb.w r0, [sp, 0x20] | var_20h = r0;
0x00018e14 vstr d16, [sp, 0x10] | __asm ("vstr d16, [sp, 0x10]");
0x00018e18 vstr d17, [sp, 0x18] | __asm ("vstr d17, [sp, 0x18]");
0x00018e1c str r0, [sp, 0x24] | var_24h = r0;
| if (r5 == r4) {
0x00018e1e beq.w 0x18f90 | goto label_10;
| }
| label_4:
0x00018e22 ldr r0, [pc, 0x254] |
0x00018e24 mov r3, r8 | r3 = r8;
0x00018e26 mov r2, r6 | r2 = r6;
0x00018e28 mov r1, r4 | r1 = r4;
0x00018e2a add r0, pc | r0 = 0x31ea8;
0x00018e2c blx 0xa2b0 | modf (r0, r1);
0x00018e30 adds r0, 1 | r0++;
| if (r0 == 1) {
0x00018e32 beq.w 0x18f9c | goto label_11;
| }
0x00018e36 ldr r3, [sp, 0x10] | r3 = iptr;
0x00018e38 movs r2, 0 | r2 = 0;
0x00018e3a adds r1, r3, 1 | r1 = r3 + 1;
0x00018e3c str r1, [sp, 0x10] | iptr = r1;
0x00018e3e strb r2, [r3] | *(r3) = r2;
0x00018e40 ldr r2, [sp, 0x18] | r2 = var_18h;
0x00018e42 ldr r3, [sp, 0x10] | r3 = iptr;
0x00018e44 ldr r4, [sp, 0x24] | r4 = var_24h;
0x00018e46 ldr r6, [r2, 0x10] | r6 = *((r2 + 0x10));
0x00018e48 subs r3, r3, r6 | r3 -= r6;
0x00018e4a adds r3, 7 | r3 += 7;
0x00018e4c bic r3, r3, 7 | r3 = BIT_MASK (r3, 7);
0x00018e50 add r3, r6 | r3 += r6;
0x00018e52 str r3, [r2, 0x10] | *((r2 + 0x10)) = r3;
0x00018e54 cmp r4, 0 |
| if (r4 == 0) {
0x00018e56 beq 0x18eca | goto label_12;
| }
0x00018e58 ldr.w r8, [r7, 0x18] | r8 = *((r7 + 0x18));
0x00018e5c ldr.w r0, [r8, 0xc] | r0 = *((r8 + 0xc));
| if (r0 != 0) {
0x00018e60 cbz r0, 0x18e66 |
0x00018e62 blx 0xa3d8 | fcn_0000a3d8 ();
| }
0x00018e66 ldrd sb, lr, [r8] | __asm ("ldrd sb, lr, [r8]");
0x00018e6a movs r5, 0 | r5 = 0;
0x00018e6c ldr.w r1, [r8, 8] | r1 = *((r8 + 8));
| do {
| label_1:
0x00018e70 mov r3, r4 | r3 = r4;
0x00018e72 ldr r4, [r4] | r4 = *(r4);
0x00018e74 ldr r2, [r3, 8] | r2 = *((r3 + 8));
0x00018e76 add.w ip, r2, 1 |
0x00018e7a cmp.w lr, 0 |
| if (lr == 0) {
0x00018e7e beq 0x18f3c | goto label_13;
| }
0x00018e80 cmp r1, ip |
0x00018e82 itt lo |
| if (r1 >= ip) {
0x00018e84 strlo r5, [r3] | *(r3) = r5;
| }
| if (r1 >= ip) {
0x00018e86 movlo r5, r3 | r5 = r3;
| }
| if (r1 > ip) {
0x00018e88 blo 0x18ea6 |
0x00018e8a cmp r2, 0x13 |
| if (r2 > 0x13) {
0x00018e8c bhi 0x18f7c | goto label_14;
| }
0x00018e8e add.w r0, r8, r2, lsl 2 | r0 = r8 + (r2 << 2);
0x00018e92 ldr.w sl, [r0, 0x14] | sl = *((r0 + 0x14));
0x00018e96 str.w sl, [r3] | __asm ("str.w sl, [r3]");
0x00018e9a cmp.w sl, 0 |
| if (sl == 0) {
0x00018e9e beq 0x18f88 | goto label_15;
| }
0x00018ea0 str r3, [r0, 0x14] | *((r0 + 0x14)) = r3;
| label_0:
0x00018ea2 subs r1, 1 | r1--;
0x00018ea4 subs r1, r1, r2 | r1 -= r2;
| }
0x00018ea6 cmp r4, 0 |
0x00018ea8 bne 0x18e70 |
| } while (r4 != 0);
| label_2:
0x00018eaa ldr.w r0, [r8, 0xc] | r0 = *((r8 + 0xc));
0x00018eae str.w sb, [r8] | __asm ("str.w sb, [r8]");
0x00018eb2 str.w r1, [r8, 8] | __asm ("str.w r1, [r8, 8]");
| if (r0 != 0) {
0x00018eb6 cbz r0, 0x18ebc |
0x00018eb8 blx 0xa090 | fcn_0000a090 ();
| }
| if (r5 == 0) {
0x00018ebc cbz r5, 0x18eca | goto label_12;
| }
| do {
0x00018ebe mov r0, r5 | r0 = r5;
0x00018ec0 ldr r5, [r5] | r5 = *(r5);
0x00018ec2 blx 0xa470 | fcn_0000a470 ();
0x00018ec6 cmp r5, 0 |
0x00018ec8 bne 0x18ebe |
| } while (r5 != 0);
| label_12:
0x00018eca ldrb.w r3, [sp, 0x20] | r3 = var_20h;
| if (r3 == 0) {
0x00018ece cbz r3, 0x18f1e | goto label_5;
| }
0x00018ed0 ldr r0, [r7, 0x2c] | r0 = *((r7 + 0x2c));
0x00018ed2 movs r3, 0 | r3 = 0;
0x00018ed4 ldr r4, [sp, 0x18] | r4 = var_18h;
0x00018ed6 ldr r2, [r0, 0x10] | r2 = *((r0 + 0x10));
0x00018ed8 str r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
0x00018eda ldr r3, [r0, 4] | r3 = *((r0 + 4));
0x00018edc str r3, [r4, 4] | *((r4 + 4)) = r3;
0x00018ede str r4, [r3] | *(r3) = r4;
0x00018ee0 ldr r3, [r0, 0x14] | r3 = *((r0 + 0x14));
0x00018ee2 str r0, [r4] | *(r4) = r0;
0x00018ee4 ldr r5, [r0] | r5 = *(r0);
0x00018ee6 subs r3, r3, r2 | r3 -= r2;
0x00018ee8 str r4, [r0, 4] | *((r0 + 4)) = r4;
0x00018eea add.w r3, r3, 0x1000 | r3 += 0x1000;
0x00018eee str r4, [r7, 0x2c] | *((r7 + 0x2c)) = r4;
0x00018ef0 bic r3, r3, 0xff0 | r3 = BIT_MASK (r3, 0xff0);
0x00018ef4 bic r3, r3, 0xf | r3 = BIT_MASK (r3, 0xf);
0x00018ef8 sub.w r3, r3, 0x1000 | r3 -= 0x1000;
0x00018efc asrs r3, r3, 0xc | r3 >>= 0xc;
0x00018efe str r3, [r0, 0xc] | *((r0 + 0xc)) = r3;
0x00018f00 ldr r2, [r5, 0xc] | r2 = *((r5 + 0xc));
0x00018f02 cmp r2, r3 |
| if (r2 < r3) {
0x00018f04 bls 0x18f1e | goto label_5;
| }
0x00018f06 mov r2, r5 | r2 = r5;
| do {
0x00018f08 ldr r2, [r2] | r2 = *(r2);
0x00018f0a ldr r1, [r2, 0xc] | r1 = *((r2 + 0xc));
0x00018f0c cmp r1, r3 |
0x00018f0e bhi 0x18f08 |
| } while (r1 > r3);
0x00018f10 str r5, [r4] | *(r4) = r5;
0x00018f12 str r4, [r5, 4] | *((r5 + 4)) = r4;
0x00018f14 ldr r3, [r2, 4] | r3 = *((r2 + 4));
0x00018f16 str r3, [r0, 4] | *((r0 + 4)) = r3;
0x00018f18 str r0, [r3] | *(r3) = r0;
0x00018f1a str r2, [r0] | *(r0) = r2;
0x00018f1c str r0, [r2, 4] | *((r2 + 4)) = r0;
| label_5:
0x00018f1e ldr r2, [pc, 0x15c] |
0x00018f20 ldr r3, [pc, 0x150] | r3 = *(0x19074);
0x00018f22 add r2, pc | r2 = 0x31fa4;
0x00018f24 ldr r3, [r2, r3] | r3 = *(0x31fa4);
0x00018f26 ldr r2, [r3] | r2 = *(0x31fa4);
0x00018f28 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x00018f2a eors r2, r3 | r2 ^= r3;
0x00018f2c mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00018f30 bne.w 0x1906c | goto label_16;
| }
0x00018f34 mov r0, r6 | r0 = r6;
0x00018f36 add sp, 0x30 |
0x00018f38 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_13:
0x00018f3c cmp r2, 0x13 |
| if (r2 > 0x13) {
0x00018f3e bhi 0x18f62 | goto label_17;
| }
0x00018f40 add.w r0, r8, r2, lsl 2 | r0 = r8 + (r2 << 2);
0x00018f44 ldr.w sl, [r0, 0x14] | sl = *((r0 + 0x14));
0x00018f48 str.w sl, [r3] | __asm ("str.w sl, [r3]");
0x00018f4c cmp.w sl, 0 |
| if (sl == 0) {
0x00018f50 beq 0x18f88 | goto label_15;
| }
| label_3:
0x00018f52 cmp r1, ip |
0x00018f54 str r3, [r0, 0x14] | *((r0 + 0x14)) = r3;
0x00018f56 it lo |
| if (r1 < ip) {
0x00018f58 movlo r1, 0 | r1 = 0;
| goto label_18;
| }
| if (r1 >= ip) {
| label_18:
0x00018f5a bhs 0x18ea2 | goto label_0;
| }
0x00018f5c cmp r4, 0 |
| if (r4 != 0) {
0x00018f5e bne 0x18e70 | goto label_1;
| }
0x00018f60 b 0x18eaa | goto label_2;
| label_17:
0x00018f62 ldr.w r0, [r8, 0x14] | r0 = *((r8 + 0x14));
0x00018f66 cmp r1, ip |
0x00018f68 it lo |
| if (r1 >= ip) {
0x00018f6a movlo r1, lr | r1 = lr;
| }
0x00018f6c str r0, [r3] | *(r3) = r0;
0x00018f6e str.w r3, [r8, 0x14] | __asm ("str.w r3, [r8, 0x14]");
| if (r1 >= ip) {
0x00018f72 bhs 0x18ea2 | goto label_0;
| }
0x00018f74 cmp r4, 0 |
| if (r4 != 0) {
0x00018f76 bne.w 0x18e70 | goto label_1;
| }
0x00018f7a b 0x18eaa | goto label_2;
| label_14:
0x00018f7c ldr.w r0, [r8, 0x14] | r0 = *((r8 + 0x14));
0x00018f80 str r0, [r3] | *(r3) = r0;
0x00018f82 str.w r3, [r8, 0x14] | __asm ("str.w r3, [r8, 0x14]");
0x00018f86 b 0x18ea2 | goto label_0;
| label_15:
0x00018f88 cmp sb, r2 |
0x00018f8a it lo |
| if (sb >= r2) {
0x00018f8c movlo sb, r2 | sb = r2;
| }
0x00018f8e b 0x18f52 | goto label_3;
| label_10:
0x00018f90 mov r0, r4 | r0 = r4;
0x00018f92 bl 0x183f0 | fcn_000183f0 (r0, r1);
0x00018f96 adds r0, 1 | r0++;
| if (r0 != 1) {
0x00018f98 bne.w 0x18e22 | goto label_4;
| }
| label_11:
0x00018f9c ldr r3, [r7, 0x20] | r3 = *((r7 + 0x20));
| if (r3 != 0) {
0x00018f9e cbz r3, 0x18fa4 |
0x00018fa0 movs r0, 0xc | r0 = 0xc;
0x00018fa2 blx r3 | uint32_t (*r3)(uint32_t) (r0);
| }
0x00018fa4 ldrb.w r3, [sp, 0x20] | r3 = var_20h;
| if (r3 == 0) {
0x00018fa8 cbnz r3, 0x18fae |
| label_9:
0x00018faa movs r6, 0 | r6 = 0;
0x00018fac b 0x18f1e | goto label_5;
| }
0x00018fae ldr.w r8, [r7, 0x18] | r8 = *((r7 + 0x18));
0x00018fb2 ldr r5, [sp, 0x18] | r5 = var_18h;
0x00018fb4 ldr r3, [sp, 0x24] | r3 = var_24h;
0x00018fb6 ldr.w r0, [r8, 0xc] | r0 = *((r8 + 0xc));
0x00018fba str r3, [r5] | *(r5) = r3;
| if (r0 != 0) {
0x00018fbc cbz r0, 0x18fc4 |
0x00018fbe blx 0xa3d8 | fcn_0000a3d8 ();
0x00018fc2 ldr r3, [r5] | r3 = *(r5);
| }
0x00018fc4 ldr r2, [r5, 8] | r2 = *((r5 + 8));
0x00018fc6 movs r4, 0 | r4 = 0;
0x00018fc8 ldrd lr, ip, [r8] | __asm ("ldrd lr, ip, [r8]");
0x00018fcc ldr.w r1, [r8, 8] | r1 = *((r8 + 8));
0x00018fd0 adds r0, r2, 1 | r0 = r2 + 1;
0x00018fd2 cmp.w ip, 0 |
| if (ip == 0) {
0x00018fd6 beq 0x19006 | goto label_19;
| }
| do {
0x00018fd8 cmp r1, r0 |
0x00018fda itt lo |
| if (r1 >= r0) {
0x00018fdc strlo r4, [r5] | *(r5) = r4;
| }
| if (r1 >= r0) {
0x00018fde movlo r4, r5 | r4 = r5;
| }
| if (r1 > r0) {
0x00018fe0 blo 0x18ff6 |
0x00018fe2 cmp r2, 0x13 |
| if (r2 > 0x13) {
0x00018fe4 bhi 0x19034 | goto label_20;
| }
0x00018fe6 add.w r6, r8, r2, lsl 2 | r6 = r8 + (r2 << 2);
0x00018fea ldr r7, [r6, 0x14] | r7 = *((r6 + 0x14));
0x00018fec str r7, [r5] | *(r5) = r7;
| if (r7 == 0) {
0x00018fee cbz r7, 0x19040 | goto label_21;
| }
0x00018ff0 str r5, [r6, 0x14] | *((r6 + 0x14)) = r5;
| label_7:
0x00018ff2 subs r1, 1 | r1--;
0x00018ff4 subs r1, r1, r2 | r1 -= r2;
| }
| if (r3 == 0) {
| label_6:
0x00018ff6 cbz r3, 0x19048 | goto label_22;
| }
0x00018ff8 mov r5, r3 | r5 = r3;
0x00018ffa ldr r3, [r3] | r3 = *(r3);
0x00018ffc ldr r2, [r5, 8] | r2 = *((r5 + 8));
0x00018ffe adds r0, r2, 1 | r0 = r2 + 1;
0x00019000 cmp.w ip, 0 |
0x00019004 bne 0x18fd8 |
| } while (ip != 0);
| label_19:
0x00019006 cmp r2, 0x13 |
| if (r2 > 0x13) {
0x00019008 bhi 0x19020 | goto label_23;
| }
0x0001900a add.w r6, r8, r2, lsl 2 | r6 = r8 + (r2 << 2);
0x0001900e ldr r7, [r6, 0x14] | r7 = *((r6 + 0x14));
0x00019010 str r7, [r5] | *(r5) = r7;
| if (r7 == 0) {
0x00019012 cbz r7, 0x19040 | goto label_21;
| }
| label_8:
0x00019014 cmp r1, r0 |
0x00019016 str r5, [r6, 0x14] | *((r6 + 0x14)) = r5;
0x00019018 it lo |
| if (r1 < r0) {
0x0001901a movlo r1, 0 | r1 = 0;
| goto label_24;
| }
| if (r1 <= r0) {
| label_24:
0x0001901c blo 0x18ff6 | goto label_6;
| }
0x0001901e b 0x18ff2 | goto label_7;
| label_23:
0x00019020 ldr.w r6, [r8, 0x14] | r6 = *((r8 + 0x14));
0x00019024 cmp r1, r0 |
0x00019026 it lo |
| if (r1 >= r0) {
0x00019028 movlo r1, ip | r1 = ip;
| }
0x0001902a str r6, [r5] | *(r5) = r6;
0x0001902c str.w r5, [r8, 0x14] | __asm ("str.w r5, [r8, 0x14]");
| if (r1 <= r0) {
0x00019030 blo 0x18ff6 | goto label_6;
| }
0x00019032 b 0x18ff2 | goto label_7;
| label_20:
0x00019034 ldr.w r0, [r8, 0x14] | r0 = *((r8 + 0x14));
0x00019038 str r0, [r5] | *(r5) = r0;
0x0001903a str.w r5, [r8, 0x14] | __asm ("str.w r5, [r8, 0x14]");
0x0001903e b 0x18ff2 | goto label_7;
| label_21:
0x00019040 cmp lr, r2 |
0x00019042 it lo |
| if (lr >= r2) {
0x00019044 movlo lr, r2 | lr = r2;
| }
0x00019046 b 0x19014 | goto label_8;
| label_22:
0x00019048 ldr.w r0, [r8, 0xc] | r0 = *((r8 + 0xc));
0x0001904c str.w lr, [r8] | __asm ("str.w lr, [r8]");
0x00019050 str.w r1, [r8, 8] | __asm ("str.w r1, [r8, 8]");
| if (r0 != 0) {
0x00019054 cbz r0, 0x1905a |
0x00019056 blx 0xa090 | fcn_0000a090 ();
| }
0x0001905a cmp r4, 0 |
| if (r4 == 0) {
0x0001905c beq 0x18faa | goto label_9;
| }
| do {
0x0001905e mov r0, r4 | r0 = r4;
0x00019060 ldr r4, [r4] | r4 = *(r4);
0x00019062 blx 0xa470 | fcn_0000a470 ();
0x00019066 cmp r4, 0 |
0x00019068 bne 0x1905e |
| } while (r4 != 0);
0x0001906a b 0x18faa | goto label_9;
| label_16:
0x0001906c blx 0xabc8 | pthread_attr_getdetachstate ();
| if (r2 != 0) {
0x00019070 cbnz r2, 0x190c4 | void (*0x190c4)() ();
| }
0x00019072 movs r0, r0 |
0x00019074 lsls r0, r4, 0x1a | r0 = r4 << 0x1a;
0x00019076 movs r0, r0 |
0x00019078 bl 0xffddd07a | void (*0xffddd07a)(uint32_t) (r0);
0x0001907c rev r2, r1 | r1 = SWAP32 (r2);
0x0001907e movs r0, r0 |
| }
r2dec has crashed (info: /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x20494).
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/lib/libapr-1.so.0.7.2 @ 0x10ffc */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) sym.apr_snprintf () | void apr_snprintf (int16_t arg_1h, int16_t arg_20h, int16_t arg_24h, int16_t arg_28h, int16_t arg_2ch, int16_t arg_30h, int16_t arg_34h, int16_t arg_38h, int16_t arg_72h, int16_t arg_64h, int16_t arg_c5h, int16_t arg_2c4h, floating_point * arg1, int16_t arg2) {
| int16_t var_4h_2;
| floating_point * iptr;
| int16_t var_14h_2;
| int16_t var_18h_2;
| int16_t var_20h;
| int16_t var_24h;
| int16_t var_0h;
| int16_t var_30h;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| r0 = arg1;
| r1 = arg2;
0x0000f9d8 invalid | goto label_19;
| if (r7 != 0) {
0x0000f9da cbz r7, 0xf9fe |
0x0000f9dc ldr r3, [sp, 0x10] | r3 = var_10h;
0x0000f9de cmp r7, r3 |
| if (r7 > r3) {
0x0000f9e0 blo 0xf9f8 |
0x0000f9e2 ldr r3, [sp, 0x2c] | r3 = *(arg_2ch);
0x0000f9e4 mov r0, r8 | r0 = r8;
0x0000f9e6 str.w r7, [r8] | __asm ("str.w r7, [r8]");
0x0000f9ea blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t) (r0, r3);
0x0000f9ec cmp r0, 0 |
| if (r0 != 0) {
0x0000f9ee bne.w 0xfcf8 | goto label_4;
| }
0x0000f9f2 ldrd r7, r3, [r8] | __asm ("ldrd r7, r3, [r8]");
0x0000f9f6 str r3, [sp, 0x10] | var_10h = r3;
| }
0x0000f9f8 ldrb r3, [r4] | r3 = *(r4);
0x0000f9fa strb r3, [r7], 1 | *(r7) = r3;
| r7++;
| }
0x0000f9fe add.w sl, sl, 1 | sl++;
| label_7:
0x0000fa02 ldrb r5, [r4, 1] | r5 = *((r4 + 1));
0x0000fa04 adds r4, 1 | r4++;
0x0000fa06 cmp r5, 0 |
| if (r5 != 0) {
0x0000fa08 bne 0xf9d6 | void (*0xf9d6)() ();
| }
0x0000fa0a str.w r7, [r8] | __asm ("str.w r7, [r8]");
0x0000fa0e b 0xfcfc | goto label_20;
| label_19:
0x0000fa10 blx 0xab10 | fcn_0000ab10 ();
0x0000fa14 ldrb r5, [r4, 1] | r5 = *((r4 + 1));
0x0000fa16 mov fp, r0 |
0x0000fa18 ldr r2, [r0] | r2 = *(r0);
0x0000fa1a adds r4, 1 | r4++;
0x0000fa1c ldrh.w r3, [r2, r5, lsl 1] | offset_0 = r5 << 1;
| r3 = *((r2 + offset_0));
0x0000fa20 ands r3, r3, 0x200 | r3 &= 0x200;
| if (r3 == r3) {
0x0000fa24 beq.w 0xfc68 | goto label_21;
| }
0x0000fa28 movs r3, 0 | r3 = 0;
0x0000fa2a movs r2, 0x20 | r2 = 0x20;
0x0000fa2c strd r3, r2, [sp, 0x1c] | __asm ("strd r3, r2, [sp, 0x1c]");
0x0000fa30 str r3, [sp, 0x28] | *(arg_28h) = r3;
0x0000fa32 strd r3, r3, [sp, 0x30] | __asm ("strd r3, r3, [sp, 0x30]");
0x0000fa36 str r3, [sp, 0x14] | var_14h = r3;
0x0000fa38 movs r3, 1 | r3 = 1;
0x0000fa3a str r3, [sp, 0xc] | var_ch = r3;
| label_1:
0x0000fa3c cmp r5, 0x6c |
| if (r5 == 0x6c) {
0x0000fa3e beq.w 0xfc52 | goto label_22;
| }
0x0000fa42 cmp r5, 0x71 |
| if (r5 != 0x71) {
0x0000fa44 bne.w 0xfc44 | goto label_23;
| }
0x0000fa48 ldrb r5, [r4, 1] | r5 = *((r4 + 1));
0x0000fa4a movs r1, 0 | r1 = 0;
0x0000fa4c adds r4, 1 | r4++;
| do {
| label_0:
0x0000fa4e cmp r5, 0x78 |
| if (r5 > 0x78) {
0x0000fa50 bhi.w 0xfd1c | goto label_24;
| }
0x0000fa54 adr r3, 8 | r3 = 8;
0x0000fa56 ldr.w r2, [r3, r5, lsl 2] | offset_1 = r5 << 2;
| r2 = *((r3 + offset_1));
0x0000fa5a add r3, r2 | r3 += r2;
0x0000fa5c bx r3 | return uint32_t (*r3)() ();
| label_23:
0x0000fc44 cmp r5, 0x68 |
0x0000fc46 ittte eq |
| if (r5 != 0x68) {
0x0000fc48 ldrbeq r5, [r4, 1] | r5 = *((r4 + 1));
| }
| if (r5 != 0x68) {
0x0000fc4a moveq r1, 2 | r1 = 2;
| }
| if (r5 != 0x68) {
0x0000fc4c addeq r4, 1 | r4++;
| }
| if (r5 == 0x68) {
0x0000fc4e movne r1, 3 | r1 = 3;
| }
0x0000fc50 b 0xfa4e |
| } while (1);
| label_22:
0x0000fc52 ldrb r5, [r4, 1] | r5 = *((r4 + 1));
0x0000fc54 cmp r5, 0x6c |
0x0000fc56 itt ne |
| if (r5 == 0x6c) {
0x0000fc58 addne r4, 1 | r4++;
| }
| if (r5 != 0x6c) {
0x0000fc5a movne r1, 1 | r1 = 1;
| goto label_25;
| }
| if (r5 != 0x6c) {
| label_25:
0x0000fc5c bne.w 0xfa4e | goto label_0;
| }
0x0000fc60 ldrb r5, [r4, 2] | r5 = *((r4 + 2));
0x0000fc62 movs r1, 0 | r1 = 0;
0x0000fc64 adds r4, 2 | r4 += 2;
0x0000fc66 b 0xfa4e | goto label_0;
| label_21:
0x0000fc68 cmp r5, 0x2d |
0x0000fc6a mov.w r1, 0x20 | r1 = 0x20;
0x0000fc6e str r3, [sp, 0x30] | *(arg_30h) = r3;
0x0000fc70 str r3, [sp, 0x34] | *(arg_34h) = r3;
0x0000fc72 str r3, [sp, 0x14] | var_14h = r3;
0x0000fc74 mov.w r3, 1 | r3 = 1;
0x0000fc78 str r1, [sp, 0x20] | *(arg_20h) = r1;
0x0000fc7a str r3, [sp, 0xc] | var_ch = r3;
| if (r5 == 0x2d) {
0x0000fc7c beq 0xfce6 | goto label_26;
| }
| label_2:
0x0000fc7e sub.w r3, r5, 0x20 | r3 = r5 - 0x20;
0x0000fc82 cmp r3, 0x10 |
| if (r3 <= 0x10) {
0x0000fc84 bhi 0xfc9c |
| /* switch table (17 cases) at 0xfc8a */
0x0000fc86 tbb [pc, r3] | __asm ("tbb [0x0000fc8c]");
| }
0x0000fc9c ldrh.w r3, [r2, r5, lsl 1] | offset_2 = r5 << 1;
| r3 = *((r2 + offset_2));
0x0000fca0 ands r3, r3, 0x800 | r3 &= 0x800;
| if (r3 != r3) {
0x0000fca4 bne.w 0x103cc | goto label_27;
| }
0x0000fca8 cmp r5, 0x2a |
0x0000fcaa it ne |
| if (r5 == 0x2a) {
0x0000fcac strne r3, [sp, 0x1c] | var_1ch = r3;
| }
| if (r5 == 0x2a) {
0x0000fcae beq.w 0x103f8 | goto label_28;
| }
| label_11:
0x0000fcb2 cmp r5, 0x2e |
0x0000fcb4 itt ne |
| if (r5 == 0x2e) {
0x0000fcb6 movne r3, 0 | r3 = 0;
| }
| if (r5 != 0x2e) {
0x0000fcb8 strne r3, [sp, 0x28] | *(arg_28h) = r3;
| goto label_29;
| }
| if (r5 != 0x2e) {
| label_29:
0x0000fcba bne.w 0xfa3c | goto label_1;
| }
0x0000fcbe ldrb r5, [r4, 1] | r5 = *((r4 + 1));
0x0000fcc0 ldrh.w r3, [r2, r5, lsl 1] | offset_3 = r5 << 1;
| r3 = *((r2 + offset_3));
0x0000fcc4 ands r3, r3, 0x800 | r3 &= 0x800;
| if (r3 != r3) {
0x0000fcc8 bne.w 0x108aa | goto label_30;
| }
0x0000fccc cmp r5, 0x2a |
| if (r5 == 0x2a) {
0x0000fcce beq.w 0x10904 | goto label_31;
| }
0x0000fcd2 adds r4, 1 | r4++;
| label_14:
0x0000fcd4 str r3, [sp, 0x38] | *(arg_38h) = r3;
0x0000fcd6 movs r3, 1 | r3 = 1;
0x0000fcd8 str r3, [sp, 0x28] | *(arg_28h) = r3;
0x0000fcda b 0xfa3c | goto label_1;
0x0000fcdc str r5, [sp, 0x20] | *(arg_20h) = r5;
| label_3:
0x0000fcde ldrb r5, [r4, 1]! | r5 = *((r4 += 1));
0x0000fce2 cmp r5, 0x2d |
| if (r5 != 0x2d) {
0x0000fce4 bne 0xfc7e | goto label_2;
| }
| label_26:
0x0000fce6 movs r3, 0 | r3 = 0;
0x0000fce8 str r3, [sp, 0xc] | var_ch = r3;
0x0000fcea b 0xfcde | goto label_3;
0x0000fcec movs r3, 1 | r3 = 1;
0x0000fcee str r3, [sp, 0x30] | *(arg_30h) = r3;
0x0000fcf0 b 0xfcde | goto label_3;
0x0000fcf2 movs r3, 1 | r3 = 1;
0x0000fcf4 str r3, [sp, 0x14] | var_14h = r3;
0x0000fcf6 b 0xfcde | goto label_3;
| do {
| label_4:
0x0000fcf8 mov.w sl, -1 | sl = -1;
| label_20:
0x0000fcfc ldr r2, [pc, 0x3a0] |
0x0000fcfe ldr r3, [pc, 0x39c] | r3 = *(0x1009e);
0x0000fd00 add r2, pc | r2 = 0x1fda4;
0x0000fd02 ldr r3, [r2, r3] | r3 = *(0x1fda4);
0x0000fd04 ldr r2, [r3] | r2 = *(0x1fda4);
0x0000fd06 ldr r3, [sp, 0x2c4] | r3 = *(arg_2c4h);
0x0000fd08 eors r2, r3 | r2 ^= r3;
0x0000fd0a mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000fd0e bne.w 0x10fbe | goto label_32;
| }
0x0000fd12 mov r0, sl | r0 = sl;
0x0000fd14 add.w sp, sp, 0x2cc |
0x0000fd18 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_24:
0x0000fd1c ldr r2, [sp, 0x18] | r2 = var_18h;
0x0000fd1e add.w sb, sp, 0x64 | sb += arg_64h;
0x0000fd22 movs r3, 0x25 | r3 = 0x25;
0x0000fd24 strb.w r5, [sb, 1] | *((sb + 1)) = r5;
0x0000fd28 strb.w r3, [sb] | *(sb) = r3;
0x0000fd2c movs r3, 2 | r3 = 2;
0x0000fd2e str r3, [r2] | *(r2) = r3;
0x0000fd30 movs r3, 1 | r3 = 1;
0x0000fd32 movs r5, 0 | r5 = 0;
0x0000fd34 str r3, [sp, 0x14] | var_14h = r3;
0x0000fd36 movs r3, 0x20 | r3 = 0x20;
0x0000fd38 str r3, [sp, 0x20] | *(arg_20h) = r3;
| label_6:
0x0000fd3a ldr r3, [sp, 0xc] | r3 = var_ch;
0x0000fd3c ldr r2, [sp, 0x1c] | r2 = var_1ch;
0x0000fd3e tst r3, r2 |
| if ((r3 & r2) == 0) {
0x0000fd40 beq.w 0xff46 | goto label_33;
| }
0x0000fd44 ldr r3, [sp, 0x18] | r3 = var_18h;
0x0000fd46 ldr.w fp, [r3] | fp = *(r3);
0x0000fd4a cmp fp, r6 |
| if (fp >= r6) {
0x0000fd4c bhs.w 0xff46 | goto label_33;
| }
0x0000fd50 ldr r3, [sp, 0x20] | r3 = *(arg_20h);
0x0000fd52 cmp r5, 0 |
0x0000fd54 sub.w r3, r3, 0x30 | r3 -= 0x30;
0x0000fd58 clz r3, r3 | r3 &= r3;
0x0000fd5c lsr.w r3, r3, 5 | r3 >>= 5;
0x0000fd60 it eq |
| if (r5 != 0) {
0x0000fd62 moveq r3, 0 | r3 = 0;
| }
0x0000fd64 cmp r3, 0 |
| if (r3 == 0) {
0x0000fd66 beq.w 0x1040e | goto label_34;
| }
| if (r7 == 0) {
0x0000fd6a cbz r7, 0xfd8e | goto label_35;
| }
0x0000fd6c ldr r3, [sp, 0x10] | r3 = var_10h;
0x0000fd6e cmp r7, r3 |
| if (r7 <= r3) {
0x0000fd70 blo 0xfd86 | goto label_36;
| }
0x0000fd72 ldr r3, [sp, 0x2c] | r3 = *(arg_2ch);
0x0000fd74 mov r0, r8 | r0 = r8;
0x0000fd76 str.w r7, [r8] | __asm ("str.w r7, [r8]");
0x0000fd7a blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t) (r0, r3);
0x0000fd7c cmp r0, 0 |
0x0000fd7e bne 0xfcf8 |
| } while (r0 != 0);
0x0000fd80 ldrd r7, r3, [r8] | __asm ("ldrd r7, r3, [r8]");
0x0000fd84 str r3, [sp, 0x10] | var_10h = r3;
| label_36:
0x0000fd86 ldrb.w r3, [sb] | r3 = *(sb);
0x0000fd8a strb r3, [r7], 1 | *(r7) = r3;
| r7++;
| label_35:
0x0000fd8e ldr r2, [sp, 0x18] | r2 = var_18h;
0x0000fd90 add.w r3, fp, -1 | r3 = fp + -1;
0x0000fd94 add.w sl, sl, 1 | sl++;
0x0000fd98 add.w sb, sb, 1 | sb++;
0x0000fd9c add.w fp, r6, -1 |
0x0000fda0 str r3, [r2] | *(r2) = r3;
| label_12:
0x0000fda2 str r4, [sp, 0x28] | *(arg_28h) = r4;
0x0000fda4 mov r2, r8 | r2 = r8;
0x0000fda6 str.w sb, [sp, 0x30] | __asm ("str.w sb, [arg_30h]");
0x0000fdaa mov r8, fp | r8 = fp;
0x0000fdac ldr r6, [sp, 0x20] | r6 = *(arg_20h);
0x0000fdae mov r5, r2 | r5 = r2;
0x0000fdb0 ldr r3, [sp, 0x10] | r3 = var_10h;
0x0000fdb2 ldr r4, [sp, 0x2c] | r4 = *(arg_2ch);
0x0000fdb4 ldr.w sb, [sp, 0x18] | sb = var_18h;
| if (r7 == 0) {
| label_5:
0x0000fdb8 cbz r7, 0xfdd0 | goto label_37;
| }
0x0000fdba cmp r7, r3 |
| if (r7 <= r3) {
0x0000fdbc blo 0xfdcc | goto label_38;
| }
0x0000fdbe mov r0, r5 | r0 = r5;
0x0000fdc0 str r7, [r5] | *(r5) = r7;
0x0000fdc2 blx r4 | r0 = uint32_t (*r4)(uint32_t) (r0);
0x0000fdc4 cmp r0, 0 |
| if (r0 != 0) {
0x0000fdc6 bne 0xfcf8 | goto label_4;
| }
0x0000fdc8 ldrd r7, r3, [r5] | __asm ("ldrd r7, r3, [r5]");
| label_38:
0x0000fdcc strb r6, [r7], 1 | *(r7) = r6;
| r7++;
| label_37:
0x0000fdd0 ldr.w r2, [sb] | r2 = *(sb);
0x0000fdd4 add.w r0, r8, -1 | r0 = r8 + -1;
0x0000fdd8 cmp r2, r0 |
| if (r2 >= r0) {
0x0000fdda bhs.w 0x10348 | goto label_39;
| }
0x0000fdde mov r8, r0 | r8 = r0;
0x0000fde0 b 0xfdb8 | goto label_5;
0x0000fde2 movs r3, 1 | r3 = 1;
0x0000fde4 str r3, [sp, 0x34] | *(arg_34h) = r3;
0x0000fde6 b 0xfcde | goto label_3;
| label_16:
0x0000fe7c add.w sb, sp, 0xc5 | sb += arg_c5h;
| do {
0x0000fe80 strb r2, [r3], 1 | *(r3) = r2;
| r3++;
0x0000fe84 ldrb r2, [r1, 1]! | r2 = *((r1 += 1));
0x0000fe88 cmp r2, 0 |
0x0000fe8a bne 0xfe80 |
| } while (r2 != 0);
0x0000fe8c cmp r5, 0x66 |
| if (r5 != 0x66) {
0x0000fe8e beq 0xfeb0 |
0x0000fe90 ldr r1, [sp, 0x28] | r1 = var_0h;
0x0000fe92 strb r5, [r3] | *(r3) = r5;
0x0000fe94 ldr r2, [r1] | r2 = *(r1);
0x0000fe96 subs r5, r2, 1 | r5 = r2 - 1;
0x0000fe98 cmp r5, 0 |
0x0000fe9a str r5, [r1] | *(r1) = r5;
| if (r5 != 0) {
0x0000fe9c bne.w 0x10dc8 | goto label_40;
| }
0x0000fea0 movw r2, 0x302b | r2 = 0x302b;
0x0000fea4 adds r3, 4 | r3 += 4;
0x0000fea6 strh r2, [r3, -0x3] | *((r3 - 0x3)) = r2;
0x0000feaa movs r2, 0x30 | r2 = 0x30;
0x0000feac strb r2, [r3, -0x1] | *((r3 - 0x1)) = r2;
| }
| label_15:
0x0000feb0 ldr r2, [sp, 0x48] | r2 = *(arg_20h);
0x0000feb2 sub.w r3, r3, sb | r3 -= sb;
0x0000feb6 ldr r1, [sp, 0x18] | r1 = var_18h_2;
0x0000feb8 ldr r2, [r2] | r2 = *(r2);
0x0000feba str r3, [r1] | *(r1) = r3;
0x0000febc cmp r2, 0 |
| if (r2 != 0) {
0x0000febe bne.w 0x100ea | goto label_41;
| }
0x0000fec2 ldr r3, [sp, 0x34] | r3 = var_ch;
0x0000fec4 cmp r3, 0 |
| if (r3 != 0) {
0x0000fec6 bne.w 0x107fc | goto label_42;
| }
0x0000feca ldr r3, [sp, 0x30] | r3 = var_30h;
0x0000fecc cmp r3, 0 |
| if (r3 != 0) {
0x0000fece bne.w 0x10502 | goto label_43;
| }
0x0000fed2 mov r5, r3 | r5 = r3;
0x0000fed4 movs r3, 1 | r3 = 1;
0x0000fed6 str r3, [sp, 0x14] | var_14h_2 = r3;
0x0000fed8 b 0xfd3a | goto label_6;
| label_33:
0x0000ff46 ldr r3, [sp, 0x14] | r3 = var_14h;
0x0000ff48 cmp r3, 1 |
| if (r3 == 1) {
0x0000ff4a beq.w 0x1036a | goto label_44;
| }
| label_9:
0x0000ff4e ldr r3, [sp, 0xc] | r3 = var_ch;
0x0000ff50 ldr r2, [sp, 0x1c] | r2 = var_1ch;
0x0000ff52 eor r3, r3, 1 | r3 ^= 1;
0x0000ff56 tst r3, r2 |
| if ((r3 & r2) == 0) {
0x0000ff58 beq.w 0xfa02 | goto label_7;
| }
0x0000ff5c ldr r3, [sp, 0x18] | r3 = var_18h;
0x0000ff5e ldr r5, [r3] | r5 = *(r3);
0x0000ff60 cmp r5, r6 |
| if (r5 >= r6) {
0x0000ff62 bhs.w 0xfa02 | goto label_7;
| }
0x0000ff66 subs r5, r6, r5 | r5 = r6 - r5;
0x0000ff68 str r4, [sp, 0xc] | var_ch = r4;
0x0000ff6a add r5, sl | r5 += sl;
0x0000ff6c str r6, [sp, 0x14] | var_14h = r6;
0x0000ff6e ldr r1, [sp, 0x10] | r1 = var_10h;
0x0000ff70 mov r6, r5 | r6 = r5;
0x0000ff72 ldr r4, [sp, 0x2c] | r4 = *(arg_2ch);
0x0000ff74 mov fp, sl |
0x0000ff76 ldr r5, [sp, 0x20] | r5 = *(arg_20h);
| if (r7 == 0) {
| label_8:
0x0000ff78 cbz r7, 0xff94 | goto label_45;
| }
0x0000ff7a cmp r7, r1 |
| if (r7 <= r1) {
0x0000ff7c blo 0xff90 | goto label_46;
| }
0x0000ff7e mov r0, r8 | r0 = r8;
0x0000ff80 str.w r7, [r8] | __asm ("str.w r7, [r8]");
0x0000ff84 blx r4 | r0 = uint32_t (*r4)(uint32_t) (r0);
0x0000ff86 cmp r0, 0 |
| if (r0 != 0) {
0x0000ff88 bne.w 0xfcf8 | goto label_4;
| }
0x0000ff8c ldrd r7, r1, [r8] | __asm ("ldrd r7, r1, [r8]");
| label_46:
0x0000ff90 strb r5, [r7], 1 | *(r7) = r5;
| r7++;
| label_45:
0x0000ff94 add.w sl, sl, 1 | sl++;
0x0000ff98 cmp sl, r6 |
| if (sl != r6) {
0x0000ff9a bne 0xff78 | goto label_8;
| }
0x0000ff9c ldr r6, [sp, 0x14] | r6 = var_14h;
0x0000ff9e ldr r4, [sp, 0xc] | r4 = var_ch;
0x0000ffa0 str r1, [sp, 0x10] | var_10h = r1;
0x0000ffa2 add fp, r6 |
0x0000ffa4 sub.w r6, fp, sl | r6 = fp - sl;
0x0000ffa8 b 0xfa02 | goto label_7;
| label_41:
0x000100ea movs r5, 0x2d | r5 = 0x2d;
| label_13:
0x000100ec ldr r2, [sp, 0x18] | r2 = var_18h_2;
0x000100ee add.w sb, sb, -1 | sb += -1;
0x000100f2 strb.w r5, [sb] | *(sb) = r5;
0x000100f6 ldr r3, [r2] | r3 = *(r2);
0x000100f8 adds r3, 1 | r3++;
0x000100fa str r3, [r2] | *(r2) = r3;
0x000100fc movs r3, 1 | r3 = 1;
0x000100fe str r3, [sp, 0x14] | var_14h_2 = r3;
0x00010100 b 0xfd3a | goto label_6;
| label_39:
0x00010348 str r3, [sp, 0x10] | var_10h = r3;
0x0001034a mov r3, r5 | r3 = r5;
0x0001034c mov r5, r8 | r5 = r8;
0x0001034e mov r8, r3 | r8 = r3;
0x00010350 ldr r3, [sp, 0x14] | r3 = var_14h;
0x00010352 add.w fp, fp, 1 |
0x00010356 add fp, sl |
0x00010358 ldr r4, [sp, 0x28] | r4 = *(arg_28h);
0x0001035a ldr.w sb, [sp, 0x30] | sb = *(arg_30h);
0x0001035e mov r6, r0 | r6 = r0;
0x00010360 cmp r3, 1 |
0x00010362 sub.w sl, fp, r5 | sl = fp - r5;
| if (r3 != 1) {
0x00010366 bne.w 0xff4e | goto label_9;
| }
| label_44:
0x0001036a ldr r3, [sp, 0x18] | r3 = var_18h;
0x0001036c ldr r3, [r3] | r3 = *(r3);
0x0001036e cmp r3, 0 |
| if (r3 == 0) {
0x00010370 beq.w 0xff4e | goto label_9;
| }
0x00010374 str r4, [sp, 0x14] | var_14h = r4;
0x00010376 add.w fp, sb, r3 |
0x0001037a ldr r1, [sp, 0x10] | r1 = var_10h;
0x0001037c mov r3, r8 | r3 = r8;
0x0001037e ldr r4, [sp, 0x2c] | r4 = *(arg_2ch);
0x00010380 mov r5, fp | r5 = fp;
0x00010382 mov r8, sb | r8 = sb;
0x00010384 mov fp, r3 |
| if (r7 == 0) {
| label_10:
0x00010386 cbz r7, 0x103a6 | goto label_47;
| }
0x00010388 cmp r1, r7 |
| if (r1 > r7) {
0x0001038a bhi 0x1039e | goto label_48;
| }
0x0001038c mov r0, fp | r0 = fp;
0x0001038e str.w r7, [fp] | __asm ("str.w r7, [fp]");
0x00010392 blx r4 | r0 = uint32_t (*r4)(uint32_t) (r0);
0x00010394 cmp r0, 0 |
| if (r0 != 0) {
0x00010396 bne.w 0xfcf8 | goto label_4;
| }
0x0001039a ldrd r7, r1, [fp] | __asm ("ldrd r7, r1, [fp]");
| label_48:
0x0001039e ldrb.w r3, [r8] | r3 = *(r8);
0x000103a2 strb r3, [r7], 1 | *(r7) = r3;
| r7++;
0x000103a4 subs r3, 1 | r3--;
| label_47:
0x000103a6 add.w r3, r8, 1 | r3 = r8 + 1;
0x000103aa cmp r3, r5 |
| if (r3 != r5) {
0x000103ac beq 0x103b2 |
0x000103ae mov r8, r3 | r8 = r3;
0x000103b0 b 0x10386 | goto label_10;
| }
0x000103b2 add.w sl, sl, 1 | sl++;
0x000103b6 mov r3, fp | r3 = fp;
0x000103b8 sub.w sl, sl, sb | sl -= sb;
0x000103bc mov fp, r5 |
0x000103be mov r5, r8 | r5 = r8;
0x000103c0 ldr r4, [sp, 0x14] | r4 = var_14h;
0x000103c2 mov r8, r3 | r8 = r3;
0x000103c4 add sl, r5 | sl += r5;
0x000103c6 mov sb, fp | sb = fp;
0x000103c8 str r1, [sp, 0x10] | var_10h = r1;
0x000103ca b 0xff4e | goto label_9;
| label_27:
0x000103cc sub.w r6, r5, 0x30 | r6 = r5 - 0x30;
0x000103d0 ldrb r5, [r4, 1] | r5 = *((r4 + 1));
0x000103d2 adds r4, 1 | r4++;
0x000103d4 ldrh.w r3, [r2, r5, lsl 1] | offset_4 = r5 << 1;
| r3 = *((r2 + offset_4));
0x000103d8 lsls r0, r3, 0x14 | r0 = r3 << 0x14;
| if (r0 >= r3) {
0x000103da bpl 0x103f2 | goto label_49;
| }
| do {
0x000103dc add.w r6, r6, r6, lsl 2 | r6 += (r6 << 2);
0x000103e0 subs r5, 0x30 | r5 -= 0x30;
0x000103e2 add.w r6, r5, r6, lsl 1 | r6 = r5 + (r6 << 1);
0x000103e6 ldrb r5, [r4, 1]! | r5 = *((r4 += 1));
0x000103ea ldrh.w r3, [r2, r5, lsl 1] | offset_5 = r5 << 1;
| r3 = *((r2 + offset_5));
0x000103ee lsls r1, r3, 0x14 | r1 = r3 << 0x14;
0x000103f0 bmi 0x103dc |
| } while (r1 < r3);
| label_49:
0x000103f2 movs r3, 1 | r3 = 1;
0x000103f4 str r3, [sp, 0x1c] | var_1ch = r3;
0x000103f6 b 0xfcb2 | goto label_11;
| label_28:
0x000103f8 ldr r1, [sp, 0x24] | r1 = *(arg_24h);
0x000103fa adds r4, 1 | r4++;
0x000103fc ldrb r5, [r4] | r5 = *(r4);
0x000103fe ldr r6, [r1], 4 | r6 = *(r1);
| r1 += 4;
0x00010402 cmp r6, 0 |
| if (r6 >= 0) {
0x00010404 blt 0x10474 |
0x00010406 movs r3, 1 | r3 = 1;
0x00010408 str r1, [sp, 0x24] | *(arg_24h) = r1;
0x0001040a str r3, [sp, 0x1c] | var_1ch = r3;
0x0001040c b 0xfcb2 | goto label_11;
| label_34:
0x0001040e mov fp, r6 |
0x00010410 b 0xfda2 | goto label_12;
| }
0x00010474 str r3, [sp, 0xc] | var_ch = r3;
0x00010476 movs r3, 1 | r3 = 1;
0x00010478 rsbs r6, r6, 0 | r6 -= ;
0x0001047a str r1, [sp, 0x24] | *(arg_24h) = r1;
0x0001047c str r3, [sp, 0x1c] | var_1ch = r3;
0x0001047e b 0xfcb2 | goto label_11;
| label_43:
0x00010502 movs r5, 0x20 | r5 = 0x20;
0x00010504 b 0x100ec | goto label_13;
| label_42:
0x000107fc movs r5, 0x2b | r5 = 0x2b;
0x000107fe b 0x100ec | goto label_13;
| label_30:
0x000108aa sub.w r1, r5, 0x30 | r1 = r5 - 0x30;
0x000108ae ldrb r5, [r4, 2] | r5 = *((r4 + 2));
0x000108b0 str r1, [sp, 0x38] | *(arg_38h) = r1;
0x000108b2 adds r4, 2 | r4 += 2;
0x000108b4 ldrh.w r3, [r2, r5, lsl 1] | offset_6 = r5 << 1;
| r3 = *((r2 + offset_6));
0x000108b8 lsls r3, r3, 0x14 | r3 <<= 0x14;
| if (r3 >= r3) {
0x000108ba bpl.w 0x10f30 | goto label_50;
| }
0x000108be mov r3, r1 | r3 = r1;
| do {
0x000108c0 add.w r3, r3, r3, lsl 2 | r3 += (r3 << 2);
0x000108c4 subs r5, 0x30 | r5 -= 0x30;
0x000108c6 add.w r3, r5, r3, lsl 1 | r3 = r5 + (r3 << 1);
0x000108ca ldrb r5, [r4, 1]! | r5 = *((r4 += 1));
0x000108ce ldrh.w r1, [r2, r5, lsl 1] | offset_7 = r5 << 1;
| r1 = *((r2 + offset_7));
0x000108d2 lsls r0, r1, 0x14 | r0 = r1 << 0x14;
0x000108d4 bmi 0x108c0 |
| } while (r0 < r1);
0x000108d6 b.w 0xfcd4 | goto label_14;
| label_31:
0x00010904 ldr r3, [sp, 0x24] | r3 = *(arg_24h);
0x00010906 adds r4, 2 | r4 += 2;
0x00010908 ldrb r5, [r4] | r5 = *(r4);
0x0001090a ldr r2, [r3], 4 | r2 = *(r3);
| r3 += 4;
0x0001090e str r3, [sp, 0x24] | *(arg_24h) = r3;
0x00010910 bic.w r3, r2, r2, asr 31 | r3 = BIT_MASK (r2, r2);
0x00010914 str r3, [sp, 0x38] | *(arg_38h) = r3;
0x00010916 movs r3, 1 | r3 = 1;
0x00010918 str r3, [sp, 0x28] | *(arg_28h) = r3;
0x0001091a b.w 0xfa3c | goto label_1;
| label_40:
0x00010dc8 add.w ip, sp, 0x72 |
0x00010dcc movw lr, 0xcccd |
0x00010dd0 mov r2, r5 | r2 = r5;
0x00010dd2 movt lr, 0xcccc | lr = 0xcccccccd;
0x00010dd6 it lt |
| if (r3 < 1) {
0x00010dd8 rsblt r2, r5, 0 | __asm ("rsblt r2, r5, 0");
| }
0x00010dda mov r1, ip | r1 = ip;
0x00010ddc str r4, [sp, 0x14] | var_14h_2 = r4;
| do {
0x00010dde umull r4, r0, lr, r2 | r4:r0 = lr * r2;
0x00010de2 mov r4, r2 | r4 = r2;
0x00010de4 cmp r4, 9 |
0x00010de6 lsr.w r2, r0, 3 | r2 = r0 >> 3;
0x00010dea add.w r0, r4, 0x30 | r0 = r4 + 0x30;
0x00010dee add.w fp, r2, r2, lsl 2 |
0x00010df2 sub.w r0, r0, fp, lsl 1 | r0 -= (fp << 1);
0x00010df6 strb r0, [r1, -0x1]! | *((r1 -= 0x1)) = r0;
0x00010dfa bhi 0x10dde |
| } while (r4 > 9);
0x00010dfc cmp r5, 0 |
0x00010dfe sub.w r2, ip, r1 | r2 = ip - r1;
0x00010e02 ite ge |
| if (r5 < 0) {
0x00010e04 movge r0, 0x2b | r0 = 0x2b;
| }
| if (r5 >= 0) {
0x00010e06 movlt r0, 0x2d | r0 = 0x2d;
| }
0x00010e08 cmp r2, 1 |
0x00010e0a ldr r4, [sp, 0x14] | r4 = var_14h_2;
0x00010e0c strb r0, [r3, 1] | *((r3 + 1)) = r0;
| if (r2 == 1) {
0x00010e0e beq.w 0x10f42 | goto label_51;
| }
0x00010e12 add.w fp, r3, 2 |
0x00010e16 subs r5, r2, 1 | r5 = r2 - 1;
0x00010e18 mov r3, fp | r3 = fp;
0x00010e1a cmp r2, 0 |
| if (r2 == 0) {
0x00010e1c beq.w 0xfeb0 | goto label_15;
| }
| label_17:
0x00010e20 adds r5, 1 | r5++;
0x00010e22 mov r0, fp | r0 = fp;
0x00010e24 mov r2, r5 | r2 = r5;
0x00010e26 blx 0xa78c | fcn_0000a78c ();
0x00010e2a add.w r3, fp, r5 | r3 = fp + r5;
0x00010e2e b.w 0xfeb0 | goto label_15;
| label_18:
0x00010f0e movs r1, 1 | r1 = 1;
0x00010f10 add r3, fp | r3 += fp;
0x00010f12 str r1, [r0] | *(r0) = r1;
0x00010f14 mov r1, sb | r1 = sb;
0x00010f16 add.w sb, sp, 0xc5 | sb += arg_c5h;
0x00010f1a cmp r2, 0 |
| if (r2 != 0) {
0x00010f1c bne.w 0xfe7c | goto label_16;
| }
0x00010f20 b.w 0xfeb0 | goto label_15;
| label_50:
0x00010f30 movs r3, 1 | r3 = 1;
0x00010f32 str r3, [sp, 0x28] | *(arg_28h) = r3;
0x00010f34 b.w 0xfa3c | goto label_1;
| label_51:
0x00010f42 movs r2, 0x30 | r2 = 0x30;
0x00010f44 add.w fp, r3, 3 |
0x00010f48 movs r5, 0 | r5 = 0;
0x00010f4a strb r2, [r3, 2] | *((r3 + 2)) = r2;
0x00010f4c b 0x10e20 | goto label_17;
| label_32:
0x00010fbe blx 0xabc8 | pthread_attr_getdetachstate ();
0x00010fc2 nop |
0x00010fc4 asrs r2, r3, 0x14 | r2 = r3 >> 0x14;
0x00010fc6 movs r1, r0 | r1 = r0;
0x00010fc8 asrs r0, r0, 0xa | r0 >>= 0xa;
0x00010fca movs r1, r0 | r1 = r0;
0x00010fcc asrs r0, r0, 8 | r0 >>= 8;
0x00010fce movs r1, r0 | r1 = r0;
0x00010fd0 asrs r0, r6, 2 | r0 = r6 >> 2;
0x00010fd2 movs r1, r0 | r1 = r0;
0x00010fd4 lsrs r6, r3, 0x1d | r6 = r3 >> 0x1d;
0x00010fd6 movs r1, r0 | r1 = r0;
0x00010fd8 lsrs r4, r6, 0x1c | r4 = r6 >> 0x1c;
0x00010fda movs r1, r0 | r1 = r0;
0x00010fdc lsrs r0, r3, 0x15 | r0 = r3 >> 0x15;
0x00010fde movs r1, r0 | r1 = r0;
0x00010fe0 lsrs r6, r2, 0x14 | r6 = r2 >> 0x14;
0x00010fe2 movs r1, r0 | r1 = r0;
0x00010fe4 lsrs r4, r7, 0x10 | r4 = r7 >> 0x10;
0x00010fe6 movs r1, r0 | r1 = r0;
0x00010fe8 lsrs r6, r4, 0xf | r6 = r4 >> 0xf;
0x00010fea movs r1, r0 | r1 = r0;
0x00010fec lsrs r2, r4, 0xd | r2 = r4 >> 0xd;
0x00010fee movs r1, r0 | r1 = r0;
0x00010ff0 lsrs r4, r2, 0xc | r4 = r2 >> 0xc;
0x00010ff2 movs r1, r0 | r1 = r0;
0x00010ff4 lsrs r0, r1, 0xc | r0 = r1 >> 0xc;
0x00010ff6 movs r1, r0 | r1 = r0;
0x00010ff8 lsrs r2, r7, 0xb | r2 = r7 >> 0xb;
0x00010ffa movs r1, r0 | r1 = r0;
0x00010ffc push {r2, r3} |
0x00010ffe push {r4, lr} |
0x00011000 mov r4, r1 | r4 = r1;
0x00011002 sub sp, 0x18 |
0x00011004 ldr r1, [pc, 0x70] |
0x00011006 ldr r3, [pc, 0x74] | r3 = *(0x1107e);
0x00011008 ldr r2, [sp, 0x20] | r2 = var_20h;
0x0001100a add r1, pc | r1 = 0x22086;
0x0001100c ldr r3, [r1, r3] |
0x0001100e ldr r3, [r3] | r3 = *(0x22086);
0x00011010 str r3, [sp, 0x14] | var_14h_2 = r3;
0x00011012 mov.w r3, 0 | r3 = 0;
| if (r4 == 0) {
0x00011016 cbz r4, 0x1105a | goto label_52;
| }
0x00011018 subs r1, r4, 1 | r1 = r4 - 1;
0x0001101a add r3, sp, 0x24 | r3 += var_24h;
0x0001101c add r1, r0 | r1 += r0;
0x0001101e str r3, [sp, 4] | var_4h_2 = r3;
0x00011020 strd r0, r1, [sp, 8] | __asm ("strd r0, r1, [sp, 8]");
0x00011024 add r1, sp, 8 | r1 += iptr;
0x00011026 ldr r0, [pc, 0x58] |
0x00011028 add r0, pc | r0 = 0x220ae;
0x0001102a blx 0xa2b0 | modf (r0, r1);
0x0001102e ldr r3, [sp, 8] | r3 = iptr;
0x00011030 movs r2, 0 | r2 = 0;
0x00011032 strb r2, [r3] | *(r3) = r2;
| do {
0x00011034 ldr r2, [pc, 0x4c] |
0x00011036 adds r3, r0, 1 | r3 = r0 + 1;
0x00011038 ldr r3, [pc, 0x40] | r3 = *(0x1107c);
0x0001103a it eq |
| if (r3 != r0) {
0x0001103c addeq r0, r4, -1 | r0 = r4 + -1;
| }
0x00011040 add r2, pc | r2 = 0x220c8;
0x00011042 ldr r3, [r2, r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00011044 ldr r2, [r3] | r2 = imp.__aeabi_unwind_cpp_pr0;
0x00011046 ldr r3, [sp, 0x14] | r3 = var_14h_2;
0x00011048 eors r2, r3 | r2 ^= r3;
0x0001104a mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0001104e bne 0x11072 | goto label_53;
| }
0x00011050 add sp, 0x18 |
0x00011052 pop.w {r4, lr} |
0x00011056 add sp, 8 |
0x00011058 bx lr | return;
| label_52:
0x0001105a ldr r0, [pc, 0x2c] |
0x0001105c add r3, sp, 0x24 | r3 += var_24h;
0x0001105e vmov.i32 d16, 0 | __asm ("vmov.i32 d16, 0");
0x00011062 add r1, sp, 8 | r1 += iptr;
0x00011064 str r3, [sp, 4] | var_4h_2 = r3;
0x00011066 add r0, pc | r0 = 0x220f4;
0x00011068 vstr d16, [sp, 8] | __asm ("vstr d16, [sp, 8]");
0x0001106c blx 0xa2b0 | modf (r0, r1);
0x00011070 b 0x11034 |
| } while (1);
| label_53:
0x00011072 blx 0xabc8 | pthread_attr_getdetachstate ();
0x00011076 nop |
0x00011078 subs r1, 0x22 | r1 -= 0x22;
0x0001107a movs r1, r0 | r1 = r0;
0x0001107c lsls r0, r4, 0x1a | r0 = r4 << 0x1a;
0x0001107e movs r0, r0 |
0x00011080 b 0x10f0e | goto label_18;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x1ae18 */
| #include <stdint.h>
|
; (fcn) sym.apr_socket_sendfile () | void apr_socket_sendfile (int16_t arg_38h, int16_t arg_138h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_14h_2;
| int16_t var_4h;
| int16_t var_8h;
| int32_t var_8h_2;
| int16_t var_10h;
| int16_t var_14h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0001ae18 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0001ae1c mov r5, r0 | r5 = r0;
0x0001ae1e ldr r0, [pc, 0x1e8] |
0x0001ae20 mov r6, r1 | r6 = r1;
0x0001ae22 sub sp, 0x18 |
0x0001ae24 mov r8, r2 | r8 = r2;
0x0001ae26 ldr r1, [pc, 0x1e4] | r1 = *(0x1b00e);
0x0001ae28 add r0, pc | r0 = 0x35e36;
0x0001ae2a ldr r7, [sp, 0x38] | r7 = *(arg_38h);
0x0001ae2c ldr r1, [r0, r1] |
0x0001ae2e ldr r1, [r1] | r1 = *(0x35e36);
0x0001ae30 str r1, [sp, 0x14] | var_14h = r1;
0x0001ae32 mov.w r1, 0 | r1 = 0;
0x0001ae36 ldrd r0, r1, [r3] | __asm ("ldrd r0, r1, [r3]");
0x0001ae3a strd r0, r1, [sp, 8] | __asm ("strd r0, r1, [var_8h]");
0x0001ae3e cmp r2, 0 |
| if (r2 == 0) {
0x0001ae40 beq.w 0x1af6e | goto label_6;
| }
| label_3:
0x0001ae44 ldr.w r3, [r8, 4] | r3 = *((r8 + 4));
0x0001ae48 cmp r3, 0 |
0x0001ae4a it le |
| if (r3 > 0) {
0x0001ae4c movle sl, 0 | sl = 0;
| }
| if (r3 > 0) {
0x0001ae50 bgt 0x1af16 | goto label_7;
| }
| label_2:
0x0001ae52 ldr r3, [r5, 0x30] | r3 = *((r5 + 0x30));
0x0001ae54 lsls r1, r3, 0x12 | r1 = r3 << 0x12;
0x0001ae56 itet mi |
| if (r1 < r3) {
0x0001ae58 bicmi r3, r3, 0x2000 | __asm ("bicmi r3, r3, 0x2000");
| }
| if (r1 >= r3) {
0x0001ae5c addmi sb, sp, 8 | sb += var_8h;
| }
| if (r1 < r3) {
0x0001ae60 str r3, [r5, 0x30] | *((r5 + 0x30)) = r3;
| }
| if (r1 >= r3) {
0x0001ae62 bpl 0x1af02 | goto label_8;
| }
| label_4:
0x0001ae64 movs r2, 0 | r2 = 0;
0x0001ae66 mov r1, r5 | r1 = r5;
0x0001ae68 mov r0, r2 | r0 = r2;
0x0001ae6a blx 0xafe8 | r0 = fcn_0000afe8 ();
0x0001ae6e mov sb, r0 | sb = r0;
0x0001ae70 cmp r0, 0 |
| if (r0 != 0) {
0x0001ae72 bne.w 0x1afb0 | goto label_9;
| }
0x0001ae76 add.w sb, sp, 8 | sb += var_8h;
0x0001ae7a b 0x1ae86 |
| while (r3 == r0) {
0x0001ae7c blx 0xb12c | r0 = fcn_0000b12c ();
0x0001ae80 ldr r3, [r0] | r3 = *(r0);
0x0001ae82 cmp r3, 4 |
| if (r3 != 4) {
0x0001ae84 bne 0x1af76 | goto label_10;
| }
0x0001ae86 ldr r3, [r7] | r3 = *(r7);
0x0001ae88 mov r2, sb | r2 = sb;
0x0001ae8a ldr r1, [r6, 4] | r1 = *((r6 + 4));
0x0001ae8c ldr r0, [r5, 4] | r0 = *((r5 + 4));
0x0001ae8e blx 0x9fcc | r0 = fcn_00009fcc ();
0x0001ae92 adds r3, r0, 1 | r3 = r0 + 1;
0x0001ae94 mov r4, r0 | r4 = r0;
0x0001ae96 beq 0x1ae7c |
| }
| label_0:
0x0001ae98 ldr r3, [r7] | r3 = *(r7);
0x0001ae9a add.w r6, sl, r4 | r6 = sl + r4;
0x0001ae9e cmp r3, r4 |
| if (r3 > r4) {
0x0001aea0 bhi.w 0x1afc4 | goto label_11;
| }
0x0001aea4 ldr.w r2, [r8, 0xc] | r2 = *((r8 + 0xc));
0x0001aea8 cmp r2, 0 |
| if (r2 > 0) {
0x0001aeaa ble 0x1aec2 |
0x0001aeac add r3, sp, 4 | r3 += var_4h;
0x0001aeae ldr.w r1, [r8, 8] | r1 = *((r8 + 8));
0x0001aeb2 mov r0, r5 | r0 = r5;
0x0001aeb4 blx 0xae4c | fcn_0000ae4c ();
0x0001aeb8 ldr r3, [sp, 4] | r3 = var_4h;
0x0001aeba add r6, r3 | r6 += r3;
0x0001aebc cmp r0, 0 |
| if (r0 != 0) {
0x0001aebe bne.w 0x1aff0 | goto label_12;
| }
| }
0x0001aec2 movs r2, 0 | r2 = 0;
0x0001aec4 mov r0, r5 | r0 = r5;
0x0001aec6 mov.w r1, 0x400 | r1 = 0x400;
0x0001aeca blx 0xa6bc | fcn_0000a6bc ();
0x0001aece cmp r4, 0 |
0x0001aed0 str r6, [r7] | *(r7) = r6;
0x0001aed2 it ge |
| if (r4 < 0) {
0x0001aed4 movge sb, 0 | sb = 0;
| }
| if (r4 < 0) {
0x0001aed8 blt 0x1afa6 | goto label_13;
| }
| label_1:
0x0001aeda ldr r2, [pc, 0x134] |
0x0001aedc ldr r3, [pc, 0x12c] | r3 = *(0x1b00c);
0x0001aede add r2, pc | r2 = 0x35ef4;
0x0001aee0 ldr r3, [r2, r3] | r3 = *(0x35ef4);
0x0001aee2 ldr r2, [r3] | r2 = *(0x35ef4);
0x0001aee4 ldr r3, [sp, 0x14] | r3 = var_14h;
0x0001aee6 eors r2, r3 | r2 ^= r3;
0x0001aee8 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0001aeec bne.w 0x1b004 | goto label_14;
| }
0x0001aef0 mov r0, sb | r0 = sb;
0x0001aef2 add sp, 0x18 |
0x0001aef4 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| do {
0x0001aef8 blx 0xb12c | r0 = fcn_0000b12c ();
0x0001aefc ldr r3, [r0] | r3 = *(r0);
0x0001aefe cmp r3, 4 |
| if (r3 != 4) {
0x0001af00 bne 0x1af76 | goto label_10;
| }
| label_8:
0x0001af02 mov r2, sb | r2 = sb;
0x0001af04 ldr r3, [r7] | r3 = *(r7);
0x0001af06 ldr r1, [r6, 4] | r1 = *((r6 + 4));
0x0001af08 ldr r0, [r5, 4] | r0 = *((r5 + 4));
0x0001af0a blx 0x9fcc | r0 = fcn_00009fcc ();
0x0001af0e adds r2, r0, 1 | r2 = r0 + 1;
0x0001af10 mov r4, r0 | r4 = r0;
0x0001af12 beq 0x1aef8 |
| } while (r2 == r0);
0x0001af14 b 0x1ae98 | goto label_0;
| label_7:
0x0001af16 movs r2, 1 | r2 = 1;
0x0001af18 mov.w r1, 0x400 | r1 = 0x400;
0x0001af1c mov r0, r5 | r0 = r5;
0x0001af1e blx 0xa6bc | r0 = fcn_0000a6bc ();
0x0001af22 mov sb, r0 | sb = r0;
0x0001af24 cmp r0, 0 |
| if (r0 != 0) {
0x0001af26 bne 0x1aeda | goto label_1;
| }
0x0001af28 ldrd r1, r2, [r8] | __asm ("ldrd r1, r2, [r8]");
0x0001af2c add r3, sp, 4 | r3 += var_4h;
0x0001af2e mov r0, r5 | r0 = r5;
0x0001af30 blx 0xae4c | r0 = fcn_0000ae4c ();
0x0001af34 cmp r0, 0 |
| if (r0 != 0) {
0x0001af36 bne 0x1afb6 | goto label_15;
| }
0x0001af38 ldr.w r1, [r8, 4] | r1 = *((r8 + 4));
0x0001af3c ldr r4, [sp, 4] | r4 = var_4h;
0x0001af3e cmp r1, 0 |
0x0001af40 mov sl, r4 | sl = r4;
| if (r1 <= 0) {
0x0001af42 ble 0x1ae52 | goto label_2;
| }
0x0001af44 ldr.w r3, [r8] | r3 = *(r8);
0x0001af48 add.w r1, r3, r1, lsl 3 | r1 = r3 + (r1 << 3);
| do {
0x0001af4c ldr r2, [r3, 4] | r2 = *((r3 + 4));
0x0001af4e adds r3, 8 | r3 += 8;
0x0001af50 cmp r3, r1 |
0x0001af52 add r0, r2 | r0 += r2;
0x0001af54 bne 0x1af4c |
| } while (r3 != r1);
0x0001af56 cmp r4, r0 |
| if (r4 >= r0) {
0x0001af58 bhs.w 0x1ae52 | goto label_2;
| }
0x0001af5c movs r2, 0 | r2 = 0;
0x0001af5e mov.w r1, 0x400 | r1 = 0x400;
0x0001af62 mov r0, r5 | r0 = r5;
0x0001af64 str r4, [r7] | *(r7) = r4;
0x0001af66 blx 0xa6bc | r0 = fcn_0000a6bc ();
0x0001af6a mov sb, r0 | sb = r0;
0x0001af6c b 0x1aeda | goto label_1;
| label_6:
0x0001af6e ldr.w r8, [pc, 0xa4] | r8 = *(0x0001b014);
0x0001af72 add r8, pc | r8 += pc;
0x0001af74 b 0x1ae44 | goto label_3;
| label_10:
0x0001af76 blx 0xb12c | r0 = fcn_0000b12c ();
0x0001af7a ldr r2, [r0] | r2 = *(r0);
0x0001af7c mov r3, r0 | r3 = r0;
0x0001af7e cmp r2, 0xb |
| if (r2 != 0xb) {
0x0001af80 bne 0x1af90 | goto label_16;
| }
0x0001af82 ldrd r1, r2, [r5, 0x18] | __asm ("ldrd r1, r2, [r5, 0x18]");
0x0001af86 cmp r1, 1 |
0x0001af88 sbcs r2, r2, 0 | __asm ("sbcs r2, r2, 0");
| if (r1 >= 1) {
0x0001af8c bge.w 0x1ae64 | goto label_4;
| }
| label_16:
0x0001af90 str.w sl, [r7] | __asm ("str.w sl, [r7]");
| label_5:
0x0001af94 movs r2, 0 | r2 = 0;
0x0001af96 mov.w r1, 0x400 | r1 = 0x400;
0x0001af9a mov r0, r5 | r0 = r5;
0x0001af9c ldr.w sb, [r3] | sb = *(r3);
0x0001afa0 blx 0xa6bc | fcn_0000a6bc ();
0x0001afa4 b 0x1aeda | goto label_1;
| label_13:
0x0001afa6 blx 0xb12c | r0 = fcn_0000b12c ();
0x0001afaa ldr.w sb, [r0] | sb = *(r0);
0x0001afae b 0x1aeda | goto label_1;
| label_9:
0x0001afb0 movs r3, 0 | r3 = 0;
0x0001afb2 str r3, [r7] | *(r7) = r3;
0x0001afb4 b 0x1aeda | goto label_1;
| label_15:
0x0001afb6 str.w sb, [r7] | __asm ("str.w sb, [r7]");
0x0001afba blx 0xb12c | r0 = fcn_0000b12c ();
0x0001afbe ldr.w sb, [r0] | sb = *(r0);
0x0001afc2 b 0x1aeda | goto label_1;
| label_11:
0x0001afc4 movs r2, 0 | r2 = 0;
0x0001afc6 mov.w r1, 0x400 | r1 = 0x400;
0x0001afca mov r0, r5 | r0 = r5;
0x0001afcc str r6, [r7] | *(r7) = r6;
0x0001afce blx 0xa6bc | fcn_0000a6bc ();
0x0001afd2 cmp r4, 0 |
0x0001afd4 mov sb, r0 | sb = r0;
| if (r4 <= 0) {
0x0001afd6 ble 0x1affa | goto label_17;
| }
0x0001afd8 ldrd r2, r3, [r5, 0x18] | __asm ("ldrd r2, r3, [r5, 0x18]");
0x0001afdc cmp r2, 1 |
0x0001afde sbcs r3, r3, 0 | __asm ("sbcs r3, r3, 0");
| if (r2 < 1) {
0x0001afe2 blt.w 0x1aeda | goto label_1;
| }
0x0001afe6 ldr r3, [r5, 0x30] | r3 = *((r5 + 0x30));
0x0001afe8 orr r3, r3, 0x2000 | r3 |= 0x2000;
0x0001afec str r3, [r5, 0x30] | *((r5 + 0x30)) = r3;
0x0001afee b 0x1aeda | goto label_1;
| label_12:
0x0001aff0 str r6, [r7] | *(r7) = r6;
0x0001aff2 blx 0xb12c | r0 = fcn_0000b12c ();
0x0001aff6 mov r3, r0 | r3 = r0;
0x0001aff8 b 0x1af94 | goto label_5;
| label_17:
0x0001affa movw sb, 0x117e |
0x0001affe movt sb, 1 | sb = 0x1117e;
0x0001b002 b 0x1aeda | goto label_1;
| label_14:
0x0001b004 blx 0xabc8 | pthread_attr_getdetachstate ();
0x0001b008 ldr r3, [sp, 0x10] | r3 = var_10h;
0x0001b00a movs r0, r0 |
0x0001b00c lsls r0, r4, 0x1a | r0 = r4 << 0x1a;
0x0001b00e movs r0, r0 |
0x0001b010 ldr r2, [sp, 0x138] | r2 = *(arg_138h);
0x0001b012 movs r0, r0 |
0x0001b014 adr r1, 0x1a8 | r1 = 0x1a8;
0x0001b016 movs r0, r0 |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x11464 */
| #include <stdint.h>
|
; (fcn) sym.apr_strfsize () | void apr_strfsize (int16_t arg_0h, int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_0h_2;
| int32_t var_0h_3;
| int16_t var_ch;
| int16_t var_1h;
| int16_t var_10h;
| int16_t var_12h;
| int16_t var_14h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x00011464 ldmdbmi r6, {r2, r3, r7, sb, sl, lr} ^ | __asm ("ldmdbmi r6, {r2, r3, r7, sb, sl, lr} ^");
0x00011468 ldr r3, [pc, 0x158] |
0x0001146a cmp.w ip, 0 |
0x0001146e push {r4, r5, lr} |
0x00011470 sub sp, 0x1c |
0x00011472 add r1, pc | r1 += pc;
0x00011474 ldr.w lr, [pc, 0x150] |
0x00011478 mov r4, r2 | r4 = r2;
0x0001147a ldr r3, [r1, r3] | r3 = *((r1 + r3));
0x0001147c add lr, pc | lr = 0x22a48;
0x0001147e ldr r3, [r3] | r3 = *(0x115c4);
0x00011480 str r3, [sp, 0x14] | var_14h = r3;
0x00011482 mov.w r3, 0 | r3 = 0;
0x00011486 mov r3, r0 | r3 = r0;
0x00011488 ldrd r0, r1, [lr] | __asm ("ldrd r0, r1, [lr]");
0x0001148c strh.w r1, [sp, 0x10] | var_10h = r1;
0x00011490 lsr.w r1, r1, 0x10 | r1 >>= 0x10;
0x00011494 str r0, [sp, 0xc] | var_ch = r0;
0x00011496 strb.w r1, [sp, 0x12] | var_12h = r1;
| if (ip < 0) {
0x0001149a blt 0x11598 | goto label_3;
| }
0x0001149c movw r2, 0x3cd | r2 = 0x3cd;
0x000114a0 mov r1, r3 | r1 = r3;
0x000114a2 cmp r3, r2 |
0x000114a4 sbcs r0, ip, 0 | __asm ("sbcs r0, ip, 0");
| if (r3 < r2) {
0x000114a8 blt 0x11548 | goto label_4;
| }
0x000114aa lsrs r3, r3, 0xa | r3 >>= 0xa;
0x000114ac orr.w r3, r3, ip, lsl 22 | r3 |= (ip << 22);
0x000114b0 asr.w ip, ip, 0xa |
0x000114b4 cmp r3, r2 |
0x000114b6 sbcs r0, ip, 0 | __asm ("sbcs r0, ip, 0");
| if (r3 >= r2) {
0x000114ba bge 0x11566 | goto label_5;
| }
0x000114bc ubfx r2, r1, 0, 0xa | r2 = (r1 >> 0) & ((1 << 0xa) - 1);
0x000114c0 movs r0, 0x4b | r0 = 0x4b;
| label_1:
0x000114c2 cmp r3, 9 |
0x000114c4 sbcs lr, ip, 0 | __asm ("sbcs lr, ip, 0");
| if (r3 >= 9) {
0x000114c8 blt 0x11504 |
0x000114ca sub.w lr, r3, 9 | lr = r3 - 9;
0x000114ce orr.w ip, lr, ip |
0x000114d2 cmp.w r2, 0x3cc |
0x000114d6 it le |
| if (r2 <= 0x3cc) {
0x000114d8 cmple ip, 0 | __asm ("cmple ip, 0");
| }
| if (r2 == 0x3cc) {
0x000114dc beq 0x1158a | goto label_6;
| }
0x000114de lsls r2, r1, 0x16 | r2 = r1 << 0x16;
| if (r2 < r1) {
0x000114e0 bpl 0x114e4 |
0x000114e2 adds r3, 1 | r3++;
| }
0x000114e4 ldr r2, [pc, 0xe4] |
0x000114e6 movs r1, 5 | r1 = 5;
0x000114e8 str r0, [sp] | *(sp) = r0;
0x000114ea mov r0, r4 | r0 = r4;
0x000114ec add r2, pc | r2 = 0x22abc;
0x000114ee blx 0xa9fc | r0 = fcn_0000a9fc ();
0x000114f2 cmp r0, 0 |
| if (r0 >= 0) {
0x000114f4 bge 0x1152e | goto label_0;
| }
0x000114f6 ldr r3, [pc, 0xd8] |
0x000114f8 add r3, pc | r3 = 0x22ace;
0x000114fa ldr r0, [r3] | r0 = *(0x22ace);
0x000114fc ldrb r3, [r3, 4] | r3 = *((r3 + 4));
0x000114fe str r0, [r4] | *(r4) = r0;
0x00011500 strb r3, [r4, 4] | *((r4 + 4)) = r3;
0x00011502 b 0x1152e |
| } else {
0x00011504 add.w r2, r2, r2, lsl 2 | r2 += (r2 << 2);
0x00011508 cmp.w r2, 0x1300 |
0x0001150c itt lt |
| if (r2 >= 0x1300) {
0x0001150e addlt r2, r2, 0x100 | r2 += 0x100;
| }
| if (r2 < 0x1300) {
0x00011512 asrs r1, r2, 9 | r1 = r2 >> 9;
| }
| if (r2 >= 0x1300) {
0x00011514 blt 0x1151a |
0x00011516 adds r3, 1 | r3++;
0x00011518 movs r1, 0 | r1 = 0;
| }
| label_2:
0x0001151a ldr r2, [pc, 0xb8] |
0x0001151c strd r1, r0, [sp] | __asm ("strd r1, r0, [sp]");
0x00011520 movs r1, 5 | r1 = 5;
0x00011522 mov r0, r4 | r0 = r4;
0x00011524 add r2, pc | r2 = 0x22afe;
0x00011526 blx 0xa9fc | r0 = fcn_0000a9fc ();
0x0001152a cmp r0, 0 |
| if (r0 < 0) {
0x0001152c blt 0x115a6 | goto label_7;
| }
| }
| do {
| label_0:
0x0001152e ldr r2, [pc, 0xa8] |
0x00011530 ldr r3, [pc, 0x90] | r3 = *(0x115c4);
0x00011532 add r2, pc | r2 = "@\t@\n@";
0x00011534 ldr r3, [r2, r3] | r3 = "@\t@\n@";
0x00011536 ldr r2, [r3] | r2 = "@\t@\n@";
0x00011538 ldr r3, [sp, 0x14] | r3 = var_14h;
0x0001153a eors r2, r3 | r2 ^= r3;
0x0001153c mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00011540 bne 0x115ba | goto label_8;
| }
0x00011542 mov r0, r4 | r0 = r4;
0x00011544 add sp, 0x1c |
0x00011546 pop {r4, r5, pc} |
| label_4:
0x00011548 ldr r2, [pc, 0x90] |
0x0001154a movs r1, 5 | r1 = 5;
0x0001154c mov r0, r4 | r0 = r4;
0x0001154e add r2, pc | r2 = 0x22b2e;
0x00011550 blx 0xa9fc | r0 = fcn_0000a9fc ();
0x00011554 cmp r0, 0 |
0x00011556 bge 0x1152e |
| } while (r0 >= 0);
0x00011558 ldr r3, [pc, 0x84] |
0x0001155a add r3, pc | r3 = 0x22b3e;
0x0001155c ldr r0, [r3] | r0 = *(0x22b3e);
0x0001155e ldrb r3, [r3, 4] | r3 = *((r3 + 4));
0x00011560 str r0, [r4] | *(r4) = r0;
0x00011562 strb r3, [r4, 4] | *((r4 + 4)) = r3;
0x00011564 b 0x1152e | goto label_0;
| label_5:
0x00011566 add r1, sp, 0xc | r1 += var_ch;
| do {
0x00011568 lsr.w lr, r3, 0xa | lr = r3 >> 0xa;
0x0001156c adds r0, r1, 1 | r0 += var_1h;
0x0001156e orr.w lr, lr, ip, lsl 22 | lr |= (ip << 22);
0x00011572 asr.w ip, ip, 0xa |
0x00011576 cmp lr, r2 |
0x00011578 sbcs r5, ip, 0 | __asm ("sbcs r5, ip, 0");
| if (lr < r2) {
0x0001157c bge 0x115b4 |
0x0001157e ldrb r0, [r1, 1] | r0 = var_1h;
0x00011580 ubfx r2, r3, 0, 0xa | r2 = (r3 >> 0) & ((1 << 0xa) - 1);
0x00011584 mov r1, r3 | r1 = r3;
0x00011586 mov r3, lr | r3 = lr;
0x00011588 b 0x114c2 | goto label_1;
| label_6:
0x0001158a add.w r2, r2, r2, lsl 2 | r2 += (r2 << 2);
0x0001158e movs r3, 9 | r3 = 9;
0x00011590 add.w r1, r2, 0x100 | r1 = r2 + 0x100;
0x00011594 asrs r1, r3 | r1 >>= r3;
0x00011596 b 0x1151a | goto label_2;
| label_3:
0x00011598 ldr r3, [pc, 0x48] |
0x0001159a add r3, pc | r3 = 0x22b82;
0x0001159c ldr r0, [r3] | r0 = *(0x22b82);
0x0001159e ldrb r3, [r3, 4] | r3 = *((r3 + 4));
0x000115a0 str r0, [r2] | *(r2) = r0;
0x000115a2 strb r3, [r2, 4] | *((r2 + 4)) = r3;
0x000115a4 b 0x1152e | goto label_0;
| label_7:
0x000115a6 ldr r3, [pc, 0x40] |
0x000115a8 add r3, pc | r3 = 0x22b96;
0x000115aa ldr r0, [r3] | r0 = *(0x22b96);
0x000115ac ldrb r3, [r3, 4] | r3 = *((r3 + 4));
0x000115ae str r0, [r4] | *(r4) = r0;
0x000115b0 strb r3, [r4, 4] | *((r4 + 4)) = r3;
0x000115b2 b 0x1152e | goto label_0;
| }
0x000115b4 mov r3, lr | r3 = lr;
0x000115b6 mov r1, r0 | r1 = r0;
0x000115b8 b 0x11568 |
| } while (1);
| label_8:
0x000115ba blx 0xabc8 | pthread_attr_getdetachstate ();
0x000115be nop |
0x000115c0 adds r4, 0xba | r4 += 0xba;
0x000115c2 movs r1, r0 | r1 = r0;
0x000115c4 lsls r0, r4, 0x1a | r0 = r4 << 0x1a;
0x000115c6 movs r0, r0 |
0x000115c8 lsls r4, r5, 0x16 | r4 = r5 << 0x16;
0x000115ca movs r1, r0 | r1 = r0;
0x000115cc lsls r4, r6, 0x14 | r4 = r6 << 0x14;
0x000115ce movs r1, r0 | r1 = r0;
0x000115d0 lsls r0, r3, 0x14 | r0 = r3 << 0x14;
0x000115d2 movs r1, r0 | r1 = r0;
0x000115d4 lsls r4, r6, 0x13 | r4 = r6 << 0x13;
0x000115d6 movs r1, r0 | r1 = r0;
0x000115d8 adds r3, 0xfa | r3 += 0xfa;
0x000115da movs r1, r0 | r1 = r0;
0x000115dc lsls r2, r7, 0x12 | r2 = r7 << 0x12;
0x000115de movs r1, r0 | r1 = r0;
0x000115e0 lsls r6, r6, 0x12 | r6 <<= 0x12;
0x000115e2 movs r1, r0 | r1 = r0;
0x000115e4 lsls r6, r4, 0x11 | r6 = r4 << 0x11;
0x000115e6 movs r1, r0 | r1 = r0;
0x000115e8 lsls r0, r5, 0x11 | r0 = r5 << 0x11;
0x000115ea movs r1, r0 | r1 = r0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x135b4 */
| #include <stdint.h>
|
| #define SWAP32(n) ((uint32_t) (((n & 0x000000ff) << 24) | \
| ((n & 0x0000ff00) << 8) | \
| ((n & 0x00ff0000) >> 8) | \
| ((n & 0xff000000) >> 24)))
|
; (fcn) sym.apr_table_addn () | void apr_table_addn (int16_t arg1, int16_t arg2, int16_t arg3) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x000135b4 invalid |
0x000135b8 ldrb r3, [r1] | r3 = *(r1);
0x000135ba mov r6, r2 | r6 = r2;
0x000135bc movs r2, 1 | r2 = 1;
0x000135be ldr r4, [r0, 8] | r4 = *((r0 + 8));
0x000135c0 and r1, r3, 0x1f | r1 = r3 & 0x1f;
0x000135c4 add.w r3, r0, r1, lsl 2 | r3 = r0 + (r1 << 2);
0x000135c8 lsls r2, r1 | r2 <<= r1;
0x000135ca str.w r4, [r3, 0x98] | __asm ("str.w r4, [r3, 0x98]");
0x000135ce ldr r1, [r0, 0x14] | r1 = *((r0 + 0x14));
0x000135d0 tst r1, r2 |
0x000135d2 ittt eq |
| if ((r1 & r2) != 0) {
0x000135d4 orreq r1, r2 | r1 |= r2;
| }
| if ((r1 & r2) != 0) {
0x000135d6 streq r4, [r3, 0x18] | *((r3 + 0x18)) = r4;
| }
| if ((r1 & r2) != 0) {
0x000135d8 streq r1, [r0, 0x14] | *((r0 + 0x14)) = r1;
| }
0x000135da ldrb r4, [r5] | r4 = *(r5);
| if (r4 != 0) {
0x000135dc cbz r4, 0x135f4 |
0x000135de ldrh r3, [r5] | r3 = *(r5);
0x000135e0 ldrb r2, [r5, 1] | r2 = *((r5 + 1));
0x000135e2 rev16 r3, r3 | __asm ("rev16 r3, r3");
0x000135e4 uxth r3, r3 | r3 = (int16_t) r3;
| if (r2 == 0) {
0x000135e6 cbz r2, 0x13600 | goto label_0;
| }
0x000135e8 ldrb r2, [r5, 2] | r2 = *((r5 + 2));
| if (r2 == 0) {
0x000135ea cbz r2, 0x13600 | goto label_0;
| }
0x000135ec ldr r3, [r5] | r3 = *(r5);
0x000135ee rev r3, r3 | r3 = SWAP32 (r3);
0x000135f0 and r4, r3, 0xdfdfdfdf | r4 = r3 & 0xdfdfdfdf;
| }
0x000135f4 bl 0x12b30 | r0 = fcn_00012b30 (r0, r1);
0x000135f8 strd r5, r6, [r0] | __asm ("strd r5, r6, [r0]");
0x000135fc str r4, [r0, 8] | *((r0 + 8)) = r4;
0x000135fe pop {r4, r5, r6, pc} |
| label_0:
0x00013600 lsls r3, r3, 0x10 | r3 <<= 0x10;
0x00013602 and r4, r3, 0xdfdfdfdf | r4 = r3 & 0xdfdfdfdf;
0x00013606 bl 0x12b30 | r0 = fcn_00012b30 (r0, r1);
0x0001360a strd r5, r6, [r0] | __asm ("strd r5, r6, [r0]");
0x0001360e str r4, [r0, 8] | *((r0 + 8)) = r4;
0x00013610 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/lib/libapr-1.so.0.7.2 @ 0x137d0 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) sym.apr_table_compress () | void apr_table_compress (int16_t arg_1h, int16_t arg1, uint32_t arg2) {
| int16_t var_0h_2;
| int16_t var_4h_2;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_10h_2;
| int16_t var_14h;
| int16_t var_1ch;
| int16_t var_20h;
| uint32_t var_24h;
| r0 = arg1;
| r1 = arg2;
0x000137d0 cmp r1, 2 |
0x000137d2 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000137d6 sub sp, 0x2c |
0x000137d8 str r1, [sp, 0x24] | var_24h = r1;
| if (r1 == 2) {
0x000137da beq.w 0x1395a | goto label_10;
| }
0x000137de ldr r1, [r0, 8] | r1 = *((r0 + 8));
0x000137e0 mov r3, r0 | r3 = r0;
0x000137e2 cmp r1, 1 |
| if (r1 <= 1) {
0x000137e4 ble.w 0x1395a | goto label_10;
| }
0x000137e8 lsls r1, r1, 2 | r1 <<= 2;
0x000137ea ldr r0, [r0] | r0 = *(r0);
0x000137ec str r3, [sp] | *(sp) = r3;
0x000137ee blx 0xa974 | fcn_0000a974 ();
0x000137f2 ldr r3, [sp] | r3 = *(sp);
0x000137f4 mov sl, r0 | sl = r0;
0x000137f6 ldr.w sb, [r3, 8] | sb = *((r3 + 8));
0x000137fa ldr r1, [r3, 0x10] | r1 = *((r3 + 0x10));
0x000137fc mov r6, sb | r6 = sb;
| do {
0x000137fe subs r6, 1 | r6--;
0x00013800 str r1, [r0], 4 | *(r0) = r1;
| r0 += 4;
0x00013804 add.w r1, r1, 0xc | r1 += 0xc;
0x00013808 bne 0x137fe |
| } while (r6 != 1);
0x0001380a lsl.w fp, sb, 2 |
0x0001380e ldr r0, [r3] | r0 = *(r3);
0x00013810 str r3, [sp] | *(sp) = r3;
0x00013812 mov r1, fp | r1 = fp;
0x00013814 blx 0xa974 | fcn_0000a974 ();
0x00013818 cmp.w sb, 1 |
0x0001381c ldr r3, [sp] | r3 = *(sp);
| if (sb < 1) {
0x0001381e bls.w 0x13b0e | goto label_11;
| }
0x00013822 sub.w r8, sb, 2 | r8 = sb - 2;
0x00013826 mov r4, r6 | r4 = r6;
0x00013828 bic r8, r8, 1 | r8 = BIT_MASK (r8, 1);
0x0001382c add.w r5, sl, 4 | r5 = sl + 4;
0x00013830 add.w r8, r8, 2 | r8 += 2;
0x00013834 strd r6, r0, [sp] | __asm ("strd r6, r0, [sp]");
0x00013838 str r3, [sp, 8] | var_8h = r3;
| do {
0x0001383a ldr.w r6, [sl, r4, lsl 2] | offset_0 = r4 << 2;
| r6 = *((sl + offset_0));
0x0001383e ldr.w r7, [r5, r4, lsl 2] | offset_1 = r4 << 2;
| r7 = *((r5 + offset_1));
0x00013842 ldr r0, [r6] | r0 = *(r6);
0x00013844 ldr r1, [r7] | r1 = *(r7);
0x00013846 blx 0xa124 | r0 = listen (r0, r1);
0x0001384a cmp r0, 0 |
0x0001384c itt gt |
| if (r0 <= 0) {
0x0001384e strgt r7, [sl, r4, lsl 2] | offset_2 = r4 << 2;
| *((sl + offset_2)) = r7;
| }
| if (r0 > 0) {
0x00013852 str.w r6, [r5, r4, lsl 2] | __asm ("str.w r6, [r5, r4, lsl 2]");
| }
0x00013856 adds r4, 2 | r4 += 2;
0x00013858 cmp r4, r8 |
0x0001385a bne 0x1383a |
| } while (r4 != r8);
0x0001385c cmp.w sb, 2 |
0x00013860 ldrd r6, r7, [sp] | __asm ("ldrd r6, r7, [sp]");
0x00013864 ldr r3, [sp, 8] | r3 = var_8h;
| if (sb == 2) {
0x00013866 beq.w 0x13b0e | goto label_11;
| }
0x0001386a mov r2, sb | r2 = sb;
0x0001386c movs r0, 2 | r0 = 2;
0x0001386e mov r4, r6 | r4 = r6;
0x00013870 mov r8, fp | r8 = fp;
0x00013872 mov sb, r3 | sb = r3;
| label_1:
0x00013874 mov r1, r0 | r1 = r0;
0x00013876 lsls r0, r0, 1 | r0 <<= 1;
0x00013878 cmp r2, r1 |
0x0001387a it ls |
| if (r2 > r1) {
0x0001387c movls r3, 0 | r3 = 0;
| }
| if (r2 < r1) {
0x0001387e bls 0x13936 | goto label_12;
| }
0x00013880 mov.w fp, 0 |
0x00013884 mov r6, r7 | r6 = r7;
0x00013886 mov r3, fp | r3 = fp;
0x00013888 mov fp, r1 |
0x0001388a mov r5, r3 | r5 = r3;
0x0001388c strd r4, r8, [sp, 0x14] | __asm ("strd r4, r8, [sp, 0x14]");
0x00013890 str r7, [sp, 0x1c] | var_1ch = r7;
0x00013892 str r0, [sp, 0x10] | var_10h_2 = r0;
0x00013894 str.w sb, [sp, 0x20] | __asm ("str.w sb, [var_20h]");
| label_0:
0x00013898 add.w r0, fp, r1 | r0 = fp + r1;
0x0001389c mov sb, r2 | sb = r2;
0x0001389e cmp r2, r0 |
0x000138a0 it hs |
| if (r2 < r0) {
0x000138a2 movhs sb, r0 | sb = r0;
| }
0x000138a4 cmp fp, r5 |
| if (fp == r5) {
0x000138a6 beq 0x1398e | goto label_13;
| }
0x000138a8 cmp sb, fp |
| if (sb == fp) {
0x000138aa beq 0x13992 | goto label_14;
| }
0x000138ac mov r8, r5 | r8 = r5;
0x000138ae strd r5, r1, [sp, 8] | __asm ("strd r5, r1, [sp, 8]");
0x000138b2 mov r7, fp | r7 = fp;
0x000138b4 mov r5, sl | r5 = sl;
0x000138b6 strd r2, r0, [sp] | __asm ("strd r2, r0, [sp]");
0x000138ba b 0x138c0 |
| while (r8 != fp) {
0x000138bc cmp r7, sb |
| if (r7 == sb) {
0x000138be beq 0x13960 | goto label_15;
| }
0x000138c0 ldr.w sl, [r5, r8, lsl 2] | offset_3 = r8 << 2;
| sl = *((r5 + offset_3));
0x000138c4 adds r6, 4 | r6 += 4;
0x000138c6 ldr.w r4, [r5, r7, lsl 2] | offset_4 = r7 << 2;
| r4 = *((r5 + offset_4));
0x000138ca ldr.w r0, [sl] | r0 = *(sl);
0x000138ce ldr r1, [r4] | r1 = *(r4);
0x000138d0 blx 0xa124 | r0 = listen (r0, r1);
0x000138d4 cmp r0, 0 |
0x000138d6 itte le |
| if (r0 > 0) {
0x000138d8 addle r8, r8, 1 | r8++;
| }
| if (r0 <= 0) {
0x000138dc movgt r4, sl | r4 = sl;
| }
| if (r0 > 0) {
0x000138de adds r7, 1 | r7++;
| }
0x000138e0 cmp r8, fp |
0x000138e2 str r4, [r6, -0x4] | *((r6 - 0x4)) = r4;
0x000138e6 bne 0x138bc |
| }
0x000138e8 mov sl, r5 | sl = r5;
0x000138ea ldrd r2, r0, [sp] | __asm ("ldrd r2, r0, [sp]");
0x000138ec movs r0, 0 | r0 = 0;
0x000138ee ldr r1, [sp, 0xc] | r1 = var_ch;
0x000138f0 ldr r5, [sp, 8] | r5 = var_8h;
| label_3:
0x000138f2 cmp sb, r7 |
| if (sb < r7) {
0x000138f4 bls 0x13916 | goto label_2;
| }
0x000138f6 add.w r4, sl, r7, lsl 2 | r4 = sl + (r7 << 2);
0x000138fa add.w lr, sl, sb, lsl 2 | lr = sl + (sb << 2);
0x000138fe sub.w ip, r6, 4 |
| do {
0x00013902 ldr r3, [r4], 4 | r3 = *(r4);
| r4 += 4;
0x00013906 cmp lr, r4 |
0x00013908 str r3, [ip, 4]! | *((ip += 4)) = r3;
0x0001390c bne 0x13902 |
| } while (lr != r4);
0x0001390e sub.w r3, sb, r7 | r3 = sb - r7;
0x00013912 add.w r6, r6, r3, lsl 2 | r6 += (r3 << 2);
| label_2:
0x00013916 ldr r3, [sp, 0x10] | r3 = var_10h_2;
0x00013918 add.w fp, r0, r1 |
0x0001391c cmp r2, fp |
0x0001391e add r5, r3 | r5 += r3;
| if (r2 > fp) {
0x00013920 bhi 0x13898 | goto label_0;
| }
0x00013922 ldr r7, [sp, 0x1c] | r7 = var_1ch;
0x00013924 mov r0, r3 | r0 = r3;
0x00013926 ldrd r4, r8, [sp, 0x14] | __asm ("ldrd r4, r8, [var_14h]");
0x0001392a ldr.w sb, [sp, 0x20] | sb = var_20h;
0x0001392e subs r3, r6, r7 | r3 = r6 - r7;
0x00013930 asrs r3, r3, 2 | r3 >>= 2;
0x00013932 cmp r2, r3 |
| if (r2 < r3) {
0x00013934 bls 0x1394e | goto label_16;
| }
| label_12:
0x00013936 lsls r3, r3, 2 | r3 <<= 2;
0x00013938 add.w r6, sl, r8 | r6 = sl + r8;
0x0001393c add.w r1, sl, r3 | r1 = sl + r3;
0x00013940 add r3, r7 | r3 += r7;
| do {
0x00013942 ldr r5, [r1], 4 | r5 = *(r1);
| r1 += 4;
0x00013946 cmp r6, r1 |
0x00013948 str r5, [r3], 4 | *(r3) = r5;
| r3 += 4;
0x0001394c bne 0x13942 |
| } while (r6 != r1);
| label_16:
0x0001394e cmp r2, r0 |
| if (r2 < r0) {
0x00013950 bls 0x13996 | goto label_17;
| }
0x00013952 mov r3, sl | r3 = sl;
0x00013954 mov sl, r7 | sl = r7;
0x00013956 mov r7, r3 | r7 = r3;
0x00013958 b 0x13874 | goto label_1;
| label_10:
0x0001395a add sp, 0x2c |
0x0001395c pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_15:
0x00013960 mov sl, r5 | sl = r5;
0x00013962 ldrd r2, r0, [sp] | __asm ("ldrd r2, r0, [sp]");
0x00013966 ldr r1, [sp, 0xc] | r1 = var_ch;
0x00013968 ldr r5, [sp, 8] | r5 = var_8h;
| label_4:
0x0001396a cmp fp, r8 |
| if (fp < r8) {
0x0001396c bls 0x13916 | goto label_2;
| }
0x0001396e add.w r3, sl, r8, lsl 2 | r3 = sl + (r8 << 2);
0x00013972 add.w ip, sl, fp, lsl 2 |
0x00013976 subs r4, r6, 4 | r4 = r6 - 4;
| do {
0x00013978 ldr r7, [r3], 4 | r7 = *(r3);
| r3 += 4;
0x0001397c cmp r3, ip |
0x0001397e str r7, [r4, 4]! | *((r4 += 4)) = r7;
0x00013982 bne 0x13978 |
| } while (r3 != ip);
0x00013984 sub.w r8, fp, r8 | r8 = fp - r8;
0x00013988 add.w r6, r6, r8, lsl 2 | r6 += (r8 << 2);
0x0001398c b 0x13916 | goto label_2;
| label_13:
0x0001398e mov r7, r5 | r7 = r5;
0x00013990 b 0x138f2 | goto label_3;
| label_14:
0x00013992 mov r8, r5 | r8 = r5;
0x00013994 b 0x1396a | goto label_4;
| label_17:
0x00013996 mov r6, r4 | r6 = r4;
0x00013998 mov r3, sb | r3 = sb;
| label_9:
0x0001399a ldr r2, [r3, 8] | r2 = *((r3 + 8));
0x0001399c add.w r8, r7, 4 | r8 = r7 + 4;
0x000139a0 add.w sl, r7, r2, lsl 2 | sl = r7 + (r2 << 2);
0x000139a4 cmp sl, r8 |
0x000139a6 ittt hi |
| if (sl <= r8) {
0x000139a8 movhi r5, r6 | r5 = r6;
| }
| if (sl <= r8) {
0x000139aa movhi sb, r7 | sb = r7;
| }
| if (sl <= r8) {
0x000139ac strhi r3, [sp, 4] | var_4h_2 = r3;
| }
| if (sl < r8) {
0x000139ae bls 0x13a92 | goto label_18;
| }
| do {
0x000139b0 mov r4, r8 | r4 = r8;
0x000139b2 ldr.w r7, [sb] | r7 = *(sb);
0x000139b6 ldr r2, [r4], 4 | r2 = *(r4);
| r4 += 4;
0x000139ba ldr r6, [r7, 8] | r6 = *((r7 + 8));
0x000139bc ldr r1, [r2, 8] | r1 = *((r2 + 8));
0x000139be cmp r1, r6 |
| if (r1 == r6) {
0x000139c0 beq 0x139cc | goto label_19;
| }
| label_5:
0x000139c2 cmp sl, r4 |
0x000139c4 mov sb, r8 | sb = r8;
| if (sl < r4) {
0x000139c6 bls 0x13a56 | goto label_20;
| }
| label_6:
0x000139c8 mov r8, r4 | r8 = r4;
0x000139ca b 0x139b0 |
| } while (1);
| label_19:
0x000139cc ldr r3, [r7] | r3 = *(r7);
0x000139ce ldr r0, [r2] | r0 = *(r2);
0x000139d0 mov r1, r3 | r1 = r3;
0x000139d2 mov fp, r3 |
0x000139d4 blx 0xa124 | r0 = listen (r0, r1);
0x000139d8 cmp r0, 0 |
| if (r0 != 0) {
0x000139da bne 0x139c2 | goto label_5;
| }
0x000139dc cmp sl, r4 |
| if (sl < r4) {
0x000139de bls.w 0x13b0a | goto label_21;
| }
0x000139e2 mov r5, r4 | r5 = r4;
0x000139e4 str r7, [sp] | *(sp) = r7;
0x000139e6 mov r4, fp | r4 = fp;
0x000139e8 mov fp, sb |
0x000139ea mov sb, r8 | sb = r8;
0x000139ec b 0x139fa |
| while (r6 == r2) {
0x000139ee ldr r0, [r0] | r0 = *(r0);
0x000139f0 blx 0xa124 | r0 = listen (r0, r1);
| if (r0 != 0) {
0x000139f4 cbnz r0, 0x13a0a | goto label_22;
| }
0x000139f6 cmp sl, r5 |
| if (sl < r5) {
0x000139f8 bls 0x13a9e | goto label_23;
| }
0x000139fa ldr r0, [r5] | r0 = *(r5);
0x000139fc mov r8, r5 | r8 = r5;
0x000139fe adds r5, 4 | r5 += 4;
0x00013a00 mov r1, r4 | r1 = r4;
0x00013a02 mov r7, r5 | r7 = r5;
0x00013a04 ldr r2, [r0, 8] | r2 = *((r0 + 8));
0x00013a06 cmp r6, r2 |
0x00013a08 beq 0x139ee |
| }
| label_22:
0x00013a0a ldr r7, [sp] | r7 = *(sp);
0x00013a0c mov r3, fp | r3 = fp;
0x00013a0e mov fp, r8 |
0x00013a10 mov r8, sb | r8 = sb;
0x00013a12 mov r4, fp | r4 = fp;
0x00013a14 mov sb, r3 | sb = r3;
0x00013a16 sub.w fp, fp, 4 |
| label_7:
0x00013a1a ldr r3, [sp, 0x24] | r3 = var_24h;
0x00013a1c cmp r3, 1 |
| if (r3 == 1) {
0x00013a1e beq 0x13aac | goto label_24;
| }
0x00013a20 ldr r1, [r4, -0x4] | r1 = *((r4 - 0x4));
0x00013a24 ldr r1, [r1, 4] | r1 = *((r1 + 4));
0x00013a26 str r1, [r7, 4] | *((r7 + 4)) = r1;
| label_8:
0x00013a28 mov r1, r8 | r1 = r8;
0x00013a2a movs r4, 0 | r4 = 0;
| do {
0x00013a2c ldr r3, [r1], 4 | r3 = *(r1);
| r1 += 4;
0x00013a30 cmp r1, fp |
0x00013a32 str r4, [r3] | *(r3) = r4;
0x00013a34 bls 0x13a2c |
| } while (r1 < fp);
0x00013a36 sub.w r4, fp, r8 | r4 = fp - r8;
0x00013a3a add.w r2, fp, 1 | r2 += arg_1h;
0x00013a3e bic r4, r4, 3 | r4 = BIT_MASK (r4, 3);
0x00013a42 add.w r1, r8, 1 | r1 = r8 + 1;
0x00013a44 lsls r1, r0, 4 | r1 = r0 << 4;
0x00013a46 adds r4, 4 | r4 += 4;
0x00013a48 movs r5, 1 | r5 = 1;
0x00013a4a cmp r2, r1 |
0x00013a4c it lo |
| if (r2 >= r1) {
0x00013a4e movlo r4, 4 | r4 = 4;
| }
0x00013a50 add r4, r8 | r4 += r8;
0x00013a52 cmp sl, r4 |
| if (sl > r4) {
0x00013a54 bhi 0x139c8 | goto label_6;
| }
| label_20:
0x00013a56 ldr r3, [sp, 4] | r3 = var_4h_2;
| if (r5 == 0) {
0x00013a58 cbz r5, 0x13a92 | goto label_18;
| }
0x00013a5a ldr r7, [r3, 8] | r7 = *((r3 + 8));
0x00013a5c ldr r5, [r3, 0x10] | r5 = *((r3 + 0x10));
0x00013a5e add.w r6, r7, r7, lsl 1 | r6 = r7 + (r7 << 1);
0x00013a62 add.w r4, r5, 0xc | r4 = r5 + 0xc;
0x00013a66 add.w r6, r5, r6, lsl 2 | r6 = r5 + (r6 << 2);
| do {
0x00013a6a ldr r2, [r4, -0xc] | r2 = *((r4 - 0xc));
0x00013a6e mov ip, r4 |
| if (r2 != 0) {
0x00013a70 cbz r2, 0x13a7c |
0x00013a72 ldmdb r4, {r0, r1, r2} | __asm ("ldmdb r4, {r0, r1, r2}");
0x00013a76 stm.w r5, {r0, r1, r2} | *(r5) = r0;
| *((r5 + 4)) = r1;
| *((r5 + 8)) = r2;
0x00013a7a adds r5, 0xc | r5 += 0xc;
| }
0x00013a7c cmp r6, ip |
0x00013a7e add.w r4, r4, 0xc | r4 += 0xc;
0x00013a82 bhi 0x13a6a |
| } while (r6 > ip);
0x00013a84 subs r2, r6, r5 | r2 = r6 - r5;
0x00013a86 mov.w r1, 0x55555555 | r1 = 0x55555555;
0x00013a8a asrs r2, r2, 2 | r2 >>= 2;
0x00013a8c mla r7, r1, r2, r7 | __asm ("mla r7, r1, r2, r7");
0x00013a90 str r7, [r3, 8] | *((r3 + 8)) = r7;
| label_18:
0x00013a92 mov r0, r3 | r0 = r3;
0x00013a94 add sp, 0x2c |
0x00013a96 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00013a9a b.w 0x12ae0 | void (*0x12ae0)() ();
| label_23:
0x00013a9e mov r3, fp | r3 = fp;
0x00013aa0 mov r4, r7 | r4 = r7;
0x00013aa2 mov fp, r8 |
0x00013aa4 ldr r7, [sp] | r7 = *(sp);
0x00013aa6 mov r8, sb | r8 = sb;
0x00013aa8 mov sb, r3 | sb = r3;
0x00013aaa b 0x13a1a | goto label_7;
| label_24:
0x00013aac mov r5, sb | r5 = sb;
0x00013aae movs r4, 0 | r4 = 0;
| do {
0x00013ab0 ldr r3, [r5], 4 | r3 = *(r5);
| r5 += 4;
0x00013ab4 ldr r0, [r3, 4] | r0 = *((r3 + 4));
0x00013ab6 blx 0xa6d8 | fcn_0000a6d8 ();
0x00013aba cmp r5, fp |
0x00013abc add.w r3, r0, 2 | r3 = r0 + 2;
0x00013ac0 add r4, r3 | r4 += r3;
0x00013ac2 bls 0x13ab0 |
| } while (r5 < fp);
0x00013ac4 ldr r3, [sp, 4] | r3 = var_4h_2;
0x00013ac6 mov r1, r4 | r1 = r4;
0x00013ac8 mov r6, sb | r6 = sb;
0x00013aca movw r7, 0x202c | r7 = 0x202c;
0x00013ace ldr r0, [r3] | r0 = *(r3);
0x00013ad0 blx 0xa974 | r0 = fcn_0000a974 ();
0x00013ad4 mov r5, r0 | r5 = r0;
0x00013ad6 mov r4, r0 | r4 = r0;
0x00013ad8 b 0x13ae0 |
| while (r6 < fp) {
0x00013ada mov r4, r3 | r4 = r3;
0x00013adc strh r7, [r4], 2 | *(r4) = r7;
| r4 += 2;
0x00013ae0 ldr r3, [r6] | r3 = *(r6);
0x00013ae2 mov r0, r4 | r0 = r4;
0x00013ae4 ldr r1, [r3, 4] | r1 = *((r3 + 4));
0x00013ae6 blx 0xa880 | fcn_0000a880 ();
0x00013aea ldr r3, [r6], 4 | r3 = *(r6);
| r6 += 4;
0x00013aee ldr r0, [r3, 4] | r0 = *((r3 + 4));
0x00013af0 blx 0xa6d8 | fcn_0000a6d8 ();
0x00013af4 cmp r6, fp |
0x00013af6 mov r1, r0 | r1 = r0;
0x00013af8 add.w r3, r4, r0 | r3 = r4 + r0;
0x00013afc bls 0x13ada |
| }
0x00013afe movs r0, 0 | r0 = 0;
0x00013b00 strb r0, [r4, r1] | *((r4 + r1)) = r0;
0x00013b02 ldr.w r1, [sb] | r1 = *(sb);
0x00013b06 str r5, [r1, 4] | *((r1 + 4)) = r5;
0x00013b08 b 0x13a28 | goto label_8;
| label_21:
0x00013b0a mov fp, r8 |
0x00013b0c b 0x13a1a | goto label_7;
| label_11:
0x00013b0e mov r7, sl | r7 = sl;
0x00013b10 b 0x1399a | 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/lib/libapr-1.so.0.7.2 @ 0x12ea8 */
| #include <stdint.h>
|
; (fcn) sym.apr_table_copy () | void apr_table_copy (int16_t arg1, int16_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x00012ea8 push {r3, r4, r5, r6, r7, lr} |
0x00012eaa mov r5, r1 | r5 = r1;
0x00012eac mov.w r1, 0x118 | r1 = 0x118;
0x00012eb0 mov r7, r0 | r7 = r0;
0x00012eb2 blx 0xa974 | fcn_0000a974 ();
0x00012eb6 ldr r6, [r5, 0xc] | r6 = *((r5 + 0xc));
0x00012eb8 mov r4, r0 | r4 = r0;
0x00012eba mov r0, r7 | r0 = r7;
0x00012ebc cmp r6, 1 |
0x00012ebe it lt |
| if (r6 >= 1) {
0x00012ec0 movlt r6, 1 | r6 = 1;
| }
0x00012ec2 add.w r1, r6, r6, lsl 1 | r1 = r6 + (r6 << 1);
0x00012ec6 lsls r1, r1, 2 | r1 <<= 2;
0x00012ec8 blx 0xa974 | fcn_0000a974 ();
0x00012ecc vldr d16, [pc, 0x48] | __asm ("vldr d16, [0x00012f1c]");
0x00012ed0 mov r3, r4 | r3 = r4;
0x00012ed2 str r0, [r4, 0x10] | *((r4 + 0x10)) = r0;
0x00012ed4 str r7, [r3], 4 | *(r3) = r7;
| r3 += 4;
0x00012ed8 vst1.32 {d16}, [r3] | __asm ("vst1.32 {d16}, [r3]");
0x00012edc ldr r2, [r5, 8] | r2 = *((r5 + 8));
0x00012ede ldr r1, [r5, 0x10] | r1 = *((r5 + 0x10));
0x00012ee0 str r6, [r4, 0xc] | *((r4 + 0xc)) = r6;
0x00012ee2 movs r6, 0x80 | r6 = 0x80;
0x00012ee4 add.w r2, r2, r2, lsl 1 | r2 += (r2 << 1);
0x00012ee8 lsls r2, r2, 2 | r2 <<= 2;
0x00012eea blx 0xa78c | fcn_0000a78c ();
0x00012eee ldr r3, [r5, 8] | r3 = *((r5 + 8));
0x00012ef0 mov r2, r6 | r2 = r6;
0x00012ef2 add.w r1, r5, 0x18 | r1 = r5 + 0x18;
0x00012ef6 add.w r0, r4, 0x18 | r0 = r4 + 0x18;
0x00012efa str r3, [r4, 8] | *((r4 + 8)) = r3;
0x00012efc blx 0xa78c | fcn_0000a78c ();
0x00012f00 mov r2, r6 | r2 = r6;
0x00012f02 add.w r1, r5, 0x98 | r1 = r5 + 0x98;
0x00012f06 add.w r0, r4, 0x98 | r0 = r4 + 0x98;
0x00012f0a blx 0xa78c | fcn_0000a78c ();
0x00012f0e ldr r3, [r5, 0x14] | r3 = *((r5 + 0x14));
0x00012f10 mov r0, r4 | r0 = r4;
0x00012f12 str r3, [r4, 0x14] | *((r4 + 0x14)) = r3;
0x00012f14 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/lib/libapr-1.so.0.7.2 @ 0x13104 */
| #include <stdint.h>
|
| #define SWAP32(n) ((uint32_t) (((n & 0x000000ff) << 24) | \
| ((n & 0x0000ff00) << 8) | \
| ((n & 0x00ff0000) >> 8) | \
| ((n & 0xff000000) >> 24)))
|
; (fcn) sym.apr_table_setn () | void apr_table_setn (int16_t arg_8h, int16_t arg_10h, int16_t arg_14h, int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x00013104 svcmi 0xf0e92d | __asm ("svcmi 0xf0e92d");
0x00013108 mov r7, r1 | r7 = r1;
0x0001310a ldrb r1, [r1] | r1 = *(r1);
0x0001310c sub sp, 0x14 |
0x0001310e mov fp, r0 |
0x00013110 str r2, [sp, 4] | var_4h = r2;
0x00013112 mov r4, r1 | r4 = r1;
| if (r1 != 0) {
0x00013114 cbz r1, 0x13134 |
0x00013116 ldrh r2, [r7] | r2 = *(r7);
0x00013118 ldrb r0, [r7, 1] | r0 = *((r7 + 1));
0x0001311a rev16 r2, r2 | __asm ("rev16 r2, r2");
0x0001311c uxth r2, r2 | r2 = (int16_t) r2;
0x0001311e cmp r0, 0 |
| if (r0 == 0) {
0x00013120 beq.w 0x13246 | goto label_5;
| }
0x00013124 ldrb r0, [r7, 2] | r0 = *((r7 + 2));
0x00013126 cmp r0, 0 |
| if (r0 == 0) {
0x00013128 beq.w 0x13246 | goto label_5;
| }
0x0001312c ldr r4, [r7] | r4 = *(r7);
0x0001312e rev r4, r4 | r4 = SWAP32 (r4);
0x00013130 and r4, r4, 0xdfdfdfdf | r4 &= 0xdfdfdfdf;
| }
| label_3:
0x00013134 and r8, r1, 0x1f | r8 = r1 & 0x1f;
0x00013138 movs r2, 1 | r2 = 1;
0x0001313a ldr.w r1, [fp, 0x14] | r1 = *(arg_14h);
0x0001313e lsl.w r2, r2, r8 | r2 <<= r8;
0x00013142 ldr.w sl, [fp, 8] | sl = *(arg_8h);
0x00013146 tst r1, r2 |
0x00013148 str.w sl, [sp, 8] | __asm ("str.w sl, [var_8h]");
| if ((r1 & r2) == 0) {
0x0001314c beq 0x131fc | goto label_6;
| }
0x0001314e add.w r1, fp, r8, lsl 2 | r1 = fp + (r8 << 2);
0x00013152 ldr.w r3, [fp, 0x10] | r3 = *(arg_10h);
0x00013156 ldr r2, [r1, 0x18] | r2 = *((r1 + 0x18));
0x00013158 ldr.w r5, [r1, 0x98] | r5 = *((r1 + 0x98));
0x0001315c str r3, [sp, 0xc] | var_ch = r3;
0x0001315e add.w r2, r2, r2, lsl 1 | r2 += (r2 << 1);
0x00013162 add.w r5, r5, r5, lsl 1 | r5 += (r5 << 1);
0x00013166 add.w sb, r3, r2, lsl 2 | sb = r3 + (r2 << 2);
0x0001316a add.w r5, r3, r5, lsl 2 | r5 = r3 + (r5 << 2);
0x0001316e cmp sb, r5 |
| if (sb < r5) {
0x00013170 bls 0x1317c | goto label_7;
| }
0x00013172 b 0x1320a | goto label_8;
| do {
| label_0:
0x00013174 add.w sb, sb, 0xc | sb += 0xc;
0x00013178 cmp r5, sb |
| if (r5 <= sb) {
0x0001317a blo 0x1320a | goto label_8;
| }
| label_7:
0x0001317c ldr.w r1, [sb, 8] | r1 = *((sb + 8));
0x00013180 cmp r1, r4 |
0x00013182 bne 0x13174 |
| } while (r1 != r4);
0x00013184 ldr.w r0, [sb] | r0 = *(sb);
0x00013188 mov r1, r7 | r1 = r7;
0x0001318a blx 0xa124 | r0 = listen (r0, r1);
0x0001318e mov r6, r0 | r6 = r0;
0x00013190 cmp r0, 0 |
| if (r0 != 0) {
0x00013192 bne 0x13174 | goto label_0;
| }
0x00013194 ldr r3, [sp, 4] | r3 = var_4h;
0x00013196 add.w r8, sb, 0xc | r8 = sb + 0xc;
0x0001319a cmp r5, r8 |
0x0001319c str.w r3, [sb, 4] | __asm ("str.w r3, [sb, 4]");
| if (r5 <= r8) {
0x000131a0 blo 0x13220 | goto label_9;
| }
0x000131a2 mov sb, r0 | sb = r0;
| do {
0x000131a4 ldr.w r2, [r8, 8] | r2 = *((r8 + 8));
0x000131a8 cmp r2, r4 |
| if (r2 == r4) {
0x000131aa beq 0x13226 | goto label_10;
| }
| label_1:
0x000131ac cmp.w sb, 0 |
| if (sb != 0) {
0x000131b0 beq 0x131c0 |
0x000131b2 ldm.w r8, {r0, r1, r2} | r0 = *(r8);
| r1 = *((r8 + 4));
| r2 = *((r8 + 8));
0x000131b6 movs r6, 1 | r6 = 1;
0x000131b8 stm.w sb, {r0, r1, r2} | *(sb) = r0;
| *((sb + 4)) = r1;
| *((sb + 8)) = r2;
0x000131bc add.w sb, sb, 0xc | sb += 0xc;
| }
| label_2:
0x000131c0 add.w r8, r8, 0xc | r8 += 0xc;
0x000131c4 cmp r5, r8 |
0x000131c6 bhs 0x131a4 |
| } while (r5 >= r8);
0x000131c8 cmp.w sb, 0 |
| if (sb == 0) {
0x000131cc beq 0x1324e | goto label_11;
| }
0x000131ce ldr r3, [sp, 8] | r3 = var_8h;
0x000131d0 add.w r2, r3, r3, lsl 1 | r2 = r3 + (r3 << 1);
0x000131d4 ldr r3, [sp, 0xc] | r3 = var_ch;
0x000131d6 add.w r3, r3, r2, lsl 2 | r3 += (r2 << 2);
0x000131da cmp r3, r8 |
| if (r3 < r8) {
0x000131dc bls 0x131f2 | goto label_4;
| }
| do {
0x000131de ldm.w r8, {r0, r1, r2} | r0 = *(r8);
| r1 = *((r8 + 4));
| r2 = *((r8 + 8));
0x000131e2 add.w r8, r8, 0xc | r8 += 0xc;
0x000131e6 cmp r3, r8 |
0x000131e8 add.w sb, sb, 0xc | sb += 0xc;
0x000131ec stmdb sb, {r0, r1, r2} | __asm ("stmdb sb, {r0, r1, r2}");
0x000131f0 bhi 0x131de |
| } while (r3 > r8);
| label_4:
0x000131f2 mov r0, fp | r0 = fp;
0x000131f4 add sp, 0x14 |
0x000131f6 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000131fa b 0x12ae0 | void (*0x12ae0)() ();
| label_6:
0x000131fc orrs r1, r2 | r1 |= r2;
0x000131fe add.w r2, r8, 6 | r2 = r8 + 6;
0x00013202 str.w sl, [fp, r2, lsl 2] | __asm ("str.w sl, [fp, r2, lsl 2]");
0x00013206 str.w r1, [fp, 0x14] | __asm ("str.w r1, [arg_14h]");
| label_8:
0x0001320a add.w r8, r8, 0x26 | r8 += 0x26;
0x0001320e mov r0, fp | r0 = fp;
0x00013210 str.w sl, [fp, r8, lsl 2] | __asm ("str.w sl, [fp, r8, lsl 2]");
0x00013214 bl 0x12b30 | fcn_00012b30 (r0, r1);
0x00013218 ldr r3, [sp, 4] | r3 = var_4h;
0x0001321a str r7, [r0] | *(r0) = r7;
0x0001321c strd r3, r4, [r0, 4] | __asm ("strd r3, r4, [r0, 4]");
| label_9:
0x00013220 add sp, 0x14 |
0x00013222 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_10:
0x00013226 ldr.w r0, [r8] | r0 = *(r8);
0x0001322a mov r1, r7 | r1 = r7;
0x0001322c blx 0xa124 | r0 = listen (r0, r1);
0x00013230 cmp r0, 0 |
| if (r0 != 0) {
0x00013232 bne 0x131ac | goto label_1;
| }
0x00013234 add.w sl, sl, -1 | sl += -1;
0x00013238 cmp.w sb, 0 |
0x0001323c it eq |
| if (sb != 0) {
0x0001323e moveq sb, r8 | sb = r8;
| }
0x00013240 str.w sl, [fp, 8] | __asm ("str.w sl, [arg_8h]");
0x00013244 b 0x131c0 | goto label_2;
| label_5:
0x00013246 lsls r2, r2, 0x10 | r2 <<= 0x10;
0x00013248 and r4, r2, 0xdfdfdfdf | r4 = r2 & 0xdfdfdfdf;
0x0001324c b 0x13134 | goto label_3;
| label_11:
0x0001324e cmp r6, 0 |
| if (r6 != 0) {
0x00013250 bne 0x131f2 | goto label_4;
| }
0x00013252 add sp, 0x14 |
0x00013254 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0x13258 */
| #include <stdint.h>
|
| #define SWAP32(n) ((uint32_t) (((n & 0x000000ff) << 24) | \
| ((n & 0x0000ff00) << 8) | \
| ((n & 0x00ff0000) >> 8) | \
| ((n & 0xff000000) >> 24)))
|
; (fcn) sym.apr_table_unset () | void apr_table_unset (int16_t arg1, int16_t arg2) {
| int16_t var_4h;
| r0 = arg1;
| r1 = arg2;
0x00013258 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001325c movs r2, 1 | r2 = 1;
0x0001325e ldrb r5, [r1] | r5 = *(r1);
0x00013260 mov sb, r1 | sb = r1;
0x00013262 sub sp, 0xc |
0x00013264 ldr r1, [r0, 0x14] | r1 = *((r0 + 0x14));
0x00013266 and r3, r5, 0x1f | r3 = r5 & 0x1f;
0x0001326a lsls r2, r3 | r2 <<= r3;
0x0001326c tst r2, r1 |
| if ((r2 & r1) == 0) {
0x0001326e beq 0x1332c | goto label_4;
| }
0x00013270 mov sl, r0 | sl = r0;
| if (r5 != 0) {
0x00013272 cbz r5, 0x13296 |
0x00013274 ldrh.w r2, [sb] | r2 = *(sb);
0x00013278 ldrb.w r1, [sb, 1] | r1 = *((sb + 1));
0x0001327c rev16 r2, r2 | __asm ("rev16 r2, r2");
0x0001327e uxth r2, r2 | r2 = (int16_t) r2;
0x00013280 cmp r1, 0 |
| if (r1 == 0) {
0x00013282 beq 0x1334e | goto label_5;
| }
0x00013284 ldrb.w r1, [sb, 2] | r1 = *((sb + 2));
0x00013288 cmp r1, 0 |
| if (r1 == 0) {
0x0001328a beq 0x1334e | goto label_5;
| }
0x0001328c ldr.w r5, [sb] | r5 = *(sb);
0x00013290 rev r5, r5 | r5 = SWAP32 (r5);
0x00013292 and r5, r5, 0xdfdfdfdf | r5 &= 0xdfdfdfdf;
| }
| label_3:
0x00013296 add.w r3, sl, r3, lsl 2 | r3 = sl + (r3 << 2);
0x0001329a ldr.w r8, [sl, 0x10] | r8 = *((sl + 0x10));
0x0001329e ldr r4, [r3, 0x18] | r4 = *((r3 + 0x18));
0x000132a0 ldr.w r6, [r3, 0x98] | r6 = *((r3 + 0x98));
0x000132a4 add.w r4, r4, r4, lsl 1 | r4 += (r4 << 1);
0x000132a8 add.w r6, r6, r6, lsl 1 | r6 += (r6 << 1);
0x000132ac add.w r4, r8, r4, lsl 2 | r4 = r8 + (r4 << 2);
0x000132b0 add.w r6, r8, r6, lsl 2 | r6 = r8 + (r6 << 2);
0x000132b4 cmp r4, r6 |
| if (r4 < r6) {
0x000132b6 bls 0x132c0 | goto label_6;
| }
0x000132b8 b 0x1332c | goto label_4;
| do {
| label_0:
0x000132ba adds r4, 0xc | r4 += 0xc;
0x000132bc cmp r6, r4 |
| if (r6 <= r4) {
0x000132be blo 0x1332c | goto label_4;
| }
| label_6:
0x000132c0 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x000132c2 cmp r3, r5 |
0x000132c4 bne 0x132ba |
| } while (r3 != r5);
0x000132c6 ldr r0, [r4] | r0 = *(r4);
0x000132c8 mov r1, sb | r1 = sb;
0x000132ca blx 0xa124 | r0 = listen (r0, r1);
0x000132ce cmp r0, 0 |
| if (r0 != 0) {
0x000132d0 bne 0x132ba | goto label_0;
| }
0x000132d2 ldr.w fp, [sl, 8] | fp = *((sl + 8));
0x000132d6 add.w r7, r4, 0xc | r7 = r4 + 0xc;
0x000132da cmp r6, r7 |
0x000132dc add.w r3, fp, fp, lsl 1 | r3 = fp + (fp << 1);
0x000132e0 add.w fp, fp, -1 |
0x000132e4 str.w fp, [sl, 8] | __asm ("str.w fp, [sl, 8]");
0x000132e8 add.w r3, r8, r3, lsl 2 | r3 = r8 + (r3 << 2);
| if (r6 <= r7) {
0x000132ec blo 0x1333e | goto label_7;
| }
0x000132ee add.w r8, r4, 0x18 | r8 = r4 + 0x18;
0x000132f2 b 0x13306 |
| while (r2 != r5) {
| label_1:
0x000132f4 ldmdb r8, {r0, r1, r2} | __asm ("ldmdb r8, {r0, r1, r2}");
0x000132f8 stm.w r4, {r0, r1, r2} | *(r4) = r0;
| *((r4 + 4)) = r1;
| *((r4 + 8)) = r2;
0x000132fc adds r4, 0xc | r4 += 0xc;
| label_2:
0x000132fe cmp r7, r6 |
0x00013300 add.w r8, r8, 0xc | r8 += 0xc;
| if (r7 > r6) {
0x00013304 bhi 0x1333e | goto label_7;
| }
0x00013306 ldr r2, [r8, -0x4] | r2 = *((r8 - 0x4));
0x0001330a mov r7, r8 | r7 = r8;
0x0001330c cmp r2, r5 |
0x0001330e bne 0x132f4 |
| }
0x00013310 ldr r0, [r8, -0xc] | r0 = *((r8 - 0xc));
0x00013314 mov r1, sb | r1 = sb;
0x00013316 str r3, [sp, 4] | var_4h = r3;
0x00013318 blx 0xa124 | listen (r0, r1);
0x0001331c ldr r3, [sp, 4] | r3 = var_4h;
0x0001331e cmp r0, 0 |
| if (r0 != 0) {
0x00013320 bne 0x132f4 | goto label_1;
| }
0x00013322 add.w fp, fp, -1 |
0x00013326 str.w fp, [sl, 8] | __asm ("str.w fp, [sl, 8]");
0x0001332a b 0x132fe | goto label_2;
| label_4:
0x0001332c add sp, 0xc |
0x0001332e pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| do {
0x00013332 ldm.w r7, {r0, r1, r2} | r0 = *(r7);
| r1 = *((r7 + 4));
| r2 = *((r7 + 8));
0x00013336 adds r7, 0xc | r7 += 0xc;
0x00013338 adds r4, 0xc | r4 += 0xc;
0x0001333a stmdb r4, {r0, r1, r2} | __asm ("stmdb r4, {r0, r1, r2}");
| label_7:
0x0001333e cmp r3, r7 |
0x00013340 bhi 0x13332 |
| } while (r3 > r7);
0x00013342 mov r0, sl | r0 = sl;
0x00013344 add sp, 0xc |
0x00013346 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001334a b.w 0x12ae0 | void (*0x12ae0)() ();
| label_5:
0x0001334e lsls r2, r2, 0x10 | r2 <<= 0x10;
0x00013350 and r5, r2, 0xdfdfdfdf | r5 = r2 & 0xdfdfdfdf;
0x00013354 b 0x13296 | 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/lib/libapr-1.so.0.7.2 @ 0x13650 */
| #include <stdint.h>
|
| #define SWAP32(n) ((uint32_t) (((n & 0x000000ff) << 24) | \
| ((n & 0x0000ff00) << 8) | \
| ((n & 0x00ff0000) >> 8) | \
| ((n & 0xff000000) >> 24)))
|
; (fcn) sym.apr_table_vdo () | void apr_table_vdo (int16_t arg_0h, int16_t arg_1h, int16_t arg_2h, 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;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00013650 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00013654 sub sp, 0x1c |
0x00013656 ldr.w fp, [r3] | fp = *(r3);
0x0001365a mov r7, r2 | r7 = r2;
0x0001365c mov sl, r1 | sl = r1;
0x0001365e ldr r2, [r2, 0x10] | r2 = *(arg_2hx10);
0x00013660 str r0, [sp] | *(sp) = r0;
0x00013662 cmp.w fp, 0 |
| if (fp == 0) {
0x00013666 beq 0x1372a | goto label_4;
| }
0x00013668 movs r1, 1 | r1 = 1;
0x0001366a str.w sl, [sp, 0xc] | __asm ("str.w sl, [var_ch]");
0x0001366e add.w sb, r3, 4 | sb = r3 + 4;
0x00013672 mov sl, r7 | sl = r7;
0x00013674 strd r2, r1, [sp, 0x10] | __asm ("strd r2, r1, [var_14h]");
0x00013678 b 0x13684 |
| while ((r1 & r2) == 0) {
| label_0:
0x0001367a ldr fp, [sb], 4 | fp = *(sb);
| sb += 4;
0x0001367e cmp.w fp, 0 |
| if (fp == 0) {
0x00013682 beq 0x1376a | goto label_5;
| }
0x00013684 ldrb.w r6, [fp] | r6 = *(fp);
0x00013688 movs r3, 1 | r3 = 1;
0x0001368a ldr.w r2, [sl, 0x14] | r2 = *((sl + 0x14));
0x0001368e and r8, r6, 0x1f | r8 = r6 & 0x1f;
0x00013692 lsl.w r1, r3, r8 | r1 = r3 << r8;
0x00013696 tst r1, r2 |
0x00013698 beq 0x1367a |
| }
| if (r6 != 0) {
0x0001369a cbz r6, 0x136be |
0x0001369c ldrh.w r2, [fp] | r2 = *(fp);
0x000136a0 ldrb.w r1, [fp, 1] | r1 = *(arg_1h);
0x000136a4 rev16 r2, r2 | __asm ("rev16 r2, r2");
0x000136a6 uxth r2, r2 | r2 = (int16_t) r2;
0x000136a8 cmp r1, 0 |
| if (r1 == 0) {
0x000136aa beq 0x13774 | goto label_6;
| }
0x000136ac ldrb.w r1, [fp, 2] | r1 = *(arg_2h);
0x000136b0 cmp r1, 0 |
| if (r1 == 0) {
0x000136b2 beq 0x13774 | goto label_6;
| }
0x000136b4 ldr.w r6, [fp] | r6 = *(fp);
0x000136b8 rev r6, r6 | r6 = SWAP32 (r6);
0x000136ba and r6, r6, 0xdfdfdfdf | r6 &= 0xdfdfdfdf;
| }
| label_3:
0x000136be add.w r8, sl, r8, lsl 2 | r8 = sl + (r8 << 2);
0x000136c2 movs r3, 1 | r3 = 1;
0x000136c4 str r3, [sp, 8] | var_8h = r3;
0x000136c6 ldr.w r5, [r8, 0x18] | r5 = *((r8 + 0x18));
0x000136ca ldr r3, [sp, 0x10] | r3 = var_10h;
0x000136cc ldr.w r2, [r8, 0x98] | r2 = *((r8 + 0x98));
0x000136d0 add.w r4, r5, r5, lsl 1 | r4 = r5 + (r5 << 1);
0x000136d4 add.w r4, r3, r4, lsl 2 | r4 = r3 + (r4 << 2);
| label_1:
0x000136d8 cmp r2, r5 |
| if (r2 < r5) {
0x000136da blt 0x136ee | goto label_7;
| }
| do {
0x000136dc ldr r7, [r4] | r7 = *(r4);
| if (r7 != 0) {
0x000136de cbz r7, 0x136e6 |
0x000136e0 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x000136e2 cmp r3, r6 |
| if (r3 == r6) {
0x000136e4 beq 0x136fa | goto label_8;
| }
| }
0x000136e6 adds r5, 1 | r5++;
0x000136e8 adds r4, 0xc | r4 += 0xc;
0x000136ea cmp r2, r5 |
0x000136ec bge 0x136dc |
| } while (r2 >= r5);
| label_7:
0x000136ee ldr r3, [sp, 8] | r3 = var_8h;
0x000136f0 cmp r3, 0 |
| if (r3 != 0) {
0x000136f2 bne 0x1367a | goto label_0;
| }
| do {
0x000136f4 movs r3, 0 | r3 = 0;
0x000136f6 str r3, [sp, 0x14] | var_14h = r3;
0x000136f8 b 0x1367a | goto label_0;
| label_8:
0x000136fa mov r1, fp | r1 = fp;
0x000136fc mov r0, r7 | r0 = r7;
0x000136fe str r2, [sp, 4] | var_4h = r2;
0x00013700 blx 0xa124 | r0 = listen (r0, r1);
0x00013704 mov r3, r0 | r3 = r0;
0x00013706 mov r1, r7 | r1 = r7;
0x00013708 ldr r0, [sp, 0xc] | r0 = var_ch;
| if (r3 != 0) {
0x0001370a cbz r3, 0x13714 |
0x0001370c ldr r2, [sp, 4] | r2 = var_4h;
0x0001370e adds r5, 1 | r5++;
0x00013710 adds r4, 0xc | r4 += 0xc;
0x00013712 b 0x136d8 | goto label_1;
| }
0x00013714 ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x00013716 adds r5, 1 | r5++;
0x00013718 ldr r3, [sp] | r3 = *(sp);
0x0001371a adds r4, 0xc | r4 += 0xc;
0x0001371c blx r3 | uint32_t (*r3)(uint32_t, uint32_t) (r2, r3);
0x0001371e str r0, [sp, 8] | var_8h = r0;
0x00013720 cmp r0, 0 |
0x00013722 beq 0x136f4 |
| } while (r0 == 0);
0x00013724 ldr.w r2, [r8, 0x98] | r2 = *((r8 + 0x98));
0x00013728 b 0x136d8 | goto label_1;
| label_4:
0x0001372a ldr r3, [r7, 8] | r3 = *((r7 + 8));
0x0001372c mov r4, r2 | r4 = r2;
| label_2:
0x0001372e cmp r3, fp |
0x00013730 mov r0, sl | r0 = sl;
| if (r3 <= fp) {
0x00013732 ble 0x1374e | goto label_9;
| }
| do {
0x00013734 ldr r1, [r4] | r1 = *(r4);
| if (r1 == 0) {
0x00013736 cbz r1, 0x13758 | goto label_10;
| }
0x00013738 ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x0001373a add.w fp, fp, 1 |
0x0001373e ldr r3, [sp] | r3 = *(sp);
0x00013740 adds r4, 0xc | r4 += 0xc;
0x00013742 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t) (r2, r3);
| if (r0 == 0) {
0x00013744 cbz r0, 0x13760 | goto label_11;
| }
0x00013746 ldr r3, [r7, 8] | r3 = *((r7 + 8));
0x00013748 mov r0, sl | r0 = sl;
0x0001374a cmp r3, fp |
0x0001374c bgt 0x13734 |
| } while (r3 > fp);
| label_9:
0x0001374e movs r1, 1 | r1 = 1;
0x00013750 mov r0, r1 | r0 = r1;
0x00013752 add sp, 0x1c |
0x00013754 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_10:
0x00013758 add.w fp, fp, 1 |
0x0001375c adds r4, 0xc | r4 += 0xc;
0x0001375e b 0x1372e | goto label_2;
| label_11:
0x00013760 mov r1, r0 | r1 = r0;
0x00013762 mov r0, r1 | r0 = r1;
0x00013764 add sp, 0x1c |
0x00013766 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_5:
0x0001376a ldr r1, [sp, 0x14] | r1 = var_14h;
0x0001376c mov r0, r1 | r0 = r1;
0x0001376e add sp, 0x1c |
0x00013770 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_6:
0x00013774 lsls r2, r2, 0x10 | r2 <<= 0x10;
0x00013776 and r6, r2, 0xdfdfdfdf | r6 = r2 & 0xdfdfdfdf;
0x0001377a b 0x136be | 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/lib/libapr-1.so.0.7.2 @ 0x201d8 */
| #include <stdint.h>
|
; (fcn) sym.apr_time_exp_get () | void apr_time_exp_get (int16_t arg1, int16_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x000201d8 push.w {r4, r5, r6, r7, r8, lr} |
0x000201dc ldrd r7, r6, [r1, 0x14] | __asm ("ldrd r7, r6, [r1, 0x14]");
0x000201e0 cmp r7, 0xb |
| if (r7 > 0xb) {
0x000201e2 bhi.w 0x20354 | goto label_0;
| }
0x000201e6 cmp r7, 1 |
0x000201e8 asr.w r8, r6, 0x1f | r8 = r6 >> 0x1f;
0x000201ec mov r4, r1 | r4 = r1;
0x000201ee mov r5, r0 | r5 = r0;
0x000201f0 ble.w 0x2034c |
| while (1) {
0x000201f4 mov r0, r6 | r0 = r6;
0x000201f6 mov r1, r8 | r1 = r8;
0x000201f8 mvn r2, 0x63 | r2 = ~0x63;
0x000201fc mov.w r3, -1 | r3 = -1;
0x00020200 bl 0x20d40 | fcn_00020d40 (r0, r1, r2, r3, r4, r5);
0x00020204 lsl.w r3, r8, 3 | r3 = r8 << 3;
0x00020208 lsl.w ip, r6, 3 |
0x0002020c orr.w r3, r3, r6, lsr 29 | r3 |= (r6 >> 29);
0x00020210 adds.w ip, ip, r6 |
0x00020214 adc.w r3, r8, r3 | __asm ("adc.w r3, r8, r3");
0x00020218 lsls r3, r3, 3 | r3 <<= 3;
0x0002021a orr.w r3, r3, ip, lsr 29 | r3 |= (ip >> 29);
0x0002021e lsl.w ip, ip, 3 |
0x00020222 adds.w ip, ip, r6 |
0x00020226 adc.w r3, r8, r3 | __asm ("adc.w r3, r8, r3");
0x0002022a lsl.w r2, ip, 2 | r2 = ip << 2;
0x0002022e lsl.w lr, r3, 2 | lr = r3 << 2;
0x00020232 adds.w r2, ip, r2 | r2 = ip + r2;
0x00020236 orr.w lr, lr, ip, lsr 30 | lr |= (ip >> 30);
0x0002023a asr.w ip, r8, 0x1f |
0x0002023e and ip, ip, 3 |
0x00020242 adc.w r3, r3, lr | __asm ("adc.w r3, r3, lr");
0x00020246 adds.w r6, ip, r6 | r6 = ip + r6;
0x0002024a lsr.w r6, r6, 2 | r6 >>= 2;
0x0002024e adc r8, r8, 0 | __asm ("adc r8, r8, 0");
0x00020252 orr.w r6, r6, r8, lsl 30 | r6 |= (r8 << 30);
0x00020256 adds r2, r2, r6 | r2 += r6;
0x00020258 adc.w r3, r3, r8, asr 2 | __asm ("adc.w r3, r3, r8, asr 2");
0x0002025c adds r2, r2, r0 | r2 += r0;
0x0002025e adc.w r3, r3, r1 | __asm ("adc.w r3, r3, r1");
0x00020262 rsbs.w ip, r0, 3 |
0x00020266 sbc.w r6, r1, r1, lsl 1 | __asm ("sbc.w r6, r1, r1, lsl 1");
0x0002026a ldr r1, [pc, 0xf0] |
0x0002026c asrs r0, r6, 0x1f | r0 = r6 >> 0x1f;
0x0002026e and r0, r0, 3 | r0 &= 3;
0x00020272 add r1, pc |
0x00020274 adds.w r0, r0, ip | r0 += ip;
0x00020278 ldr.w r1, [r1, r7, lsl 2] | r1 = *(0x405d4);
0x0002027c lsr.w r0, r0, 2 | r0 >>= 2;
0x00020280 adc r6, r6, 0 | __asm ("adc r6, r6, 0");
0x00020284 orr.w r0, r0, r6, lsl 30 | r0 |= (r6 << 30);
0x00020288 adds r2, r2, r0 | r2 += r0;
0x0002028a ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x0002028c adc.w r3, r3, r6, asr 2 | __asm ("adc.w r3, r3, r6, asr 2");
0x00020290 add r1, r0 | r1 += r0;
0x00020292 subs r1, 1 | r1--;
0x00020294 adds r2, r1, r2 | r2 = r1 + r2;
0x00020296 adc.w r3, r3, r1, asr 31 | __asm ("adc.w r3, r3, r1, asr 31");
0x0002029a movw r1, 0x9c5c |
0x0002029e movt r1, 0xffff | r1 = 0xffff9c5c;
0x000202a2 adds r2, r2, r1 | r2 += r1;
0x000202a4 sbc r3, r3, 0 | __asm ("sbc r3, r3, 0");
0x000202a8 adds r1, r2, r2 | r1 = r2 + r2;
0x000202aa adc.w r0, r3, r3 | __asm ("adc.w r0, r3, r3");
0x000202ae adds r2, r1, r2 | r2 = r1 + r2;
0x000202b0 adc.w r3, r3, r0 | __asm ("adc.w r3, r3, r0");
0x000202b4 lsls r1, r2, 3 | r1 = r2 << 3;
0x000202b6 lsls r3, r3, 3 | r3 <<= 3;
0x000202b8 orr.w r3, r3, r2, lsr 29 | r3 |= (r2 >> 29);
0x000202bc ldr r2, [r4, 0xc] | r2 = *((r4 + 0xc));
0x000202be adds r1, r1, r2 | r1 += r2;
0x000202c0 adc.w r3, r3, r2, asr 31 | __asm ("adc.w r3, r3, r2, asr 31");
0x000202c4 lsls r0, r1, 4 | r0 = r1 << 4;
0x000202c6 lsls r2, r3, 4 | r2 = r3 << 4;
0x000202c8 subs r0, r0, r1 | r0 -= r1;
0x000202ca orr.w r2, r2, r1, lsr 28 | r2 |= (r1 >> 28);
0x000202ce lsl.w r1, r0, 2 | r1 = r0 << 2;
0x000202d2 sbc.w r3, r2, r3 | __asm ("sbc.w r3, r2, r3");
0x000202d6 ldr r2, [r4, 8] | r2 = *((r4 + 8));
0x000202d8 lsls r3, r3, 2 | r3 <<= 2;
0x000202da orr.w r3, r3, r0, lsr 30 | r3 |= (r0 >> 30);
0x000202de adds r1, r1, r2 | r1 += r2;
0x000202e0 lsl.w r0, r1, 4 | r0 = r1 << 4;
0x000202e4 adc.w r3, r3, r2, asr 31 | __asm ("adc.w r3, r3, r2, asr 31");
0x000202e8 lsls r2, r3, 4 | r2 = r3 << 4;
0x000202ea orr.w r2, r2, r1, lsr 28 | r2 |= (r1 >> 28);
0x000202ee subs r1, r0, r1 | r1 = r0 - r1;
0x000202f0 lsl.w r6, r1, 2 | r6 = r1 << 2;
0x000202f4 sbc.w r3, r2, r3 | __asm ("sbc.w r3, r2, r3");
0x000202f8 ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x000202fa lsls r3, r3, 2 | r3 <<= 2;
0x000202fc orr.w r3, r3, r1, lsr 30 | r3 |= (r1 >> 30);
0x00020300 adds r6, r2, r6 | r6 = r2 + r6;
0x00020302 adc.w r3, r3, r2, asr 31 | __asm ("adc.w r3, r3, r2, asr 31");
0x00020306 cmp r3, 0 |
| if (r3 < 0) {
0x00020308 blt 0x20354 | goto label_0;
| }
0x0002030a lsls r1, r3, 5 | r1 = r3 << 5;
0x0002030c lsls r2, r6, 5 | r2 = r6 << 5;
0x0002030e ldr r4, [r4] | r4 = *(r4);
0x00020310 orr.w r1, r1, r6, lsr 27 | r1 |= (r6 >> 27);
0x00020314 subs r2, r2, r6 | r2 -= r6;
0x00020316 sbc.w r1, r1, r3 | __asm ("sbc.w r1, r1, r3");
0x0002031a lsls r1, r1, 9 | r1 <<= 9;
0x0002031c orr.w r1, r1, r2, lsr 23 | r1 |= (r2 >> 23);
0x00020320 lsls r2, r2, 9 | r2 <<= 9;
0x00020322 adds r2, r2, r6 | r2 += r6;
0x00020324 adc.w r0, r3, r1 | __asm ("adc.w r0, r3, r1");
0x00020328 lsls r1, r2, 6 | r1 = r2 << 6;
0x0002032a lsls r7, r0, 6 | r7 = r0 << 6;
0x0002032c subs r1, r1, r2 | r1 -= r2;
0x0002032e orr.w r7, r7, r2, lsr 26 | r7 |= (r2 >> 26);
0x00020332 sbc.w r7, r7, r0 | __asm ("sbc.w r7, r7, r0");
0x00020336 adds r2, r1, r6 | r2 = r1 + r6;
0x00020338 adc.w r3, r3, r7 | __asm ("adc.w r3, r3, r7");
0x0002033c adds r2, r2, r4 | r2 += r4;
0x0002033e adc.w r3, r3, r4, asr 31 | __asm ("adc.w r3, r3, r4, asr 31");
0x00020342 movs r0, 0 | r0 = 0;
0x00020344 strd r2, r3, [r5] | __asm ("strd r2, r3, [r5]");
0x00020348 pop.w {r4, r5, r6, r7, r8, pc} |
0x0002034c subs r6, 1 | r6--;
0x0002034e sbc r8, r8, 0 | __asm ("sbc r8, r8, 0");
0x00020352 b 0x201f4 |
| }
| label_0:
0x00020354 movw r0, 0x4e24 | r0 = 0x4e24;
0x00020358 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/lib/libapr-1.so.0.7.2 @ 0x200b0 */
| #include <stdint.h>
|
; (fcn) sym.apr_time_exp_tz () | void apr_time_exp_tz (int16_t arg_48h, int16_t arg1, int16_t arg3, int16_t arg4) {
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_28h;
| int16_t var_34h;
| r0 = arg1;
| r2 = arg3;
| r3 = arg4;
0x000200b0 push {r4, r5, r6, lr} |
0x000200b2 mov r4, r0 | r4 = r0;
0x000200b4 mov r0, r2 | r0 = r2;
0x000200b6 ldr r2, [pc, 0x74] |
0x000200b8 mov r1, r3 | r1 = r3;
0x000200ba sub sp, 0x38 |
0x000200bc ldr r3, [pc, 0x70] | r3 = *(0x20130);
0x000200be mov r5, r4 | r5 = r4;
0x000200c0 add r2, pc | r2 = 0x401f2;
0x000200c2 ldr r6, [sp, 0x48] | r6 = *(arg_48h);
0x000200c4 ldr r3, [r2, r3] |
0x000200c6 movw r2, 0x4240 |
0x000200ca movt r2, 0xf | r2 = 0xf4240;
0x000200ce ldr r3, [r3] | r3 = *(0x401f2);
0x000200d0 str r3, [sp, 0x34] | var_34h = r3;
0x000200d2 mov.w r3, 0 | r3 = 0;
0x000200d6 movs r3, 0 | r3 = 0;
0x000200d8 bl 0x20d40 | fcn_00020d40 (r0, r1, r2, r3, r4, r5);
0x000200dc add r0, r6 | r0 += r6;
0x000200de str r2, [r5], 4 | *(r5) = r2;
| r5 += 4;
0x000200e2 str r0, [sp, 4] | var_4h = r0;
0x000200e4 add r1, sp, 8 | r1 += var_8h;
0x000200e6 add r0, sp, 4 | r0 += var_4h;
0x000200e8 blx 0xac08 | fcn_0000ac08 ();
0x000200ec ldr r3, [sp, 0x28] | r3 = var_28h;
0x000200ee add.w r2, r4, 0x14 | r2 = r4 + 0x14;
0x000200f2 vldr d16, [sp, 0x18] | __asm ("vldr d16, [sp, 0x18]");
0x000200f6 vldr d17, [sp, 0x20] | __asm ("vldr d17, [sp, 0x20]");
0x000200fa vldr d18, [sp, 8] | __asm ("vldr d18, [sp, 8]");
0x000200fe vldr d19, [sp, 0x10] | __asm ("vldr d19, [sp, 0x10]");
0x00020102 vst1.32 {d18, d19}, [r5] | __asm ("vst1.32 {d18, d19}, [r5]");
0x00020106 vst1.32 {d16, d17}, [r2] | __asm ("vst1.32 {d16, d17}, [r2]");
0x0002010a ldr r2, [pc, 0x28] |
0x0002010c strd r3, r6, [r4, 0x24] | __asm ("strd r3, r6, [r4, 0x24]");
0x00020110 ldr r3, [pc, 0x1c] | r3 = *(0x20130);
0x00020112 add r2, pc | r2 = 0x4024c;
0x00020114 ldr r3, [r2, r3] | r3 = *(0x4024c);
0x00020116 ldr r2, [r3] | r2 = *(0x4024c);
0x00020118 ldr r3, [sp, 0x34] | r3 = var_34h;
0x0002011a eors r2, r3 | r2 ^= r3;
0x0002011c mov.w r3, 0 | r3 = 0;
| if (r2 == r3) {
0x00020120 bne 0x20128 |
0x00020122 movs r0, 0 | r0 = 0;
0x00020124 add sp, 0x38 |
0x00020126 pop {r4, r5, r6, pc} |
| }
0x00020128 blx 0xabc8 | pthread_attr_getdetachstate ();
0x0002012c ldr r0, [pc, 0x1b0] | r0 = *(0x202e0);
0x0002012e movs r0, r0 |
0x00020130 lsls r0, r4, 0x1a | r0 = r4 << 0x1a;
0x00020132 movs r0, r0 |
0x00020134 ldr r0, [pc, 0x68] | r0 = *(0x201a0);
0x00020136 movs r0, r0 |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0xe71c */
| #include <stdint.h>
|
; (fcn) sym.apr_tokenize_to_argv () | void apr_tokenize_to_argv (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h;
| int16_t var_4h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x0000e71c svcmi 0xf0e92d | __asm ("svcmi 0xf0e92d");
0x0000e720 sub sp, 0xc |
0x0000e722 ldrb r3, [r0] | r3 = *(r0);
0x0000e724 mov r4, r0 | r4 = r0;
0x0000e726 mov r6, r1 | r6 = r1;
0x0000e728 str r2, [sp] | *(sp) = r2;
0x0000e72a cmp r3, 9 |
0x0000e72c it ne |
| if (r3 != 9) {
0x0000e72e cmpne r3, 0x20 | __asm ("cmpne r3, 0x20");
| }
| if (r3 != 9) {
0x0000e730 bne 0xe73e | goto label_10;
| }
| do {
0x0000e732 ldrb r3, [r4, 1]! | r3 = *((r4 += 1));
0x0000e736 cmp r3, 9 |
0x0000e738 it ne |
| if (r3 != 9) {
0x0000e73a cmpne r3, 0x20 | __asm ("cmpne r3, 0x20");
| }
0x0000e73c beq 0xe732 |
| } while (r3 == 9);
| label_10:
0x0000e73e cmp r3, 0 |
| if (r3 == 0) {
0x0000e740 beq.w 0xe8e8 | goto label_11;
| }
0x0000e744 mov r0, r4 | r0 = r4;
0x0000e746 movs r7, 1 | r7 = 1;
| label_2:
0x0000e748 cmp r3, 0x22 |
0x0000e74a itt eq |
| if (r3 != 0x22) {
0x0000e74c addeq r0, 1 | r0++;
| }
| if (r3 != 0x22) {
0x0000e74e moveq r1, 1 | r1 = 1;
| }
| if (r3 != 0x22) {
0x0000e750 beq 0xe75e |
0x0000e752 cmp r3, 0x27 |
0x0000e754 itt eq |
| if (r3 != 0x27) {
0x0000e756 addeq r0, 1 | r0++;
| }
| if (r3 != 0x27) {
0x0000e758 moveq r1, 2 | r1 = 2;
| }
| if (r3 == 0x27) {
0x0000e75a beq 0xe75e | goto label_12;
| }
0x0000e75c movs r1, 0 | r1 = 0;
| }
| label_12:
0x0000e75e ldrb r3, [r0] | r3 = *(r0);
0x0000e760 add.w sb, r7, 1 | sb = r7 + 1;
| if (r3 != 0) {
0x0000e764 cbnz r3, 0xe778 | goto label_13;
| }
0x0000e766 b 0xe7cc | goto label_14;
| do {
| if (r1 != 0) {
0x0000e768 cbnz r1, 0xe7a0 | goto label_15;
| }
0x0000e76a cmp r3, 9 |
0x0000e76c it ne |
| if (r3 != 9) {
0x0000e76e cmpne r3, 0x20 | __asm ("cmpne r3, 0x20");
| }
| if (r3 == 9) {
0x0000e770 beq 0xe7a8 | goto label_3;
| }
| label_1:
0x0000e772 ldrb r3, [r0, 1] | r3 = *((r0 + 1));
| label_0:
0x0000e774 adds r0, 1 | r0++;
| if (r3 == 0) {
0x0000e776 cbz r3, 0xe7aa | goto label_16;
| }
| label_13:
0x0000e778 cmp r3, 0x5c |
0x0000e77a bne 0xe768 |
| } while (r3 != 0x5c);
0x0000e77c ldrb r3, [r0, 1] | r3 = *((r0 + 1));
0x0000e77e cmp r3, 0x27 |
0x0000e780 it ne |
| if (r3 != 0x27) {
0x0000e782 cmpne r3, 9 | __asm ("cmpne r3, 9");
| }
0x0000e784 and r5, r3, 0xfd | r5 = r3 & 0xfd;
0x0000e788 ite eq |
| if (r3 != 0x27) {
0x0000e78a moveq r2, 1 | r2 = 1;
| }
| if (r3 == 0x27) {
0x0000e78c movne r2, 0 | r2 = 0;
| }
0x0000e78e cmp r5, 0x20 |
0x0000e790 it eq |
| if (r5 != 0x20) {
0x0000e792 orreq r2, r2, 1 | r2 |= 1;
| }
0x0000e796 cmp r2, 0 |
| if (r2 == 0) {
0x0000e798 beq 0xe774 | goto label_0;
| }
0x0000e79a ldrb r3, [r0, 2] | r3 = *((r0 + 2));
0x0000e79c adds r0, 1 | r0++;
0x0000e79e b 0xe774 | goto label_0;
| label_15:
0x0000e7a0 cmp r1, 1 |
| if (r1 == 1) {
0x0000e7a2 beq 0xe7c6 | goto label_17;
| }
0x0000e7a4 cmp r3, 0x27 |
| if (r3 != 0x27) {
0x0000e7a6 bne 0xe772 | goto label_1;
| }
| label_3:
0x0000e7a8 adds r0, 1 | r0++;
| label_16:
0x0000e7aa ldrb r3, [r0] | r3 = *(r0);
0x0000e7ac cmp r3, 0x20 |
0x0000e7ae it ne |
| if (r3 != 0x20) {
0x0000e7b0 cmpne r3, 9 | __asm ("cmpne r3, 9");
| }
| if (r3 != 0x20) {
0x0000e7b2 bne 0xe7c0 | goto label_18;
| }
| do {
0x0000e7b4 ldrb r3, [r0, 1]! | r3 = *((r0 += 1));
0x0000e7b8 cmp r3, 9 |
0x0000e7ba it ne |
| if (r3 != 9) {
0x0000e7bc cmpne r3, 0x20 | __asm ("cmpne r3, 0x20");
| }
0x0000e7be beq 0xe7b4 |
| } while (r3 == 9);
| if (r3 == 0) {
| label_18:
0x0000e7c0 cbz r3, 0xe7cc | goto label_14;
| }
0x0000e7c2 mov r7, sb | r7 = sb;
0x0000e7c4 b 0xe748 | goto label_2;
| label_17:
0x0000e7c6 cmp r3, 0x22 |
| if (r3 != 0x22) {
0x0000e7c8 bne 0xe772 | goto label_1;
| }
0x0000e7ca b 0xe7a8 | goto label_3;
| label_14:
0x0000e7cc lsl.w r3, sb, 2 | r3 = sb << 2;
0x0000e7d0 ldr r0, [sp] | r0 = *(sp);
0x0000e7d2 mov.w fp, 0 |
0x0000e7d6 mov r1, r3 | r1 = r3;
0x0000e7d8 str r3, [sp, 4] | var_4h = r3;
0x0000e7da mov sl, fp | sl = fp;
0x0000e7dc blx 0xa974 | r0 = fcn_0000a974 ();
0x0000e7e0 mov sb, r0 | sb = r0;
0x0000e7e2 str r0, [r6] | *(r6) = r0;
| label_7:
0x0000e7e4 ldrb r3, [r4] | r3 = *(r4);
0x0000e7e6 cmp r3, 9 |
0x0000e7e8 it ne |
| if (r3 != 9) {
0x0000e7ea cmpne r3, 0x20 | __asm ("cmpne r3, 0x20");
| }
| if (r3 != 9) {
0x0000e7ec bne 0xe7fa | goto label_19;
| }
| do {
0x0000e7ee ldrb r3, [r4, 1]! | r3 = *((r4 += 1));
0x0000e7f2 cmp r3, 9 |
0x0000e7f4 it ne |
| if (r3 != 9) {
0x0000e7f6 cmpne r3, 0x20 | __asm ("cmpne r3, 0x20");
| }
0x0000e7f8 beq 0xe7ee |
| } while (r3 == 9);
| label_19:
0x0000e7fa cmp r3, 0x22 |
0x0000e7fc add.w r5, r4, 1 | r5 = r4 + 1;
0x0000e800 it eq |
| if (r3 != 0x22) {
0x0000e802 moveq r1, 1 | r1 = 1;
| }
| if (r3 != 0x22) {
0x0000e804 beq 0xe810 |
0x0000e806 cmp r3, 0x27 |
0x0000e808 itet ne |
| if (r3 == 0x27) {
0x0000e80a movne r5, r4 | r5 = r4;
| }
| if (r3 != 0x27) {
0x0000e80c moveq r1, 2 | r1 = 2;
| }
| if (r3 != 0x27) {
0x0000e80e movne r1, 0 | r1 = 0;
| goto label_20;
| }
| }
| label_20:
0x0000e810 ldrb r3, [r5] | r3 = *(r5);
0x0000e812 mov r4, r5 | r4 = r5;
| if (r3 != 0) {
0x0000e814 cbnz r3, 0xe82a | goto label_5;
| }
0x0000e816 b 0xe856 | goto label_9;
| do {
0x0000e818 cmp r1, 0 |
| if (r1 != 0) {
0x0000e81a bne 0xe8c4 | goto label_21;
| }
0x0000e81c cmp r3, 0x20 |
0x0000e81e it ne |
| if (r3 != 0x20) {
0x0000e820 cmpne r3, 9 | __asm ("cmpne r3, 9");
| }
| if (r3 == 0x20) {
0x0000e822 beq 0xe856 | goto label_9;
| }
| label_8:
0x0000e824 ldrb r3, [r4, 1] | r3 = *((r4 + 1));
| label_4:
0x0000e826 adds r4, 1 | r4++;
| if (r3 == 0) {
0x0000e828 cbz r3, 0xe856 | goto label_9;
| }
| label_5:
0x0000e82a cmp r3, 0x5c |
0x0000e82c bne 0xe818 |
| } while (r3 != 0x5c);
0x0000e82e ldrb r3, [r4, 1] | r3 = *((r4 + 1));
0x0000e830 cmp r3, 0x27 |
0x0000e832 it ne |
| if (r3 != 0x27) {
0x0000e834 cmpne r3, 9 | __asm ("cmpne r3, 9");
| }
0x0000e836 and r0, r3, 0xfd | r0 = r3 & 0xfd;
0x0000e83a ite eq |
| if (r3 != 0x27) {
0x0000e83c moveq r2, 1 | r2 = 1;
| }
| if (r3 == 0x27) {
0x0000e83e movne r2, 0 | r2 = 0;
| }
0x0000e840 cmp r0, 0x20 |
0x0000e842 it eq |
| if (r0 != 0x20) {
0x0000e844 orreq r2, r2, 1 | r2 |= 1;
| }
0x0000e848 cmp r2, 0 |
| if (r2 == 0) {
0x0000e84a beq 0xe826 | goto label_4;
| }
0x0000e84c ldrb r3, [r4, 2] | r3 = *((r4 + 2));
0x0000e84e adds r4, 1 | r4++;
0x0000e850 adds r4, 1 | r4++;
0x0000e852 cmp r3, 0 |
| if (r3 != 0) {
0x0000e854 bne 0xe82a | goto label_5;
| }
| label_9:
0x0000e856 adds r4, 1 | r4++;
0x0000e858 ldr r0, [sp] | r0 = *(sp);
0x0000e85a sub.w r8, r4, r5 | r8 = r4 - r5;
0x0000e85e mov r1, r8 | r1 = r8;
0x0000e860 blx 0xa974 | fcn_0000a974 ();
0x0000e864 ldr r3, [r6] | r3 = *(r6);
0x0000e866 mov r2, r8 | r2 = r8;
0x0000e868 str.w r0, [sb, fp, lsl 2] | __asm ("str.w r0, [sb, fp, lsl 2]");
0x0000e86c mov r1, r5 | r1 = r5;
0x0000e86e ldr.w r0, [r3, fp, lsl 2] | offset_0 = fp << 2;
| r0 = *((r3 + offset_0));
0x0000e872 blx 0x9f04 | fcn_00009f04 ();
0x0000e876 ldr r3, [r6] | r3 = *(r6);
0x0000e878 ldr.w r0, [r3, fp, lsl 2] | offset_1 = fp << 2;
| r0 = *((r3 + offset_1));
0x0000e87c ldrb r2, [r0] | r2 = *(r0);
| if (r2 == 0) {
0x0000e87e cbz r2, 0xe8b2 | goto label_22;
| }
0x0000e880 mov ip, r0 |
0x0000e882 movs r5, 0 | r5 = 0;
0x0000e884 b 0xe892 |
| while (r3 == 0) {
0x0000e886 strb r2, [r1], 1 | *(r1) = r2;
| r1++;
0x0000e88a mov r0, r1 | r0 = r1;
0x0000e88c ldrb r2, [ip, 1]! | r2 = *((ip += 1));
| if (r2 == 0) {
0x0000e890 cbz r2, 0xe8b2 | goto label_22;
| }
| label_6:
0x0000e892 eor r3, r5, 1 | r3 = r5 ^ 1;
0x0000e896 mov r1, r0 | r1 = r0;
0x0000e898 cmp r2, 0x5c |
0x0000e89a ite ne |
| if (r2 == 0x5c) {
0x0000e89c movne r3, 0 | r3 = 0;
| }
| if (r2 != 0x5c) {
0x0000e89e andeq r3, r3, 1 | r3 &= 1;
| }
0x0000e8a2 mov r5, r3 | r5 = r3;
0x0000e8a4 cmp r3, 0 |
0x0000e8a6 beq 0xe886 |
| }
0x0000e8a8 ldrb r2, [ip, 1]! | r2 = *((ip += 1));
0x0000e8ac movs r5, 1 | r5 = 1;
0x0000e8ae cmp r2, 0 |
| if (r2 != 0) {
0x0000e8b0 bne 0xe892 | goto label_6;
| }
| label_22:
0x0000e8b2 add.w fp, fp, 1 |
0x0000e8b6 strb.w sl, [r0] | *(r0) = sl;
0x0000e8ba cmp fp, r7 |
| if (fp == r7) {
0x0000e8bc beq 0xe8d4 | goto label_23;
| }
0x0000e8be ldr.w sb, [r6] | sb = *(r6);
0x0000e8c2 b 0xe7e4 | goto label_7;
| label_21:
0x0000e8c4 cmp r1, 1 |
| if (r1 == 1) {
0x0000e8c6 beq 0xe8ce | goto label_24;
| }
0x0000e8c8 cmp r3, 0x27 |
| if (r3 != 0x27) {
0x0000e8ca bne 0xe824 | goto label_8;
| }
0x0000e8cc b 0xe856 | goto label_9;
| label_24:
0x0000e8ce cmp r3, 0x22 |
| if (r3 != 0x22) {
0x0000e8d0 bne 0xe824 | goto label_8;
| }
0x0000e8d2 b 0xe856 | goto label_9;
| label_23:
0x0000e8d4 ldr r2, [sp, 4] | r2 = var_4h;
0x0000e8d6 movs r0, 0 | r0 = 0;
0x0000e8d8 ldr r3, [r6] | r3 = *(r6);
0x0000e8da sub.w sb, r2, 4 | sb = r2 - 4;
0x0000e8de add r3, sb | r3 += sb;
0x0000e8e0 str r0, [r3] | *(r3) = r0;
0x0000e8e2 add sp, 0xc |
0x0000e8e4 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_11:
0x0000e8e8 ldr r0, [sp] | r0 = *(sp);
0x0000e8ea movs r1, 4 | r1 = 4;
0x0000e8ec blx 0xa974 | r0 = fcn_0000a974 ();
0x0000e8f0 mov r3, r0 | r3 = r0;
0x0000e8f2 str r0, [r6] | *(r6) = r0;
0x0000e8f4 movs r0, 0 | r0 = 0;
0x0000e8f6 str r0, [r3] | *(r3) = r0;
0x0000e8f8 add sp, 0xc |
0x0000e8fa pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libapr-1.so.0.7.2 @ 0xdb84 */
| #include <stdint.h>
|
; (fcn) sym.apr_unescape_entity () | void apr_unescape_entity (int16_t arg_1h, int16_t arg_1h_2, int16_t arg1, uint32_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0000db84 svcmi 0xf0e92d | __asm ("svcmi 0xf0e92d");
0x0000db88 mov r7, r3 | r7 = r3;
0x0000db8a sub sp, 0x14 |
0x0000db8c cmp r1, 0 |
| if (arg_1h == ) {
0x0000db8e beq.w 0xdd64 | goto label_9;
| }
0x0000db92 mov r5, r2 | r5 = r2;
0x0000db94 mov r4, r0 | r4 = r0;
0x0000db96 ldrb r2, [r1] | r2 = *(r1);
0x0000db98 cmp r2, 0 |
0x0000db9a it ne |
| if (r2 != 0) {
0x0000db9c cmpne r5, 0 | __asm ("cmpne r5, 0");
| }
0x0000db9e ite ne |
| if (r2 == 0) {
0x0000dba0 movne r3, 1 | r3 = 1;
| }
| if (r2 != 0) {
0x0000dba2 moveq r3, 0 | r3 = 0;
| }
0x0000dba4 cmp r0, 0 |
| if (r0 == 0) {
0x0000dba6 beq 0xdc98 | goto label_10;
| }
0x0000dba8 cmp r3, 0 |
| if (r3 == 0) {
0x0000dbaa beq.w 0xdea0 | goto label_11;
| }
0x0000dbae movs r3, 0 | r3 = 0;
0x0000dbb0 movs r6, 1 | r6 = 1;
0x0000dbb2 mov r8, r1 | r8 = r1;
0x0000dbb4 str r3, [sp] | *(sp) = r3;
0x0000dbb6 str r7, [sp, 4] | var_4h = r7;
0x0000dbb8 b 0xdbe2 |
| while (r2 != 0x26) {
0x0000dbba mov sl, r8 | sl = r8;
0x0000dbbc adds r6, 1 | r6++;
0x0000dbbe mov r8, sb | r8 = sb;
0x0000dbc0 mov r0, r4 | r0 = r4;
0x0000dbc2 strb r2, [r4], 1 | *(r4) = r2;
| r4++;
| label_0:
0x0000dbc6 ldrb.w r2, [sl, 1] | r2 = *((sl + 1));
0x0000dbca subs r5, 1 | r5--;
0x0000dbcc ite ne |
| if (r5 == 1) {
0x0000dbce movne r3, 1 | r3 = 1;
| }
| if (r5 != 1) {
0x0000dbd0 moveq r3, 0 | r3 = 0;
| }
0x0000dbd2 cmp r2, 0 |
0x0000dbd4 ite eq |
| if (r2 != 0) {
0x0000dbd6 moveq r3, 0 | r3 = 0;
| }
| if (r2 == 0) {
0x0000dbd8 andne r3, r3, 1 | r3 &= 1;
| }
0x0000dbdc cmp r3, 0 |
| if (r3 == 0) {
0x0000dbde beq.w 0xddba | goto label_12;
| }
0x0000dbe2 cmp r2, 0x26 |
0x0000dbe4 add.w sb, r8, 1 | sb = r8 + 1;
0x0000dbe8 bne 0xdbba |
| }
0x0000dbea ldrb.w r2, [r8, 1] | r2 = *((r8 + 1));
0x0000dbee cmp r2, 0 |
0x0000dbf0 it ne |
| if (r2 != 0) {
0x0000dbf2 cmpne r2, 0x3b | __asm ("cmpne r2, 0x3b");
| }
0x0000dbf4 ite ne |
| if (r2 == 0) {
0x0000dbf6 movne r3, 1 | r3 = 1;
| }
| if (r2 != 0) {
0x0000dbf8 moveq r3, 0 | r3 = 0;
| }
0x0000dbfa cmp r5, 1 |
0x0000dbfc ite eq |
| if (r5 != 1) {
0x0000dbfe moveq r3, 0 | r3 = 0;
| }
| if (r5 == 1) {
0x0000dc00 andne r3, r3, 1 | r3 &= 1;
| }
0x0000dc04 cmp r3, 0 |
| if (r3 != 0) {
0x0000dc06 bne.w 0xdd8a | goto label_13;
| }
0x0000dc0a mov.w fp, 1 |
0x0000dc0e mov r3, r2 | r3 = r2;
0x0000dc10 mov sl, sb | sl = sb;
0x0000dc12 mov ip, fp |
| label_3:
0x0000dc14 cmp r5, fp |
0x0000dc16 it ne |
| if (r5 != fp) {
0x0000dc18 cmpne r3, 0 | __asm ("cmpne r3, 0");
| }
0x0000dc1a ite eq |
| if (r5 != fp) {
0x0000dc1c moveq r7, 1 | r7 = 1;
| }
| if (r5 == fp) {
0x0000dc1e movne r7, 0 | r7 = 0;
| }
| if (r5 == fp) {
0x0000dc20 beq.w 0xdd78 | goto label_14;
| }
0x0000dc24 cmp r2, 0x23 |
| if (r2 == 0x23) {
0x0000dc26 beq.w 0xde1c | goto label_15;
| }
0x0000dc2a add.w r2, fp, -1 | r2 = fp + -1;
0x0000dc2e cmp r2, 6 |
| if (r2 > 6) {
0x0000dc30 bgt.w 0xddd4 | goto label_16;
| }
0x0000dc34 ldr r3, [pc, 0x300] |
0x0000dc36 add r3, pc | r3 = 0x1bb72;
0x0000dc38 ldr.w r7, [r3, r2, lsl 2] | r7 = *(0x1bb72);
0x0000dc3c cmp r7, 0 |
| if (r7 == 0) {
0x0000dc3e beq.w 0xddd4 | goto label_16;
| }
0x0000dc42 ldrb r3, [r7] | r3 = *(r7);
0x0000dc44 cmp r3, 0 |
| if (r3 == 0) {
0x0000dc46 beq.w 0xddd4 | goto label_16;
| }
0x0000dc4a str.w sl, [sp, 8] | __asm ("str.w sl, [var_8h]");
0x0000dc4e mov sl, r7 | sl = r7;
0x0000dc50 str.w r8, [sp, 0xc] | __asm ("str.w r8, [var_ch]");
0x0000dc54 mov r7, ip | r7 = ip;
0x0000dc56 mov r8, r2 | r8 = r2;
0x0000dc58 b 0xdc66 |
| while (r0 != 0) {
0x0000dc5a add sl, r7 | sl += r7;
0x0000dc5c ldrb.w r3, [sl] | r3 = *(sl);
0x0000dc60 cmp r3, 0 |
| if (r3 == 0) {
0x0000dc62 beq.w 0xddd0 | goto label_17;
| }
0x0000dc66 mov r1, sl | r1 = sl;
0x0000dc68 mov r2, r8 | r2 = r8;
0x0000dc6a mov r0, sb | r0 = sb;
0x0000dc6c blx 0xaf78 | r0 = fcn_0000af78 ();
0x0000dc70 cmp r0, 0 |
0x0000dc72 bne 0xdc5a |
| }
0x0000dc74 mov r7, sl | r7 = sl;
0x0000dc76 ldr.w sl, [sp, 8] | sl = var_8h;
0x0000dc7a ldrb.w r2, [r7, r8] | r2 = *((r7 + r8));
0x0000dc7e mov r3, r4 | r3 = r4;
0x0000dc80 mov r0, r4 | r0 = r4;
0x0000dc82 sub.w r5, r5, fp | r5 -= fp;
0x0000dc86 adds r6, 1 | r6++;
0x0000dc88 add.w r8, sl, 1 | r8 = sl + 1;
0x0000dc8c strb r2, [r3], 1 | *(r3) = r2;
| r3++;
0x0000dc90 mov r4, r3 | r4 = r3;
0x0000dc92 movs r3, 1 | r3 = 1;
0x0000dc94 str r3, [sp] | *(sp) = r3;
0x0000dc96 b 0xdbc6 | goto label_0;
| label_10:
0x0000dc98 cmp r3, 0 |
| if (r3 == 0) {
0x0000dc9a beq 0xdd64 | goto label_9;
| }
0x0000dc9c movs r6, 1 | r6 = 1;
0x0000dc9e str r0, [sp] | *(sp) = r0;
0x0000dca0 str r7, [sp, 4] | var_4h = r7;
0x0000dca2 b 0xdcba |
| while (r2 != 0x26) {
| label_1:
0x0000dca4 adds r6, 1 | r6++;
0x0000dca6 mov r1, sb | r1 = sb;
0x0000dca8 mov r2, r8 | r2 = r8;
| label_2:
0x0000dcaa subs r5, 1 | r5--;
0x0000dcac and r4, r4, 1 | r4 &= 1;
0x0000dcb0 it eq |
| if (r5 != 1) {
0x0000dcb2 moveq r4, 0 | r4 = 0;
| }
0x0000dcb4 cmp r4, 0 |
| if (r4 == 0) {
0x0000dcb6 beq.w 0xde12 | goto label_18;
| }
0x0000dcba ldrb.w r8, [r1, 1] | r8 = *((r1 + 1));
0x0000dcbe add.w sb, r1, 1 | sb = r1 + 1;
0x0000dcc2 subs.w r4, r8, 0 | r4 = r8 - 0;
0x0000dcc6 it ne |
| if (r4 == r8) {
0x0000dcc8 movne r4, 1 | r4 = 1;
| }
0x0000dcca cmp r2, 0x26 |
0x0000dccc bne 0xdca4 |
| }
0x0000dcce cmp.w r8, 0x3b |
0x0000dcd2 ite eq |
| if (r8 != 0x3b) {
0x0000dcd4 moveq r3, 0 | r3 = 0;
| }
| if (r8 == 0x3b) {
0x0000dcd6 andne r3, r4, 1 | r3 = r4 & 1;
| }
0x0000dcda cmp r5, 1 |
0x0000dcdc ite eq |
| if (r5 != 1) {
0x0000dcde moveq r3, 0 | r3 = 0;
| }
| if (r5 == 1) {
0x0000dce0 andne r3, r3, 1 | r3 &= 1;
| }
0x0000dce4 cmp r3, 0 |
| if (r3 != 0) {
0x0000dce6 bne 0xdde4 | goto label_19;
| }
0x0000dce8 mov.w sl, 1 | sl = 1;
0x0000dcec mov r3, r8 | r3 = r8;
0x0000dcee mov fp, sb |
| label_5:
0x0000dcf0 cmp r3, 0 |
0x0000dcf2 it ne |
| if (r3 != 0) {
0x0000dcf4 cmpne r5, sl | __asm ("cmpne r5, sl");
| }
0x0000dcf6 ite eq |
| if (r3 != 0) {
0x0000dcf8 moveq r7, 1 | r7 = 1;
| }
| if (r3 != 0) {
0x0000dcfa movne r7, 0 | r7 = 0;
| goto label_20;
| }
| if (r3 == 0) {
| label_20:
0x0000dcfc beq 0xdca4 | goto label_1;
| }
0x0000dcfe cmp.w r8, 0x23 |
| if (r8 == 0x23) {
0x0000dd02 beq.w 0xdeb2 | goto label_21;
| }
0x0000dd06 add.w r2, sl, -1 | r2 = sl + -1;
0x0000dd0a adds r6, 1 | r6++;
0x0000dd0c cmp r2, 6 |
| if (r2 > 6) {
0x0000dd0e bgt.w 0xde16 | goto label_22;
| }
0x0000dd12 ldr r3, [pc, 0x228] |
0x0000dd14 add r3, pc | r3 = 0x1bc56;
0x0000dd16 ldr.w r7, [r3, r2, lsl 2] | r7 = *(0x1bc56);
0x0000dd1a cmp r7, 0 |
| if (r7 == 0) {
0x0000dd1c beq 0xde16 | goto label_22;
| }
0x0000dd1e ldrb r1, [r7] | r1 = *(r7);
0x0000dd20 cmp r1, 0 |
| if (r1 == 0) {
0x0000dd22 beq 0xde16 | goto label_22;
| }
0x0000dd24 str.w fp, [sp, 8] | __asm ("str.w fp, [var_8h]");
0x0000dd28 mov fp, r2 |
0x0000dd2a str r4, [sp, 0xc] | var_ch = r4;
0x0000dd2c mov r4, r7 | r4 = r7;
0x0000dd2e mov r7, sl | r7 = sl;
0x0000dd30 b 0xdd3a |
| while (r0 != 0) {
0x0000dd32 ldrb r2, [r4] | r2 = *(r4);
0x0000dd34 cmp r2, 0 |
| if (r2 == 0) {
0x0000dd36 beq.w 0xdeaa | goto label_23;
| }
0x0000dd3a mov r1, r4 | r1 = r4;
0x0000dd3c mov r2, fp | r2 = fp;
0x0000dd3e mov r0, sb | r0 = sb;
0x0000dd40 add r4, r7 | r4 += r7;
0x0000dd42 blx 0xaf78 | r0 = fcn_0000af78 ();
0x0000dd46 cmp r0, 0 |
0x0000dd48 bne 0xdd32 |
| }
0x0000dd4a ldr.w fp, [sp, 8] | fp = var_8h;
0x0000dd4e movs r3, 1 | r3 = 1;
0x0000dd50 sub.w r5, r5, sl | r5 -= sl;
0x0000dd54 str r3, [sp] | *(sp) = r3;
0x0000dd56 mov r1, fp | r1 = fp;
0x0000dd58 ldrb r2, [r1, 1]! | r2 = *((r1 += 1));
0x0000dd5c subs r4, r2, 0 | r4 = r2 - 0;
0x0000dd5e it ne |
| if (r4 == r2) {
0x0000dd60 movne r4, 1 | r4 = 1;
| }
0x0000dd62 b 0xdcaa | goto label_2;
| if (r7 != 0) {
| label_9:
0x0000dd64 cbz r7, 0xdd6a |
| label_8:
0x0000dd66 movs r3, 1 | r3 = 1;
0x0000dd68 str r3, [r7] | *(r7) = r3;
| }
| label_4:
0x0000dd6a movw r0, 0x117f |
0x0000dd6e movt r0, 1 | r0 = 0x1117f;
0x0000dd72 add sp, 0x14 |
0x0000dd74 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_14:
0x0000dd78 mov.w r3, 0x26 | r3 = 0x26;
0x0000dd7c mov sl, r8 | sl = r8;
0x0000dd7e mov r0, r4 | r0 = r4;
0x0000dd80 adds r6, 1 | r6++;
0x0000dd82 mov r8, sb | r8 = sb;
0x0000dd84 strb r3, [r4], 1 | *(r4) = r3;
| r4++;
0x0000dd88 b 0xdbc6 | goto label_0;
| label_13:
0x0000dd8a add.w r0, r8, 2 | r0 = r8 + 2;
0x0000dd8e mov.w fp, 1 |
| do {
0x0000dd92 ldrb r3, [r0] | r3 = *(r0);
0x0000dd94 add.w fp, fp, 1 |
0x0000dd98 mov sl, r0 | sl = r0;
0x0000dd9a adds r0, 1 | r0++;
0x0000dd9c cmp r3, 0x3b |
0x0000dd9e it ne |
| if (r3 != 0x3b) {
0x0000dda0 cmpne r3, 0 | __asm ("cmpne r3, 0");
| }
0x0000dda2 ite ne |
| if (r3 == 0x3b) {
0x0000dda4 movne r1, 1 | r1 = 1;
| }
| if (r3 != 0x3b) {
0x0000dda6 moveq r1, 0 | r1 = 0;
| }
0x0000dda8 cmp fp, r5 |
0x0000ddaa ite eq |
| if (fp != r5) {
0x0000ddac moveq r1, 0 | r1 = 0;
| }
| if (fp == r5) {
0x0000ddae andne r1, r1, 1 | r1 &= 1;
| }
0x0000ddb2 cmp r1, 0 |
0x0000ddb4 bne 0xdd92 |
| } while (r1 != 0);
0x0000ddb6 mov ip, fp |
0x0000ddb8 b 0xdc14 | goto label_3;
| label_12:
0x0000ddba ldr r7, [sp, 4] | r7 = var_4h;
0x0000ddbc strb r3, [r0, 1] | *((r0 + 1)) = r3;
| if (r7 != 0) {
| label_7:
0x0000ddbe cbz r7, 0xddc2 |
0x0000ddc0 str r6, [r7] | *(r7) = r6;
| }
0x0000ddc2 ldr r3, [sp] | r3 = *(sp);
0x0000ddc4 cmp r3, 0 |
| if (r3 == 0) {
0x0000ddc6 beq 0xdd6a | goto label_4;
| }
0x0000ddc8 movs r0, 0 | r0 = 0;
0x0000ddca add sp, 0x14 |
0x0000ddcc pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_17:
0x0000ddd0 ldr.w r8, [sp, 0xc] | r8 = var_ch;
| label_16:
0x0000ddd4 movs r3, 0x26 | r3 = 0x26;
0x0000ddd6 mov sl, r8 | sl = r8;
0x0000ddd8 mov r0, r4 | r0 = r4;
0x0000ddda adds r6, 1 | r6++;
0x0000dddc mov r8, sb | r8 = sb;
0x0000ddde strb r3, [r4], 1 | *(r4) = r3;
| r4++;
0x0000dde2 b 0xdbc6 | goto label_0;
| label_19:
0x0000dde4 adds r1, 2 | r1 += 2;
0x0000dde6 mov.w sl, 1 | sl = 1;
| label_6:
0x0000ddea ldrb r3, [r1] | r3 = *(r1);
0x0000ddec add.w sl, sl, 1 | sl++;
0x0000ddf0 mov fp, r1 |
0x0000ddf2 adds r1, 1 | r1++;
0x0000ddf4 cmp r3, 0x3b |
0x0000ddf6 it ne |
| if (r3 != 0x3b) {
0x0000ddf8 cmpne r3, 0 | __asm ("cmpne r3, 0");
| }
0x0000ddfa ite ne |
| if (r3 == 0x3b) {
0x0000ddfc movne r2, 1 | r2 = 1;
| }
| if (r3 != 0x3b) {
0x0000ddfe moveq r2, 0 | r2 = 0;
| }
0x0000de00 cmp sl, r5 |
0x0000de02 ite eq |
| if (sl != r5) {
0x0000de04 moveq r2, 0 | r2 = 0;
| }
| if (sl == r5) {
0x0000de06 andne r2, r2, 1 | r2 &= 1;
| }
0x0000de0a cmp r2, 0 |
| if (r2 == 0) {
0x0000de0c beq.w 0xdcf0 | goto label_5;
| }
0x0000de10 b 0xddea | goto label_6;
| label_18:
0x0000de12 ldr r7, [sp, 4] | r7 = var_4h;
0x0000de14 b 0xddbe | goto label_7;
| label_22:
0x0000de16 mov r1, sb | r1 = sb;
0x0000de18 mov r2, r8 | r2 = r8;
0x0000de1a b 0xdcaa | goto label_2;
| label_15:
0x0000de1c cmp.w fp, 2 |
| if (fp <= 2) {
0x0000de20 ble 0xde98 | goto label_24;
| }
0x0000de22 blx 0xab10 | fcn_0000ab10 ();
0x0000de26 mov r3, r7 | r3 = r7;
0x0000de28 ldr r0, [r0] | r0 = *(r0);
0x0000de2a mov.w ip, 2 |
0x0000de2e b 0xde3c |
| while ((r7 & 0x800) != 0) {
0x0000de30 add.w ip, ip, 1 |
0x0000de34 sub.w r3, r2, 0x30 | r3 = r2 - 0x30;
0x0000de38 cmp ip, fp |
| if (ip == fp) {
0x0000de3a beq 0xde52 | goto label_25;
| }
0x0000de3c ldrb r2, [sb, 1]! | r2 = *((sb += 1));
0x0000de40 add.w r1, r3, r3, lsl 2 | r1 = r3 + (r3 << 2);
0x0000de44 ldrh.w r7, [r0, r2, lsl 1] | offset_0 = r2 << 1;
| r7 = *((r0 + offset_0));
0x0000de48 add.w r2, r2, r1, lsl 1 | r2 += (r1 << 1);
0x0000de4c tst.w r7, 0x800 |
0x0000de50 bne 0xde30 |
| }
| label_25:
0x0000de52 cmp r3, 8 |
0x0000de54 ite gt |
| if (r3 <= 8) {
0x0000de56 movgt r2, 0 | r2 = 0;
| }
| if (r3 > 8) {
0x0000de58 movle r2, 1 | r2 = 1;
| }
0x0000de5a cmp fp, ip |
0x0000de5c it gt |
| if (fp <= ip) {
0x0000de5e orrgt r2, r2, 1 | r2 |= 1;
| }
| if (r2 == 0) {
0x0000de62 cbnz r2, 0xde98 |
0x0000de64 sub.w r2, r3, 0xb | r2 = r3 - 0xb;
0x0000de68 cmp r2, 0x14 |
| if (r2 < 0x14) {
0x0000de6a bls 0xde98 | goto label_24;
| }
0x0000de6c cmp r3, 0xff |
0x0000de6e sub.w r1, r3, 0x7f | r1 = r3 - 0x7f;
0x0000de72 ite le |
| if (r3 > 0xff) {
0x0000de74 movle r2, 0 | r2 = 0;
| }
| if (r3 <= 0xff) {
0x0000de76 movgt r2, 1 | r2 = 1;
| }
0x0000de78 cmp r1, 0x21 |
0x0000de7a it ls |
| if (r1 > 0x21) {
0x0000de7c orrls r2, r2, 1 | r2 |= 1;
| }
| if (r2 != 0) {
0x0000de80 cbnz r2, 0xde98 | goto label_24;
| }
0x0000de82 mov r2, r4 | r2 = r4;
0x0000de84 mov r0, r4 | r0 = r4;
0x0000de86 strb r3, [r2], 1 | *(r2) = r3;
| r2++;
0x0000de8a movs r3, 1 | r3 = 1;
0x0000de8c adds r6, 1 | r6++;
0x0000de8e mov r4, r2 | r4 = r2;
0x0000de90 add.w r8, sl, 1 | r8 = sl + 1;
0x0000de94 str r3, [sp] | *(sp) = r3;
0x0000de96 b 0xdbc6 | goto label_0;
| }
| label_24:
0x0000de98 subs r0, r4, 1 | r0 = r4 - 1;
0x0000de9a add.w r8, sl, 1 | r8 = sl + 1;
0x0000de9e b 0xdbc6 | goto label_0;
| label_11:
0x0000dea0 strb r3, [r0] | *(r0) = r3;
0x0000dea2 cmp r7, 0 |
| if (r7 != 0) {
0x0000dea4 bne.w 0xdd66 | goto label_8;
| }
0x0000dea8 b 0xdd6a | goto label_4;
| label_23:
0x0000deaa ldr r4, [sp, 0xc] | r4 = var_ch;
0x0000deac mov r1, sb | r1 = sb;
0x0000deae mov r2, r8 | r2 = r8;
0x0000deb0 b 0xdcaa | goto label_2;
| label_21:
0x0000deb2 cmp.w sl, 2 |
| if (sl <= 2) {
0x0000deb6 ble 0xdf14 | goto label_26;
| }
0x0000deb8 blx 0xab10 | fcn_0000ab10 ();
0x0000debc mov r3, r7 | r3 = r7;
0x0000debe ldr r4, [r0] | r4 = *(r0);
0x0000dec0 movs r0, 2 | r0 = 2;
0x0000dec2 b 0xdece |
| while ((r7 & 0x800) != 0) {
0x0000dec4 adds r0, 1 | r0++;
0x0000dec6 sub.w r3, r2, 0x30 | r3 = r2 - 0x30;
0x0000deca cmp r0, sl |
| if (r0 == sl) {
0x0000decc beq 0xdee4 | goto label_27;
| }
0x0000dece ldrb r2, [sb, 1]! | r2 = *((sb += 1));
0x0000ded2 add.w r1, r3, r3, lsl 2 | r1 = r3 + (r3 << 2);
0x0000ded6 ldrh.w r7, [r4, r2, lsl 1] | offset_1 = r2 << 1;
| r7 = *((r4 + offset_1));
0x0000ded8 strb r2, [r2] | *(r2) = r2;
0x0000deda add.w r2, r2, r1, lsl 1 | r2 += (r1 << 1);
0x0000dede tst.w r7, 0x800 |
0x0000dee2 bne 0xdec4 |
| }
| label_27:
0x0000dee4 cmp r3, 8 |
0x0000dee6 ite gt |
| if (r3 <= 8) {
0x0000dee8 movgt r2, 0 | r2 = 0;
| }
| if (r3 > 8) {
0x0000deea movle r2, 1 | r2 = 1;
| }
0x0000deec cmp sl, r0 |
0x0000deee it gt |
| if (sl <= r0) {
0x0000def0 orrgt r2, r2, 1 | r2 |= 1;
| }
| if (r2 == 0) {
0x0000def4 cbnz r2, 0xdf14 |
0x0000def6 sub.w r2, r3, 0xb | r2 = r3 - 0xb;
0x0000defa cmp r2, 0x14 |
| if (r2 < 0x14) {
0x0000defc bls 0xdf14 | goto label_26;
| }
0x0000defe cmp r3, 0xff |
0x0000df00 sub.w r2, r3, 0x7f | r2 = r3 - 0x7f;
0x0000df04 ite le |
| if (r3 > 0xff) {
0x0000df06 movle r3, 0 | r3 = 0;
| }
| if (r3 <= 0xff) {
0x0000df08 movgt r3, 1 | r3 = 1;
| }
0x0000df0a cmp r2, 0x21 |
0x0000df0c it ls |
| if (r2 > 0x21) {
0x0000df0e orrls r3, r3, 1 | r3 |= 1;
| }
| if (r3 == 0) {
0x0000df12 cbz r3, 0xdf22 | goto label_28;
| }
| }
| label_26:
0x0000df14 mov r1, fp | r1 = fp;
0x0000df16 ldrb r2, [r1, 1]! | r2 = *((r1 += 1));
0x0000df1a subs r4, r2, 0 | r4 = r2 - 0;
0x0000df1c it ne |
| if (r4 == r2) {
0x0000df1e movne r4, 1 | r4 = 1;
| }
0x0000df20 b 0xdcaa | goto label_2;
| label_28:
0x0000df22 ldrb.w r2, [fp, 1] | r2 = *(arg_1h);
0x0000df26 movs r3, 1 | r3 = 1;
0x0000df28 add.w r1, fp, 1 | r1 += arg_1h;
0x0000df2c adds r6, 1 | r6++;
0x0000df2e str r3, [sp] | *(sp) = r3;
0x0000df30 subs r4, r2, 0 | r4 = r2 - 0;
0x0000df32 it ne |
| if (r4 == r2) {
0x0000df34 movne r4, 1 | r4 = 1;
| }
0x0000df36 b 0xdcaa | goto label_2;
| }
[*] Function fprintf used 1 times libapr-1.so.0.7.2