[*] Binary protection state of xmlwf
Partial RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function strcpy tear down of xmlwf
; 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/bin/xmlwf @ 0x139d0 */
| #include <stdint.h>
|
; (fcn) fcn.000139d0 () | void fcn_000139d0 (int32_t arg1, int32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x000139d0 push {r4, r5, r6, r7, r8, lr} |
0x000139d4 mov r5, r1 | r5 = r1;
0x000139d8 mov r7, r2 | r7 = r2;
0x000139dc mov r6, r0 | r6 = r0;
0x000139e0 bl 0x11588 | r0 = strlen (r0);
0x000139e4 mov r4, r0 | r4 = r0;
0x000139e8 mov r0, r5 | r0 = r5;
0x000139ec bl 0x11588 | r0 = strlen (r0);
0x000139f0 add r0, r4, r0 | r0 = r4 + r0;
0x000139f4 add r0, r0, 2 | r0 += 2;
0x000139f8 bl 0x11330 | r0 = malloc (r0);
0x000139fc cmp r0, 0 |
0x00013a00 str r0, [r7] | *(r7) = r0;
| if (r0 != 0) {
0x00013a04 beq 0x13a38 |
0x00013a08 mov r4, r0 | r4 = r0;
0x00013a0c mov r1, r6 | r1 = r6;
0x00013a10 bl 0x1136c | strcpy (r0, r1)
0x00013a14 mov r1, 0x2f | r1 = 0x2f;
0x00013a18 mov r0, r4 | r0 = r4;
0x00013a1c bl 0x11378 | strrchr (r0, r1);
0x00013a20 mov r1, r5 | r1 = r5;
0x00013a24 mov r5, r4 | r5 = r4;
0x00013a28 cmp r0, 0 |
| if (r0 == 0) {
0x00013a2c addne r0, r0, 1 | r0++;
| }
| if (r0 != 0) {
0x00013a30 moveq r0, r4 | r0 = r4;
| }
0x00013a34 bl 0x1136c | strcpy (r0, r1)
| }
0x00013a38 mov r0, r5 | r0 = r5;
0x00013a3c pop {r4, r5, r6, r7, r8, pc} |
| }
[*] Function strcpy used 3 times xmlwf