[*] Binary protection state of iwgetid
No RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH Symbols
[*] Function strcpy tear down of iwgetid
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/bin/iwgetid @ 0x404a34 */
| #include <stdint.h>
|
; (fcn) sym.iw_in_inet () | void iw_in_inet () {
0x00404a34 lui gp, 2 |
0x00404a38 addiu gp, gp, -0x58b4 |
0x00404a3c addu gp, gp, t9 | gp += t9;
0x00404a40 addiu sp, sp, -0x28 |
0x00404a44 addiu v0, zero, 2 | v0 = 2;
0x00404a48 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00404a4c sw s1, 0x1c(sp) | *(var_1ch) = s1;
0x00404a50 sw s0, 0x18(sp) | *(var_18h) = s0;
0x00404a54 sw ra, 0x24(sp) | *(var_24h) = ra;
0x00404a58 sw s2, 0x20(sp) | *(var_20h) = s2;
0x00404a5c move s0, a1 | s0 = a1;
0x00404a60 sh v0, (a1) | *(a1) = v0;
0x00404a64 sh zero, 2(a1) | *((a1 + 1)) = 0;
0x00404a68 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x00404a6c lw t9, -0x7f40(gp) | t9 = sym.imp.strcmp;
0x00404a70 move s1, a0 | s1 = a0;
| /* str.default */
0x00404a74 addiu a1, a1, 0x6514 | a1 += 0x6514;
0x00404a78 jalr t9 | t9 ();
0x00404a7c lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00404a80 bnez v0, 0x404a8c |
0x00404a84 sw zero, 4(s0) | *((s0 + 1)) = 0;
0x00404a88 b 0x404adc |
| } else {
0x00404a8c lw t9, -0x7f54(gp) | t9 = sym.imp.getnetbyname;
0x00404a90 move a0, s1 | a0 = s1;
0x00404a94 jalr t9 | t9 ();
0x00404a98 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00404a9c beqz v0, 0x404ae4 | goto label_0;
| }
0x00404aa0 lw v1, 0xc(v0) | v1 = *((v0 + 3));
0x00404aa4 lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
0x00404aa8 sll a1, v1, 0x18 | a1 = v1 << 0x18;
0x00404aac srl a0, v1, 0x18 | a0 = v1 >> 0x18;
0x00404ab0 or a0, a1, a0 | a0 = a1 | a0;
0x00404ab4 srl a1, v1, 8 | a1 = v1 >> 8;
0x00404ab8 andi a1, a1, 0xff00 | a1 &= 0xff00;
0x00404abc andi v1, v1, 0xff00 | v1 &= 0xff00;
0x00404ac0 or a0, a0, a1 | a0 |= a1;
0x00404ac4 sll v1, v1, 8 | v1 <<= 8;
0x00404ac8 lw a1, (v0) | a1 = *(v0);
0x00404acc or v1, a0, v1 | v1 = a0 | v1;
0x00404ad0 sw v1, 4(s0) | *((s0 + 1)) = v1;
0x00404ad4 move a0, s1 | a0 = s1;
0x00404ad8 jalr t9 | t9 ();
| }
0x00404adc addiu v0, zero, 1 | v0 = 1;
0x00404ae0 b 0x404b58 | goto label_1;
| label_0:
0x00404ae4 lw t9, -0x7f48(gp) | t9 = sym.imp.gethostbyname;
0x00404ae8 move a0, s1 | a0 = s1;
0x00404aec jalr t9 | t9 ();
0x00404af0 move s2, v0 | s2 = v0;
0x00404af4 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00404af8 bnez v0, 0x404b28 |
0x00404afc lw t9, -0x7f58(gp) | t9 = sym.imp.__errno_location;
0x00404b00 jalr t9 | t9 ();
0x00404b04 nop |
0x00404b08 lw gp, 0x10(sp) | gp = *(var_10h);
0x00404b0c lw t9, -0x7f44(gp) | t9 = sym.imp.__h_errno_location;
0x00404b10 move s0, v0 | s0 = v0;
0x00404b14 jalr t9 | t9 ();
0x00404b18 lw v0, (v0) | v0 = *(v0);
0x00404b1c sw v0, (s0) | *(s0) = v0;
0x00404b20 addiu v0, zero, -1 | v0 = -1;
0x00404b24 b 0x404b58 |
| } else {
0x00404b28 lw v0, 0x10(v0) | v0 = *((v0 + 4));
0x00404b2c lw t9, -0x7f04(gp) | t9 = sym.imp.memcpy;
0x00404b30 lw a2, 0xc(s2) | a2 = *((s2 + 3));
0x00404b34 lw a1, (v0) | a1 = *(v0);
0x00404b38 addiu a0, s0, 4 | a0 = s0 + 4;
0x00404b3c jalr t9 | t9 ();
0x00404b40 lw gp, 0x10(sp) | gp = *(var_10h);
0x00404b44 lw a1, (s2) | a1 = *(s2);
0x00404b48 lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
0x00404b4c move a0, s1 | a0 = s1;
0x00404b50 jalr t9 | t9 ();
0x00404b54 move v0, zero | v0 = 0;
| }
| label_1:
0x00404b58 lw ra, 0x24(sp) | ra = *(var_24h);
0x00404b5c lw s2, 0x20(sp) | s2 = *(var_20h);
0x00404b60 lw s1, 0x1c(sp) | s1 = *(var_1ch);
0x00404b64 lw s0, 0x18(sp) | s0 = *(var_18h);
0x00404b68 addiu sp, sp, 0x28 |
0x00404b6c jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/bin/iwgetid @ 0x4039b0 */
| #include <stdint.h>
|
; (fcn) sym.iw_print_key () | void iw_print_key () {
0x004039b0 lui gp, 2 |
0x004039b4 addiu gp, gp, -0x4830 |
0x004039b8 addu gp, gp, t9 | gp += t9;
0x004039bc addiu v1, zero, 3 | v1 = 3;
0x004039c0 mul v1, a3, v1 | __asm ("mul v1, a3, v1");
0x004039c4 addiu sp, sp, -0x38 |
0x004039c8 sw gp, 0x10(sp) | *(var_10h) = gp;
0x004039cc sw ra, 0x34(sp) | *(var_34h) = ra;
0x004039d0 sw s6, 0x30(sp) | *(var_30h) = s6;
0x004039d4 sw s5, 0x2c(sp) | *(var_2ch) = s5;
0x004039d8 sw s4, 0x28(sp) | *(var_28h) = s4;
0x004039dc sw s3, 0x24(sp) | *(var_24h) = s3;
0x004039e0 sw s2, 0x20(sp) | *(var_20h) = s2;
0x004039e4 sw s1, 0x1c(sp) | *(var_1ch) = s1;
0x004039e8 sw s0, 0x18(sp) | *(var_18h) = s0;
0x004039ec slt v1, a1, v1 | v1 = (a1 < v1) ? 1 : 0;
0x004039f0 lw v0, 0x48(sp) | v0 = *(arg_48h);
| if (v1 != 0) {
0x004039f4 beqz v1, 0x403a2c |
0x004039f8 lw a2, -0x7fd8(gp) | a2 = *(gp);
0x004039fc lw ra, 0x34(sp) | ra = *(var_34h);
0x00403a00 lw s6, 0x30(sp) | s6 = *(var_30h);
0x00403a04 lw s5, 0x2c(sp) | s5 = *(var_2ch);
0x00403a08 lw s4, 0x28(sp) | s4 = *(var_28h);
0x00403a0c lw s3, 0x24(sp) | s3 = *(var_24h);
0x00403a10 lw s2, 0x20(sp) | s2 = *(var_20h);
0x00403a14 lw s1, 0x1c(sp) | s1 = *(var_1ch);
0x00403a18 lw s0, 0x18(sp) | s0 = *(var_18h);
0x00403a1c lw t9, -0x7ef0(gp) | t9 = sym.imp.snprintf;
| /* str._too_big_ */
0x00403a20 addiu a2, a2, 0x62d4 | a2 += 0x62d4;
0x00403a24 addiu sp, sp, 0x38 |
0x00403a28 jr t9 | t9 ();
| }
0x00403a2c andi v0, v0, 0x800 | v0 &= 0x800;
0x00403a30 move s0, a0 | s0 = a0;
0x00403a34 move s2, a3 | s2 = a3;
| if (v0 == 0) {
0x00403a38 beqz v0, 0x403ae8 | goto label_0;
| }
0x00403a3c lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
| if (a3 <= 0) {
0x00403a40 bgtz a3, 0x403a74 |
0x00403a44 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x00403a48 lw ra, 0x34(sp) | ra = *(var_34h);
0x00403a4c lw s6, 0x30(sp) | s6 = *(var_30h);
0x00403a50 lw s5, 0x2c(sp) | s5 = *(var_2ch);
0x00403a54 lw s4, 0x28(sp) | s4 = *(var_28h);
0x00403a58 lw s3, 0x24(sp) | s3 = *(var_24h);
0x00403a5c lw s2, 0x20(sp) | s2 = *(var_20h);
0x00403a60 lw s1, 0x1c(sp) | s1 = *(var_1ch);
0x00403a64 lw s0, 0x18(sp) | s0 = *(var_18h);
| /* esilref: 'on' */
0x00403a68 addiu a1, a1, 0x62e0 | a1 += 0x62e0;
0x00403a6c addiu sp, sp, 0x38 |
0x00403a70 jr t9 | t9 ();
| }
0x00403a74 lw s3, -0x7fd8(gp) | s3 = *(gp);
0x00403a78 addiu s0, s0, 2 | s0 += 2;
0x00403a7c addiu s1, zero, 1 | s1 = 1;
| /* esilref: '**' */
0x00403a80 addiu a1, s3, 0x62e4 | a1 = s3 + 0x62e4;
0x00403a84 jalr t9 | t9 ();
0x00403a88 lw gp, 0x10(sp) | gp = *(var_10h);
| /* esilref: '**' */
0x00403a8c addiu s3, s3, 0x62e4 | s3 += 0x62e4;
0x00403a90 lw s4, -0x7fd8(gp) | s4 = *(gp);
0x00403a94 addiu s4, s4, 0x62e8 | s4 += 0x62e8;
0x00403a98 b 0x403ad8 |
| while (s1 != s2) {
0x00403a9c lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
| if (v0 == 0) {
0x00403aa0 bnez v0, 0x403ac0 |
0x00403aa4 move a0, s0 | a0 = s0;
0x00403aa8 move a1, s4 | a1 = s4;
0x00403aac jalr t9 | t9 ();
0x00403ab0 lw gp, 0x10(sp) | gp = *(var_10h);
0x00403ab4 addiu s5, s0, 1 | s5 = s0 + 1;
0x00403ab8 move s0, s5 | s0 = s5;
0x00403abc lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
| }
0x00403ac0 move a0, s0 | a0 = s0;
0x00403ac4 move a1, s3 | a1 = s3;
0x00403ac8 jalr t9 | t9 ();
0x00403acc lw gp, 0x10(sp) | gp = *(var_10h);
0x00403ad0 addiu s0, s0, 2 | s0 += 2;
0x00403ad4 addiu s1, s1, 1 | s1++;
0x00403ad8 andi v0, s1, 1 | v0 = s1 & 1;
0x00403adc bne s1, s2, 0x403a9c |
| }
0x00403ae0 lw ra, 0x34(sp) | ra = *(var_34h);
0x00403ae4 b 0x403b74 | goto label_1;
| label_0:
0x00403ae8 lw s4, -0x7fd8(gp) | s4 = *(gp);
0x00403aec lw t9, -0x7f4c(gp) | t9 = sym.imp.sprintf;
0x00403af0 move s3, a2 | s3 = a2;
0x00403af4 lbu a2, (a2) | a2 = *(a2);
| /* str._.2X */
0x00403af8 addiu a1, s4, 0x62ec | a1 = s4 + 0x62ec;
0x00403afc addiu s0, s0, 2 | s0 += 2;
0x00403b00 jalr t9 | t9 ();
0x00403b04 lw gp, 0x10(sp) | gp = *(var_10h);
0x00403b08 addiu s1, zero, 1 | s1 = 1;
| /* str._.2X */
0x00403b0c addiu s4, s4, 0x62ec | s4 += 0x62ec;
0x00403b10 lw s5, -0x7fd8(gp) | s5 = *(gp);
0x00403b14 addiu s5, s5, 0x62e8 | s5 += 0x62e8;
0x00403b18 b 0x403b64 |
| while (v0 != 0) {
0x00403b1c addu v0, s3, s1 | v0 = s3 + s1;
| if (v0 == 0) {
0x00403b20 bnez v0, 0x403b44 |
0x00403b24 lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
0x00403b28 move a0, s0 | a0 = s0;
0x00403b2c move a1, s5 | a1 = s5;
0x00403b30 jalr t9 | t9 ();
0x00403b34 lw gp, 0x10(sp) | gp = *(var_10h);
0x00403b38 addiu s6, s0, 1 | s6 = s0 + 1;
0x00403b3c move s0, s6 | s0 = s6;
0x00403b40 addu v0, s3, s1 | v0 = s3 + s1;
| }
0x00403b44 lw t9, -0x7f4c(gp) | t9 = sym.imp.sprintf;
0x00403b48 lbu a2, (v0) | a2 = *(v0);
0x00403b4c move a0, s0 | a0 = s0;
0x00403b50 move a1, s4 | a1 = s4;
0x00403b54 jalr t9 | t9 ();
0x00403b58 lw gp, 0x10(sp) | gp = *(var_10h);
0x00403b5c addiu s0, s0, 2 | s0 += 2;
0x00403b60 addiu s1, s1, 1 | s1++;
0x00403b64 slt v0, s1, s2 | v0 = (s1 < s2) ? 1 : 0;
0x00403b68 andi v0, s1, 1 | v0 = s1 & 1;
0x00403b6c bnez v0, 0x403b1c |
| }
0x00403b70 lw ra, 0x34(sp) | ra = *(var_34h);
| label_1:
0x00403b74 lw s6, 0x30(sp) | s6 = *(var_30h);
0x00403b78 lw s5, 0x2c(sp) | s5 = *(var_2ch);
0x00403b7c lw s4, 0x28(sp) | s4 = *(var_28h);
0x00403b80 lw s3, 0x24(sp) | s3 = *(var_24h);
0x00403b84 lw s2, 0x20(sp) | s2 = *(var_20h);
0x00403b88 lw s1, 0x1c(sp) | s1 = *(var_1ch);
0x00403b8c lw s0, 0x18(sp) | s0 = *(var_18h);
0x00403b90 addiu sp, sp, 0x38 |
0x00403b94 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/bin/iwgetid @ 0x403f54 */
| #include <stdint.h>
|
; (fcn) sym.iw_print_pm_value () | void iw_print_pm_value () {
0x00403f54 lui gp, 2 |
0x00403f58 addiu gp, gp, -0x4dd4 |
0x00403f5c addu gp, gp, t9 | gp += t9;
0x00403f60 addiu sp, sp, -0x38 |
0x00403f64 slti v0, a1, 0x19 | v0 = (a1 < 0x19) ? 1 : 0;
0x00403f68 sw gp, 0x18(sp) | *(var_18h) = gp;
0x00403f6c sw s4, 0x30(sp) | *(var_30h) = s4;
0x00403f70 sw ra, 0x34(sp) | *(var_34h) = ra;
0x00403f74 sw s3, 0x2c(sp) | *(var_2ch) = s3;
0x00403f78 sw s2, 0x28(sp) | *(var_28h) = s2;
0x00403f7c sw s1, 0x24(sp) | *(var_24h) = s1;
0x00403f80 sw s0, 0x20(sp) | *(var_20h) = s0;
0x00403f84 lw s4, 0x48(sp) | s4 = *(arg_48h);
| if (v0 != 0) {
0x00403f88 beqz v0, 0x403fb8 |
0x00403f8c lw a2, -0x7fd8(gp) | a2 = *(gp);
0x00403f90 lw ra, 0x34(sp) | ra = *(var_34h);
0x00403f94 lw s4, 0x30(sp) | s4 = *(var_30h);
0x00403f98 lw s3, 0x2c(sp) | s3 = *(var_2ch);
0x00403f9c lw s2, 0x28(sp) | s2 = *(var_28h);
0x00403fa0 lw s1, 0x24(sp) | s1 = *(var_24h);
0x00403fa4 lw s0, 0x20(sp) | s0 = *(var_20h);
0x00403fa8 lw t9, -0x7ef0(gp) | t9 = sym.imp.snprintf;
| /* str._too_big_ */
0x00403fac addiu a2, a2, 0x62d4 | a2 += 0x62d4;
0x00403fb0 addiu sp, sp, 0x38 |
0x00403fb4 jr t9 | t9 ();
| }
0x00403fb8 andi v0, a3, 1 | v0 = a3 & 1;
0x00403fbc move s1, a0 | s1 = a0;
0x00403fc0 move s2, a2 | s2 = a2;
0x00403fc4 move s3, a3 | s3 = a3;
0x00403fc8 addiu s0, a1, -0x19 | s0 = a1 + -0x19;
| if (v0 != 0) {
0x00403fcc beqz v0, 0x403fe8 |
0x00403fd0 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x00403fd4 lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
0x00403fd8 addiu s1, s1, 4 | s1 += 4;
| /* str._min */
0x00403fdc addiu a1, a1, 0x636c | a1 += 0x636c;
0x00403fe0 jalr t9 | t9 ();
0x00403fe4 lw gp, 0x18(sp) | gp = *(var_18h);
| }
0x00403fe8 andi v0, s3, 2 | v0 = s3 & 2;
0x00403fec andi v0, s3, 0x2000 | v0 = s3 & 0x2000;
| if (v0 != 0) {
0x00403ff0 beqz v0, 0x404014 |
0x00403ff4 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x00403ff8 lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
0x00403ffc move a0, s1 | a0 = s1;
| /* str._max */
0x00404000 addiu a1, a1, 0x6374 | a1 += 0x6374;
0x00404004 jalr t9 | t9 ();
0x00404008 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040400c addiu s1, s1, 4 | s1 += 4;
0x00404010 andi v0, s3, 0x2000 | v0 = s3 & 0x2000;
| }
0x00404014 lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
| if (v0 != 0) {
0x00404018 beqz v0, 0x404038 |
0x0040401c lw a1, -0x7fd8(gp) | a1 = *(gp);
0x00404020 move a0, s1 | a0 = s1;
| /* str._timeout: */
0x00404024 addiu a1, a1, 0x637c | a1 += 0x637c;
0x00404028 jalr t9 | t9 ();
0x0040402c lw gp, 0x18(sp) | gp = *(var_18h);
0x00404030 addiu a0, s1, 9 | a0 = s1 + 9;
0x00404034 b 0x404068 |
| } else {
0x00404038 andi v0, s3, 0x4000 | v0 = s3 & 0x4000;
0x0040403c move a0, s1 | a0 = s1;
| if (v0 != 0) {
0x00404040 beqz v0, 0x404050 |
0x00404044 lw a1, -0x7fd8(gp) | a1 = *(gp);
| /* str._saving: */
0x00404048 addiu a1, a1, 0x6388 | a1 += 0x6388;
0x0040404c b 0x404058 |
| } else {
0x00404050 lw a1, -0x7fd8(gp) | a1 = *(gp);
| /* str._period: */
0x00404054 addiu a1, a1, 0x6394 | a1 += 0x6394;
| }
0x00404058 jalr t9 | t9 ();
0x0040405c nop |
0x00404060 lw gp, 0x18(sp) | gp = *(var_18h);
0x00404064 addiu a0, s1, 8 | a0 = s1 + 8;
| }
0x00404068 andi s3, s3, 4 | s3 &= 4;
0x0040406c lui v0, 0xf | v0 = 0xf0000;
| if (s3 != 0) {
0x00404070 beqz s3, 0x4040a8 |
0x00404074 slti s4, s4, 0x15 | s4 = (s4 < 0x15) ? 1 : 0;
0x00404078 lw v0, -0x7fd8(gp) | v0 = *(gp);
| if (s4 != 0) {
0x0040407c beqz s4, 0x404098 |
0x00404080 mtc1 s2, f2 | __asm ("mtc1 s2, f2");
0x00404084 cvt.d.w f0, f2 | __asm ("cvt.d.w f0, f2");
0x00404088 ldc1 f2, 0x6d00(v0) | __asm ("ldc1 f2, 0x6d00(v0)");
0x0040408c div.d f0, f0, f2 | __asm ("div.d f0, f0, f2");
0x00404090 trunc.w.d f2, f0 | __asm ("trunc.w.d f2, f0");
0x00404094 mfc1 s2, f2 | __asm ("mfc1 s2, f2");
| }
0x00404098 lw a2, -0x7fd8(gp) | a2 = *(gp);
0x0040409c move a1, s0 | a1 = s0;
| /* esilref: '&d' */
0x004040a0 addiu a2, a2, 0x62a4 | a2 += 0x62a4;
0x004040a4 b 0x404128 |
| } else {
0x004040a8 addiu v0, v0, 0x4240 | v0 += 0x4240;
0x004040ac slt v0, s2, v0 | v0 = (s2 < v0) ? 1 : 0;
0x004040b0 slti v0, s2, 0x3e8 | v0 = (s2 < 0x3e8) ? 1 : 0;
| if (v0 == 0) {
0x004040b4 bnez v0, 0x4040e0 |
0x004040b8 lw v0, -0x7fd8(gp) | v0 = *(gp);
0x004040bc mtc1 s2, f2 | __asm ("mtc1 s2, f2");
0x004040c0 lw a2, -0x7fd8(gp) | a2 = *(gp);
0x004040c4 cvt.d.w f0, f2 | __asm ("cvt.d.w f0, f2");
0x004040c8 ldc1 f2, 0x6d00(v0) | __asm ("ldc1 f2, 0x6d00(v0)");
0x004040cc move a1, s0 | a1 = s0;
| /* esilref: '&gs' */
0x004040d0 addiu a2, a2, 0x63a0 | a2 += 0x63a0;
0x004040d4 div.d f0, f0, f2 | __asm ("div.d f0, f0, f2");
0x004040d8 sdc1 f0, 0x10(sp) | __asm ("sdc1 f0, 0x10(sp)");
0x004040dc b 0x40410c |
| } else {
0x004040e0 lw a2, -0x7fd8(gp) | a2 = *(gp);
| if (v0 != 0) {
0x004040e4 bnez v0, 0x404120 | goto label_0;
| }
0x004040e8 lw v0, -0x7fd8(gp) | v0 = *(gp);
0x004040ec mtc1 s2, f2 | __asm ("mtc1 s2, f2");
0x004040f0 lw a2, -0x7fd8(gp) | a2 = *(gp);
0x004040f4 cvt.d.w f0, f2 | __asm ("cvt.d.w f0, f2");
0x004040f8 ldc1 f2, 0x5cf0(v0) | __asm ("ldc1 f2, 0x5cf0(v0)");
0x004040fc move a1, s0 | a1 = s0;
| /* str._gms */
0x00404100 addiu a2, a2, 0x63a4 | a2 += 0x63a4;
0x00404104 div.d f0, f0, f2 | __asm ("div.d f0, f0, f2");
0x00404108 sdc1 f0, 0x10(sp) | __asm ("sdc1 f0, 0x10(sp)");
| }
0x0040410c lw t9, -0x7ef0(gp) | t9 = sym.imp.snprintf;
0x00404110 jalr t9 | t9 ();
0x00404114 nop |
0x00404118 lw ra, 0x34(sp) | ra = *(var_34h);
0x0040411c b 0x404150 | goto label_1;
| label_0:
0x00404120 move a1, s0 | a1 = s0;
| /* str._dus */
0x00404124 addiu a2, a2, 0x63ac | a2 += 0x63ac;
| }
0x00404128 lw ra, 0x34(sp) | ra = *(var_34h);
0x0040412c lw s4, 0x30(sp) | s4 = *(var_30h);
0x00404130 lw s3, 0x2c(sp) | s3 = *(var_2ch);
0x00404134 lw s1, 0x24(sp) | s1 = *(var_24h);
0x00404138 lw s0, 0x20(sp) | s0 = *(var_20h);
0x0040413c move a3, s2 | a3 = s2;
0x00404140 lw t9, -0x7ef0(gp) | t9 = sym.imp.snprintf;
0x00404144 lw s2, 0x28(sp) | s2 = *(var_28h);
0x00404148 addiu sp, sp, 0x38 |
0x0040414c jr t9 | t9 ();
| label_1:
0x00404150 lw s4, 0x30(sp) | s4 = *(var_30h);
0x00404154 lw s3, 0x2c(sp) | s3 = *(var_2ch);
0x00404158 lw s2, 0x28(sp) | s2 = *(var_28h);
0x0040415c lw s1, 0x24(sp) | s1 = *(var_24h);
0x00404160 lw s0, 0x20(sp) | s0 = *(var_20h);
0x00404164 addiu sp, sp, 0x38 |
0x00404168 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/bin/iwgetid @ 0x404230 */
| #include <stdint.h>
|
; (fcn) sym.iw_print_retry_value () | void iw_print_retry_value () {
0x00404230 lui gp, 2 |
0x00404234 addiu gp, gp, -0x50b0 |
0x00404238 addu gp, gp, t9 | gp += t9;
0x0040423c addiu sp, sp, -0x38 |
0x00404240 slti v0, a1, 0x14 | v0 = (a1 < 0x14) ? 1 : 0;
0x00404244 sw gp, 0x18(sp) | *(var_18h) = gp;
0x00404248 sw s4, 0x30(sp) | *(var_30h) = s4;
0x0040424c sw ra, 0x34(sp) | *(var_34h) = ra;
0x00404250 sw s3, 0x2c(sp) | *(var_2ch) = s3;
0x00404254 sw s2, 0x28(sp) | *(var_28h) = s2;
0x00404258 sw s1, 0x24(sp) | *(var_24h) = s1;
0x0040425c sw s0, 0x20(sp) | *(var_20h) = s0;
0x00404260 lw s4, 0x48(sp) | s4 = *(arg_48h);
| if (v0 != 0) {
0x00404264 beqz v0, 0x404294 |
0x00404268 lw a2, -0x7fd8(gp) | a2 = *(gp);
0x0040426c lw ra, 0x34(sp) | ra = *(var_34h);
0x00404270 lw s4, 0x30(sp) | s4 = *(var_30h);
0x00404274 lw s3, 0x2c(sp) | s3 = *(var_2ch);
0x00404278 lw s2, 0x28(sp) | s2 = *(var_28h);
0x0040427c lw s1, 0x24(sp) | s1 = *(var_24h);
0x00404280 lw s0, 0x20(sp) | s0 = *(var_20h);
0x00404284 lw t9, -0x7ef0(gp) | t9 = sym.imp.snprintf;
| /* str._too_big_ */
0x00404288 addiu a2, a2, 0x62d4 | a2 += 0x62d4;
0x0040428c addiu sp, sp, 0x38 |
0x00404290 jr t9 | t9 ();
| }
0x00404294 andi v0, a3, 1 | v0 = a3 & 1;
0x00404298 move s1, a0 | s1 = a0;
0x0040429c move s2, a2 | s2 = a2;
0x004042a0 move s3, a3 | s3 = a3;
0x004042a4 addiu s0, a1, -0x14 | s0 = a1 + -0x14;
| if (v0 != 0) {
0x004042a8 beqz v0, 0x4042c4 |
0x004042ac lw a1, -0x7fd8(gp) | a1 = *(gp);
0x004042b0 lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
0x004042b4 addiu s1, s1, 4 | s1 += 4;
| /* str._min */
0x004042b8 addiu a1, a1, 0x636c | a1 += 0x636c;
0x004042bc jalr t9 | t9 ();
0x004042c0 lw gp, 0x18(sp) | gp = *(var_18h);
| }
0x004042c4 andi v0, s3, 2 | v0 = s3 & 2;
0x004042c8 andi v0, s3, 0x10 | v0 = s3 & 0x10;
| if (v0 != 0) {
0x004042cc beqz v0, 0x4042f0 |
0x004042d0 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x004042d4 lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
0x004042d8 move a0, s1 | a0 = s1;
| /* str._max */
0x004042dc addiu a1, a1, 0x6374 | a1 += 0x6374;
0x004042e0 jalr t9 | t9 ();
0x004042e4 lw gp, 0x18(sp) | gp = *(var_18h);
0x004042e8 addiu s1, s1, 4 | s1 += 4;
0x004042ec andi v0, s3, 0x10 | v0 = s3 & 0x10;
| }
0x004042f0 andi v0, s3, 0x20 | v0 = s3 & 0x20;
| if (v0 != 0) {
0x004042f4 beqz v0, 0x404318 |
0x004042f8 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x004042fc lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
0x00404300 move a0, s1 | a0 = s1;
| /* str._short */
0x00404304 addiu a1, a1, 0x6438 | a1 += 0x6438;
0x00404308 jalr t9 | t9 ();
0x0040430c lw gp, 0x18(sp) | gp = *(var_18h);
0x00404310 addiu s1, s1, 6 | s1 += 6;
0x00404314 andi v0, s3, 0x20 | v0 = s3 & 0x20;
| }
0x00404318 andi v0, s3, 0x2000 | v0 = s3 & 0x2000;
| if (v0 != 0) {
0x0040431c beqz v0, 0x404340 |
0x00404320 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x00404324 lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
0x00404328 move a0, s1 | a0 = s1;
| /* str.__long */
0x0040432c addiu a1, a1, 0x6440 | a1 += 0x6440;
0x00404330 jalr t9 | t9 ();
0x00404334 lw gp, 0x18(sp) | gp = *(var_18h);
0x00404338 addiu s1, s1, 6 | s1 += 6;
0x0040433c andi v0, s3, 0x2000 | v0 = s3 & 0x2000;
| }
0x00404340 move a0, s1 | a0 = s1;
| if (v0 != 0) {
0x00404344 beqz v0, 0x404424 |
0x00404348 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x0040434c lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
0x00404350 andi s3, s3, 4 | s3 &= 4;
| /* str._lifetime: */
0x00404354 addiu a1, a1, 0x6448 | a1 += 0x6448;
0x00404358 jalr t9 | t9 ();
0x0040435c lw gp, 0x18(sp) | gp = *(var_18h);
0x00404360 addiu a0, s1, 0xa | a0 = s1 + 0xa;
| if (s3 != 0) {
0x00404364 beqz s3, 0x40439c |
0x00404368 slti s4, s4, 0x15 | s4 = (s4 < 0x15) ? 1 : 0;
0x0040436c lw v0, -0x7fd8(gp) | v0 = *(gp);
| if (s4 != 0) {
0x00404370 beqz s4, 0x40438c |
0x00404374 mtc1 s2, f2 | __asm ("mtc1 s2, f2");
0x00404378 cvt.d.w f0, f2 | __asm ("cvt.d.w f0, f2");
0x0040437c ldc1 f2, 0x6d00(v0) | __asm ("ldc1 f2, 0x6d00(v0)");
0x00404380 div.d f0, f0, f2 | __asm ("div.d f0, f0, f2");
0x00404384 trunc.w.d f2, f0 | __asm ("trunc.w.d f2, f0");
0x00404388 mfc1 s2, f2 | __asm ("mfc1 s2, f2");
| }
0x0040438c lw a2, -0x7fd8(gp) | a2 = *(gp);
0x00404390 move a1, s0 | a1 = s0;
| /* esilref: '&d' */
0x00404394 addiu a2, a2, 0x62a4 | a2 += 0x62a4;
0x00404398 b 0x404430 |
0x0040439c lui v0, 0xf | v0 = 0xf4240;
0x004043a0 addiu v0, v0, 0x4240 |
0x004043a4 slt v0, s2, v0 | v0 = (s2 < v0) ? 1 : 0;
0x004043a8 slti v0, s2, 0x3e8 | v0 = (s2 < 0x3e8) ? 1 : 0;
| } else {
| } else {
| }
| }
| if (v0 == 0) {
0x004043ac bnez v0, 0x4043d8 |
0x004043b0 lw v0, -0x7fd8(gp) | v0 = *(gp);
0x004043b4 mtc1 s2, f2 | __asm ("mtc1 s2, f2");
0x004043b8 lw a2, -0x7fd8(gp) | a2 = *(gp);
0x004043bc cvt.d.w f0, f2 | __asm ("cvt.d.w f0, f2");
0x004043c0 ldc1 f2, 0x6d00(v0) | __asm ("ldc1 f2, 0x6d00(v0)");
0x004043c4 move a1, s0 | a1 = s0;
| /* esilref: '&gs' */
0x004043c8 addiu a2, a2, 0x63a0 | a2 += 0x63a0;
0x004043cc div.d f0, f0, f2 | __asm ("div.d f0, f0, f2");
0x004043d0 sdc1 f0, 0x10(sp) | __asm ("sdc1 f0, 0x10(sp)");
0x004043d4 b 0x404404 |
| } else {
0x004043d8 lw a2, -0x7fd8(gp) | a2 = *(gp);
| if (v0 != 0) {
0x004043dc bnez v0, 0x404418 | goto label_0;
| }
0x004043e0 lw v0, -0x7fd8(gp) | v0 = *(gp);
0x004043e4 mtc1 s2, f2 | __asm ("mtc1 s2, f2");
0x004043e8 lw a2, -0x7fd8(gp) | a2 = *(gp);
0x004043ec cvt.d.w f0, f2 | __asm ("cvt.d.w f0, f2");
0x004043f0 ldc1 f2, 0x5cf0(v0) | __asm ("ldc1 f2, 0x5cf0(v0)");
0x004043f4 move a1, s0 | a1 = s0;
| /* str._gms */
0x004043f8 addiu a2, a2, 0x63a4 | a2 += 0x63a4;
0x004043fc div.d f0, f0, f2 | __asm ("div.d f0, f0, f2");
0x00404400 sdc1 f0, 0x10(sp) | __asm ("sdc1 f0, 0x10(sp)");
| }
0x00404404 lw t9, -0x7ef0(gp) | t9 = sym.imp.snprintf;
0x00404408 jalr t9 | t9 ();
0x0040440c nop |
0x00404410 lw ra, 0x34(sp) | ra = *(var_34h);
0x00404414 b 0x404458 | goto label_1;
| label_0:
0x00404418 move a1, s0 | a1 = s0;
| /* str._dus */
0x0040441c addiu a2, a2, 0x63ac | a2 += 0x63ac;
0x00404420 b 0x404430 |
0x00404424 lw a2, -0x7fd8(gp) | a2 = *(gp);
0x00404428 move a1, s0 | a1 = s0;
| /* str._limit:_d */
0x0040442c addiu a2, a2, 0x6454 | a2 += 0x6454;
0x00404430 lw ra, 0x34(sp) | ra = *(var_34h);
0x00404434 lw s4, 0x30(sp) | s4 = *(var_30h);
0x00404438 lw s3, 0x2c(sp) | s3 = *(var_2ch);
0x0040443c lw s1, 0x24(sp) | s1 = *(var_24h);
0x00404440 lw s0, 0x20(sp) | s0 = *(var_20h);
0x00404444 move a3, s2 | a3 = s2;
0x00404448 lw t9, -0x7ef0(gp) | t9 = sym.imp.snprintf;
0x0040444c lw s2, 0x28(sp) | s2 = *(var_28h);
0x00404450 addiu sp, sp, 0x38 |
0x00404454 jr t9 | t9 ();
| label_1:
0x00404458 lw s4, 0x30(sp) | s4 = *(var_30h);
0x0040445c lw s3, 0x2c(sp) | s3 = *(var_2ch);
0x00404460 lw s2, 0x28(sp) | s2 = *(var_28h);
0x00404464 lw s1, 0x24(sp) | s1 = *(var_24h);
0x00404468 lw s0, 0x20(sp) | s0 = *(var_20h);
0x0040446c addiu sp, sp, 0x38 |
0x00404470 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/bin/iwgetid @ 0x40479c */
| #include <stdint.h>
|
; (fcn) sym.iw_sawap_ntop () | void iw_sawap_ntop () {
0x0040479c lui gp, 2 |
0x004047a0 addiu gp, gp, -0x561c |
0x004047a4 addu gp, gp, t9 | gp += t9;
0x004047a8 addiu sp, sp, -0x40 |
0x004047ac sw s0, 0x34(sp) | *(var_34h) = s0;
0x004047b0 move s0, a1 | s0 = a1;
0x004047b4 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x004047b8 lw t9, -0x7f04(gp) | t9 = sym.imp.memcpy;
0x004047bc sw ra, 0x3c(sp) | *(var_3ch) = ra;
0x004047c0 sw gp, 0x10(sp) | *(var_10h) = gp;
0x004047c4 sw s1, 0x38(sp) | *(var_38h) = s1;
0x004047c8 addiu a1, a1, 0x6960 | a1 += 0x6960;
0x004047cc move s1, a0 | s1 = a0;
0x004047d0 addiu a2, zero, 6 | a2 = 6;
0x004047d4 sb zero, 0x28(sp) | *(var_28h) = 0;
0x004047d8 sb zero, 0x29(sp) | *(var_29h) = 0;
0x004047dc sb zero, 0x2a(sp) | *(var_2ah) = 0;
0x004047e0 sb zero, 0x2b(sp) | *(var_2bh) = 0;
0x004047e4 sb zero, 0x2c(sp) | *(var_2ch) = 0;
0x004047e8 sb zero, 0x2d(sp) | *(var_2dh) = 0;
0x004047ec addiu a0, sp, 0x20 | a0 = sp + 0x20;
0x004047f0 jalr t9 | t9 ();
0x004047f4 lw gp, 0x10(sp) | gp = *(var_10h);
0x004047f8 addiu a0, sp, 0x18 | a0 = sp + 0x18;
0x004047fc addiu a2, zero, 6 | a2 = 6;
0x00404800 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x00404804 lw t9, -0x7f04(gp) | t9 = sym.imp.memcpy;
0x00404808 addiu s1, s1, 2 | s1 += 2;
| /* str.DDDDDD */
0x0040480c addiu a1, a1, 0x6968 | a1 += 0x6968;
0x00404810 jalr t9 | t9 ();
0x00404814 lw gp, 0x10(sp) | gp = *(var_10h);
0x00404818 move a0, s1 | a0 = s1;
0x0040481c addiu a1, sp, 0x28 | a1 = sp + 0x28;
0x00404820 lw t9, -0x7f30(gp) | t9 = sym.imp.memcmp;
0x00404824 addiu a2, zero, 6 | a2 = 6;
0x00404828 jalr t9 | t9 ();
0x0040482c lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00404830 bnez v0, 0x404844 |
0x00404834 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x00404838 move a0, s0 | a0 = s0;
| /* str.Not_Associated */
0x0040483c addiu a1, a1, 0x64f4 | a1 += 0x64f4;
0x00404840 b 0x404898 |
| } else {
0x00404844 lw t9, -0x7f30(gp) | t9 = sym.imp.memcmp;
0x00404848 move a0, s1 | a0 = s1;
0x0040484c addiu a1, sp, 0x20 | a1 = sp + 0x20;
0x00404850 addiu a2, zero, 6 | a2 = 6;
0x00404854 jalr t9 | t9 ();
0x00404858 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x0040485c bnez v0, 0x404870 |
0x00404860 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x00404864 move a0, s0 | a0 = s0;
| /* str.Invalid */
0x00404868 addiu a1, a1, 0x6504 | a1 += 0x6504;
0x0040486c b 0x404898 |
| } else {
0x00404870 lw t9, -0x7f30(gp) | t9 = sym.imp.memcmp;
0x00404874 move a0, s1 | a0 = s1;
0x00404878 addiu a1, sp, 0x18 | a1 = sp + 0x18;
0x0040487c addiu a2, zero, 6 | a2 = 6;
0x00404880 jalr t9 | t9 ();
0x00404884 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x00404888 bnez v0, 0x4048ac | goto label_0;
| }
0x0040488c lw a1, -0x7fd8(gp) | a1 = *(gp);
0x00404890 move a0, s0 | a0 = s0;
| /* str.None */
0x00404894 addiu a1, a1, 0x650c | a1 += 0x650c;
| }
| }
0x00404898 lw t9, -0x7ee8(gp) | t9 = sym._MIPS_STUBS_;
0x0040489c jalr t9 | t9 ();
0x004048a0 nop |
0x004048a4 lw ra, 0x3c(sp) | ra = *(var_3ch);
0x004048a8 b 0x4048c0 | goto label_1;
| label_0:
0x004048ac lw t9, -0x7f94(gp) | t9 = sym.iw_ether_ntop;
0x004048b0 move a0, s1 | a0 = s1;
0x004048b4 move a1, s0 | a1 = s0;
0x004048b8 bal 0x40473c | sym_iw_ether_ntop ();
0x004048bc lw ra, 0x3c(sp) | ra = *(var_3ch);
| label_1:
0x004048c0 move v0, s0 | v0 = s0;
0x004048c4 lw s1, 0x38(sp) | s1 = *(var_38h);
0x004048c8 lw s0, 0x34(sp) | s0 = *(var_34h);
0x004048cc addiu sp, sp, 0x40 |
0x004048d0 jr ra | return v0;
| }
[*] Function strcpy used 1 times iwgetid