[*] Binary protection state of ir

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


[*] Function printf tear down of ir

    ; assembly                               | /* r2dec pseudo code output */
                                             | /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/sbin/ir @ 0x4010a8 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) main ()                          | int32_t main () {
    0x004010a8 lui gp, 2                     |     
    0x004010ac addiu gp, gp, -0x6078         |     
    0x004010b0 addu gp, gp, t9               |     gp += t9;
    0x004010b4 addiu sp, sp, -0x48           |     
    0x004010b8 sw ra, 0x44(sp)               |     *(var_44h) = ra;
    0x004010bc sw fp, 0x40(sp)               |     *(var_40h) = fp;
    0x004010c0 sw s0, 0x3c(sp)               |     *(var_3ch) = s0;
    0x004010c4 move fp, sp                   |     fp = sp;
    0x004010c8 sw gp, 0x10(sp)               |     *(var_10h) = gp;
    0x004010cc sw a0, 0x1c(fp)               |     *(arg_1ch) = a0;
    0x004010d0 sw a1, 0x18(fp)               |     *(envp) = a1;
    0x004010d4 lw t8, -0x7f38(gp)            |     t8 = *((gp - 8142));
    0x004010d8 lw t8, (t8)                   |     t8 = *(t8);
    0x004010dc sw t8, 0x34(fp)               |     *(arg_34h) = t8;
    0x004010e0 lw t8, 0x1c(fp)               |     t8 = *(arg_1ch);
    0x004010e4 slti t8, t8, 3                |     t8 = (t8 < 3) ? 1 : 0;
                                             |     if (t8 != 0) {
    0x004010e8 beqz t8, 0x401118             |         
    0x004010ec nop                           |         
    0x004010f0 lw t8, -0x7fd4(gp)            |         t8 = *(gp);
                                             |         /* str.please_input_currect_parameters. */
    0x004010f4 addiu a0, t8, 0x2000          |         a0 = t8 + 0x2000;
    0x004010f8 lw t8, -0x7f9c(gp)            |         t8 = sym.imp.printf
    0x004010fc move t9, t8                   |         t9 = t8;
    0x00401100 jalr t9                       |         t9 ();
    0x00401104 nop                           |         
    0x00401108 lw gp, 0x10(fp)               |         gp = *(argv);
    0x0040110c addiu s0, zero, 1             |         s0 = 1;
    0x00401110 b 0x4012e8                    |         goto label_0;
    0x00401114 nop                           |         
                                             |     }
    0x00401118 lw t8, -0x7fd0(gp)            |     t8 = sym.initSignal__;
    0x0040111c move t9, t8                   |     t9 = t8;
    0x00401120 jalr t9                       |     t9 ();
    0x00401124 nop                           |     
    0x00401128 lw gp, 0x10(fp)               |     gp = *(argv);
    0x0040112c move t8, v0                   |     t8 = v0;
    0x00401130 xori t8, t8, 1                |     t8 ^= 1;
    0x00401134 andi t8, t8, 0xff             |     t8 &= 0xff;
                                             |     if (t8 != 0) {
    0x00401138 beqz t8, 0x401168             |         
    0x0040113c nop                           |         
    0x00401140 lw t8, -0x7fd4(gp)            |         t8 = *(gp);
                                             |         /* str.set_up_signal_interrupt_fail. */
    0x00401144 addiu a0, t8, 0x2024          |         a0 = t8 + 0x2024;
    0x00401148 lw t8, -0x7f9c(gp)            |         t8 = sym.imp.printf
    0x0040114c move t9, t8                   |         t9 = t8;
    0x00401150 jalr t9                       |         t9 ();
    0x00401154 nop                           |         
    0x00401158 lw gp, 0x10(fp)               |         gp = *(argv);
    0x0040115c addiu s0, zero, 1             |         s0 = 1;
    0x00401160 b 0x4012e8                    |         goto label_0;
    0x00401164 nop                           |         
                                             |     }
    0x00401168 lw t8, 0x18(fp)               |     t8 = *(envp);
    0x0040116c addiu t8, t8, 4               |     t8 += 4;
    0x00401170 lw t8, (t8)                   |     t8 = *(t8);
    0x00401174 move a0, t8                   |     a0 = t8;
    0x00401178 lw t8, -0x7f98(gp)            |     t8 = sym.imp.atoi;
    0x0040117c move t9, t8                   |     t9 = t8;
    0x00401180 jalr t9                       |     t9 ();
    0x00401184 nop                           |     
    0x00401188 lw gp, 0x10(fp)               |     gp = *(argv);
    0x0040118c sw v0, 0x24(fp)               |     *(arg_24h) = v0;
    0x00401190 lw t8, 0x18(fp)               |     t8 = *(envp);
    0x00401194 addiu t8, t8, 8               |     t8 += 8;
    0x00401198 lw t8, (t8)                   |     t8 = *(t8);
    0x0040119c move a0, t8                   |     a0 = t8;
    0x004011a0 lw t8, -0x7f98(gp)            |     t8 = sym.imp.atoi;
    0x004011a4 move t9, t8                   |     t9 = t8;
    0x004011a8 jalr t9                       |     t9 ();
    0x004011ac nop                           |     
    0x004011b0 lw gp, 0x10(fp)               |     gp = *(argv);
    0x004011b4 sw v0, 0x28(fp)               |     *(arg_28h) = v0;
    0x004011b8 lw v0, 0x24(fp)               |     v0 = *(arg_24h);
    0x004011bc lw t8, 0x28(fp)               |     t8 = *(arg_28h);
    0x004011c0 slt t8, v0, t8                |     t8 = (v0 < t8) ? 1 : 0;
                                             |     if (t8 != 0) {
    0x004011c4 beqz t8, 0x401218             |         
    0x004011c8 nop                           |         
    0x004011cc move a0, zero                 |         a0 = 0;
    0x004011d0 lw t8, -0x7f64(gp)            |         t8 = sym.imp.time;
    0x004011d4 move t9, t8                   |         t9 = t8;
    0x004011d8 jalr t9                       |         t9 ();
    0x004011dc nop                           |         
    0x004011e0 lw gp, 0x10(fp)               |         gp = *(argv);
    0x004011e4 move t8, v0                   |         t8 = v0;
    0x004011e8 lw v0, -0x7fd4(gp)            |         v0 = *(gp);
                                             |         /* str.start:_d_now:_ld_end:_d_n */
    0x004011ec addiu a0, v0, 0x2044          |         a0 = v0 + 0x2044;
    0x004011f0 lw a1, 0x24(fp)               |         a1 = *(arg_24h);
    0x004011f4 move a2, t8                   |         a2 = t8;
    0x004011f8 lw a3, 0x28(fp)               |         a3 = *(arg_28h);
    0x004011fc lw t8, -0x7f9c(gp)            |         t8 = sym.imp.printf
    0x00401200 move t9, t8                   |         t9 = t8;
    0x00401204 jalr t9                       |         t9 ();
    0x00401208 nop                           |         
    0x0040120c lw gp, 0x10(fp)               |         gp = *(argv);
    0x00401210 b 0x401234                    |         goto label_1;
    0x00401214 nop                           |         
                                             |     }
    0x00401218 lw t8, -0x7fd4(gp)            |     t8 = *(gp);
                                             |     /* str.Error__StartTime___iEndTime */
    0x0040121c addiu a0, t8, 0x2060          |     a0 = t8 + 0x2060;
    0x00401220 lw t8, -0x7fa0(gp)            |     t8 = sym.imp.puts;
    0x00401224 move t9, t8                   |     t9 = t8;
    0x00401228 jalr t9                       |     t9 ();
    0x0040122c nop                           |     
    0x00401230 lw gp, 0x10(fp)               |     gp = *(argv);
                                             | label_1:
    0x00401234 addiu t8, fp, 0x2c            |     t8 = fp + 0x2c;
    0x00401238 move a0, t8                   |     a0 = t8;
    0x0040123c lw t8, -0x7fcc(gp)            |     t8 = *(gp);
    0x00401240 move t9, t8                   |     t9 = t8;
    0x00401244 jalr t9                       |     t9 ();
    0x00401248 nop                           |     
    0x0040124c lw gp, 0x10(fp)               |     gp = *(argv);
    0x00401250 addiu t8, fp, 0x2c            |     t8 = fp + 0x2c;
    0x00401254 move a0, t8                   |     a0 = t8;
    0x00401258 lw t8, -0x7fc8(gp)            |     t8 = *(gp);
    0x0040125c move t9, t8                   |     t9 = t8;
    0x00401260 jalr t9                       |     t9 ();
    0x00401264 nop                           |     
    0x00401268 lw gp, 0x10(fp)               |     gp = *(argv);
    0x0040126c b 0x40128c                    |     goto label_2;
    0x00401270 nop                           |     
                                             |     do {
    0x00401274 addiu a0, zero, 1             |         a0 = 1;
    0x00401278 lw t8, -0x7f40(gp)            |         t8 = sym.imp.sleep;
    0x0040127c move t9, t8                   |         t9 = t8;
    0x00401280 jalr t9                       |         t9 ();
    0x00401284 nop                           |         
    0x00401288 lw gp, 0x10(fp)               |         gp = *(argv);
                                             | label_2:
    0x0040128c lw t8, -0x7fdc(gp)            |         t8 = *(gp);
    0x00401290 lbu t8, (t8)                  |         t8 = *(t8);
    0x00401294 addiu v0, fp, 0x2c            |         v0 = fp + 0x2c;
    0x00401298 move a0, v0                   |         a0 = v0;
    0x0040129c lw a1, 0x24(fp)               |         a1 = *(arg_24h);
    0x004012a0 lw a2, 0x28(fp)               |         a2 = *(arg_28h);
    0x004012a4 move a3, t8                   |         a3 = t8;
    0x004012a8 lw t8, -0x7fc4(gp)            |         t8 = *(gp);
    0x004012ac move t9, t8                   |         t9 = t8;
    0x004012b0 jalr t9                       |         t9 ();
    0x004012b4 nop                           |         
    0x004012b8 lw gp, 0x10(fp)               |         gp = *(argv);
    0x004012bc move t8, v0                   |         t8 = v0;
    0x004012c0 bnez t8, 0x401274             |         
                                             |     } while (t8 != 0);
    0x004012c4 nop                           |     
    0x004012c8 move s0, zero                 |     s0 = 0;
    0x004012cc addiu t8, fp, 0x2c            |     t8 = fp + 0x2c;
    0x004012d0 move a0, t8                   |     a0 = t8;
    0x004012d4 lw t8, -0x7fc0(gp)            |     t8 = *(gp);
    0x004012d8 move t9, t8                   |     t9 = t8;
    0x004012dc jalr t9                       |     t9 ();
    0x004012e0 nop                           |     
    0x004012e4 lw gp, 0x10(fp)               |     gp = *(argv);
                                             | label_0:
    0x004012e8 move t8, s0                   |     t8 = s0;
    0x004012ec move v0, t8                   |     v0 = t8;
    0x004012f0 lw t8, -0x7f38(gp)            |     t8 = *((gp - 8142));
    0x004012f4 lw v1, 0x34(fp)               |     v1 = *(arg_34h);
    0x004012f8 lw t8, (t8)                   |     t8 = *(t8);
                                             |     if (v1 != t8) {
    0x004012fc beq v1, t8, 0x401358          |         
    0x00401300 nop                           |         
    0x00401304 b 0x401348                    |         goto label_3;
    0x00401308 nop                           |         
                                             | label_3:
    0x00401348 lw t8, -0x7f60(gp)            |         t8 = sym.imp.__stack_chk_fail;
    0x0040134c move t9, t8                   |         t9 = t8;
    0x00401350 jalr t9                       |         t9 ();
    0x00401354 nop                           |         
                                             |     }
    0x00401358 move sp, fp                   |     
    0x0040135c lw ra, 0x44(sp)               |     ra = *(var_44h);
    0x00401360 lw fp, 0x40(sp)               |     fp = *(var_40h);
    0x00401364 lw s0, 0x3c(sp)               |     s0 = *(var_3ch);
    0x00401368 addiu sp, sp, 0x48            |     
    0x0040136c jr ra                         |     return v1;
    0x00401370 nop                           |     
                                             | }

[*] Function printf used 4 times ir