[*] Binary protection state of wifi-tool
Full RELRO Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function printf 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 @ 0x407f68 */
| #include <stdint.h>
|
; (fcn) aav.0x00407f68 () | void aav_0x00407f68 () {
0x00407f68 lui gp, 2 |
0x00407f6c addiu gp, gp, 0x20d8 |
0x00407f70 addu gp, gp, t9 | gp += t9;
0x00407f74 addiu sp, sp, -0x230 |
0x00407f78 sw ra, 0x22c(sp) | *(var_22ch) = ra;
0x00407f7c sw fp, 0x228(sp) | *(var_228h) = fp;
0x00407f80 move fp, sp | fp = sp;
0x00407f84 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00407f88 sw a0, 0x1c(fp) | *(arg_1ch) = a0;
0x00407f8c lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x00407f90 lw t8, (t8) | t8 = *(t8);
0x00407f94 sw t8, 0x224(fp) | *(arg_224h) = t8;
0x00407f98 lw a0, 0x1c(fp) | a0 = *(arg_1ch);
0x00407f9c move a1, zero | a1 = 0;
0x00407fa0 addiu a2, zero, 0x194 | a2 = 0x194;
0x00407fa4 lw t8, -0x7df8(gp) | t8 = sym.imp.memset;
0x00407fa8 move t9, t8 | t9 = t8;
0x00407fac jalr t9 | t9 ();
0x00407fb0 nop |
0x00407fb4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407fb8 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00407fbc lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* str.SSID */
0x00407fc0 addiu a0, v0, -0xc60 | a0 = v0 + -0xc60;
0x00407fc4 move a1, t8 | a1 = t8;
0x00407fc8 addiu a2, zero, 0x200 | a2 = 0x200;
0x00407fcc lw t8, -0x7fa0(gp) | t8 = *(gp);
| /* aav.0x00407b94 */
0x00407fd0 addiu t8, t8, 0x7b94 | t8 += 0x7b94;
0x00407fd4 move t9, t8 | t9 = t8;
0x00407fd8 jalr t9 | t9 ();
0x00407fdc nop |
0x00407fe0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00407fe4 move t8, v0 | t8 = v0;
0x00407fe8 srl t8, t8, 0x1f | t8 >>= 0x1f;
0x00407fec andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x00407ff0 beqz t8, 0x408020 |
0x00407ff4 nop |
0x00407ff8 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.fail_to_load_SSID_from_config */
0x00407ffc addiu a0, t8, -0xc58 | a0 = t8 + -0xc58;
0x00408000 lw t8, -0x7e64(gp) | t8 = sym.imp.printf
0x00408004 move t9, t8 | t9 = t8;
0x00408008 jalr t9 | t9 ();
0x0040800c nop |
0x00408010 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408014 addiu t8, zero, -1 | t8 = -1;
0x00408018 b 0x408580 | goto label_0;
0x0040801c nop |
| }
0x00408020 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00408024 addiu v0, t8, 8 | v0 = t8 + 8;
0x00408028 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x0040802c move a0, v0 | a0 = v0;
0x00408030 move a1, t8 | a1 = t8;
0x00408034 addiu a2, zero, 0x20 | a2 = 0x20;
0x00408038 lw t8, -0x7df0(gp) | t8 = sym.imp.strncpy;
0x0040803c move t9, t8 | t9 = t8;
0x00408040 jalr t9 | t9 ();
0x00408044 nop |
0x00408048 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040804c lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00408050 sw zero, 4(t8) | *((t8 + 4)) = 0;
0x00408054 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00408058 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* esilref: 'AuthMode=' */
0x0040805c addiu a0, v0, -0xc38 | a0 = v0 + -0xc38;
0x00408060 move a1, t8 | a1 = t8;
0x00408064 addiu a2, zero, 0x200 | a2 = 0x200;
0x00408068 lw t8, -0x7fa0(gp) | t8 = *(gp);
| /* aav.0x00407b94 */
0x0040806c addiu t8, t8, 0x7b94 | t8 += 0x7b94;
0x00408070 move t9, t8 | t9 = t8;
0x00408074 jalr t9 | t9 ();
0x00408078 nop |
0x0040807c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408080 move t8, v0 | t8 = v0;
0x00408084 srl t8, t8, 0x1f | t8 >>= 0x1f;
0x00408088 andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x0040808c beqz t8, 0x4080bc |
0x00408090 nop |
0x00408094 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.fail_to_load_AuthMode_from_config */
0x00408098 addiu a0, t8, -0xc2c | a0 = t8 + -0xc2c;
0x0040809c lw t8, -0x7e64(gp) | t8 = sym.imp.printf
0x004080a0 move t9, t8 | t9 = t8;
0x004080a4 jalr t9 | t9 ();
0x004080a8 nop |
0x004080ac lw gp, 0x10(fp) | gp = *(arg_10h);
0x004080b0 addiu t8, zero, -1 | t8 = -1;
0x004080b4 b 0x408580 | goto label_0;
0x004080b8 nop |
| }
0x004080bc addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x004080c0 move a0, t8 | a0 = t8;
0x004080c4 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* esilref: 'OPEN' */
0x004080c8 addiu a1, t8, -0xc08 | a1 = t8 + -0xc08;
0x004080cc lw t8, -0x7e40(gp) | t8 = sym.imp.strcmp;
0x004080d0 move t9, t8 | t9 = t8;
0x004080d4 jalr t9 | t9 ();
0x004080d8 nop |
0x004080dc lw gp, 0x10(fp) | gp = *(arg_10h);
0x004080e0 move t8, v0 | t8 = v0;
| if (t8 == 0) {
0x004080e4 bnez t8, 0x4080fc |
0x004080e8 nop |
0x004080ec lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x004080f0 sw zero, 0x30(t8) | *((t8 + 48)) = 0;
0x004080f4 b 0x40828c | goto label_1;
0x004080f8 nop |
| }
0x004080fc addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00408100 move a0, t8 | a0 = t8;
0x00408104 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* esilref: 'WPAPSK' */
0x00408108 addiu a1, t8, -0xc00 | a1 = t8 + -0xc00;
0x0040810c lw t8, -0x7e40(gp) | t8 = sym.imp.strcmp;
0x00408110 move t9, t8 | t9 = t8;
0x00408114 jalr t9 | t9 ();
0x00408118 nop |
0x0040811c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408120 move t8, v0 | t8 = v0;
| if (t8 == 0) {
0x00408124 bnez t8, 0x408140 |
0x00408128 nop |
0x0040812c lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00408130 addiu v0, zero, 2 | v0 = 2;
0x00408134 sw v0, 0x30(t8) | *((t8 + 48)) = v0;
0x00408138 b 0x40828c | goto label_1;
0x0040813c nop |
| }
0x00408140 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00408144 move a0, t8 | a0 = t8;
0x00408148 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* esilref: 'SHARED' */
0x0040814c addiu a1, t8, -0xbf8 | a1 = t8 + -0xbf8;
0x00408150 lw t8, -0x7e40(gp) | t8 = sym.imp.strcmp;
0x00408154 move t9, t8 | t9 = t8;
0x00408158 jalr t9 | t9 ();
0x0040815c nop |
0x00408160 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408164 move t8, v0 | t8 = v0;
| if (t8 == 0) {
0x00408168 bnez t8, 0x408184 |
0x0040816c nop |
0x00408170 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00408174 addiu v0, zero, 1 | v0 = 1;
0x00408178 sw v0, 0x30(t8) | *((t8 + 48)) = v0;
0x0040817c b 0x40828c | goto label_1;
0x00408180 nop |
| }
0x00408184 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00408188 move a0, t8 | a0 = t8;
0x0040818c lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* esilref: 'WPA' */
0x00408190 addiu a1, t8, -0xbf0 | a1 = t8 + -0xbf0;
0x00408194 lw t8, -0x7e40(gp) | t8 = sym.imp.strcmp;
0x00408198 move t9, t8 | t9 = t8;
0x0040819c jalr t9 | t9 ();
0x004081a0 nop |
0x004081a4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004081a8 move t8, v0 | t8 = v0;
| if (t8 == 0) {
0x004081ac bnez t8, 0x4081c8 |
0x004081b0 nop |
0x004081b4 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x004081b8 addiu v0, zero, 2 | v0 = 2;
0x004081bc sw v0, 0x30(t8) | *((t8 + 48)) = v0;
0x004081c0 b 0x40828c | goto label_1;
0x004081c4 nop |
| }
0x004081c8 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x004081cc move a0, t8 | a0 = t8;
0x004081d0 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.WPA2 */
0x004081d4 addiu a1, t8, -0xbec | a1 = t8 + -0xbec;
0x004081d8 lw t8, -0x7e40(gp) | t8 = sym.imp.strcmp;
0x004081dc move t9, t8 | t9 = t8;
0x004081e0 jalr t9 | t9 ();
0x004081e4 nop |
0x004081e8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004081ec move t8, v0 | t8 = v0;
| if (t8 == 0) {
0x004081f0 bnez t8, 0x40820c |
0x004081f4 nop |
0x004081f8 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x004081fc addiu v0, zero, 3 | v0 = 3;
0x00408200 sw v0, 0x30(t8) | *((t8 + 48)) = v0;
0x00408204 b 0x40828c | goto label_1;
0x00408208 nop |
| }
0x0040820c addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00408210 move a0, t8 | a0 = t8;
0x00408214 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.WPA2PSK */
0x00408218 addiu a1, t8, -0xbe4 | a1 = t8 + -0xbe4;
0x0040821c lw t8, -0x7e40(gp) | t8 = sym.imp.strcmp;
0x00408220 move t9, t8 | t9 = t8;
0x00408224 jalr t9 | t9 ();
0x00408228 nop |
0x0040822c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408230 move t8, v0 | t8 = v0;
| if (t8 == 0) {
0x00408234 bnez t8, 0x408250 |
0x00408238 nop |
0x0040823c lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00408240 addiu v0, zero, 5 | v0 = 5;
0x00408244 sw v0, 0x30(t8) | *((t8 + 48)) = v0;
0x00408248 b 0x40828c | goto label_1;
0x0040824c nop |
| }
0x00408250 lw t8, -0x7dbc(gp) | t8 = *((gp - 8047));
0x00408254 lw t8, (t8) | t8 = *(t8);
0x00408258 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* str.Invalid_auth_mode_config_n */
0x0040825c addiu a0, v0, -0xbdc | a0 = v0 + -0xbdc;
0x00408260 addiu a1, zero, 1 | a1 = 1;
0x00408264 addiu a2, zero, 0x19 | a2 = 0x19;
0x00408268 move a3, t8 | a3 = t8;
0x0040826c lw t8, -0x7d08(gp) | t8 = sym.imp.fwrite;
0x00408270 move t9, t8 | t9 = t8;
0x00408274 jalr t9 | t9 ();
0x00408278 nop |
0x0040827c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408280 addiu t8, zero, -1 | t8 = -1;
0x00408284 b 0x408580 | goto label_0;
0x00408288 nop |
| label_1:
0x0040828c addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00408290 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* str.EncrypType */
0x00408294 addiu a0, v0, -0xbc0 | a0 = v0 + -0xbc0;
0x00408298 move a1, t8 | a1 = t8;
0x0040829c addiu a2, zero, 0x200 | a2 = 0x200;
0x004082a0 lw t8, -0x7fa0(gp) | t8 = *(gp);
| /* aav.0x00407b94 */
0x004082a4 addiu t8, t8, 0x7b94 | t8 += 0x7b94;
0x004082a8 move t9, t8 | t9 = t8;
0x004082ac jalr t9 | t9 ();
0x004082b0 nop |
0x004082b4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004082b8 move t8, v0 | t8 = v0;
0x004082bc srl t8, t8, 0x1f | t8 >>= 0x1f;
0x004082c0 andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x004082c4 beqz t8, 0x4082f4 |
0x004082c8 nop |
0x004082cc lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.fail_to_load_EncryType_from_config */
0x004082d0 addiu a0, t8, -0xbb4 | a0 = t8 + -0xbb4;
0x004082d4 lw t8, -0x7e64(gp) | t8 = sym.imp.printf
0x004082d8 move t9, t8 | t9 = t8;
0x004082dc jalr t9 | t9 ();
0x004082e0 nop |
0x004082e4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004082e8 addiu t8, zero, -1 | t8 = -1;
0x004082ec b 0x408580 | goto label_0;
0x004082f0 nop |
| }
0x004082f4 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x004082f8 move a0, t8 | a0 = t8;
0x004082fc lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* esilref: 'NONE' */
0x00408300 addiu a1, t8, -0xb90 | a1 = t8 + -0xb90;
0x00408304 lw t8, -0x7e40(gp) | t8 = sym.imp.strcmp;
0x00408308 move t9, t8 | t9 = t8;
0x0040830c jalr t9 | t9 ();
0x00408310 nop |
0x00408314 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408318 move t8, v0 | t8 = v0;
| if (t8 == 0) {
0x0040831c bnez t8, 0x408334 |
0x00408320 nop |
0x00408324 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00408328 sw zero, 0x34(t8) | *((t8 + 52)) = 0;
0x0040832c b 0x40843c | goto label_2;
0x00408330 nop |
| }
0x00408334 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00408338 move a0, t8 | a0 = t8;
0x0040833c lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* esilref: 'WEP' */
0x00408340 addiu a1, t8, -0xb88 | a1 = t8 + -0xb88;
0x00408344 lw t8, -0x7e40(gp) | t8 = sym.imp.strcmp;
0x00408348 move t9, t8 | t9 = t8;
0x0040834c jalr t9 | t9 ();
0x00408350 nop |
0x00408354 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408358 move t8, v0 | t8 = v0;
| if (t8 == 0) {
0x0040835c bnez t8, 0x408378 |
0x00408360 nop |
0x00408364 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00408368 addiu v0, zero, 1 | v0 = 1;
0x0040836c sw v0, 0x34(t8) | *((t8 + 52)) = v0;
0x00408370 b 0x40843c | goto label_2;
0x00408374 nop |
| }
0x00408378 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x0040837c move a0, t8 | a0 = t8;
0x00408380 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* esilref: 'TKIP' */
0x00408384 addiu a1, t8, -0xb84 | a1 = t8 + -0xb84;
0x00408388 lw t8, -0x7e40(gp) | t8 = sym.imp.strcmp;
0x0040838c move t9, t8 | t9 = t8;
0x00408390 jalr t9 | t9 ();
0x00408394 nop |
0x00408398 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040839c move t8, v0 | t8 = v0;
| if (t8 == 0) {
0x004083a0 bnez t8, 0x4083bc |
0x004083a4 nop |
0x004083a8 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x004083ac addiu v0, zero, 2 | v0 = 2;
0x004083b0 sw v0, 0x34(t8) | *((t8 + 52)) = v0;
0x004083b4 b 0x40843c | goto label_2;
0x004083b8 nop |
| }
0x004083bc addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x004083c0 move a0, t8 | a0 = t8;
0x004083c4 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* esilref: 'AES' */
0x004083c8 addiu a1, t8, -0xb7c | a1 = t8 + -0xb7c;
0x004083cc lw t8, -0x7e40(gp) | t8 = sym.imp.strcmp;
0x004083d0 move t9, t8 | t9 = t8;
0x004083d4 jalr t9 | t9 ();
0x004083d8 nop |
0x004083dc lw gp, 0x10(fp) | gp = *(arg_10h);
0x004083e0 move t8, v0 | t8 = v0;
| if (t8 == 0) {
0x004083e4 bnez t8, 0x408400 |
0x004083e8 nop |
0x004083ec lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x004083f0 addiu v0, zero, 3 | v0 = 3;
0x004083f4 sw v0, 0x34(t8) | *((t8 + 52)) = v0;
0x004083f8 b 0x40843c | goto label_2;
0x004083fc nop |
| }
0x00408400 lw t8, -0x7dbc(gp) | t8 = *((gp - 8047));
0x00408404 lw t8, (t8) | t8 = *(t8);
0x00408408 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* str.Invalid_encrypt_type_config_n */
0x0040840c addiu a0, v0, -0xb78 | a0 = v0 + -0xb78;
0x00408410 addiu a1, zero, 1 | a1 = 1;
0x00408414 addiu a2, zero, 0x1c | a2 = 0x1c;
0x00408418 move a3, t8 | a3 = t8;
0x0040841c lw t8, -0x7d08(gp) | t8 = sym.imp.fwrite;
0x00408420 move t9, t8 | t9 = t8;
0x00408424 jalr t9 | t9 ();
0x00408428 nop |
0x0040842c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408430 addiu t8, zero, -1 | t8 = -1;
0x00408434 b 0x408580 | goto label_0;
0x00408438 nop |
| label_2:
0x0040843c addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00408440 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* str.Key */
0x00408444 addiu a0, v0, -0xb58 | a0 = v0 + -0xb58;
0x00408448 move a1, t8 | a1 = t8;
0x0040844c addiu a2, zero, 0x200 | a2 = 0x200;
0x00408450 lw t8, -0x7fa0(gp) | t8 = *(gp);
| /* aav.0x00407b94 */
0x00408454 addiu t8, t8, 0x7b94 | t8 += 0x7b94;
0x00408458 move t9, t8 | t9 = t8;
0x0040845c jalr t9 | t9 ();
0x00408460 nop |
0x00408464 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408468 move t8, v0 | t8 = v0;
0x0040846c srl t8, t8, 0x1f | t8 >>= 0x1f;
0x00408470 andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x00408474 beqz t8, 0x4084a4 |
0x00408478 nop |
0x0040847c lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.fail_to_load_Key_from_config */
0x00408480 addiu a0, t8, -0xb50 | a0 = t8 + -0xb50;
0x00408484 lw t8, -0x7e64(gp) | t8 = sym.imp.printf
0x00408488 move t9, t8 | t9 = t8;
0x0040848c jalr t9 | t9 ();
0x00408490 nop |
0x00408494 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408498 addiu t8, zero, -1 | t8 = -1;
0x0040849c b 0x408580 | goto label_0;
0x004084a0 nop |
| }
0x004084a4 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x004084a8 lb t8, (t8) | t8 = *(t8);
| if (t8 != 0) {
0x004084ac beqz t8, 0x4084e0 |
0x004084b0 nop |
0x004084b4 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x004084b8 addiu v0, t8, 0x14c | v0 = t8 + 0x14c;
0x004084bc addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x004084c0 move a0, v0 | a0 = v0;
0x004084c4 move a1, t8 | a1 = t8;
0x004084c8 addiu a2, zero, 0x40 | a2 = 0x40;
0x004084cc lw t8, -0x7df0(gp) | t8 = sym.imp.strncpy;
0x004084d0 move t9, t8 | t9 = t8;
0x004084d4 jalr t9 | t9 ();
0x004084d8 nop |
0x004084dc lw gp, 0x10(fp) | gp = *(arg_10h);
| }
0x004084e0 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x004084e4 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* esilref: 'Channel=' */
0x004084e8 addiu a0, v0, -0xb30 | a0 = v0 + -0xb30;
0x004084ec move a1, t8 | a1 = t8;
0x004084f0 addiu a2, zero, 0x200 | a2 = 0x200;
0x004084f4 lw t8, -0x7fa0(gp) | t8 = *(gp);
| /* aav.0x00407b94 */
0x004084f8 addiu t8, t8, 0x7b94 | t8 += 0x7b94;
0x004084fc move t9, t8 | t9 = t8;
0x00408500 jalr t9 | t9 ();
0x00408504 nop |
0x00408508 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040850c move t8, v0 | t8 = v0;
0x00408510 srl t8, t8, 0x1f | t8 >>= 0x1f;
0x00408514 andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x00408518 beqz t8, 0x408548 |
0x0040851c nop |
0x00408520 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.fail_to_load_Channel_from_config */
0x00408524 addiu a0, t8, -0xb24 | a0 = t8 + -0xb24;
0x00408528 lw t8, -0x7e64(gp) | t8 = sym.imp.printf
0x0040852c move t9, t8 | t9 = t8;
0x00408530 jalr t9 | t9 ();
0x00408534 nop |
0x00408538 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040853c addiu t8, zero, -1 | t8 = -1;
0x00408540 b 0x408580 | goto label_0;
0x00408544 nop |
| }
0x00408548 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x0040854c lb t8, (t8) | t8 = *(t8);
| if (t8 != 0) {
0x00408550 beqz t8, 0x40857c |
0x00408554 nop |
0x00408558 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x0040855c move a0, t8 | a0 = t8;
0x00408560 lw t8, -0x7e50(gp) | t8 = sym.imp.atoi;
0x00408564 move t9, t8 | t9 = t8;
0x00408568 jalr t9 | t9 ();
0x0040856c nop |
0x00408570 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408574 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00408578 sw v0, 0x2c(t8) | *((t8 + 44)) = v0;
| }
0x0040857c addiu t8, zero, 1 | t8 = 1;
| label_0:
0x00408580 move v0, t8 | v0 = t8;
0x00408584 lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x00408588 lw v1, 0x224(fp) | v1 = *(arg_224h);
0x0040858c lw t8, (t8) | t8 = *(t8);
| if (v1 != t8) {
0x00408590 beq v1, t8, 0x4085a8 |
0x00408594 nop |
0x00408598 lw t8, -0x7da8(gp) | t8 = sym.imp.__stack_chk_fail;
0x0040859c move t9, t8 | t9 = t8;
0x004085a0 jalr t9 | t9 ();
0x004085a4 nop |
| }
0x004085a8 move sp, fp |
0x004085ac lw ra, 0x22c(sp) | ra = *(var_22ch);
0x004085b0 lw fp, 0x228(sp) | fp = *(var_228h);
0x004085b4 addiu sp, sp, 0x230 |
0x004085b8 jr ra | return v1;
0x004085bc 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 @ 0x402d10 */
| #include <stdint.h>
|
; (fcn) sym.PrintQueue_WifiSiteList_ () | void PrintQueue_WifiSiteList_ () {
| /* PrintQueue(WifiSiteList*) */
0x00402d10 lui gp, 2 |
0x00402d14 addiu gp, gp, 0x7330 |
0x00402d18 addu gp, gp, t9 | gp += t9;
0x00402d1c addiu sp, sp, -0x40 |
0x00402d20 sw ra, 0x3c(sp) | *(var_3ch) = ra;
0x00402d24 sw fp, 0x38(sp) | *(var_38h) = fp;
0x00402d28 move fp, sp | fp = sp;
0x00402d2c sw gp, 0x20(sp) | *(var_20h) = gp;
0x00402d30 sw a0, 0x2c(fp) | *(arg_2ch) = a0;
0x00402d34 lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x00402d38 lw t8, (t8) | t8 = *(t8);
0x00402d3c sw t8, 0x34(fp) | *(arg_34h) = t8;
0x00402d40 lw t8, 0x2c(fp) | t8 = *(arg_2ch);
| if (t8 == 0) {
0x00402d44 bnez t8, 0x402d70 |
0x00402d48 nop |
0x00402d4c lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.queue_is_empty_ */
0x00402d50 addiu a0, t8, -0x1608 | a0 = t8 + -0x1608;
0x00402d54 lw t8, -0x7e70(gp) | t8 = sym.imp.puts;
0x00402d58 move t9, t8 | t9 = t8;
0x00402d5c jalr t9 | t9 ();
0x00402d60 nop |
0x00402d64 lw gp, 0x20(fp) | gp = *(arg_20h);
0x00402d68 b 0x402dfc | goto label_0;
0x00402d6c nop |
| }
0x00402d70 b 0x402df0 | goto label_1;
0x00402d74 nop |
| do {
0x00402d78 lw v1, 0x2c(fp) | v1 = *(arg_2ch);
0x00402d7c lw t8, 0x2c(fp) | t8 = *(arg_2ch);
0x00402d80 addiu v0, t8, 0x24 | v0 = t8 + 0x24;
0x00402d84 lw t8, 0x2c(fp) | t8 = *(arg_2ch);
0x00402d88 addiu t8, t8, 0x38 | t8 += 0x38;
0x00402d8c lw a0, 0x2c(fp) | a0 = *(arg_2ch);
0x00402d90 addiu a3, a0, 0x44 | a3 = a0 + 0x44;
0x00402d94 lw a0, 0x2c(fp) | a0 = *(arg_2ch);
0x00402d98 addiu a2, a0, 0x58 | a2 = a0 + 0x58;
0x00402d9c lw a0, 0x2c(fp) | a0 = *(arg_2ch);
0x00402da0 lw a1, 0x64(a0) | a1 = *((a0 + 25));
0x00402da4 lw a0, 0x2c(fp) | a0 = *(arg_2ch);
0x00402da8 lw a0, 0x68(a0) | a0 = *((a0 + 26));
0x00402dac sw a3, 0x10(sp) | *(var_10h) = a3;
0x00402db0 sw a2, 0x14(sp) | *(var_14h) = a2;
0x00402db4 sw a1, 0x18(sp) | *(var_18h) = a1;
0x00402db8 sw a0, 0x1c(sp) | *(var_1ch) = a0;
0x00402dbc lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
| /* str.__s____s_____s_____s_____s_____d____d__n */
0x00402dc0 addiu a0, a0, -0x15f8 | a0 += -0x15f8;
0x00402dc4 move a1, v1 | a1 = v1;
0x00402dc8 move a2, v0 | a2 = v0;
0x00402dcc move a3, t8 | a3 = t8;
0x00402dd0 lw t8, -0x7e64(gp) | t8 = sym.imp.printf
0x00402dd4 move t9, t8 | t9 = t8;
0x00402dd8 jalr t9 | t9 ();
0x00402ddc nop |
0x00402de0 lw gp, 0x20(fp) | gp = *(arg_20h);
0x00402de4 lw t8, 0x2c(fp) | t8 = *(arg_2ch);
0x00402de8 lw t8, 0x6c(t8) | t8 = *((t8 + 27));
0x00402dec sw t8, 0x2c(fp) | *(arg_2ch) = t8;
| label_1:
0x00402df0 lw t8, 0x2c(fp) | t8 = *(arg_2ch);
0x00402df4 bnez t8, 0x402d78 |
| } while (t8 != 0);
0x00402df8 nop |
| label_0:
0x00402dfc addiu a0, zero, 0xa | a0 = 0xa;
0x00402e00 lw t8, -0x7d28(gp) | t8 = sym.imp.putchar;
0x00402e04 move t9, t8 | t9 = t8;
0x00402e08 jalr t9 | t9 ();
0x00402e0c nop |
0x00402e10 lw gp, 0x20(fp) | gp = *(arg_20h);
0x00402e14 lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x00402e18 lw v0, 0x34(fp) | v0 = *(arg_34h);
0x00402e1c lw t8, (t8) | t8 = *(t8);
| if (v0 != t8) {
0x00402e20 beq v0, t8, 0x402e38 |
0x00402e24 nop |
0x00402e28 lw t8, -0x7da8(gp) | t8 = sym.imp.__stack_chk_fail;
0x00402e2c move t9, t8 | t9 = t8;
0x00402e30 jalr t9 | t9 ();
0x00402e34 nop |
| }
0x00402e38 move sp, fp |
0x00402e3c lw ra, 0x3c(sp) | ra = *(var_3ch);
0x00402e40 lw fp, 0x38(sp) | fp = *(var_38h);
0x00402e44 addiu sp, sp, 0x40 |
0x00402e48 jr ra | return v0;
0x00402e4c 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 @ 0x406188 */
| #include <stdint.h>
|
; (fcn) sym.handleGet_char__int_ () | void handleGet_char_int_ () {
| /* handleGet(char**, int) */
0x00406188 lui gp, 2 |
0x0040618c addiu gp, gp, 0x3eb8 |
0x00406190 addu gp, gp, t9 | gp += t9;
0x00406194 addiu sp, sp, -0x3560 |
0x00406198 sw ra, 0x355c(sp) | *(arg_355ch) = ra;
0x0040619c sw fp, 0x3558(sp) | *(arg_3558h) = fp;
0x004061a0 sw s0, 0x3554(sp) | *(arg_3554h) = s0;
0x004061a4 move fp, sp | fp = sp;
0x004061a8 sw gp, 0x10(sp) | *(arg_10h) = gp;
0x004061ac sw a0, 0x1c(fp) | *(arg_1ch) = a0;
0x004061b0 sw a1, 0x18(fp) | *(arg_18h) = a1;
0x004061b4 lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x004061b8 lw t8, (t8) | t8 = *(t8);
0x004061bc sw t8, 0x354c(fp) | *(arg_354ch) = t8;
0x004061c0 lw t8, 0x18(fp) | t8 = *(arg_18h);
0x004061c4 slti t8, t8, 2 | t8 = (t8 < 2) ? 1 : 0;
| if (t8 != 0) {
0x004061c8 beqz t8, 0x4061f0 |
0x004061cc nop |
0x004061d0 lw t8, -0x7fa0(gp) | t8 = *(gp);
| /* aav.0x00402e50 */
0x004061d4 addiu t8, t8, 0x2e50 | t8 += 0x2e50;
0x004061d8 move t9, t8 | t9 = t8;
0x004061dc jalr t9 | t9 ();
0x004061e0 nop |
0x004061e4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004061e8 b 0x40683c | goto label_0;
0x004061ec nop |
| }
0x004061f0 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x004061f4 addiu t8, t8, 8 | t8 += 8;
0x004061f8 lw t8, (t8) | t8 = *(t8);
0x004061fc move a0, t8 | a0 = t8;
0x00406200 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.device */
0x00406204 addiu a1, t8, -0xf80 | a1 = t8 + -0xf80;
0x00406208 lw t8, -0x7e40(gp) | t8 = sym.imp.strcmp;
0x0040620c move t9, t8 | t9 = t8;
0x00406210 jalr t9 | t9 ();
0x00406214 nop |
0x00406218 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040621c move t8, v0 | t8 = v0;
| if (t8 == 0) {
0x00406220 bnez t8, 0x406268 |
0x00406224 nop |
0x00406228 lw t8, -0x7d80(gp) | t8 = sym.imp.wifiProbeDevice__;
0x0040622c move t9, t8 | t9 = t8;
0x00406230 jalr t9 | t9 ();
0x00406234 nop |
0x00406238 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040623c move t8, v0 | t8 = v0;
0x00406240 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* str.wifi_tool_device_:__d_n */
0x00406244 addiu a0, v0, -0xf78 | a0 = v0 + -0xf78;
0x00406248 move a1, t8 | a1 = t8;
0x0040624c lw t8, -0x7e64(gp) | t8 = sym.imp.printf
0x00406250 move t9, t8 | t9 = t8;
0x00406254 jalr t9 | t9 ();
0x00406258 nop |
0x0040625c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00406260 b 0x40683c | goto label_0;
0x00406264 nop |
| }
0x00406268 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x0040626c addiu t8, t8, 8 | t8 += 8;
0x00406270 lw t8, (t8) | t8 = *(t8);
0x00406274 move a0, t8 | a0 = t8;
0x00406278 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.region */
0x0040627c addiu a1, t8, -0xf90 | a1 = t8 + -0xf90;
0x00406280 lw t8, -0x7e40(gp) | t8 = sym.imp.strcmp;
0x00406284 move t9, t8 | t9 = t8;
0x00406288 jalr t9 | t9 ();
0x0040628c nop |
0x00406290 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00406294 move t8, v0 | t8 = v0;
| if (t8 == 0) {
0x00406298 bnez t8, 0x40633c |
0x0040629c nop |
0x004062a0 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x004062a4 move a0, t8 | a0 = t8;
0x004062a8 lw t8, -0x7fbc(gp) | t8 = *(gp);
0x004062ac move t9, t8 | t9 = t8;
0x004062b0 jalr t9 | t9 ();
0x004062b4 nop |
0x004062b8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004062bc addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x004062c0 move a0, t8 | a0 = t8;
0x004062c4 lw t8, -0x7e2c(gp) | t8 = *(gp);
0x004062c8 move t9, t8 | t9 = t8;
0x004062cc jalr t9 | t9 ();
0x004062d0 nop |
0x004062d4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004062d8 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x004062dc move a0, t8 | a0 = t8;
0x004062e0 lw t8, -0x7d20(gp) | t8 = *(gp);
0x004062e4 move t9, t8 | t9 = t8;
0x004062e8 jalr t9 | t9 ();
0x004062ec nop |
0x004062f0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004062f4 move t8, v0 | t8 = v0;
0x004062f8 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* str.wifi_tool_region_:__d_n */
0x004062fc addiu a0, v0, -0xf60 | a0 = v0 + -0xf60;
0x00406300 move a1, t8 | a1 = t8;
0x00406304 lw t8, -0x7e64(gp) | t8 = sym.imp.printf
0x00406308 move t9, t8 | t9 = t8;
0x0040630c jalr t9 | t9 ();
0x00406310 nop |
0x00406314 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00406318 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x0040631c move a0, t8 | a0 = t8;
0x00406320 lw t8, -0x7cec(gp) | t8 = sym.imp.PIB::PIB__;
0x00406324 move t9, t8 | t9 = t8;
0x00406328 jalr t9 | t9 ();
0x0040632c nop |
0x00406330 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00406334 b 0x40683c | goto label_0;
0x00406338 nop |
| }
0x0040633c lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00406340 addiu t8, t8, 8 | t8 += 8;
0x00406344 lw t8, (t8) | t8 = *(t8);
0x00406348 move a0, t8 | a0 = t8;
0x0040634c lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.link */
0x00406350 addiu a1, t8, -0xf48 | a1 = t8 + -0xf48;
0x00406354 lw t8, -0x7e40(gp) | t8 = sym.imp.strcmp;
0x00406358 move t9, t8 | t9 = t8;
0x0040635c jalr t9 | t9 ();
0x00406360 nop |
0x00406364 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00406368 move t8, v0 | t8 = v0;
| if (t8 == 0) {
0x0040636c bnez t8, 0x4063b4 |
0x00406370 nop |
0x00406374 lw t8, -0x7d00(gp) | t8 = sym.imp.wifiCheckLink__;
0x00406378 move t9, t8 | t9 = t8;
0x0040637c jalr t9 | t9 ();
0x00406380 nop |
0x00406384 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00406388 move t8, v0 | t8 = v0;
0x0040638c lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* str.wifi_tool_link_:__d_n */
0x00406390 addiu a0, v0, -0xf40 | a0 = v0 + -0xf40;
0x00406394 move a1, t8 | a1 = t8;
0x00406398 lw t8, -0x7e64(gp) | t8 = sym.imp.printf
0x0040639c move t9, t8 | t9 = t8;
0x004063a0 jalr t9 | t9 ();
0x004063a4 nop |
0x004063a8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004063ac b 0x40683c | goto label_0;
0x004063b0 nop |
| }
0x004063b4 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x004063b8 addiu t8, t8, 8 | t8 += 8;
0x004063bc lw t8, (t8) | t8 = *(t8);
0x004063c0 move a0, t8 | a0 = t8;
0x004063c4 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.enable */
0x004063c8 addiu a1, t8, -0xf28 | a1 = t8 + -0xf28;
0x004063cc lw t8, -0x7e40(gp) | t8 = sym.imp.strcmp;
0x004063d0 move t9, t8 | t9 = t8;
0x004063d4 jalr t9 | t9 ();
0x004063d8 nop |
0x004063dc lw gp, 0x10(fp) | gp = *(arg_10h);
0x004063e0 move t8, v0 | t8 = v0;
| if (t8 == 0) {
0x004063e4 bnez t8, 0x4064b8 |
0x004063e8 nop |
0x004063ec addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x004063f0 move a0, t8 | a0 = t8;
0x004063f4 lw t8, -0x7fd0(gp) | t8 = *(gp);
0x004063f8 move t9, t8 | t9 = t8;
0x004063fc jalr t9 | t9 ();
0x00406400 nop |
0x00406404 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00406408 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x0040640c move a0, t8 | a0 = t8;
0x00406410 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* esilref: 'Wireless' */
0x00406414 addiu a1, t8, -0x144c | a1 = t8 + -0x144c;
0x00406418 move a2, zero | a2 = 0;
0x0040641c lw t8, -0x7e34(gp) | t8 = *(gp);
0x00406420 move t9, t8 | t9 = t8;
0x00406424 jalr t9 | t9 ();
0x00406428 nop |
0x0040642c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00406430 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00406434 move a0, t8 | a0 = t8;
0x00406438 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* esilref: 'Enable' */
0x0040643c addiu a1, t8, -0xf20 | a1 = t8 + -0xf20;
0x00406440 lw t8, -0x7da0(gp) | t8 = *(gp);
0x00406444 move t9, t8 | t9 = t8;
0x00406448 jalr t9 | t9 ();
0x0040644c nop |
0x00406450 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00406454 move t8, v0 | t8 = v0;
0x00406458 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* str.wifi_tool_enable_:__d_n */
0x0040645c addiu a0, v0, -0xf18 | a0 = v0 + -0xf18;
0x00406460 move a1, t8 | a1 = t8;
0x00406464 lw t8, -0x7e64(gp) | t8 = sym.imp.printf
0x00406468 move t9, t8 | t9 = t8;
0x0040646c jalr t9 | t9 ();
0x00406470 nop |
0x00406474 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00406478 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x0040647c move a0, t8 | a0 = t8;
0x00406480 lw t8, -0x7cf0(gp) | t8 = *(gp);
0x00406484 move t9, t8 | t9 = t8;
0x00406488 jalr t9 | t9 ();
0x0040648c nop |
0x00406490 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00406494 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00406498 move a0, t8 | a0 = t8;
0x0040649c lw t8, -0x7dfc(gp) | t8 = sym.imp.TinyDB::TinyDB__;
0x004064a0 move t9, t8 | t9 = t8;
0x004064a4 jalr t9 | t9 ();
0x004064a8 nop |
0x004064ac lw gp, 0x10(fp) | gp = *(arg_10h);
0x004064b0 b 0x40683c | goto label_0;
0x004064b4 nop |
| }
0x004064b8 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x004064bc addiu t8, t8, 8 | t8 += 8;
0x004064c0 lw t8, (t8) | t8 = *(t8);
0x004064c4 move a0, t8 | a0 = t8;
0x004064c8 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.site_survey */
0x004064cc addiu a1, t8, -0xf00 | a1 = t8 + -0xf00;
0x004064d0 lw t8, -0x7e40(gp) | t8 = sym.imp.strcmp;
0x004064d4 move t9, t8 | t9 = t8;
0x004064d8 jalr t9 | t9 ();
0x004064dc nop |
0x004064e0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004064e4 move t8, v0 | t8 = v0;
| if (t8 == 0) {
0x004064e8 bnez t8, 0x40654c |
0x004064ec nop |
0x004064f0 sw zero, 0x20(fp) | *(arg_20h) = 0;
0x004064f4 lw a0, 0x20(fp) | a0 = *(arg_20h);
0x004064f8 lw t8, -0x7cf4(gp) | t8 = sym.imp.wifiDumpSites_WifiSiteList_;
0x004064fc move t9, t8 | t9 = t8;
0x00406500 jalr t9 | t9 ();
0x00406504 nop |
0x00406508 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040650c move t8, v0 | t8 = v0;
0x00406510 sw t8, 0x20(fp) | *(arg_20h) = t8;
0x00406514 lw a0, 0x20(fp) | a0 = *(arg_20h);
0x00406518 lw t8, -0x7f98(gp) | t8 = sym.PrintQueue_WifiSiteList_;
0x0040651c move t9, t8 | t9 = t8;
0x00406520 jalr t9 | t9 ();
0x00406524 nop |
0x00406528 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040652c lw a0, 0x20(fp) | a0 = *(arg_20h);
0x00406530 lw t8, -0x7e6c(gp) | t8 = sym.imp.wifiClearSites_WifiSiteList_;
0x00406534 move t9, t8 | t9 = t8;
0x00406538 jalr t9 | t9 ();
0x0040653c nop |
0x00406540 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00406544 b 0x40683c | goto label_0;
0x00406548 nop |
| }
0x0040654c lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00406550 addiu t8, t8, 8 | t8 += 8;
0x00406554 lw t8, (t8) | t8 = *(t8);
0x00406558 move a0, t8 | a0 = t8;
0x0040655c lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.mode */
0x00406560 addiu a1, t8, -0xef4 | a1 = t8 + -0xef4;
0x00406564 lw t8, -0x7e40(gp) | t8 = sym.imp.strcmp;
0x00406568 move t9, t8 | t9 = t8;
0x0040656c jalr t9 | t9 ();
0x00406570 nop |
0x00406574 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00406578 move t8, v0 | t8 = v0;
| if (t8 == 0) {
0x0040657c bnez t8, 0x4065c4 |
0x00406580 nop |
0x00406584 lw t8, -0x7e1c(gp) | t8 = sym.imp.wifiCheckModule__;
0x00406588 move t9, t8 | t9 = t8;
0x0040658c jalr t9 | t9 ();
0x00406590 nop |
0x00406594 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00406598 move t8, v0 | t8 = v0;
0x0040659c lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* str.wifi_tool_mode_:__d_n */
0x004065a0 addiu a0, v0, -0xeec | a0 = v0 + -0xeec;
0x004065a4 move a1, t8 | a1 = t8;
0x004065a8 lw t8, -0x7e64(gp) | t8 = sym.imp.printf
0x004065ac move t9, t8 | t9 = t8;
0x004065b0 jalr t9 | t9 ();
0x004065b4 nop |
0x004065b8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004065bc b 0x40683c | goto label_0;
0x004065c0 nop |
| }
0x004065c4 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x004065c8 addiu t8, t8, 8 | t8 += 8;
0x004065cc lw t8, (t8) | t8 = *(t8);
0x004065d0 move a0, t8 | a0 = t8;
0x004065d4 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.client_status */
0x004065d8 addiu a1, t8, -0xed4 | a1 = t8 + -0xed4;
0x004065dc lw t8, -0x7e40(gp) | t8 = sym.imp.strcmp;
0x004065e0 move t9, t8 | t9 = t8;
0x004065e4 jalr t9 | t9 ();
0x004065e8 nop |
0x004065ec lw gp, 0x10(fp) | gp = *(arg_10h);
0x004065f0 move t8, v0 | t8 = v0;
| if (t8 == 0) {
0x004065f4 bnez t8, 0x40663c |
0x004065f8 nop |
0x004065fc lw t8, -0x7fcc(gp) | t8 = sym.getClientStatus__;
0x00406600 move t9, t8 | t9 = t8;
0x00406604 jalr t9 | t9 ();
0x00406608 nop |
0x0040660c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00406610 move t8, v0 | t8 = v0;
0x00406614 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* str.wifi_tool_client_status_:__d_n */
0x00406618 addiu a0, v0, -0xec4 | a0 = v0 + -0xec4;
0x0040661c move a1, t8 | a1 = t8;
0x00406620 lw t8, -0x7e64(gp) | t8 = sym.imp.printf
0x00406624 move t9, t8 | t9 = t8;
0x00406628 jalr t9 | t9 ();
0x0040662c nop |
0x00406630 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00406634 b 0x40683c | goto label_0;
0x00406638 nop |
| }
0x0040663c lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00406640 addiu t8, t8, 8 | t8 += 8;
0x00406644 lw t8, (t8) | t8 = *(t8);
0x00406648 move a0, t8 | a0 = t8;
0x0040664c lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.ap_status */
0x00406650 addiu a1, t8, -0xea4 | a1 = t8 + -0xea4;
0x00406654 lw t8, -0x7e40(gp) | t8 = sym.imp.strcmp;
0x00406658 move t9, t8 | t9 = t8;
0x0040665c jalr t9 | t9 ();
0x00406660 nop |
0x00406664 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00406668 move t8, v0 | t8 = v0;
| if (t8 == 0) {
0x0040666c bnez t8, 0x4066b4 |
0x00406670 nop |
0x00406674 lw t8, -0x7fc8(gp) | t8 = sym.getApStatus__;
0x00406678 move t9, t8 | t9 = t8;
0x0040667c jalr t9 | t9 ();
0x00406680 nop |
0x00406684 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00406688 move t8, v0 | t8 = v0;
0x0040668c lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* str.wifi_tool_ap_status_:__d_n */
0x00406690 addiu a0, v0, -0xe98 | a0 = v0 + -0xe98;
0x00406694 move a1, t8 | a1 = t8;
0x00406698 lw t8, -0x7e64(gp) | t8 = sym.imp.printf
0x0040669c move t9, t8 | t9 = t8;
0x004066a0 jalr t9 | t9 ();
0x004066a4 nop |
0x004066a8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004066ac b 0x40683c | goto label_0;
0x004066b0 nop |
| }
0x004066b4 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x004066b8 addiu t8, t8, 8 | t8 += 8;
0x004066bc lw t8, (t8) | t8 = *(t8);
0x004066c0 move a0, t8 | a0 = t8;
0x004066c4 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.client_lock */
0x004066c8 addiu a1, t8, -0xe7c | a1 = t8 + -0xe7c;
0x004066cc lw t8, -0x7e40(gp) | t8 = sym.imp.strcmp;
0x004066d0 move t9, t8 | t9 = t8;
0x004066d4 jalr t9 | t9 ();
0x004066d8 nop |
0x004066dc lw gp, 0x10(fp) | gp = *(arg_10h);
0x004066e0 move t8, v0 | t8 = v0;
| if (t8 == 0) {
0x004066e4 bnez t8, 0x40672c |
0x004066e8 nop |
0x004066ec lw t8, -0x7fc4(gp) | t8 = sym.getClientLock__;
0x004066f0 move t9, t8 | t9 = t8;
0x004066f4 jalr t9 | t9 ();
0x004066f8 nop |
0x004066fc lw gp, 0x10(fp) | gp = *(arg_10h);
0x00406700 move t8, v0 | t8 = v0;
0x00406704 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* str.wifi_tool_client_lock_:__d_n */
0x00406708 addiu a0, v0, -0xe70 | a0 = v0 + -0xe70;
0x0040670c move a1, t8 | a1 = t8;
0x00406710 lw t8, -0x7e64(gp) | t8 = sym.imp.printf
0x00406714 move t9, t8 | t9 = t8;
0x00406718 jalr t9 | t9 ();
0x0040671c nop |
0x00406720 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00406724 b 0x40683c | goto label_0;
0x00406728 nop |
| }
0x0040672c lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00406730 addiu t8, t8, 8 | t8 += 8;
0x00406734 lw t8, (t8) | t8 = *(t8);
0x00406738 move a0, t8 | a0 = t8;
0x0040673c lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.ap_lock */
0x00406740 addiu a1, t8, -0xe54 | a1 = t8 + -0xe54;
0x00406744 lw t8, -0x7e40(gp) | t8 = sym.imp.strcmp;
0x00406748 move t9, t8 | t9 = t8;
0x0040674c jalr t9 | t9 ();
0x00406750 nop |
0x00406754 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00406758 move t8, v0 | t8 = v0;
| if (t8 == 0) {
0x0040675c bnez t8, 0x4067a4 |
0x00406760 nop |
0x00406764 lw t8, -0x7fb0(gp) | t8 = sym.getApLock__;
0x00406768 move t9, t8 | t9 = t8;
0x0040676c jalr t9 | t9 ();
0x00406770 nop |
0x00406774 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00406778 move t8, v0 | t8 = v0;
0x0040677c lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* str.wifi_tool_ap_lock_:__d_n */
0x00406780 addiu a0, v0, -0xe4c | a0 = v0 + -0xe4c;
0x00406784 move a1, t8 | a1 = t8;
0x00406788 lw t8, -0x7e64(gp) | t8 = sym.imp.printf
0x0040678c move t9, t8 | t9 = t8;
0x00406790 jalr t9 | t9 ();
0x00406794 nop |
0x00406798 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040679c b 0x40683c | goto label_0;
0x004067a0 nop |
| }
0x004067a4 lw t8, -0x7fa0(gp) | t8 = *(gp);
| /* aav.0x00402e50 */
0x004067a8 addiu t8, t8, 0x2e50 | t8 += 0x2e50;
0x004067ac move t9, t8 | t9 = t8;
0x004067b0 jalr t9 | t9 ();
0x004067b4 nop |
0x004067b8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004067bc b 0x40683c | goto label_0;
0x004067c0 nop |
| label_0:
0x0040683c lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x00406840 lw v0, 0x354c(fp) | v0 = *(arg_354ch);
0x00406844 lw t8, (t8) | t8 = *(t8);
| if (v0 != t8) {
0x00406848 beq v0, t8, 0x406860 |
0x0040684c nop |
0x00406850 lw t8, -0x7da8(gp) | t8 = sym.imp.__stack_chk_fail;
0x00406854 move t9, t8 | t9 = t8;
0x00406858 jalr t9 | t9 ();
0x0040685c nop |
| }
0x00406860 move sp, fp |
0x00406864 lw ra, 0x355c(sp) | ra = *(arg_355ch);
0x00406868 lw fp, 0x3558(sp) | fp = *(arg_3558h);
0x0040686c lw s0, 0x3554(sp) | s0 = *(arg_3554h);
0x00406870 addiu sp, sp, 0x3560 |
0x00406874 jr ra | return v0;
0x00406878 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 printf used 21 times wifi-tool