[*] Binary protection state of bsdcat
Full RELRO Canary found NX enabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function printf tear down of bsdcat
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/bsdcat @ 0xfb8 */
| #include <stdint.h>
|
; (fcn) fcn.00000fb8 () | void fcn_00000fb8 (int16_t arg1, int16_t arg2, int16_t arg3) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| do {
| label_0:
0x00000988 bx pc | return void (*pc)() ();
0x00000fb8 ldr.w ip, [pc, 0x60] | ip = *(0x0000101c);
0x00000fbc push {r3, r4, r5, r6, r7, lr} |
0x00000fbe mov r7, r2 | r7 = r2;
0x00000fc0 ldr r2, [pc, 0x5c] | r2 = *(0x1020);
0x00000fc2 mov r5, r0 | r5 = r0;
0x00000fc4 add ip, pc |
0x00000fc6 mov r6, r1 | r6 = r1;
0x00000fc8 ldr r3, [pc, 0x58] |
0x00000fca movs r1, 1 | r1 = 1;
0x00000fcc ldr.w r4, [ip, r2] | r4 = *((ip + r2));
0x00000fd0 ldr r2, [pc, 0x54] |
0x00000fd2 add r3, pc |
0x00000fd4 ldr r3, [r3] | r3 = *(0x1ffa);
0x00000fd6 add r2, pc | r2 = 0x2002;
0x00000fd8 ldr r0, [r4] | r0 = *(r4);
0x00000fda blx 0x90c | fprintf_chk ()
0x00000fde ldr r0, [r4] | r0 = *(r4);
0x00000fe0 mov r3, r7 | r3 = r7;
0x00000fe2 mov r2, r6 | r2 = r6;
0x00000fe4 movs r1, 1 | r1 = 1;
0x00000fe6 blx 0x97c | fcn_0000097c ();
| if (r5 != 0) {
0x00000fea cbnz r5, 0xff8 | goto label_1;
| }
0x00000fec ldr r1, [r4] | r1 = *(r4);
0x00000fee movs r0, 0xa | r0 = 0xa;
0x00000ff0 pop.w {r3, r4, r5, r6, r7, lr} |
0x00000ff4 b.w 0x988 |
| } while (1);
| label_1:
0x00000ff8 mov r0, r5 | r0 = r5;
0x00000ffa ldr r6, [r4] | r6 = *(r4);
0x00000ffc blx 0x8e8 | strerror (r0);
0x00001000 ldr r2, [pc, 0x28] |
0x00001002 mov r3, r0 | r3 = r0;
0x00001004 movs r1, 1 | r1 = 1;
0x00001006 mov r0, r6 | r0 = r6;
0x00001008 add r2, pc | r2 = 0x2038;
0x0000100a blx 0x90c | fprintf_chk ()
0x0000100e ldr r1, [r4] | r1 = *(r4);
0x00001010 movs r0, 0xa | r0 = 0xa;
0x00001012 pop.w {r3, r4, r5, r6, r7, lr} |
0x00001016 b.w 0x988 | goto label_0;
| }
[*] Function printf used 3 times bsdcat