[*] Binary protection state of libpaho-mqtt3as.so.1.3.9
Partial RELRO No Canary found NX disabled DSO No RPATH No RUNPATH No Symbols
[*] Function mmap tear down of libpaho-mqtt3as.so.1.3.9
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/lib/libpaho-mqtt3as.so.1.3.9 @ 0x3cb8 */
| #include <stdint.h>
|
; (fcn) entry.fini0 () | void entry_fini0 () {
0x00003cb8 ldr r3, [pc, 0x68] | r3 = *(0x3d24);
0x00003cbc push {r4, lr} |
0x00003cc0 ldr r4, [pc, 0x64] | r4 = *(0x3d28);
0x00003cc4 add r3, pc, r3 | r3 = pc + r3;
0x00003cc8 ldrb r3, [r3] | r3 = *(r3);
0x00003ccc add r4, pc, r4 | r4 = pc + r4;
0x00003cd0 cmp r3, 0 |
0x00003cd4 popne {r4, pc} |
0x00003cd8 ldr r3, [pc, 0x50] | r3 = *(0x3d2c);
0x00003cdc ldr r3, [r4, r3] | r3 = *(0x3d28);
0x00003ce0 cmp r3, 0 |
| if (r3 != 0) {
0x00003ce4 beq 0x3cf4 |
0x00003ce8 ldr r3, [pc, 0x44] | r3 = *(0x3d30);
0x00003cec ldr r0, [pc, r3] | r0 = *(0x00003cf4);
0x00003cf0 bl 0x3560 | cxa_finalize ();
| }
0x00003cf4 bl 0x3bfc | entry0 ();
0x00003cf8 ldr r3, [pc, 0x38] | r3 = *(0x3d34);
0x00003cfc ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x00003d00 cmp r3, 0 |
| if (r3 != 0) {
0x00003d04 beq 0x3d14 |
0x00003d08 ldr r0, [pc, 0x2c] | r0 = *(0x3d38);
0x00003d0c add r0, pc, r0 | r0 = pc + r0;
0x00003d10 bl 0x3be4 | loc_imp_deregister_frame_info ();
| }
0x00003d14 ldr r3, [pc, 0x24] | r3 = "onnect_state___d";
0x00003d18 mov r2, 1 | r2 = 1;
0x00003d1c add r3, pc, r3 | r3 = pc + r3;
0x00003d20 strb r2, [r3] | *(r3) = r2;
0x00003d24 pop {r4, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/lib/libpaho-mqtt3as.so.1.3.9 @ 0x13854 */
| #include <stdint.h>
|
; (fcn) fcn.00013854 () | void fcn_00013854 (int32_t arg_4h, int32_t arg1, int32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x00013854 push {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00013858 ldr r4, [r0, r3, lsl 3] | offset_0 = r3 << 3;
| r4 = *((r0 + offset_0));
0x0001385c mov r6, 0 | r6 = 0;
0x00013860 mov r5, r0 | r5 = r0;
0x00013864 mov r8, r1 | r8 = r1;
0x00013868 mov sb, r2 | sb = r2;
0x0001386c mov r7, r3 | r7 = r3;
0x00013870 add fp, r0, r3, lsl 3 |
0x00013874 mov sl, r6 | sl = r6;
| do {
0x00013878 cmp r4, 0 |
| if (r4 == 0) {
0x0001387c bne 0x13898 |
0x00013880 ldrb r3, [r5, 0x1c] | r3 = *((r5 + 0x1c));
0x00013884 tst r3, 1 |
| if ((r3 & 1) != 0) {
0x00013888 bne 0x138cc | goto label_1;
| }
0x0001388c mov r0, 0x18 | r0 = 0x18;
0x00013890 bl 0x3584 | malloc (r0);
0x00013894 b 0x138e0 | goto label_2;
| }
0x00013898 ldr r3, [fp, 4] | r3 = *(arg_4h);
0x0001389c mov r2, 1 | r2 = 1;
0x000138a0 mov r1, r8 | r1 = r8;
0x000138a4 ldr r0, [r4, 0xc] | r0 = *((r4 + 0xc));
0x000138a8 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x000138ac cmp r0, 0 |
| if (r0 <= 0) {
0x000138b0 movgt r6, 1 | r6 = 1;
| }
| if (r0 > 0) {
0x000138b4 movle r6, 0 | r6 = 0;
| }
| if (r0 == 0) {
0x000138b8 beq 0x13944 | goto label_3;
| }
0x000138bc add r3, r4, r6, lsl 2 | r3 = r4 + (r6 << 2);
0x000138c0 mov sl, r4 | sl = r4;
0x000138c4 ldr r4, [r3, 4] | r4 = *((r3 + 4));
0x000138c8 b 0x13878 |
| } while (1);
| label_1:
0x000138cc ldr r0, [pc, 0xb4] | r0 = *(0x13984);
0x000138d0 mov r2, 0x18 | r2 = 0x18;
0x000138d4 mov r1, 0xf8 | r1 = 0xf8;
0x000138d8 add r0, pc, r0 | r0 = pc + r0;
0x000138dc bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
| label_2:
0x000138e0 cmp r0, 0 |
0x000138e4 mov r4, r0 | r4 = r0;
0x000138e8 bne 0x138f8 |
| while ((r3 & 2) != 0) {
0x000138ec mov r8, 0 | r8 = 0;
| label_0:
0x000138f0 mov r0, r8 | r0 = r8;
0x000138f4 pop {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x000138f8 mov r2, 0x18 | r2 = 0x18;
0x000138fc mov r1, 0 | r1 = 0;
0x00013900 bl 0x38a8 | memset (r0, r1, r2);
0x00013904 cmp sl, 0 |
| if (sl == 0) {
0x00013908 addne r6, sl, r6, lsl 2 | r6 = sl + (r6 << 2);
| }
| if (sl == 0) {
0x0001390c strne r4, [r6, 4] | *((r6 + 4)) = r4;
| }
0x00013910 ldrb r3, [r4, 0x14] | r3 = *((r4 + 0x14));
| if (sl != 0) {
0x00013914 streq r4, [r5, r7, lsl 3] | offset_1 = r7 << 3;
| *((r5 + offset_1)) = r4;
| }
0x00013918 orr r3, r3, 1 | r3 |= 1;
0x0001391c cmp r7, 0 |
0x00013920 str sl, [r4] | *(r4) = sl;
0x00013924 strb r3, [r4, 0x14] | *((r4 + 0x14)) = r3;
| if (r7 != 0) {
0x00013928 bne 0x1396c | goto label_4;
| }
0x0001392c ldr r3, [r5, 0x14] | r3 = *((r5 + 0x14));
0x00013930 add r3, r3, 1 | r3++;
0x00013934 str r3, [r5, 0x14] | *((r5 + 0x14)) = r3;
0x00013938 ldr r3, [r5, 0x18] | r3 = *((r5 + 0x18));
0x0001393c add r3, r3, sb | r3 += sb;
0x00013940 b 0x13968 | goto label_5;
| label_3:
0x00013944 ldrb r3, [r5, 0x1c] | r3 = *((r5 + 0x1c));
0x00013948 tst r3, 2 |
0x0001394c bne 0x138ec |
| }
0x00013950 cmp r7, 0 |
| if (r7 == 0) {
0x00013954 bne 0x1396c |
0x00013958 ldr r3, [r5, 0x18] | r3 = *((r5 + 0x18));
0x0001395c ldr r2, [r4, 0x10] | r2 = *((r4 + 0x10));
0x00013960 add r3, sb, r3 | r3 = sb + r3;
0x00013964 sub r3, r3, r2 | r3 -= r2;
| label_5:
0x00013968 str r3, [r5, 0x18] | *((r5 + 0x18)) = r3;
| }
| label_4:
0x0001396c str r8, [r4, 0xc] | *((r4 + 0xc)) = r8;
0x00013970 str sb, [r4, 0x10] | *((r4 + 0x10)) = sb;
0x00013974 mov r2, r7 | r2 = r7;
0x00013978 mov r1, r4 | r1 = r4;
0x0001397c mov r0, r5 | r0 = r5;
0x00013980 bl 0x137e8 | fcn_000137e8 (r0, r1);
0x00013984 b 0x138f0 | goto label_0;
| }
[*] Function mmap used 1 times libpaho-mqtt3as.so.1.3.9