[*] Binary protection state of connmand-wait-online
Partial RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function printf tear down of connmand-wait-online
; 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/sbin/connmand-wait-online @ 0x12e74 */
| #include <stdint.h>
|
; (fcn) fcn.00012e74 () | void fcn_00012e74 (int32_t arg1, char * dest) {
| r0 = arg1;
| r1 = dest;
0x00012e74 push {r4, r5, r6, lr} |
0x00012e78 mov r5, r1 | r5 = r1;
0x00012e7c ldr r1, [pc, 0xd0] | r1 = *(0x12f50);
0x00012e80 mov r6, r0 | r6 = r0;
0x00012e84 add r1, pc, r1 | r1 = pc + r1;
0x00012e88 mov r0, r5 | r0 = r5;
0x00012e8c bl 0x119ac | strcpy (r0, r1);
0x00012e90 ldr r3, [r6, 8] | r3 = *((r6 + 8));
0x00012e94 cmp r3, 0 |
| if (r3 == 0) {
0x00012e98 bne 0x12eac |
0x00012e9c ldr r3, [r6, 0xc] | r3 = *((r6 + 0xc));
0x00012ea0 cmp r3, 0 |
| if (r3 != 0) {
0x00012ea4 moveq r4, 0xd | r4 = 0xd;
| }
| if (r3 == 0) {
0x00012ea8 beq 0x12ec4 | goto label_0;
| }
| }
0x00012eac ldr r2, [pc, 0xa4] | r2 = *(0x12f54);
0x00012eb0 ldr r1, [pc, 0xa4] | r1 = *(0x12f58);
0x00012eb4 add r2, pc, r2 | r2 = pc + r2;
0x00012eb8 add r0, r5, 0xd | r0 = r5 + 0xd;
0x00012ebc bl 0x11928 | r0 = snprintf (r0, r1, r2, r3)
0x00012ec0 add r4, r0, 0xd | r4 = r0 + 0xd;
| label_0:
0x00012ec4 ldr r3, [r6, 0x10] | r3 = *((r6 + 0x10));
0x00012ec8 cmp r3, 0 |
| if (r3 != 0) {
0x00012ecc beq 0x12ee8 |
0x00012ed0 ldr r2, [pc, 0x88] | r2 = *(0x12f5c);
0x00012ed4 rsb r1, r4, 0x400 | r1 = 0x400 - r4;
0x00012ed8 add r0, r5, r4 | r0 = r5 + r4;
0x00012edc add r2, pc, r2 | r2 = pc + r2;
0x00012ee0 bl 0x11928 | r0 = snprintf (r0, r1, r2, r3)
0x00012ee4 add r4, r4, r0 | r4 += r0;
| }
0x00012ee8 ldr r3, [r6, 0x14] | r3 = *((r6 + 0x14));
0x00012eec cmp r3, 0 |
| if (r3 != 0) {
0x00012ef0 beq 0x12f0c |
0x00012ef4 ldr r2, [pc, 0x68] | r2 = *(0x12f60);
0x00012ef8 rsb r1, r4, 0x400 | r1 = 0x400 - r4;
0x00012efc add r0, r5, r4 | r0 = r5 + r4;
0x00012f00 add r2, pc, r2 | r2 = pc + r2;
0x00012f04 bl 0x11928 | r0 = snprintf (r0, r1, r2, r3)
0x00012f08 add r4, r4, r0 | r4 += r0;
| }
0x00012f0c ldr r3, [r6, 0x18] | r3 = *((r6 + 0x18));
0x00012f10 cmp r3, 0 |
| if (r3 != 0) {
0x00012f14 beq 0x12f30 |
0x00012f18 ldr r2, [pc, 0x48] | r2 = *(0x12f64);
0x00012f1c rsb r1, r4, 0x400 | r1 = 0x400 - r4;
0x00012f20 add r0, r5, r4 | r0 = r5 + r4;
0x00012f24 add r2, pc, r2 | r2 = pc + r2;
0x00012f28 bl 0x11928 | r0 = snprintf (r0, r1, r2, r3)
0x00012f2c add r4, r4, r0 | r4 += r0;
| }
0x00012f30 ldr r3, [r6, 0x1c] | r3 = *((r6 + 0x1c));
0x00012f34 cmp r3, 0 |
0x00012f38 popeq {r4, r5, r6, pc} |
0x00012f3c ldr r2, [pc, 0x28] | r2 = *(0x12f68);
0x00012f40 rsb r1, r4, 0x400 | r1 = 0x400 - r4;
0x00012f44 add r0, r5, r4 | r0 = r5 + r4;
0x00012f48 add r2, pc, r2 | r2 = pc + r2;
0x00012f4c pop {r4, r5, r6, lr} |
0x00012f50 b 0x11928 | return void (*0x11928)() ();
| }
[*] Function printf used 5 times connmand-wait-online