[*] Binary protection state of check_dst

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


[*] Function printf tear down of check_dst

    ; assembly                               | /* r2dec pseudo code output */
                                             | /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/bin/check_dst @ 0x401260 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) main ()                          | int32_t main () {
    0x00401260 lui gp, 2                     |     
    0x00401264 addiu gp, gp, -0x5240         |     
    0x00401268 addu gp, gp, t9               |     gp += t9;
    0x0040126c addiu sp, sp, -0x40           |     
    0x00401270 sw ra, 0x3c(sp)               |     *(var_3ch) = ra;
    0x00401274 sw fp, 0x38(sp)               |     *(var_38h) = fp;
    0x00401278 sw s0, 0x34(sp)               |     *(var_34h) = s0;
    0x0040127c move fp, sp                   |     fp = sp;
    0x00401280 sw gp, 0x10(sp)               |     *(var_10h) = gp;
    0x00401284 sw a0, 0x1c(fp)               |     *(arg_1ch) = a0;
    0x00401288 sw a1, 0x18(fp)               |     *(envp) = a1;
    0x0040128c lw t8, -0x7f38(gp)            |     t8 = *((gp - 8142));
    0x00401290 lw t8, (t8)                   |     t8 = *(t8);
    0x00401294 sw t8, 0x2c(fp)               |     *(arg_2ch) = t8;
    0x00401298 lw t8, 0x1c(fp)               |     t8 = *(arg_1ch);
    0x0040129c slti t8, t8, 2                |     t8 = (t8 < 2) ? 1 : 0;
                                             |     if (t8 != 0) {
    0x004012a0 beqz t8, 0x4012dc             |         
    0x004012a4 nop                           |         
    0x004012a8 lw t8, 0x18(fp)               |         t8 = *(envp);
    0x004012ac lw t8, (t8)                   |         t8 = *(t8);
    0x004012b0 lw v0, -0x7fdc(gp)            |         v0 = *(gp);
                                             |         /* str.Usage:__s_STRING_n */
    0x004012b4 addiu a0, v0, 0x2b00          |         a0 = v0 + 0x2b00;
    0x004012b8 move a1, t8                   |         a1 = t8;
    0x004012bc lw t8, -0x7f7c(gp)            |         t8 = sym.imp.printf
    0x004012c0 move t9, t8                   |         t9 = t8;
    0x004012c4 jalr t9                       |         t9 ();
    0x004012c8 nop                           |         
    0x004012cc lw gp, 0x10(fp)               |         gp = *(argv);
    0x004012d0 addiu s0, zero, 1             |         s0 = 1;
    0x004012d4 b 0x4013a0                    |         goto label_0;
    0x004012d8 nop                           |         
                                             |     }
    0x004012dc lw t8, 0x18(fp)               |     t8 = *(envp);
    0x004012e0 addiu t8, t8, 4               |     t8 += 4;
    0x004012e4 lw s0, (t8)                   |     s0 = *(t8);
    0x004012e8 addiu t8, fp, 0x24            |     t8 = fp + 0x24;
    0x004012ec move a0, t8                   |     a0 = t8;
    0x004012f0 lw t8, -0x7f78(gp)            |     t8 = *(gp);
    0x004012f4 move t9, t8                   |     t9 = t8;
    0x004012f8 jalr t9                       |     t9 ();
    0x004012fc nop                           |     
    0x00401300 lw gp, 0x10(fp)               |     gp = *(argv);
    0x00401304 addiu v0, fp, 0x28            |     v0 = fp + 0x28;
    0x00401308 addiu t8, fp, 0x24            |     t8 = fp + 0x24;
    0x0040130c move a0, v0                   |     a0 = v0;
    0x00401310 move a1, s0                   |     a1 = s0;
    0x00401314 move a2, t8                   |     a2 = t8;
    0x00401318 lw t8, -0x7f6c(gp)            |     t8 = *(gp);
    0x0040131c move t9, t8                   |     t9 = t8;
    0x00401320 jalr t9                       |     t9 ();
    0x00401324 nop                           |     
    0x00401328 lw gp, 0x10(fp)               |     gp = *(argv);
    0x0040132c addiu t8, fp, 0x28            |     t8 = fp + 0x28;
    0x00401330 move a0, t8                   |     a0 = t8;
    0x00401334 lw t8, -0x7fd8(gp)            |     t8 = sym.check_datetime_std::string_const_;
    0x00401338 move t9, t8                   |     t9 = t8;
    0x0040133c jalr t9                       |     t9 ();
    0x00401340 nop                           |     
    0x00401344 lw gp, 0x10(fp)               |     gp = *(argv);
    0x00401348 move t8, v0                   |     t8 = v0;
                                             |     if (t8 != 0) {
    0x0040134c beqz t8, 0x401360             |         
    0x00401350 nop                           |         
    0x00401354 move t8, zero                 |         t8 = 0;
    0x00401358 b 0x401364                    |         goto label_1;
    0x0040135c nop                           |         
                                             |     }
    0x00401360 addiu t8, zero, 1             |     t8 = 1;
                                             | label_1:
    0x00401364 move s0, t8                   |     s0 = t8;
    0x00401368 addiu t8, fp, 0x28            |     t8 = fp + 0x28;
    0x0040136c move a0, t8                   |     a0 = t8;
    0x00401370 lw t8, -0x7f5c(gp)            |     t8 = *(gp);
    0x00401374 move t9, t8                   |     t9 = t8;
    0x00401378 jalr t9                       |     t9 ();
    0x0040137c nop                           |     
    0x00401380 lw gp, 0x10(fp)               |     gp = *(argv);
    0x00401384 addiu t8, fp, 0x24            |     t8 = fp + 0x24;
    0x00401388 move a0, t8                   |     a0 = t8;
    0x0040138c lw t8, -0x7f70(gp)            |     t8 = *(gp);
    0x00401390 move t9, t8                   |     t9 = t8;
    0x00401394 jalr t9                       |     t9 ();
    0x00401398 nop                           |     
    0x0040139c lw gp, 0x10(fp)               |     gp = *(argv);
                                             | label_0:
    0x004013a0 move t8, s0                   |     t8 = s0;
    0x004013a4 move v0, t8                   |     v0 = t8;
    0x004013a8 lw t8, -0x7f38(gp)            |     t8 = *((gp - 8142));
    0x004013ac lw v1, 0x2c(fp)               |     v1 = *(arg_2ch);
    0x004013b0 lw t8, (t8)                   |     t8 = *(t8);
                                             |     if (v1 != t8) {
    0x004013b4 beq v1, t8, 0x40143c          |         
    0x004013b8 nop                           |         
    0x004013bc b 0x40142c                    |         goto label_2;
    0x004013c0 nop                           |         
                                             | label_2:
    0x0040142c lw t8, -0x7f68(gp)            |         t8 = sym.imp.__stack_chk_fail;
    0x00401430 move t9, t8                   |         t9 = t8;
    0x00401434 jalr t9                       |         t9 ();
    0x00401438 nop                           |         
                                             |     }
    0x0040143c move sp, fp                   |     
    0x00401440 lw ra, 0x3c(sp)               |     ra = *(var_3ch);
    0x00401444 lw fp, 0x38(sp)               |     fp = *(var_38h);
    0x00401448 lw s0, 0x34(sp)               |     s0 = *(var_34h);
    0x0040144c addiu sp, sp, 0x40            |     
    0x00401450 jr ra                         |     return v1;
    0x00401454 nop                           |     
                                             | }

[*] Function printf used 2 times check_dst