[*] Binary protection state of wifi-tool
Full RELRO Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of wifi-tool
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/sbin/wifi-tool @ 0x407b94 */
| #include <stdint.h>
|
; (fcn) aav.0x00407b94 () | void aav_0x00407b94 () {
0x00407b94 lui gp, 2 |
0x00407b98 addiu gp, gp, 0x24ac |
0x00407b9c addu gp, gp, t9 | gp += t9;
0x00407ba0 addiu sp, sp, -0x1050 |
0x00407ba4 sw ra, 0x104c(sp) | *(var_104ch) = ra;
0x00407ba8 sw fp, 0x1048(sp) | *(var_1048h) = fp;
0x00407bac move fp, sp | fp = sp;
0x00407bb0 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00407bb4 sw a0, 0x24(fp) | *(arg_24h) = a0;
0x00407bb8 sw a1, 0x20(fp) | *(arg_20h) = a1;
0x00407bbc sw a2, 0x1c(fp) | *(arg_1ch) = a2;
0x00407bc0 lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x00407bc4 lw t8, (t8) | t8 = *(t8);
0x00407bc8 sw t8, 0x1044(fp) | *(arg_1044h) = t8;
0x00407bcc sw zero, 0x30(fp) | *(arg_30h) = 0;
0x00407bd0 sw zero, 0x34(fp) | *(arg_34h) = 0;
0x00407bd4 sw zero, 0x38(fp) | *(arg_38h) = 0;
0x00407bd8 addiu t8, zero, 1 | t8 = 1;
0x00407bdc sw t8, 0x3c(fp) | *(arg_3ch) = t8;
0x00407be0 lw t8, -0x7f74(gp) | t8 = *((gp - 8157));
0x00407be4 lw t8, 0x23a4(t8) | t8 = *((t8 + 2281));
| if (t8 == 0) {
0x00407be8 bnez t8, 0x407c68 |
0x00407bec nop |
0x00407bf0 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str._etc_rtxx.dat */
0x00407bf4 addiu a0, t8, -0xcb4 | a0 = t8 + -0xcb4;
0x00407bf8 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
0x00407bfc addiu a1, t8, -0xca4 | a1 = t8 + -0xca4;
0x00407c00 lw t8, -0x7da4(gp) | t8 = sym.imp.fopen;
0x00407c04 move t9, t8 | t9 = t8;
0x00407c08 jalr t9 | t9 ();
0x00407c0c nop |
0x00407c10 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407c14 move t8, v0 | t8 = v0;
0x00407c18 sw t8, 0x2c(fp) | *(arg_2ch) = t8;
0x00407c1c lw t8, 0x2c(fp) | t8 = *(arg_2ch);
| if (t8 != 0) {
0x00407c20 bnez t8, 0x407ce0 | goto label_0;
| }
0x00407c24 nop |
0x00407c28 lw t8, -0x7dbc(gp) | t8 = *((gp - 8047));
0x00407c2c lw t8, (t8) | t8 = *(t8);
0x00407c30 move a0, t8 | a0 = t8;
0x00407c34 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.file_open_failed:__s_n */
0x00407c38 addiu a1, t8, -0xca0 | a1 = t8 + -0xca0;
0x00407c3c lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str._etc_rtxx.dat */
0x00407c40 addiu a2, t8, -0xcb4 | a2 = t8 + -0xcb4;
0x00407c44 lw t8, -0x7e04(gp) | t8 = sym.imp.fprintf
0x00407c48 move t9, t8 | t9 = t8;
0x00407c4c jalr t9 | t9 ();
0x00407c50 nop |
0x00407c54 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407c58 addiu t8, zero, -1 | t8 = -1;
0x00407c5c sw t8, 0x3c(fp) | *(arg_3ch) = t8;
0x00407c60 b 0x407f00 | goto label_1;
0x00407c64 nop |
| }
0x00407c68 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str._etc_wsc_status.dat */
0x00407c6c addiu a0, t8, -0xc88 | a0 = t8 + -0xc88;
0x00407c70 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
0x00407c74 addiu a1, t8, -0xca4 | a1 = t8 + -0xca4;
0x00407c78 lw t8, -0x7da4(gp) | t8 = sym.imp.fopen;
0x00407c7c move t9, t8 | t9 = t8;
0x00407c80 jalr t9 | t9 ();
0x00407c84 nop |
0x00407c88 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407c8c move t8, v0 | t8 = v0;
0x00407c90 sw t8, 0x2c(fp) | *(arg_2ch) = t8;
0x00407c94 lw t8, 0x2c(fp) | t8 = *(arg_2ch);
| if (t8 == 0) {
0x00407c98 bnez t8, 0x407ce0 |
0x00407c9c nop |
0x00407ca0 lw t8, -0x7dbc(gp) | t8 = *((gp - 8047));
0x00407ca4 lw t8, (t8) | t8 = *(t8);
0x00407ca8 move a0, t8 | a0 = t8;
0x00407cac lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.file_open_failed:__s_n */
0x00407cb0 addiu a1, t8, -0xca0 | a1 = t8 + -0xca0;
0x00407cb4 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str._etc_wsc_status.dat */
0x00407cb8 addiu a2, t8, -0xc88 | a2 = t8 + -0xc88;
0x00407cbc lw t8, -0x7e04(gp) | t8 = sym.imp.fprintf
0x00407cc0 move t9, t8 | t9 = t8;
0x00407cc4 jalr t9 | t9 ();
0x00407cc8 nop |
0x00407ccc lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407cd0 addiu t8, zero, -1 | t8 = -1;
0x00407cd4 sw t8, 0x3c(fp) | *(arg_3ch) = t8;
0x00407cd8 b 0x407f00 | goto label_1;
0x00407cdc nop |
| }
| label_0:
0x00407ce0 b 0x407d38 | goto label_2;
0x00407ce4 nop |
| do {
0x00407ce8 addiu t8, fp, 0x44 | t8 = fp + 0x44;
0x00407cec move a0, t8 | a0 = t8;
0x00407cf0 lw a1, 0x24(fp) | a1 = *(arg_24h);
0x00407cf4 lw t8, -0x7e3c(gp) | t8 = sym.imp.strstr;
0x00407cf8 move t9, t8 | t9 = t8;
0x00407cfc jalr t9 | t9 ();
0x00407d00 nop |
0x00407d04 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407d08 sw v0, 0x30(fp) | *(arg_30h) = v0;
0x00407d0c lw t8, 0x30(fp) | t8 = *(arg_30h);
0x00407d10 sltiu t8, t8, 1 | t8 = (t8 < 1) ? 1 : 0;
0x00407d14 andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x00407d18 beqz t8, 0x407d28 |
0x00407d1c nop |
0x00407d20 b 0x407d38 | goto label_2;
0x00407d24 nop |
| }
0x00407d28 addiu t8, zero, 1 | t8 = 1;
0x00407d2c sw t8, 0x38(fp) | *(arg_38h) = t8;
0x00407d30 b 0x407d70 | goto label_3;
0x00407d34 nop |
| label_2:
0x00407d38 addiu t8, fp, 0x44 | t8 = fp + 0x44;
0x00407d3c move a0, t8 | a0 = t8;
0x00407d40 addiu a1, zero, 0x1000 | a1 = 0x1000;
0x00407d44 lw a2, 0x2c(fp) | a2 = *(arg_2ch);
0x00407d48 lw t8, -0x7de4(gp) | t8 = sym.imp.fgets;
0x00407d4c move t9, t8 | t9 = t8;
0x00407d50 jalr t9 | t9 ();
0x00407d54 nop |
0x00407d58 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407d5c move t8, v0 | t8 = v0;
0x00407d60 sltu t8, zero, t8 | t8 = (0 < t8) ? 1 : 0;
0x00407d64 andi t8, t8, 0xff | t8 &= 0xff;
0x00407d68 bnez t8, 0x407ce8 |
| } while (t8 != 0);
0x00407d6c nop |
| label_3:
0x00407d70 lw t8, 0x38(fp) | t8 = *(arg_38h);
| if (t8 == 0) {
0x00407d74 bnez t8, 0x407db8 |
0x00407d78 nop |
0x00407d7c lw t8, -0x7dbc(gp) | t8 = *((gp - 8047));
0x00407d80 lw t8, (t8) | t8 = *(t8);
0x00407d84 move a0, t8 | a0 = t8;
0x00407d88 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.key_not_found:__s_n */
0x00407d8c addiu a1, t8, -0xc74 | a1 = t8 + -0xc74;
0x00407d90 lw a2, 0x24(fp) | a2 = *(arg_24h);
0x00407d94 lw t8, -0x7e04(gp) | t8 = sym.imp.fprintf
0x00407d98 move t9, t8 | t9 = t8;
0x00407d9c jalr t9 | t9 ();
0x00407da0 nop |
0x00407da4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407da8 addiu t8, zero, -1 | t8 = -1;
0x00407dac sw t8, 0x3c(fp) | *(arg_3ch) = t8;
0x00407db0 b 0x407f00 | goto label_1;
0x00407db4 nop |
| }
0x00407db8 lw a0, 0x30(fp) | a0 = *(arg_30h);
0x00407dbc addiu a1, zero, 0x3d | a1 = 0x3d;
0x00407dc0 lw t8, -0x7e54(gp) | t8 = sym.imp.strchr;
0x00407dc4 move t9, t8 | t9 = t8;
0x00407dc8 jalr t9 | t9 ();
0x00407dcc nop |
0x00407dd0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407dd4 sw v0, 0x30(fp) | *(arg_30h) = v0;
0x00407dd8 lw t8, 0x30(fp) | t8 = *(arg_30h);
0x00407ddc sltiu t8, t8, 1 | t8 = (t8 < 1) ? 1 : 0;
0x00407de0 andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x00407de4 beqz t8, 0x407dfc |
0x00407de8 nop |
0x00407dec addiu t8, zero, -1 | t8 = -1;
0x00407df0 sw t8, 0x3c(fp) | *(arg_3ch) = t8;
0x00407df4 b 0x407f00 | goto label_1;
0x00407df8 nop |
| }
0x00407dfc lw t8, 0x30(fp) | t8 = *(arg_30h);
0x00407e00 addiu t8, t8, 1 | t8++;
0x00407e04 sw t8, 0x30(fp) | *(arg_30h) = t8;
0x00407e08 lw a0, 0x30(fp) | a0 = *(arg_30h);
0x00407e0c addiu a1, zero, 0xa | a1 = 0xa;
0x00407e10 lw t8, -0x7e54(gp) | t8 = sym.imp.strchr;
0x00407e14 move t9, t8 | t9 = t8;
0x00407e18 jalr t9 | t9 ();
0x00407e1c nop |
0x00407e20 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407e24 sw v0, 0x34(fp) | *(arg_34h) = v0;
0x00407e28 lw t8, 0x34(fp) | t8 = *(arg_34h);
0x00407e2c sltiu t8, t8, 1 | t8 = (t8 < 1) ? 1 : 0;
0x00407e30 andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x00407e34 beqz t8, 0x407e64 |
0x00407e38 nop |
0x00407e3c lw a0, 0x30(fp) | a0 = *(arg_30h);
0x00407e40 lw t8, -0x7d58(gp) | t8 = sym.imp.strlen;
0x00407e44 move t9, t8 | t9 = t8;
0x00407e48 jalr t9 | t9 ();
0x00407e4c nop |
0x00407e50 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407e54 move t8, v0 | t8 = v0;
0x00407e58 lw v0, 0x30(fp) | v0 = *(arg_30h);
0x00407e5c addu t8, v0, t8 | t8 = v0 + t8;
0x00407e60 sw t8, 0x34(fp) | *(arg_34h) = t8;
| }
0x00407e64 lw v0, 0x34(fp) | v0 = *(arg_34h);
0x00407e68 lw t8, 0x30(fp) | t8 = *(arg_30h);
0x00407e6c sltu t8, v0, t8 | t8 = (v0 < t8) ? 1 : 0;
| if (t8 != 0) {
0x00407e70 beqz t8, 0x407e88 |
0x00407e74 nop |
0x00407e78 addiu t8, zero, -1 | t8 = -1;
0x00407e7c sw t8, 0x3c(fp) | *(arg_3ch) = t8;
0x00407e80 b 0x407f00 | goto label_1;
0x00407e84 nop |
| }
0x00407e88 lw v0, 0x34(fp) | v0 = *(arg_34h);
0x00407e8c lw t8, 0x30(fp) | t8 = *(arg_30h);
0x00407e90 subu t8, v0, t8 | __asm ("subu t8, v0, t8");
0x00407e94 sw t8, 0x40(fp) | *(arg_40h) = t8;
0x00407e98 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00407e9c lw a0, 0x20(fp) | a0 = *(arg_20h);
0x00407ea0 move a1, zero | a1 = 0;
0x00407ea4 move a2, t8 | a2 = t8;
0x00407ea8 lw t8, -0x7df8(gp) | t8 = sym.imp.memset;
0x00407eac move t9, t8 | t9 = t8;
0x00407eb0 jalr t9 | t9 ();
0x00407eb4 nop |
0x00407eb8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407ebc lw v0, 0x40(fp) | v0 = *(arg_40h);
0x00407ec0 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00407ec4 slt t8, v0, t8 | t8 = (v0 < t8) ? 1 : 0;
| if (t8 == 0) {
0x00407ec8 bnez t8, 0x407edc |
0x00407ecc nop |
0x00407ed0 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00407ed4 b 0x407ee0 | goto label_4;
0x00407ed8 nop |
| }
0x00407edc lw t8, 0x40(fp) | t8 = *(arg_40h);
| label_4:
0x00407ee0 lw a0, 0x20(fp) | a0 = *(arg_20h);
0x00407ee4 lw a1, 0x30(fp) | a1 = *(arg_30h);
0x00407ee8 move a2, t8 | a2 = t8;
0x00407eec lw t8, -0x7df0(gp) | t8 = sym.imp.strncpy;
0x00407ef0 move t9, t8 | t9 = t8;
0x00407ef4 jalr t9 | t9 ();
0x00407ef8 nop |
0x00407efc lw gp, 0x10(fp) | gp = *(arg_10h);
| label_1:
0x00407f00 lw t8, 0x2c(fp) | t8 = *(arg_2ch);
| if (t8 != 0) {
0x00407f04 beqz t8, 0x407f24 |
0x00407f08 nop |
0x00407f0c lw a0, 0x2c(fp) | a0 = *(arg_2ch);
0x00407f10 lw t8, -0x7d98(gp) | t8 = sym.imp.fclose;
0x00407f14 move t9, t8 | t9 = t8;
0x00407f18 jalr t9 | t9 ();
0x00407f1c nop |
0x00407f20 lw gp, 0x10(fp) | gp = *(arg_10h);
| }
0x00407f24 lw t8, 0x3c(fp) | t8 = *(arg_3ch);
0x00407f28 move v0, t8 | v0 = t8;
0x00407f2c lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x00407f30 lw v1, 0x1044(fp) | v1 = *(arg_1044h);
0x00407f34 lw t8, (t8) | t8 = *(t8);
| if (v1 != t8) {
0x00407f38 beq v1, t8, 0x407f50 |
0x00407f3c nop |
0x00407f40 lw t8, -0x7da8(gp) | t8 = sym.imp.__stack_chk_fail;
0x00407f44 move t9, t8 | t9 = t8;
0x00407f48 jalr t9 | t9 ();
0x00407f4c nop |
| }
0x00407f50 move sp, fp |
0x00407f54 lw ra, 0x104c(sp) | ra = *(var_104ch);
0x00407f58 lw fp, 0x1048(sp) | fp = *(var_1048h);
0x00407f5c addiu sp, sp, 0x1050 |
0x00407f60 jr ra | return v1;
0x00407f64 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/sbin/wifi-tool @ 0x40c048 */
| #include <stdint.h>
|
; (fcn) sym.dump_dhcpd_char_ () | void dump_dhcpd_char_ () {
| /* dump_dhcpd(char*) */
0x0040c048 lui gp, 2 |
0x0040c04c addiu gp, gp, -0x2008 |
0x0040c050 addu gp, gp, t9 | gp += t9;
0x0040c054 addiu sp, sp, -0x40 |
0x0040c058 sw ra, 0x3c(sp) | *(var_3ch) = ra;
0x0040c05c sw fp, 0x38(sp) | *(var_38h) = fp;
0x0040c060 move fp, sp | fp = sp;
0x0040c064 sw gp, 0x20(sp) | *(var_20h) = gp;
0x0040c068 sw a0, 0x2c(fp) | *(arg_2ch) = a0;
0x0040c06c lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x0040c070 lw t8, (t8) | t8 = *(t8);
0x0040c074 sw t8, 0x34(fp) | *(arg_34h) = t8;
0x0040c078 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str._etc_udhcpd.conf */
0x0040c07c addiu a0, t8, -0x624 | a0 = t8 + -0x624;
0x0040c080 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
0x0040c084 addiu a1, t8, -0x610 | a1 = t8 + -0x610;
0x0040c088 lw t8, -0x7da4(gp) | t8 = sym.imp.fopen;
0x0040c08c move t9, t8 | t9 = t8;
0x0040c090 jalr t9 | t9 ();
0x0040c094 nop |
0x0040c098 lw gp, 0x20(fp) | gp = *(arg_20h);
0x0040c09c move t8, v0 | t8 = v0;
0x0040c0a0 sw t8, 0x30(fp) | *(arg_30h) = t8;
0x0040c0a4 lw t8, 0x30(fp) | t8 = *(arg_30h);
| if (t8 == 0) {
0x0040c0a8 bnez t8, 0x40c0d4 |
0x0040c0ac nop |
0x0040c0b0 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.Fail_to_create_udhcpd */
0x0040c0b4 addiu a0, t8, -0x60c | a0 = t8 + -0x60c;
0x0040c0b8 lw t8, -0x7e64(gp) | t8 = sym.imp.printf;
0x0040c0bc move t9, t8 | t9 = t8;
0x0040c0c0 jalr t9 | t9 ();
0x0040c0c4 nop |
0x0040c0c8 lw gp, 0x20(fp) | gp = *(arg_20h);
0x0040c0cc b 0x40c134 | goto label_0;
0x0040c0d0 nop |
| }
0x0040c0d4 lw t8, 0x2c(fp) | t8 = *(arg_2ch);
0x0040c0d8 sw t8, 0x10(sp) | *(var_10h) = t8;
0x0040c0dc lw t8, -0x7ef8(gp) | t8 = *(gp);
0x0040c0e0 sw t8, 0x14(sp) | *(var_14h) = t8;
0x0040c0e4 lw t8, -0x7f08(gp) | t8 = *(gp);
0x0040c0e8 sw t8, 0x18(sp) | *(var_18h) = t8;
0x0040c0ec lw t8, -0x7f08(gp) | t8 = *(gp);
0x0040c0f0 sw t8, 0x1c(sp) | *(var_1ch) = t8;
0x0040c0f4 lw a0, 0x30(fp) | a0 = *(arg_30h);
0x0040c0f8 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.start_t_t_t_s_t_t_t_n_end_t_t_t_s_t_t_t_n_interface_t_t_s_t_t_t_n_option_subnet_t_s_t_t_t_n_opt_router_t_t_s_t_t_t_n_opt_dns_t_s_n */
0x0040c0fc addiu a1, t8, -0x5f4 | a1 = t8 + -0x5f4;
0x0040c100 lw a2, -0x7f00(gp) | a2 = *(gp);
0x0040c104 lw a3, -0x7efc(gp) | a3 = *(gp);
0x0040c108 lw t8, -0x7e04(gp) | t8 = sym.imp.fprintf
0x0040c10c move t9, t8 | t9 = t8;
0x0040c110 jalr t9 | t9 ();
0x0040c114 nop |
0x0040c118 lw gp, 0x20(fp) | gp = *(arg_20h);
0x0040c11c lw a0, 0x30(fp) | a0 = *(arg_30h);
0x0040c120 lw t8, -0x7d98(gp) | t8 = sym.imp.fclose;
0x0040c124 move t9, t8 | t9 = t8;
0x0040c128 jalr t9 | t9 ();
0x0040c12c nop |
0x0040c130 lw gp, 0x20(fp) | gp = *(arg_20h);
| label_0:
0x0040c134 lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x0040c138 lw v0, 0x34(fp) | v0 = *(arg_34h);
0x0040c13c lw t8, (t8) | t8 = *(t8);
| if (v0 != t8) {
0x0040c140 beq v0, t8, 0x40c158 |
0x0040c144 nop |
0x0040c148 lw t8, -0x7da8(gp) | t8 = sym.imp.__stack_chk_fail;
0x0040c14c move t9, t8 | t9 = t8;
0x0040c150 jalr t9 | t9 ();
0x0040c154 nop |
| }
0x0040c158 move sp, fp |
0x0040c15c lw ra, 0x3c(sp) | ra = *(var_3ch);
0x0040c160 lw fp, 0x38(sp) | fp = *(var_38h);
0x0040c164 addiu sp, sp, 0x40 |
0x0040c168 jr ra | return v0;
0x0040c16c nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/sbin/wifi-tool @ 0x40d23c */
| #include <stdint.h>
|
; (fcn) sym.handleDNS__ () | void handleDNS_ () {
| /* handleDNS() */
0x0040d23c lui gp, 2 |
0x0040d240 addiu gp, gp, -0x31fc |
0x0040d244 addu gp, gp, t9 | gp += t9;
0x0040d248 addiu sp, sp, -0x28 |
0x0040d24c sw ra, 0x24(sp) | *(var_24h) = ra;
0x0040d250 sw fp, 0x20(sp) | *(var_20h) = fp;
0x0040d254 move fp, sp | fp = sp;
0x0040d258 sw gp, 0x10(sp) | *(var_10h) = gp;
0x0040d25c lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x0040d260 lw t8, (t8) | t8 = *(t8);
0x0040d264 sw t8, 0x1c(fp) | *(arg_1ch) = t8;
0x0040d268 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str._etc_resolv.conf */
0x0040d26c addiu a0, t8, -0x4bc | a0 = t8 + -0x4bc;
0x0040d270 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
0x0040d274 addiu a1, t8, -0x4a8 | a1 = t8 + -0x4a8;
0x0040d278 lw t8, -0x7da4(gp) | t8 = sym.imp.fopen;
0x0040d27c move t9, t8 | t9 = t8;
0x0040d280 jalr t9 | t9 ();
0x0040d284 nop |
0x0040d288 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040d28c move t8, v0 | t8 = v0;
0x0040d290 sw t8, 0x18(fp) | *(arg_18h) = t8;
0x0040d294 lw t8, 0x18(fp) | t8 = *(arg_18h);
| if (t8 == 0) {
0x0040d298 bnez t8, 0x40d2c4 |
0x0040d29c nop |
0x0040d2a0 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.Fail_to_create_resolv.conf */
0x0040d2a4 addiu a0, t8, -0x4a4 | a0 = t8 + -0x4a4;
0x0040d2a8 lw t8, -0x7e70(gp) | t8 = sym.imp.puts;
0x0040d2ac move t9, t8 | t9 = t8;
0x0040d2b0 jalr t9 | t9 ();
0x0040d2b4 nop |
0x0040d2b8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040d2bc b 0x40d378 | goto label_0;
0x0040d2c0 nop |
| }
0x0040d2c4 lw t8, -0x7ec8(gp) | t8 = *(gp);
0x0040d2c8 lb t8, (t8) | t8 = *(t8);
| if (t8 != 0) {
0x0040d2cc beqz t8, 0x40d2f8 |
0x0040d2d0 nop |
0x0040d2d4 lw a0, 0x18(fp) | a0 = *(arg_18h);
0x0040d2d8 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.search__s__n */
0x0040d2dc addiu a1, t8, -0x488 | a1 = t8 + -0x488;
0x0040d2e0 lw a2, -0x7ec8(gp) | a2 = *(gp);
0x0040d2e4 lw t8, -0x7e04(gp) | t8 = sym.imp.fprintf
0x0040d2e8 move t9, t8 | t9 = t8;
0x0040d2ec jalr t9 | t9 ();
0x0040d2f0 nop |
0x0040d2f4 lw gp, 0x10(fp) | gp = *(arg_10h);
| }
0x0040d2f8 lw t8, -0x7ed0(gp) | t8 = *(gp);
0x0040d2fc lb t8, (t8) | t8 = *(t8);
| if (t8 != 0) {
0x0040d300 beqz t8, 0x40d32c |
0x0040d304 nop |
0x0040d308 lw a0, 0x18(fp) | a0 = *(arg_18h);
0x0040d30c lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.nameserver__s__n */
0x0040d310 addiu a1, t8, -0x47c | a1 = t8 + -0x47c;
0x0040d314 lw a2, -0x7ed0(gp) | a2 = *(gp);
0x0040d318 lw t8, -0x7e04(gp) | t8 = sym.imp.fprintf
0x0040d31c move t9, t8 | t9 = t8;
0x0040d320 jalr t9 | t9 ();
0x0040d324 nop |
0x0040d328 lw gp, 0x10(fp) | gp = *(arg_10h);
| }
0x0040d32c lw t8, -0x7ecc(gp) | t8 = *(gp);
0x0040d330 lb t8, (t8) | t8 = *(t8);
| if (t8 != 0) {
0x0040d334 beqz t8, 0x40d360 |
0x0040d338 nop |
0x0040d33c lw a0, 0x18(fp) | a0 = *(arg_18h);
0x0040d340 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.nameserver__s__n */
0x0040d344 addiu a1, t8, -0x47c | a1 = t8 + -0x47c;
0x0040d348 lw a2, -0x7ecc(gp) | a2 = *(gp);
0x0040d34c lw t8, -0x7e04(gp) | t8 = sym.imp.fprintf
0x0040d350 move t9, t8 | t9 = t8;
0x0040d354 jalr t9 | t9 ();
0x0040d358 nop |
0x0040d35c lw gp, 0x10(fp) | gp = *(arg_10h);
| }
0x0040d360 lw a0, 0x18(fp) | a0 = *(arg_18h);
0x0040d364 lw t8, -0x7d98(gp) | t8 = sym.imp.fclose;
0x0040d368 move t9, t8 | t9 = t8;
0x0040d36c jalr t9 | t9 ();
0x0040d370 nop |
0x0040d374 lw gp, 0x10(fp) | gp = *(arg_10h);
| label_0:
0x0040d378 lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x0040d37c lw v0, 0x1c(fp) | v0 = *(arg_1ch);
0x0040d380 lw t8, (t8) | t8 = *(t8);
| if (v0 != t8) {
0x0040d384 beq v0, t8, 0x40d39c |
0x0040d388 nop |
0x0040d38c lw t8, -0x7da8(gp) | t8 = sym.imp.__stack_chk_fail;
0x0040d390 move t9, t8 | t9 = t8;
0x0040d394 jalr t9 | t9 ();
0x0040d398 nop |
| }
0x0040d39c move sp, fp |
0x0040d3a0 lw ra, 0x24(sp) | ra = *(var_24h);
0x0040d3a4 lw fp, 0x20(sp) | fp = *(var_20h);
0x0040d3a8 addiu sp, sp, 0x28 |
0x0040d3ac jr ra | return v0;
0x0040d3b0 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/sbin/wifi-tool @ 0x402b20 */
| #include <stdint.h>
|
; (fcn) sym.sendCmd_char_const__int__int__int_ () | void sendCmd_char_const_int_int_int_ () {
| /* sendCmd(char const*, int, int, int) */
0x00402b20 lui gp, 2 |
0x00402b24 addiu gp, gp, 0x7520 |
0x00402b28 addu gp, gp, t9 | gp += t9;
0x00402b2c addiu sp, sp, -0xf0 |
0x00402b30 sw ra, 0xec(sp) | *(var_ech) = ra;
0x00402b34 sw fp, 0xe8(sp) | *(var_e8h) = fp;
0x00402b38 sw s0, 0xe4(sp) | *(var_e4h) = s0;
0x00402b3c move fp, sp | fp = sp;
0x00402b40 sw gp, 0x18(sp) | *(var_18h) = gp;
0x00402b44 sw a0, 0x2c(fp) | *(arg_2ch) = a0;
0x00402b48 sw a1, 0x28(fp) | *(arg_28h) = a1;
0x00402b4c sw a2, 0x24(fp) | *(arg_24h) = a2;
0x00402b50 sw a3, 0x20(fp) | *(arg_20h) = a3;
0x00402b54 lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x00402b58 lw t8, (t8) | t8 = *(t8);
0x00402b5c sw t8, 0xdc(fp) | *(arg_dch) = t8;
0x00402b60 addiu t8, fp, 0x38 | t8 = fp + 0x38;
0x00402b64 move a0, t8 | a0 = t8;
0x00402b68 lw t8, -0x7fdc(gp) | t8 = *(gp);
0x00402b6c move t9, t8 | t9 = t8;
0x00402b70 jalr t9 | t9 ();
0x00402b74 nop |
0x00402b78 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402b7c lw t8, 0x28(fp) | t8 = *(arg_28h);
0x00402b80 sw t8, 0x44(fp) | *(arg_44h) = t8;
0x00402b84 lw t8, 0x24(fp) | t8 = *(arg_24h);
0x00402b88 sw t8, 0x48(fp) | *(arg_48h) = t8;
0x00402b8c lw t8, 0x20(fp) | t8 = *(arg_20h);
0x00402b90 sw t8, 0x4c(fp) | *(arg_4ch) = t8;
0x00402b94 addiu v0, fp, 0x38 | v0 = fp + 0x38;
0x00402b98 addiu t8, fp, 0x44 | t8 = fp + 0x44;
0x00402b9c addiu v1, fp, 0x50 | v1 = fp + 0x50;
0x00402ba0 sw v1, 0x10(sp) | *(var_10h) = v1;
0x00402ba4 addiu v1, zero, 0x8c | v1 = 0x8c;
0x00402ba8 sw v1, 0x14(sp) | *(var_14h) = v1;
0x00402bac move a0, v0 | a0 = v0;
0x00402bb0 lw a1, 0x2c(fp) | a1 = *(arg_2ch);
0x00402bb4 move a2, t8 | a2 = t8;
0x00402bb8 addiu a3, zero, 0xc | a3 = 0xc;
0x00402bbc lw t8, -0x7d78(gp) | t8 = *(gp);
0x00402bc0 move t9, t8 | t9 = t8;
0x00402bc4 jalr t9 | t9 ();
0x00402bc8 nop |
0x00402bcc lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402bd0 move t8, v0 | t8 = v0;
0x00402bd4 sw t8, 0x34(fp) | *(arg_34h) = t8;
0x00402bd8 lw t8, 0x34(fp) | t8 = *(arg_34h);
| if (t8 < 0) {
0x00402bdc bgez t8, 0x402c1c |
0x00402be0 nop |
0x00402be4 lw t8, -0x7dbc(gp) | t8 = *((gp - 8047));
0x00402be8 lw t8, (t8) | t8 = *(t8);
0x00402bec move a0, t8 | a0 = t8;
0x00402bf0 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.OOPS___sendCmd_return__d_n */
0x00402bf4 addiu a1, t8, -0x1640 | a1 = t8 + -0x1640;
0x00402bf8 lw a2, 0x34(fp) | a2 = *(arg_34h);
0x00402bfc lw t8, -0x7e04(gp) | t8 = sym.imp.fprintf
0x00402c00 move t9, t8 | t9 = t8;
0x00402c04 jalr t9 | t9 ();
0x00402c08 nop |
0x00402c0c lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402c10 lw s0, 0x34(fp) | s0 = *(arg_34h);
0x00402c14 b 0x402c68 | goto label_0;
0x00402c18 nop |
| }
0x00402c1c lw t8, 0x50(fp) | t8 = *(arg_50h);
| if (t8 != 0) {
0x00402c20 beqz t8, 0x402c64 |
0x00402c24 nop |
0x00402c28 lw t8, -0x7dbc(gp) | t8 = *((gp - 8047));
0x00402c2c lw v0, (t8) | v0 = *(t8);
0x00402c30 lw t8, 0x50(fp) | t8 = *(arg_50h);
0x00402c34 move a0, v0 | a0 = v0;
0x00402c38 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* str.OOPS___sendCmd_result__d_n */
0x00402c3c addiu a1, v0, -0x1624 | a1 = v0 + -0x1624;
0x00402c40 move a2, t8 | a2 = t8;
0x00402c44 lw t8, -0x7e04(gp) | t8 = sym.imp.fprintf
0x00402c48 move t9, t8 | t9 = t8;
0x00402c4c jalr t9 | t9 ();
0x00402c50 nop |
0x00402c54 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402c58 addiu s0, zero, -1 | s0 = -1;
0x00402c5c b 0x402c68 | goto label_0;
0x00402c60 nop |
| }
0x00402c64 lw s0, 0x34(fp) | s0 = *(arg_34h);
| label_0:
0x00402c68 addiu t8, fp, 0x38 | t8 = fp + 0x38;
0x00402c6c move a0, t8 | a0 = t8;
0x00402c70 lw t8, -0x7fd4(gp) | t8 = *(gp);
0x00402c74 move t9, t8 | t9 = t8;
0x00402c78 jalr t9 | t9 ();
0x00402c7c nop |
0x00402c80 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402c84 move t8, s0 | t8 = s0;
0x00402c88 move v0, t8 | v0 = t8;
0x00402c8c lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x00402c90 lw v1, 0xdc(fp) | v1 = *(arg_dch);
0x00402c94 lw t8, (t8) | t8 = *(t8);
| if (v1 != t8) {
0x00402c98 beq v1, t8, 0x402cf4 |
0x00402c9c nop |
0x00402ca0 b 0x402ce4 | goto label_1;
0x00402ca4 nop |
| label_1:
0x00402ce4 lw t8, -0x7da8(gp) | t8 = sym.imp.__stack_chk_fail;
0x00402ce8 move t9, t8 | t9 = t8;
0x00402cec jalr t9 | t9 ();
0x00402cf0 nop |
| }
0x00402cf4 move sp, fp |
0x00402cf8 lw ra, 0xec(sp) | ra = *(var_ech);
0x00402cfc lw fp, 0xe8(sp) | fp = *(var_e8h);
0x00402d00 lw s0, 0xe4(sp) | s0 = *(var_e4h);
0x00402d04 addiu sp, sp, 0xf0 |
0x00402d08 jr ra | return v1;
0x00402d0c nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/sbin/wifi-tool @ 0x4076d0 */
| #include <stdint.h>
|
; (fcn) sym.wps_go_get_wps_status_int_ () | void wps_go_get_wps_status_int_ () {
| /* wps_go_get_wps_status(int) */
0x004076d0 lui gp, 2 |
0x004076d4 addiu gp, gp, 0x2970 |
0x004076d8 addu gp, gp, t9 | gp += t9;
0x004076dc addiu sp, sp, -0x60 |
0x004076e0 sw ra, 0x5c(sp) | *(var_5ch) = ra;
0x004076e4 sw fp, 0x58(sp) | *(var_58h) = fp;
0x004076e8 move fp, sp | fp = sp;
0x004076ec sw gp, 0x10(sp) | *(var_10h) = gp;
0x004076f0 sw a0, 0x1c(fp) | *(arg_1ch) = a0;
0x004076f4 lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x004076f8 lw t8, (t8) | t8 = *(t8);
0x004076fc sw t8, 0x54(fp) | *(arg_54h) = t8;
0x00407700 sw zero, 0x2c(fp) | *(arg_2ch) = 0;
0x00407704 sw zero, 0x28(fp) | *(arg_28h) = 0;
0x00407708 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
| if (t8 < 0) {
0x0040770c bgez t8, 0x407720 |
0x00407710 nop |
0x00407714 addiu t8, zero, -1 | t8 = -1;
0x00407718 b 0x407b54 | goto label_0;
0x0040771c nop |
| }
0x00407720 addiu t8, fp, 0x34 | t8 = fp + 0x34;
0x00407724 lui v0, 0x30 | v0 = 0x306172;
0x00407728 ori v0, v0, 0x6172 |
0x0040772c sw v0, (t8) | *(t8) = v0;
0x00407730 addiu t8, zero, 0x1000 | t8 = 0x1000;
0x00407734 move a0, t8 | a0 = t8;
0x00407738 lw t8, -0x7d44(gp) | t8 = sym.imp.malloc;
0x0040773c move t9, t8 | t9 = t8;
0x00407740 jalr t9 | t9 ();
0x00407744 nop |
0x00407748 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040774c move t8, v0 | t8 = v0;
0x00407750 sw t8, 0x30(fp) | *(arg_30h) = t8;
0x00407754 lw t8, 0x30(fp) | t8 = *(arg_30h);
0x00407758 sltiu t8, t8, 1 | t8 = (t8 < 1) ? 1 : 0;
0x0040775c andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x00407760 beqz t8, 0x40779c |
0x00407764 nop |
0x00407768 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str._s__d__Out_of_memory_n */
0x0040776c addiu a0, t8, -0xdc0 | a0 = t8 + -0xdc0;
0x00407770 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.wps_go_get_wps_status */
0x00407774 addiu a1, t8, -0x7ac | a1 = t8 + -0x7ac;
0x00407778 addiu a2, zero, 0x36 | a2 = 0x36;
0x0040777c lw t8, -0x7e64(gp) | t8 = sym.imp.printf;
0x00407780 move t9, t8 | t9 = t8;
0x00407784 jalr t9 | t9 ();
0x00407788 nop |
0x0040778c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407790 addiu t8, zero, -1 | t8 = -1;
0x00407794 b 0x407b54 | goto label_0;
0x00407798 nop |
| }
0x0040779c lw a0, 0x30(fp) | a0 = *(arg_30h);
0x004077a0 move a1, zero | a1 = 0;
0x004077a4 addiu a2, zero, 4 | a2 = 4;
0x004077a8 lw t8, -0x7df8(gp) | t8 = sym.imp.memset;
0x004077ac move t9, t8 | t9 = t8;
0x004077b0 jalr t9 | t9 ();
0x004077b4 nop |
0x004077b8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004077bc lw t8, 0x30(fp) | t8 = *(arg_30h);
0x004077c0 sw t8, 0x44(fp) | *(arg_44h) = t8;
0x004077c4 addiu t8, zero, 4 | t8 = 4;
0x004077c8 sh t8, 0x48(fp) | *(arg_48h) = t8;
0x004077cc sh zero, 0x4a(fp) | *(arg_4ah) = 0;
0x004077d0 addiu t8, fp, 0x34 | t8 = fp + 0x34;
0x004077d4 lw a0, 0x1c(fp) | a0 = *(arg_1ch);
0x004077d8 ori a1, zero, 0x8be9 | a1 = 0x8be9;
0x004077dc move a2, t8 | a2 = t8;
0x004077e0 lw t8, -0x7d54(gp) | t8 = sym.imp.ioctl;
0x004077e4 move t9, t8 | t9 = t8;
0x004077e8 jalr t9 | t9 ();
0x004077ec nop |
0x004077f0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004077f4 sw v0, 0x24(fp) | *(arg_24h) = v0;
0x004077f8 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.wsc_query_status___s__n */
0x004077fc addiu a0, t8, -0xda8 | a0 = t8 + -0xda8;
0x00407800 lw a1, 0x30(fp) | a1 = *(arg_30h);
0x00407804 lw t8, -0x7e64(gp) | t8 = sym.imp.printf;
0x00407808 move t9, t8 | t9 = t8;
0x0040780c jalr t9 | t9 ();
0x00407810 nop |
0x00407814 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407818 lw t8, 0x24(fp) | t8 = *(arg_24h);
| if (t8 < 0) {
0x0040781c bgez t8, 0x407878 |
0x00407820 nop |
0x00407824 lw t8, -0x7dbc(gp) | t8 = *((gp - 8047));
0x00407828 lw t8, (t8) | t8 = *(t8);
0x0040782c lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* str.ioctl__SIOCIWFIRSTPRIV__0x19__error__n */
0x00407830 addiu a0, v0, -0xd90 | a0 = v0 + -0xd90;
0x00407834 addiu a1, zero, 1 | a1 = 1;
0x00407838 addiu a2, zero, 0x26 | a2 = 0x26;
0x0040783c move a3, t8 | a3 = t8;
0x00407840 lw t8, -0x7d08(gp) | t8 = sym.imp.fwrite;
0x00407844 move t9, t8 | t9 = t8;
0x00407848 jalr t9 | t9 ();
0x0040784c nop |
0x00407850 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407854 lw a0, 0x30(fp) | a0 = *(arg_30h);
0x00407858 lw t8, -0x7e4c(gp) | t8 = sym.imp.free;
0x0040785c move t9, t8 | t9 = t8;
0x00407860 jalr t9 | t9 ();
0x00407864 nop |
0x00407868 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040786c addiu t8, zero, -1 | t8 = -1;
0x00407870 b 0x407b54 | goto label_0;
0x00407874 nop |
| }
0x00407878 lw a0, 0x30(fp) | a0 = *(arg_30h);
0x0040787c lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.WPS_STATUS */
0x00407880 addiu a1, t8, -0xd68 | a1 = t8 + -0xd68;
0x00407884 lw t8, -0x7e3c(gp) | t8 = sym.imp.strstr;
0x00407888 move t9, t8 | t9 = t8;
0x0040788c jalr t9 | t9 ();
0x00407890 nop |
0x00407894 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407898 sw v0, 0x2c(fp) | *(arg_2ch) = v0;
0x0040789c lw t8, 0x2c(fp) | t8 = *(arg_2ch);
0x004078a0 sltiu t8, t8, 1 | t8 = (t8 < 1) ? 1 : 0;
0x004078a4 andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x004078a8 beqz t8, 0x407904 |
0x004078ac nop |
0x004078b0 lw t8, -0x7dbc(gp) | t8 = *((gp - 8047));
0x004078b4 lw t8, (t8) | t8 = *(t8);
0x004078b8 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* str.wps_status_not_found__n */
0x004078bc addiu a0, v0, -0xd5c | a0 = v0 + -0xd5c;
0x004078c0 addiu a1, zero, 1 | a1 = 1;
0x004078c4 addiu a2, zero, 0x16 | a2 = 0x16;
0x004078c8 move a3, t8 | a3 = t8;
0x004078cc lw t8, -0x7d08(gp) | t8 = sym.imp.fwrite;
0x004078d0 move t9, t8 | t9 = t8;
0x004078d4 jalr t9 | t9 ();
0x004078d8 nop |
0x004078dc lw gp, 0x10(fp) | gp = *(arg_10h);
0x004078e0 lw a0, 0x30(fp) | a0 = *(arg_30h);
0x004078e4 lw t8, -0x7e4c(gp) | t8 = sym.imp.free;
0x004078e8 move t9, t8 | t9 = t8;
0x004078ec jalr t9 | t9 ();
0x004078f0 nop |
0x004078f4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004078f8 addiu t8, zero, -1 | t8 = -1;
0x004078fc b 0x407b54 | goto label_0;
0x00407900 nop |
| }
0x00407904 lw a0, 0x2c(fp) | a0 = *(arg_2ch);
0x00407908 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.WPS_SUCCESS */
0x0040790c addiu a1, t8, -0xd44 | a1 = t8 + -0xd44;
0x00407910 lw t8, -0x7e3c(gp) | t8 = sym.imp.strstr;
0x00407914 move t9, t8 | t9 = t8;
0x00407918 jalr t9 | t9 ();
0x0040791c nop |
0x00407920 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407924 sw v0, 0x28(fp) | *(arg_28h) = v0;
0x00407928 lw t8, 0x28(fp) | t8 = *(arg_28h);
0x0040792c sltu t8, zero, t8 | t8 = (0 < t8) ? 1 : 0;
0x00407930 andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x00407934 beqz t8, 0x40794c |
0x00407938 nop |
0x0040793c addiu t8, zero, 5 | t8 = 5;
0x00407940 sw t8, 0x24(fp) | *(arg_24h) = t8;
0x00407944 b 0x407b08 | goto label_1;
0x00407948 nop |
| }
0x0040794c lw a0, 0x2c(fp) | a0 = *(arg_2ch);
0x00407950 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.WPS_NOT_USED */
0x00407954 addiu a1, t8, -0xd38 | a1 = t8 + -0xd38;
0x00407958 lw t8, -0x7e3c(gp) | t8 = sym.imp.strstr;
0x0040795c move t9, t8 | t9 = t8;
0x00407960 jalr t9 | t9 ();
0x00407964 nop |
0x00407968 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040796c sw v0, 0x28(fp) | *(arg_28h) = v0;
0x00407970 lw t8, 0x28(fp) | t8 = *(arg_28h);
0x00407974 sltu t8, zero, t8 | t8 = (0 < t8) ? 1 : 0;
0x00407978 andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x0040797c beqz t8, 0x407994 |
0x00407980 nop |
0x00407984 addiu t8, zero, 6 | t8 = 6;
0x00407988 sw t8, 0x24(fp) | *(arg_24h) = t8;
0x0040798c b 0x407b08 | goto label_1;
0x00407990 nop |
| }
0x00407994 lw a0, 0x2c(fp) | a0 = *(arg_2ch);
0x00407998 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.WPS_PBC_TOO_MANY_AP */
0x0040799c addiu a1, t8, -0xd28 | a1 = t8 + -0xd28;
0x004079a0 lw t8, -0x7e3c(gp) | t8 = sym.imp.strstr;
0x004079a4 move t9, t8 | t9 = t8;
0x004079a8 jalr t9 | t9 ();
0x004079ac nop |
0x004079b0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004079b4 sw v0, 0x28(fp) | *(arg_28h) = v0;
0x004079b8 lw t8, 0x28(fp) | t8 = *(arg_28h);
0x004079bc sltu t8, zero, t8 | t8 = (0 < t8) ? 1 : 0;
0x004079c0 andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x004079c4 beqz t8, 0x4079dc |
0x004079c8 nop |
0x004079cc addiu t8, zero, 2 | t8 = 2;
0x004079d0 sw t8, 0x24(fp) | *(arg_24h) = t8;
0x004079d4 b 0x407b08 | goto label_1;
0x004079d8 nop |
| }
0x004079dc lw a0, 0x2c(fp) | a0 = *(arg_2ch);
0x004079e0 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.WPS_PBC_NO_AP */
0x004079e4 addiu a1, t8, -0xd14 | a1 = t8 + -0xd14;
0x004079e8 lw t8, -0x7e3c(gp) | t8 = sym.imp.strstr;
0x004079ec move t9, t8 | t9 = t8;
0x004079f0 jalr t9 | t9 ();
0x004079f4 nop |
0x004079f8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004079fc sw v0, 0x28(fp) | *(arg_28h) = v0;
0x00407a00 lw t8, 0x28(fp) | t8 = *(arg_28h);
0x00407a04 sltu t8, zero, t8 | t8 = (0 < t8) ? 1 : 0;
0x00407a08 andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x00407a0c beqz t8, 0x407a24 |
0x00407a10 nop |
0x00407a14 addiu t8, zero, 3 | t8 = 3;
0x00407a18 sw t8, 0x24(fp) | *(arg_24h) = t8;
0x00407a1c b 0x407b08 | goto label_1;
0x00407a20 nop |
| }
0x00407a24 lw a0, 0x2c(fp) | a0 = *(arg_2ch);
0x00407a28 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.WPS_NOT_COMPLETE */
0x00407a2c addiu a1, t8, -0xd04 | a1 = t8 + -0xd04;
0x00407a30 lw t8, -0x7e3c(gp) | t8 = sym.imp.strstr;
0x00407a34 move t9, t8 | t9 = t8;
0x00407a38 jalr t9 | t9 ();
0x00407a3c nop |
0x00407a40 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407a44 sw v0, 0x28(fp) | *(arg_28h) = v0;
0x00407a48 lw t8, 0x28(fp) | t8 = *(arg_28h);
0x00407a4c sltu t8, zero, t8 | t8 = (0 < t8) ? 1 : 0;
0x00407a50 andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x00407a54 beqz t8, 0x407a6c |
0x00407a58 nop |
0x00407a5c addiu t8, zero, 4 | t8 = 4;
0x00407a60 sw t8, 0x24(fp) | *(arg_24h) = t8;
0x00407a64 b 0x407b08 | goto label_1;
0x00407a68 nop |
| }
0x00407a6c lw a0, 0x2c(fp) | a0 = *(arg_2ch);
0x00407a70 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.WPS_IN_PROGRESS */
0x00407a74 addiu a1, t8, -0xcf0 | a1 = t8 + -0xcf0;
0x00407a78 lw t8, -0x7e3c(gp) | t8 = sym.imp.strstr;
0x00407a7c move t9, t8 | t9 = t8;
0x00407a80 jalr t9 | t9 ();
0x00407a84 nop |
0x00407a88 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407a8c sw v0, 0x28(fp) | *(arg_28h) = v0;
0x00407a90 lw t8, 0x28(fp) | t8 = *(arg_28h);
0x00407a94 sltu t8, zero, t8 | t8 = (0 < t8) ? 1 : 0;
0x00407a98 andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x00407a9c beqz t8, 0x407ab4 |
0x00407aa0 nop |
0x00407aa4 addiu t8, zero, 1 | t8 = 1;
0x00407aa8 sw t8, 0x24(fp) | *(arg_24h) = t8;
0x00407aac b 0x407b08 | goto label_1;
0x00407ab0 nop |
| }
0x00407ab4 lw t8, -0x7dbc(gp) | t8 = *((gp - 8047));
0x00407ab8 lw t8, (t8) | t8 = *(t8);
0x00407abc lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* str.wps_status_unknown__n */
0x00407ac0 addiu a0, v0, -0xce0 | a0 = v0 + -0xce0;
0x00407ac4 addiu a1, zero, 1 | a1 = 1;
0x00407ac8 addiu a2, zero, 0x14 | a2 = 0x14;
0x00407acc move a3, t8 | a3 = t8;
0x00407ad0 lw t8, -0x7d08(gp) | t8 = sym.imp.fwrite;
0x00407ad4 move t9, t8 | t9 = t8;
0x00407ad8 jalr t9 | t9 ();
0x00407adc nop |
0x00407ae0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407ae4 lw a0, 0x30(fp) | a0 = *(arg_30h);
0x00407ae8 lw t8, -0x7e4c(gp) | t8 = sym.imp.free;
0x00407aec move t9, t8 | t9 = t8;
0x00407af0 jalr t9 | t9 ();
0x00407af4 nop |
0x00407af8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407afc addiu t8, zero, -1 | t8 = -1;
0x00407b00 b 0x407b54 | goto label_0;
0x00407b04 nop |
| label_1:
0x00407b08 lw t8, -0x7d8c(gp) | t8 = *((gp - 8035));
0x00407b0c lw t8, (t8) | t8 = *(t8);
0x00407b10 move a0, t8 | a0 = t8;
0x00407b14 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.wps_status:__d__s_n */
0x00407b18 addiu a1, t8, -0xcc8 | a1 = t8 + -0xcc8;
0x00407b1c lw a2, 0x24(fp) | a2 = *(arg_24h);
0x00407b20 lw a3, 0x28(fp) | a3 = *(arg_28h);
0x00407b24 lw t8, -0x7e04(gp) | t8 = sym.imp.fprintf
0x00407b28 move t9, t8 | t9 = t8;
0x00407b2c jalr t9 | t9 ();
0x00407b30 nop |
0x00407b34 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407b38 lw a0, 0x30(fp) | a0 = *(arg_30h);
0x00407b3c lw t8, -0x7e4c(gp) | t8 = sym.imp.free;
0x00407b40 move t9, t8 | t9 = t8;
0x00407b44 jalr t9 | t9 ();
0x00407b48 nop |
0x00407b4c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407b50 lw t8, 0x24(fp) | t8 = *(arg_24h);
| label_0:
0x00407b54 move v0, t8 | v0 = t8;
0x00407b58 lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x00407b5c lw v1, 0x54(fp) | v1 = *(arg_54h);
0x00407b60 lw t8, (t8) | t8 = *(t8);
| if (v1 != t8) {
0x00407b64 beq v1, t8, 0x407b7c |
0x00407b68 nop |
0x00407b6c lw t8, -0x7da8(gp) | t8 = sym.imp.__stack_chk_fail;
0x00407b70 move t9, t8 | t9 = t8;
0x00407b74 jalr t9 | t9 ();
0x00407b78 nop |
| }
0x00407b7c move sp, fp |
0x00407b80 lw ra, 0x5c(sp) | ra = *(var_5ch);
0x00407b84 lw fp, 0x58(sp) | fp = *(var_58h);
0x00407b88 addiu sp, sp, 0x60 |
0x00407b8c jr ra | return v1;
0x00407b90 nop |
| }
[*] Function fprintf used 11 times wifi-tool