[*] Binary protection state of libpaho-mqtt3a.so.1.3.9
Full RELRO Canary found NX enabled DSO No RPATH No RUNPATH No Symbols
[*] Function mmap tear down of libpaho-mqtt3a.so.1.3.9
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/libpaho-mqtt3a.so.1.3.9 @ 0x6618 */
| #include <stdint.h>
|
; (fcn) fcn.00006618 () | void fcn_00006618 (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
| if (? >= ?) {
0x00006618 ldrbmi lr, [r0, sp, lsr 18]! |
| }
0x0000661c mov r7, r0 | r7 = r0;
0x0000661e ldr.w r5, [r0, r3, lsl 3] | offset_0 = r3 << 3;
| r5 = *((r0 + offset_0));
0x00006622 mov r8, r3 | r8 = r3;
0x00006624 mov r6, r1 | r6 = r1;
0x00006626 mov sb, r2 | sb = r2;
| if (r5 == 0) {
0x00006628 cbz r5, 0x6680 | goto label_3;
| }
0x0000662a add.w sl, r0, r3, lsl 3 | sl = r0 + (r3 << 3);
0x0000662e b 0x6636 |
| while (r0 != 0) {
0x00006630 ldr r3, [r3, 4] | r3 = *((r3 + 4));
| if (r3 == 0) {
0x00006632 cbz r3, 0x6682 | goto label_4;
| }
0x00006634 mov r5, r3 | r5 = r3;
0x00006636 ldr.w r4, [sl, 4] | r4 = *((sl + 4));
0x0000663a movs r2, 1 | r2 = 1;
0x0000663c ldr r0, [r5, 0xc] | r0 = *((r5 + 0xc));
0x0000663e mov r1, r6 | r1 = r6;
0x00006640 blx r4 | r0 = uint32_t (*r4)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x00006642 cmp r0, 0 |
0x00006644 ite gt |
| if (r0 <= 0) {
0x00006646 movgt ip, 1 |
| }
| if (r0 <= 0) {
0x0000664a mov.w ip, 0 |
| }
0x0000664e add.w r3, r5, ip, lsl 2 | r3 = r5 + (ip << 2);
0x00006652 mov r4, ip | r4 = ip;
0x00006654 bne 0x6630 |
| }
0x00006656 ldrb r3, [r7, 0x1c] | r3 = *((r7 + 0x1c));
0x00006658 lsls r2, r3, 0x1e | r2 = r3 << 0x1e;
| if (r2 < r3) {
0x0000665a bmi 0x66d8 | goto label_5;
| }
0x0000665c mov r1, r5 | r1 = r5;
0x0000665e cmp.w r8, 0 |
| if (r8 != 0) {
0x00006662 bne 0x666e | goto label_0;
| }
0x00006664 ldr r3, [r7, 0x18] | r3 = *((r7 + 0x18));
0x00006666 ldr r2, [r5, 0x10] | r2 = *((r5 + 0x10));
0x00006668 add r3, sb | r3 += sb;
0x0000666a subs r3, r3, r2 | r3 -= r2;
0x0000666c str r3, [r7, 0x18] | *((r7 + 0x18)) = r3;
| do {
| label_0:
0x0000666e mov r0, r7 | r0 = r7;
0x00006670 mov r2, r8 | r2 = r8;
0x00006672 strd r6, sb, [r1, 0xc] | __asm ("strd r6, sb, [r1, 0xc]");
0x00006674 ldr r3, [r0, 0x10] | r3 = *((r0 + 0x10));
0x00006676 bl 0x65d4 | fcn_000065d4 (r0, r1, r2);
0x0000667a mov r0, r6 | r0 = r6;
0x0000667c pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_3:
0x00006680 mov r4, r5 | r4 = r5;
| label_4:
0x00006682 ldrb r3, [r7, 0x1c] | r3 = *((r7 + 0x1c));
0x00006684 lsls r3, r3, 0x1f | r3 <<= 0x1f;
| if (r3 >= r3) {
0x00006686 bpl 0x66ce | goto label_6;
| }
0x00006688 ldr r0, [pc, 0x58] |
0x0000668a movs r1, 0xf8 | r1 = 0xf8;
0x0000668c movs r2, 0x18 | r2 = 0x18;
0x0000668e add r0, pc | r0 = 0xcd76;
0x00006690 bl 0xf12c | r0 = fcn_0000f12c (r0, r1, r2);
0x00006694 mov r1, r0 | r1 = r0;
| if (r1 == 0) {
| label_1:
0x00006696 cbz r1, 0x66d8 | goto label_5;
| }
0x00006698 movs r3, 0 | r3 = 0;
0x0000669a str r3, [r1] | *(r1) = r3;
0x0000669c str r3, [r1, 4] | *((r1 + 4)) = r3;
0x0000669e str r3, [r1, 8] | *((r1 + 8)) = r3;
0x000066a0 str r3, [r1, 0xc] | *((r1 + 0xc)) = r3;
0x000066a2 str r3, [r1, 0x10] | *((r1 + 0x10)) = r3;
0x000066a4 str r3, [r1, 0x14] | *((r1 + 0x14)) = r3;
| if (r5 == 0) {
0x000066a6 cbz r5, 0x66de | goto label_7;
| }
0x000066a8 add.w ip, r5, r4, lsl 2 |
0x000066ac str.w r1, [ip, 4] | __asm ("str.w r1, [ip, 4]");
| label_2:
0x000066b0 ldrb r3, [r1, 0x14] | r3 = *((r1 + 0x14));
0x000066b2 str r5, [r1] | *(r1) = r5;
0x000066b4 orr r3, r3, 1 | r3 |= 1;
0x000066b8 strb r3, [r1, 0x14] | *((r1 + 0x14)) = r3;
0x000066ba cmp.w r8, 0 |
0x000066be bne 0x666e |
| } while (r8 != 0);
0x000066c0 ldr r3, [r7, 0x14] | r3 = *((r7 + 0x14));
0x000066c2 adds r3, 1 | r3++;
0x000066c4 str r3, [r7, 0x14] | *((r7 + 0x14)) = r3;
0x000066c6 ldr r3, [r7, 0x18] | r3 = *((r7 + 0x18));
0x000066c8 add r3, sb | r3 += sb;
0x000066ca str r3, [r7, 0x18] | *((r7 + 0x18)) = r3;
0x000066cc b 0x666e | goto label_0;
| label_6:
0x000066ce movs r0, 0x18 | r0 = 0x18;
0x000066d0 blx 0x2484 | r0 = strftime (r0, r1, r2, r3);
0x000066d4 mov r1, r0 | r1 = r0;
0x000066d6 b 0x6696 | goto label_1;
| label_5:
0x000066d8 movs r0, 0 | r0 = 0;
0x000066da pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_7:
0x000066de str.w r1, [r7, r8, lsl 3] | __asm ("str.w r1, [r7, r8, lsl 3]");
0x000066e2 b 0x66b0 | goto label_2;
| }
[*] Function mmap used 1 times libpaho-mqtt3a.so.1.3.9