[*] Binary protection state of wifi-tool
Full RELRO Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function sprintf 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 @ 0x40d8bc */
| #include <stdint.h>
|
; (fcn) sym.dhcpOK_char_ () | void dhcpOK_char_ () {
| /* dhcpOK(char*) */
0x0040d8bc lui gp, 2 |
0x0040d8c0 addiu gp, gp, -0x387c |
0x0040d8c4 addu gp, gp, t9 | gp += t9;
0x0040d8c8 addiu sp, sp, -0x830 |
0x0040d8cc sw ra, 0x82c(sp) | *(var_82ch) = ra;
0x0040d8d0 sw fp, 0x828(sp) | *(var_828h) = fp;
0x0040d8d4 move fp, sp | fp = sp;
0x0040d8d8 sw gp, 0x10(sp) | *(var_10h) = gp;
0x0040d8dc sw a0, 0x1c(fp) | *(arg_1ch) = a0;
0x0040d8e0 lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x0040d8e4 lw t8, (t8) | t8 = *(t8);
0x0040d8e8 sw t8, 0x824(fp) | *(arg_824h) = t8;
0x0040d8ec lw t8, -0x7eb4(gp) | t8 = *(gp);
0x0040d8f0 lw t8, (t8) | t8 = *(t8);
| if (t8 != 0) {
0x0040d8f4 beqz t8, 0x40da18 |
0x0040d8f8 nop |
0x0040d8fc addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x0040d900 move a0, t8 | a0 = t8;
0x0040d904 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.ifconfig__s */
0x0040d908 addiu a1, t8, -0x3f0 | a1 = t8 + -0x3f0;
0x0040d90c lw a2, 0x1c(fp) | a2 = *(arg_1ch);
0x0040d910 lw t8, -0x7e14(gp) | t8 = sym.imp.sprintf
0x0040d914 move t9, t8 | t9 = t8;
0x0040d918 jalr t9 | t9 ();
0x0040d91c nop |
0x0040d920 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040d924 addiu t8, fp, 0x424 | t8 = fp + 0x424;
0x0040d928 move a0, t8 | a0 = t8;
0x0040d92c move a1, zero | a1 = 0;
0x0040d930 addiu a2, zero, 0x400 | a2 = 0x400;
0x0040d934 lw t8, -0x7df8(gp) | t8 = sym.imp.memset;
0x0040d938 move t9, t8 | t9 = t8;
0x0040d93c jalr t9 | t9 ();
0x0040d940 nop |
0x0040d944 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040d948 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x0040d94c move a0, t8 | a0 = t8;
0x0040d950 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
0x0040d954 addiu a1, t8, -0x3e4 | a1 = t8 + -0x3e4;
0x0040d958 lw t8, -0x7e68(gp) | t8 = sym.imp.popen;
0x0040d95c move t9, t8 | t9 = t8;
0x0040d960 jalr t9 | t9 ();
0x0040d964 nop |
0x0040d968 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040d96c move t8, v0 | t8 = v0;
0x0040d970 sw t8, 0x20(fp) | *(arg_20h) = t8;
0x0040d974 addiu t8, fp, 0x424 | t8 = fp + 0x424;
0x0040d978 move a0, t8 | a0 = t8;
0x0040d97c addiu a1, zero, 1 | a1 = 1;
0x0040d980 addiu a2, zero, 0x400 | a2 = 0x400;
0x0040d984 lw a3, 0x20(fp) | a3 = *(arg_20h);
0x0040d988 lw t8, -0x7d9c(gp) | t8 = sym.imp.fread;
0x0040d98c move t9, t8 | t9 = t8;
0x0040d990 jalr t9 | t9 ();
0x0040d994 nop |
0x0040d998 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040d99c lw a0, 0x20(fp) | a0 = *(arg_20h);
0x0040d9a0 lw t8, -0x7d98(gp) | t8 = sym.imp.fclose;
0x0040d9a4 move t9, t8 | t9 = t8;
0x0040d9a8 jalr t9 | t9 ();
0x0040d9ac nop |
0x0040d9b0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040d9b4 addiu t8, fp, 0x424 | t8 = fp + 0x424;
0x0040d9b8 move a0, t8 | a0 = t8;
0x0040d9bc lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.inet_addr: */
0x0040d9c0 addiu a1, t8, -0x3e0 | a1 = t8 + -0x3e0;
0x0040d9c4 lw t8, -0x7e3c(gp) | t8 = sym.imp.strstr;
0x0040d9c8 move t9, t8 | t9 = t8;
0x0040d9cc jalr t9 | t9 ();
0x0040d9d0 nop |
0x0040d9d4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040d9d8 move t8, v0 | t8 = v0;
| if (t8 != 0) {
0x0040d9dc beqz t8, 0x40d9f0 |
0x0040d9e0 nop |
0x0040d9e4 addiu t8, zero, 1 | t8 = 1;
0x0040d9e8 b 0x40da1c | goto label_0;
0x0040d9ec nop |
| }
0x0040d9f0 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.rm__f__tmp_dhcptemp.log */
0x0040d9f4 addiu a0, t8, -0x3d4 | a0 = t8 + -0x3d4;
0x0040d9f8 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x0040d9fc move t9, t8 | t9 = t8;
0x0040da00 jalr t9 | t9 ();
0x0040da04 nop |
0x0040da08 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040da0c move t8, zero | t8 = 0;
0x0040da10 b 0x40da1c | goto label_0;
0x0040da14 nop |
| }
0x0040da18 addiu t8, zero, 1 | t8 = 1;
| label_0:
0x0040da1c move v0, t8 | v0 = t8;
0x0040da20 lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x0040da24 lw v1, 0x824(fp) | v1 = *(arg_824h);
0x0040da28 lw t8, (t8) | t8 = *(t8);
| if (v1 != t8) {
0x0040da2c beq v1, t8, 0x40da44 |
0x0040da30 nop |
0x0040da34 lw t8, -0x7da8(gp) | t8 = sym.imp.__stack_chk_fail;
0x0040da38 move t9, t8 | t9 = t8;
0x0040da3c jalr t9 | t9 ();
0x0040da40 nop |
| }
0x0040da44 move sp, fp |
0x0040da48 lw ra, 0x82c(sp) | ra = *(var_82ch);
0x0040da4c lw fp, 0x828(sp) | fp = *(var_828h);
0x0040da50 addiu sp, sp, 0x830 |
0x0040da54 jr ra | return v1;
0x0040da58 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 @ 0x40d6dc */
| #include <stdint.h>
|
; (fcn) sym.fallBack_char_ () | void fallBack_char_ () {
| /* fallBack(char*) */
0x0040d6dc lui gp, 2 |
0x0040d6e0 addiu gp, gp, -0x369c |
0x0040d6e4 addu gp, gp, t9 | gp += t9;
0x0040d6e8 addiu sp, sp, -0x438 |
0x0040d6ec sw ra, 0x434(sp) | *(var_434h) = ra;
0x0040d6f0 sw fp, 0x430(sp) | *(var_430h) = fp;
0x0040d6f4 move fp, sp | fp = sp;
0x0040d6f8 sw gp, 0x18(sp) | *(var_18h) = gp;
0x0040d6fc sw a0, 0x24(fp) | *(arg_24h) = a0;
0x0040d700 lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x0040d704 lw t8, (t8) | t8 = *(t8);
0x0040d708 sw t8, 0x42c(fp) | *(arg_42ch) = t8;
0x0040d70c addiu t8, fp, 0x2c | t8 = fp + 0x2c;
0x0040d710 lw v0, -0x7ed8(gp) | v0 = *(gp);
0x0040d714 sw v0, 0x10(sp) | *(var_10h) = v0;
0x0040d718 move a0, t8 | a0 = t8;
0x0040d71c lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.ifconfig__s__s_netmask__s */
0x0040d720 addiu a1, t8, -0x454 | a1 = t8 + -0x454;
0x0040d724 lw a2, 0x24(fp) | a2 = *(arg_24h);
0x0040d728 lw a3, -0x7edc(gp) | a3 = *(gp);
0x0040d72c lw t8, -0x7e14(gp) | t8 = sym.imp.sprintf
0x0040d730 move t9, t8 | t9 = t8;
0x0040d734 jalr t9 | t9 ();
0x0040d738 nop |
0x0040d73c lw gp, 0x18(fp) | gp = *(arg_18h);
0x0040d740 addiu t8, fp, 0x2c | t8 = fp + 0x2c;
0x0040d744 move a0, t8 | a0 = t8;
0x0040d748 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x0040d74c move t9, t8 | t9 = t8;
0x0040d750 jalr t9 | t9 ();
0x0040d754 nop |
0x0040d758 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0040d75c addiu t8, fp, 0x2c | t8 = fp + 0x2c;
0x0040d760 move a0, t8 | a0 = t8;
0x0040d764 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.route_add_default_gw__s__s */
0x0040d768 addiu a1, t8, -0x438 | a1 = t8 + -0x438;
0x0040d76c lw a2, -0x7ed4(gp) | a2 = *(gp);
0x0040d770 lw a3, 0x24(fp) | a3 = *(arg_24h);
0x0040d774 lw t8, -0x7e14(gp) | t8 = sym.imp.sprintf
0x0040d778 move t9, t8 | t9 = t8;
0x0040d77c jalr t9 | t9 ();
0x0040d780 nop |
0x0040d784 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0040d788 addiu t8, fp, 0x2c | t8 = fp + 0x2c;
0x0040d78c move a0, t8 | a0 = t8;
0x0040d790 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x0040d794 move t9, t8 | t9 = t8;
0x0040d798 jalr t9 | t9 ();
0x0040d79c nop |
0x0040d7a0 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0040d7a4 addiu t8, zero, 1 | t8 = 1;
0x0040d7a8 move v0, t8 | v0 = t8;
0x0040d7ac lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x0040d7b0 lw v1, 0x42c(fp) | v1 = *(arg_42ch);
0x0040d7b4 lw t8, (t8) | t8 = *(t8);
| if (v1 != t8) {
0x0040d7b8 beq v1, t8, 0x40d7d0 |
0x0040d7bc nop |
0x0040d7c0 lw t8, -0x7da8(gp) | t8 = sym.imp.__stack_chk_fail;
0x0040d7c4 move t9, t8 | t9 = t8;
0x0040d7c8 jalr t9 | t9 ();
0x0040d7cc nop |
| }
0x0040d7d0 move sp, fp |
0x0040d7d4 lw ra, 0x434(sp) | ra = *(var_434h);
0x0040d7d8 lw fp, 0x430(sp) | fp = *(var_430h);
0x0040d7dc addiu sp, sp, 0x438 |
0x0040d7e0 jr ra | return v1;
0x0040d7e4 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 @ 0x405454 */
| #include <stdint.h>
|
; (fcn) sym.handleHideApSsid_int_ () | void handleHideApSsid_int_ () {
| /* handleHideApSsid(int) */
0x00405454 lui gp, 2 |
0x00405458 addiu gp, gp, 0x4bec |
0x0040545c addu gp, gp, t9 | gp += t9;
0x00405460 addiu sp, sp, -0x1480 |
0x00405464 sw ra, 0x147c(sp) | *(var_147ch) = ra;
0x00405468 sw fp, 0x1478(sp) | *(var_1478h) = fp;
0x0040546c sw s0, 0x1474(sp) | *(var_1474h) = s0;
0x00405470 move fp, sp | fp = sp;
0x00405474 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00405478 sw a0, 0x1c(fp) | *(arg_1ch) = a0;
0x0040547c lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x00405480 lw t8, (t8) | t8 = *(t8);
0x00405484 sw t8, 0x146c(fp) | *(arg_146ch) = t8;
0x00405488 lw t8, -0x7fc8(gp) | t8 = sym.getApStatus__;
0x0040548c move t9, t8 | t9 = t8;
0x00405490 jalr t9 | t9 ();
0x00405494 nop |
0x00405498 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040549c move t8, v0 | t8 = v0;
0x004054a0 sltiu t8, t8, 1 | t8 = (t8 < 1) ? 1 : 0;
0x004054a4 andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x004054a8 beqz t8, 0x4054d4 |
0x004054ac nop |
0x004054b0 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.wifi_tool_hide_ap_:_fail */
0x004054b4 addiu a0, t8, -0x104c | a0 = t8 + -0x104c;
0x004054b8 lw t8, -0x7e70(gp) | t8 = sym.imp.puts;
0x004054bc move t9, t8 | t9 = t8;
0x004054c0 jalr t9 | t9 ();
0x004054c4 nop |
0x004054c8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004054cc b 0x405770 | goto label_0;
0x004054d0 nop |
| }
0x004054d4 addiu t8, fp, 0x30 | t8 = fp + 0x30;
0x004054d8 move a0, t8 | a0 = t8;
0x004054dc lw t8, -0x7fd0(gp) | t8 = *(gp);
0x004054e0 move t9, t8 | t9 = t8;
0x004054e4 jalr t9 | t9 ();
0x004054e8 nop |
0x004054ec lw gp, 0x10(fp) | gp = *(arg_10h);
0x004054f0 addiu t8, fp, 0x30 | t8 = fp + 0x30;
0x004054f4 move a0, t8 | a0 = t8;
0x004054f8 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* esilref: 'Wireless' */
0x004054fc addiu a1, t8, -0x144c | a1 = t8 + -0x144c;
0x00405500 move a2, zero | a2 = 0;
0x00405504 lw t8, -0x7e34(gp) | t8 = *(gp);
0x00405508 move t9, t8 | t9 = t8;
0x0040550c jalr t9 | t9 ();
0x00405510 nop |
0x00405514 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405518 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x0040551c move a0, t8 | a0 = t8;
0x00405520 lw t8, -0x7e5c(gp) | t8 = *(gp);
0x00405524 move t9, t8 | t9 = t8;
0x00405528 jalr t9 | t9 ();
0x0040552c nop |
0x00405530 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405534 addiu v0, fp, 0x28 | v0 = fp + 0x28;
0x00405538 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x0040553c move a0, v0 | a0 = v0;
0x00405540 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* esilref: 'AP_SSID' */
0x00405544 addiu a1, v0, -0x1440 | a1 = v0 + -0x1440;
0x00405548 move a2, t8 | a2 = t8;
0x0040554c lw t8, -0x7dcc(gp) | t8 = *(gp);
0x00405550 move t9, t8 | t9 = t8;
0x00405554 jalr t9 | t9 ();
0x00405558 nop |
0x0040555c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405560 addiu v1, fp, 0x2c | v1 = fp + 0x2c;
0x00405564 addiu v0, fp, 0x30 | v0 = fp + 0x30;
0x00405568 addiu t8, fp, 0x28 | t8 = fp + 0x28;
0x0040556c move a0, v1 | a0 = v1;
0x00405570 move a1, v0 | a1 = v0;
0x00405574 move a2, t8 | a2 = t8;
0x00405578 lw t8, -0x7dac(gp) | t8 = *(gp);
0x0040557c move t9, t8 | t9 = t8;
0x00405580 jalr t9 | t9 ();
0x00405584 nop |
0x00405588 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040558c addiu t8, fp, 0x2c | t8 = fp + 0x2c;
0x00405590 move a0, t8 | a0 = t8;
0x00405594 lw t8, -0x7d18(gp) | t8 = *(gp);
0x00405598 move t9, t8 | t9 = t8;
0x0040559c jalr t9 | t9 ();
0x004055a0 nop |
0x004055a4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004055a8 move t8, v0 | t8 = v0;
0x004055ac addiu v0, fp, 0x1048 | v0 = fp + 0x1048;
0x004055b0 move a0, v0 | a0 = v0;
0x004055b4 move a1, t8 | a1 = t8;
0x004055b8 addiu a2, zero, 0x20 | a2 = 0x20;
0x004055bc lw t8, -0x7df0(gp) | t8 = sym.imp.strncpy;
0x004055c0 move t9, t8 | t9 = t8;
0x004055c4 jalr t9 | t9 ();
0x004055c8 nop |
0x004055cc lw gp, 0x10(fp) | gp = *(arg_10h);
0x004055d0 addiu t8, fp, 0x2c | t8 = fp + 0x2c;
0x004055d4 move a0, t8 | a0 = t8;
0x004055d8 lw t8, -0x7d7c(gp) | t8 = *(gp);
0x004055dc move t9, t8 | t9 = t8;
0x004055e0 jalr t9 | t9 ();
0x004055e4 nop |
0x004055e8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004055ec addiu t8, fp, 0x28 | t8 = fp + 0x28;
0x004055f0 move a0, t8 | a0 = t8;
0x004055f4 lw t8, -0x7d7c(gp) | t8 = *(gp);
0x004055f8 move t9, t8 | t9 = t8;
0x004055fc jalr t9 | t9 ();
0x00405600 nop |
0x00405604 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405608 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x0040560c move a0, t8 | a0 = t8;
0x00405610 lw t8, -0x7e08(gp) | t8 = *(gp);
0x00405614 move t9, t8 | t9 = t8;
0x00405618 jalr t9 | t9 ();
0x0040561c nop |
0x00405620 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405624 addiu t8, fp, 0x30 | t8 = fp + 0x30;
0x00405628 move a0, t8 | a0 = t8;
0x0040562c lw t8, -0x7cf0(gp) | t8 = *(gp);
0x00405630 move t9, t8 | t9 = t8;
0x00405634 jalr t9 | t9 ();
0x00405638 nop |
0x0040563c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405640 addiu v0, fp, 0x106c | v0 = fp + 0x106c;
0x00405644 addiu t8, fp, 0x1048 | t8 = fp + 0x1048;
0x00405648 move a0, v0 | a0 = v0;
0x0040564c lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* str.iwpriv_ra0_set_HideSSID_d__iwpriv_ra0_set_SSID__s_ */
0x00405650 addiu a1, v0, -0x1030 | a1 = v0 + -0x1030;
0x00405654 lw a2, 0x1c(fp) | a2 = *(arg_1ch);
0x00405658 move a3, t8 | a3 = t8;
0x0040565c lw t8, -0x7e14(gp) | t8 = sym.imp.sprintf
0x00405660 move t9, t8 | t9 = t8;
0x00405664 jalr t9 | t9 ();
0x00405668 nop |
0x0040566c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405670 addiu t8, fp, 0x106c | t8 = fp + 0x106c;
0x00405674 move a0, t8 | a0 = t8;
0x00405678 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x0040567c move t9, t8 | t9 = t8;
0x00405680 jalr t9 | t9 ();
0x00405684 nop |
0x00405688 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040568c addiu t8, fp, 0x30 | t8 = fp + 0x30;
0x00405690 move a0, t8 | a0 = t8;
0x00405694 lw t8, -0x7dfc(gp) | t8 = sym.imp.TinyDB::TinyDB__;
0x00405698 move t9, t8 | t9 = t8;
0x0040569c jalr t9 | t9 ();
0x004056a0 nop |
0x004056a4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004056a8 b 0x405770 | goto label_0;
0x004056ac nop |
| label_0:
0x00405770 lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x00405774 lw v0, 0x146c(fp) | v0 = *(arg_146ch);
0x00405778 lw t8, (t8) | t8 = *(t8);
| if (v0 != t8) {
0x0040577c beq v0, t8, 0x405794 |
0x00405780 nop |
0x00405784 lw t8, -0x7da8(gp) | t8 = sym.imp.__stack_chk_fail;
0x00405788 move t9, t8 | t9 = t8;
0x0040578c jalr t9 | t9 ();
0x00405790 nop |
| }
0x00405794 move sp, fp |
0x00405798 lw ra, 0x147c(sp) | ra = *(var_147ch);
0x0040579c lw fp, 0x1478(sp) | fp = *(var_1478h);
0x004057a0 lw s0, 0x1474(sp) | s0 = *(var_1474h);
0x004057a4 addiu sp, sp, 0x1480 |
0x004057a8 jr ra | return v0;
0x004057ac 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 @ 0x40d468 */
| #include <stdint.h>
|
; (fcn) sym.handleLinkLocal_char_ () | void handleLinkLocal_char_ () {
| /* handleLinkLocal(char*) */
0x0040d468 lui gp, 2 |
0x0040d46c addiu gp, gp, -0x3428 |
0x0040d470 addu gp, gp, t9 | gp += t9;
0x0040d474 addiu sp, sp, -0x438 |
0x0040d478 sw ra, 0x434(sp) | *(var_434h) = ra;
0x0040d47c sw fp, 0x430(sp) | *(var_430h) = fp;
0x0040d480 move fp, sp | fp = sp;
0x0040d484 sw gp, 0x18(sp) | *(var_18h) = gp;
0x0040d488 sw a0, 0x24(fp) | *(arg_24h) = a0;
0x0040d48c lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x0040d490 lw t8, (t8) | t8 = *(t8);
0x0040d494 sw t8, 0x42c(fp) | *(arg_42ch) = t8;
0x0040d498 addiu t8, fp, 0x2c | t8 = fp + 0x2c;
0x0040d49c lw v0, -0x7ed8(gp) | v0 = *(gp);
0x0040d4a0 sw v0, 0x10(sp) | *(var_10h) = v0;
0x0040d4a4 move a0, t8 | a0 = t8;
0x0040d4a8 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.ifconfig__s__s_netmask__s */
0x0040d4ac addiu a1, t8, -0x454 | a1 = t8 + -0x454;
0x0040d4b0 lw a2, 0x24(fp) | a2 = *(arg_24h);
0x0040d4b4 lw a3, -0x7edc(gp) | a3 = *(gp);
0x0040d4b8 lw t8, -0x7e14(gp) | t8 = sym.imp.sprintf
0x0040d4bc move t9, t8 | t9 = t8;
0x0040d4c0 jalr t9 | t9 ();
0x0040d4c4 nop |
0x0040d4c8 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0040d4cc addiu t8, fp, 0x2c | t8 = fp + 0x2c;
0x0040d4d0 move a0, t8 | a0 = t8;
0x0040d4d4 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x0040d4d8 move t9, t8 | t9 = t8;
0x0040d4dc jalr t9 | t9 ();
0x0040d4e0 nop |
0x0040d4e4 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0040d4e8 addiu t8, fp, 0x2c | t8 = fp + 0x2c;
0x0040d4ec move a0, t8 | a0 = t8;
0x0040d4f0 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.route_add_default_gw__s__s */
0x0040d4f4 addiu a1, t8, -0x438 | a1 = t8 + -0x438;
0x0040d4f8 lw a2, -0x7ed4(gp) | a2 = *(gp);
0x0040d4fc lw a3, 0x24(fp) | a3 = *(arg_24h);
0x0040d500 lw t8, -0x7e14(gp) | t8 = sym.imp.sprintf
0x0040d504 move t9, t8 | t9 = t8;
0x0040d508 jalr t9 | t9 ();
0x0040d50c nop |
0x0040d510 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0040d514 addiu t8, fp, 0x2c | t8 = fp + 0x2c;
0x0040d518 move a0, t8 | a0 = t8;
0x0040d51c lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x0040d520 move t9, t8 | t9 = t8;
0x0040d524 jalr t9 | t9 ();
0x0040d528 nop |
0x0040d52c lw gp, 0x18(fp) | gp = *(arg_18h);
0x0040d530 addiu t8, fp, 0x2c | t8 = fp + 0x2c;
0x0040d534 move a0, t8 | a0 = t8;
0x0040d538 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.median_s__etc_rc.d_init.d_zcip.sh_restart */
0x0040d53c addiu a1, t8, -0x41c | a1 = t8 + -0x41c;
0x0040d540 lw a2, 0x24(fp) | a2 = *(arg_24h);
0x0040d544 lw t8, -0x7e14(gp) | t8 = sym.imp.sprintf
0x0040d548 move t9, t8 | t9 = t8;
0x0040d54c jalr t9 | t9 ();
0x0040d550 nop |
0x0040d554 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0040d558 addiu t8, fp, 0x2c | t8 = fp + 0x2c;
0x0040d55c move a0, t8 | a0 = t8;
0x0040d560 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x0040d564 move t9, t8 | t9 = t8;
0x0040d568 jalr t9 | t9 ();
0x0040d56c nop |
0x0040d570 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0040d574 lw t8, -0x7eb8(gp) | t8 = sym.handleDNS__;
0x0040d578 move t9, t8 | t9 = t8;
0x0040d57c jalr t9 | t9 ();
0x0040d580 nop |
0x0040d584 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0040d588 lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x0040d58c lw v0, 0x42c(fp) | v0 = *(arg_42ch);
0x0040d590 lw t8, (t8) | t8 = *(t8);
| if (v0 != t8) {
0x0040d594 beq v0, t8, 0x40d5ac |
0x0040d598 nop |
0x0040d59c lw t8, -0x7da8(gp) | t8 = sym.imp.__stack_chk_fail;
0x0040d5a0 move t9, t8 | t9 = t8;
0x0040d5a4 jalr t9 | t9 ();
0x0040d5a8 nop |
| }
0x0040d5ac move sp, fp |
0x0040d5b0 lw ra, 0x434(sp) | ra = *(var_434h);
0x0040d5b4 lw fp, 0x430(sp) | fp = *(var_430h);
0x0040d5b8 addiu sp, sp, 0x438 |
0x0040d5bc jr ra | return v0;
0x0040d5c0 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 @ 0x409344 */
| #include <stdint.h>
|
; (fcn) sym.handleStartWps__ () | void handleStartWps_ () {
| /* handleStartWps() */
0x00409344 lui gp, 2 |
0x00409348 addiu gp, gp, 0xcfc |
0x0040934c addu gp, gp, t9 | gp += t9;
0x00409350 addiu sp, sp, -0x3960 |
0x00409354 sw ra, 0x395c(sp) | *(arg_395ch) = ra;
0x00409358 sw fp, 0x3958(sp) | *(arg_3958h) = fp;
0x0040935c sw s0, 0x3954(sp) | *(arg_3954h) = s0;
0x00409360 move fp, sp | fp = sp;
0x00409364 sw gp, 0x10(sp) | *(arg_10h) = gp;
0x00409368 lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x0040936c lw t8, (t8) | t8 = *(t8);
0x00409370 sw t8, 0x394c(fp) | *(arg_394ch) = t8;
0x00409374 addiu t8, zero, 1 | t8 = 1;
0x00409378 sb t8, 0x1b(fp) | *(arg_1bh) = t8;
0x0040937c lw t8, -0x7e1c(gp) | t8 = sym.imp.wifiCheckModule__;
0x00409380 move t9, t8 | t9 = t8;
0x00409384 jalr t9 | t9 ();
0x00409388 nop |
0x0040938c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409390 move t8, v0 | t8 = v0;
0x00409394 move v0, t8 | v0 = t8;
0x00409398 lw t8, -0x7f74(gp) | t8 = *((gp - 8157));
0x0040939c sw v0, 0x23a4(t8) | *((t8 + 9124)) = v0;
0x004093a0 lw t8, -0x7f74(gp) | t8 = *((gp - 8157));
0x004093a4 lw t8, 0x23a4(t8) | t8 = *((t8 + 2281));
| if (t8 == 0) {
0x004093a8 bnez t8, 0x4094c4 |
0x004093ac nop |
0x004093b0 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x004093b4 move a0, t8 | a0 = t8;
0x004093b8 lw t8, -0x7fbc(gp) | t8 = *(gp);
0x004093bc move t9, t8 | t9 = t8;
0x004093c0 jalr t9 | t9 ();
0x004093c4 nop |
0x004093c8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004093cc addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x004093d0 move a0, t8 | a0 = t8;
0x004093d4 lw t8, -0x7e2c(gp) | t8 = *(gp);
0x004093d8 move t9, t8 | t9 = t8;
0x004093dc jalr t9 | t9 ();
0x004093e0 nop |
0x004093e4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004093e8 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.ifconfig_ra0_down */
0x004093ec addiu a0, t8, -0xa04 | a0 = t8 + -0xa04;
0x004093f0 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x004093f4 move t9, t8 | t9 = t8;
0x004093f8 jalr t9 | t9 ();
0x004093fc nop |
0x00409400 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409404 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.ifconfig_ra0_up */
0x00409408 addiu a0, t8, -0x9f0 | a0 = t8 + -0x9f0;
0x0040940c lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x00409410 move t9, t8 | t9 = t8;
0x00409414 jalr t9 | t9 ();
0x00409418 nop |
0x0040941c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409420 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00409424 move a0, t8 | a0 = t8;
0x00409428 lw t8, -0x7d20(gp) | t8 = *(gp);
0x0040942c move t9, t8 | t9 = t8;
0x00409430 jalr t9 | t9 ();
0x00409434 nop |
0x00409438 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040943c move t8, v0 | t8 = v0;
0x00409440 addiu v0, fp, 0x354c | v0 = fp + 0x354c;
0x00409444 move a0, v0 | a0 = v0;
0x00409448 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* str.iwpriv_ra0_set_CountryRegion_d */
0x0040944c addiu a1, v0, -0x9e0 | a1 = v0 + -0x9e0;
0x00409450 move a2, t8 | a2 = t8;
0x00409454 lw t8, -0x7e14(gp) | t8 = sym.imp.sprintf
0x00409458 move t9, t8 | t9 = t8;
0x0040945c jalr t9 | t9 ();
0x00409460 nop |
0x00409464 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409468 addiu t8, fp, 0x354c | t8 = fp + 0x354c;
0x0040946c move a0, t8 | a0 = t8;
0x00409470 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x00409474 move t9, t8 | t9 = t8;
0x00409478 jalr t9 | t9 ();
0x0040947c nop |
0x00409480 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409484 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.iwpriv_ra0_radio_on */
0x00409488 addiu a0, t8, -0x9c0 | a0 = t8 + -0x9c0;
0x0040948c lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x00409490 move t9, t8 | t9 = t8;
0x00409494 jalr t9 | t9 ();
0x00409498 nop |
0x0040949c lw gp, 0x10(fp) | gp = *(arg_10h);
0x004094a0 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x004094a4 move a0, t8 | a0 = t8;
0x004094a8 lw t8, -0x7cec(gp) | t8 = sym.imp.PIB::PIB__;
0x004094ac move t9, t8 | t9 = t8;
0x004094b0 jalr t9 | t9 ();
0x004094b4 nop |
0x004094b8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004094bc b 0x4095b4 | goto label_0;
0x004094c0 nop |
| }
0x004094c4 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x004094c8 move a0, t8 | a0 = t8;
0x004094cc lw t8, -0x7fbc(gp) | t8 = *(gp);
0x004094d0 move t9, t8 | t9 = t8;
0x004094d4 jalr t9 | t9 ();
0x004094d8 nop |
0x004094dc lw gp, 0x10(fp) | gp = *(arg_10h);
0x004094e0 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x004094e4 move a0, t8 | a0 = t8;
0x004094e8 lw t8, -0x7e2c(gp) | t8 = *(gp);
0x004094ec move t9, t8 | t9 = t8;
0x004094f0 jalr t9 | t9 ();
0x004094f4 nop |
0x004094f8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004094fc lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.ifconfig_apcli0_down */
0x00409500 addiu a0, t8, -0x9ac | a0 = t8 + -0x9ac;
0x00409504 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x00409508 move t9, t8 | t9 = t8;
0x0040950c jalr t9 | t9 ();
0x00409510 nop |
0x00409514 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409518 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.ifconfig_apcli0_up */
0x0040951c addiu a0, t8, -0x994 | a0 = t8 + -0x994;
0x00409520 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x00409524 move t9, t8 | t9 = t8;
0x00409528 jalr t9 | t9 ();
0x0040952c nop |
0x00409530 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409534 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00409538 move a0, t8 | a0 = t8;
0x0040953c lw t8, -0x7d20(gp) | t8 = *(gp);
0x00409540 move t9, t8 | t9 = t8;
0x00409544 jalr t9 | t9 ();
0x00409548 nop |
0x0040954c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409550 move t8, v0 | t8 = v0;
0x00409554 addiu v0, fp, 0x354c | v0 = fp + 0x354c;
0x00409558 move a0, v0 | a0 = v0;
0x0040955c lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* str.iwpriv_ra0_set_CountryRegion_d */
0x00409560 addiu a1, v0, -0x9e0 | a1 = v0 + -0x9e0;
0x00409564 move a2, t8 | a2 = t8;
0x00409568 lw t8, -0x7e14(gp) | t8 = sym.imp.sprintf
0x0040956c move t9, t8 | t9 = t8;
0x00409570 jalr t9 | t9 ();
0x00409574 nop |
0x00409578 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040957c addiu t8, fp, 0x354c | t8 = fp + 0x354c;
0x00409580 move a0, t8 | a0 = t8;
0x00409584 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x00409588 move t9, t8 | t9 = t8;
0x0040958c jalr t9 | t9 ();
0x00409590 nop |
0x00409594 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409598 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x0040959c move a0, t8 | a0 = t8;
0x004095a0 lw t8, -0x7cec(gp) | t8 = sym.imp.PIB::PIB__;
0x004095a4 move t9, t8 | t9 = t8;
0x004095a8 jalr t9 | t9 ();
0x004095ac nop |
0x004095b0 lw gp, 0x10(fp) | gp = *(arg_10h);
| label_0:
0x004095b4 addiu a0, zero, 3 | a0 = 3;
0x004095b8 lw t8, -0x7d1c(gp) | t8 = sym.imp.sleep;
0x004095bc move t9, t8 | t9 = t8;
0x004095c0 jalr t9 | t9 ();
0x004095c4 nop |
0x004095c8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004095cc move a0, zero | a0 = 0;
0x004095d0 lw t8, -0x7db0(gp) | t8 = sym.imp.time;
0x004095d4 move t9, t8 | t9 = t8;
0x004095d8 jalr t9 | t9 ();
0x004095dc nop |
0x004095e0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004095e4 lw t8, -0x7f74(gp) | t8 = *((gp - 8157));
0x004095e8 sw v0, 0x23a8(t8) | *((t8 + 9128)) = v0;
0x004095ec lw t8, -0x7fa0(gp) | t8 = *(gp);
| /* aav.0x004075e0 */
0x004095f0 addiu t8, t8, 0x75e0 | t8 += 0x75e0;
0x004095f4 move t9, t8 | t9 = t8;
0x004095f8 jalr t9 | t9 ();
0x004095fc nop |
0x00409600 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409604 sw v0, 0x1c(fp) | *(arg_1ch) = v0;
0x00409608 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
| if (t8 < 0) {
0x0040960c bgez t8, 0x409650 |
0x00409610 nop |
0x00409614 lw t8, -0x7dbc(gp) | t8 = *((gp - 8047));
0x00409618 lw t8, (t8) | t8 = *(t8);
0x0040961c lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
| /* str.can_not_open_socket__n */
0x00409620 addiu a0, v0, -0x980 | a0 = v0 + -0x980;
0x00409624 addiu a1, zero, 1 | a1 = 1;
0x00409628 addiu a2, zero, 0x15 | a2 = 0x15;
0x0040962c move a3, t8 | a3 = t8;
0x00409630 lw t8, -0x7d08(gp) | t8 = sym.imp.fwrite;
0x00409634 move t9, t8 | t9 = t8;
0x00409638 jalr t9 | t9 ();
0x0040963c nop |
0x00409640 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409644 addiu t8, zero, 1 | t8 = 1;
0x00409648 b 0x409bd8 | goto label_1;
0x0040964c nop |
| }
0x00409650 lw t8, -0x7f74(gp) | t8 = *((gp - 8157));
0x00409654 lw t8, 0x23a4(t8) | t8 = *((t8 + 2281));
| if (t8 == 0) {
0x00409658 bnez t8, 0x4096ec |
0x0040965c nop |
0x00409660 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.iwpriv_ra0_wsc_conf_mode_1 */
0x00409664 addiu a0, t8, -0x968 | a0 = t8 + -0x968;
0x00409668 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x0040966c move t9, t8 | t9 = t8;
0x00409670 jalr t9 | t9 ();
0x00409674 nop |
0x00409678 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040967c addiu a0, zero, 1 | a0 = 1;
0x00409680 lw t8, -0x7d1c(gp) | t8 = sym.imp.sleep;
0x00409684 move t9, t8 | t9 = t8;
0x00409688 jalr t9 | t9 ();
0x0040968c nop |
0x00409690 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409694 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.iwpriv_ra0_wsc_mode_2 */
0x00409698 addiu a0, t8, -0x94c | a0 = t8 + -0x94c;
0x0040969c lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x004096a0 move t9, t8 | t9 = t8;
0x004096a4 jalr t9 | t9 ();
0x004096a8 nop |
0x004096ac lw gp, 0x10(fp) | gp = *(arg_10h);
0x004096b0 addiu a0, zero, 1 | a0 = 1;
0x004096b4 lw t8, -0x7d1c(gp) | t8 = sym.imp.sleep;
0x004096b8 move t9, t8 | t9 = t8;
0x004096bc jalr t9 | t9 ();
0x004096c0 nop |
0x004096c4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004096c8 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.iwpriv_ra0_wsc_start */
0x004096cc addiu a0, t8, -0x934 | a0 = t8 + -0x934;
0x004096d0 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x004096d4 move t9, t8 | t9 = t8;
0x004096d8 jalr t9 | t9 ();
0x004096dc nop |
0x004096e0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004096e4 b 0x409bc8 | goto label_2;
0x004096e8 nop |
| }
0x004096ec lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.iwpriv_apcli0_set_ApCliEnable1 */
0x004096f0 addiu a0, t8, -0x91c | a0 = t8 + -0x91c;
0x004096f4 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x004096f8 move t9, t8 | t9 = t8;
0x004096fc jalr t9 | t9 ();
0x00409700 nop |
0x00409704 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409708 addiu a0, zero, 1 | a0 = 1;
0x0040970c lw t8, -0x7d1c(gp) | t8 = sym.imp.sleep;
0x00409710 move t9, t8 | t9 = t8;
0x00409714 jalr t9 | t9 ();
0x00409718 nop |
0x0040971c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409720 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.iwpriv_apcli0_set_WscConfMode1 */
0x00409724 addiu a0, t8, -0x8fc | a0 = t8 + -0x8fc;
0x00409728 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x0040972c move t9, t8 | t9 = t8;
0x00409730 jalr t9 | t9 ();
0x00409734 nop |
0x00409738 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040973c lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.iwpriv_apcli0_set_WscMode2 */
0x00409740 addiu a0, t8, -0x8dc | a0 = t8 + -0x8dc;
0x00409744 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x00409748 move t9, t8 | t9 = t8;
0x0040974c jalr t9 | t9 ();
0x00409750 nop |
0x00409754 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409758 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.iwpriv_apcli0_set_WscStatus1 */
0x0040975c addiu a0, t8, -0x8c0 | a0 = t8 + -0x8c0;
0x00409760 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x00409764 move t9, t8 | t9 = t8;
0x00409768 jalr t9 | t9 ();
0x0040976c nop |
0x00409770 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409774 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.iwpriv_apcli0_set_WscGetConf1 */
0x00409778 addiu a0, t8, -0x8a0 | a0 = t8 + -0x8a0;
0x0040977c lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x00409780 move t9, t8 | t9 = t8;
0x00409784 jalr t9 | t9 ();
0x00409788 nop |
0x0040978c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409790 addiu a0, zero, 1 | a0 = 1;
0x00409794 lw t8, -0x7d1c(gp) | t8 = sym.imp.sleep;
0x00409798 move t9, t8 | t9 = t8;
0x0040979c jalr t9 | t9 ();
0x004097a0 nop |
0x004097a4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004097a8 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.iwpriv_apcli0_set_ApCliEnable1 */
0x004097ac addiu a0, t8, -0x91c | a0 = t8 + -0x91c;
0x004097b0 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x004097b4 move t9, t8 | t9 = t8;
0x004097b8 jalr t9 | t9 ();
0x004097bc nop |
0x004097c0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004097c4 addiu a0, zero, 1 | a0 = 1;
0x004097c8 lw t8, -0x7d1c(gp) | t8 = sym.imp.sleep;
0x004097cc move t9, t8 | t9 = t8;
0x004097d0 jalr t9 | t9 ();
0x004097d4 nop |
0x004097d8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004097dc b 0x409bc8 | goto label_2;
0x004097e0 nop |
| do {
0x004097e4 lw a0, 0x1c(fp) | a0 = *(arg_1ch);
0x004097e8 lw t8, -0x7f4c(gp) | t8 = sym.wps_go_get_wps_status_int_;
0x004097ec move t9, t8 | t9 = t8;
0x004097f0 jalr t9 | t9 ();
0x004097f4 nop |
0x004097f8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004097fc move t8, v0 | t8 = v0;
0x00409800 sw t8, 0x20(fp) | *(arg_20h) = t8;
0x00409804 lw t8, 0x20(fp) | t8 = *(arg_20h);
0x00409808 addiu v0, zero, 5 | v0 = 5;
| if (t8 != v0) {
0x0040980c beq t8, v0, 0x409834 |
0x00409810 nop |
0x00409814 addiu v0, zero, 6 | v0 = 6;
| if (t8 == v0) {
0x00409818 beq t8, v0, 0x409a84 | goto label_3;
| }
0x0040981c nop |
0x00409820 addiu v0, zero, 4 | v0 = 4;
| if (t8 == v0) {
0x00409824 beq t8, v0, 0x4099fc | goto label_4;
| }
0x00409828 nop |
0x0040982c b 0x409b0c | goto label_5;
0x00409830 nop |
| }
0x00409834 lw t8, -0x7f74(gp) | t8 = *((gp - 8157));
0x00409838 lw t8, 0x23a4(t8) | t8 = *((t8 + 2281));
| if (t8 == 0) {
0x0040983c bnez t8, 0x4098c4 |
0x00409840 nop |
0x00409844 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00409848 move a0, t8 | a0 = t8;
0x0040984c lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* aav.0x004085c0 */
0x00409850 addiu t8, t8, -0x7a40 | t8 += -0x7a40;
0x00409854 move t9, t8 | t9 = t8;
0x00409858 jalr t9 | t9 ();
0x0040985c nop |
0x00409860 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409864 move t8, v0 | t8 = v0;
0x00409868 slt t8, zero, t8 | t8 = (0 < t8) ? 1 : 0;
0x0040986c andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x00409870 beqz t8, 0x4098a0 |
0x00409874 nop |
0x00409878 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x0040987c move a0, t8 | a0 = t8;
0x00409880 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* aav.0x00408e30 */
0x00409884 addiu t8, t8, -0x71d0 | t8 += -0x71d0;
0x00409888 move t9, t8 | t9 = t8;
0x0040988c jalr t9 | t9 ();
0x00409890 nop |
0x00409894 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409898 b 0x409974 | goto label_6;
0x0040989c nop |
| }
0x004098a0 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.fail_to_update_tinyDB_ */
0x004098a4 addiu a0, t8, -0x880 | a0 = t8 + -0x880;
0x004098a8 lw t8, -0x7e70(gp) | t8 = sym.imp.puts;
0x004098ac move t9, t8 | t9 = t8;
0x004098b0 jalr t9 | t9 ();
0x004098b4 nop |
0x004098b8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004098bc b 0x409974 | goto label_6;
0x004098c0 nop |
| }
0x004098c4 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.iwpriv_ra0_stat____etc_wsc_status.dat */
0x004098c8 addiu a0, t8, -0x868 | a0 = t8 + -0x868;
0x004098cc lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x004098d0 move t9, t8 | t9 = t8;
0x004098d4 jalr t9 | t9 ();
0x004098d8 nop |
0x004098dc lw gp, 0x10(fp) | gp = *(arg_10h);
0x004098e0 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.echo_Channel_iwgetid___raw___channel_ra0______etc_wsc_status.dat */
0x004098e4 addiu a0, t8, -0x840 | a0 = t8 + -0x840;
0x004098e8 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x004098ec move t9, t8 | t9 = t8;
0x004098f0 jalr t9 | t9 ();
0x004098f4 nop |
0x004098f8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004098fc addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00409900 move a0, t8 | a0 = t8;
0x00409904 lw t8, -0x7fa0(gp) | t8 = *(gp);
| /* aav.0x00407f68 */
0x00409908 addiu t8, t8, 0x7f68 | t8 += 0x7f68;
0x0040990c move t9, t8 | t9 = t8;
0x00409910 jalr t9 | t9 ();
0x00409914 nop |
0x00409918 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040991c move t8, v0 | t8 = v0;
0x00409920 slt t8, zero, t8 | t8 = (0 < t8) ? 1 : 0;
0x00409924 andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x00409928 beqz t8, 0x409958 |
0x0040992c nop |
0x00409930 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00409934 move a0, t8 | a0 = t8;
0x00409938 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* aav.0x00408e30 */
0x0040993c addiu t8, t8, -0x71d0 | t8 += -0x71d0;
0x00409940 move t9, t8 | t9 = t8;
0x00409944 jalr t9 | t9 ();
0x00409948 nop |
0x0040994c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409950 b 0x409974 | goto label_6;
0x00409954 nop |
| }
0x00409958 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.fail_to_update_tinyDB_ */
0x0040995c addiu a0, t8, -0x880 | a0 = t8 + -0x880;
0x00409960 lw t8, -0x7e70(gp) | t8 = sym.imp.puts;
0x00409964 move t9, t8 | t9 = t8;
0x00409968 jalr t9 | t9 ();
0x0040996c nop |
0x00409970 lw gp, 0x10(fp) | gp = *(arg_10h);
| label_6:
0x00409974 sb zero, 0x1b(fp) | *(arg_1bh) = 0;
0x00409978 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.iwpriv_apcli0_set_WscConfMode0 */
0x0040997c addiu a0, t8, -0x7fc | a0 = t8 + -0x7fc;
0x00409980 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x00409984 move t9, t8 | t9 = t8;
0x00409988 jalr t9 | t9 ();
0x0040998c nop |
0x00409990 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409994 addiu t8, fp, 0x354c | t8 = fp + 0x354c;
0x00409998 move a0, t8 | a0 = t8;
0x0040999c lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.send_cmd_watchdog__d__d */
0x004099a0 addiu a1, t8, -0x7dc | a1 = t8 + -0x7dc;
0x004099a4 addiu a2, zero, 0x264 | a2 = 0x264;
0x004099a8 addiu a3, zero, 2 | a3 = 2;
0x004099ac lw t8, -0x7e14(gp) | t8 = sym.imp.sprintf
0x004099b0 move t9, t8 | t9 = t8;
0x004099b4 jalr t9 | t9 ();
0x004099b8 nop |
0x004099bc lw gp, 0x10(fp) | gp = *(arg_10h);
0x004099c0 addiu t8, fp, 0x354c | t8 = fp + 0x354c;
0x004099c4 move a0, t8 | a0 = t8;
0x004099c8 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x004099cc move t9, t8 | t9 = t8;
0x004099d0 jalr t9 | t9 ();
0x004099d4 nop |
0x004099d8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004099dc addiu a0, zero, 5 | a0 = 5;
0x004099e0 lw t8, -0x7d1c(gp) | t8 = sym.imp.sleep;
0x004099e4 move t9, t8 | t9 = t8;
0x004099e8 jalr t9 | t9 ();
0x004099ec nop |
0x004099f0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004099f4 b 0x409b28 | goto label_7;
0x004099f8 nop |
| label_4:
0x004099fc sb zero, 0x1b(fp) | *(arg_1bh) = 0;
0x00409a00 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.iwpriv_apcli0_set_WscConfMode0 */
0x00409a04 addiu a0, t8, -0x7fc | a0 = t8 + -0x7fc;
0x00409a08 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x00409a0c move t9, t8 | t9 = t8;
0x00409a10 jalr t9 | t9 ();
0x00409a14 nop |
0x00409a18 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409a1c addiu t8, fp, 0x354c | t8 = fp + 0x354c;
0x00409a20 move a0, t8 | a0 = t8;
0x00409a24 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.send_cmd_watchdog__d__d */
0x00409a28 addiu a1, t8, -0x7dc | a1 = t8 + -0x7dc;
0x00409a2c addiu a2, zero, 0x264 | a2 = 0x264;
0x00409a30 addiu a3, zero, 3 | a3 = 3;
0x00409a34 lw t8, -0x7e14(gp) | t8 = sym.imp.sprintf
0x00409a38 move t9, t8 | t9 = t8;
0x00409a3c jalr t9 | t9 ();
0x00409a40 nop |
0x00409a44 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409a48 addiu t8, fp, 0x354c | t8 = fp + 0x354c;
0x00409a4c move a0, t8 | a0 = t8;
0x00409a50 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x00409a54 move t9, t8 | t9 = t8;
0x00409a58 jalr t9 | t9 ();
0x00409a5c nop |
0x00409a60 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409a64 addiu a0, zero, 5 | a0 = 5;
0x00409a68 lw t8, -0x7d1c(gp) | t8 = sym.imp.sleep;
0x00409a6c move t9, t8 | t9 = t8;
0x00409a70 jalr t9 | t9 ();
0x00409a74 nop |
0x00409a78 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409a7c b 0x409b28 | goto label_7;
0x00409a80 nop |
| label_3:
0x00409a84 sb zero, 0x1b(fp) | *(arg_1bh) = 0;
0x00409a88 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.iwpriv_apcli0_set_WscConfMode0 */
0x00409a8c addiu a0, t8, -0x7fc | a0 = t8 + -0x7fc;
0x00409a90 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x00409a94 move t9, t8 | t9 = t8;
0x00409a98 jalr t9 | t9 ();
0x00409a9c nop |
0x00409aa0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409aa4 addiu t8, fp, 0x354c | t8 = fp + 0x354c;
0x00409aa8 move a0, t8 | a0 = t8;
0x00409aac lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.send_cmd_watchdog__d__d */
0x00409ab0 addiu a1, t8, -0x7dc | a1 = t8 + -0x7dc;
0x00409ab4 addiu a2, zero, 0x264 | a2 = 0x264;
0x00409ab8 addiu a3, zero, 3 | a3 = 3;
0x00409abc lw t8, -0x7e14(gp) | t8 = sym.imp.sprintf
0x00409ac0 move t9, t8 | t9 = t8;
0x00409ac4 jalr t9 | t9 ();
0x00409ac8 nop |
0x00409acc lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409ad0 addiu t8, fp, 0x354c | t8 = fp + 0x354c;
0x00409ad4 move a0, t8 | a0 = t8;
0x00409ad8 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x00409adc move t9, t8 | t9 = t8;
0x00409ae0 jalr t9 | t9 ();
0x00409ae4 nop |
0x00409ae8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409aec addiu a0, zero, 5 | a0 = 5;
0x00409af0 lw t8, -0x7d1c(gp) | t8 = sym.imp.sleep;
0x00409af4 move t9, t8 | t9 = t8;
0x00409af8 jalr t9 | t9 ();
0x00409afc nop |
0x00409b00 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409b04 b 0x409b28 | goto label_7;
0x00409b08 nop |
| label_5:
0x00409b0c addiu a0, zero, 1 | a0 = 1;
0x00409b10 lw t8, -0x7d1c(gp) | t8 = sym.imp.sleep;
0x00409b14 move t9, t8 | t9 = t8;
0x00409b18 jalr t9 | t9 ();
0x00409b1c nop |
0x00409b20 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409b24 nop |
| label_7:
0x00409b28 move a0, zero | a0 = 0;
0x00409b2c lw t8, -0x7db0(gp) | t8 = sym.imp.time;
0x00409b30 move t9, t8 | t9 = t8;
0x00409b34 jalr t9 | t9 ();
0x00409b38 nop |
0x00409b3c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409b40 lw t8, -0x7f74(gp) | t8 = *((gp - 8157));
0x00409b44 lw t8, 0x23a8(t8) | t8 = *((t8 + 2282));
0x00409b48 subu t8, v0, t8 | __asm ("subu t8, v0, t8");
0x00409b4c slti t8, t8, 0x6f | t8 = (t8 < 0x6f) ? 1 : 0;
0x00409b50 xori t8, t8, 1 | t8 ^= 1;
0x00409b54 andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x00409b58 beqz t8, 0x409bc8 |
0x00409b5c nop |
0x00409b60 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.iwpriv_apcli0_set_WscConfMode0 */
0x00409b64 addiu a0, t8, -0x7fc | a0 = t8 + -0x7fc;
0x00409b68 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x00409b6c move t9, t8 | t9 = t8;
0x00409b70 jalr t9 | t9 ();
0x00409b74 nop |
0x00409b78 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409b7c sb zero, 0x1b(fp) | *(arg_1bh) = 0;
0x00409b80 addiu t8, fp, 0x354c | t8 = fp + 0x354c;
0x00409b84 move a0, t8 | a0 = t8;
0x00409b88 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.send_cmd_watchdog__d__d */
0x00409b8c addiu a1, t8, -0x7dc | a1 = t8 + -0x7dc;
0x00409b90 addiu a2, zero, 0x264 | a2 = 0x264;
0x00409b94 addiu a3, zero, 3 | a3 = 3;
0x00409b98 lw t8, -0x7e14(gp) | t8 = sym.imp.sprintf
0x00409b9c move t9, t8 | t9 = t8;
0x00409ba0 jalr t9 | t9 ();
0x00409ba4 nop |
0x00409ba8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00409bac addiu t8, fp, 0x354c | t8 = fp + 0x354c;
0x00409bb0 move a0, t8 | a0 = t8;
0x00409bb4 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x00409bb8 move t9, t8 | t9 = t8;
0x00409bbc jalr t9 | t9 ();
0x00409bc0 nop |
0x00409bc4 lw gp, 0x10(fp) | gp = *(arg_10h);
| }
| label_2:
0x00409bc8 lbu t8, 0x1b(fp) | t8 = *(arg_1bh);
0x00409bcc bnez t8, 0x4097e4 |
| } while (t8 != 0);
0x00409bd0 nop |
0x00409bd4 move t8, zero | t8 = 0;
| label_1:
0x00409bd8 move v0, t8 | v0 = t8;
0x00409bdc lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x00409be0 lw v1, 0x394c(fp) | v1 = *(arg_394ch);
0x00409be4 lw t8, (t8) | t8 = *(t8);
| if (v1 != t8) {
0x00409be8 beq v1, t8, 0x409c80 |
0x00409bec nop |
0x00409bf0 b 0x409c70 | goto label_8;
0x00409bf4 nop |
| label_8:
0x00409c70 lw t8, -0x7da8(gp) | t8 = sym.imp.__stack_chk_fail;
0x00409c74 move t9, t8 | t9 = t8;
0x00409c78 jalr t9 | t9 ();
0x00409c7c nop |
| }
0x00409c80 move sp, fp |
0x00409c84 lw ra, 0x395c(sp) | ra = *(arg_395ch);
0x00409c88 lw fp, 0x3958(sp) | fp = *(arg_3958h);
0x00409c8c lw s0, 0x3954(sp) | s0 = *(arg_3954h);
0x00409c90 addiu sp, sp, 0x3960 |
0x00409c94 jr ra | return v1;
0x00409c98 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 @ 0x40d5c4 */
| #include <stdint.h>
|
; (fcn) sym.handleStaticClient_char_ () | void handleStaticClient_char_ () {
| /* handleStaticClient(char*) */
0x0040d5c4 lui gp, 2 |
0x0040d5c8 addiu gp, gp, -0x3584 |
0x0040d5cc addu gp, gp, t9 | gp += t9;
0x0040d5d0 addiu sp, sp, -0x438 |
0x0040d5d4 sw ra, 0x434(sp) | *(var_434h) = ra;
0x0040d5d8 sw fp, 0x430(sp) | *(var_430h) = fp;
0x0040d5dc move fp, sp | fp = sp;
0x0040d5e0 sw gp, 0x18(sp) | *(var_18h) = gp;
0x0040d5e4 sw a0, 0x24(fp) | *(arg_24h) = a0;
0x0040d5e8 lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x0040d5ec lw t8, (t8) | t8 = *(t8);
0x0040d5f0 sw t8, 0x42c(fp) | *(arg_42ch) = t8;
0x0040d5f4 addiu t8, fp, 0x2c | t8 = fp + 0x2c;
0x0040d5f8 lw v0, -0x7ed8(gp) | v0 = *(gp);
0x0040d5fc sw v0, 0x10(sp) | *(var_10h) = v0;
0x0040d600 move a0, t8 | a0 = t8;
0x0040d604 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.ifconfig__s__s_netmask__s */
0x0040d608 addiu a1, t8, -0x454 | a1 = t8 + -0x454;
0x0040d60c lw a2, 0x24(fp) | a2 = *(arg_24h);
0x0040d610 lw a3, -0x7edc(gp) | a3 = *(gp);
0x0040d614 lw t8, -0x7e14(gp) | t8 = sym.imp.sprintf
0x0040d618 move t9, t8 | t9 = t8;
0x0040d61c jalr t9 | t9 ();
0x0040d620 nop |
0x0040d624 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0040d628 addiu t8, fp, 0x2c | t8 = fp + 0x2c;
0x0040d62c move a0, t8 | a0 = t8;
0x0040d630 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x0040d634 move t9, t8 | t9 = t8;
0x0040d638 jalr t9 | t9 ();
0x0040d63c nop |
0x0040d640 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0040d644 addiu t8, fp, 0x2c | t8 = fp + 0x2c;
0x0040d648 move a0, t8 | a0 = t8;
0x0040d64c lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.route_add_default_gw__s__s */
0x0040d650 addiu a1, t8, -0x438 | a1 = t8 + -0x438;
0x0040d654 lw a2, -0x7ed4(gp) | a2 = *(gp);
0x0040d658 lw a3, 0x24(fp) | a3 = *(arg_24h);
0x0040d65c lw t8, -0x7e14(gp) | t8 = sym.imp.sprintf
0x0040d660 move t9, t8 | t9 = t8;
0x0040d664 jalr t9 | t9 ();
0x0040d668 nop |
0x0040d66c lw gp, 0x18(fp) | gp = *(arg_18h);
0x0040d670 addiu t8, fp, 0x2c | t8 = fp + 0x2c;
0x0040d674 move a0, t8 | a0 = t8;
0x0040d678 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x0040d67c move t9, t8 | t9 = t8;
0x0040d680 jalr t9 | t9 ();
0x0040d684 nop |
0x0040d688 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0040d68c lw t8, -0x7eb8(gp) | t8 = sym.handleDNS__;
0x0040d690 move t9, t8 | t9 = t8;
0x0040d694 jalr t9 | t9 ();
0x0040d698 nop |
0x0040d69c lw gp, 0x18(fp) | gp = *(arg_18h);
0x0040d6a0 lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x0040d6a4 lw v0, 0x42c(fp) | v0 = *(arg_42ch);
0x0040d6a8 lw t8, (t8) | t8 = *(t8);
| if (v0 != t8) {
0x0040d6ac beq v0, t8, 0x40d6c4 |
0x0040d6b0 nop |
0x0040d6b4 lw t8, -0x7da8(gp) | t8 = sym.imp.__stack_chk_fail;
0x0040d6b8 move t9, t8 | t9 = t8;
0x0040d6bc jalr t9 | t9 ();
0x0040d6c0 nop |
| }
0x0040d6c4 move sp, fp |
0x0040d6c8 lw ra, 0x434(sp) | ra = *(var_434h);
0x0040d6cc lw fp, 0x430(sp) | fp = *(var_430h);
0x0040d6d0 addiu sp, sp, 0x438 |
0x0040d6d4 jr ra | return v0;
0x0040d6d8 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 @ 0x40d7e8 */
| #include <stdint.h>
|
; (fcn) sym.linkLocalIPOK_char_ () | void linkLocalIPOK_char_ () {
| /* linkLocalIPOK(char*) */
0x0040d7e8 lui gp, 2 |
0x0040d7ec addiu gp, gp, -0x37a8 |
0x0040d7f0 addu gp, gp, t9 | gp += t9;
0x0040d7f4 addiu sp, sp, -0x430 |
0x0040d7f8 sw ra, 0x42c(sp) | *(var_42ch) = ra;
0x0040d7fc sw fp, 0x428(sp) | *(var_428h) = fp;
0x0040d800 move fp, sp | fp = sp;
0x0040d804 sw gp, 0x10(sp) | *(var_10h) = gp;
0x0040d808 sw a0, 0x1c(fp) | *(arg_1ch) = a0;
0x0040d80c lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x0040d810 lw t8, (t8) | t8 = *(t8);
0x0040d814 sw t8, 0x424(fp) | *(arg_424h) = t8;
0x0040d818 lw t8, -0x7ee0(gp) | t8 = *(gp);
0x0040d81c lw t8, (t8) | t8 = *(t8);
| if (t8 != 0) {
0x0040d820 beqz t8, 0x40d878 |
0x0040d824 nop |
0x0040d828 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x0040d82c move a0, t8 | a0 = t8;
0x0040d830 lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* str.median_s__etc_rc.d_init.d_zcip.sh_restart */
0x0040d834 addiu a1, t8, -0x41c | a1 = t8 + -0x41c;
0x0040d838 lw a2, 0x1c(fp) | a2 = *(arg_1ch);
0x0040d83c lw t8, -0x7e14(gp) | t8 = sym.imp.sprintf
0x0040d840 move t9, t8 | t9 = t8;
0x0040d844 jalr t9 | t9 ();
0x0040d848 nop |
0x0040d84c lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040d850 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x0040d854 move a0, t8 | a0 = t8;
0x0040d858 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x0040d85c move t9, t8 | t9 = t8;
0x0040d860 jalr t9 | t9 ();
0x0040d864 nop |
0x0040d868 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040d86c addiu t8, zero, 1 | t8 = 1;
0x0040d870 b 0x40d87c | goto label_0;
0x0040d874 nop |
| }
0x0040d878 move t8, zero | t8 = 0;
| label_0:
0x0040d87c move v0, t8 | v0 = t8;
0x0040d880 lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x0040d884 lw v1, 0x424(fp) | v1 = *(arg_424h);
0x0040d888 lw t8, (t8) | t8 = *(t8);
| if (v1 != t8) {
0x0040d88c beq v1, t8, 0x40d8a4 |
0x0040d890 nop |
0x0040d894 lw t8, -0x7da8(gp) | t8 = sym.imp.__stack_chk_fail;
0x0040d898 move t9, t8 | t9 = t8;
0x0040d89c jalr t9 | t9 ();
0x0040d8a0 nop |
| }
0x0040d8a4 move sp, fp |
0x0040d8a8 lw ra, 0x42c(sp) | ra = *(var_42ch);
0x0040d8ac lw fp, 0x428(sp) | fp = *(var_428h);
0x0040d8b0 addiu sp, sp, 0x430 |
0x0040d8b4 jr ra | return v1;
0x0040d8b8 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 @ 0x40bf8c */
| #include <stdint.h>
|
; (fcn) sym.set_local_char_ () | void set_local_char_ () {
| /* set_local(char*) */
0x0040bf8c lui gp, 2 |
0x0040bf90 addiu gp, gp, -0x1f4c |
0x0040bf94 addu gp, gp, t9 | gp += t9;
0x0040bf98 addiu sp, sp, -0x438 |
0x0040bf9c sw ra, 0x434(sp) | *(var_434h) = ra;
0x0040bfa0 sw fp, 0x430(sp) | *(var_430h) = fp;
0x0040bfa4 move fp, sp | fp = sp;
0x0040bfa8 sw gp, 0x18(sp) | *(var_18h) = gp;
0x0040bfac sw a0, 0x24(fp) | *(arg_24h) = a0;
0x0040bfb0 lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x0040bfb4 lw t8, (t8) | t8 = *(t8);
0x0040bfb8 sw t8, 0x42c(fp) | *(arg_42ch) = t8;
0x0040bfbc addiu t8, fp, 0x2c | t8 = fp + 0x2c;
0x0040bfc0 lw v0, -0x7f04(gp) | v0 = *(gp);
0x0040bfc4 sw v0, 0x10(sp) | *(var_10h) = v0;
0x0040bfc8 move a0, t8 | a0 = t8;
0x0040bfcc lw t8, -0x7fd8(gp) | t8 = *((gp - 8182));
| /* esilref: 'ifconfig &s &s netmask &s' */
0x0040bfd0 addiu a1, t8, -0x640 | a1 = t8 + -0x640;
0x0040bfd4 lw a2, 0x24(fp) | a2 = *(arg_24h);
0x0040bfd8 lw a3, -0x7f08(gp) | a3 = *(gp);
0x0040bfdc lw t8, -0x7e14(gp) | t8 = sym.imp.sprintf
0x0040bfe0 move t9, t8 | t9 = t8;
0x0040bfe4 jalr t9 | t9 ();
0x0040bfe8 nop |
0x0040bfec lw gp, 0x18(fp) | gp = *(arg_18h);
0x0040bff0 addiu t8, fp, 0x2c | t8 = fp + 0x2c;
0x0040bff4 move a0, t8 | a0 = t8;
0x0040bff8 lw t8, -0x7d10(gp) | t8 = sym.imp.system;
0x0040bffc move t9, t8 | t9 = t8;
0x0040c000 jalr t9 | t9 ();
0x0040c004 nop |
0x0040c008 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0040c00c lw t8, -0x7d04(gp) | t8 = *((gp - 8001));
0x0040c010 lw v0, 0x42c(fp) | v0 = *(arg_42ch);
0x0040c014 lw t8, (t8) | t8 = *(t8);
| if (v0 != t8) {
0x0040c018 beq v0, t8, 0x40c030 |
0x0040c01c nop |
0x0040c020 lw t8, -0x7da8(gp) | t8 = sym.imp.__stack_chk_fail;
0x0040c024 move t9, t8 | t9 = t8;
0x0040c028 jalr t9 | t9 ();
0x0040c02c nop |
| }
0x0040c030 move sp, fp |
0x0040c034 lw ra, 0x434(sp) | ra = *(var_434h);
0x0040c038 lw fp, 0x430(sp) | fp = *(var_430h);
0x0040c03c addiu sp, sp, 0x438 |
0x0040c040 jr ra | return v0;
0x0040c044 nop |
| }
[*] Function sprintf used 18 times wifi-tool