[*] Binary protection state of libedit.so.0.0.68
Full RELRO Canary found NX enabled DSO No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of libedit.so.0.0.68
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libedit.so.0.0.68 @ 0xc204 */
| #include <stdint.h>
|
; (fcn) fcn.0000c204 () | void fcn_0000c204 (int16_t arg_20h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_84h_2;
| int16_t var_4h_2;
| int16_t var_84h;
| int16_t var_104h;
| int16_t var_0h;
| int16_t var_4h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0000c204 mvnsmi lr, sp, lsr 18 | __asm ("mvnsmi lr, sp, lsr 18");
0x0000c208 mov r8, r1 | r8 = r1;
0x0000c20a ldr r1, [pc, 0xb8] |
0x0000c20c mov r5, r3 | r5 = r3;
0x0000c20e sub sp, 8 |
0x0000c210 ldr r3, [pc, 0xb4] | r3 = *(0xc2c8);
0x0000c212 add r1, pc | r1 = 0x184dc;
0x0000c214 ldr r3, [r1, r3] |
0x0000c216 ldr r3, [r3] | r3 = *(0x184dc);
0x0000c218 str r3, [sp, 4] | var_4h = r3;
0x0000c21a mov.w r3, 0 | r3 = 0;
| if (r2 == 0) {
0x0000c21e cbz r2, 0xc25c | goto label_5;
| }
0x0000c220 adds r3, r2, 1 | r3 = r2 + 1;
0x0000c222 mov r7, r0 | r7 = r0;
| if (r3 == r2) {
0x0000c224 beq 0xc280 | goto label_6;
| }
| label_1:
0x0000c226 ldr r3, [sp, 0x20] | r3 = *(arg_20h);
0x0000c228 ldr r4, [r7, 0x38] | r4 = *((r7 + 0x38));
0x0000c22a strd r8, r2, [r7, 0x374] | __asm ("strd r8, r2, aav.0x000000ff");
0x0000c22e strb.w r3, [r7, 0x37c] | *((r7 + 0x37c)) = r3;
| if (r5 == 0) {
0x0000c232 cbz r5, 0xc298 | goto label_7;
| }
0x0000c234 mov r3, r5 | r3 = r5;
0x0000c236 ldr r1, [r4] | r1 = *(r4);
0x0000c238 ldr r5, [r7, 0x3c] | r5 = *((r7 + 0x3c));
0x0000c23a lsl.w ip, r8, 2 |
| label_0:
0x0000c23e cmp r2, r1 |
0x0000c240 it eq |
| if (r2 != r1) {
0x0000c242 addeq r4, ip | r4 += ip;
| }
0x0000c244 cmp r4, r5 |
| if (r4 >= r5) {
0x0000c246 bhs 0xc25c | goto label_5;
| }
0x0000c248 ldr r6, [r7, 0x34] | r6 = *((r7 + 0x34));
0x0000c24a b 0xc258 |
| while (r6 < r4) {
0x0000c24c ldr r1, [r4] | r1 = *(r4);
0x0000c24e cmp r1, r2 |
| if (r1 == r2) {
0x0000c250 beq 0xc278 | goto label_8;
| }
0x0000c252 add r4, ip | r4 += ip;
0x0000c254 cmp r4, r5 |
| if (r4 >= r5) {
0x0000c256 bhs 0xc25c | goto label_5;
| }
0x0000c258 cmp r6, r4 |
0x0000c25a bls 0xc24c |
| }
| label_5:
0x0000c25c movs r0, 6 | r0 = 6;
| label_2:
0x0000c25e ldr r2, [pc, 0x6c] |
0x0000c260 ldr r3, [pc, 0x64] | r3 = *(0xc2c8);
0x0000c262 add r2, pc | r2 = 0x18534;
0x0000c264 ldr r3, [r2, r3] | r3 = *(0x18534);
0x0000c266 ldr r2, [r3] | r2 = *(0x18534);
0x0000c268 ldr r3, [sp, 4] | r3 = var_4h;
0x0000c26a eors r2, r3 | r2 ^= r3;
0x0000c26c mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000c270 bne 0xc2c0 | goto label_9;
| }
0x0000c272 add sp, 8 |
0x0000c274 pop.w {r4, r5, r6, r7, r8, pc} |
| label_8:
0x0000c278 subs r3, 1 | r3--;
| if (r3 == 1) {
0x0000c27a beq 0xc298 | goto label_7;
| }
0x0000c27c mov r1, r2 | r1 = r2;
0x0000c27e b 0xc23e | goto label_0;
| label_6:
0x0000c280 mov r1, sp | r1 = sp;
0x0000c282 blx 0x4f90 | r0 = fcn_00004f90 ();
0x0000c286 cmp r0, 1 |
0x0000c288 it eq |
| if (r0 == 1) {
0x0000c28a ldreq r2, [sp] | r2 = *(sp);
| goto label_10;
| }
| if (r0 == 1) {
| label_10:
0x0000c28c beq 0xc226 | goto label_1;
| }
0x0000c28e movs r1, 0 | r1 = 0;
0x0000c290 mov r0, r7 | r0 = r7;
0x0000c292 bl 0x6218 | fcn_00006218 (r0);
0x0000c296 b 0xc25e | goto label_2;
| label_7:
0x0000c298 ldr r3, [sp, 0x20] | r3 = *(arg_20h);
| if (r3 != 0) {
0x0000c29a cbz r3, 0xc2a0 |
0x0000c29c sub.w r4, r4, r8, lsl 2 | r4 -= (r8 << 2);
| }
0x0000c2a0 ldr.w r3, [r7, 0x2fc] | r3 = *((r7 + 0x2fc));
0x0000c2a4 movs r0, 5 | r0 = 5;
0x0000c2a6 str r4, [r7, 0x38] | *((r7 + 0x38)) = r4;
0x0000c2a8 cmp r3, 0 |
| if (r3 == 0) {
0x0000c2aa beq 0xc25e | goto label_2;
| }
0x0000c2ac cmp.w r8, 0 |
0x0000c2b0 mov r0, r7 | r0 = r7;
0x0000c2b2 itt gt |
| if (r8 <= 0) {
0x0000c2b4 addgt r4, 4 | r4 += 4;
| }
| if (r8 <= 0) {
0x0000c2b6 strgt r4, [r7, 0x38] | *((r7 + 0x38)) = r4;
| }
0x0000c2b8 bl 0x5bf4 | fcn_00005bf4 (r0);
0x0000c2bc movs r0, 4 | r0 = 4;
0x0000c2be b 0xc25e | goto label_2;
| label_9:
0x0000c2c0 blx 0x5460 | fputc (r0, r1);
0x0000c2c4 ldrh r2, [r5, r0] | r2 = *((r5 + r0));
0x0000c2c6 movs r1, r0 | r1 = r0;
0x0000c2c8 lsls r0, r6, 0xd | r0 = r6 << 0xd;
0x0000c2ca movs r0, r0 |
0x0000c2cc ldr r2, [r3, r7] | r2 = *((r3 + r7));
0x0000c2ce movs r1, r0 | r1 = r0;
0x0000c2d0 ldr r2, [pc, 0x118] |
0x0000c2d2 ldr r3, [pc, 0x11c] | r3 = *(0xc3f2);
0x0000c2d4 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0000c2d8 sub sp, 0x10c |
0x0000c2da add r2, pc | r2 = 0x186ca;
0x0000c2dc add r4, sp, 4 | r4 += var_4h_2;
0x0000c2de mov r5, r0 | r5 = r0;
0x0000c2e0 add r7, sp, 0x84 | r7 += var_84h;
0x0000c2e2 ldr r3, [r2, r3] |
0x0000c2e4 ldr r3, [r3] | r3 = *(0x186ca);
0x0000c2e6 str r3, [sp, 0x104] | var_104h = r3;
0x0000c2e8 mov.w r3, 0 | r3 = 0;
0x0000c2ec blx 0x575c | fcn_0000575c ();
0x0000c2ee bics.w r6, r6, r6, lsl 16 | __asm ("bics.w r6, r6, r6, lsl 16");
0x0000c2f2 mov r0, r4 | r0 = r4;
0x0000c2f4 ldr.w r8, [r6] | r8 = *(r6);
0x0000c2f8 blx 0x4e94 | fcn_00004e94 ();
0x0000c2fc mov r1, r5 | r1 = r5;
0x0000c2fe mov r0, r4 | r0 = r4;
0x0000c300 blx 0x52c8 | fcn_000052c8 ();
0x0000c304 mov r1, r4 | r1 = r4;
0x0000c306 ldr r4, [pc, 0xec] |
0x0000c308 mov r2, r7 | r2 = r7;
0x0000c30a movs r0, 0 | r0 = 0;
0x0000c30c blx 0x543c | fprintf_chk ()
0x0000c310 add r4, pc | r4 = 0x1870a;
0x0000c312 cmp r5, 0x12 |
0x0000c314 ldr r0, [r4] | r0 = *(0x1870a);
0x0000c316 ldr.w r3, [r0, 0x380] | r3 = *(0x18a8a);
0x0000c31a str.w r5, [r3, 0x454] | __asm ("str.w r5, aav.0x000000ff");
| if (r5 == 0x12) {
0x0000c31e beq 0xc3b2 | goto label_11;
| }
0x0000c320 cmp r5, 0x1c |
| if (r5 == 0x1c) {
0x0000c322 beq 0xc3ce | goto label_12;
| }
0x0000c324 bl 0xef9c | fcn_0000ef9c (r0);
0x0000c328 cmp r5, 2 |
| if (r5 == 2) {
0x0000c32a beq 0xc3d4 | goto label_13;
| }
| label_3:
0x0000c32c ldr r2, [pc, 0xc8] |
0x0000c32e movs r4, 0 | r4 = 0;
0x0000c330 add r2, pc | r2 = 0x1872c;
| do {
0x0000c332 ldr r3, [r2, 4]! | r3 = *((r2 += 4));
0x0000c336 adds r4, 1 | r4++;
0x0000c338 cmp.w r3, -1 |
0x0000c33c it ne |
| if (r3 != -1) {
0x0000c33e cmpne r3, r5 | __asm ("cmpne r3, r5");
| }
0x0000c340 bne 0xc332 |
| } while (r3 != -1);
0x0000c342 movs r1, 0x8c | r1 = 0x8c;
0x0000c344 mul r1, r4, r1 | r1 = r4 * r1;
0x0000c348 add.w fp, r1, 4 |
| do {
0x0000c34c ldr r3, [pc, 0xac] |
0x0000c34e movs r2, 0 | r2 = 0;
0x0000c350 mov r0, r5 | r0 = r5;
0x0000c352 mov sb, r2 | sb = r2;
0x0000c354 add r3, pc | r3 = "vi-change-meta";
0x0000c356 ldr.w sl, [r3] | sl = "vi-change-meta";
0x0000c35a ldr.w r3, [sl, 0x380] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x0000c35e add r1, r3 | r1 += r3;
0x0000c360 blx 0x5478 | tgoto (r0, r1, r2);
0x0000c364 movs r2, 0x8c | r2 = 0x8c;
0x0000c366 ldr.w r3, [sl, 0x380] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x0000c36a mul r4, r2, r4 | r4 = r2 * r4;
0x0000c36e mov.w r2, -1 | r2 = -1;
0x0000c372 add.w r0, r3, fp | r0 = r3 + fp;
0x0000c376 str r2, [r3, r4] | *((r3 + r4)) = r2;
0x0000c378 add r3, r4 | r3 += r4;
0x0000c37a str.w sb, [r3, 0x84] | __asm ("str.w sb, [r3, 0x84]");
0x0000c37e blx 0x4e94 | fcn_00004e94 ();
0x0000c382 mov r2, sb | r2 = sb;
0x0000c384 mov r1, r7 | r1 = r7;
0x0000c386 movs r0, 2 | r0 = 2;
0x0000c388 blx 0x543c | fprintf_chk ()
0x0000c38c mov r1, r5 | r1 = r5;
0x0000c38e mov r0, sb | r0 = sb;
0x0000c390 blx 0x5684 | fcn_00005684 ();
0x0000c394 ldr r2, [pc, 0x68] |
0x0000c396 ldr r3, [pc, 0x58] | r3 = *(0xc3f2);
0x0000c398 str.w r8, [r6] | __asm ("str.w r8, [r6]");
0x0000c39c add r2, pc | r2 = 0x187a0;
0x0000c39e ldr r3, [r2, r3] | r3 = *(0x187a0);
0x0000c3a0 ldr r2, [r3] | r2 = *(0x187a0);
0x0000c3a2 ldr r3, [sp, 0x104] | r3 = var_104h;
0x0000c3a4 eors r2, r3 | r2 ^= r3;
0x0000c3a6 mov.w r3, 0 | r3 = 0;
0x0000c3a8 lsls r0, r0, 0xc | r0 <<= 0xc;
| if (r0 != r0) {
0x0000c3aa bne 0xc3e6 | goto label_14;
| }
0x0000c3ac add sp, 0x10c |
0x0000c3ae pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_11:
0x0000c3b2 bl 0xebc8 | fcn_0000ebc8 (r0);
0x0000c3b6 ldr r0, [r4] | r0 = *(r4);
0x0000c3b8 movs r1, 0 | r1 = 0;
0x0000c3ba bl 0x6690 | r0 = fcn_00006690 ();
0x0000c3be cmp r0, 4 |
| if (r0 == 4) {
0x0000c3c0 beq 0xc3de | goto label_15;
| }
| label_4:
0x0000c3c2 ldr r3, [pc, 0x40] |
0x0000c3c4 add r3, pc | r3 = 0x187ce;
0x0000c3c6 ldr r0, [r3] | r0 = *(0x187ce);
0x0000c3c8 bl 0xdc9c | fcn_0000dc9c (r0);
0x0000c3ca stc2l p7, c14, [r8], -0x2b8 | __asm ("stc2l p7, c14, [r8], -aav.0x000000ff");
| label_12:
0x0000c3ce blx 0x4f5c | fcn_00004f5c ();
0x0000c3d2 b 0xc32c | goto label_3;
| label_13:
0x0000c3d4 movs r1, 0 | r1 = 0;
0x0000c3d6 mov.w fp, 4 |
0x0000c3da mov r4, r1 | r4 = r1;
0x0000c3dc b 0xc34c |
| } while (1);
| label_15:
0x0000c3de ldr r0, [r4] | r0 = *(r4);
0x0000c3e0 bl 0xab58 | fcn_0000ab58 (r0, r1);
0x0000c3e4 b 0xc3c2 | goto label_4;
| label_14:
0x0000c3e6 blx 0x5460 | fputc (r0, r1);
0x0000c3ea nop |
0x0000c3ec ldr r2, [r4, r5] | r2 = *((r4 + r5));
0x0000c3ee movs r1, r0 | r1 = r0;
0x0000c3f0 lsls r0, r6, 0xd | r0 = r6 << 0xd;
0x0000c3f2 movs r0, r0 |
0x0000c3f4 ldrb r4, [r3, r6] | r4 = *((r3 + r6));
0x0000c3f6 movs r1, r0 | r1 = r0;
0x0000c3f8 asrs r4, r5, 3 | r4 = r5 >> 3;
0x0000c3fa movs r1, r0 | r1 = r0;
0x0000c3fc ldrb r0, [r3, r5] | r0 = *((r3 + r5));
0x0000c3fe movs r1, r0 | r1 = r0;
0x0000c400 ldr r0, [r4, r2] | r0 = *((r4 + r2));
0x0000c402 movs r1, r0 | r1 = r0;
0x0000c404 ldrb r0, [r5, r3] | r0 = *((r5 + r3));
0x0000c406 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/libedit.so.0.0.68 @ 0xc408 */
| #include <stdint.h>
|
; (fcn) fcn.0000c408 () | void fcn_0000c408 (int16_t arg_4h, int16_t arg1) {
| int16_t var_4h;
| int16_t var_84h;
| r0 = arg1;
0x0000c408 blmi 0xe9ecf4 | __asm ("blmi aav.0x0001582a");
0x0000c40c push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0000c410 mov r4, r0 | r4 = r0;
0x0000c412 add r2, pc | r2 += pc;
0x0000c414 sub sp, 0x8c |
0x0000c416 mov.w r0, 0x458 | r0 = 0x458;
0x0000c41a ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x0000c41c ldr r3, [r3] | r3 = *(r3);
0x0000c41e str r3, [sp, 0x84] | var_84h = r3;
0x0000c420 mov.w r3, 0 | r3 = 0;
0x0000c424 blx 0x5430 | sigaction ();
0x0000c428 str.w r0, [r4, 0x380] | __asm ("str.w r0, aav.0x000000ff");
0x0000c42c cmp r0, 0 |
| if (r0 == 0) {
0x0000c42e beq 0xc4e4 | goto label_0;
| }
0x0000c430 add.w r5, r0, 0x3d4 | r5 = r0 + 0x3d4;
0x0000c434 ldr.w fp, [pc, 0xc0] |
0x0000c438 mov r0, r5 | r0 = r5;
0x0000c43a mov.w sb, 0 | sb = 0;
0x0000c43e blx 0x4e94 | fcn_00004e94 ();
0x0000c442 movs r1, 2 | r1 = 2;
0x0000c444 mov r0, r5 | r0 = r5;
0x0000c446 blx 0x52c8 | fcn_000052c8 ();
0x0000c44a movs r1, 0x14 | r1 = 0x14;
0x0000c44c mov r0, r5 | r0 = r5;
0x0000c44e blx 0x52c8 | fcn_000052c8 ();
0x0000c452 movs r1, 3 | r1 = 3;
0x0000c454 mov r0, r5 | r0 = r5;
0x0000c456 blx 0x52c8 | fcn_000052c8 ();
0x0000c45a movs r1, 1 | r1 = 1;
0x0000c45c mov r0, r5 | r0 = r5;
0x0000c45e blx 0x52c8 | fcn_000052c8 ();
0x0000c462 movs r1, 0xf | r1 = 0xf;
0x0000c464 mov r0, r5 | r0 = r5;
0x0000c466 blx 0x52c8 | fcn_000052c8 ();
0x0000c46a movs r1, 0x12 | r1 = 0x12;
0x0000c46c mov r0, r5 | r0 = r5;
0x0000c46e blx 0x52c8 | fcn_000052c8 ();
0x0000c472 movs r1, 0x1c | r1 = 0x1c;
0x0000c474 mov r0, r5 | r0 = r5;
0x0000c476 blx 0x52c8 | fcn_000052c8 ();
0x0000c47a add.w r8, sp, 4 | r8 += var_4h;
0x0000c47e mov r1, r5 | r1 = r5;
0x0000c480 add fp, pc | fp = 0x1897c;
0x0000c482 mov.w sl, 4 | sl = 4;
0x0000c486 movs r7, 0x8c | r7 = 0x8c;
0x0000c488 mov.w r6, -1 | r6 = -1;
0x0000c48c mov r5, sb | r5 = sb;
0x0000c48e mov r2, r8 | r2 = r8;
0x0000c490 movs r0, 0 | r0 = 0;
0x0000c492 blx 0x543c | fprintf_chk ()
| do {
0x0000c496 mul r3, r7, sb | r3 = r7 * sb;
0x0000c49a ldr.w r2, [r4, 0x380] | r2 = *((r4 + 0x380));
0x0000c49e add.w sb, sb, 1 | sb++;
0x0000c4a2 add.w r0, r2, sl | r0 = r2 + sl;
0x0000c4a6 add.w sl, sl, 0x8c | sl += 0x8c;
0x0000c4aa adds r1, r2, r3 | r1 = r2 + r3;
0x0000c4ac str r6, [r2, r3] | *((r2 + r3)) = r6;
0x0000c4ae str.w r5, [r1, 0x84] | __asm ("str.w r5, [r1, 0x84]");
0x0000c4b2 blx 0x4e94 | fcn_00004e94 ();
0x0000c4b6 ldr r3, [fp, 4]! | r3 = *(arg_4h);
0x0000c4ba adds r3, 1 | r3++;
0x0000c4bc bne 0xc496 |
| } while (r3 != 1);
0x0000c4be movs r2, 0 | r2 = 0;
0x0000c4c0 mov r1, r8 | r1 = r8;
0x0000c4c2 movs r0, 2 | r0 = 2;
0x0000c4c4 blx 0x543c | fprintf_chk ()
0x0000c4c8 movs r0, 0 | r0 = 0;
| do {
0x0000c4ca ldr r2, [pc, 0x30] |
0x0000c4cc ldr r3, [pc, 0x24] | r3 = *(0xc4f4);
0x0000c4ce add r2, pc | r2 = 0x189d0;
0x0000c4d0 ldr r3, [r2, r3] | r3 = *(0x189d0);
0x0000c4d2 ldr r2, [r3] | r2 = *(0x189d0);
0x0000c4d4 ldr r3, [sp, 0x84] | r3 = var_84h;
0x0000c4d6 eors r2, r3 | r2 ^= r3;
0x0000c4d8 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000c4dc bne 0xc4ea | goto label_1;
| }
0x0000c4de add sp, 0x8c |
0x0000c4e0 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_0:
0x0000c4e4 mov.w r0, -1 | r0 = -1;
0x0000c4e8 b 0xc4ca |
| } while (1);
| label_1:
0x0000c4ea blx 0x5460 | fputc (r0, r1);
0x0000c4ee nop |
0x0000c4f0 ldr r2, [r5, r0] | r2 = *((r5 + r0));
0x0000c4f2 movs r1, r0 | r1 = r0;
0x0000c4f4 lsls r0, r6, 0xd | r0 = r6 << 0xd;
0x0000c4f6 movs r0, r0 |
0x0000c4f8 lsrs r4, r3, 0x1e | r4 = r3 >> 0x1e;
0x0000c4fa movs r1, r0 | r1 = r0;
0x0000c4fc ldrsb r6, [r5, r5] | r6 = *((r5 + r5));
0x0000c4fe 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/libedit.so.0.0.68 @ 0xc514 */
| #include <stdint.h>
|
; (fcn) fcn.0000c514 () | void fcn_0000c514 (int16_t arg1) {
| int16_t var_4h;
| int16_t var_84h_2;
| int16_t var_4h_2;
| int16_t row;
| int16_t col;
| int16_t var_114h;
| int16_t var_194h;
| int16_t var_19ch;
| r0 = arg1;
0x0000c514 bmi 0xade9c4 |
0x0000c518 ldr r3, [pc, 0xac] |
0x0000c51a add r1, pc | r1 += pc;
0x0000c51c push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0000c520 ldr r2, [r1, r2] | r2 = *((r1 + r2));
0x0000c522 sub sp, 0x1a4 |
0x0000c524 add r3, pc | r3 = 0x18af0;
0x0000c526 movs r4, 0 | r4 = 0;
0x0000c528 mov r7, r0 | r7 = r0;
0x0000c52a add r0, sp, 0x114 | r0 += var_114h;
0x0000c52c ldr r2, [r2] | r2 = *(r2);
0x0000c52e str r2, [sp, 0x19c] | var_19ch = r2;
0x0000c530 mov.w r2, 0 | r2 = 0;
0x0000c534 str r3, [sp, 0x110] | col = r3;
0x0000c536 str r4, [sp, 0x194] | var_194h = r4;
0x0000c538 add.w fp, sp, 4 |
0x0000c53c blx 0x4e94 | fcn_00004e94 ();
0x0000c540 ldr.w r1, [r7, 0x380] | r1 = *((r7 + 0x380));
0x0000c544 mov r2, fp | r2 = fp;
0x0000c546 ldr r6, [pc, 0x84] |
0x0000c548 mov r0, r4 | r0 = r4;
0x0000c54a ldr.w sb, [pc, 0x84] | sb = *(0x0000c5d0);
0x0000c54e add r5, sp, 0x84 | r5 += row;
0x0000c550 add.w r1, r1, 0x3d4 | r1 += 0x3d4;
0x0000c554 add.w r8, sp, 0x110 | r8 += col;
0x0000c558 blx 0x543c | fprintf_chk ()
0x0000c55c add r6, pc | r6 = 0x18b2e;
0x0000c55e add sb, pc | sb += pc;
0x0000c560 movs r0, 2 | r0 = 2;
0x0000c562 mov.w sl, 0x8c | sl = 0x8c;
0x0000c564 lsrs r4, r1, 0xa | r4 = r1 >> 0xa;
| do {
0x0000c566 mov r2, r5 | r2 = r5;
0x0000c568 mov r1, r8 | r1 = r8;
0x0000c56a blx 0x5478 | tgoto (r0, r1, r2);
0x0000c56e adds r0, 1 | r0++;
| if (r0 != 1) {
0x0000c570 beq 0xc588 |
0x0000c572 ldr r3, [r5] | r3 = *(r5);
0x0000c574 cmp r3, sb |
| if (r3 == sb) {
0x0000c576 beq 0xc588 | goto label_0;
| }
0x0000c578 ldr.w r0, [r7, 0x380] | r0 = *((r7 + 0x380));
0x0000c57c movs r2, 0x8c | r2 = 0x8c;
0x0000c57e mov r1, r5 | r1 = r5;
0x0000c580 mla r0, sl, r4, r0 | __asm ("mla r0, sl, r4, r0");
0x0000c584 blx 0x5274 | fcn_00005274 ();
| }
| label_0:
0x0000c588 ldr r0, [r6, 4]! | r0 = *((r6 += 4));
0x0000c58c adds r4, 1 | r4++;
0x0000c58e adds r3, r0, 1 | r3 = r0 + 1;
0x0000c590 bne 0xc566 |
| } while (r3 != r0);
0x0000c592 ldr r3, [pc, 0x40] |
0x0000c594 movs r2, 0 | r2 = 0;
0x0000c596 mov r1, fp | r1 = fp;
0x0000c598 movs r0, 2 | r0 = 2;
0x0000c59a add r3, pc | r3 = 0x18b74;
0x0000c59c str r7, [r3] | *(r3) = r7;
0x0000c59e blx 0x543c | fprintf_chk ()
0x0000c5a2 ldr r2, [pc, 0x34] |
0x0000c5a4 ldr r3, [pc, 0x1c] | r3 = *(0xc5c4);
0x0000c5a6 add r2, pc | r2 = 0x18b84;
0x0000c5a8 ldr r3, [r2, r3] | r3 = *(0x18b84);
0x0000c5aa ldr r2, [r3] | r2 = *(0x18b84);
0x0000c5ac ldr r3, [sp, 0x19c] | r3 = var_19ch;
0x0000c5ae eors r2, r3 | r2 ^= r3;
0x0000c5b0 mov.w r3, 0 | r3 = 0;
| if (r2 == r3) {
0x0000c5b4 bne 0xc5bc |
0x0000c5b6 add sp, 0x1a4 |
0x0000c5b8 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
0x0000c5bc blx 0x5460 | fputc (r0, r1);
0x0000c5c0 ldrsb r2, [r4, r4] | r2 = *((r4 + r4));
0x0000c5c2 movs r1, r0 | r1 = r0;
0x0000c5c4 lsls r0, r6, 0xd | r0 = r6 << 0xd;
0x0000c5c6 movs r0, r0 |
0x0000c5c8 stc2 p15, c15, [sb, 0x3fc]! | __asm ("stc2 p15, c15, aav.0x000000ff!");
0x0000c5cc lsrs r0, r0, 0x1b | r0 >>= 0x1b;
0x0000c5ce movs r1, r0 | r1 = r0;
0x0000c5d0 stc2l p15, c15, [pc, -0x3fc]! | __asm ("stc2l p15, c15, aav.0x000000ff!");
0x0000c5d4 ldrh r2, [r2, r4] | r2 = *((r2 + r4));
0x0000c5d6 movs r1, r0 | r1 = r0;
0x0000c5d8 ldrsb r6, [r2, r2] | r6 = *((r2 + r2));
0x0000c5da 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/libedit.so.0.0.68 @ 0xc5dc */
| #include <stdint.h>
|
; (fcn) fcn.0000c5dc () | void fcn_0000c5dc (int16_t arg1) {
| int16_t var_4h;
| int16_t var_84h;
| r0 = arg1;
0x0000c5dc mvnsmi lr, sp, lsr 18 | __asm ("mvnsmi lr, sp, lsr 18");
0x0000c5e0 sub sp, 0x88 |
0x0000c5e2 ldr r4, [pc, 0x7c] |
0x0000c5e4 add r7, sp, 4 | r7 += var_4h;
0x0000c5e6 mov r6, r0 | r6 = r0;
0x0000c5e8 mov r2, r7 | r2 = r7;
0x0000c5ea ldr r3, [pc, 0x78] | r3 = *(0xc666);
0x0000c5ec mov.w r8, 0x8c | r8 = 0x8c;
0x0000c5f0 ldr.w r1, [r0, 0x380] | r1 = *((r0 + 0x380));
0x0000c5f4 add r4, pc | r4 = 0x18c5a;
0x0000c5f6 ldr r5, [pc, 0x70] |
0x0000c5f8 movs r0, 0 | r0 = 0;
0x0000c5fa ldr r3, [r4, r3] |
0x0000c5fc movs r4, 0 | r4 = 0;
0x0000c5fe add.w r1, r1, 0x3d4 | r1 += 0x3d4;
0x0000c602 add r5, pc | r5 = 0x18c70;
0x0000c604 ldr r3, [r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x0000c606 str r3, [sp, 0x84] | var_84h = r3;
0x0000c608 mov.w r3, 0 | r3 = 0;
0x0000c60a lsls r0, r0, 0xc | r0 <<= 0xc;
0x0000c60c blx 0x543c | fprintf_chk ()
0x0000c610 movs r0, 2 | r0 = 2;
| do {
0x0000c612 mul r3, r8, r4 | r3 = r8 * r4;
0x0000c616 ldr.w r1, [r6, 0x380] | r1 = *((r6 + 0x380));
0x0000c61a ldr r2, [r1, r3] | r2 = *((r1 + r3));
0x0000c61c add r1, r3 | r1 += r3;
0x0000c61e adds r2, 1 | r2++;
| if (r2 != 1) {
0x0000c620 beq 0xc628 |
0x0000c622 movs r2, 0 | r2 = 0;
0x0000c624 blx 0x5478 | tgoto (r0, r1, r2);
| }
0x0000c628 ldr r0, [r5, 4]! | r0 = *((r5 += 4));
0x0000c62c adds r4, 1 | r4++;
0x0000c62e adds r3, r0, 1 | r3 = r0 + 1;
0x0000c630 bne 0xc612 |
| } while (r3 != r0);
0x0000c632 ldr r3, [pc, 0x38] |
0x0000c634 movs r2, 0 | r2 = 0;
0x0000c636 mov r1, r7 | r1 = r7;
0x0000c638 movs r0, 2 | r0 = 2;
0x0000c63a add r3, pc | r3 = 0x18cac;
0x0000c63c str r2, [r3] | *(r3) = r2;
0x0000c63e blx 0x543c | fprintf_chk ()
0x0000c642 ldr r2, [pc, 0x2c] |
0x0000c644 ldr r3, [pc, 0x1c] | r3 = *(0xc664);
0x0000c646 add r2, pc | r2 = 0x18cbc;
0x0000c648 ldr r3, [r2, r3] | r3 = *(0x18cbc);
0x0000c64a ldr r2, [r3] | r2 = *(0x18cbc);
0x0000c64c ldr r3, [sp, 0x84] | r3 = var_84h;
0x0000c64e eors r2, r3 | r2 ^= r3;
0x0000c650 mov.w r3, 0 | r3 = 0;
| if (r2 == r3) {
0x0000c654 bne 0xc65c |
0x0000c656 add sp, 0x88 |
0x0000c658 pop.w {r4, r5, r6, r7, r8, pc} |
| }
0x0000c65c blx 0x5460 | fputc (r0, r1);
0x0000c660 ldrsb r0, [r1, r1] | r0 = *((r1 + r1));
0x0000c662 movs r1, r0 | r1 = r0;
0x0000c664 lsls r0, r6, 0xd | r0 = r6 << 0xd;
0x0000c666 movs r0, r0 |
0x0000c668 lsrs r2, r3, 0x18 | r2 = r3 >> 0x18;
0x0000c66a movs r1, r0 | r1 = r0;
0x0000c66c ldrh r2, [r6, r1] | r2 = *((r6 + r1));
0x0000c66e movs r1, r0 | r1 = r0;
0x0000c670 strb r6, [r6, r7] | *((r6 + r7)) = r6;
0x0000c672 movs r1, r0 | r1 = r0;
0x0000c674 movs r0, r0 |
0x0000c676 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/libedit.so.0.0.68 @ 0xd380 */
| #include <stdint.h>
|
; (fcn) fcn.0000d380 () | void fcn_0000d380 (int16_t arg_8ch, int16_t arg_10ch, int16_t arg_90ch, int16_t arg1, int16_t arg2) {
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch;
| r0 = arg1;
| r1 = arg2;
0x0000d380 blmi 0xfe49fdcc | __asm ("blmi aav.0x000148b0");
0x0000d384 push.w {r4, r5, r6, r7, r8, sb, lr} |
0x0000d388 subw sp, sp, 0x914 | __asm ("subw sp, sp, aav.0x000000ff");
0x0000d38c add r2, pc | r2 += pc;
0x0000d38e add r6, sp, 0x8c | r6 += arg_8ch;
0x0000d390 mov r4, r0 | r4 = r0;
0x0000d392 mov r0, r6 | r0 = r6;
0x0000d394 ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x0000d396 mov r5, r1 | r5 = r1;
0x0000d398 add r7, sp, 0xc | r7 += var_ch;
0x0000d39a mov sb, sp | sb = sp;
0x0000d39c ldr r3, [r3] | r3 = *(r3);
0x0000d39e str.w r3, [sp, 0x90c] | __asm ("str.w r3, [arg_90ch]");
0x0000d3a2 mov.w r3, 0 | r3 = 0;
0x0000d3a6 blx 0x4e94 | fcn_00004e94 ();
0x0000d3aa movs r1, 0x1c | r1 = 0x1c;
0x0000d3ac mov r0, r6 | r0 = r6;
0x0000d3ae blx 0x52c8 | fcn_000052c8 ();
0x0000d3b2 mov r2, r7 | r2 = r7;
0x0000d3b4 mov r1, r6 | r1 = r6;
0x0000d3b6 movs r0, 0 | r0 = 0;
0x0000d3b8 blx 0x543c | fprintf_chk ()
0x0000d3bc add r3, sp, 0x10c | r3 += arg_10ch;
0x0000d3be str.w r3, [sb] | __asm ("str.w r3, [sb]");
0x0000d3c2 cmp r5, 0 |
| if (r5 == 0) {
0x0000d3c4 beq.w 0xd58e | goto label_6;
| }
| label_4:
0x0000d3c8 ldrb r3, [r5] | r3 = *(r5);
0x0000d3ca cmp r3, 0 |
| if (r3 != 0) {
0x0000d3cc bne 0xd4a4 | goto label_7;
| }
| label_5:
0x0000d3ce ldr r5, [pc, 0x200] |
0x0000d3d0 add r5, pc | r5 = 0x1a9a6;
| label_0:
0x0000d3d2 mov.w r2, 0x800 | r2 = 0x800;
0x0000d3d6 movs r1, 0 | r1 = 0;
0x0000d3d8 ldr r0, [r4, 0x7c] | r0 = *((r4 + 0x7c));
0x0000d3da blx 0x507c | strrchr (r0, r1);
0x0000d3de ldr r0, [r4, 0x7c] | r0 = *((r4 + 0x7c));
0x0000d3e0 mov r1, r5 | r1 = r5;
0x0000d3e2 blx 0x518c | r0 = fcn_0000518c ();
0x0000d3e6 subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 > r0) {
0x0000d3e8 bgt 0xd4bc | goto label_8;
| }
0x0000d3ea adds r2, r6, 1 | r2 = r6 + 1;
0x0000d3ec ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
| if (r2 == r6) {
0x0000d3ee beq.w 0xd57e | goto label_9;
| }
0x0000d3f2 cmp r6, 0 |
| if (r6 == 0) {
0x0000d3f4 beq.w 0xd5a0 | goto label_10;
| }
| label_3:
0x0000d3f8 ldr r0, [pc, 0x1d8] |
0x0000d3fa movs r2, 0x1e | r2 = 0x1e;
0x0000d3fc movs r1, 1 | r1 = 1;
0x0000d3fe add r0, pc | r0 = 0x1a9d6;
0x0000d400 blx 0x5398 | fcn_00005398 ();
0x0000d404 ldr r1, [r4, 0x78] | r1 = *((r4 + 0x78));
0x0000d406 mov.w ip, 0 |
0x0000d40a ldr r2, [pc, 0x1cc] |
0x0000d40c vldr d16, [pc, 0x1a8] | __asm ("vldr d16, aav.0x000000ff");
0x0000d410 vldr d17, [pc, 0x1ac] | __asm ("vldr d17, aav.0x000000ff");
0x0000d414 adds r3, r1, 4 | r3 = r1 + 4;
0x0000d416 ldr.w lr, [r4, 0x74] |
0x0000d41a add r2, pc | r2 = 0x1a9f8;
0x0000d41c vst1.32 {d16, d17}, [r3] | __asm ("vst1.32 {d16, d17}, [r3]");
0x0000d420 mov r0, r2 | r0 = r2;
0x0000d422 ldr r3, [r1, 0x1c] | r3 = *((r1 + 0x1c));
0x0000d424 str r3, [r1, 0x14] | *((r1 + 0x14)) = r3;
| do {
0x0000d426 subs r3, r2, r0 | r3 = r2 - r0;
0x0000d428 asrs r3, r3, 3 | r3 >>= 3;
0x0000d42a str.w ip, [lr, r3, lsl 2] | __asm ("str.w ip, [lr, r3, lsl 2]");
0x0000d42e ldr r3, [r2, 8]! | r3 = *((r2 += 8));
0x0000d432 cmp r3, 0 |
0x0000d434 bne 0xd426 |
| } while (r3 != 0);
0x0000d436 movs r3, 0x50 | r3 = 0x50;
| label_2:
0x0000d438 movs r2, 0x18 | r2 = 0x18;
0x0000d43a str r2, [r1, 8] | *((r1 + 8)) = r2;
| label_1:
0x0000d43c str r3, [r4, 0x64] | *((r4 + 0x64)) = r3;
0x0000d43e mov r0, r4 | r0 = r4;
0x0000d440 ldr r3, [r1, 8] | r3 = *((r1 + 8));
0x0000d442 add.w sb, sp, 8 | sb += var_8h;
0x0000d446 add.w r8, sp, 4 | r8 += var_4h;
0x0000d44a str r3, [r4, 0x60] | *((r4 + 0x60)) = r3;
0x0000d44c bl 0xc6f0 | fcn_0000c6f0 (r0);
0x0000d450 mov r2, sb | r2 = sb;
0x0000d452 mov r1, r8 | r1 = r8;
0x0000d454 mov r0, r4 | r0 = r4;
0x0000d456 bl 0xcec8 | void (*0xcec8)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x0000d45a ldrd r1, r2, [sp, 4] | __asm ("ldrd r1, r2, [var_4h]");
0x0000d45c asrs r1, r0, 8 | r1 = r0 >> 8;
0x0000d45e mov r0, r4 | r0 = r4;
0x0000d460 bl 0xcf50 | r0 = fcn_0000cf50 (r0, r1, r2);
0x0000d464 adds r3, r0, 1 | r3 = r0 + 1;
| if (r3 != r0) {
0x0000d466 beq 0xd484 |
0x0000d468 movs r2, 0 | r2 = 0;
0x0000d46a mov r1, r7 | r1 = r7;
0x0000d46c movs r0, 2 | r0 = 2;
0x0000d46e blx 0x543c | fprintf_chk ()
0x0000d472 mov r0, r4 | r0 = r4;
0x0000d474 bl 0xd0c4 | fcn_0000d0c4 (r0);
0x0000d478 cmp r6, 0 |
0x0000d47a mov.w r0, -1 | r0 = -1;
0x0000d47e it gt |
| if (r6 <= 0) {
0x0000d480 movgt r0, 0 | r0 = 0;
| }
0x0000d482 str r5, [r4, 0x5c] | *((r4 + 0x5c)) = r5;
| }
0x0000d484 ldr r2, [pc, 0x154] |
0x0000d486 ldr r3, [pc, 0x144] | r3 = *(0xd5ce);
0x0000d488 add r2, pc | r2 = 0x1aa68;
0x0000d48a ldr r3, [r2, r3] | r3 = *(0x1aa68);
0x0000d48c ldr r2, [r3] | r2 = *(0x1aa68);
0x0000d48e ldr.w r3, [sp, 0x90c] | r3 = *(arg_90ch);
0x0000d492 eors r2, r3 | r2 ^= r3;
0x0000d494 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000d498 bne.w 0xd5b2 | goto label_11;
| }
0x0000d49c addw sp, sp, 0x914 | __asm ("addw sp, sp, aav.0x000000ff");
0x0000d4a0 pop.w {r4, r5, r6, r7, r8, sb, pc} |
| label_7:
0x0000d4a4 ldr r1, [pc, 0x138] |
0x0000d4a6 mov r0, r5 | r0 = r5;
0x0000d4a8 add r1, pc | r1 = 0x1aa8c;
0x0000d4aa blx 0x5720 | r0 = fcn_00005720 ();
0x0000d4ae cmp r0, 0 |
| if (r0 != 0) {
0x0000d4b0 bne 0xd3d2 | goto label_0;
| }
0x0000d4b2 ldr r3, [r4, 0x1c] | r3 = *((r4 + 0x1c));
0x0000d4b4 orr r3, r3, 4 | r3 |= 4;
0x0000d4b8 str r3, [r4, 0x1c] | *((r4 + 0x1c)) = r3;
0x0000d4ba b 0xd3d2 | goto label_0;
| label_8:
0x0000d4bc ldr r0, [pc, 0x124] |
0x0000d4be ldr.w r8, [r4, 0x78] | r8 = *((r4 + 0x78));
0x0000d4c2 add r0, pc | r0 = 0x1aaaa;
0x0000d4c4 blx 0x4f74 | fcn_00004f74 ();
0x0000d4c8 str.w r0, [r8] | __asm ("str.w r0, [r8]");
0x0000d4cc ldr r0, [pc, 0x118] |
0x0000d4ce ldr.w r8, [r4, 0x78] | r8 = *((r4 + 0x78));
0x0000d4d2 add r0, pc | r0 = 0x1aabe;
0x0000d4d4 blx 0x4f74 | fcn_00004f74 ();
0x0000d4d8 str.w r0, [r8, 0x18] | __asm ("str.w r0, [r8, 0x18]");
0x0000d4dc ldr r0, [pc, 0x10c] |
0x0000d4de ldr.w r8, [r4, 0x78] | r8 = *((r4 + 0x78));
0x0000d4e2 add r0, pc | r0 = 0x1aad2;
0x0000d4e4 blx 0x4f74 | fcn_00004f74 ();
0x0000d4e8 str.w r0, [r8, 4] | __asm ("str.w r0, [r8, 4]");
0x0000d4ec ldr r0, [pc, 0x100] |
0x0000d4ee ldr.w r8, [r4, 0x78] | r8 = *((r4 + 0x78));
0x0000d4f2 add r0, pc | r0 = 0x1aae6;
0x0000d4f4 blx 0x4f74 | fcn_00004f74 ();
0x0000d4f8 str.w r0, [r8, 0x14] | __asm ("str.w r0, [r8, 0x14]");
0x0000d4fc ldr r0, [pc, 0xf4] |
0x0000d4fe ldr.w r8, [r4, 0x78] | r8 = *((r4 + 0x78));
0x0000d502 add r0, pc | r0 = 0x1aafa;
0x0000d504 blx 0x4f74 | fcn_00004f74 ();
0x0000d506 ldc p8, c15, [r6, -0x320]! | __asm ("ldc p8, c15, aav.0x000000ff!");
0x0000d508 str.w r0, [r8, 0x10] | __asm ("str.w r0, [r8, 0x10]");
0x0000d50c ldr r0, [pc, 0xe8] |
0x0000d50e ldr.w r8, [r4, 0x78] | r8 = *((r4 + 0x78));
0x0000d510 strh r0, [r7, 2] | *((r7 + 2)) = r0;
0x0000d512 add r0, pc | r0 = 0x1ab0e;
0x0000d514 blx 0x4f74 | fcn_00004f74 ();
0x0000d518 str.w r0, [r8, 0x1c] | __asm ("str.w r0, [r8, 0x1c]");
0x0000d51c ldr r0, [pc, 0xdc] |
0x0000d51e ldr.w r8, [r4, 0x78] | r8 = *((r4 + 0x78));
0x0000d522 add r0, pc | r0 = 0x1ab22;
0x0000d524 blx 0x5508 | tcsetattr ();
0x0000d528 str.w r0, [r8, 0xc] | __asm ("str.w r0, [r8, 0xc]");
0x0000d52c ldr r0, [pc, 0xd0] |
0x0000d52e ldr.w r8, [r4, 0x78] | r8 = *((r4 + 0x78));
0x0000d532 add r0, pc | r0 = 0x1ab36;
0x0000d534 blx 0x5508 | tcsetattr ();
0x0000d538 str.w r0, [r8, 8] | __asm ("str.w r0, [r8, 8]");
0x0000d53c movs r1, 0x61 | r1 = 0x61;
0x0000d53e ldr.w r8, [pc, 0xc4] |
0x0000d542 ldr r0, [pc, 0xc4] |
0x0000d544 add r8, pc | r8 = 0x1ab4e;
0x0000d546 add r0, pc | r0 = 0x1ab54;
0x0000d548 b 0xd54c |
| while (r0 != 0) {
0x0000d54a ldrb r1, [r0] | r1 = *(r0);
0x0000d54c blx 0x5014 | fcn_00005014 ();
0x0000d550 mov r1, sb | r1 = sb;
0x0000d552 blx 0x5650 | fcn_00005650 ();
0x0000d556 mov r1, r8 | r1 = r8;
0x0000d558 mov r2, r0 | r2 = r0;
0x0000d55a mov r0, r4 | r0 = r4;
0x0000d55c bl 0xc828 | fcn_0000c828 (r0, r1, r2, r3);
0x0000d560 ldr r0, [r8, 8]! | r0 = *((r8 += 8));
0x0000d564 cmp r0, 0 |
0x0000d566 bne 0xd54a |
| }
0x0000d568 ldr r1, [r4, 0x78] | r1 = *((r4 + 0x78));
0x0000d56a ldrd r2, r3, [r1, 8] | __asm ("ldrd r2, r3, [r1, 8]");
0x0000d56e cmp r3, 1 |
0x0000d570 itt le |
| if (r3 > 1) {
0x0000d572 movle r3, 0x50 | r3 = 0x50;
| }
| if (r3 > 1) {
0x0000d574 strle r3, [r1, 0xc] | *((r1 + 0xc)) = r3;
| }
0x0000d576 cmp r2, 0 |
| if (r2 > 0) {
0x0000d578 bgt.w 0xd43c | goto label_1;
| }
0x0000d57c b 0xd438 | goto label_2;
| label_9:
0x0000d57e ldr r0, [pc, 0x8c] |
0x0000d580 movs r2, 0x1e | r2 = 0x1e;
0x0000d582 movs r1, 1 | r1 = 1;
0x0000d584 add r0, pc | r0 = 0x1ab96;
0x0000d586 blx 0x5398 | fcn_00005398 ();
0x0000d588 invalid |
0x0000d58c b 0xd3f8 | goto label_3;
| label_6:
0x0000d58e ldr r0, [pc, 0x80] |
0x0000d590 add r0, pc | r0 = 0x1aba6;
0x0000d592 blx 0x4ff0 | r0 = fcn_00004ff0 ();
0x0000d596 mov r5, r0 | r5 = r0;
0x0000d598 cmp r0, 0 |
| if (r0 != 0) {
0x0000d59a bne.w 0xd3c8 | goto label_4;
| }
0x0000d59e b 0xd3ce | goto label_5;
| label_10:
0x0000d5a0 ldr r2, [pc, 0x70] |
0x0000d5a2 mov r0, r3 | r0 = r3;
0x0000d5a4 movs r1, 1 | r1 = 1;
0x0000d5a6 mov r3, r5 | r3 = r5;
0x0000d5a8 add r2, pc | r2 = 0x1abc0;
0x0000d5aa blx 0x5488 | fcn_00005488 ();
0x0000d5ae ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x0000d5b0 b 0xd3f8 | goto label_3;
| label_11:
0x0000d5b2 blx 0x5460 | fputc (r0, r1);
0x0000d5b6 nop |
0x0000d5b8 movs r0, r0 |
0x0000d5ba movs r0, r0 |
0x0000d5bc movs r0, r0 |
0x0000d5be movs r0, r0 |
0x0000d5c0 lsls r0, r2, 1 | r0 = r2 << 1;
0x0000d5c2 movs r0, r0 |
0x0000d5c4 movs r0, r0 |
0x0000d5c6 movs r0, r0 |
0x0000d5c8 ldr r0, [pc, 0x2c0] | r0 = *(0xd88c);
0x0000d5ca movs r1, r0 | r1 = r0;
0x0000d5cc lsls r0, r6, 0xd | r0 = r6 << 0xd;
0x0000d5ce movs r0, r0 |
0x0000d5d0 lsls r4, r1, 2 | r4 = r1 << 2;
0x0000d5d2 movs r1, r0 | r1 = r0;
0x0000d5d4 lsls r2, r7, 2 | r2 = r7 << 2;
0x0000d5d6 movs r1, r0 | r1 = r0;
0x0000d5d8 adcs r2, r7 | __asm ("adcs r2, r7");
0x0000d5da movs r1, r0 | r1 = r0;
0x0000d5dc 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/libedit.so.0.0.68 @ 0x7250 */
| #include <stdint.h>
|
; (fcn) sym.el_resize () | void el_resize (int16_t arg_270h, int16_t arg_390h, int16_t arg1) {
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_8ch;
| int16_t var_10ch;
| r0 = arg1;
0x00007250 blmi 0x759ac8 | __asm ("blmi aav.0x0001a9e4");
0x00007254 push {r4, r5, r6, r7, lr} |
0x00007256 sub sp, 0x114 |
0x00007258 add r2, pc | r2 += pc;
0x0000725a add r4, sp, 0x8c | r4 += var_8ch;
0x0000725c mov r5, r0 | r5 = r0;
0x0000725e mov r0, r4 | r0 = r4;
0x00007260 ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x00007262 add r6, sp, 0xc | r6 += var_ch;
0x00007264 add r7, sp, 8 | r7 += var_8h;
0x00007266 ldr r3, [r3] | r3 = *(r3);
0x00007268 str r3, [sp, 0x10c] | var_10ch = r3;
0x0000726a mov.w r3, 0 | r3 = 0;
0x0000726c lsls r0, r0, 0xc | r0 <<= 0xc;
0x0000726e blx 0x4e94 | fcn_00004e94 ();
0x00007272 movs r1, 0x1c | r1 = 0x1c;
0x00007274 mov r0, r4 | r0 = r4;
0x00007276 blx 0x52c8 | fcn_000052c8 ();
0x0000727a mov r1, r4 | r1 = r4;
0x0000727c mov r2, r6 | r2 = r6;
0x0000727e movs r0, 0 | r0 = 0;
0x00007280 add r4, sp, 4 | r4 += var_4h;
0x00007282 blx 0x543c | fprintf_chk ()
0x00007286 mov r2, r7 | r2 = r7;
0x00007288 mov r1, r4 | r1 = r4;
0x0000728a mov r0, r5 | r0 = r5;
0x0000728c bl 0xcec8 | void (*0xcec8)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x0000728e cdp2 p9, 1, c11, c12, c0, 4 | __asm ("cdp2 p9, 1, c11, c12, c0, 4");
| do {
0x00007292 movs r2, 0 | r2 = 0;
0x00007294 mov r1, r6 | r1 = r6;
0x00007296 movs r0, 2 | r0 = 2;
0x00007298 blx 0x543c | fprintf_chk ()
0x0000729c ldr r2, [pc, 0x2c] |
0x0000729e ldr r3, [pc, 0x28] | r3 = *(0x72ca);
0x000072a0 add r2, pc | r2 = 0xe570;
0x000072a2 ldr r3, [r2, r3] | r3 = *(0xe570);
0x000072a4 ldr r2, [r3] | r2 = *(0xe570);
0x000072a6 ldr r3, [sp, 0x10c] | r3 = var_10ch;
0x000072a8 eors r2, r3 | r2 ^= r3;
0x000072aa mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x000072ae bne 0x72c0 | goto label_0;
| }
0x000072b0 add sp, 0x114 |
0x000072b2 pop {r4, r5, r6, r7, pc} |
0x000072b4 ldrd r1, r2, [sp, 4] | __asm ("ldrd r1, r2, [var_8h]");
0x000072b8 mov r0, r5 | r0 = r5;
0x000072ba bl 0xcf50 | fcn_0000cf50 (r0, r1, r2);
0x000072be b 0x7292 |
| } while (1);
| label_0:
0x000072c0 blx 0x5460 | fputc (r0, r1);
0x000072c4 add r1, sp, 0x390 | r1 += arg_390h;
0x000072c6 movs r1, r0 | r1 = r0;
0x000072c8 lsls r0, r6, 0xd | r0 = r6 << 0xd;
0x000072ca movs r0, r0 |
0x000072cc add r1, sp, 0x270 | r1 += arg_270h;
0x000072ce movs r1, r0 | r1 = r0;
| }
[*] Function fprintf used 13 times libedit.so.0.0.68