[*] Binary protection state of stm32flash
Full RELRO Canary found NX enabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of stm32flash
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/stm32flash @ 0x22f4 */
| #include <stdint.h>
|
; (fcn) fcn.000022f4 () | void fcn_000022f4 (char * arg1, char * arg2) {
| r0 = arg1;
| r1 = arg2;
0x000022f4 push {r3, r4, r5, r6, r7, lr} |
0x000022f6 mov r4, r1 | r4 = r1;
0x000022f8 ldr r6, [pc, 0x5c] |
0x000022fa movs r1, 1 | r1 = 1;
0x000022fc mov r7, r0 | r7 = r0;
0x000022fe blx 0x10ec | r0 = ctype_b_loc ();
0x00002302 subs r5, r0, 0 | r5 = r0 - 0;
0x00002304 add r6, pc | r6 = 0x4660;
| if (r5 >= r0) {
0x00002306 blt 0x2326 |
0x00002308 mov r0, r4 | r0 = r4;
0x0000230a blx 0x111c | strchr (r0, r1);
0x0000230e mov r1, r4 | r1 = r4;
0x00002310 mov r2, r0 | r2 = r0;
0x00002312 mov r0, r5 | r0 = r5;
0x00002314 blx 0x11a0 | fprintf_chk ()
0x00002316 vadd.i8 d18, d4, d0 | __asm ("vadd.i8 d18, d4, d0");
| if (r5 < r0) {
0x0000231a blt 0x233c | goto label_0;
| }
0x0000231c mov r0, r5 | r0 = r5;
0x0000231e blx 0x11f4 | snprintf_chk ();
0x00002322 movs r0, 1 | r0 = 1;
0x00002324 pop {r3, r4, r5, r6, r7, pc} |
| }
0x00002326 ldr r0, [pc, 0x34] |
0x00002328 mov r3, r7 | r3 = r7;
0x0000232a ldr r2, [pc, 0x34] |
0x0000232c movs r1, 1 | r1 = 1;
0x0000232e ldr r0, [r6, r0] | r0 = *((r6 + r0));
0x00002330 add r2, pc | r2 = 0x4696;
0x00002332 ldr r0, [r0] | r0 = *(0x235e);
0x00002334 blx 0x11ac | sigemptyset ();
| do {
0x00002338 movs r0, 0 | r0 = 0;
0x0000233a pop {r3, r4, r5, r6, r7, pc} |
| label_0:
0x0000233c ldr r1, [pc, 0x1c] | r1 = *(0x235c);
0x0000233e mov r3, r7 | r3 = r7;
0x00002340 ldr r2, [pc, 0x20] |
0x00002342 ldr r1, [r6, r1] | r1 = *((r6 + r1));
0x00002344 add r2, pc | r2 = 0x46ac;
0x00002346 ldr r0, [r1] | r0 = *(0x235c);
0x00002348 movs r1, 1 | r1 = 1;
0x0000234a blx 0x11ac | sigemptyset ();
0x0000234e mov r0, r5 | r0 = r5;
0x00002350 blx 0x11f4 | snprintf_chk ();
0x00002354 b 0x2338 |
| } while (1);
| }
[*] Function fprintf used 2 times stm32flash