[*] 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-50593792.squashfs_v4_le_extract/usr/bin/stm32flash @ 0x2248 */
| #include <stdint.h>
|
; (fcn) fcn.00002248 () | void fcn_00002248 (char * arg1, char * arg2) {
| r0 = arg1;
| r1 = arg2;
0x00002248 push {r3, r4, r5, r6, r7, lr} |
0x0000224a mov r4, r1 | r4 = r1;
0x0000224c ldr r6, [pc, 0x5c] |
0x0000224e movs r1, 1 | r1 = 1;
0x00002250 mov r7, r0 | r7 = r0;
0x00002252 blx 0x1098 | r0 = ctype_b_loc ();
0x00002256 subs r5, r0, 0 | r5 = r0 - 0;
0x00002258 add r6, pc | r6 = 0x4508;
| if (r5 >= r0) {
0x0000225a blt 0x227a |
0x0000225c mov r0, r4 | r0 = r4;
0x0000225e blx 0x10c8 | strchr (r0, r1);
0x00002262 mov r1, r4 | r1 = r4;
0x00002264 mov r2, r0 | r2 = r0;
0x00002266 mov r0, r5 | r0 = r5;
0x00002268 blx 0x114c | r0 = fprintf_chk ()
0x0000226c cmp r0, 0 |
| if (r0 < 0) {
0x0000226e blt 0x2290 | goto label_0;
| }
0x00002270 mov r0, r5 | r0 = r5;
0x00002272 blx 0x11a0 | snprintf_chk ();
0x00002276 movs r0, 1 | r0 = 1;
0x00002278 pop {r3, r4, r5, r6, r7, pc} |
| }
0x0000227a ldr r0, [pc, 0x34] |
0x0000227c mov r3, r7 | r3 = r7;
0x0000227e ldr r2, [pc, 0x34] |
0x00002280 movs r1, 1 | r1 = 1;
0x00002282 ldr r0, [r6, r0] | r0 = *((r6 + r0));
0x00002284 add r2, pc | r2 = 0x453e;
0x00002286 ldr r0, [r0] | r0 = *(0x22b2);
0x00002288 blx 0x1158 | sigemptyset ();
0x0000228c movs r0, 0 | r0 = 0;
0x0000228e pop {r3, r4, r5, r6, r7, pc} |
| label_0:
0x00002290 ldr r1, [pc, 0x1c] | r1 = *(0x22b0);
0x00002292 mov r3, r7 | r3 = r7;
0x00002294 ldr r2, [pc, 0x20] |
0x00002296 ldr r1, [r6, r1] | r1 = *((r6 + r1));
0x00002298 add r2, pc | r2 = 0x4554;
0x0000229a ldr r0, [r1] | r0 = *(0x22b0);
0x0000229c movs r1, 1 | r1 = 1;
0x0000229e blx 0x1158 | sigemptyset ();
0x000022a2 mov r0, r5 | r0 = r5;
0x000022a4 blx 0x11a0 | snprintf_chk ();
0x000022a8 movs r0, 0 | r0 = 0;
0x000022aa pop {r3, r4, r5, r6, r7, pc} |
| }
[*] Function fprintf used 2 times stm32flash