[*] Binary protection state of iwconfig

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


[*] Function fprintf tear down of iwconfig

    ; assembly                           | /* r2dec pseudo code output */
                                         | /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/sbin/iwconfig @ 0x400d20 */
                                         | #include <stdint.h>
                                         |  
    ; (fcn) main ()                      | int32_t main () {
                                         |     /* [11] -r-x section size 11360 named .text */
    0x00400d20 addiu sp, sp, -0x48       |     
    0x00400d24 sw ra, 0x44(sp)           |     *(var_44h) = ra;
    0x00400d28 sw fp, 0x40(sp)           |     *(var_40h) = fp;
    0x00400d2c sw s7, 0x3c(sp)           |     *(var_3ch) = s7;
    0x00400d30 sw s6, 0x38(sp)           |     *(var_38h) = s6;
    0x00400d34 sw s5, 0x34(sp)           |     *(var_34h) = s5;
    0x00400d38 sw s4, 0x30(sp)           |     *(var_30h) = s4;
    0x00400d3c sw s3, 0x2c(sp)           |     *(var_2ch) = s3;
    0x00400d40 sw s2, 0x28(sp)           |     *(var_28h) = s2;
    0x00400d44 sw s1, 0x24(sp)           |     *(var_24h) = s1;
    0x00400d48 sw s0, 0x20(sp)           |     *(var_20h) = s0;
    0x00400d4c move s1, a0               |     s1 = a0;
    0x00400d50 move s0, a1               |     s0 = a1;
    0x00400d54 jal 0x404520              |     fcn_00404520 ();
    0x00400d58 move s2, v0               |     s2 = v0;
                                         |     if (v0 < 0) {
    0x00400d5c bgez v0, 0x400d74         |         
    0x00400d60 lui a0, 0x40              |         a0 = "socket";
                                         |         /* str.socket */
    0x00400d64 addiu a0, a0, 0x3d24      |         
    0x00400d68 jal 0x404540              |         fcn_00404540 ();
    0x00400d6c addiu a0, zero, -1        |         a0 = -1;
    0x00400d70 jal 0x4046b0              |         fcn_004046b0 ();
                                         |     }
    0x00400d74 addiu t8, zero, 1         |     t8 = 1;
    0x00400d78 lui a1, 0x40              |     a1 = 0x400000;
                                         |     if (s1 == t8) {
    0x00400d7c bne s1, t8, 0x400da0      |         
    0x00400d80 lui a1, 0x40              |         a1 = 0x400000;
    0x00400d84 move a0, v0               |         a0 = v0;
                                         |         /* fcn.00402efc */
    0x00400d88 addiu a1, a1, 0x2efc      |         a1 += 0x2efc;
    0x00400d8c move a2, zero             |         a2 = 0;
    0x00400d90 move a3, zero             |         a3 = 0;
    0x00400d94 jal 0x404490              |         fcn_00404490 ();
    0x00400d98 j 0x400e24                |         goto label_1;
    0x00400d9c nop                       |         
                                         |     }
    0x00400da0 lw s3, 4(s0)              |     s3 = *((s0 + 1));
                                         |     /* esilref: '-h' */
    0x00400da4 addiu a1, a1, 0x3d2c      |     a1 += 0x3d2c;
    0x00400da8 move a0, s3               |     a0 = s3;
    0x00400dac jal 0x404660              |     fcn_00404660 ();
    0x00400db0 lui a1, 0x40              |     a1 = 0x400000;
                                         |     if (v0 != 0) {
    0x00400db4 beqz v0, 0x400dcc         |         
    0x00400db8 move a0, s3               |         a0 = s3;
                                         |         /* str.__help */
    0x00400dbc addiu a1, a1, 0x3d30      |         a1 += 0x3d30;
    0x00400dc0 jal 0x404660              |         fcn_00404660 ();
    0x00400dc4 lui a1, 0x40              |         a1 = 0x400000;
                                         |         if (v0 != 0) {
    0x00400dc8 bnez v0, 0x400e2c         |             goto label_2;
                                         |         }
                                         |     }
    0x00400dcc lui s1, 0x41              |     s1 = 0x410000;
    0x00400dd0 lui a0, 0x40              |     a0 = 0x400000;
    0x00400dd4 lw a1, 0x4970(s1)         |     a1 = *((s1 + 4700));
    0x00400dd8 lui s0, 0x40              |     s0 = 0x400000;
    0x00400ddc lui s3, 0x40              |     s3 = 0x400000;
                                         |     /* str.Usage:_iwconfig__interface__n */
    0x00400de0 addiu a0, a0, 0x3d38      |     a0 += 0x3d38;
                                         |     /* esilref: 'essid' */
    0x00400de4 addiu s0, s0, 0x41f8      |     s0 += 0x41f8;
                                         |     /* str.________________interface__s__s_n */
    0x00400de8 addiu s3, s3, 0x3d58      |     s3 += 0x3d58;
    0x00400dec jal 0x404700              |     fcn_00404700 ();
    0x00400df0 addiu s0, s0, 0x18        |     s0 += 0x18;
                                         |     do {
    0x00400df4 lw a2, -0x18(s0)          |         a2 = *((s0 - 6));
    0x00400df8 move a1, s3               |         a1 = s3;
                                         |         if (a2 == 0) {
    0x00400dfc beqz a2, 0x400e14         |             goto label_3;
                                         |         }
    0x00400e00 lw a0, 0x4970(s1)         |         a0 = *((s1 + 4700));
    0x00400e04 lw a3, -4(s0)             |         a3 = *((s0 - 1));
    0x00400e08 jal 0x4045b0              |         fcn_004045b0 ();
    0x00400e0c j 0x400df4                |         
                                         |     } while (1);
    0x00400e10 addiu s0, s0, 0x18        |     s0 += 0x18;
                                         | label_3:
    0x00400e14 lui a0, 0x40              |     a0 = 0x400000;
    0x00400e18 lw a1, 0x4970(s1)         |     a1 = *((s1 + 4700));
                                         |     /* str._______Check_man_pages_for_more_details._n */
    0x00400e1c addiu a0, a0, 0x3d7c      |     a0 += 0x3d7c;
    0x00400e20 jal 0x404700              |     fcn_00404700 ();
                                         |     do {
                                         | label_1:
    0x00400e24 j 0x401164                |         goto label_4;
    0x00400e28 move s0, zero             |         s0 = 0;
                                         | label_2:
    0x00400e2c move a0, s3               |         a0 = s3;
                                         |         /* esilref: '-v' */
    0x00400e30 addiu a1, a1, 0x3da8      |         a1 += 0x3da8;
    0x00400e34 jal 0x404660              |         fcn_00404660 ();
    0x00400e38 lui a1, 0x40              |         a1 = 0x400000;
                                         |         if (v0 != 0) {
    0x00400e3c beqz v0, 0x400e54         |             
    0x00400e40 move a0, s3               |             a0 = s3;
                                         |             /* str.__version */
    0x00400e44 addiu a1, a1, 0x3dac      |             a1 += 0x3dac;
    0x00400e48 jal 0x404660              |             fcn_00404660 ();
    0x00400e4c slti t8, s1, 3            |             t8 = (s1 < 3) ? 1 : 0;
                                         |             if (v0 != 0) {
    0x00400e50 bnez v0, 0x400e68         |                 goto label_5;
                                         |             }
                                         |         }
    0x00400e54 lui a0, 0x40              |         a0 = "iwconfig";
                                         |         /* str.iwconfig */
    0x00400e58 addiu a0, a0, 0x3db8      |         
    0x00400e5c jal 0x404720              |         fcn_00404720 ();
    0x00400e60 j 0x400ea8                |         goto label_6;
    0x00400e64 nop                       |         
                                         | label_5:
    0x00400e68 addiu t8, zero, 2         |         t8 = 2;
                                         |         if (t8 == 0) {
    0x00400e6c bnez t8, 0x400e90         |             
    0x00400e70 lui a1, 0x40              |             a1 = 0x400000;
    0x00400e74 move a0, s3               |             a0 = s3;
                                         |             /* esilref: '--' */
    0x00400e78 addiu a1, a1, 0x3a64      |             a1 += 0x3a64;
    0x00400e7c jal 0x404660              |             fcn_00404660 ();
    0x00400e80 addiu t8, zero, 2         |             t8 = 2;
                                         |             if (v0 != 0) {
    0x00400e84 bnez v0, 0x400eb0         |                 goto label_7;
                                         |             }
    0x00400e88 addiu s0, s0, 4           |             s0 += 4;
    0x00400e8c addiu s1, s1, -1          |             s1 += -1;
                                         |         }
    0x00400e90 move a0, s2               |         a0 = s2;
                                         |         if (s1 == t8) {
    0x00400e94 bne s1, t8, 0x400eb0      |             
    0x00400e98 lw a1, 4(s0)              |             a1 = *((s0 + 1));
    0x00400e9c move a2, zero             |             a2 = 0;
    0x00400ea0 move a3, zero             |             a3 = 0;
    0x00400ea4 jal 0x402efc              |             fcn_00402efc ();
                                         | label_6:
    0x00400ea8 j 0x401164                |             goto label_4;
    0x00400eac move s0, v0               |             s0 = v0;
                                         |         }
                                         | label_7:
    0x00400eb0 lw s4, 4(s0)              |         s4 = *((s0 + 1));
    0x00400eb4 addiu s5, s0, 8           |         s5 = s0 + 8;
    0x00400eb8 addiu s1, s1, -2          |         s1 += -2;
                                         | label_0:
    0x00400ebc lui s3, 0x40              |         s3 = 0x400000;
    0x00400ec0 blez s1, 0x400e24         |         
                                         |     } while (s1 <= 0);
    0x00400ec4 lw s0, (s5)               |     s0 = *(s5);
                                         |     /* esilref: 'essid' */
    0x00400ec8 addiu s3, s3, 0x41f8      |     s3 += 0x41f8;
    0x00400ecc move s6, zero             |     s6 = 0;
    0x00400ed0 move a0, s0               |     a0 = s0;
    0x00400ed4 move fp, zero             |     fp = 0;
    0x00400ed8 jal 0x4046d0              |     fcn_004046d0 ();
    0x00400edc move s7, zero             |     s7 = 0;
    0x00400ee0 sw v0, 0x18(sp)           |     *(var_18h) = v0;
                                         |     do {
    0x00400ee4 lw t1, (s3)               |         t1 = *(s3);
    0x00400ee8 lw a2, 0x18(sp)           |         a2 = *(var_18h);
                                         |         if (t1 == 0) {
    0x00400eec beqz t1, 0x400f60         |             goto label_8;
                                         |         }
    0x00400ef0 move a0, t1               |         a0 = t1;
    0x00400ef4 move a1, s0               |         a1 = s0;
    0x00400ef8 sw t1, 0x1c(sp)           |         *(var_1ch) = t1;
    0x00400efc jal 0x404570              |         fcn_00404570 ();
    0x00400f00 lw t1, 0x1c(sp)           |         t1 = *(var_1ch);
                                         |         if (v0 == 0) {
    0x00400f04 bnez v0, 0x400f54         |             
    0x00400f08 move a0, t1               |             a0 = t1;
    0x00400f0c jal 0x4046d0              |             fcn_004046d0 ();
    0x00400f10 lw t8, 0x18(sp)           |             t8 = *(var_18h);
    0x00400f14 sll t8, s6, 3             |             t8 = s6 << 3;
                                         |             if (t8 == v0) {
    0x00400f18 bne t8, v0, 0x400f34      |                 
    0x00400f1c sll s3, s6, 5             |                 s3 = s6 << 5;
    0x00400f20 subu s3, s3, t8           |                 __asm ("subu s3, s3, t8");
    0x00400f24 lui t8, 0x40              |                 t8 = 0x4041f8;
                                         |                 /* esilref: 'essid' */
    0x00400f28 addiu t8, t8, 0x41f8      |                 
    0x00400f2c j 0x400fa4                |                 goto label_9;
    0x00400f30 addu s3, t8, s3           |                 s3 = t8 + s3;
                                         |             }
    0x00400f34 addiu t8, zero, 1         |             t8 = 1;
                                         |             if (s7 != 0) {
    0x00400f38 beqz s7, 0x400f50         |                 
    0x00400f3c lw a0, 4(s3)              |                 a0 = *((s3 + 1));
    0x00400f40 lw v0, 4(s7)              |                 v0 = *((s7 + 1));
    0x00400f44 xor v0, a0, v0            |                 v0 = a0 ^ v0;
    0x00400f48 j 0x400f54                |                 goto label_10;
                                         |                 if (v0 != 0) {
    0x00400f4c movn fp, t8, v0           |                     fp = t8;
                                         |                     goto label_11;
                                         |                 }
                                         |             }
                                         | label_11:
    0x00400f50 move s7, s3               |             s7 = s3;
                                         |         }
                                         | label_10:
    0x00400f54 addiu s6, s6, 1           |         s6++;
    0x00400f58 j 0x400ee4                |         
                                         |     } while (1);
    0x00400f5c addiu s3, s3, 0x18        |     s3 += 0x18;
                                         | label_8:
    0x00400f60 lui t8, 0x41              |     t8 = 0x410000;
                                         |     if (s7 == 0) {
    0x00400f64 bnez s7, 0x400f78         |         
    0x00400f68 lui a1, 0x40              |         a1 = 0x400000;
    0x00400f6c lw a0, 0x4970(t8)         |         a0 = *((t8 + 4700));
    0x00400f70 j 0x400f90                |         goto label_12;
                                         |         /* str.iwconfig:_unknown_command___s__n */
    0x00400f74 addiu a1, a1, 0x3dc4      |         a1 += 0x3dc4;
                                         |     }
    0x00400f78 move s3, s7               |     s3 = s7;
                                         |     if (fp != 0) {
    0x00400f7c beqz fp, 0x400fa4         |         
    0x00400f80 lui t8, 0x41              |         t8 = 0x410000;
    0x00400f84 lui a1, 0x40              |         a1 = 0x400000;
    0x00400f88 lw a0, 0x4970(t8)         |         a0 = *((t8 + 4700));
                                         |         /* str.iwconfig:_command___s__is_ambiguous_n */
    0x00400f8c addiu a1, a1, 0x3de4      |         a1 += 0x3de4;
                                         | label_12:
    0x00400f90 move a2, s0               |         a2 = s0;
    0x00400f94 addiu s0, zero, -1        |         s0 = -1;
    0x00400f98 jal 0x4045b0              |         fcn_004045b0 ();
    0x00400f9c j 0x401164                |         goto label_4;
    0x00400fa0 nop                       |         
                                         |     }
                                         | label_9:
    0x00400fa4 lw t8, 8(s3)              |     t8 = *((s3 + 2));
    0x00400fa8 addiu s7, s1, -1          |     s7 = s1 + -1;
    0x00400fac slt t8, s7, t8            |     t8 = (s7 < t8) ? 1 : 0;
    0x00400fb0 addiu s5, s5, 4           |     s5 += 4;
                                         |     if (t8 == 0) {
    0x00400fb4 beqz t8, 0x401134         |         goto label_13;
                                         |     }
    0x00400fb8 addiu s0, zero, -2        |     s0 = -2;
                                         |     do {
    0x00400fbc addiu t8, zero, -7        |         t8 = -7;
    0x00400fc0 lui s6, 0x41              |         s6 = 0x410000;
    0x00400fc4 lw a3, 0xc(s3)            |         a3 = *((s3 + 3));
    0x00400fc8 xor t8, s0, t8            |         t8 = s0 ^ t8;
    0x00400fcc sltiu t8, t8, 1           |         t8 = (t8 < 1) ? 1 : 0;
    0x00400fd0 lw a0, 0x4970(s6)         |         a0 = *((s6 + 4700));
    0x00400fd4 lui a1, 0x40              |         a1 = 0x400000;
    0x00400fd8 addu a3, a3, t8           |         a3 += t8;
    0x00400fdc lw a2, 0x10(s3)           |         a2 = *((s3 + 4));
                                         |         /* str.Error_for_wireless_request___s____X__:_n */
    0x00400fe0 addiu a1, a1, 0x3e0c      |         a1 += 0x3e0c;
    0x00400fe4 jal 0x4045b0              |         fcn_004045b0 ();
    0x00400fe8 addiu v0, s0, 7           |         v0 = s0 + 7;
    0x00400fec sltiu a0, v0, 6           |         a0 = (v0 < 6) ? 1 : 0;
    0x00400ff0 move t8, s6               |         t8 = s6;
                                         |         if (a0 == 0) {
    0x00400ff4 beqz a0, 0x401164         |             goto label_4;
                                         |         }
    0x00400ff8 lui a0, 0x40              |         a0 = 0x400000;
    0x00400ffc sll v0, v0, 2             |         v0 <<= 2;
    0x00401000 addiu a0, a0, 0x41e0      |         a0 += 0x41e0;
    0x00401004 addu v0, a0, v0           |         v0 = a0 + v0;
    0x00401008 lw v0, (v0)               |         v0 = *(v0);
    0x0040100c jr v0                     |         v0 ();
    0x00401010 nop                       |         
                                         | label_13:
    0x00401134 lw t9, 4(s3)              |         t9 = *((s3 + 1));
    0x00401138 move a0, s2               |         a0 = s2;
    0x0040113c move a1, s4               |         a1 = s4;
    0x00401140 move a2, s5               |         a2 = s5;
    0x00401144 move a3, s7               |         a3 = s7;
    0x00401148 jalr t9                   |         t9 ();
    0x0040114c move s0, v0               |         s0 = v0;
    0x00401150 bltz v0, 0x400fbc         |         
                                         |     } while (v0 < 0);
    0x00401154 sll t8, s0, 2             |     t8 = s0 << 2;
    0x00401158 subu s1, s7, s0           |     __asm ("subu s1, s7, s0");
    0x0040115c j 0x400ebc                |     goto label_0;
    0x00401160 addu s5, s5, t8           |     s5 += t8;
                                         | label_4:
    0x00401164 move a0, s2               |     a0 = s2;
    0x00401168 jal 0x404730              |     fcn_00404730 ();
    0x0040116c move v0, s0               |     v0 = s0;
    0x00401170 lw ra, 0x44(sp)           |     ra = *(var_44h);
    0x00401174 lw fp, 0x40(sp)           |     fp = *(var_40h);
    0x00401178 lw s7, 0x3c(sp)           |     s7 = *(var_3ch);
    0x0040117c lw s6, 0x38(sp)           |     s6 = *(var_38h);
    0x00401180 lw s5, 0x34(sp)           |     s5 = *(var_34h);
    0x00401184 lw s4, 0x30(sp)           |     s4 = *(var_30h);
    0x00401188 lw s3, 0x2c(sp)           |     s3 = *(var_2ch);
    0x0040118c lw s2, 0x28(sp)           |     s2 = *(var_28h);
    0x00401190 lw s1, 0x24(sp)           |     s1 = *(var_24h);
    0x00401194 lw s0, 0x20(sp)           |     s0 = *(var_20h);
    0x00401198 addiu sp, sp, 0x48        |     
    0x0040119c jr ra                     |     return v0;
                                         | }

[*] Function fprintf used 1 times iwconfig