[*] Binary protection state of iostat

  
  	Full RELRO     Canary found      NX enabled   PIE enabled  No RPATH     No RUNPATH   No Symbols


[*] Function printf tear down of iostat

    ; assembly                               | /* r2dec pseudo code output */
                                             | /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/iostat @ 0x5f48 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) fcn.00005f48 ()                  | void fcn_00005f48 (int16_t arg1) {
                                             |     int16_t var_8h_2;
                                             |     int16_t var_ch_2;
                                             |     int16_t var_1ch_2;
                                             |     r0 = arg1;
    0x00005f48 push {r1, r2, r3}             |     
    0x00005f4a mov.w r3, 0x400               |     r3 = 0x400;
    0x00005f4e ldr r1, [pc, 0x74]            |     
    0x00005f50 ldr.w ip, [pc, 0x74]          |     
    0x00005f54 add r1, pc                    |     r1 = 0xbf1e;
    0x00005f56 push {r4, r5, lr}             |     
    0x00005f58 mov r5, r0                    |     r5 = r0;
    0x00005f5a add.w r0, r1, 0x410           |     r0 = r1 + 0x410;
    0x00005f5e sub sp, 0x10                  |     
    0x00005f60 add ip, pc                    |     ip = 0xbf2c;
    0x00005f62 ldr r1, [pc, 0x68]            |     r1 = *(0x5fce);
    0x00005f64 add r2, sp, 0x1c              |     r2 += var_1ch_2;
    0x00005f66 ldr r4, [r2], 4               |     r4 = *(r2);
                                             |     r2 += 4;
    0x00005f6a ldr.w r1, [ip, r1]            |     
    0x00005f6e ldr r1, [r1]                  |     r1 = imp.__aeabi_unwind_cpp_pr0;
    0x00005f70 str r1, [sp, 0xc]             |     var_ch_2 = r1;
    0x00005f72 mov.w r1, 0                   |     r1 = 0;
    0x00005f76 strd r4, r2, [sp]             |     __asm ("strd r4, r2, [sp]");
    0x00005f7a str r2, [sp, 8]               |     var_8h_2 = r2;
    0x00005f7c mov r1, r3                    |     r1 = r3;
    0x00005f7e movs r2, 1                    |     r2 = 1;
    0x00005f80 blx 0xea8                     |     vsnprintf_chk ()
    0x00005f84 cmp r5, 0                     |     
                                             |     if (r5 <= 0) {
    0x00005f86 ble 0x5f96                    |         goto label_0;
                                             |     }
    0x00005f88 movs r4, 0                    |     r4 = 0;
                                             |     do {
    0x00005f8a movs r0, 9                    |         r0 = 9;
    0x00005f8c adds r4, 1                    |         r4++;
    0x00005f8e blx 0x1040                    |         scandir ();
    0x00005f90 invalid                       |         
    0x00005f94 bne 0x5f8a                    |         
                                             |     } while (r4 != 1);
                                             | label_0:
    0x00005f96 ldr r0, [pc, 0x38]            |     
    0x00005f98 add r0, pc                    |     
    0x00005f9a add.w r0, r0, 0x410           |     r0 = 0xc37e;
    0x00005f9e blx 0xf70                     |     fcn_00000f70 ();
    0x00005fa2 ldr r2, [pc, 0x30]            |     
    0x00005fa4 ldr r3, [pc, 0x24]            |     r3 = *(0x5fcc);
    0x00005fa6 add r2, pc                    |     r2 = 0xbf80;
    0x00005fa8 ldr r3, [r2, r3]              |     r3 = imp.__aeabi_unwind_cpp_pr0;
    0x00005faa ldr r2, [r3]                  |     r2 = imp.__aeabi_unwind_cpp_pr0;
    0x00005fac ldr r3, [sp, 0xc]             |     r3 = var_ch_2;
    0x00005fae eors r2, r3                   |     r2 ^= r3;
    0x00005fb0 mov.w r3, 0                   |     r3 = 0;
                                             |     if (r2 == r3) {
    0x00005fb4 bne 0x5fc0                    |         
    0x00005fb6 add sp, 0x10                  |         
    0x00005fb8 pop.w {r4, r5, lr}            |         
    0x00005fbc add sp, 0xc                   |         
    0x00005fbe bx lr                         |         return;
                                             |     }
    0x00005fc0 blx 0xed8                     |     stack_chk_fail ();
    0x00005fc4 strb r0, [r6, r3]             |     *((r6 + r3)) = r0;
    0x00005fc6 movs r0, r0                   |     
    0x00005fc8 ldr r7, [pc, 0x150]           |     r7 = *(0x611c);
    0x00005fca movs r0, r0                   |     
    0x00005fcc lsls r4, r4, 4                |     r4 <<= 4;
    0x00005fce movs r0, r0                   |     
    0x00005fd0 strb r4, [r5, r2]             |     *((r5 + r2)) = r4;
    0x00005fd2 movs r0, r0                   |     
    0x00005fd4 ldr r7, [pc, 0x38]            |     r7 = *(0x6010);
    0x00005fd6 movs r0, r0                   |     
                                             | }

[*] Function printf used 2 times iostat