[*] Binary protection state of bsdcat

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


[*] Function fprintf tear down of bsdcat

    ; assembly                           | /* r2dec pseudo code output */
                                         | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/bsdcat @ 0x1730 */
                                         | #include <stdint.h>
                                         |  
    ; (fcn) fcn.00001730 ()              | void fcn_00001730 () {
    0x00001730 lui gp, 2                 |     
    0x00001734 addiu gp, gp, -0x7720     |     
    0x00001738 addu gp, gp, t9           |     gp += t9;
    0x0000173c addiu sp, sp, -0x30       |     
    0x00001740 lw v0, -0x7fd4(gp)        |     v0 = *((gp - 8181));
    0x00001744 sw s0, 0x1c(sp)           |     *(var_1ch) = s0;
    0x00001748 lw s0, -0x7f54(gp)        |     s0 = *((gp - 8149));
    0x0000174c sw s3, 0x28(sp)           |     *(var_28h) = s3;
    0x00001750 move s3, a2               |     s3 = a2;
    0x00001754 lw a2, -0x7fd8(gp)        |     a2 = *((gp - 8182));
    0x00001758 lw t9, -0x7f24(gp)        |     t9 = sym.imp.__fprintf_chk
    0x0000175c sw s1, 0x20(sp)           |     *(var_20h) = s1;
    0x00001760 lw a3, 0x2120(v0)         |     a3 = *((v0 + 2120));
    0x00001764 move s1, a0               |     s1 = a0;
    0x00001768 lw a0, (s0)               |     a0 = *(s0);
    0x0000176c sw gp, 0x10(sp)           |     *(var_10h) = gp;
    0x00001770 sw ra, 0x2c(sp)           |     *(var_2ch) = ra;
    0x00001774 sw s2, 0x24(sp)           |     *(var_24h) = s2;
    0x00001778 addiu a2, a2, 0x1d30      |     a2 += str._s:_;
    0x0000177c move s2, a1               |     s2 = a1;
    0x00001780 addiu a1, zero, 1         |     a1 = 1;
    0x00001784 jalr t9                   |     t9 ();
    0x00001788 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x0000178c lw a0, (s0)               |     a0 = *(s0);
    0x00001790 move a3, s3               |     a3 = s3;
    0x00001794 lw t9, -0x7f48(gp)        |     t9 = sym.imp.__vfprintf_chk
    0x00001798 move a2, s2               |     a2 = s2;
    0x0000179c addiu a1, zero, 1         |     a1 = 1;
    0x000017a0 jalr t9                   |     t9 ();
    0x000017a4 lw gp, 0x10(sp)           |     gp = *(var_10h);
                                         |     if (s1 == 0) {
    0x000017a8 bnez s1, 0x17d4           |         
    0x000017ac lw a1, (s0)               |         a1 = *(s0);
    0x000017b0 lw ra, 0x2c(sp)           |         ra = *(var_2ch);
    0x000017b4 lw s3, 0x28(sp)           |         s3 = *(var_28h);
    0x000017b8 lw s2, 0x24(sp)           |         s2 = *(var_24h);
    0x000017bc lw s1, 0x20(sp)           |         s1 = *(var_20h);
    0x000017c0 lw s0, 0x1c(sp)           |         s0 = *(var_1ch);
    0x000017c4 lw t9, -0x7f70(gp)        |         t9 = sym.imp.fputc;
    0x000017c8 addiu a0, zero, 0xa       |         a0 = 0xa;
    0x000017cc addiu sp, sp, 0x30        |         
    0x000017d0 jr t9                     |         t9 ();
                                         |     }
    0x000017d4 lw t9, -0x7f1c(gp)        |     t9 = sym.imp.strerror;
    0x000017d8 move a0, s1               |     a0 = s1;
    0x000017dc lw s1, (s0)               |     s1 = *(s0);
    0x000017e0 jalr t9                   |     t9 ();
    0x000017e4 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x000017e8 move a0, s1               |     a0 = s1;
    0x000017ec addiu a1, zero, 1         |     a1 = 1;
    0x000017f0 lw a2, -0x7fd8(gp)        |     a2 = *((gp - 8182));
    0x000017f4 lw t9, -0x7f24(gp)        |     t9 = sym.imp.__fprintf_chk
    0x000017f8 move a3, v0               |     a3 = v0;
    0x000017fc addiu a2, a2, 0x1d38      |     a2 += str.:__s;
    0x00001800 jalr t9                   |     t9 ();
    0x00001804 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x00001808 lw a1, (s0)               |     a1 = *(s0);
    0x0000180c lw ra, 0x2c(sp)           |     ra = *(var_2ch);
    0x00001810 lw s3, 0x28(sp)           |     s3 = *(var_28h);
    0x00001814 lw s2, 0x24(sp)           |     s2 = *(var_24h);
    0x00001818 lw s1, 0x20(sp)           |     s1 = *(var_20h);
    0x0000181c lw s0, 0x1c(sp)           |     s0 = *(var_1ch);
    0x00001820 lw t9, -0x7f70(gp)        |     t9 = sym.imp.fputc;
    0x00001824 addiu a0, zero, 0xa       |     a0 = 0xa;
    0x00001828 addiu sp, sp, 0x30        |     
    0x0000182c jr t9                     |     return t9 ();
                                         | }

[*] Function fprintf used 4 times bsdcat