[*] Binary protection state of libpaho-mqtt3a.so.1.3.9
Partial RELRO No Canary found NX disabled 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/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/lib/libpaho-mqtt3a.so.1.3.9 @ 0x2978 */
| #include <stdint.h>
|
; (fcn) entry.fini0 () | void entry_fini0 () {
0x00002978 ldr r3, [pc, 0x68] | r3 = *(0x29e4);
0x0000297c push {r4, lr} |
0x00002980 ldr r4, [pc, 0x64] | r4 = *(0x29e8);
0x00002984 add r3, pc, r3 | r3 = pc + r3;
0x00002988 ldrb r3, [r3] | r3 = *(r3);
0x0000298c add r4, pc, r4 | r4 = pc + r4;
0x00002990 cmp r3, 0 |
0x00002994 popne {r4, pc} |
0x00002998 ldr r3, [pc, 0x50] | r3 = *(0x29ec);
0x0000299c ldr r3, [r4, r3] | r3 = *(0x29e8);
0x000029a0 cmp r3, 0 |
| if (r3 != 0) {
0x000029a4 beq 0x29b4 |
0x000029a8 ldr r3, [pc, 0x44] | r3 = *(0x29f0);
0x000029ac ldr r0, [pc, r3] | r0 = *(0x000029b4);
0x000029b0 bl 0x2478 | cxa_finalize ();
| }
0x000029b4 bl 0x28bc | entry0 ();
0x000029b8 ldr r3, [pc, 0x38] | r3 = *(0x29f4);
0x000029bc ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x000029c0 cmp r3, 0 |
| if (r3 != 0) {
0x000029c4 beq 0x29d4 |
0x000029c8 ldr r0, [pc, 0x2c] | r0 = *(0x29f8);
0x000029cc add r0, pc, r0 | r0 = pc + r0;
0x000029d0 bl 0x258c | loc_imp_deregister_frame_info ();
| }
0x000029d4 ldr r3, [pc, 0x24] | r3 = "src_MQTTProtocolClient.c";
0x000029d8 mov r2, 1 | r2 = 1;
0x000029dc add r3, pc, r3 | r3 = pc + r3;
0x000029e0 strb r2, [r3] | *(r3) = r2;
0x000029e4 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-mqtt3a.so.1.3.9 @ 0x100dc */
| #include <stdint.h>
|
; (fcn) fcn.000100dc () | void fcn_000100dc (int32_t arg_4h, int32_t arg1, int32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x000100dc push {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000100e0 ldr r4, [r0, r3, lsl 3] | offset_0 = r3 << 3;
| r4 = *((r0 + offset_0));
0x000100e4 mov r6, 0 | r6 = 0;
0x000100e8 mov r5, r0 | r5 = r0;
0x000100ec mov r8, r1 | r8 = r1;
0x000100f0 mov sb, r2 | sb = r2;
0x000100f4 mov r7, r3 | r7 = r3;
0x000100f8 add fp, r0, r3, lsl 3 |
0x000100fc mov sl, r6 | sl = r6;
| do {
0x00010100 cmp r4, 0 |
| if (r4 == 0) {
0x00010104 bne 0x10120 |
0x00010108 ldrb r3, [r5, 0x1c] | r3 = *((r5 + 0x1c));
0x0001010c tst r3, 1 |
| if ((r3 & 1) != 0) {
0x00010110 bne 0x10154 | goto label_1;
| }
0x00010114 mov r0, 0x18 | r0 = 0x18;
0x00010118 bl 0x249c | malloc (r0);
0x0001011c b 0x10168 | goto label_2;
| }
0x00010120 ldr r3, [fp, 4] | r3 = *(arg_4h);
0x00010124 mov r2, 1 | r2 = 1;
0x00010128 mov r1, r8 | r1 = r8;
0x0001012c ldr r0, [r4, 0xc] | r0 = *((r4 + 0xc));
0x00010130 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00010134 cmp r0, 0 |
| if (r0 <= 0) {
0x00010138 movgt r6, 1 | r6 = 1;
| }
| if (r0 > 0) {
0x0001013c movle r6, 0 | r6 = 0;
| }
| if (r0 == 0) {
0x00010140 beq 0x101cc | goto label_3;
| }
0x00010144 add r3, r4, r6, lsl 2 | r3 = r4 + (r6 << 2);
0x00010148 mov sl, r4 | sl = r4;
0x0001014c ldr r4, [r3, 4] | r4 = *((r3 + 4));
0x00010150 b 0x10100 |
| } while (1);
| label_1:
0x00010154 ldr r0, [pc, 0xb4] | r0 = *(0x1020c);
0x00010158 mov r2, 0x18 | r2 = 0x18;
0x0001015c mov r1, 0xf8 | r1 = 0xf8;
0x00010160 add r0, pc, r0 | r0 = pc + r0;
0x00010164 bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
| label_2:
0x00010168 cmp r0, 0 |
0x0001016c mov r4, r0 | r4 = r0;
0x00010170 bne 0x10180 |
| while ((r3 & 2) != 0) {
0x00010174 mov r8, 0 | r8 = 0;
| label_0:
0x00010178 mov r0, r8 | r0 = r8;
0x0001017c pop {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x00010180 mov r2, 0x18 | r2 = 0x18;
0x00010184 mov r1, 0 | r1 = 0;
0x00010188 bl 0x2688 | memset (r0, r1, r2);
0x0001018c cmp sl, 0 |
| if (sl == 0) {
0x00010190 addne r6, sl, r6, lsl 2 | r6 = sl + (r6 << 2);
| }
| if (sl == 0) {
0x00010194 strne r4, [r6, 4] | *((r6 + 4)) = r4;
| }
0x00010198 ldrb r3, [r4, 0x14] | r3 = *((r4 + 0x14));
| if (sl != 0) {
0x0001019c streq r4, [r5, r7, lsl 3] | offset_1 = r7 << 3;
| *((r5 + offset_1)) = r4;
| }
0x000101a0 orr r3, r3, 1 | r3 |= 1;
0x000101a4 cmp r7, 0 |
0x000101a8 str sl, [r4] | *(r4) = sl;
0x000101ac strb r3, [r4, 0x14] | *((r4 + 0x14)) = r3;
| if (r7 != 0) {
0x000101b0 bne 0x101f4 | goto label_4;
| }
0x000101b4 ldr r3, [r5, 0x14] | r3 = *((r5 + 0x14));
0x000101b8 add r3, r3, 1 | r3++;
0x000101bc str r3, [r5, 0x14] | *((r5 + 0x14)) = r3;
0x000101c0 ldr r3, [r5, 0x18] | r3 = *((r5 + 0x18));
0x000101c4 add r3, r3, sb | r3 += sb;
0x000101c8 b 0x101f0 | goto label_5;
| label_3:
0x000101cc ldrb r3, [r5, 0x1c] | r3 = *((r5 + 0x1c));
0x000101d0 tst r3, 2 |
0x000101d4 bne 0x10174 |
| }
0x000101d8 cmp r7, 0 |
| if (r7 == 0) {
0x000101dc bne 0x101f4 |
0x000101e0 ldr r3, [r5, 0x18] | r3 = *((r5 + 0x18));
0x000101e4 ldr r2, [r4, 0x10] | r2 = *((r4 + 0x10));
0x000101e8 add r3, sb, r3 | r3 = sb + r3;
0x000101ec sub r3, r3, r2 | r3 -= r2;
| label_5:
0x000101f0 str r3, [r5, 0x18] | *((r5 + 0x18)) = r3;
| }
| label_4:
0x000101f4 str r8, [r4, 0xc] | *((r4 + 0xc)) = r8;
0x000101f8 str sb, [r4, 0x10] | *((r4 + 0x10)) = sb;
0x000101fc mov r2, r7 | r2 = r7;
0x00010200 mov r1, r4 | r1 = r4;
0x00010204 mov r0, r5 | r0 = r5;
0x00010208 bl 0x10070 | fcn_00010070 (r0, r1);
0x0001020c b 0x10178 | goto label_0;
| }
[*] Function mmap used 1 times libpaho-mqtt3a.so.1.3.9