[*] Binary protection state of libpaho-mqtt3c.so.1.3.9

  
  	Full RELRO     Canary found      NX enabled   DSO          No RPATH     No RUNPATH   No Symbols


[*] Function strcat tear down of libpaho-mqtt3c.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-mqtt3c.so.1.3.9 @ 0x6638 */
                                                         | #include <stdint.h>
                                                         |  
    ; (fcn) fcn.00006638 ()                              | void fcn_00006638 (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
                                                         |     r0 = arg1;
                                                         |     r1 = arg2;
                                                         |     r2 = arg3;
                                                         |     r3 = arg4;
                                                         |     if (? >= ?) {
    0x00006638 ldrbmi lr, [r0, sp, lsr 18]!              |         
                                                         |     }
    0x0000663c mov r7, r0                                |     r7 = r0;
    0x0000663e ldr.w r5, [r0, r3, lsl 3]                 |     offset_0 = r3 << 3;
                                                         |     r5 = *((r0 + offset_0));
    0x00006642 mov r8, r3                                |     r8 = r3;
    0x00006644 mov r6, r1                                |     r6 = r1;
    0x00006646 mov sb, r2                                |     sb = r2;
                                                         |     if (r5 == 0) {
    0x00006648 cbz r5, 0x66a0                            |         goto label_3;
                                                         |     }
    0x0000664a add.w sl, r0, r3, lsl 3                   |     sl = r0 + (r3 << 3);
    0x0000664e b 0x6656                                  |     
                                                         |     while (r0 != 0) {
    0x00006650 ldr r3, [r3, 4]                           |         r3 = *((r3 + 4));
                                                         |         if (r3 == 0) {
    0x00006652 cbz r3, 0x66a2                            |             goto label_4;
                                                         |         }
    0x00006654 mov r5, r3                                |         r5 = r3;
    0x00006656 ldr.w r4, [sl, 4]                         |         r4 = *((sl + 4));
    0x0000665a movs r2, 1                                |         r2 = 1;
    0x0000665c ldr r0, [r5, 0xc]                         |         r0 = *((r5 + 0xc));
    0x0000665e mov r1, r6                                |         r1 = r6;
    0x00006660 blx r4                                    |         r0 = uint32_t (*r4)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
    0x00006662 cmp r0, 0                                 |         
    0x00006664 ite gt                                    |         
                                                         |         if (r0 <= 0) {
    0x00006666 movgt ip, 1                               |             
                                                         |         }
                                                         |         if (r0 <= 0) {
    0x0000666a mov.w ip, 0                               |             
                                                         |         }
    0x0000666e add.w r3, r5, ip, lsl 2                   |         r3 = r5 + (ip << 2);
    0x00006672 mov r4, ip                                |         r4 = ip;
    0x00006674 bne 0x6650                                |         
                                                         |     }
    0x00006676 ldrb r3, [r7, 0x1c]                       |     r3 = *((r7 + 0x1c));
    0x00006678 lsls r2, r3, 0x1e                         |     r2 = r3 << 0x1e;
                                                         |     if (r2 < r3) {
    0x0000667a bmi 0x66f8                                |         goto label_5;
                                                         |     }
    0x0000667c mov r1, r5                                |     r1 = r5;
    0x0000667e cmp.w r8, 0                               |     
                                                         |     if (r8 != 0) {
    0x00006682 bne 0x668e                                |         goto label_0;
                                                         |     }
    0x00006684 ldr r3, [r7, 0x18]                        |     r3 = *((r7 + 0x18));
    0x00006686 ldr r2, [r5, 0x10]                        |     r2 = *((r5 + 0x10));
    0x00006688 add r3, sb                                |     r3 += sb;
    0x0000668a subs r3, r3, r2                           |     r3 -= r2;
    0x0000668c str r3, [r7, 0x18]                        |     *((r7 + 0x18)) = r3;
                                                         |     do {
                                                         | label_0:
    0x0000668e mov r0, r7                                |         r0 = r7;
    0x00006690 mov r2, r8                                |         r2 = r8;
    0x00006692 strd r6, sb, [r1, 0xc]                    |         __asm ("strd r6, sb, [r1, 0xc]");
    0x00006696 bl 0x65f4                                 |         fcn_000065f4 (r0, r1, r2);
    0x0000669a mov r0, r6                                |         r0 = r6;
    0x0000669c pop.w {r4, r5, r6, r7, r8, sb, sl, pc}    |         
                                                         | label_3:
    0x000066a0 mov r4, r5                                |         r4 = r5;
                                                         | label_4:
    0x000066a2 ldrb r3, [r7, 0x1c]                       |         r3 = *((r7 + 0x1c));
    0x000066a4 lsls r3, r3, 0x1f                         |         r3 <<= 0x1f;
                                                         |         if (r3 >= r3) {
    0x000066a6 bpl 0x66ee                                |             goto label_6;
                                                         |         }
    0x000066a8 ldr r0, [pc, 0x58]                        |         
    0x000066aa movs r1, 0xf8                             |         r1 = 0xf8;
    0x000066ac movs r2, 0x18                             |         r2 = 0x18;
    0x000066ae add r0, pc                                |         r0 = 0xcdb6;
    0x000066b0 bl 0xf14c                                 |         r0 = fcn_0000f14c (r0, r1, r2);
    0x000066b4 mov r1, r0                                |         r1 = r0;
                                                         |         if (r1 == 0) {
                                                         | label_1:
    0x000066b6 cbz r1, 0x66f8                            |             goto label_5;
                                                         |         }
    0x000066b8 movs r3, 0                                |         r3 = 0;
    0x000066ba str r3, [r1]                              |         *(r1) = r3;
    0x000066bc str r3, [r1, 4]                           |         *((r1 + 4)) = r3;
    0x000066be str r3, [r1, 8]                           |         *((r1 + 8)) = r3;
    0x000066c0 str r3, [r1, 0xc]                         |         *((r1 + 0xc)) = r3;
    0x000066c2 str r3, [r1, 0x10]                        |         *((r1 + 0x10)) = r3;
    0x000066c4 str r3, [r1, 0x14]                        |         *((r1 + 0x14)) = r3;
                                                         |         if (r5 == 0) {
    0x000066c6 cbz r5, 0x66fe                            |             goto label_7;
                                                         |         }
    0x000066c8 add.w ip, r5, r4, lsl 2                   |         
    0x000066cc str.w r1, [ip, 4]                         |         __asm ("str.w r1, [ip, 4]");
                                                         | label_2:
    0x000066d0 ldrb r3, [r1, 0x14]                       |         r3 = *((r1 + 0x14));
    0x000066d2 str r5, [r1]                              |         *(r1) = r5;
    0x000066d4 orr r3, r3, 1                             |         r3 |= 1;
    0x000066d8 strb r3, [r1, 0x14]                       |         *((r1 + 0x14)) = r3;
    0x000066da cmp.w r8, 0                               |         
    0x000066de bne 0x668e                                |         
                                                         |     } while (r8 != 0);
    0x000066e0 ldr r3, [r7, 0x14]                        |     r3 = *((r7 + 0x14));
    0x000066e2 adds r3, 1                                |     r3++;
    0x000066e4 str r3, [r7, 0x14]                        |     *((r7 + 0x14)) = r3;
    0x000066e6 ldr r3, [r7, 0x18]                        |     r3 = *((r7 + 0x18));
    0x000066e8 add r3, sb                                |     r3 += sb;
    0x000066ea str r3, [r7, 0x18]                        |     *((r7 + 0x18)) = r3;
    0x000066ec b 0x668e                                  |     goto label_0;
                                                         | label_6:
    0x000066ee movs r0, 0x18                             |     r0 = 0x18;
    0x000066f0 blx 0x24bc                                |     r0 = strftime (r0, r1, r2, r3);
    0x000066f4 mov r1, r0                                |     r1 = r0;
    0x000066f6 b 0x66b6                                  |     goto label_1;
                                                         | label_5:
    0x000066f8 movs r0, 0                                |     r0 = 0;
    0x000066fa pop.w {r4, r5, r6, r7, r8, sb, sl, pc}    |     
                                                         | label_7:
    0x000066fe str.w r1, [r7, r8, lsl 3]                 |     __asm ("str.w r1, [r7, r8, lsl 3]");
    0x00006702 b 0x66d0                                  |     goto label_2;
                                                         | }

[*] Function strcat used 1 times libpaho-mqtt3c.so.1.3.9