[*] Binary protection state of libdigest-mgmt.so.1
Full RELRO Canary found NX enabled DSO No RPATH No RUNPATH No Symbols
[*] Function printf tear down of libdigest-mgmt.so.1
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libdigest-mgmt.so.1 @ 0x1118 */
| #include <stdint.h>
|
; (fcn) sym.digest_realm_get () | uint32_t digest_realm_get (uint32_t arg1, uint32_t arg2, uint32_t arg3) {
| int16_t var_0h;
| int32_t var_4h;
| int32_t var_4h_2;
| int16_t var_ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x00001118 cmp r0, 0 |
| if (r0 == 0) {
0x0000111a beq 0x11a4 | goto label_6;
| }
0x0000111c cmp r1, 1 |
0x0000111e it ls |
| if (r1 <= 1) {
0x00001120 cmpls r2, 0 | __asm ("cmpls r2, 0");
| }
0x00001122 push {r4, r5, r6, r7, lr} |
0x00001124 mov r4, r1 | r4 = r1;
0x00001126 sub sp, 0x14 |
0x00001128 mov r5, r2 | r5 = r2;
| if (r1 != 1) {
0x0000112a beq 0x113a |
0x0000112c subs r3, r2, 0 | r3 = r2 - 0;
0x0000112e it ne |
| if (r3 == r2) {
0x00001130 movne r3, 1 | r3 = 1;
| }
0x00001132 cmp r1, 4 |
0x00001134 it hi |
| if (r1 <= 4) {
0x00001136 movhi r3, 0 | r3 = 0;
| }
| if (r3 == 0) {
0x00001138 cbz r3, 0x1140 | goto label_7;
| }
| }
0x0000113a movs r0, 1 | r0 = 1;
| do {
0x0000113c add sp, 0x14 |
0x0000113e pop {r4, r5, r6, r7, pc} |
| label_7:
0x00001140 mov r6, r0 | r6 = r0;
0x00001142 ldr r0, [pc, 0xc0] |
0x00001144 add r0, pc | r0 = 0x234e;
0x00001146 blx 0xcdc | r0 = fcn_00000cdc ();
0x0000114a mov r7, r0 | r7 = r0;
0x0000114c cmp r0, 0 |
| if (r0 == 0) {
0x0000114e beq 0x11f0 | goto label_8;
| }
| label_5:
0x00001150 ldr r0, [pc, 0xb4] |
0x00001152 add r0, pc | r0 = 0x235e;
0x00001154 blx 0xcdc | r0 = fcn_00000cdc ();
0x00001158 cmp r0, 0 |
| if (r0 == 0) {
0x0000115a beq 0x11d4 | goto label_9;
| }
| if (r5 != 0) {
0x0000115c cbnz r5, 0x119e | goto label_3;
| }
| label_2:
0x0000115e ldr r5, [pc, 0xac] |
0x00001160 add r5, pc | r5 = 0x2372;
| label_0:
0x00001162 ldr r3, [pc, 0xac] |
0x00001164 movs r2, 1 | r2 = 1;
0x00001166 strd r0, r5, [sp, 4] | __asm ("strd r0, r5, [var_4h]");
0x0000116a mov r1, r4 | r1 = r4;
0x0000116c mov r0, r6 | r0 = r6;
0x0000116e str r7, [sp, 0xc] | var_ch = r7;
0x00001170 add r3, pc | r3 = 0x2386;
0x00001172 str r3, [sp] | *(sp) = r3;
0x00001174 mov.w r3, -1 | r3 = -1;
0x00001178 blx 0xc74 | r0 = snprintf_chk ()
0x0000117c cmp r0, 0 |
0x0000117e ite le |
| if (r0 > 0) {
0x00001180 movle r3, 0 | r3 = 0;
| }
| if (r0 <= 0) {
0x00001182 movgt r3, 1 | r3 = 1;
| }
0x00001184 cmp r4, r0 |
0x00001186 it ls |
| if (r4 > r0) {
0x00001188 movls r3, 0 | r3 = 0;
| }
0x0000118a eor r3, r3, 1 | r3 ^= 1;
0x0000118e cmp r0, 0 |
0x00001190 ite eq |
| if (r0 != 0) {
0x00001192 moveq r3, 0 | r3 = 0;
| }
| if (r0 == 0) {
0x00001194 andne r3, r3, 1 | r3 &= 1;
| }
| if (r3 != 0) {
0x00001198 cbnz r3, 0x11a8 | goto label_10;
| }
| label_1:
0x0000119a movs r0, 0 | r0 = 0;
0x0000119c b 0x113c |
| } while (1);
| label_3:
0x0000119e ldr r5, [pc, 0x74] |
0x000011a0 add r5, pc | r5 = 0x23ba;
0x000011a2 b 0x1162 | goto label_0;
| label_6:
0x000011a4 movs r0, 1 | r0 = 1;
0x000011a6 bx lr | return r0;
| label_10:
0x000011a8 cmp r4, r0 |
| if (r4 < r0) {
0x000011aa bls 0x11ea | goto label_11;
| }
0x000011ac ldr r3, [pc, 0x68] |
0x000011ae add r3, pc | r3 = 0x23ca;
| label_4:
0x000011b0 ldr r2, [pc, 0x68] |
0x000011b2 movs r1, 1 | r1 = 1;
0x000011b4 movs r0, 4 | r0 = 4;
0x000011b6 add r2, pc | r2 = 0x23d6;
0x000011b8 str r2, [sp] | *(sp) = r2;
0x000011ba ldr r2, [pc, 0x64] |
0x000011bc add r2, pc | r2 = 0x23e2;
0x000011be blx 0xc9c | fcn_00000c9c ();
0x000011c2 mov.w r3, -1 | r3 = -1;
0x000011c6 movs r2, 1 | r2 = 1;
0x000011c8 mov r1, r4 | r1 = r4;
0x000011ca mov r0, r6 | r0 = r6;
0x000011cc str r5, [sp] | *(sp) = r5;
0x000011ce blx 0xc74 | snprintf_chk ()
0x000011d2 b 0x119a | goto label_1;
| label_9:
0x000011d4 ldr r2, [pc, 0x4c] |
0x000011d6 movs r0, 4 | r0 = 4;
0x000011d8 movs r1, 1 | r1 = 1;
0x000011da add r2, pc | r2 = 0x2402;
0x000011dc blx 0xc9c | fcn_00000c9c ();
0x000011e0 ldr r0, [pc, 0x44] |
0x000011e2 add r0, pc | r0 = 0x240e;
0x000011e4 cmp r5, 0 |
| if (r5 == 0) {
0x000011e6 beq 0x115e | goto label_2;
| }
0x000011e8 b 0x119e | goto label_3;
| label_11:
0x000011ea ldr r3, [pc, 0x40] |
0x000011ec add r3, pc | r3 = 0x241e;
0x000011ee b 0x11b0 | goto label_4;
| label_8:
0x000011f0 ldr r2, [pc, 0x3c] |
0x000011f2 movs r1, 1 | r1 = 1;
0x000011f4 ldr r7, [pc, 0x3c] |
0x000011f6 movs r0, 4 | r0 = 4;
0x000011f8 add r2, pc | r2 = 0x242c;
0x000011fa add r7, pc | r7 = 0x2432;
0x000011fc blx 0xc9c | fcn_00000c9c ();
0x00001200 b 0x1150 | goto label_5;
| }
[*] Function printf used 3 times libdigest-mgmt.so.1