[*] Binary protection state of iwpriv
No RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH Symbols
[*] Function strcpy tear down of iwpriv
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/bin/iwpriv @ 0x404ec4 */
| #include <stdint.h>
|
; (fcn) sym.iw_in_inet () | void iw_in_inet () {
0x00404ec4 lui gp, 2 |
0x00404ec8 addiu gp, gp, -0x5b94 |
0x00404ecc addu gp, gp, t9 | gp += t9;
0x00404ed0 addiu sp, sp, -0x28 |
0x00404ed4 addiu v0, zero, 2 | v0 = 2;
0x00404ed8 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00404edc sw s1, 0x1c(sp) | *(var_1ch) = s1;
0x00404ee0 sw s0, 0x18(sp) | *(var_18h) = s0;
0x00404ee4 sw ra, 0x24(sp) | *(var_24h) = ra;
0x00404ee8 sw s2, 0x20(sp) | *(var_20h) = s2;
0x00404eec move s0, a1 | s0 = a1;
0x00404ef0 sh v0, (a1) | *(a1) = v0;
0x00404ef4 sh zero, 2(a1) | *((a1 + 1)) = 0;
0x00404ef8 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x00404efc lw t9, -0x7f74(gp) | t9 = *(gp);
0x00404f00 move s1, a0 | s1 = a0;
| /* str.default */
0x00404f04 addiu a1, a1, 0x6834 | a1 += 0x6834;
0x00404f08 jalr t9 | t9 ();
0x00404f0c lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00404f10 bnez v0, 0x404f1c |
0x00404f14 sw zero, 4(s0) | *((s0 + 1)) = 0;
0x00404f18 b 0x404f6c |
| } else {
0x00404f1c lw t9, -0x7f44(gp) | t9 = sym.imp.getnetbyname;
0x00404f20 move a0, s1 | a0 = s1;
0x00404f24 jalr t9 | t9 ();
0x00404f28 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00404f2c beqz v0, 0x404f74 | goto label_0;
| }
0x00404f30 lw v1, 0xc(v0) | v1 = *((v0 + 3));
0x00404f34 lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
0x00404f38 sll a1, v1, 0x18 | a1 = v1 << 0x18;
0x00404f3c srl a0, v1, 0x18 | a0 = v1 >> 0x18;
0x00404f40 or a0, a1, a0 | a0 = a1 | a0;
0x00404f44 srl a1, v1, 8 | a1 = v1 >> 8;
0x00404f48 andi a1, a1, 0xff00 | a1 &= 0xff00;
0x00404f4c andi v1, v1, 0xff00 | v1 &= 0xff00;
0x00404f50 or a0, a0, a1 | a0 |= a1;
0x00404f54 sll v1, v1, 8 | v1 <<= 8;
0x00404f58 lw a1, (v0) | a1 = *(v0);
0x00404f5c or v1, a0, v1 | v1 = a0 | v1;
0x00404f60 sw v1, 4(s0) | *((s0 + 1)) = v1;
0x00404f64 move a0, s1 | a0 = s1;
0x00404f68 jalr t9 | t9 ();
| }
0x00404f6c addiu v0, zero, 1 | v0 = 1;
0x00404f70 b 0x404fe8 | goto label_1;
| label_0:
0x00404f74 lw t9, -0x7f38(gp) | t9 = sym.imp.gethostbyname;
0x00404f78 move a0, s1 | a0 = s1;
0x00404f7c jalr t9 | t9 ();
0x00404f80 move s2, v0 | s2 = v0;
0x00404f84 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00404f88 bnez v0, 0x404fb8 |
0x00404f8c lw t9, -0x7fc8(gp) | t9 = *(gp);
0x00404f90 jalr t9 | t9 ();
0x00404f94 nop |
0x00404f98 lw gp, 0x10(sp) | gp = *(var_10h);
0x00404f9c lw t9, -0x7f34(gp) | t9 = sym.imp.__h_errno_location;
0x00404fa0 move s0, v0 | s0 = v0;
0x00404fa4 jalr t9 | t9 ();
0x00404fa8 lw v0, (v0) | v0 = *(v0);
0x00404fac sw v0, (s0) | *(s0) = v0;
0x00404fb0 addiu v0, zero, -1 | v0 = -1;
0x00404fb4 b 0x404fe8 |
| } else {
0x00404fb8 lw v0, 0x10(v0) | v0 = *((v0 + 4));
0x00404fbc lw t9, -0x7fcc(gp) | t9 = *(gp);
0x00404fc0 lw a2, 0xc(s2) | a2 = *((s2 + 3));
0x00404fc4 lw a1, (v0) | a1 = *(v0);
0x00404fc8 addiu a0, s0, 4 | a0 = s0 + 4;
0x00404fcc jalr t9 | t9 ();
0x00404fd0 lw gp, 0x10(sp) | gp = *(var_10h);
0x00404fd4 lw a1, (s2) | a1 = *(s2);
0x00404fd8 lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
0x00404fdc move a0, s1 | a0 = s1;
0x00404fe0 jalr t9 | t9 ();
0x00404fe4 move v0, zero | v0 = 0;
| }
| label_1:
0x00404fe8 lw ra, 0x24(sp) | ra = *(var_24h);
0x00404fec lw s2, 0x20(sp) | s2 = *(var_20h);
0x00404ff0 lw s1, 0x1c(sp) | s1 = *(var_1ch);
0x00404ff4 lw s0, 0x18(sp) | s0 = *(var_18h);
0x00404ff8 addiu sp, sp, 0x28 |
0x00404ffc jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/bin/iwpriv @ 0x403e40 */
| #include <stdint.h>
|
; (fcn) sym.iw_print_key () | void iw_print_key () {
0x00403e40 lui gp, 2 |
0x00403e44 addiu gp, gp, -0x4b10 |
0x00403e48 addu gp, gp, t9 | gp += t9;
0x00403e4c addiu v1, zero, 3 | v1 = 3;
0x00403e50 mul v1, a3, v1 | __asm ("mul v1, a3, v1");
0x00403e54 addiu sp, sp, -0x38 |
0x00403e58 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00403e5c sw ra, 0x34(sp) | *(var_34h) = ra;
0x00403e60 sw s6, 0x30(sp) | *(var_30h) = s6;
0x00403e64 sw s5, 0x2c(sp) | *(var_2ch) = s5;
0x00403e68 sw s4, 0x28(sp) | *(var_28h) = s4;
0x00403e6c sw s3, 0x24(sp) | *(var_24h) = s3;
0x00403e70 sw s2, 0x20(sp) | *(var_20h) = s2;
0x00403e74 sw s1, 0x1c(sp) | *(var_1ch) = s1;
0x00403e78 sw s0, 0x18(sp) | *(var_18h) = s0;
0x00403e7c slt v1, a1, v1 | v1 = (a1 < v1) ? 1 : 0;
0x00403e80 lw v0, 0x48(sp) | v0 = *(arg_48h);
| if (v1 != 0) {
0x00403e84 beqz v1, 0x403ebc |
0x00403e88 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x00403e8c lw ra, 0x34(sp) | ra = *(var_34h);
0x00403e90 lw s6, 0x30(sp) | s6 = *(var_30h);
0x00403e94 lw s5, 0x2c(sp) | s5 = *(var_2ch);
0x00403e98 lw s4, 0x28(sp) | s4 = *(var_28h);
0x00403e9c lw s3, 0x24(sp) | s3 = *(var_24h);
0x00403ea0 lw s2, 0x20(sp) | s2 = *(var_20h);
0x00403ea4 lw s1, 0x1c(sp) | s1 = *(var_1ch);
0x00403ea8 lw s0, 0x18(sp) | s0 = *(var_18h);
0x00403eac lw t9, -0x7eec(gp) | t9 = sym.imp.snprintf;
| /* str._too_big_ */
0x00403eb0 addiu a2, a2, 0x65f4 | a2 += 0x65f4;
0x00403eb4 addiu sp, sp, 0x38 |
0x00403eb8 jr t9 | t9 ();
| }
0x00403ebc andi v0, v0, 0x800 | v0 &= 0x800;
0x00403ec0 move s0, a0 | s0 = a0;
0x00403ec4 move s2, a3 | s2 = a3;
| if (v0 == 0) {
0x00403ec8 beqz v0, 0x403f78 | goto label_0;
| }
0x00403ecc lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
| if (a3 <= 0) {
0x00403ed0 bgtz a3, 0x403f04 |
0x00403ed4 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x00403ed8 lw ra, 0x34(sp) | ra = *(var_34h);
0x00403edc lw s6, 0x30(sp) | s6 = *(var_30h);
0x00403ee0 lw s5, 0x2c(sp) | s5 = *(var_2ch);
0x00403ee4 lw s4, 0x28(sp) | s4 = *(var_28h);
0x00403ee8 lw s3, 0x24(sp) | s3 = *(var_24h);
0x00403eec lw s2, 0x20(sp) | s2 = *(var_20h);
0x00403ef0 lw s1, 0x1c(sp) | s1 = *(var_1ch);
0x00403ef4 lw s0, 0x18(sp) | s0 = *(var_18h);
| /* esilref: 'on' */
0x00403ef8 addiu a1, a1, 0x6600 | a1 += 0x6600;
0x00403efc addiu sp, sp, 0x38 |
0x00403f00 jr t9 | t9 ();
| }
0x00403f04 lw s3, -0x7fdc(gp) | s3 = *(gp);
0x00403f08 addiu s0, s0, 2 | s0 += 2;
0x00403f0c addiu s1, zero, 1 | s1 = 1;
| /* esilref: '**' */
0x00403f10 addiu a1, s3, 0x6604 | a1 = s3 + 0x6604;
0x00403f14 jalr t9 | t9 ();
0x00403f18 lw gp, 0x10(sp) | gp = *(var_10h);
| /* esilref: '**' */
0x00403f1c addiu s3, s3, 0x6604 | s3 += 0x6604;
0x00403f20 lw s4, -0x7fdc(gp) | s4 = *(gp);
0x00403f24 addiu s4, s4, 0x6608 | s4 += 0x6608;
0x00403f28 b 0x403f68 |
| while (s1 != s2) {
0x00403f2c lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
| if (v0 == 0) {
0x00403f30 bnez v0, 0x403f50 |
0x00403f34 move a0, s0 | a0 = s0;
0x00403f38 move a1, s4 | a1 = s4;
0x00403f3c jalr t9 | t9 ();
0x00403f40 lw gp, 0x10(sp) | gp = *(var_10h);
0x00403f44 addiu s5, s0, 1 | s5 = s0 + 1;
0x00403f48 move s0, s5 | s0 = s5;
0x00403f4c lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
| }
0x00403f50 move a0, s0 | a0 = s0;
0x00403f54 move a1, s3 | a1 = s3;
0x00403f58 jalr t9 | t9 ();
0x00403f5c lw gp, 0x10(sp) | gp = *(var_10h);
0x00403f60 addiu s0, s0, 2 | s0 += 2;
0x00403f64 addiu s1, s1, 1 | s1++;
0x00403f68 andi v0, s1, 1 | v0 = s1 & 1;
0x00403f6c bne s1, s2, 0x403f2c |
| }
0x00403f70 lw ra, 0x34(sp) | ra = *(var_34h);
0x00403f74 b 0x404004 | goto label_1;
| label_0:
0x00403f78 lw s4, -0x7fdc(gp) | s4 = *(gp);
0x00403f7c lw t9, -0x7f3c(gp) | t9 = sym.imp.sprintf;
0x00403f80 move s3, a2 | s3 = a2;
0x00403f84 lbu a2, (a2) | a2 = *(a2);
| /* str._.2X */
0x00403f88 addiu a1, s4, 0x660c | a1 = s4 + 0x660c;
0x00403f8c addiu s0, s0, 2 | s0 += 2;
0x00403f90 jalr t9 | t9 ();
0x00403f94 lw gp, 0x10(sp) | gp = *(var_10h);
0x00403f98 addiu s1, zero, 1 | s1 = 1;
| /* str._.2X */
0x00403f9c addiu s4, s4, 0x660c | s4 += 0x660c;
0x00403fa0 lw s5, -0x7fdc(gp) | s5 = *(gp);
0x00403fa4 addiu s5, s5, 0x6608 | s5 += 0x6608;
0x00403fa8 b 0x403ff4 |
| while (v0 != 0) {
0x00403fac addu v0, s3, s1 | v0 = s3 + s1;
| if (v0 == 0) {
0x00403fb0 bnez v0, 0x403fd4 |
0x00403fb4 lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
0x00403fb8 move a0, s0 | a0 = s0;
0x00403fbc move a1, s5 | a1 = s5;
0x00403fc0 jalr t9 | t9 ();
0x00403fc4 lw gp, 0x10(sp) | gp = *(var_10h);
0x00403fc8 addiu s6, s0, 1 | s6 = s0 + 1;
0x00403fcc move s0, s6 | s0 = s6;
0x00403fd0 addu v0, s3, s1 | v0 = s3 + s1;
| }
0x00403fd4 lw t9, -0x7f3c(gp) | t9 = sym.imp.sprintf;
0x00403fd8 lbu a2, (v0) | a2 = *(v0);
0x00403fdc move a0, s0 | a0 = s0;
0x00403fe0 move a1, s4 | a1 = s4;
0x00403fe4 jalr t9 | t9 ();
0x00403fe8 lw gp, 0x10(sp) | gp = *(var_10h);
0x00403fec addiu s0, s0, 2 | s0 += 2;
0x00403ff0 addiu s1, s1, 1 | s1++;
0x00403ff4 slt v0, s1, s2 | v0 = (s1 < s2) ? 1 : 0;
0x00403ff8 andi v0, s1, 1 | v0 = s1 & 1;
0x00403ffc bnez v0, 0x403fac |
| }
0x00404000 lw ra, 0x34(sp) | ra = *(var_34h);
| label_1:
0x00404004 lw s6, 0x30(sp) | s6 = *(var_30h);
0x00404008 lw s5, 0x2c(sp) | s5 = *(var_2ch);
0x0040400c lw s4, 0x28(sp) | s4 = *(var_28h);
0x00404010 lw s3, 0x24(sp) | s3 = *(var_24h);
0x00404014 lw s2, 0x20(sp) | s2 = *(var_20h);
0x00404018 lw s1, 0x1c(sp) | s1 = *(var_1ch);
0x0040401c lw s0, 0x18(sp) | s0 = *(var_18h);
0x00404020 addiu sp, sp, 0x38 |
0x00404024 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/bin/iwpriv @ 0x4043e4 */
| #include <stdint.h>
|
; (fcn) sym.iw_print_pm_value () | void iw_print_pm_value () {
0x004043e4 lui gp, 2 |
0x004043e8 addiu gp, gp, -0x50b4 |
0x004043ec addu gp, gp, t9 | gp += t9;
0x004043f0 addiu sp, sp, -0x38 |
0x004043f4 slti v0, a1, 0x19 | v0 = (a1 < 0x19) ? 1 : 0;
0x004043f8 sw gp, 0x18(sp) | *(var_18h) = gp;
0x004043fc sw s4, 0x30(sp) | *(var_30h) = s4;
0x00404400 sw ra, 0x34(sp) | *(var_34h) = ra;
0x00404404 sw s3, 0x2c(sp) | *(var_2ch) = s3;
0x00404408 sw s2, 0x28(sp) | *(var_28h) = s2;
0x0040440c sw s1, 0x24(sp) | *(var_24h) = s1;
0x00404410 sw s0, 0x20(sp) | *(var_20h) = s0;
0x00404414 lw s4, 0x48(sp) | s4 = *(arg_48h);
| if (v0 != 0) {
0x00404418 beqz v0, 0x404448 |
0x0040441c lw a2, -0x7fdc(gp) | a2 = *(gp);
0x00404420 lw ra, 0x34(sp) | ra = *(var_34h);
0x00404424 lw s4, 0x30(sp) | s4 = *(var_30h);
0x00404428 lw s3, 0x2c(sp) | s3 = *(var_2ch);
0x0040442c lw s2, 0x28(sp) | s2 = *(var_28h);
0x00404430 lw s1, 0x24(sp) | s1 = *(var_24h);
0x00404434 lw s0, 0x20(sp) | s0 = *(var_20h);
0x00404438 lw t9, -0x7eec(gp) | t9 = sym.imp.snprintf;
| /* str._too_big_ */
0x0040443c addiu a2, a2, 0x65f4 | a2 += 0x65f4;
0x00404440 addiu sp, sp, 0x38 |
0x00404444 jr t9 | t9 ();
| }
0x00404448 andi v0, a3, 1 | v0 = a3 & 1;
0x0040444c move s1, a0 | s1 = a0;
0x00404450 move s2, a2 | s2 = a2;
0x00404454 move s3, a3 | s3 = a3;
0x00404458 addiu s0, a1, -0x19 | s0 = a1 + -0x19;
| if (v0 != 0) {
0x0040445c beqz v0, 0x404478 |
0x00404460 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x00404464 lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
0x00404468 addiu s1, s1, 4 | s1 += 4;
| /* str._min */
0x0040446c addiu a1, a1, 0x668c | a1 += 0x668c;
0x00404470 jalr t9 | t9 ();
0x00404474 lw gp, 0x18(sp) | gp = *(var_18h);
| }
0x00404478 andi v0, s3, 2 | v0 = s3 & 2;
0x0040447c andi v0, s3, 0x2000 | v0 = s3 & 0x2000;
| if (v0 != 0) {
0x00404480 beqz v0, 0x4044a4 |
0x00404484 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x00404488 lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
0x0040448c move a0, s1 | a0 = s1;
| /* str._max */
0x00404490 addiu a1, a1, 0x6694 | a1 += 0x6694;
0x00404494 jalr t9 | t9 ();
0x00404498 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040449c addiu s1, s1, 4 | s1 += 4;
0x004044a0 andi v0, s3, 0x2000 | v0 = s3 & 0x2000;
| }
0x004044a4 lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
| if (v0 != 0) {
0x004044a8 beqz v0, 0x4044c8 |
0x004044ac lw a1, -0x7fdc(gp) | a1 = *(gp);
0x004044b0 move a0, s1 | a0 = s1;
| /* str._timeout: */
0x004044b4 addiu a1, a1, 0x669c | a1 += 0x669c;
0x004044b8 jalr t9 | t9 ();
0x004044bc lw gp, 0x18(sp) | gp = *(var_18h);
0x004044c0 addiu a0, s1, 9 | a0 = s1 + 9;
0x004044c4 b 0x4044f8 |
| } else {
0x004044c8 andi v0, s3, 0x4000 | v0 = s3 & 0x4000;
0x004044cc move a0, s1 | a0 = s1;
| if (v0 != 0) {
0x004044d0 beqz v0, 0x4044e0 |
0x004044d4 lw a1, -0x7fdc(gp) | a1 = *(gp);
| /* str._saving: */
0x004044d8 addiu a1, a1, 0x66a8 | a1 += 0x66a8;
0x004044dc b 0x4044e8 |
| } else {
0x004044e0 lw a1, -0x7fdc(gp) | a1 = *(gp);
| /* str._period: */
0x004044e4 addiu a1, a1, 0x66b4 | a1 += 0x66b4;
| }
0x004044e8 jalr t9 | t9 ();
0x004044ec nop |
0x004044f0 lw gp, 0x18(sp) | gp = *(var_18h);
0x004044f4 addiu a0, s1, 8 | a0 = s1 + 8;
| }
0x004044f8 andi s3, s3, 4 | s3 &= 4;
0x004044fc lui v0, 0xf | v0 = 0xf0000;
| if (s3 != 0) {
0x00404500 beqz s3, 0x404538 |
0x00404504 slti s4, s4, 0x15 | s4 = (s4 < 0x15) ? 1 : 0;
0x00404508 lw v0, -0x7fdc(gp) | v0 = *(gp);
| if (s4 != 0) {
0x0040450c beqz s4, 0x404528 |
0x00404510 mtc1 s2, f2 | __asm ("mtc1 s2, f2");
0x00404514 cvt.d.w f0, f2 | __asm ("cvt.d.w f0, f2");
0x00404518 ldc1 f2, 0x6008(v0) | __asm ("ldc1 f2, 0x6008(v0)");
0x0040451c div.d f0, f0, f2 | __asm ("div.d f0, f0, f2");
0x00404520 trunc.w.d f2, f0 | __asm ("trunc.w.d f2, f0");
0x00404524 mfc1 s2, f2 | __asm ("mfc1 s2, f2");
| }
0x00404528 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x0040452c move a1, s0 | a1 = s0;
| /* esilref: '&d' */
0x00404530 addiu a2, a2, 0x65c4 | a2 += 0x65c4;
0x00404534 b 0x4045b8 |
| } else {
0x00404538 addiu v0, v0, 0x4240 | v0 += 0x4240;
0x0040453c slt v0, s2, v0 | v0 = (s2 < v0) ? 1 : 0;
0x00404540 slti v0, s2, 0x3e8 | v0 = (s2 < 0x3e8) ? 1 : 0;
| if (v0 == 0) {
0x00404544 bnez v0, 0x404570 |
0x00404548 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x0040454c mtc1 s2, f2 | __asm ("mtc1 s2, f2");
0x00404550 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x00404554 cvt.d.w f0, f2 | __asm ("cvt.d.w f0, f2");
0x00404558 ldc1 f2, 0x6008(v0) | __asm ("ldc1 f2, 0x6008(v0)");
0x0040455c move a1, s0 | a1 = s0;
| /* esilref: '&gs' */
0x00404560 addiu a2, a2, 0x66c0 | a2 += 0x66c0;
0x00404564 div.d f0, f0, f2 | __asm ("div.d f0, f0, f2");
0x00404568 sdc1 f0, 0x10(sp) | __asm ("sdc1 f0, 0x10(sp)");
0x0040456c b 0x40459c |
| } else {
0x00404570 lw a2, -0x7fdc(gp) | a2 = *(gp);
| if (v0 != 0) {
0x00404574 bnez v0, 0x4045b0 | goto label_0;
| }
0x00404578 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x0040457c mtc1 s2, f2 | __asm ("mtc1 s2, f2");
0x00404580 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x00404584 cvt.d.w f0, f2 | __asm ("cvt.d.w f0, f2");
0x00404588 ldc1 f2, 0x6010(v0) | __asm ("ldc1 f2, 0x6010(v0)");
0x0040458c move a1, s0 | a1 = s0;
| /* str._gms */
0x00404590 addiu a2, a2, 0x66c4 | a2 += 0x66c4;
0x00404594 div.d f0, f0, f2 | __asm ("div.d f0, f0, f2");
0x00404598 sdc1 f0, 0x10(sp) | __asm ("sdc1 f0, 0x10(sp)");
| }
0x0040459c lw t9, -0x7eec(gp) | t9 = sym.imp.snprintf;
0x004045a0 jalr t9 | t9 ();
0x004045a4 nop |
0x004045a8 lw ra, 0x34(sp) | ra = *(var_34h);
0x004045ac b 0x4045e0 | goto label_1;
| label_0:
0x004045b0 move a1, s0 | a1 = s0;
| /* str._dus */
0x004045b4 addiu a2, a2, 0x66cc | a2 += 0x66cc;
| }
0x004045b8 lw ra, 0x34(sp) | ra = *(var_34h);
0x004045bc lw s4, 0x30(sp) | s4 = *(var_30h);
0x004045c0 lw s3, 0x2c(sp) | s3 = *(var_2ch);
0x004045c4 lw s1, 0x24(sp) | s1 = *(var_24h);
0x004045c8 lw s0, 0x20(sp) | s0 = *(var_20h);
0x004045cc move a3, s2 | a3 = s2;
0x004045d0 lw t9, -0x7eec(gp) | t9 = sym.imp.snprintf;
0x004045d4 lw s2, 0x28(sp) | s2 = *(var_28h);
0x004045d8 addiu sp, sp, 0x38 |
0x004045dc jr t9 | t9 ();
| label_1:
0x004045e0 lw s4, 0x30(sp) | s4 = *(var_30h);
0x004045e4 lw s3, 0x2c(sp) | s3 = *(var_2ch);
0x004045e8 lw s2, 0x28(sp) | s2 = *(var_28h);
0x004045ec lw s1, 0x24(sp) | s1 = *(var_24h);
0x004045f0 lw s0, 0x20(sp) | s0 = *(var_20h);
0x004045f4 addiu sp, sp, 0x38 |
0x004045f8 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/bin/iwpriv @ 0x4046c0 */
| #include <stdint.h>
|
; (fcn) sym.iw_print_retry_value () | void iw_print_retry_value () {
0x004046c0 lui gp, 2 |
0x004046c4 addiu gp, gp, -0x5390 |
0x004046c8 addu gp, gp, t9 | gp += t9;
0x004046cc addiu sp, sp, -0x38 |
0x004046d0 slti v0, a1, 0x14 | v0 = (a1 < 0x14) ? 1 : 0;
0x004046d4 sw gp, 0x18(sp) | *(var_18h) = gp;
0x004046d8 sw s4, 0x30(sp) | *(var_30h) = s4;
0x004046dc sw ra, 0x34(sp) | *(var_34h) = ra;
0x004046e0 sw s3, 0x2c(sp) | *(var_2ch) = s3;
0x004046e4 sw s2, 0x28(sp) | *(var_28h) = s2;
0x004046e8 sw s1, 0x24(sp) | *(var_24h) = s1;
0x004046ec sw s0, 0x20(sp) | *(var_20h) = s0;
0x004046f0 lw s4, 0x48(sp) | s4 = *(arg_48h);
| if (v0 != 0) {
0x004046f4 beqz v0, 0x404724 |
0x004046f8 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x004046fc lw ra, 0x34(sp) | ra = *(var_34h);
0x00404700 lw s4, 0x30(sp) | s4 = *(var_30h);
0x00404704 lw s3, 0x2c(sp) | s3 = *(var_2ch);
0x00404708 lw s2, 0x28(sp) | s2 = *(var_28h);
0x0040470c lw s1, 0x24(sp) | s1 = *(var_24h);
0x00404710 lw s0, 0x20(sp) | s0 = *(var_20h);
0x00404714 lw t9, -0x7eec(gp) | t9 = sym.imp.snprintf;
| /* str._too_big_ */
0x00404718 addiu a2, a2, 0x65f4 | a2 += 0x65f4;
0x0040471c addiu sp, sp, 0x38 |
0x00404720 jr t9 | t9 ();
| }
0x00404724 andi v0, a3, 1 | v0 = a3 & 1;
0x00404728 move s1, a0 | s1 = a0;
0x0040472c move s2, a2 | s2 = a2;
0x00404730 move s3, a3 | s3 = a3;
0x00404734 addiu s0, a1, -0x14 | s0 = a1 + -0x14;
| if (v0 != 0) {
0x00404738 beqz v0, 0x404754 |
0x0040473c lw a1, -0x7fdc(gp) | a1 = *(gp);
0x00404740 lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
0x00404744 addiu s1, s1, 4 | s1 += 4;
| /* str._min */
0x00404748 addiu a1, a1, 0x668c | a1 += 0x668c;
0x0040474c jalr t9 | t9 ();
0x00404750 lw gp, 0x18(sp) | gp = *(var_18h);
| }
0x00404754 andi v0, s3, 2 | v0 = s3 & 2;
0x00404758 andi v0, s3, 0x10 | v0 = s3 & 0x10;
| if (v0 != 0) {
0x0040475c beqz v0, 0x404780 |
0x00404760 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x00404764 lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
0x00404768 move a0, s1 | a0 = s1;
| /* str._max */
0x0040476c addiu a1, a1, 0x6694 | a1 += 0x6694;
0x00404770 jalr t9 | t9 ();
0x00404774 lw gp, 0x18(sp) | gp = *(var_18h);
0x00404778 addiu s1, s1, 4 | s1 += 4;
0x0040477c andi v0, s3, 0x10 | v0 = s3 & 0x10;
| }
0x00404780 andi v0, s3, 0x20 | v0 = s3 & 0x20;
| if (v0 != 0) {
0x00404784 beqz v0, 0x4047a8 |
0x00404788 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x0040478c lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
0x00404790 move a0, s1 | a0 = s1;
| /* str._short */
0x00404794 addiu a1, a1, 0x6758 | a1 += 0x6758;
0x00404798 jalr t9 | t9 ();
0x0040479c lw gp, 0x18(sp) | gp = *(var_18h);
0x004047a0 addiu s1, s1, 6 | s1 += 6;
0x004047a4 andi v0, s3, 0x20 | v0 = s3 & 0x20;
| }
0x004047a8 andi v0, s3, 0x2000 | v0 = s3 & 0x2000;
| if (v0 != 0) {
0x004047ac beqz v0, 0x4047d0 |
0x004047b0 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x004047b4 lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
0x004047b8 move a0, s1 | a0 = s1;
| /* str.__long */
0x004047bc addiu a1, a1, 0x6760 | a1 += 0x6760;
0x004047c0 jalr t9 | t9 ();
0x004047c4 lw gp, 0x18(sp) | gp = *(var_18h);
0x004047c8 addiu s1, s1, 6 | s1 += 6;
0x004047cc andi v0, s3, 0x2000 | v0 = s3 & 0x2000;
| }
0x004047d0 move a0, s1 | a0 = s1;
| if (v0 != 0) {
0x004047d4 beqz v0, 0x4048b4 |
0x004047d8 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x004047dc lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
0x004047e0 andi s3, s3, 4 | s3 &= 4;
| /* str._lifetime: */
0x004047e4 addiu a1, a1, 0x6768 | a1 += 0x6768;
0x004047e8 jalr t9 | t9 ();
0x004047ec lw gp, 0x18(sp) | gp = *(var_18h);
0x004047f0 addiu a0, s1, 0xa | a0 = s1 + 0xa;
| if (s3 != 0) {
0x004047f4 beqz s3, 0x40482c |
0x004047f8 slti s4, s4, 0x15 | s4 = (s4 < 0x15) ? 1 : 0;
0x004047fc lw v0, -0x7fdc(gp) | v0 = *(gp);
| if (s4 != 0) {
0x00404800 beqz s4, 0x40481c |
0x00404804 mtc1 s2, f2 | __asm ("mtc1 s2, f2");
0x00404808 cvt.d.w f0, f2 | __asm ("cvt.d.w f0, f2");
0x0040480c ldc1 f2, 0x6008(v0) | __asm ("ldc1 f2, 0x6008(v0)");
0x00404810 div.d f0, f0, f2 | __asm ("div.d f0, f0, f2");
0x00404814 trunc.w.d f2, f0 | __asm ("trunc.w.d f2, f0");
0x00404818 mfc1 s2, f2 | __asm ("mfc1 s2, f2");
| }
0x0040481c lw a2, -0x7fdc(gp) | a2 = *(gp);
0x00404820 move a1, s0 | a1 = s0;
| /* esilref: '&d' */
0x00404824 addiu a2, a2, 0x65c4 | a2 += 0x65c4;
0x00404828 b 0x4048c0 |
0x0040482c lui v0, 0xf | v0 = 0xf4240;
0x00404830 addiu v0, v0, 0x4240 |
0x00404834 slt v0, s2, v0 | v0 = (s2 < v0) ? 1 : 0;
0x00404838 slti v0, s2, 0x3e8 | v0 = (s2 < 0x3e8) ? 1 : 0;
| } else {
| } else {
| }
| }
| if (v0 == 0) {
0x0040483c bnez v0, 0x404868 |
0x00404840 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00404844 mtc1 s2, f2 | __asm ("mtc1 s2, f2");
0x00404848 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x0040484c cvt.d.w f0, f2 | __asm ("cvt.d.w f0, f2");
0x00404850 ldc1 f2, 0x6008(v0) | __asm ("ldc1 f2, 0x6008(v0)");
0x00404854 move a1, s0 | a1 = s0;
| /* esilref: '&gs' */
0x00404858 addiu a2, a2, 0x66c0 | a2 += 0x66c0;
0x0040485c div.d f0, f0, f2 | __asm ("div.d f0, f0, f2");
0x00404860 sdc1 f0, 0x10(sp) | __asm ("sdc1 f0, 0x10(sp)");
0x00404864 b 0x404894 |
| } else {
0x00404868 lw a2, -0x7fdc(gp) | a2 = *(gp);
| if (v0 != 0) {
0x0040486c bnez v0, 0x4048a8 | goto label_0;
| }
0x00404870 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00404874 mtc1 s2, f2 | __asm ("mtc1 s2, f2");
0x00404878 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x0040487c cvt.d.w f0, f2 | __asm ("cvt.d.w f0, f2");
0x00404880 ldc1 f2, 0x6010(v0) | __asm ("ldc1 f2, 0x6010(v0)");
0x00404884 move a1, s0 | a1 = s0;
| /* str._gms */
0x00404888 addiu a2, a2, 0x66c4 | a2 += 0x66c4;
0x0040488c div.d f0, f0, f2 | __asm ("div.d f0, f0, f2");
0x00404890 sdc1 f0, 0x10(sp) | __asm ("sdc1 f0, 0x10(sp)");
| }
0x00404894 lw t9, -0x7eec(gp) | t9 = sym.imp.snprintf;
0x00404898 jalr t9 | t9 ();
0x0040489c nop |
0x004048a0 lw ra, 0x34(sp) | ra = *(var_34h);
0x004048a4 b 0x4048e8 | goto label_1;
| label_0:
0x004048a8 move a1, s0 | a1 = s0;
| /* str._dus */
0x004048ac addiu a2, a2, 0x66cc | a2 += 0x66cc;
0x004048b0 b 0x4048c0 |
0x004048b4 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x004048b8 move a1, s0 | a1 = s0;
| /* str._limit:_d */
0x004048bc addiu a2, a2, 0x6774 | a2 += 0x6774;
0x004048c0 lw ra, 0x34(sp) | ra = *(var_34h);
0x004048c4 lw s4, 0x30(sp) | s4 = *(var_30h);
0x004048c8 lw s3, 0x2c(sp) | s3 = *(var_2ch);
0x004048cc lw s1, 0x24(sp) | s1 = *(var_24h);
0x004048d0 lw s0, 0x20(sp) | s0 = *(var_20h);
0x004048d4 move a3, s2 | a3 = s2;
0x004048d8 lw t9, -0x7eec(gp) | t9 = sym.imp.snprintf;
0x004048dc lw s2, 0x28(sp) | s2 = *(var_28h);
0x004048e0 addiu sp, sp, 0x38 |
0x004048e4 jr t9 | t9 ();
| label_1:
0x004048e8 lw s4, 0x30(sp) | s4 = *(var_30h);
0x004048ec lw s3, 0x2c(sp) | s3 = *(var_2ch);
0x004048f0 lw s2, 0x28(sp) | s2 = *(var_28h);
0x004048f4 lw s1, 0x24(sp) | s1 = *(var_24h);
0x004048f8 lw s0, 0x20(sp) | s0 = *(var_20h);
0x004048fc addiu sp, sp, 0x38 |
0x00404900 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/bin/iwpriv @ 0x404c2c */
| #include <stdint.h>
|
; (fcn) sym.iw_sawap_ntop () | void iw_sawap_ntop () {
0x00404c2c lui gp, 2 |
0x00404c30 addiu gp, gp, -0x58fc |
0x00404c34 addu gp, gp, t9 | gp += t9;
0x00404c38 addiu sp, sp, -0x40 |
0x00404c3c sw s0, 0x34(sp) | *(var_34h) = s0;
0x00404c40 move s0, a1 | s0 = a1;
0x00404c44 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x00404c48 lw t9, -0x7fcc(gp) | t9 = *(gp);
0x00404c4c sw ra, 0x3c(sp) | *(var_3ch) = ra;
0x00404c50 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00404c54 sw s1, 0x38(sp) | *(var_38h) = s1;
0x00404c58 addiu a1, a1, 0x6c80 | a1 += 0x6c80;
0x00404c5c move s1, a0 | s1 = a0;
0x00404c60 addiu a2, zero, 6 | a2 = 6;
0x00404c64 sb zero, 0x28(sp) | *(var_28h) = 0;
0x00404c68 sb zero, 0x29(sp) | *(var_29h) = 0;
0x00404c6c sb zero, 0x2a(sp) | *(var_2ah) = 0;
0x00404c70 sb zero, 0x2b(sp) | *(var_2bh) = 0;
0x00404c74 sb zero, 0x2c(sp) | *(var_2ch) = 0;
0x00404c78 sb zero, 0x2d(sp) | *(var_2dh) = 0;
0x00404c7c addiu a0, sp, 0x20 | a0 = sp + 0x20;
0x00404c80 jalr t9 | t9 ();
0x00404c84 lw gp, 0x10(sp) | gp = *(var_10h);
0x00404c88 addiu a0, sp, 0x18 | a0 = sp + 0x18;
0x00404c8c addiu a2, zero, 6 | a2 = 6;
0x00404c90 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x00404c94 lw t9, -0x7fcc(gp) | t9 = *(gp);
0x00404c98 addiu s1, s1, 2 | s1 += 2;
| /* str.DDDDDD */
0x00404c9c addiu a1, a1, 0x6c88 | a1 += 0x6c88;
0x00404ca0 jalr t9 | t9 ();
0x00404ca4 lw gp, 0x10(sp) | gp = *(var_10h);
0x00404ca8 move a0, s1 | a0 = s1;
0x00404cac addiu a1, sp, 0x28 | a1 = sp + 0x28;
0x00404cb0 lw t9, -0x7f24(gp) | t9 = sym.imp.memcmp;
0x00404cb4 addiu a2, zero, 6 | a2 = 6;
0x00404cb8 jalr t9 | t9 ();
0x00404cbc lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00404cc0 bnez v0, 0x404cd4 |
0x00404cc4 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x00404cc8 move a0, s0 | a0 = s0;
| /* str.Not_Associated */
0x00404ccc addiu a1, a1, 0x6814 | a1 += 0x6814;
0x00404cd0 b 0x404d28 |
| } else {
0x00404cd4 lw t9, -0x7f24(gp) | t9 = sym.imp.memcmp;
0x00404cd8 move a0, s1 | a0 = s1;
0x00404cdc addiu a1, sp, 0x20 | a1 = sp + 0x20;
0x00404ce0 addiu a2, zero, 6 | a2 = 6;
0x00404ce4 jalr t9 | t9 ();
0x00404ce8 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00404cec bnez v0, 0x404d00 |
0x00404cf0 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x00404cf4 move a0, s0 | a0 = s0;
| /* str.Invalid */
0x00404cf8 addiu a1, a1, 0x6824 | a1 += 0x6824;
0x00404cfc b 0x404d28 |
| } else {
0x00404d00 lw t9, -0x7f24(gp) | t9 = sym.imp.memcmp;
0x00404d04 move a0, s1 | a0 = s1;
0x00404d08 addiu a1, sp, 0x18 | a1 = sp + 0x18;
0x00404d0c addiu a2, zero, 6 | a2 = 6;
0x00404d10 jalr t9 | t9 ();
0x00404d14 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x00404d18 bnez v0, 0x404d3c | goto label_0;
| }
0x00404d1c lw a1, -0x7fdc(gp) | a1 = *(gp);
0x00404d20 move a0, s0 | a0 = s0;
| /* str.None */
0x00404d24 addiu a1, a1, 0x682c | a1 += 0x682c;
| }
| }
0x00404d28 lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
0x00404d2c jalr t9 | t9 ();
0x00404d30 nop |
0x00404d34 lw ra, 0x3c(sp) | ra = *(var_3ch);
0x00404d38 b 0x404d50 | goto label_1;
| label_0:
0x00404d3c lw t9, -0x7f7c(gp) | t9 = sym.iw_ether_ntop;
0x00404d40 move a0, s1 | a0 = s1;
0x00404d44 move a1, s0 | a1 = s0;
0x00404d48 bal 0x404bcc | sym_iw_ether_ntop ();
0x00404d4c lw ra, 0x3c(sp) | ra = *(var_3ch);
| label_1:
0x00404d50 move v0, s0 | v0 = s0;
0x00404d54 lw s1, 0x38(sp) | s1 = *(var_38h);
0x00404d58 lw s0, 0x34(sp) | s0 = *(var_34h);
0x00404d5c addiu sp, sp, 0x40 |
0x00404d60 jr ra | return v0;
| }
[*] Function strcpy used 1 times iwpriv