[*] Binary protection state of libcjson.so.1.7.7

  
  	Partial RELRO  No Canary found   NX disabled  DSO          No RPATH     No RUNPATH   Symbols


[*] Function mmap tear down of libcjson.so.1.7.7

    ; 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/libcjson.so.1.7.7 @ 0x1724 */
                                     | #include <stdint.h>
                                     |  
    ; (fcn) entry.fini0 ()           | void entry_fini0 () {
    0x00001724 ldr r3, [pc, 0x68]    |     r3 = *(0x1790);
    0x00001728 push {r4, lr}         |     
    0x0000172c ldr r4, [pc, 0x64]    |     r4 = $d;
    0x00001730 add r3, pc, r3        |     r3 = pc + r3;
    0x00001734 ldrb r3, [r3]         |     r3 = *(r3);
    0x00001738 add r4, pc, r4        |     r4 = pc + r4;
    0x0000173c cmp r3, 0             |     
    0x00001740 popne {r4, pc}        |     
    0x00001744 ldr r3, [pc, 0x50]    |     r3 = *(0x1798);
    0x00001748 ldr r3, [r4, r3]      |     r3 = $d;
    0x0000174c cmp r3, 0             |     
                                     |     if (r3 != 0) {
    0x00001750 beq 0x1760            |         
    0x00001754 ldr r3, [pc, 0x44]    |         r3 = *(0x179c);
    0x00001758 ldr r0, [pc, r3]      |         r0 = *(0x00001760);
    0x0000175c bl 0x1518             |         cxa_finalize ();
                                     |     }
    0x00001760 bl 0x1668             |     entry0 ();
    0x00001764 ldr r3, [pc, 0x38]    |     r3 = *(0x17a0);
    0x00001768 ldr r3, [r4, r3]      |     r3 = *((r4 + r3));
    0x0000176c cmp r3, 0             |     
                                     |     if (r3 != 0) {
    0x00001770 beq 0x1780            |         
    0x00001774 ldr r0, [pc, 0x2c]    |         r0 = *(0x17a4);
    0x00001778 add r0, pc, r0        |         r0 = pc + r0;
    0x0000177c bl 0x156c             |         loc_imp_deregister_frame_info ();
                                     |     }
    0x00001780 ldr r3, [pc, 0x24]    |     r3 = *(0x17a8);
    0x00001784 mov r2, 1             |     r2 = 1;
    0x00001788 add r3, pc, r3        |     r3 = pc + r3;
    0x0000178c strb r2, [r3]         |     *(r3) = r2;
    0x00001790 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/libcjson.so.1.7.7 @ 0x3e20 */
                                                 | #include <stdint.h>
                                                 |  
    ; (fcn) sym.cJSON_Compare ()                 | uint32_t cJSON_Compare (uint32_t arg1, uint32_t arg2) {
                                                 |     r0 = arg1;
                                                 |     r1 = arg2;
    0x00003e20 cmp r1, 0                         |     
    0x00003e24 cmpne r0, 0                       |     __asm ("cmpne r0, 0");
                                                 |     if (r1 != 0) {
    0x00003e28 bne 0x3e3c                        |         goto label_7;
                                                 |     }
    0x00003e2c mov r0, 0                         |     r0 = 0;
    0x00003e30 bx lr                             |     return r0;
                                                 |     do {
                                                 | label_0:
    0x00003e34 mov r0, 0                         |         r0 = 0;
    0x00003e38 pop {r4, r5, r6, r7, r8, pc}      |         
                                                 | label_7:
    0x00003e3c ldr r3, [r0, 0xc]                 |         r3 = *((r0 + 0xc));
    0x00003e40 ldr ip, [r1, 0xc]                 |         ip = *((r1 + 0xc));
    0x00003e44 push {r4, r5, r6, r7, r8, lr}     |         
    0x00003e48 eor r3, r3, ip                    |         r3 ^= ip;
    0x00003e4c tst r3, 0xff                      |         
    0x00003e50 mov r4, r0                        |         r4 = r0;
    0x00003e54 bne 0x3e34                        |         
                                                 |     } while ((r3 & 0xff) != 0);
    0x00003e58 mov r5, r1                        |     r5 = r1;
    0x00003e5c mov r6, r2                        |     r6 = r2;
    0x00003e60 bl 0x1560                         |     r0 = fcn_00001560 ();
    0x00003e64 cmp r0, 0                         |     
                                                 |     if (r0 != 0) {
    0x00003e68 bne 0x3e34                        |         goto label_0;
                                                 |     }
    0x00003e6c ldrb r3, [r4, 0xc]                |     r3 = *((r4 + 0xc));
    0x00003e70 cmp r3, 8                         |     
                                                 |     if (r3 == 8) {
    0x00003e74 beq 0x3e94                        |         goto label_1;
                                                 |     }
                                                 |     if (r3 > 8) {
    0x00003e78 bgt 0x3ea4                        |         goto label_8;
                                                 |     }
    0x00003e7c cmp r3, 1                         |     
                                                 |     if (r3 >= 1) {
    0x00003e80 poplt {r4, r5, r6, r7, r8, pc}    |         
                                                 |     }
    0x00003e84 cmp r3, 2                         |     
                                                 |     if (r3 <= 2) {
    0x00003e88 ble 0x3e94                        |         goto label_1;
                                                 |     }
    0x00003e8c cmp r3, 4                         |     
    0x00003e90 popne {r4, r5, r6, r7, r8, pc}    |     
                                                 |     do {
                                                 | label_1:
    0x00003e94 cmp r4, r5                        |         
                                                 |         if (r4 != r5) {
    0x00003e98 bne 0x3ed0                        |             goto label_9;
                                                 |         }
                                                 | label_2:
    0x00003e9c mov r0, 1                         |         r0 = 1;
    0x00003ea0 pop {r4, r5, r6, r7, r8, pc}      |         
                                                 | label_8:
    0x00003ea4 cmp r3, 0x20                      |         
    0x00003ea8 beq 0x3e94                        |         
                                                 |     } while (r3 == 0x20);
                                                 |     if (r3 <= 0x20) {
    0x00003eac bgt 0x3ebc                        |         
    0x00003eb0 cmp r3, 0x10                      |         
    0x00003eb4 popne {r4, r5, r6, r7, r8, pc}    |         
    0x00003eb8 b 0x3e94                          |         goto label_1;
                                                 |     }
    0x00003ebc cmp r3, 0x40                      |     
                                                 |     if (r3 == 0x40) {
    0x00003ec0 beq 0x3e94                        |         goto label_1;
                                                 |     }
    0x00003ec4 cmp r3, 0x80                      |     
    0x00003ec8 popne {r4, r5, r6, r7, r8, pc}    |     
    0x00003ecc b 0x3e94                          |     goto label_1;
                                                 | label_9:
    0x00003ed0 cmp r3, 8                         |     
                                                 |     if (r3 == 8) {
    0x00003ed4 beq 0x3f4c                        |         goto label_10;
                                                 |     }
                                                 |     if (r3 > 8) {
    0x00003ed8 bgt 0x3ef8                        |         goto label_11;
                                                 |     }
    0x00003edc cmp r3, 1                         |     
                                                 |     if (r3 >= 1) {
    0x00003ee0 poplt {r4, r5, r6, r7, r8, pc}    |         
                                                 |     }
    0x00003ee4 cmp r3, 2                         |     
                                                 |     if (r3 <= 2) {
    0x00003ee8 ble 0x3e9c                        |         goto label_2;
                                                 |     }
    0x00003eec cmp r3, 4                         |     
                                                 |     if (r3 == 4) {
    0x00003ef0 beq 0x3e9c                        |         goto label_2;
                                                 |     }
    0x00003ef4 pop {r4, r5, r6, r7, r8, pc}      |     
                                                 | label_11:
    0x00003ef8 cmp r3, 0x20                      |     
                                                 |     if (r3 == 0x20) {
    0x00003efc beq 0x3f64                        |         goto label_12;
                                                 |     }
                                                 |     if (r3 > 0x20) {
    0x00003f00 bgt 0x3f34                        |         goto label_13;
                                                 |     }
    0x00003f04 cmp r3, 0x10                      |     
    0x00003f08 popne {r4, r5, r6, r7, r8, pc}    |     
                                                 | label_3:
    0x00003f0c ldr r0, [r4, 0x10]                |     r0 = *((r4 + 0x10));
    0x00003f10 cmp r0, 0                         |     
                                                 |     if (r0 == 0) {
    0x00003f14 beq 0x3e34                        |         goto label_0;
                                                 |     }
    0x00003f18 ldr r1, [r5, 0x10]                |     r1 = *((r5 + 0x10));
    0x00003f1c cmp r1, 0                         |     
                                                 |     if (r1 == 0) {
    0x00003f20 beq 0x3e34                        |         goto label_0;
                                                 |     }
    0x00003f24 bl 0x15e4                         |     r0 = strcmp (r0, r1);
    0x00003f28 clz r0, r0                        |     r0 &= r0;
    0x00003f2c lsr r0, r0, 5                     |     r0 >>= 5;
    0x00003f30 pop {r4, r5, r6, r7, r8, pc}      |     
                                                 | label_13:
    0x00003f34 cmp r3, 0x40                      |     
                                                 |     if (r3 != 0x40) {
    0x00003f38 ldreq r7, [r4, 8]                 |         r7 = *((r4 + 8));
                                                 |     }
                                                 |     if (r3 == 0x40) {
    0x00003f3c beq 0x3fdc                        |         goto label_14;
                                                 |     }
    0x00003f40 cmp r3, 0x80                      |     
                                                 |     if (r3 == 0x80) {
    0x00003f44 beq 0x3f0c                        |         goto label_3;
                                                 |     }
    0x00003f48 pop {r4, r5, r6, r7, r8, pc}      |     
                                                 | label_10:
    0x00003f4c ldrd r2, r3, [r5, 0x18]           |     __asm ("ldrd r2, r3, [r5, 0x18]");
    0x00003f50 ldrd r0, r1, [r4, 0x18]           |     __asm ("ldrd r0, r1, [r4, 0x18]");
    0x00003f54 bl 0x49e4                         |     r0 = aeabi_dcmpeq ();
    0x00003f58 adds r0, r0, 0                    |     r0 += 0;
                                                 |     if (r0 == r0) {
    0x00003f5c movne r0, 1                       |         r0 = 1;
                                                 |     }
    0x00003f60 pop {r4, r5, r6, r7, r8, pc}      |     
                                                 | label_12:
    0x00003f64 ldr r4, [r4, 8]                   |     r4 = *((r4 + 8));
    0x00003f68 ldr r5, [r5, 8]                   |     r5 = *((r5 + 8));
                                                 | label_4:
    0x00003f6c cmp r4, 0                         |     
    0x00003f70 cmpne r5, 0                       |     __asm ("cmpne r5, 0");
                                                 |     if (r4 == 0) {
    0x00003f74 bne 0x3f88                        |         
    0x00003f78 sub r0, r4, r5                    |         r0 = r4 - r5;
    0x00003f7c clz r0, r0                        |         r0 &= r0;
    0x00003f80 lsr r0, r0, 5                     |         r0 >>= 5;
    0x00003f84 pop {r4, r5, r6, r7, r8, pc}      |         
                                                 |     }
    0x00003f88 mov r2, r6                        |     r2 = r6;
    0x00003f8c mov r1, r5                        |     r1 = r5;
    0x00003f90 mov r0, r4                        |     r0 = r4;
    0x00003f94 bl 0x153c                         |     r0 = fcn_0000153c ();
    0x00003f98 cmp r0, 0                         |     
                                                 |     if (r0 == 0) {
    0x00003f9c beq 0x3e34                        |         goto label_0;
                                                 |     }
    0x00003fa0 ldr r4, [r4]                      |     r4 = *(r4);
    0x00003fa4 ldr r5, [r5]                      |     r5 = *(r5);
    0x00003fa8 b 0x3f6c                          |     goto label_4;
                                                 | label_5:
    0x00003fac ldr r1, [r7, 0x20]                |     r1 = *((r7 + 0x20));
    0x00003fb0 mov r2, r6                        |     r2 = r6;
    0x00003fb4 mov r0, r5                        |     r0 = r5;
    0x00003fb8 bl 0x1cd8                         |     r0 = get_object_item ();
    0x00003fbc subs r1, r0, 0                    |     r1 = r0 - 0;
                                                 |     if (r1 == r0) {
    0x00003fc0 beq 0x3e34                        |         goto label_0;
                                                 |     }
    0x00003fc4 mov r2, r6                        |     r2 = r6;
    0x00003fc8 mov r0, r7                        |     r0 = r7;
    0x00003fcc bl 0x153c                         |     r0 = fcn_0000153c ();
    0x00003fd0 cmp r0, 0                         |     
                                                 |     if (r0 == 0) {
    0x00003fd4 beq 0x3e34                        |         goto label_0;
                                                 |     }
    0x00003fd8 ldr r7, [r7]                      |     r7 = *(r7);
                                                 | label_14:
    0x00003fdc cmp r7, 0                         |     
                                                 |     if (r7 != 0) {
    0x00003fe0 bne 0x3fac                        |         goto label_5;
                                                 |     }
    0x00003fe4 ldr r5, [r5, 8]                   |     r5 = *((r5 + 8));
                                                 | label_6:
    0x00003fe8 cmp r5, 0                         |     
                                                 |     if (r5 == 0) {
    0x00003fec beq 0x3e9c                        |         goto label_2;
                                                 |     }
    0x00003ff0 ldr r1, [r5, 0x20]                |     r1 = *((r5 + 0x20));
    0x00003ff4 mov r2, r6                        |     r2 = r6;
    0x00003ff8 mov r0, r4                        |     r0 = r4;
    0x00003ffc bl 0x1cd8                         |     r0 = get_object_item ();
    0x00004000 subs r1, r0, 0                    |     r1 = r0 - 0;
                                                 |     if (r1 == r0) {
    0x00004004 beq 0x3e34                        |         goto label_0;
                                                 |     }
    0x00004008 mov r2, r6                        |     r2 = r6;
    0x0000400c mov r0, r5                        |     r0 = r5;
    0x00004010 bl 0x153c                         |     r0 = fcn_0000153c ();
    0x00004014 cmp r0, 0                         |     
                                                 |     if (r0 == 0) {
    0x00004018 beq 0x3e34                        |         goto label_0;
                                                 |     }
    0x0000401c ldr r5, [r5]                      |     r5 = *(r5);
    0x00004020 b 0x3fe8                          |     goto label_6;
                                                 | }
    ; 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/libcjson.so.1.7.7 @ 0x1be0 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) sym.ensure ()                    | void ensure (int32_t arg1, uint32_t arg2) {
                                             |     r0 = arg1;
                                             |     r1 = arg2;
    0x00001be0 push {r4, r5, r6, lr}         |     
    0x00001be4 subs r4, r0, 0                |     r4 = r0 - 0;
                                             |     if (r4 != r0) {
    0x00001be8 beq 0x1c50                    |         
    0x00001bec ldr r5, [r4]                  |         r5 = *(r4);
    0x00001bf0 cmp r5, 0                     |         
                                             |         if (r5 == 0) {
    0x00001bf4 beq 0x1c90                    |             goto label_0;
                                             |         }
    0x00001bf8 ldr r3, [r4, 4]               |         r3 = *((r4 + 4));
    0x00001bfc cmp r3, 0                     |         
                                             |         if (r3 != 0) {
    0x00001c00 beq 0x1c10                    |             
    0x00001c04 ldr r2, [r4, 8]               |             r2 = *((r4 + 8));
    0x00001c08 cmp r3, r2                    |             
                                             |             if (r3 < r2) {
    0x00001c0c bls 0x1c50                    |                 goto label_1;
                                             |             }
                                             |         }
    0x00001c10 cmp r1, 0                     |         
                                             |         if (r1 < 0) {
    0x00001c14 blt 0x1c50                    |             goto label_1;
                                             |         }
    0x00001c18 ldr r2, [r4, 8]               |         r2 = *((r4 + 8));
    0x00001c1c add r6, r1, 1                 |         r6 = r1 + 1;
    0x00001c20 add r6, r2, r6                |         r6 = r2 + r6;
    0x00001c24 cmp r3, r6                    |         
                                             |         if (r3 < r6) {
    0x00001c28 addhs r5, r5, r2              |             r5 += r2;
                                             |         }
                                             |         if (r3 >= r6) {
    0x00001c2c bhs 0x1c90                    |             goto label_0;
                                             |         }
    0x00001c30 ldr r3, [r4, 0x10]            |         r3 = *((r4 + 0x10));
    0x00001c34 cmp r3, 0                     |         
                                             |         if (r3 != 0) {
    0x00001c38 bne 0x1c50                    |             goto label_1;
                                             |         }
    0x00001c3c cmn r6, 0xc0000001            |         
                                             |         if (r6 < 0xc0000001) {
    0x00001c40 bls 0x1c58                    |             goto label_2;
                                             |         }
    0x00001c44 cmp r6, 0                     |         
                                             |         if (r6 < 0) {
    0x00001c48 mvnge r6, 0x80000000          |             r6 = ~0x80000000;
                                             |         }
                                             |         if (r6 >= 0) {
    0x00001c4c bge 0x1c5c                    |             goto label_3;
                                             |         }
                                             |     }
                                             | label_1:
    0x00001c50 mov r5, 0                     |     r5 = 0;
    0x00001c54 b 0x1c90                      |     goto label_0;
                                             | label_2:
    0x00001c58 lsl r6, r6, 1                 |     r6 <<= 1;
                                             | label_3:
    0x00001c5c ldr r3, [r4, 0x20]            |     r3 = *((r4 + 0x20));
    0x00001c60 cmp r3, 0                     |     
                                             |     if (r3 == 0) {
    0x00001c64 beq 0x1c98                    |         goto label_4;
                                             |     }
    0x00001c68 mov r0, r5                    |     r0 = r5;
    0x00001c6c mov r1, r6                    |     r1 = r6;
    0x00001c70 blx r3                        |     r0 = uint32_t (*r3)(uint32_t, uint32_t) (r0, r1);
    0x00001c74 subs r5, r0, 0                |     r5 = r0 - 0;
                                             |     if (r5 != r0) {
    0x00001c78 bne 0x1cc8                    |         goto label_5;
                                             |     }
                                             |     do {
    0x00001c7c ldr r3, [r4, 0x1c]            |         r3 = *((r4 + 0x1c));
    0x00001c80 ldr r0, [r4]                  |         r0 = *(r4);
    0x00001c84 blx r3                        |         uint32_t (*r3)(uint32_t, uint32_t) (r0, r3);
    0x00001c88 str r5, [r4, 4]               |         *((r4 + 4)) = r5;
    0x00001c8c str r5, [r4]                  |         *(r4) = r5;
                                             | label_0:
    0x00001c90 mov r0, r5                    |         r0 = r5;
    0x00001c94 pop {r4, r5, r6, pc}          |         
                                             | label_4:
    0x00001c98 ldr r3, [r4, 0x18]            |         r3 = *((r4 + 0x18));
    0x00001c9c mov r0, r6                    |         r0 = r6;
    0x00001ca0 blx r3                        |         r0 = uint32_t (*r3)(uint32_t, uint32_t) (r0, r3);
    0x00001ca4 subs r5, r0, 0                |         r5 = r0 - 0;
    0x00001ca8 beq 0x1c7c                    |         
                                             |     } while (r5 == r0);
    0x00001cac ldr r2, [r4, 8]               |     r2 = *((r4 + 8));
    0x00001cb0 ldr r1, [r4]                  |     r1 = *(r4);
    0x00001cb4 add r2, r2, 1                 |     r2++;
    0x00001cb8 bl 0x1500                     |     memcpy (r0, r1, r2);
    0x00001cbc ldr r3, [r4, 0x1c]            |     r3 = *((r4 + 0x1c));
    0x00001cc0 ldr r0, [r4]                  |     r0 = *(r4);
    0x00001cc4 blx r3                        |     uint32_t (*r3)(uint32_t, uint32_t) (r0, r3);
                                             | label_5:
    0x00001cc8 ldr r3, [r4, 8]               |     r3 = *((r4 + 8));
    0x00001ccc stm r4, {r5, r6}              |     *(r4) = r5;
                                             |     *((r4 + 4)) = r6;
    0x00001cd0 add r5, r5, r3                |     r5 += r3;
    0x00001cd4 b 0x1c90                      |     goto label_0;
                                             | }

[*] Function mmap used 1 times libcjson.so.1.7.7