[*] Binary protection state of mfgbox

  
  	Full RELRO     Canary found      NX disabled  No PIE       No RPATH     No RUNPATH   No Symbols


[*] Function popen tear down of mfgbox

    ; assembly                                       | /* r2dec pseudo code output */
                                                     | /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/bin/mfgbox @ 0x403084 */
                                                     | #include <stdint.h>
                                                     |  
    ; (fcn) sym.CheckModel_int__char_const_ ()       | void CheckModel_int_char_const_ () {
                                                     |     /* CheckModel(int, char const*) */
    0x00403084 lui gp, 2                             |     
    0x00403088 addiu gp, gp, 0x1fcc                  |     
    0x0040308c addu gp, gp, t9                       |     gp += t9;
    0x00403090 addiu sp, sp, -0x4618                 |     
    0x00403094 sw ra, 0x4614(sp)                     |     *(arg_4614h) = ra;
    0x00403098 sw fp, 0x4610(sp)                     |     *(arg_4610h) = fp;
    0x0040309c sw s1, 0x460c(sp)                     |     *(arg_460ch) = s1;
    0x004030a0 sw s0, 0x4608(sp)                     |     *(arg_4608h) = s0;
    0x004030a4 move fp, sp                           |     fp = sp;
    0x004030a8 sw gp, 0x10(sp)                       |     *(arg_10h) = gp;
    0x004030ac sw a0, 0x1c(fp)                       |     *(arg_1ch) = a0;
    0x004030b0 sw a1, 0x18(fp)                       |     *(arg_18h) = a1;
    0x004030b4 lw t8, -0x7e58(gp)                    |     t8 = *((gp - 8086));
    0x004030b8 lw t8, (t8)                           |     t8 = *(t8);
    0x004030bc sw t8, 0x4604(fp)                     |     *(arg_4604h) = t8;
    0x004030c0 addiu t8, fp, 0x105c                  |     t8 = fp + 0x105c;
    0x004030c4 move a0, t8                           |     a0 = t8;
    0x004030c8 lw t8, -0x7f84(gp)                    |     t8 = *(gp);
    0x004030cc move t9, t8                           |     t9 = t8;
    0x004030d0 jalr t9                               |     t9 ();
    0x004030d4 nop                                   |     
    0x004030d8 lw gp, 0x10(fp)                       |     gp = *(arg_10h);
    0x004030dc addiu t8, fp, 0x24                    |     t8 = fp + 0x24;
    0x004030e0 move a0, t8                           |     a0 = t8;
    0x004030e4 lw t8, -0x7e50(gp)                    |     t8 = *(gp);
    0x004030e8 move t9, t8                           |     t9 = t8;
    0x004030ec jalr t9                               |     t9 ();
    0x004030f0 nop                                   |     
    0x004030f4 lw gp, 0x10(fp)                       |     gp = *(arg_10h);
    0x004030f8 lw v0, 0x1c(fp)                       |     v0 = *(arg_1ch);
    0x004030fc addiu t8, zero, 2                     |     t8 = 2;
                                                     |     if (v0 != t8) {
    0x00403100 beq v0, t8, 0x40312c                  |         
    0x00403104 nop                                   |         
    0x00403108 lw t8, -0x7f8c(gp)                    |         t8 = *(gp);
                                                     |         /* aav.0x00403000 */
    0x0040310c addiu t8, t8, 0x3000                  |         t8 += 0x3000;
    0x00403110 move t9, t8                           |         t9 = t8;
    0x00403114 jalr t9                               |         t9 ();
    0x00403118 nop                                   |         
    0x0040311c lw gp, 0x10(fp)                       |         gp = *(arg_10h);
    0x00403120 move s0, zero                         |         s0 = 0;
    0x00403124 b 0x403498                            |         goto label_0;
    0x00403128 nop                                   |         
                                                     |     }
    0x0040312c addiu t8, fp, 0x105c                  |     t8 = fp + 0x105c;
    0x00403130 move a0, t8                           |     a0 = t8;
    0x00403134 lw t8, -0x7f18(gp)                    |     t8 = *(gp);
    0x00403138 move t9, t8                           |     t9 = t8;
    0x0040313c jalr t9                               |     t9 ();
    0x00403140 nop                                   |     
    0x00403144 lw gp, 0x10(fp)                       |     gp = *(arg_10h);
    0x00403148 addiu t8, fp, 0x44                    |     t8 = fp + 0x44;
    0x0040314c move a0, t8                           |     a0 = t8;
    0x00403150 lw t8, -0x7f80(gp)                    |     t8 = *(gp);
    0x00403154 move t9, t8                           |     t9 = t8;
    0x00403158 jalr t9                               |     t9 ();
    0x0040315c nop                                   |     
    0x00403160 lw gp, 0x10(fp)                       |     gp = *(arg_10h);
    0x00403164 addiu t8, fp, 0x44                    |     t8 = fp + 0x44;
    0x00403168 move a0, t8                           |     a0 = t8;
    0x0040316c lw t8, -0x7fdc(gp)                    |     t8 = *((gp - 8183));
                                                     |     /* esilref: 'System' */
    0x00403170 addiu a1, t8, -0x57fc                 |     a1 = t8 + -0x57fc;
    0x00403174 move a2, zero                         |     a2 = 0;
    0x00403178 lw t8, -0x7f1c(gp)                    |     t8 = *(gp);
    0x0040317c move t9, t8                           |     t9 = t8;
    0x00403180 jalr t9                               |     t9 ();
    0x00403184 nop                                   |     
    0x00403188 lw gp, 0x10(fp)                       |     gp = *(arg_10h);
    0x0040318c lw t8, -0x7fdc(gp)                    |     t8 = *((gp - 8183));
                                                     |     /* str.pibinfo_Wireless */
    0x00403190 addiu a0, t8, -0x57f4                 |     a0 = t8 + -0x57f4;
    0x00403194 lw t8, -0x7fdc(gp)                    |     t8 = *((gp - 8183));
    0x00403198 addiu a1, t8, -0x57e0                 |     a1 = t8 + -0x57e0;
    0x0040319c lw t8, -0x7f48(gp)                    |     t8 = sym.imp.popen
    0x004031a0 move t9, t8                           |     t9 = t8;
    0x004031a4 jalr t9                               |     t9 ();
    0x004031a8 nop                                   |     
    0x004031ac lw gp, 0x10(fp)                       |     gp = *(arg_10h);
    0x004031b0 move t8, v0                           |     t8 = v0;
    0x004031b4 sw t8, 0x38(fp)                       |     *(arg_38h) = t8;
    0x004031b8 addiu t8, fp, 0x4584                  |     t8 = fp + 0x4584;
    0x004031bc move a0, t8                           |     a0 = t8;
    0x004031c0 addiu a1, zero, 4                     |     a1 = 4;
    0x004031c4 lw a2, 0x38(fp)                       |     a2 = *(arg_38h);
    0x004031c8 lw t8, -0x7ee8(gp)                    |     t8 = sym.imp.fgets;
    0x004031cc move t9, t8                           |     t9 = t8;
    0x004031d0 jalr t9                               |     t9 ();
    0x004031d4 nop                                   |     
    0x004031d8 lw gp, 0x10(fp)                       |     gp = *(arg_10h);
    0x004031dc addiu t8, fp, 0x4584                  |     t8 = fp + 0x4584;
    0x004031e0 move a0, t8                           |     a0 = t8;
    0x004031e4 lw t8, -0x7f38(gp)                    |     t8 = sym.imp.atoi;
    0x004031e8 move t9, t8                           |     t9 = t8;
    0x004031ec jalr t9                               |     t9 ();
    0x004031f0 nop                                   |     
    0x004031f4 lw gp, 0x10(fp)                       |     gp = *(arg_10h);
    0x004031f8 addiu t8, zero, 1                     |     t8 = 1;
                                                     |     if (v0 == t8) {
    0x004031fc bne v0, t8, 0x4032f8                  |         
    0x00403200 nop                                   |         
    0x00403204 addiu t8, fp, 0x34                    |         t8 = fp + 0x34;
    0x00403208 move a0, t8                           |         a0 = t8;
    0x0040320c lw t8, -0x7f40(gp)                    |         t8 = *(gp);
    0x00403210 move t9, t8                           |         t9 = t8;
    0x00403214 jalr t9                               |         t9 ();
    0x00403218 nop                                   |         
    0x0040321c lw gp, 0x10(fp)                       |         gp = *(arg_10h);
    0x00403220 addiu v0, fp, 0x28                    |         v0 = fp + 0x28;
    0x00403224 addiu t8, fp, 0x34                    |         t8 = fp + 0x34;
    0x00403228 move a0, v0                           |         a0 = v0;
    0x0040322c lw v0, -0x7fdc(gp)                    |         v0 = *((gp - 8183));
                                                     |         /* str.ModelW */
    0x00403230 addiu a1, v0, -0x57dc                 |         a1 = v0 + -0x57dc;
    0x00403234 move a2, t8                           |         a2 = t8;
    0x00403238 lw t8, -0x7ed4(gp)                    |         t8 = *(gp);
    0x0040323c move t9, t8                           |         t9 = t8;
    0x00403240 jalr t9                               |         t9 ();
    0x00403244 nop                                   |         
    0x00403248 lw gp, 0x10(fp)                       |         gp = *(arg_10h);
    0x0040324c addiu v1, fp, 0x2c                    |         v1 = fp + 0x2c;
    0x00403250 addiu v0, fp, 0x44                    |         v0 = fp + 0x44;
    0x00403254 addiu t8, fp, 0x28                    |         t8 = fp + 0x28;
    0x00403258 move a0, v1                           |         a0 = v1;
    0x0040325c move a1, v0                           |         a1 = v0;
    0x00403260 move a2, t8                           |         a2 = t8;
    0x00403264 lw t8, -0x7ecc(gp)                    |         t8 = *(gp);
    0x00403268 move t9, t8                           |         t9 = t8;
    0x0040326c jalr t9                               |         t9 ();
    0x00403270 nop                                   |         
    0x00403274 lw gp, 0x10(fp)                       |         gp = *(arg_10h);
    0x00403278 addiu v0, fp, 0x24                    |         v0 = fp + 0x24;
    0x0040327c addiu t8, fp, 0x2c                    |         t8 = fp + 0x2c;
    0x00403280 move a0, v0                           |         a0 = v0;
    0x00403284 move a1, t8                           |         a1 = t8;
    0x00403288 lw t8, -0x7f50(gp)                    |         t8 = *(gp);
    0x0040328c move t9, t8                           |         t9 = t8;
    0x00403290 jalr t9                               |         t9 ();
    0x00403294 nop                                   |         
    0x00403298 lw gp, 0x10(fp)                       |         gp = *(arg_10h);
    0x0040329c addiu t8, fp, 0x2c                    |         t8 = fp + 0x2c;
    0x004032a0 move a0, t8                           |         a0 = t8;
    0x004032a4 lw t8, -0x7e9c(gp)                    |         t8 = *(gp);
    0x004032a8 move t9, t8                           |         t9 = t8;
    0x004032ac jalr t9                               |         t9 ();
    0x004032b0 nop                                   |         
    0x004032b4 lw gp, 0x10(fp)                       |         gp = *(arg_10h);
    0x004032b8 addiu t8, fp, 0x28                    |         t8 = fp + 0x28;
    0x004032bc move a0, t8                           |         a0 = t8;
    0x004032c0 lw t8, -0x7e9c(gp)                    |         t8 = *(gp);
    0x004032c4 move t9, t8                           |         t9 = t8;
    0x004032c8 jalr t9                               |         t9 ();
    0x004032cc nop                                   |         
    0x004032d0 lw gp, 0x10(fp)                       |         gp = *(arg_10h);
    0x004032d4 addiu t8, fp, 0x34                    |         t8 = fp + 0x34;
    0x004032d8 move a0, t8                           |         a0 = t8;
    0x004032dc lw t8, -0x7f0c(gp)                    |         t8 = *(gp);
    0x004032e0 move t9, t8                           |         t9 = t8;
    0x004032e4 jalr t9                               |         t9 ();
    0x004032e8 nop                                   |         
    0x004032ec lw gp, 0x10(fp)                       |         gp = *(arg_10h);
    0x004032f0 b 0x4033e4                            |         goto label_1;
    0x004032f4 nop                                   |         
                                                     |     }
    0x004032f8 addiu t8, fp, 0x2c                    |     t8 = fp + 0x2c;
    0x004032fc move a0, t8                           |     a0 = t8;
    0x00403300 lw t8, -0x7f40(gp)                    |     t8 = *(gp);
    0x00403304 move t9, t8                           |     t9 = t8;
    0x00403308 jalr t9                               |     t9 ();
    0x0040330c nop                                   |     
    0x00403310 lw gp, 0x10(fp)                       |     gp = *(arg_10h);
    0x00403314 addiu v0, fp, 0x30                    |     v0 = fp + 0x30;
    0x00403318 addiu t8, fp, 0x2c                    |     t8 = fp + 0x2c;
    0x0040331c move a0, v0                           |     a0 = v0;
    0x00403320 lw v0, -0x7fdc(gp)                    |     v0 = *((gp - 8183));
                                                     |     /* str.Model */
    0x00403324 addiu a1, v0, -0x57d4                 |     a1 = v0 + -0x57d4;
    0x00403328 move a2, t8                           |     a2 = t8;
    0x0040332c lw t8, -0x7ed4(gp)                    |     t8 = *(gp);
    0x00403330 move t9, t8                           |     t9 = t8;
    0x00403334 jalr t9                               |     t9 ();
    0x00403338 nop                                   |     
    0x0040333c lw gp, 0x10(fp)                       |     gp = *(arg_10h);
    0x00403340 addiu v1, fp, 0x34                    |     v1 = fp + 0x34;
    0x00403344 addiu v0, fp, 0x44                    |     v0 = fp + 0x44;
    0x00403348 addiu t8, fp, 0x30                    |     t8 = fp + 0x30;
    0x0040334c move a0, v1                           |     a0 = v1;
    0x00403350 move a1, v0                           |     a1 = v0;
    0x00403354 move a2, t8                           |     a2 = t8;
    0x00403358 lw t8, -0x7ecc(gp)                    |     t8 = *(gp);
    0x0040335c move t9, t8                           |     t9 = t8;
    0x00403360 jalr t9                               |     t9 ();
    0x00403364 nop                                   |     
    0x00403368 lw gp, 0x10(fp)                       |     gp = *(arg_10h);
    0x0040336c addiu v0, fp, 0x24                    |     v0 = fp + 0x24;
    0x00403370 addiu t8, fp, 0x34                    |     t8 = fp + 0x34;
    0x00403374 move a0, v0                           |     a0 = v0;
    0x00403378 move a1, t8                           |     a1 = t8;
    0x0040337c lw t8, -0x7f50(gp)                    |     t8 = *(gp);
    0x00403380 move t9, t8                           |     t9 = t8;
    0x00403384 jalr t9                               |     t9 ();
    0x00403388 nop                                   |     
    0x0040338c lw gp, 0x10(fp)                       |     gp = *(arg_10h);
    0x00403390 addiu t8, fp, 0x34                    |     t8 = fp + 0x34;
    0x00403394 move a0, t8                           |     a0 = t8;
    0x00403398 lw t8, -0x7e9c(gp)                    |     t8 = *(gp);
    0x0040339c move t9, t8                           |     t9 = t8;
    0x004033a0 jalr t9                               |     t9 ();
    0x004033a4 nop                                   |     
    0x004033a8 lw gp, 0x10(fp)                       |     gp = *(arg_10h);
    0x004033ac addiu t8, fp, 0x30                    |     t8 = fp + 0x30;
    0x004033b0 move a0, t8                           |     a0 = t8;
    0x004033b4 lw t8, -0x7e9c(gp)                    |     t8 = *(gp);
    0x004033b8 move t9, t8                           |     t9 = t8;
    0x004033bc jalr t9                               |     t9 ();
    0x004033c0 nop                                   |     
    0x004033c4 lw gp, 0x10(fp)                       |     gp = *(arg_10h);
    0x004033c8 addiu t8, fp, 0x2c                    |     t8 = fp + 0x2c;
    0x004033cc move a0, t8                           |     a0 = t8;
    0x004033d0 lw t8, -0x7f0c(gp)                    |     t8 = *(gp);
    0x004033d4 move t9, t8                           |     t9 = t8;
    0x004033d8 jalr t9                               |     t9 ();
    0x004033dc nop                                   |     
    0x004033e0 lw gp, 0x10(fp)                       |     gp = *(arg_10h);
                                                     | label_1:
    0x004033e4 addiu t8, fp, 0x24                    |     t8 = fp + 0x24;
    0x004033e8 move a0, t8                           |     a0 = t8;
    0x004033ec lw t8, -0x7e6c(gp)                    |     t8 = *(gp);
    0x004033f0 move t9, t8                           |     t9 = t8;
    0x004033f4 jalr t9                               |     t9 ();
    0x004033f8 nop                                   |     
    0x004033fc lw gp, 0x10(fp)                       |     gp = *(arg_10h);
    0x00403400 move t8, v0                           |     t8 = v0;
    0x00403404 move a0, t8                           |     a0 = t8;
    0x00403408 lw a1, 0x18(fp)                       |     a1 = *(arg_18h);
    0x0040340c addiu a2, zero, 0x7f                  |     a2 = 0x7f;
    0x00403410 lw t8, -0x7e7c(gp)                    |     t8 = sym.imp.strncmp;
    0x00403414 move t9, t8                           |     t9 = t8;
    0x00403418 jalr t9                               |     t9 ();
    0x0040341c nop                                   |     
    0x00403420 lw gp, 0x10(fp)                       |     gp = *(arg_10h);
    0x00403424 move t8, v0                           |     t8 = v0;
    0x00403428 sltiu t8, t8, 1                       |     t8 = (t8 < 1) ? 1 : 0;
    0x0040342c andi t8, t8, 0xff                     |     t8 &= 0xff;
                                                     |     if (t8 != 0) {
    0x00403430 beqz t8, 0x40345c                     |         
    0x00403434 nop                                   |         
    0x00403438 lw t8, -0x7fdc(gp)                    |         t8 = *((gp - 8183));
                                                     |         /* esilref: 'ok' */
    0x0040343c addiu a0, t8, -0x57cc                 |         a0 = t8 + -0x57cc;
    0x00403440 lw t8, -0x7f4c(gp)                    |         t8 = sym.imp.puts;
    0x00403444 move t9, t8                           |         t9 = t8;
    0x00403448 jalr t9                               |         t9 ();
    0x0040344c nop                                   |         
    0x00403450 lw gp, 0x10(fp)                       |         gp = *(arg_10h);
    0x00403454 b 0x403478                            |         goto label_2;
    0x00403458 nop                                   |         
                                                     |     }
    0x0040345c lw t8, -0x7fdc(gp)                    |     t8 = *((gp - 8183));
                                                     |     /* esilref: 'failed' */
    0x00403460 addiu a0, t8, -0x57c8                 |     a0 = t8 + -0x57c8;
    0x00403464 lw t8, -0x7f4c(gp)                    |     t8 = sym.imp.puts;
    0x00403468 move t9, t8                           |     t9 = t8;
    0x0040346c jalr t9                               |     t9 ();
    0x00403470 nop                                   |     
    0x00403474 lw gp, 0x10(fp)                       |     gp = *(arg_10h);
                                                     | label_2:
    0x00403478 addiu t8, fp, 0x44                    |     t8 = fp + 0x44;
    0x0040347c move a0, t8                           |     a0 = t8;
    0x00403480 lw t8, -0x7f04(gp)                    |     t8 = sym.imp.TinyDB::TinyDB__;
    0x00403484 move t9, t8                           |     t9 = t8;
    0x00403488 jalr t9                               |     t9 ();
    0x0040348c nop                                   |     
    0x00403490 lw gp, 0x10(fp)                       |     gp = *(arg_10h);
    0x00403494 addiu s0, zero, 1                     |     s0 = 1;
                                                     | label_0:
    0x00403498 addiu t8, fp, 0x24                    |     t8 = fp + 0x24;
    0x0040349c move a0, t8                           |     a0 = t8;
    0x004034a0 lw t8, -0x7e9c(gp)                    |     t8 = *(gp);
    0x004034a4 move t9, t8                           |     t9 = t8;
    0x004034a8 jalr t9                               |     t9 ();
    0x004034ac nop                                   |     
    0x004034b0 lw gp, 0x10(fp)                       |     gp = *(arg_10h);
    0x004034b4 addiu t8, zero, 1                     |     t8 = 1;
                                                     |     if (s0 != t8) {
    0x004034b8 beq s0, t8, 0x4034cc                  |         
    0x004034bc nop                                   |         
    0x004034c0 move s0, zero                         |         s0 = 0;
    0x004034c4 b 0x4034d4                            |         goto label_3;
    0x004034c8 nop                                   |         
                                                     |     }
    0x004034cc nop                                   |     
    0x004034d0 addiu s0, zero, 1                     |     s0 = 1;
                                                     | label_3:
    0x004034d4 addiu t8, fp, 0x105c                  |     t8 = fp + 0x105c;
    0x004034d8 move a0, t8                           |     a0 = t8;
    0x004034dc lw t8, -0x7e4c(gp)                    |     t8 = sym.imp.PIB::PIB__;
    0x004034e0 move t9, t8                           |     t9 = t8;
    0x004034e4 jalr t9                               |     t9 ();
    0x004034e8 nop                                   |     
    0x004034ec lw gp, 0x10(fp)                       |     gp = *(arg_10h);
    0x004034f0 addiu t8, zero, 1                     |     t8 = 1;
                                                     |     if (s0 != t8) {
    0x004034f4 beq s0, t8, 0x403504                  |         
    0x004034f8 nop                                   |         
    0x004034fc b 0x403850                            |         goto label_4;
    0x00403500 nop                                   |         
                                                     |     }
    0x00403504 nop                                   |     
    0x00403508 b 0x403850                            |     goto label_4;
    0x0040350c nop                                   |     
                                                     | label_4:
    0x00403850 lw t8, -0x7e58(gp)                    |     t8 = *((gp - 8086));
    0x00403854 lw v0, 0x4604(fp)                     |     v0 = *(arg_4604h);
    0x00403858 lw t8, (t8)                           |     t8 = *(t8);
                                                     |     if (v0 != t8) {
    0x0040385c beq v0, t8, 0x403874                  |         
    0x00403860 nop                                   |         
    0x00403864 lw t8, -0x7ebc(gp)                    |         t8 = sym.imp.__stack_chk_fail;
    0x00403868 move t9, t8                           |         t9 = t8;
    0x0040386c jalr t9                               |         t9 ();
    0x00403870 nop                                   |         
                                                     |     }
    0x00403874 move sp, fp                           |     
    0x00403878 lw ra, 0x4614(sp)                     |     ra = *(arg_4614h);
    0x0040387c lw fp, 0x4610(sp)                     |     fp = *(arg_4610h);
    0x00403880 lw s1, 0x460c(sp)                     |     s1 = *(arg_460ch);
    0x00403884 lw s0, 0x4608(sp)                     |     s0 = *(arg_4608h);
    0x00403888 addiu sp, sp, 0x4618                  |     
    0x0040388c jr ra                                 |     return v0;
    0x00403890 nop                                   |     
                                                     | }
    ; assembly                                       | /* r2dec pseudo code output */
                                                     | /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/bin/mfgbox @ 0x402634 */
                                                     | #include <stdint.h>
                                                     |  
    ; (fcn) sym.TestButton_int__char_const_ ()       | void TestButton_int_char_const_ () {
                                                     |     /* TestButton(int, char const**) */
    0x00402634 lui gp, 2                             |     
    0x00402638 addiu gp, gp, 0x2a1c                  |     
    0x0040263c addu gp, gp, t9                       |     gp += t9;
    0x00402640 addiu sp, sp, -0xb8                   |     
    0x00402644 sw ra, 0xb4(sp)                       |     *(var_b4h) = ra;
    0x00402648 sw fp, 0xb0(sp)                       |     *(var_b0h) = fp;
    0x0040264c move fp, sp                           |     fp = sp;
    0x00402650 sw gp, 0x10(sp)                       |     *(var_10h) = gp;
    0x00402654 sw a0, 0x1c(fp)                       |     *(arg_1ch) = a0;
    0x00402658 sw a1, 0x18(fp)                       |     *(arg_18h) = a1;
    0x0040265c lw t8, -0x7e58(gp)                    |     t8 = *((gp - 8086));
    0x00402660 lw t8, (t8)                           |     t8 = *(t8);
    0x00402664 sw t8, 0xac(fp)                       |     *(arg_ach) = t8;
    0x00402668 lw t8, 0x18(fp)                       |     t8 = *(arg_18h);
    0x0040266c lw t8, 4(t8)                          |     t8 = *((t8 + 1));
    0x00402670 sw t8, 0x24(fp)                       |     *(arg_24h) = t8;
    0x00402674 lw v0, 0x1c(fp)                       |     v0 = *(arg_1ch);
    0x00402678 addiu t8, zero, 3                     |     t8 = 3;
                                                     |     if (v0 != t8) {
    0x0040267c beq v0, t8, 0x4026a4                  |         
    0x00402680 nop                                   |         
    0x00402684 lw t8, -0x7f8c(gp)                    |         t8 = *(gp);
                                                     |         /* aav.0x004025b0 */
    0x00402688 addiu t8, t8, 0x25b0                  |         t8 += 0x25b0;
    0x0040268c move t9, t8                           |         t9 = t8;
    0x00402690 jalr t9                               |         t9 ();
    0x00402694 nop                                   |         
    0x00402698 lw gp, 0x10(fp)                       |         gp = *(arg_10h);
    0x0040269c b 0x4028b4                            |         goto label_0;
    0x004026a0 nop                                   |         
                                                     |     }
    0x004026a4 lw a0, 0x24(fp)                       |     a0 = *(arg_24h);
    0x004026a8 lw t8, -0x7fdc(gp)                    |     t8 = *((gp - 8183));
                                                     |     /* str.factory */
    0x004026ac addiu a1, t8, -0x59d0                 |     a1 = t8 + -0x59d0;
    0x004026b0 lw t8, -0x7f2c(gp)                    |     t8 = sym.imp.strcmp;
    0x004026b4 move t9, t8                           |     t9 = t8;
    0x004026b8 jalr t9                               |     t9 ();
    0x004026bc nop                                   |     
    0x004026c0 lw gp, 0x10(fp)                       |     gp = *(arg_10h);
    0x004026c4 move t8, v0                           |     t8 = v0;
                                                     |     if (t8 != 0) {
    0x004026c8 beqz t8, 0x402748                     |         
    0x004026cc nop                                   |         
    0x004026d0 lw a0, 0x24(fp)                       |         a0 = *(arg_24h);
    0x004026d4 lw t8, -0x7fdc(gp)                    |         t8 = *((gp - 8183));
                                                     |         /* esilref: 'wps' */
    0x004026d8 addiu a1, t8, -0x59c8                 |         a1 = t8 + -0x59c8;
    0x004026dc lw t8, -0x7f2c(gp)                    |         t8 = sym.imp.strcmp;
    0x004026e0 move t9, t8                           |         t9 = t8;
    0x004026e4 jalr t9                               |         t9 ();
    0x004026e8 nop                                   |         
    0x004026ec lw gp, 0x10(fp)                       |         gp = *(arg_10h);
    0x004026f0 move t8, v0                           |         t8 = v0;
                                                     |         if (t8 == 0) {
    0x004026f4 beqz t8, 0x402748                     |             goto label_1;
                                                     |         }
    0x004026f8 nop                                   |         
    0x004026fc lw a0, 0x24(fp)                       |         a0 = *(arg_24h);
    0x00402700 lw t8, -0x7fdc(gp)                    |         t8 = *((gp - 8183));
                                                     |         /* str.privacy */
    0x00402704 addiu a1, t8, -0x59c4                 |         a1 = t8 + -0x59c4;
    0x00402708 lw t8, -0x7f2c(gp)                    |         t8 = sym.imp.strcmp;
    0x0040270c move t9, t8                           |         t9 = t8;
    0x00402710 jalr t9                               |         t9 ();
    0x00402714 nop                                   |         
    0x00402718 lw gp, 0x10(fp)                       |         gp = *(arg_10h);
    0x0040271c move t8, v0                           |         t8 = v0;
                                                     |         if (t8 == 0) {
    0x00402720 beqz t8, 0x402748                     |             goto label_1;
                                                     |         }
    0x00402724 nop                                   |         
    0x00402728 lw t8, -0x7f8c(gp)                    |         t8 = *(gp);
                                                     |         /* aav.0x004025b0 */
    0x0040272c addiu t8, t8, 0x25b0                  |         t8 += 0x25b0;
    0x00402730 move t9, t8                           |         t9 = t8;
    0x00402734 jalr t9                               |         t9 ();
    0x00402738 nop                                   |         
    0x0040273c lw gp, 0x10(fp)                       |         gp = *(arg_10h);
    0x00402740 b 0x4028b4                            |         goto label_0;
    0x00402744 nop                                   |         
                                                     |     }
                                                     | label_1:
    0x00402748 addiu t8, zero, 0x3f                  |     t8 = 0x3f;
    0x0040274c addiu v0, fp, 0x2c                    |     v0 = fp + 0x2c;
    0x00402750 move a0, v0                           |     a0 = v0;
    0x00402754 move a1, t8                           |     a1 = t8;
    0x00402758 lw t8, -0x7fdc(gp)                    |     t8 = *((gp - 8183));
                                                     |     /* str.sniff__s */
    0x0040275c addiu a2, t8, -0x59bc                 |     a2 = t8 + -0x59bc;
    0x00402760 lw a3, 0x24(fp)                       |     a3 = *(arg_24h);
    0x00402764 lw t8, -0x7e90(gp)                    |     t8 = sym.imp.snprintf;
    0x00402768 move t9, t8                           |     t9 = t8;
    0x0040276c jalr t9                               |     t9 ();
    0x00402770 nop                                   |     
    0x00402774 lw gp, 0x10(fp)                       |     gp = *(arg_10h);
    0x00402778 sw zero, 0x20(fp)                     |     *(arg_20h) = 0;
    0x0040277c b 0x402888                            |     goto label_2;
    0x00402780 nop                                   |     
                                                     |     do {
    0x00402784 addiu t8, fp, 0x2c                    |         t8 = fp + 0x2c;
    0x00402788 move a0, t8                           |         a0 = t8;
    0x0040278c lw t8, -0x7fdc(gp)                    |         t8 = *((gp - 8183));
    0x00402790 addiu a1, t8, -0x59b0                 |         a1 = t8 + -0x59b0;
    0x00402794 lw t8, -0x7f48(gp)                    |         t8 = sym.imp.popen
    0x00402798 move t9, t8                           |         t9 = t8;
    0x0040279c jalr t9                               |         t9 ();
    0x004027a0 nop                                   |         
    0x004027a4 lw gp, 0x10(fp)                       |         gp = *(arg_10h);
    0x004027a8 move t8, v0                           |         t8 = v0;
    0x004027ac sw t8, 0x28(fp)                       |         *(arg_28h) = t8;
    0x004027b0 addiu t8, fp, 0x6c                    |         t8 = fp + 0x6c;
    0x004027b4 move a0, t8                           |         a0 = t8;
    0x004027b8 addiu a1, zero, 0x40                  |         a1 = 0x40;
    0x004027bc lw a2, 0x28(fp)                       |         a2 = *(arg_28h);
    0x004027c0 lw t8, -0x7ee8(gp)                    |         t8 = sym.imp.fgets;
    0x004027c4 move t9, t8                           |         t9 = t8;
    0x004027c8 jalr t9                               |         t9 ();
    0x004027cc nop                                   |         
    0x004027d0 lw gp, 0x10(fp)                       |         gp = *(arg_10h);
    0x004027d4 lw a0, 0x28(fp)                       |         a0 = *(arg_28h);
    0x004027d8 lw t8, -0x7eac(gp)                    |         t8 = sym.imp.pclose;
    0x004027dc move t9, t8                           |         t9 = t8;
    0x004027e0 jalr t9                               |         t9 ();
    0x004027e4 nop                                   |         
    0x004027e8 lw gp, 0x10(fp)                       |         gp = *(arg_10h);
    0x004027ec addiu t8, fp, 0x6c                    |         t8 = fp + 0x6c;
    0x004027f0 move a0, t8                           |         a0 = t8;
    0x004027f4 lw t8, -0x7fdc(gp)                    |         t8 = *((gp - 8183));
                                                     |         /* esilref: 'on' */
    0x004027f8 addiu a1, t8, -0x59ac                 |         a1 = t8 + -0x59ac;
    0x004027fc addiu a2, zero, 2                     |         a2 = 2;
    0x00402800 lw t8, -0x7e7c(gp)                    |         t8 = sym.imp.strncmp;
    0x00402804 move t9, t8                           |         t9 = t8;
    0x00402808 jalr t9                               |         t9 ();
    0x0040280c nop                                   |         
    0x00402810 lw gp, 0x10(fp)                       |         gp = *(arg_10h);
    0x00402814 move t8, v0                           |         t8 = v0;
                                                     |         if (t8 == 0) {
    0x00402818 bnez t8, 0x402844                     |             
    0x0040281c nop                                   |             
    0x00402820 lw t8, -0x7fdc(gp)                    |             t8 = *((gp - 8183));
                                                     |             /* str.button_is_pushed__ok */
    0x00402824 addiu a0, t8, -0x59a8                 |             a0 = t8 + -0x59a8;
    0x00402828 lw t8, -0x7f4c(gp)                    |             t8 = sym.imp.puts;
    0x0040282c move t9, t8                           |             t9 = t8;
    0x00402830 jalr t9                               |             t9 ();
    0x00402834 nop                                   |             
    0x00402838 lw gp, 0x10(fp)                       |             gp = *(arg_10h);
    0x0040283c b 0x4028b4                            |             goto label_0;
    0x00402840 nop                                   |             
                                                     |         }
    0x00402844 lw t8, -0x7fdc(gp)                    |         t8 = *((gp - 8183));
                                                     |         /* str.button_is_free */
    0x00402848 addiu a0, t8, -0x5990                 |         a0 = t8 + -0x5990;
    0x0040284c lw t8, -0x7f4c(gp)                    |         t8 = sym.imp.puts;
    0x00402850 move t9, t8                           |         t9 = t8;
    0x00402854 jalr t9                               |         t9 ();
    0x00402858 nop                                   |         
    0x0040285c lw gp, 0x10(fp)                       |         gp = *(arg_10h);
    0x00402860 lui t8, 7                             |         t8 = 70000;
    0x00402864 ori a0, t8, 0xa120                    |         a0 = 0x7a120;
    0x00402868 lw t8, -0x7e64(gp)                    |         t8 = sym.imp.usleep;
    0x0040286c move t9, t8                           |         t9 = t8;
    0x00402870 jalr t9                               |         t9 ();
    0x00402874 nop                                   |         
    0x00402878 lw gp, 0x10(fp)                       |         gp = *(arg_10h);
    0x0040287c lw t8, 0x20(fp)                       |         t8 = *(arg_20h);
    0x00402880 addiu t8, t8, 1                       |         t8++;
    0x00402884 sw t8, 0x20(fp)                       |         *(arg_20h) = t8;
                                                     | label_2:
    0x00402888 lw t8, 0x20(fp)                       |         t8 = *(arg_20h);
    0x0040288c slti t8, t8, 0x14                     |         t8 = (t8 < 0x14) ? 1 : 0;
    0x00402890 bnez t8, 0x402784                     |         
                                                     |     } while (t8 != 0);
    0x00402894 nop                                   |     
    0x00402898 lw t8, -0x7fdc(gp)                    |     t8 = *((gp - 8183));
                                                     |     /* esilref: 'failed' */
    0x0040289c addiu a0, t8, -0x5980                 |     a0 = t8 + -0x5980;
    0x004028a0 lw t8, -0x7f4c(gp)                    |     t8 = sym.imp.puts;
    0x004028a4 move t9, t8                           |     t9 = t8;
    0x004028a8 jalr t9                               |     t9 ();
    0x004028ac nop                                   |     
    0x004028b0 lw gp, 0x10(fp)                       |     gp = *(arg_10h);
                                                     | label_0:
    0x004028b4 lw t8, -0x7e58(gp)                    |     t8 = *((gp - 8086));
    0x004028b8 lw v0, 0xac(fp)                       |     v0 = *(arg_ach);
    0x004028bc lw t8, (t8)                           |     t8 = *(t8);
                                                     |     if (v0 != t8) {
    0x004028c0 beq v0, t8, 0x4028d8                  |         
    0x004028c4 nop                                   |         
    0x004028c8 lw t8, -0x7ebc(gp)                    |         t8 = sym.imp.__stack_chk_fail;
    0x004028cc move t9, t8                           |         t9 = t8;
    0x004028d0 jalr t9                               |         t9 ();
    0x004028d4 nop                                   |         
                                                     |     }
    0x004028d8 move sp, fp                           |     
    0x004028dc lw ra, 0xb4(sp)                       |     ra = *(var_b4h);
    0x004028e0 lw fp, 0xb0(sp)                       |     fp = *(var_b0h);
    0x004028e4 addiu sp, sp, 0xb8                    |     
    0x004028e8 jr ra                                 |     return v0;
    0x004028ec nop                                   |     
                                                     | }
    ; assembly                               | /* r2dec pseudo code output */
                                             | /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/bin/mfgbox @ 0x409544 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) sym.TestGPIO_int_ ()             | void TestGPIO_int_ () {
                                             |     /* TestGPIO(int) */
    0x00409544 lui gp, 2                     |     
    0x00409548 addiu gp, gp, -0x44f4         |     
    0x0040954c addu gp, gp, t9               |     gp += t9;
    0x00409550 addiu sp, sp, -0x1258         |     
    0x00409554 sw ra, 0x1254(sp)             |     *(var_1254h) = ra;
    0x00409558 sw fp, 0x1250(sp)             |     *(var_1250h) = fp;
    0x0040955c sw s0, 0x124c(sp)             |     *(var_124ch) = s0;
    0x00409560 move fp, sp                   |     fp = sp;
    0x00409564 sw gp, 0x10(sp)               |     *(var_10h) = gp;
    0x00409568 sw a0, 0x1c(fp)               |     *(arg_1ch) = a0;
    0x0040956c lw t8, -0x7e58(gp)            |     t8 = *((gp - 8086));
    0x00409570 lw t8, (t8)                   |     t8 = *(t8);
    0x00409574 sw t8, 0x1244(fp)             |     *(arg_1244h) = t8;
    0x00409578 addiu t8, fp, 0x2c            |     t8 = fp + 0x2c;
    0x0040957c move a0, t8                   |     a0 = t8;
    0x00409580 lw t8, -0x7f80(gp)            |     t8 = *(gp);
    0x00409584 move t9, t8                   |     t9 = t8;
    0x00409588 jalr t9                       |     t9 ();
    0x0040958c nop                           |     
    0x00409590 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00409594 lw v0, 0x1c(fp)               |     v0 = *(arg_1ch);
    0x00409598 addiu t8, zero, 1             |     t8 = 1;
                                             |     if (v0 != t8) {
    0x0040959c beq v0, t8, 0x4095c8          |         
    0x004095a0 nop                           |         
    0x004095a4 lw t8, -0x7fdc(gp)            |         t8 = *((gp - 8183));
                                             |         /* aav.0x004094c0 */
    0x004095a8 addiu t8, t8, -0x6b40         |         t8 += -0x6b40;
    0x004095ac move t9, t8                   |         t9 = t8;
    0x004095b0 jalr t9                       |         t9 ();
    0x004095b4 nop                           |         
    0x004095b8 lw gp, 0x10(fp)               |         gp = *(arg_10h);
    0x004095bc move s0, zero                 |         s0 = 0;
    0x004095c0 b 0x4099cc                    |         goto label_0;
    0x004095c4 nop                           |         
                                             |     }
    0x004095c8 addiu t8, fp, 0x2c            |     t8 = fp + 0x2c;
    0x004095cc move a0, t8                   |     a0 = t8;
    0x004095d0 lw t8, -0x7fdc(gp)            |     t8 = *((gp - 8183));
                                             |     /* str.GPIO */
    0x004095d4 addiu a1, t8, -0x4c4c         |     a1 = t8 + -0x4c4c;
    0x004095d8 move a2, zero                 |     a2 = 0;
    0x004095dc lw t8, -0x7f1c(gp)            |     t8 = *(gp);
    0x004095e0 move t9, t8                   |     t9 = t8;
    0x004095e4 jalr t9                       |     t9 ();
    0x004095e8 nop                           |     
    0x004095ec lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x004095f0 addiu t8, fp, 0x2c            |     t8 = fp + 0x2c;
    0x004095f4 move a0, t8                   |     a0 = t8;
    0x004095f8 lw t8, -0x7fdc(gp)            |     t8 = *((gp - 8183));
                                             |     /* str.OUT1 */
    0x004095fc addiu a1, t8, -0x4c44         |     a1 = t8 + -0x4c44;
    0x00409600 lw t8, -0x7eb8(gp)            |     t8 = *(gp);
    0x00409604 move t9, t8                   |     t9 = t8;
    0x00409608 jalr t9                       |     t9 ();
    0x0040960c nop                           |     
    0x00409610 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00409614 move t8, v0                   |     t8 = v0;
    0x00409618 sw t8, 0x20(fp)               |     *(arg_20h) = t8;
    0x0040961c addiu t8, fp, 0x2c            |     t8 = fp + 0x2c;
    0x00409620 move a0, t8                   |     a0 = t8;
    0x00409624 lw t8, -0x7fdc(gp)            |     t8 = *((gp - 8183));
                                             |     /* str.OUT1 */
    0x00409628 addiu a1, t8, -0x4c44         |     a1 = t8 + -0x4c44;
    0x0040962c addiu a2, zero, 1             |     a2 = 1;
    0x00409630 lw t8, -0x7edc(gp)            |     t8 = *(gp);
    0x00409634 move t9, t8                   |     t9 = t8;
    0x00409638 jalr t9                       |     t9 ();
    0x0040963c nop                           |     
    0x00409640 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00409644 lw t8, -0x7fdc(gp)            |     t8 = *((gp - 8183));
                                             |     /* str._etc_rc.d_init.d_watchDog.sh_reload____dev_null_2___dev_null */
    0x00409648 addiu a0, t8, -0x4c3c         |     a0 = t8 + -0x4c3c;
    0x0040964c lw t8, -0x7e5c(gp)            |     t8 = sym.imp.system;
    0x00409650 move t9, t8                   |     t9 = t8;
    0x00409654 jalr t9                       |     t9 ();
    0x00409658 nop                           |     
    0x0040965c lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00409660 lw t8, -0x7fdc(gp)            |     t8 = *((gp - 8183));
                                             |     /* str.light_out1_on__sniff_out1 */
    0x00409664 addiu a0, t8, -0x4bfc         |     a0 = t8 + -0x4bfc;
    0x00409668 lw t8, -0x7fdc(gp)            |     t8 = *((gp - 8183));
    0x0040966c addiu a1, t8, -0x4be0         |     a1 = t8 + -0x4be0;
    0x00409670 lw t8, -0x7f48(gp)            |     t8 = sym.imp.popen
    0x00409674 move t9, t8                   |     t9 = t8;
    0x00409678 jalr t9                       |     t9 ();
    0x0040967c nop                           |     
    0x00409680 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00409684 move t8, v0                   |     t8 = v0;
    0x00409688 sw t8, 0x24(fp)               |     *(arg_24h) = t8;
    0x0040968c addiu t8, fp, 0x1044          |     t8 = fp + 0x1044;
    0x00409690 move a0, t8                   |     a0 = t8;
    0x00409694 addiu a1, zero, 0x80          |     a1 = 0x80;
    0x00409698 lw a2, 0x24(fp)               |     a2 = *(arg_24h);
    0x0040969c lw t8, -0x7ee8(gp)            |     t8 = sym.imp.fgets;
    0x004096a0 move t9, t8                   |     t9 = t8;
    0x004096a4 jalr t9                       |     t9 ();
    0x004096a8 nop                           |     
    0x004096ac lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x004096b0 lw a0, 0x24(fp)               |     a0 = *(arg_24h);
    0x004096b4 lw t8, -0x7eac(gp)            |     t8 = sym.imp.pclose;
    0x004096b8 move t9, t8                   |     t9 = t8;
    0x004096bc jalr t9                       |     t9 ();
    0x004096c0 nop                           |     
    0x004096c4 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x004096c8 addiu t8, fp, 0x1044          |     t8 = fp + 0x1044;
    0x004096cc move a0, t8                   |     a0 = t8;
    0x004096d0 lw t8, -0x7fdc(gp)            |     t8 = *((gp - 8183));
                                             |     /* esilref: 'on' */
    0x004096d4 addiu a1, t8, -0x4bdc         |     a1 = t8 + -0x4bdc;
    0x004096d8 lw t8, -0x7f24(gp)            |     t8 = sym.imp.strstr;
    0x004096dc move t9, t8                   |     t9 = t8;
    0x004096e0 jalr t9                       |     t9 ();
    0x004096e4 nop                           |     
    0x004096e8 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x004096ec move t8, v0                   |     t8 = v0;
                                             |     if (t8 == 0) {
    0x004096f0 bnez t8, 0x409720             |         
    0x004096f4 nop                           |         
    0x004096f8 lw t8, -0x7fdc(gp)            |         t8 = *((gp - 8183));
                                             |         /* str.failed */
    0x004096fc addiu a0, t8, -0x4bd8         |         a0 = t8 + -0x4bd8;
    0x00409700 lw t8, -0x7f4c(gp)            |         t8 = sym.imp.puts;
    0x00409704 move t9, t8                   |         t9 = t8;
    0x00409708 jalr t9                       |         t9 ();
    0x0040970c nop                           |         
    0x00409710 lw gp, 0x10(fp)               |         gp = *(arg_10h);
    0x00409714 move s0, zero                 |         s0 = 0;
    0x00409718 b 0x4099cc                    |         goto label_0;
    0x0040971c nop                           |         
                                             |     }
    0x00409720 lw t8, -0x7fdc(gp)            |     t8 = *((gp - 8183));
                                             |     /* str.sniff_in1 */
    0x00409724 addiu a0, t8, -0x4bd0         |     a0 = t8 + -0x4bd0;
    0x00409728 lw t8, -0x7fdc(gp)            |     t8 = *((gp - 8183));
    0x0040972c addiu a1, t8, -0x4be0         |     a1 = t8 + -0x4be0;
    0x00409730 lw t8, -0x7f48(gp)            |     t8 = sym.imp.popen
    0x00409734 move t9, t8                   |     t9 = t8;
    0x00409738 jalr t9                       |     t9 ();
    0x0040973c nop                           |     
    0x00409740 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00409744 move t8, v0                   |     t8 = v0;
    0x00409748 sw t8, 0x24(fp)               |     *(arg_24h) = t8;
    0x0040974c addiu t8, fp, 0x10c4          |     t8 = fp + 0x10c4;
    0x00409750 move a0, t8                   |     a0 = t8;
    0x00409754 addiu a1, zero, 0x80          |     a1 = 0x80;
    0x00409758 lw a2, 0x24(fp)               |     a2 = *(arg_24h);
    0x0040975c lw t8, -0x7ee8(gp)            |     t8 = sym.imp.fgets;
    0x00409760 move t9, t8                   |     t9 = t8;
    0x00409764 jalr t9                       |     t9 ();
    0x00409768 nop                           |     
    0x0040976c lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00409770 lw a0, 0x24(fp)               |     a0 = *(arg_24h);
    0x00409774 lw t8, -0x7eac(gp)            |     t8 = sym.imp.pclose;
    0x00409778 move t9, t8                   |     t9 = t8;
    0x0040977c jalr t9                       |     t9 ();
    0x00409780 nop                           |     
    0x00409784 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00409788 addiu t8, fp, 0x10c4          |     t8 = fp + 0x10c4;
    0x0040978c move a0, t8                   |     a0 = t8;
    0x00409790 lw t8, -0x7fdc(gp)            |     t8 = *((gp - 8183));
                                             |     /* esilref: 'on' */
    0x00409794 addiu a1, t8, -0x4bdc         |     a1 = t8 + -0x4bdc;
    0x00409798 lw t8, -0x7f24(gp)            |     t8 = sym.imp.strstr;
    0x0040979c move t9, t8                   |     t9 = t8;
    0x004097a0 jalr t9                       |     t9 ();
    0x004097a4 nop                           |     
    0x004097a8 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x004097ac move t8, v0                   |     t8 = v0;
                                             |     if (t8 == 0) {
    0x004097b0 bnez t8, 0x4097e0             |         
    0x004097b4 nop                           |         
    0x004097b8 lw t8, -0x7fdc(gp)            |         t8 = *((gp - 8183));
                                             |         /* str.failed */
    0x004097bc addiu a0, t8, -0x4bd8         |         a0 = t8 + -0x4bd8;
    0x004097c0 lw t8, -0x7f4c(gp)            |         t8 = sym.imp.puts;
    0x004097c4 move t9, t8                   |         t9 = t8;
    0x004097c8 jalr t9                       |         t9 ();
    0x004097cc nop                           |         
    0x004097d0 lw gp, 0x10(fp)               |         gp = *(arg_10h);
    0x004097d4 move s0, zero                 |         s0 = 0;
    0x004097d8 b 0x4099cc                    |         goto label_0;
    0x004097dc nop                           |         
                                             |     }
    0x004097e0 lw t8, -0x7fdc(gp)            |     t8 = *((gp - 8183));
                                             |     /* str.light_out1_off__sniff_out1 */
    0x004097e4 addiu a0, t8, -0x4bc4         |     a0 = t8 + -0x4bc4;
    0x004097e8 lw t8, -0x7fdc(gp)            |     t8 = *((gp - 8183));
    0x004097ec addiu a1, t8, -0x4be0         |     a1 = t8 + -0x4be0;
    0x004097f0 lw t8, -0x7f48(gp)            |     t8 = sym.imp.popen
    0x004097f4 move t9, t8                   |     t9 = t8;
    0x004097f8 jalr t9                       |     t9 ();
    0x004097fc nop                           |     
    0x00409800 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00409804 move t8, v0                   |     t8 = v0;
    0x00409808 sw t8, 0x24(fp)               |     *(arg_24h) = t8;
    0x0040980c addiu t8, fp, 0x1144          |     t8 = fp + 0x1144;
    0x00409810 move a0, t8                   |     a0 = t8;
    0x00409814 addiu a1, zero, 0x80          |     a1 = 0x80;
    0x00409818 lw a2, 0x24(fp)               |     a2 = *(arg_24h);
    0x0040981c lw t8, -0x7ee8(gp)            |     t8 = sym.imp.fgets;
    0x00409820 move t9, t8                   |     t9 = t8;
    0x00409824 jalr t9                       |     t9 ();
    0x00409828 nop                           |     
    0x0040982c lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00409830 lw a0, 0x24(fp)               |     a0 = *(arg_24h);
    0x00409834 lw t8, -0x7eac(gp)            |     t8 = sym.imp.pclose;
    0x00409838 move t9, t8                   |     t9 = t8;
    0x0040983c jalr t9                       |     t9 ();
    0x00409840 nop                           |     
    0x00409844 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00409848 addiu t8, fp, 0x1144          |     t8 = fp + 0x1144;
    0x0040984c move a0, t8                   |     a0 = t8;
    0x00409850 lw t8, -0x7fdc(gp)            |     t8 = *((gp - 8183));
                                             |     /* esilref: 'off' */
    0x00409854 addiu a1, t8, -0x4ba4         |     a1 = t8 + -0x4ba4;
    0x00409858 lw t8, -0x7f24(gp)            |     t8 = sym.imp.strstr;
    0x0040985c move t9, t8                   |     t9 = t8;
    0x00409860 jalr t9                       |     t9 ();
    0x00409864 nop                           |     
    0x00409868 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x0040986c move t8, v0                   |     t8 = v0;
                                             |     if (t8 == 0) {
    0x00409870 bnez t8, 0x4098a0             |         
    0x00409874 nop                           |         
    0x00409878 lw t8, -0x7fdc(gp)            |         t8 = *((gp - 8183));
                                             |         /* str.failed */
    0x0040987c addiu a0, t8, -0x4bd8         |         a0 = t8 + -0x4bd8;
    0x00409880 lw t8, -0x7f4c(gp)            |         t8 = sym.imp.puts;
    0x00409884 move t9, t8                   |         t9 = t8;
    0x00409888 jalr t9                       |         t9 ();
    0x0040988c nop                           |         
    0x00409890 lw gp, 0x10(fp)               |         gp = *(arg_10h);
    0x00409894 move s0, zero                 |         s0 = 0;
    0x00409898 b 0x4099cc                    |         goto label_0;
    0x0040989c nop                           |         
                                             |     }
    0x004098a0 lw t8, -0x7fdc(gp)            |     t8 = *((gp - 8183));
                                             |     /* str.sniff_in1 */
    0x004098a4 addiu a0, t8, -0x4bd0         |     a0 = t8 + -0x4bd0;
    0x004098a8 lw t8, -0x7fdc(gp)            |     t8 = *((gp - 8183));
    0x004098ac addiu a1, t8, -0x4be0         |     a1 = t8 + -0x4be0;
    0x004098b0 lw t8, -0x7f48(gp)            |     t8 = sym.imp.popen
    0x004098b4 move t9, t8                   |     t9 = t8;
    0x004098b8 jalr t9                       |     t9 ();
    0x004098bc nop                           |     
    0x004098c0 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x004098c4 move t8, v0                   |     t8 = v0;
    0x004098c8 sw t8, 0x24(fp)               |     *(arg_24h) = t8;
    0x004098cc addiu t8, fp, 0x11c4          |     t8 = fp + 0x11c4;
    0x004098d0 move a0, t8                   |     a0 = t8;
    0x004098d4 addiu a1, zero, 0x80          |     a1 = 0x80;
    0x004098d8 lw a2, 0x24(fp)               |     a2 = *(arg_24h);
    0x004098dc lw t8, -0x7ee8(gp)            |     t8 = sym.imp.fgets;
    0x004098e0 move t9, t8                   |     t9 = t8;
    0x004098e4 jalr t9                       |     t9 ();
    0x004098e8 nop                           |     
    0x004098ec lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x004098f0 lw a0, 0x24(fp)               |     a0 = *(arg_24h);
    0x004098f4 lw t8, -0x7eac(gp)            |     t8 = sym.imp.pclose;
    0x004098f8 move t9, t8                   |     t9 = t8;
    0x004098fc jalr t9                       |     t9 ();
    0x00409900 nop                           |     
    0x00409904 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00409908 addiu t8, fp, 0x11c4          |     t8 = fp + 0x11c4;
    0x0040990c move a0, t8                   |     a0 = t8;
    0x00409910 lw t8, -0x7fdc(gp)            |     t8 = *((gp - 8183));
                                             |     /* esilref: 'off' */
    0x00409914 addiu a1, t8, -0x4ba4         |     a1 = t8 + -0x4ba4;
    0x00409918 lw t8, -0x7f24(gp)            |     t8 = sym.imp.strstr;
    0x0040991c move t9, t8                   |     t9 = t8;
    0x00409920 jalr t9                       |     t9 ();
    0x00409924 nop                           |     
    0x00409928 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x0040992c move t8, v0                   |     t8 = v0;
                                             |     if (t8 == 0) {
    0x00409930 bnez t8, 0x409960             |         
    0x00409934 nop                           |         
    0x00409938 lw t8, -0x7fdc(gp)            |         t8 = *((gp - 8183));
                                             |         /* str.failed */
    0x0040993c addiu a0, t8, -0x4bd8         |         a0 = t8 + -0x4bd8;
    0x00409940 lw t8, -0x7f4c(gp)            |         t8 = sym.imp.puts;
    0x00409944 move t9, t8                   |         t9 = t8;
    0x00409948 jalr t9                       |         t9 ();
    0x0040994c nop                           |         
    0x00409950 lw gp, 0x10(fp)               |         gp = *(arg_10h);
    0x00409954 move s0, zero                 |         s0 = 0;
    0x00409958 b 0x4099cc                    |         goto label_0;
    0x0040995c nop                           |         
                                             |     }
    0x00409960 lw t8, 0x20(fp)               |     t8 = *(arg_20h);
    0x00409964 andi t8, t8, 0xff             |     t8 &= 0xff;
    0x00409968 addiu v0, fp, 0x2c            |     v0 = fp + 0x2c;
    0x0040996c move a0, v0                   |     a0 = v0;
    0x00409970 lw v0, -0x7fdc(gp)            |     v0 = *((gp - 8183));
                                             |     /* str.OUT1 */
    0x00409974 addiu a1, v0, -0x4c44         |     a1 = v0 + -0x4c44;
    0x00409978 move a2, t8                   |     a2 = t8;
    0x0040997c lw t8, -0x7edc(gp)            |     t8 = *(gp);
    0x00409980 move t9, t8                   |     t9 = t8;
    0x00409984 jalr t9                       |     t9 ();
    0x00409988 nop                           |     
    0x0040998c lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00409990 lw t8, -0x7fdc(gp)            |     t8 = *((gp - 8183));
                                             |     /* str._etc_rc.d_init.d_watchDog.sh_reload____dev_null_2___dev_null */
    0x00409994 addiu a0, t8, -0x4c3c         |     a0 = t8 + -0x4c3c;
    0x00409998 lw t8, -0x7e5c(gp)            |     t8 = sym.imp.system;
    0x0040999c move t9, t8                   |     t9 = t8;
    0x004099a0 jalr t9                       |     t9 ();
    0x004099a4 nop                           |     
    0x004099a8 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x004099ac lw t8, -0x7fdc(gp)            |     t8 = *((gp - 8183));
                                             |     /* esilref: 'ok' */
    0x004099b0 addiu a0, t8, -0x4ba0         |     a0 = t8 + -0x4ba0;
    0x004099b4 lw t8, -0x7f4c(gp)            |     t8 = sym.imp.puts;
    0x004099b8 move t9, t8                   |     t9 = t8;
    0x004099bc jalr t9                       |     t9 ();
    0x004099c0 nop                           |     
    0x004099c4 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x004099c8 addiu s0, zero, 1             |     s0 = 1;
                                             | label_0:
    0x004099cc addiu t8, fp, 0x2c            |     t8 = fp + 0x2c;
    0x004099d0 move a0, t8                   |     a0 = t8;
    0x004099d4 lw t8, -0x7f04(gp)            |     t8 = sym.imp.TinyDB::TinyDB__;
    0x004099d8 move t9, t8                   |     t9 = t8;
    0x004099dc jalr t9                       |     t9 ();
    0x004099e0 nop                           |     
    0x004099e4 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x004099e8 addiu t8, zero, 1             |     t8 = 1;
                                             |     if (s0 == t8) {
    0x004099ec bne s0, t8, 0x409b0c          |         
    0x004099f0 nop                           |         
    0x004099f4 nop                           |         
    0x004099f8 b 0x409b0c                    |         goto label_1;
    0x004099fc nop                           |         
                                             |     }
                                             | label_1:
    0x00409b0c lw t8, -0x7e58(gp)            |     t8 = *((gp - 8086));
    0x00409b10 lw v0, 0x1244(fp)             |     v0 = *(arg_1244h);
    0x00409b14 lw t8, (t8)                   |     t8 = *(t8);
                                             |     if (v0 != t8) {
    0x00409b18 beq v0, t8, 0x409b30          |         
    0x00409b1c nop                           |         
    0x00409b20 lw t8, -0x7ebc(gp)            |         t8 = sym.imp.__stack_chk_fail;
    0x00409b24 move t9, t8                   |         t9 = t8;
    0x00409b28 jalr t9                       |         t9 ();
    0x00409b2c nop                           |         
                                             |     }
    0x00409b30 move sp, fp                   |     
    0x00409b34 lw ra, 0x1254(sp)             |     ra = *(var_1254h);
    0x00409b38 lw fp, 0x1250(sp)             |     fp = *(var_1250h);
    0x00409b3c lw s0, 0x124c(sp)             |     s0 = *(var_124ch);
    0x00409b40 addiu sp, sp, 0x1258          |     
    0x00409b44 jr ra                         |     return v0;
    0x00409b48 nop                           |     
                                             | }
    ; assembly                                   | /* r2dec pseudo code output */
                                                 | /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/bin/mfgbox @ 0x4075dc */
                                                 | #include <stdint.h>
                                                 |  
    ; (fcn) sym.TestLAN_int__char_const_ ()      | void TestLAN_int_char_const_ () {
                                                 |     /* TestLAN(int, char const*) */
    0x004075dc lui gp, 2                         |     
    0x004075e0 addiu gp, gp, -0x258c             |     
    0x004075e4 addu gp, gp, t9                   |     gp += t9;
    0x004075e8 addiu sp, sp, -0x438              |     
    0x004075ec sw ra, 0x434(sp)                  |     *(var_434h) = ra;
    0x004075f0 sw fp, 0x430(sp)                  |     *(var_430h) = fp;
    0x004075f4 move fp, sp                       |     fp = sp;
    0x004075f8 sw gp, 0x10(sp)                   |     *(var_10h) = gp;
    0x004075fc sw a0, 0x1c(fp)                   |     *(arg_1ch) = a0;
    0x00407600 sw a1, 0x18(fp)                   |     *(arg_18h) = a1;
    0x00407604 lw t8, -0x7e58(gp)                |     t8 = *((gp - 8086));
    0x00407608 lw t8, (t8)                       |     t8 = *(t8);
    0x0040760c sw t8, 0x42c(fp)                  |     *(arg_42ch) = t8;
    0x00407610 lw v0, 0x1c(fp)                   |     v0 = *(arg_1ch);
    0x00407614 addiu t8, zero, 2                 |     t8 = 2;
                                                 |     if (v0 != t8) {
    0x00407618 beq v0, t8, 0x407640              |         
    0x0040761c nop                               |         
    0x00407620 lw t8, -0x7f8c(gp)                |         t8 = *(gp);
                                                 |         /* aav.0x004072a0 */
    0x00407624 addiu t8, t8, 0x72a0              |         t8 += 0x72a0;
    0x00407628 move t9, t8                       |         t9 = t8;
    0x0040762c jalr t9                           |         t9 ();
    0x00407630 nop                               |         
    0x00407634 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407638 b 0x408280                        |         goto label_0;
    0x0040763c nop                               |         
                                                 |     }
    0x00407640 lw t8, -0x7fdc(gp)                |     t8 = *((gp - 8183));
                                                 |     /* str._etc_rc.d_init.d_ifplugd_stop____dev_null_2___dev_null */
    0x00407644 addiu a0, t8, -0x515c             |     a0 = t8 + -0x515c;
    0x00407648 lw t8, -0x7e5c(gp)                |     t8 = sym.imp.system;
    0x0040764c move t9, t8                       |     t9 = t8;
    0x00407650 jalr t9                           |     t9 ();
    0x00407654 nop                               |     
    0x00407658 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x0040765c lw a0, 0x18(fp)                   |     a0 = *(arg_18h);
    0x00407660 lw t8, -0x7fdc(gp)                |     t8 = *((gp - 8183));
                                                 |     /* str.10baseT_HD */
    0x00407664 addiu a1, t8, -0x5124             |     a1 = t8 + -0x5124;
    0x00407668 lw t8, -0x7f2c(gp)                |     t8 = sym.imp.strcmp;
    0x0040766c move t9, t8                       |     t9 = t8;
    0x00407670 jalr t9                           |     t9 ();
    0x00407674 nop                               |     
    0x00407678 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x0040767c move t8, v0                       |     t8 = v0;
                                                 |     if (t8 == 0) {
    0x00407680 bnez t8, 0x407734                 |         
    0x00407684 nop                               |         
    0x00407688 addiu t8, fp, 0x2c                |         t8 = fp + 0x2c;
    0x0040768c lw a0, 0x18(fp)                   |         a0 = *(arg_18h);
    0x00407690 move a1, t8                       |         a1 = t8;
    0x00407694 lw t8, -0x7f64(gp)                |         t8 = sym.test_char_const__char_;
    0x00407698 move t9, t8                       |         t9 = t8;
    0x0040769c jalr t9                           |         t9 ();
    0x004076a0 nop                               |         
    0x004076a4 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x004076a8 lw t8, -0x7f60(gp)                |         t8 = sym.restart_auto__;
    0x004076ac move t9, t8                       |         t9 = t8;
    0x004076b0 jalr t9                           |         t9 ();
    0x004076b4 nop                               |         
    0x004076b8 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x004076bc addiu t8, fp, 0x2c                |         t8 = fp + 0x2c;
    0x004076c0 move a0, t8                       |         a0 = t8;
    0x004076c4 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.eth0:_10_Mbit__half_duplex__link_ok_n */
    0x004076c8 addiu a1, t8, -0x5118             |         a1 = t8 + -0x5118;
    0x004076cc lw t8, -0x7f2c(gp)                |         t8 = sym.imp.strcmp;
    0x004076d0 move t9, t8                       |         t9 = t8;
    0x004076d4 jalr t9                           |         t9 ();
    0x004076d8 nop                               |         
    0x004076dc lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x004076e0 move t8, v0                       |         t8 = v0;
                                                 |         if (t8 == 0) {
    0x004076e4 bnez t8, 0x407710                 |             
    0x004076e8 nop                               |             
    0x004076ec lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* esilref: 'ok' */
    0x004076f0 addiu a0, t8, -0x50f0             |             a0 = t8 + -0x50f0;
    0x004076f4 lw t8, -0x7f4c(gp)                |             t8 = sym.imp.puts;
    0x004076f8 move t9, t8                       |             t9 = t8;
    0x004076fc jalr t9                           |             t9 ();
    0x00407700 nop                               |             
    0x00407704 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00407708 b 0x408280                        |             goto label_0;
    0x0040770c nop                               |             
                                                 |         }
    0x00407710 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* esilref: 'failed' */
    0x00407714 addiu a0, t8, -0x50ec             |         a0 = t8 + -0x50ec;
    0x00407718 lw t8, -0x7f4c(gp)                |         t8 = sym.imp.puts;
    0x0040771c move t9, t8                       |         t9 = t8;
    0x00407720 jalr t9                           |         t9 ();
    0x00407724 nop                               |         
    0x00407728 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x0040772c b 0x408280                        |         goto label_0;
    0x00407730 nop                               |         
                                                 |     }
    0x00407734 lw a0, 0x18(fp)                   |     a0 = *(arg_18h);
    0x00407738 lw t8, -0x7fdc(gp)                |     t8 = *((gp - 8183));
                                                 |     /* str.10baseT_FD */
    0x0040773c addiu a1, t8, -0x50e4             |     a1 = t8 + -0x50e4;
    0x00407740 lw t8, -0x7f2c(gp)                |     t8 = sym.imp.strcmp;
    0x00407744 move t9, t8                       |     t9 = t8;
    0x00407748 jalr t9                           |     t9 ();
    0x0040774c nop                               |     
    0x00407750 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00407754 move t8, v0                       |     t8 = v0;
                                                 |     if (t8 == 0) {
    0x00407758 bnez t8, 0x40780c                 |         
    0x0040775c nop                               |         
    0x00407760 addiu t8, fp, 0x2c                |         t8 = fp + 0x2c;
    0x00407764 lw a0, 0x18(fp)                   |         a0 = *(arg_18h);
    0x00407768 move a1, t8                       |         a1 = t8;
    0x0040776c lw t8, -0x7f64(gp)                |         t8 = sym.test_char_const__char_;
    0x00407770 move t9, t8                       |         t9 = t8;
    0x00407774 jalr t9                           |         t9 ();
    0x00407778 nop                               |         
    0x0040777c lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407780 lw t8, -0x7f60(gp)                |         t8 = sym.restart_auto__;
    0x00407784 move t9, t8                       |         t9 = t8;
    0x00407788 jalr t9                           |         t9 ();
    0x0040778c nop                               |         
    0x00407790 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407794 addiu t8, fp, 0x2c                |         t8 = fp + 0x2c;
    0x00407798 move a0, t8                       |         a0 = t8;
    0x0040779c lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.eth0:_10_Mbit__full_duplex__link_ok_n */
    0x004077a0 addiu a1, t8, -0x50d8             |         a1 = t8 + -0x50d8;
    0x004077a4 lw t8, -0x7f2c(gp)                |         t8 = sym.imp.strcmp;
    0x004077a8 move t9, t8                       |         t9 = t8;
    0x004077ac jalr t9                           |         t9 ();
    0x004077b0 nop                               |         
    0x004077b4 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x004077b8 move t8, v0                       |         t8 = v0;
                                                 |         if (t8 == 0) {
    0x004077bc bnez t8, 0x4077e8                 |             
    0x004077c0 nop                               |             
    0x004077c4 lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* esilref: 'ok' */
    0x004077c8 addiu a0, t8, -0x50f0             |             a0 = t8 + -0x50f0;
    0x004077cc lw t8, -0x7f4c(gp)                |             t8 = sym.imp.puts;
    0x004077d0 move t9, t8                       |             t9 = t8;
    0x004077d4 jalr t9                           |             t9 ();
    0x004077d8 nop                               |             
    0x004077dc lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x004077e0 b 0x408280                        |             goto label_0;
    0x004077e4 nop                               |             
                                                 |         }
    0x004077e8 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* esilref: 'failed' */
    0x004077ec addiu a0, t8, -0x50ec             |         a0 = t8 + -0x50ec;
    0x004077f0 lw t8, -0x7f4c(gp)                |         t8 = sym.imp.puts;
    0x004077f4 move t9, t8                       |         t9 = t8;
    0x004077f8 jalr t9                           |         t9 ();
    0x004077fc nop                               |         
    0x00407800 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407804 b 0x408280                        |         goto label_0;
    0x00407808 nop                               |         
                                                 |     }
    0x0040780c lw a0, 0x18(fp)                   |     a0 = *(arg_18h);
    0x00407810 lw t8, -0x7fdc(gp)                |     t8 = *((gp - 8183));
                                                 |     /* str.100baseTx_HD */
    0x00407814 addiu a1, t8, -0x50b0             |     a1 = t8 + -0x50b0;
    0x00407818 lw t8, -0x7f2c(gp)                |     t8 = sym.imp.strcmp;
    0x0040781c move t9, t8                       |     t9 = t8;
    0x00407820 jalr t9                           |     t9 ();
    0x00407824 nop                               |     
    0x00407828 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x0040782c move t8, v0                       |     t8 = v0;
                                                 |     if (t8 == 0) {
    0x00407830 bnez t8, 0x4078e4                 |         
    0x00407834 nop                               |         
    0x00407838 addiu t8, fp, 0x2c                |         t8 = fp + 0x2c;
    0x0040783c lw a0, 0x18(fp)                   |         a0 = *(arg_18h);
    0x00407840 move a1, t8                       |         a1 = t8;
    0x00407844 lw t8, -0x7f64(gp)                |         t8 = sym.test_char_const__char_;
    0x00407848 move t9, t8                       |         t9 = t8;
    0x0040784c jalr t9                           |         t9 ();
    0x00407850 nop                               |         
    0x00407854 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407858 lw t8, -0x7f60(gp)                |         t8 = sym.restart_auto__;
    0x0040785c move t9, t8                       |         t9 = t8;
    0x00407860 jalr t9                           |         t9 ();
    0x00407864 nop                               |         
    0x00407868 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x0040786c addiu t8, fp, 0x2c                |         t8 = fp + 0x2c;
    0x00407870 move a0, t8                       |         a0 = t8;
    0x00407874 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.eth0:_100_Mbit__half_duplex__link_ok_n */
    0x00407878 addiu a1, t8, -0x50a0             |         a1 = t8 + -0x50a0;
    0x0040787c lw t8, -0x7f2c(gp)                |         t8 = sym.imp.strcmp;
    0x00407880 move t9, t8                       |         t9 = t8;
    0x00407884 jalr t9                           |         t9 ();
    0x00407888 nop                               |         
    0x0040788c lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407890 move t8, v0                       |         t8 = v0;
                                                 |         if (t8 == 0) {
    0x00407894 bnez t8, 0x4078c0                 |             
    0x00407898 nop                               |             
    0x0040789c lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* esilref: 'ok' */
    0x004078a0 addiu a0, t8, -0x50f0             |             a0 = t8 + -0x50f0;
    0x004078a4 lw t8, -0x7f4c(gp)                |             t8 = sym.imp.puts;
    0x004078a8 move t9, t8                       |             t9 = t8;
    0x004078ac jalr t9                           |             t9 ();
    0x004078b0 nop                               |             
    0x004078b4 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x004078b8 b 0x408280                        |             goto label_0;
    0x004078bc nop                               |             
                                                 |         }
    0x004078c0 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* esilref: 'failed' */
    0x004078c4 addiu a0, t8, -0x50ec             |         a0 = t8 + -0x50ec;
    0x004078c8 lw t8, -0x7f4c(gp)                |         t8 = sym.imp.puts;
    0x004078cc move t9, t8                       |         t9 = t8;
    0x004078d0 jalr t9                           |         t9 ();
    0x004078d4 nop                               |         
    0x004078d8 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x004078dc b 0x408280                        |         goto label_0;
    0x004078e0 nop                               |         
                                                 |     }
    0x004078e4 lw a0, 0x18(fp)                   |     a0 = *(arg_18h);
    0x004078e8 lw t8, -0x7fdc(gp)                |     t8 = *((gp - 8183));
                                                 |     /* str.100baseTx_FD */
    0x004078ec addiu a1, t8, -0x5078             |     a1 = t8 + -0x5078;
    0x004078f0 lw t8, -0x7f2c(gp)                |     t8 = sym.imp.strcmp;
    0x004078f4 move t9, t8                       |     t9 = t8;
    0x004078f8 jalr t9                           |     t9 ();
    0x004078fc nop                               |     
    0x00407900 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00407904 move t8, v0                       |     t8 = v0;
                                                 |     if (t8 == 0) {
    0x00407908 bnez t8, 0x4079bc                 |         
    0x0040790c nop                               |         
    0x00407910 addiu t8, fp, 0x2c                |         t8 = fp + 0x2c;
    0x00407914 lw a0, 0x18(fp)                   |         a0 = *(arg_18h);
    0x00407918 move a1, t8                       |         a1 = t8;
    0x0040791c lw t8, -0x7f64(gp)                |         t8 = sym.test_char_const__char_;
    0x00407920 move t9, t8                       |         t9 = t8;
    0x00407924 jalr t9                           |         t9 ();
    0x00407928 nop                               |         
    0x0040792c lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407930 lw t8, -0x7f60(gp)                |         t8 = sym.restart_auto__;
    0x00407934 move t9, t8                       |         t9 = t8;
    0x00407938 jalr t9                           |         t9 ();
    0x0040793c nop                               |         
    0x00407940 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407944 addiu t8, fp, 0x2c                |         t8 = fp + 0x2c;
    0x00407948 move a0, t8                       |         a0 = t8;
    0x0040794c lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.eth0:_100_Mbit__full_duplex__link_ok_n */
    0x00407950 addiu a1, t8, -0x5068             |         a1 = t8 + -0x5068;
    0x00407954 lw t8, -0x7f2c(gp)                |         t8 = sym.imp.strcmp;
    0x00407958 move t9, t8                       |         t9 = t8;
    0x0040795c jalr t9                           |         t9 ();
    0x00407960 nop                               |         
    0x00407964 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407968 move t8, v0                       |         t8 = v0;
                                                 |         if (t8 == 0) {
    0x0040796c bnez t8, 0x407998                 |             
    0x00407970 nop                               |             
    0x00407974 lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* esilref: 'ok' */
    0x00407978 addiu a0, t8, -0x50f0             |             a0 = t8 + -0x50f0;
    0x0040797c lw t8, -0x7f4c(gp)                |             t8 = sym.imp.puts;
    0x00407980 move t9, t8                       |             t9 = t8;
    0x00407984 jalr t9                           |             t9 ();
    0x00407988 nop                               |             
    0x0040798c lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00407990 b 0x408280                        |             goto label_0;
    0x00407994 nop                               |             
                                                 |         }
    0x00407998 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* esilref: 'failed' */
    0x0040799c addiu a0, t8, -0x50ec             |         a0 = t8 + -0x50ec;
    0x004079a0 lw t8, -0x7f4c(gp)                |         t8 = sym.imp.puts;
    0x004079a4 move t9, t8                       |         t9 = t8;
    0x004079a8 jalr t9                           |         t9 ();
    0x004079ac nop                               |         
    0x004079b0 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x004079b4 b 0x408280                        |         goto label_0;
    0x004079b8 nop                               |         
                                                 |     }
    0x004079bc lw a0, 0x18(fp)                   |     a0 = *(arg_18h);
    0x004079c0 lw t8, -0x7fdc(gp)                |     t8 = *((gp - 8183));
                                                 |     /* str.1000baseTx_HD */
    0x004079c4 addiu a1, t8, -0x5040             |     a1 = t8 + -0x5040;
    0x004079c8 lw t8, -0x7f2c(gp)                |     t8 = sym.imp.strcmp;
    0x004079cc move t9, t8                       |     t9 = t8;
    0x004079d0 jalr t9                           |     t9 ();
    0x004079d4 nop                               |     
    0x004079d8 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x004079dc move t8, v0                       |     t8 = v0;
                                                 |     if (t8 == 0) {
    0x004079e0 bnez t8, 0x407a94                 |         
    0x004079e4 nop                               |         
    0x004079e8 addiu t8, fp, 0x2c                |         t8 = fp + 0x2c;
    0x004079ec lw a0, 0x18(fp)                   |         a0 = *(arg_18h);
    0x004079f0 move a1, t8                       |         a1 = t8;
    0x004079f4 lw t8, -0x7f64(gp)                |         t8 = sym.test_char_const__char_;
    0x004079f8 move t9, t8                       |         t9 = t8;
    0x004079fc jalr t9                           |         t9 ();
    0x00407a00 nop                               |         
    0x00407a04 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407a08 lw t8, -0x7f60(gp)                |         t8 = sym.restart_auto__;
    0x00407a0c move t9, t8                       |         t9 = t8;
    0x00407a10 jalr t9                           |         t9 ();
    0x00407a14 nop                               |         
    0x00407a18 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407a1c addiu t8, fp, 0x2c                |         t8 = fp + 0x2c;
    0x00407a20 move a0, t8                       |         a0 = t8;
    0x00407a24 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.eth0:_1_Gbit__half_duplex__link_ok_n */
    0x00407a28 addiu a1, t8, -0x5030             |         a1 = t8 + -0x5030;
    0x00407a2c lw t8, -0x7f2c(gp)                |         t8 = sym.imp.strcmp;
    0x00407a30 move t9, t8                       |         t9 = t8;
    0x00407a34 jalr t9                           |         t9 ();
    0x00407a38 nop                               |         
    0x00407a3c lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407a40 move t8, v0                       |         t8 = v0;
                                                 |         if (t8 == 0) {
    0x00407a44 bnez t8, 0x407a70                 |             
    0x00407a48 nop                               |             
    0x00407a4c lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* esilref: 'ok' */
    0x00407a50 addiu a0, t8, -0x50f0             |             a0 = t8 + -0x50f0;
    0x00407a54 lw t8, -0x7f4c(gp)                |             t8 = sym.imp.puts;
    0x00407a58 move t9, t8                       |             t9 = t8;
    0x00407a5c jalr t9                           |             t9 ();
    0x00407a60 nop                               |             
    0x00407a64 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00407a68 b 0x408280                        |             goto label_0;
    0x00407a6c nop                               |             
                                                 |         }
    0x00407a70 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* esilref: 'failed' */
    0x00407a74 addiu a0, t8, -0x50ec             |         a0 = t8 + -0x50ec;
    0x00407a78 lw t8, -0x7f4c(gp)                |         t8 = sym.imp.puts;
    0x00407a7c move t9, t8                       |         t9 = t8;
    0x00407a80 jalr t9                           |         t9 ();
    0x00407a84 nop                               |         
    0x00407a88 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407a8c b 0x408280                        |         goto label_0;
    0x00407a90 nop                               |         
                                                 |     }
    0x00407a94 lw a0, 0x18(fp)                   |     a0 = *(arg_18h);
    0x00407a98 lw t8, -0x7fdc(gp)                |     t8 = *((gp - 8183));
                                                 |     /* str.1000baseTx_FD */
    0x00407a9c addiu a1, t8, -0x500c             |     a1 = t8 + -0x500c;
    0x00407aa0 lw t8, -0x7f2c(gp)                |     t8 = sym.imp.strcmp;
    0x00407aa4 move t9, t8                       |     t9 = t8;
    0x00407aa8 jalr t9                           |     t9 ();
    0x00407aac nop                               |     
    0x00407ab0 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00407ab4 move t8, v0                       |     t8 = v0;
                                                 |     if (t8 == 0) {
    0x00407ab8 bnez t8, 0x407b6c                 |         
    0x00407abc nop                               |         
    0x00407ac0 addiu t8, fp, 0x2c                |         t8 = fp + 0x2c;
    0x00407ac4 lw a0, 0x18(fp)                   |         a0 = *(arg_18h);
    0x00407ac8 move a1, t8                       |         a1 = t8;
    0x00407acc lw t8, -0x7f64(gp)                |         t8 = sym.test_char_const__char_;
    0x00407ad0 move t9, t8                       |         t9 = t8;
    0x00407ad4 jalr t9                           |         t9 ();
    0x00407ad8 nop                               |         
    0x00407adc lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407ae0 lw t8, -0x7f60(gp)                |         t8 = sym.restart_auto__;
    0x00407ae4 move t9, t8                       |         t9 = t8;
    0x00407ae8 jalr t9                           |         t9 ();
    0x00407aec nop                               |         
    0x00407af0 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407af4 addiu t8, fp, 0x2c                |         t8 = fp + 0x2c;
    0x00407af8 move a0, t8                       |         a0 = t8;
    0x00407afc lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.eth0:_1_Gbit__full_duplex__link_ok_n */
    0x00407b00 addiu a1, t8, -0x4ffc             |         a1 = t8 + -0x4ffc;
    0x00407b04 lw t8, -0x7f2c(gp)                |         t8 = sym.imp.strcmp;
    0x00407b08 move t9, t8                       |         t9 = t8;
    0x00407b0c jalr t9                           |         t9 ();
    0x00407b10 nop                               |         
    0x00407b14 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407b18 move t8, v0                       |         t8 = v0;
                                                 |         if (t8 == 0) {
    0x00407b1c bnez t8, 0x407b48                 |             
    0x00407b20 nop                               |             
    0x00407b24 lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* esilref: 'ok' */
    0x00407b28 addiu a0, t8, -0x50f0             |             a0 = t8 + -0x50f0;
    0x00407b2c lw t8, -0x7f4c(gp)                |             t8 = sym.imp.puts;
    0x00407b30 move t9, t8                       |             t9 = t8;
    0x00407b34 jalr t9                           |             t9 ();
    0x00407b38 nop                               |             
    0x00407b3c lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00407b40 b 0x408280                        |             goto label_0;
    0x00407b44 nop                               |             
                                                 |         }
    0x00407b48 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* esilref: 'failed' */
    0x00407b4c addiu a0, t8, -0x50ec             |         a0 = t8 + -0x50ec;
    0x00407b50 lw t8, -0x7f4c(gp)                |         t8 = sym.imp.puts;
    0x00407b54 move t9, t8                       |         t9 = t8;
    0x00407b58 jalr t9                           |         t9 ();
    0x00407b5c nop                               |         
    0x00407b60 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407b64 b 0x408280                        |         goto label_0;
    0x00407b68 nop                               |         
                                                 |     }
    0x00407b6c lw a0, 0x18(fp)                   |     a0 = *(arg_18h);
    0x00407b70 lw t8, -0x7fdc(gp)                |     t8 = *((gp - 8183));
                                                 |     /* str.auto */
    0x00407b74 addiu a1, t8, -0x4fd8             |     a1 = t8 + -0x4fd8;
    0x00407b78 lw t8, -0x7f2c(gp)                |     t8 = sym.imp.strcmp;
    0x00407b7c move t9, t8                       |     t9 = t8;
    0x00407b80 jalr t9                           |     t9 ();
    0x00407b84 nop                               |     
    0x00407b88 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00407b8c move t8, v0                       |     t8 = v0;
                                                 |     if (t8 == 0) {
    0x00407b90 bnez t8, 0x407d14                 |         
    0x00407b94 nop                               |         
    0x00407b98 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str._etc_rc.d_init.d_ifplugd_stop____dev_null_2___dev_null */
    0x00407b9c addiu a0, t8, -0x515c             |         a0 = t8 + -0x515c;
    0x00407ba0 lw t8, -0x7e5c(gp)                |         t8 = sym.imp.system;
    0x00407ba4 move t9, t8                       |         t9 = t8;
    0x00407ba8 jalr t9                           |         t9 ();
    0x00407bac nop                               |         
    0x00407bb0 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407bb4 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.mii_tool__r____dev_null_2___dev_null */
    0x00407bb8 addiu a0, t8, -0x51bc             |         a0 = t8 + -0x51bc;
    0x00407bbc lw t8, -0x7e5c(gp)                |         t8 = sym.imp.system;
    0x00407bc0 move t9, t8                       |         t9 = t8;
    0x00407bc4 jalr t9                           |         t9 ();
    0x00407bc8 nop                               |         
    0x00407bcc lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407bd0 addiu a0, zero, 3                 |         a0 = 3;
    0x00407bd4 lw t8, -0x7e70(gp)                |         t8 = sym.imp.sleep;
    0x00407bd8 move t9, t8                       |         t9 = t8;
    0x00407bdc jalr t9                           |         t9 ();
    0x00407be0 nop                               |         
    0x00407be4 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407be8 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.mii_tool_eth0 */
    0x00407bec addiu a0, t8, -0x51d8             |         a0 = t8 + -0x51d8;
    0x00407bf0 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
    0x00407bf4 addiu a1, t8, -0x51c8             |         a1 = t8 + -0x51c8;
    0x00407bf8 lw t8, -0x7f48(gp)                |         t8 = sym.imp.popen
    0x00407bfc move t9, t8                       |         t9 = t8;
    0x00407c00 jalr t9                           |         t9 ();
    0x00407c04 nop                               |         
    0x00407c08 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407c0c move t8, v0                       |         t8 = v0;
    0x00407c10 sw t8, 0x20(fp)                   |         *(arg_20h) = t8;
    0x00407c14 addiu t8, fp, 0x2c                |         t8 = fp + 0x2c;
    0x00407c18 move a0, t8                       |         a0 = t8;
    0x00407c1c addiu a1, zero, 0x200             |         a1 = 0x200;
    0x00407c20 lw a2, 0x20(fp)                   |         a2 = *(arg_20h);
    0x00407c24 lw t8, -0x7ee8(gp)                |         t8 = sym.imp.fgets;
    0x00407c28 move t9, t8                       |         t9 = t8;
    0x00407c2c jalr t9                           |         t9 ();
    0x00407c30 nop                               |         
    0x00407c34 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407c38 lw a0, 0x20(fp)                   |         a0 = *(arg_20h);
    0x00407c3c lw t8, -0x7eac(gp)                |         t8 = sym.imp.pclose;
    0x00407c40 move t9, t8                       |         t9 = t8;
    0x00407c44 jalr t9                           |         t9 ();
    0x00407c48 nop                               |         
    0x00407c4c lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407c50 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str._etc_rc.d_init.d_ifplugd_start____dev_null_2___dev_null */
    0x00407c54 addiu a0, t8, -0x5194             |         a0 = t8 + -0x5194;
    0x00407c58 lw t8, -0x7e5c(gp)                |         t8 = sym.imp.system;
    0x00407c5c move t9, t8                       |         t9 = t8;
    0x00407c60 jalr t9                           |         t9 ();
    0x00407c64 nop                               |         
    0x00407c68 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407c6c addiu t8, fp, 0x2c                |         t8 = fp + 0x2c;
    0x00407c70 move a0, t8                       |         a0 = t8;
    0x00407c74 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.negotiated */
    0x00407c78 addiu a1, t8, -0x4fd0             |         a1 = t8 + -0x4fd0;
    0x00407c7c lw t8, -0x7f24(gp)                |         t8 = sym.imp.strstr;
    0x00407c80 move t9, t8                       |         t9 = t8;
    0x00407c84 jalr t9                           |         t9 ();
    0x00407c88 nop                               |         
    0x00407c8c lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407c90 move t8, v0                       |         t8 = v0;
                                                 |         if (t8 != 0) {
    0x00407c94 beqz t8, 0x407cf0                 |             
    0x00407c98 nop                               |             
    0x00407c9c addiu t8, fp, 0x2c                |             t8 = fp + 0x2c;
    0x00407ca0 move a0, t8                       |             a0 = t8;
    0x00407ca4 lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* str.link_ok */
    0x00407ca8 addiu a1, t8, -0x51c4             |             a1 = t8 + -0x51c4;
    0x00407cac lw t8, -0x7f24(gp)                |             t8 = sym.imp.strstr;
    0x00407cb0 move t9, t8                       |             t9 = t8;
    0x00407cb4 jalr t9                           |             t9 ();
    0x00407cb8 nop                               |             
    0x00407cbc lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00407cc0 move t8, v0                       |             t8 = v0;
                                                 |             if (t8 == 0) {
    0x00407cc4 beqz t8, 0x407cf0                 |                 goto label_1;
                                                 |             }
    0x00407cc8 nop                               |             
    0x00407ccc lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* esilref: 'ok' */
    0x00407cd0 addiu a0, t8, -0x50f0             |             a0 = t8 + -0x50f0;
    0x00407cd4 lw t8, -0x7f4c(gp)                |             t8 = sym.imp.puts;
    0x00407cd8 move t9, t8                       |             t9 = t8;
    0x00407cdc jalr t9                           |             t9 ();
    0x00407ce0 nop                               |             
    0x00407ce4 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00407ce8 b 0x408280                        |             goto label_0;
    0x00407cec nop                               |             
                                                 |         }
                                                 | label_1:
    0x00407cf0 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* esilref: 'failed' */
    0x00407cf4 addiu a0, t8, -0x50ec             |         a0 = t8 + -0x50ec;
    0x00407cf8 lw t8, -0x7f4c(gp)                |         t8 = sym.imp.puts;
    0x00407cfc move t9, t8                       |         t9 = t8;
    0x00407d00 jalr t9                           |         t9 ();
    0x00407d04 nop                               |         
    0x00407d08 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407d0c b 0x408280                        |         goto label_0;
    0x00407d10 nop                               |         
                                                 |     }
    0x00407d14 lw a0, 0x18(fp)                   |     a0 = *(arg_18h);
    0x00407d18 lw t8, -0x7fdc(gp)                |     t8 = *((gp - 8183));
                                                 |     /* esilref: 'all' */
    0x00407d1c addiu a1, t8, -0x4fc4             |     a1 = t8 + -0x4fc4;
    0x00407d20 lw t8, -0x7f2c(gp)                |     t8 = sym.imp.strcmp;
    0x00407d24 move t9, t8                       |     t9 = t8;
    0x00407d28 jalr t9                           |     t9 ();
    0x00407d2c nop                               |     
    0x00407d30 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00407d34 move t8, v0                       |     t8 = v0;
                                                 |     if (t8 == 0) {
    0x00407d38 bnez t8, 0x408260                 |         
    0x00407d3c nop                               |         
    0x00407d40 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.mii_tool__v */
    0x00407d44 addiu a0, t8, -0x4fc0             |         a0 = t8 + -0x4fc0;
    0x00407d48 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
    0x00407d4c addiu a1, t8, -0x51c8             |         a1 = t8 + -0x51c8;
    0x00407d50 lw t8, -0x7f48(gp)                |         t8 = sym.imp.popen
    0x00407d54 move t9, t8                       |         t9 = t8;
    0x00407d58 jalr t9                           |         t9 ();
    0x00407d5c nop                               |         
    0x00407d60 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407d64 move t8, v0                       |         t8 = v0;
    0x00407d68 sw t8, 0x24(fp)                   |         *(arg_24h) = t8;
    0x00407d6c addiu t8, fp, 0x22c               |         t8 = fp + 0x22c;
    0x00407d70 move a0, t8                       |         a0 = t8;
    0x00407d74 addiu a1, zero, 0x200             |         a1 = 0x200;
    0x00407d78 addiu a2, zero, 1                 |         a2 = 1;
    0x00407d7c lw a3, 0x24(fp)                   |         a3 = *(arg_24h);
    0x00407d80 lw t8, -0x7eb4(gp)                |         t8 = sym.imp.fread;
    0x00407d84 move t9, t8                       |         t9 = t8;
    0x00407d88 jalr t9                           |         t9 ();
    0x00407d8c nop                               |         
    0x00407d90 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407d94 lw a0, 0x24(fp)                   |         a0 = *(arg_24h);
    0x00407d98 lw t8, -0x7eac(gp)                |         t8 = sym.imp.pclose;
    0x00407d9c move t9, t8                       |         t9 = t8;
    0x00407da0 jalr t9                           |         t9 ();
    0x00407da4 nop                               |         
    0x00407da8 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407dac addiu t8, fp, 0x22c               |         t8 = fp + 0x22c;
    0x00407db0 move a0, t8                       |         a0 = t8;
    0x00407db4 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.capabilities */
    0x00407db8 addiu a1, t8, -0x4fb4             |         a1 = t8 + -0x4fb4;
    0x00407dbc lw t8, -0x7f24(gp)                |         t8 = sym.imp.strstr;
    0x00407dc0 move t9, t8                       |         t9 = t8;
    0x00407dc4 jalr t9                           |         t9 ();
    0x00407dc8 nop                               |         
    0x00407dcc lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407dd0 sw v0, 0x28(fp)                   |         *(arg_28h) = v0;
    0x00407dd4 lw a0, 0x28(fp)                   |         a0 = *(arg_28h);
    0x00407dd8 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.10baseT_HD */
    0x00407ddc addiu a1, t8, -0x5124             |         a1 = t8 + -0x5124;
    0x00407de0 lw t8, -0x7f24(gp)                |         t8 = sym.imp.strstr;
    0x00407de4 move t9, t8                       |         t9 = t8;
    0x00407de8 jalr t9                           |         t9 ();
    0x00407dec nop                               |         
    0x00407df0 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407df4 move t8, v0                       |         t8 = v0;
                                                 |         if (t8 != 0) {
    0x00407df8 beqz t8, 0x407e8c                 |             
    0x00407dfc nop                               |             
    0x00407e00 addiu t8, fp, 0x2c                |             t8 = fp + 0x2c;
    0x00407e04 lw v0, -0x7fdc(gp)                |             v0 = *((gp - 8183));
                                                 |             /* str.10baseT_HD */
    0x00407e08 addiu a0, v0, -0x5124             |             a0 = v0 + -0x5124;
    0x00407e0c move a1, t8                       |             a1 = t8;
    0x00407e10 lw t8, -0x7f64(gp)                |             t8 = sym.test_char_const__char_;
    0x00407e14 move t9, t8                       |             t9 = t8;
    0x00407e18 jalr t9                           |             t9 ();
    0x00407e1c nop                               |             
    0x00407e20 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00407e24 addiu t8, fp, 0x2c                |             t8 = fp + 0x2c;
    0x00407e28 move a0, t8                       |             a0 = t8;
    0x00407e2c lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* str.eth0:_10_Mbit__half_duplex__link_ok_n */
    0x00407e30 addiu a1, t8, -0x5118             |             a1 = t8 + -0x5118;
    0x00407e34 lw t8, -0x7f2c(gp)                |             t8 = sym.imp.strcmp;
    0x00407e38 move t9, t8                       |             t9 = t8;
    0x00407e3c jalr t9                           |             t9 ();
    0x00407e40 nop                               |             
    0x00407e44 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00407e48 move t8, v0                       |             t8 = v0;
                                                 |             if (t8 == 0) {
    0x00407e4c beqz t8, 0x407e8c                 |                 goto label_2;
                                                 |             }
    0x00407e50 nop                               |             
    0x00407e54 lw t8, -0x7f60(gp)                |             t8 = sym.restart_auto__;
    0x00407e58 move t9, t8                       |             t9 = t8;
    0x00407e5c jalr t9                           |             t9 ();
    0x00407e60 nop                               |             
    0x00407e64 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00407e68 lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* esilref: 'failed' */
    0x00407e6c addiu a0, t8, -0x50ec             |             a0 = t8 + -0x50ec;
    0x00407e70 lw t8, -0x7f4c(gp)                |             t8 = sym.imp.puts;
    0x00407e74 move t9, t8                       |             t9 = t8;
    0x00407e78 jalr t9                           |             t9 ();
    0x00407e7c nop                               |             
    0x00407e80 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00407e84 b 0x408280                        |             goto label_0;
    0x00407e88 nop                               |             
                                                 |         }
                                                 | label_2:
    0x00407e8c lw a0, 0x28(fp)                   |         a0 = *(arg_28h);
    0x00407e90 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.10baseT_FD */
    0x00407e94 addiu a1, t8, -0x50e4             |         a1 = t8 + -0x50e4;
    0x00407e98 lw t8, -0x7f24(gp)                |         t8 = sym.imp.strstr;
    0x00407e9c move t9, t8                       |         t9 = t8;
    0x00407ea0 jalr t9                           |         t9 ();
    0x00407ea4 nop                               |         
    0x00407ea8 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407eac move t8, v0                       |         t8 = v0;
                                                 |         if (t8 != 0) {
    0x00407eb0 beqz t8, 0x407f44                 |             
    0x00407eb4 nop                               |             
    0x00407eb8 addiu t8, fp, 0x2c                |             t8 = fp + 0x2c;
    0x00407ebc lw v0, -0x7fdc(gp)                |             v0 = *((gp - 8183));
                                                 |             /* str.10baseT_FD */
    0x00407ec0 addiu a0, v0, -0x50e4             |             a0 = v0 + -0x50e4;
    0x00407ec4 move a1, t8                       |             a1 = t8;
    0x00407ec8 lw t8, -0x7f64(gp)                |             t8 = sym.test_char_const__char_;
    0x00407ecc move t9, t8                       |             t9 = t8;
    0x00407ed0 jalr t9                           |             t9 ();
    0x00407ed4 nop                               |             
    0x00407ed8 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00407edc addiu t8, fp, 0x2c                |             t8 = fp + 0x2c;
    0x00407ee0 move a0, t8                       |             a0 = t8;
    0x00407ee4 lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* str.eth0:_10_Mbit__full_duplex__link_ok_n */
    0x00407ee8 addiu a1, t8, -0x50d8             |             a1 = t8 + -0x50d8;
    0x00407eec lw t8, -0x7f2c(gp)                |             t8 = sym.imp.strcmp;
    0x00407ef0 move t9, t8                       |             t9 = t8;
    0x00407ef4 jalr t9                           |             t9 ();
    0x00407ef8 nop                               |             
    0x00407efc lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00407f00 move t8, v0                       |             t8 = v0;
                                                 |             if (t8 == 0) {
    0x00407f04 beqz t8, 0x407f44                 |                 goto label_3;
                                                 |             }
    0x00407f08 nop                               |             
    0x00407f0c lw t8, -0x7f60(gp)                |             t8 = sym.restart_auto__;
    0x00407f10 move t9, t8                       |             t9 = t8;
    0x00407f14 jalr t9                           |             t9 ();
    0x00407f18 nop                               |             
    0x00407f1c lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00407f20 lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* esilref: 'failed' */
    0x00407f24 addiu a0, t8, -0x50ec             |             a0 = t8 + -0x50ec;
    0x00407f28 lw t8, -0x7f4c(gp)                |             t8 = sym.imp.puts;
    0x00407f2c move t9, t8                       |             t9 = t8;
    0x00407f30 jalr t9                           |             t9 ();
    0x00407f34 nop                               |             
    0x00407f38 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00407f3c b 0x408280                        |             goto label_0;
    0x00407f40 nop                               |             
                                                 |         }
                                                 | label_3:
    0x00407f44 lw a0, 0x28(fp)                   |         a0 = *(arg_28h);
    0x00407f48 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.100baseTx_HD */
    0x00407f4c addiu a1, t8, -0x50b0             |         a1 = t8 + -0x50b0;
    0x00407f50 lw t8, -0x7f24(gp)                |         t8 = sym.imp.strstr;
    0x00407f54 move t9, t8                       |         t9 = t8;
    0x00407f58 jalr t9                           |         t9 ();
    0x00407f5c nop                               |         
    0x00407f60 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407f64 move t8, v0                       |         t8 = v0;
                                                 |         if (t8 != 0) {
    0x00407f68 beqz t8, 0x407ffc                 |             
    0x00407f6c nop                               |             
    0x00407f70 addiu t8, fp, 0x2c                |             t8 = fp + 0x2c;
    0x00407f74 lw v0, -0x7fdc(gp)                |             v0 = *((gp - 8183));
                                                 |             /* str.100baseTx_HD */
    0x00407f78 addiu a0, v0, -0x50b0             |             a0 = v0 + -0x50b0;
    0x00407f7c move a1, t8                       |             a1 = t8;
    0x00407f80 lw t8, -0x7f64(gp)                |             t8 = sym.test_char_const__char_;
    0x00407f84 move t9, t8                       |             t9 = t8;
    0x00407f88 jalr t9                           |             t9 ();
    0x00407f8c nop                               |             
    0x00407f90 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00407f94 addiu t8, fp, 0x2c                |             t8 = fp + 0x2c;
    0x00407f98 move a0, t8                       |             a0 = t8;
    0x00407f9c lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* str.eth0:_100_Mbit__half_duplex__link_ok_n */
    0x00407fa0 addiu a1, t8, -0x50a0             |             a1 = t8 + -0x50a0;
    0x00407fa4 lw t8, -0x7f2c(gp)                |             t8 = sym.imp.strcmp;
    0x00407fa8 move t9, t8                       |             t9 = t8;
    0x00407fac jalr t9                           |             t9 ();
    0x00407fb0 nop                               |             
    0x00407fb4 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00407fb8 move t8, v0                       |             t8 = v0;
                                                 |             if (t8 == 0) {
    0x00407fbc beqz t8, 0x407ffc                 |                 goto label_4;
                                                 |             }
    0x00407fc0 nop                               |             
    0x00407fc4 lw t8, -0x7f60(gp)                |             t8 = sym.restart_auto__;
    0x00407fc8 move t9, t8                       |             t9 = t8;
    0x00407fcc jalr t9                           |             t9 ();
    0x00407fd0 nop                               |             
    0x00407fd4 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00407fd8 lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* esilref: 'failed' */
    0x00407fdc addiu a0, t8, -0x50ec             |             a0 = t8 + -0x50ec;
    0x00407fe0 lw t8, -0x7f4c(gp)                |             t8 = sym.imp.puts;
    0x00407fe4 move t9, t8                       |             t9 = t8;
    0x00407fe8 jalr t9                           |             t9 ();
    0x00407fec nop                               |             
    0x00407ff0 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00407ff4 b 0x408280                        |             goto label_0;
    0x00407ff8 nop                               |             
                                                 |         }
                                                 | label_4:
    0x00407ffc lw a0, 0x28(fp)                   |         a0 = *(arg_28h);
    0x00408000 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.100baseTx_FD */
    0x00408004 addiu a1, t8, -0x5078             |         a1 = t8 + -0x5078;
    0x00408008 lw t8, -0x7f24(gp)                |         t8 = sym.imp.strstr;
    0x0040800c move t9, t8                       |         t9 = t8;
    0x00408010 jalr t9                           |         t9 ();
    0x00408014 nop                               |         
    0x00408018 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x0040801c move t8, v0                       |         t8 = v0;
                                                 |         if (t8 != 0) {
    0x00408020 beqz t8, 0x4080b4                 |             
    0x00408024 nop                               |             
    0x00408028 addiu t8, fp, 0x2c                |             t8 = fp + 0x2c;
    0x0040802c lw v0, -0x7fdc(gp)                |             v0 = *((gp - 8183));
                                                 |             /* str.100baseTx_FD */
    0x00408030 addiu a0, v0, -0x5078             |             a0 = v0 + -0x5078;
    0x00408034 move a1, t8                       |             a1 = t8;
    0x00408038 lw t8, -0x7f64(gp)                |             t8 = sym.test_char_const__char_;
    0x0040803c move t9, t8                       |             t9 = t8;
    0x00408040 jalr t9                           |             t9 ();
    0x00408044 nop                               |             
    0x00408048 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x0040804c addiu t8, fp, 0x2c                |             t8 = fp + 0x2c;
    0x00408050 move a0, t8                       |             a0 = t8;
    0x00408054 lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* str.eth0:_100_Mbit__full_duplex__link_ok_n */
    0x00408058 addiu a1, t8, -0x5068             |             a1 = t8 + -0x5068;
    0x0040805c lw t8, -0x7f2c(gp)                |             t8 = sym.imp.strcmp;
    0x00408060 move t9, t8                       |             t9 = t8;
    0x00408064 jalr t9                           |             t9 ();
    0x00408068 nop                               |             
    0x0040806c lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00408070 move t8, v0                       |             t8 = v0;
                                                 |             if (t8 == 0) {
    0x00408074 beqz t8, 0x4080b4                 |                 goto label_5;
                                                 |             }
    0x00408078 nop                               |             
    0x0040807c lw t8, -0x7f60(gp)                |             t8 = sym.restart_auto__;
    0x00408080 move t9, t8                       |             t9 = t8;
    0x00408084 jalr t9                           |             t9 ();
    0x00408088 nop                               |             
    0x0040808c lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00408090 lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* esilref: 'failed' */
    0x00408094 addiu a0, t8, -0x50ec             |             a0 = t8 + -0x50ec;
    0x00408098 lw t8, -0x7f4c(gp)                |             t8 = sym.imp.puts;
    0x0040809c move t9, t8                       |             t9 = t8;
    0x004080a0 jalr t9                           |             t9 ();
    0x004080a4 nop                               |             
    0x004080a8 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x004080ac b 0x408280                        |             goto label_0;
    0x004080b0 nop                               |             
                                                 |         }
                                                 | label_5:
    0x004080b4 lw a0, 0x28(fp)                   |         a0 = *(arg_28h);
    0x004080b8 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.1000baseTx_HD */
    0x004080bc addiu a1, t8, -0x5040             |         a1 = t8 + -0x5040;
    0x004080c0 lw t8, -0x7f24(gp)                |         t8 = sym.imp.strstr;
    0x004080c4 move t9, t8                       |         t9 = t8;
    0x004080c8 jalr t9                           |         t9 ();
    0x004080cc nop                               |         
    0x004080d0 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x004080d4 move t8, v0                       |         t8 = v0;
                                                 |         if (t8 != 0) {
    0x004080d8 beqz t8, 0x40816c                 |             
    0x004080dc nop                               |             
    0x004080e0 addiu t8, fp, 0x2c                |             t8 = fp + 0x2c;
    0x004080e4 lw v0, -0x7fdc(gp)                |             v0 = *((gp - 8183));
                                                 |             /* str.1000baseTx_HD */
    0x004080e8 addiu a0, v0, -0x5040             |             a0 = v0 + -0x5040;
    0x004080ec move a1, t8                       |             a1 = t8;
    0x004080f0 lw t8, -0x7f64(gp)                |             t8 = sym.test_char_const__char_;
    0x004080f4 move t9, t8                       |             t9 = t8;
    0x004080f8 jalr t9                           |             t9 ();
    0x004080fc nop                               |             
    0x00408100 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00408104 addiu t8, fp, 0x2c                |             t8 = fp + 0x2c;
    0x00408108 move a0, t8                       |             a0 = t8;
    0x0040810c lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* str.eth0:_1_Gbit__half_duplex__link_ok_n */
    0x00408110 addiu a1, t8, -0x5030             |             a1 = t8 + -0x5030;
    0x00408114 lw t8, -0x7f2c(gp)                |             t8 = sym.imp.strcmp;
    0x00408118 move t9, t8                       |             t9 = t8;
    0x0040811c jalr t9                           |             t9 ();
    0x00408120 nop                               |             
    0x00408124 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00408128 move t8, v0                       |             t8 = v0;
                                                 |             if (t8 == 0) {
    0x0040812c beqz t8, 0x40816c                 |                 goto label_6;
                                                 |             }
    0x00408130 nop                               |             
    0x00408134 lw t8, -0x7f60(gp)                |             t8 = sym.restart_auto__;
    0x00408138 move t9, t8                       |             t9 = t8;
    0x0040813c jalr t9                           |             t9 ();
    0x00408140 nop                               |             
    0x00408144 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00408148 lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* esilref: 'failed' */
    0x0040814c addiu a0, t8, -0x50ec             |             a0 = t8 + -0x50ec;
    0x00408150 lw t8, -0x7f4c(gp)                |             t8 = sym.imp.puts;
    0x00408154 move t9, t8                       |             t9 = t8;
    0x00408158 jalr t9                           |             t9 ();
    0x0040815c nop                               |             
    0x00408160 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00408164 b 0x408280                        |             goto label_0;
    0x00408168 nop                               |             
                                                 |         }
                                                 | label_6:
    0x0040816c lw a0, 0x28(fp)                   |         a0 = *(arg_28h);
    0x00408170 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.1000baseTx_FD */
    0x00408174 addiu a1, t8, -0x500c             |         a1 = t8 + -0x500c;
    0x00408178 lw t8, -0x7f24(gp)                |         t8 = sym.imp.strstr;
    0x0040817c move t9, t8                       |         t9 = t8;
    0x00408180 jalr t9                           |         t9 ();
    0x00408184 nop                               |         
    0x00408188 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x0040818c move t8, v0                       |         t8 = v0;
                                                 |         if (t8 != 0) {
    0x00408190 beqz t8, 0x408228                 |             
    0x00408194 nop                               |             
    0x00408198 addiu t8, fp, 0x2c                |             t8 = fp + 0x2c;
    0x0040819c lw v0, -0x7fdc(gp)                |             v0 = *((gp - 8183));
                                                 |             /* str.1000baseTx_FD */
    0x004081a0 addiu a0, v0, -0x500c             |             a0 = v0 + -0x500c;
    0x004081a4 move a1, t8                       |             a1 = t8;
    0x004081a8 lw t8, -0x7f64(gp)                |             t8 = sym.test_char_const__char_;
    0x004081ac move t9, t8                       |             t9 = t8;
    0x004081b0 jalr t9                           |             t9 ();
    0x004081b4 nop                               |             
    0x004081b8 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x004081bc addiu t8, fp, 0x2c                |             t8 = fp + 0x2c;
    0x004081c0 move a0, t8                       |             a0 = t8;
    0x004081c4 lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* str.eth0:_1_Gbit__full_duplex__link_ok_n */
    0x004081c8 addiu a1, t8, -0x4ffc             |             a1 = t8 + -0x4ffc;
    0x004081cc lw t8, -0x7f2c(gp)                |             t8 = sym.imp.strcmp;
    0x004081d0 move t9, t8                       |             t9 = t8;
    0x004081d4 jalr t9                           |             t9 ();
    0x004081d8 nop                               |             
    0x004081dc lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x004081e0 move t8, v0                       |             t8 = v0;
                                                 |             if (t8 == 0) {
    0x004081e4 beqz t8, 0x408228                 |                 goto label_7;
                                                 |             }
    0x004081e8 nop                               |             
    0x004081ec lw t8, -0x7f60(gp)                |             t8 = sym.restart_auto__;
    0x004081f0 move t9, t8                       |             t9 = t8;
    0x004081f4 jalr t9                           |             t9 ();
    0x004081f8 nop                               |             
    0x004081fc lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00408200 lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* esilref: 'failed' */
    0x00408204 addiu a0, t8, -0x50ec             |             a0 = t8 + -0x50ec;
    0x00408208 lw t8, -0x7f4c(gp)                |             t8 = sym.imp.puts;
    0x0040820c move t9, t8                       |             t9 = t8;
    0x00408210 jalr t9                           |             t9 ();
    0x00408214 nop                               |             
    0x00408218 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x0040821c nop                               |             
    0x00408220 b 0x408280                        |             goto label_0;
    0x00408224 nop                               |             
                                                 |         }
                                                 | label_7:
    0x00408228 lw t8, -0x7f60(gp)                |         t8 = sym.restart_auto__;
    0x0040822c move t9, t8                       |         t9 = t8;
    0x00408230 jalr t9                           |         t9 ();
    0x00408234 nop                               |         
    0x00408238 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x0040823c lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* esilref: 'ok' */
    0x00408240 addiu a0, t8, -0x50f0             |         a0 = t8 + -0x50f0;
    0x00408244 lw t8, -0x7f4c(gp)                |         t8 = sym.imp.puts;
    0x00408248 move t9, t8                       |         t9 = t8;
    0x0040824c jalr t9                           |         t9 ();
    0x00408250 nop                               |         
    0x00408254 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00408258 b 0x408280                        |         goto label_0;
    0x0040825c nop                               |         
                                                 |     }
    0x00408260 lw t8, -0x7f8c(gp)                |     t8 = *(gp);
                                                 |     /* aav.0x004072a0 */
    0x00408264 addiu t8, t8, 0x72a0              |     t8 += 0x72a0;
    0x00408268 move t9, t8                       |     t9 = t8;
    0x0040826c jalr t9                           |     t9 ();
    0x00408270 nop                               |     
    0x00408274 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00408278 b 0x408280                        |     goto label_0;
    0x0040827c nop                               |     
                                                 | label_0:
    0x00408280 lw t8, -0x7e58(gp)                |     t8 = *((gp - 8086));
    0x00408284 lw v0, 0x42c(fp)                  |     v0 = *(arg_42ch);
    0x00408288 lw t8, (t8)                       |     t8 = *(t8);
                                                 |     if (v0 != t8) {
    0x0040828c beq v0, t8, 0x4082a4              |         
    0x00408290 nop                               |         
    0x00408294 lw t8, -0x7ebc(gp)                |         t8 = sym.imp.__stack_chk_fail;
    0x00408298 move t9, t8                       |         t9 = t8;
    0x0040829c jalr t9                           |         t9 ();
    0x004082a0 nop                               |         
                                                 |     }
    0x004082a4 move sp, fp                       |     
    0x004082a8 lw ra, 0x434(sp)                  |     ra = *(var_434h);
    0x004082ac lw fp, 0x430(sp)                  |     fp = *(var_430h);
    0x004082b0 addiu sp, sp, 0x438               |     
    0x004082b4 jr ra                             |     return v0;
    0x004082b8 nop                               |     
                                                 | }
    ; assembly                                   | /* r2dec pseudo code output */
                                                 | /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/bin/mfgbox @ 0x405de4 */
                                                 | #include <stdint.h>
                                                 |  
    ; (fcn) sym.TestPIR_int__char_const_ ()      | void TestPIR_int_char_const_ () {
                                                 |     /* TestPIR(int, char const*) */
    0x00405de4 lui gp, 2                         |     
    0x00405de8 addiu gp, gp, -0xd94              |     
    0x00405dec addu gp, gp, t9                   |     gp += t9;
    0x00405df0 addiu sp, sp, -0x35b0             |     
    0x00405df4 sw ra, 0x35ac(sp)                 |     *(arg_35ach) = ra;
    0x00405df8 sw fp, 0x35a8(sp)                 |     *(arg_35a8h) = fp;
    0x00405dfc sw s0, 0x35a4(sp)                 |     *(arg_35a4h) = s0;
    0x00405e00 move fp, sp                       |     fp = sp;
    0x00405e04 sw gp, 0x10(sp)                   |     *(arg_10h) = gp;
    0x00405e08 sw a0, 0x1c(fp)                   |     *(arg_1ch) = a0;
    0x00405e0c sw a1, 0x18(fp)                   |     *(arg_18h) = a1;
    0x00405e10 lw t8, -0x7e58(gp)                |     t8 = *((gp - 8086));
    0x00405e14 lw t8, (t8)                       |     t8 = *(t8);
    0x00405e18 sw t8, 0x359c(fp)                 |     *(arg_359ch) = t8;
    0x00405e1c addiu t8, fp, 0x34                |     t8 = fp + 0x34;
    0x00405e20 move a0, t8                       |     a0 = t8;
    0x00405e24 lw t8, -0x7f84(gp)                |     t8 = *(gp);
    0x00405e28 move t9, t8                       |     t9 = t8;
    0x00405e2c jalr t9                           |     t9 ();
    0x00405e30 nop                               |     
    0x00405e34 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00405e38 sb zero, 0x27(fp)                 |     *(arg_27h) = 0;
    0x00405e3c lw v0, 0x1c(fp)                   |     v0 = *(arg_1ch);
    0x00405e40 addiu t8, zero, 2                 |     t8 = 2;
                                                 |     if (v0 == t8) {
    0x00405e44 bne v0, t8, 0x405e70              |         
    0x00405e48 nop                               |         
    0x00405e4c lw a0, 0x18(fp)                   |         a0 = *(arg_18h);
    0x00405e50 lw t8, -0x7f38(gp)                |         t8 = sym.imp.atoi;
    0x00405e54 move t9, t8                       |         t9 = t8;
    0x00405e58 jalr t9                           |         t9 ();
    0x00405e5c nop                               |         
    0x00405e60 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00405e64 move t8, v0                       |         t8 = v0;
                                                 |         if (t8 > 0) {
    0x00405e68 bgtz t8, 0x405e90                 |             goto label_0;
                                                 |         }
    0x00405e6c nop                               |         
                                                 |     }
    0x00405e70 lw t8, -0x7f8c(gp)                |     t8 = *(gp);
                                                 |     /* aav.0x00405d60 */
    0x00405e74 addiu t8, t8, 0x5d60              |     t8 += 0x5d60;
    0x00405e78 move t9, t8                       |     t9 = t8;
    0x00405e7c jalr t9                           |     t9 ();
    0x00405e80 nop                               |     
    0x00405e84 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00405e88 b 0x4060c4                        |     goto label_1;
    0x00405e8c nop                               |     
                                                 | label_0:
    0x00405e90 sw zero, 0x28(fp)                 |     *(arg_28h) = 0;
    0x00405e94 b 0x405ee8                        |     goto label_2;
    0x00405e98 nop                               |     
                                                 |     do {
    0x00405e9c lw t8, 0x28(fp)                   |         t8 = *(arg_28h);
    0x00405ea0 lw v0, 0x18(fp)                   |         v0 = *(arg_18h);
    0x00405ea4 addu t8, v0, t8                   |         t8 = v0 + t8;
    0x00405ea8 lb t8, (t8)                       |         t8 = *(t8);
    0x00405eac addiu t8, t8, -0x30               |         t8 += -0x30;
    0x00405eb0 sltiu t8, t8, 0xa                 |         t8 = (t8 < 0xa) ? 1 : 0;
                                                 |         if (t8 == 0) {
    0x00405eb4 bnez t8, 0x405edc                 |             
    0x00405eb8 nop                               |             
    0x00405ebc lw t8, -0x7f8c(gp)                |             t8 = *(gp);
                                                 |             /* aav.0x00405d60 */
    0x00405ec0 addiu t8, t8, 0x5d60              |             t8 += 0x5d60;
    0x00405ec4 move t9, t8                       |             t9 = t8;
    0x00405ec8 jalr t9                           |             t9 ();
    0x00405ecc nop                               |             
    0x00405ed0 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00405ed4 b 0x4060c4                        |             goto label_1;
    0x00405ed8 nop                               |             
                                                 |         }
    0x00405edc lw t8, 0x28(fp)                   |         t8 = *(arg_28h);
    0x00405ee0 addiu t8, t8, 1                   |         t8++;
    0x00405ee4 sw t8, 0x28(fp)                   |         *(arg_28h) = t8;
                                                 | label_2:
    0x00405ee8 lw t8, 0x28(fp)                   |         t8 = *(arg_28h);
    0x00405eec lw v0, 0x18(fp)                   |         v0 = *(arg_18h);
    0x00405ef0 addu t8, v0, t8                   |         t8 = v0 + t8;
    0x00405ef4 lb t8, (t8)                       |         t8 = *(t8);
    0x00405ef8 bnez t8, 0x405e9c                 |         
                                                 |     } while (t8 != 0);
    0x00405efc nop                               |     
    0x00405f00 lui t8, 0xf                       |     t8 = 0xf0000;
    0x00405f04 ori a0, t8, 0x4240                |     a0 = 0xf4240;
    0x00405f08 lw t8, -0x7e64(gp)                |     t8 = sym.imp.usleep;
    0x00405f0c move t9, t8                       |     t9 = t8;
    0x00405f10 jalr t9                           |     t9 ();
    0x00405f14 nop                               |     
    0x00405f18 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00405f1c sw zero, 0x2c(fp)                 |     *(arg_2ch) = 0;
    0x00405f20 b 0x406044                        |     goto label_3;
    0x00405f24 nop                               |     
                                                 |     do {
    0x00405f28 lui t8, 7                         |         t8 = 70000;
    0x00405f2c ori a0, t8, 0xa120                |         a0 = 0x7a120;
    0x00405f30 lw t8, -0x7e64(gp)                |         t8 = sym.imp.usleep;
    0x00405f34 move t9, t8                       |         t9 = t8;
    0x00405f38 jalr t9                           |         t9 ();
    0x00405f3c nop                               |         
    0x00405f40 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00405f44 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.sniff_pir */
    0x00405f48 addiu a0, t8, -0x553c             |         a0 = t8 + -0x553c;
    0x00405f4c lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
    0x00405f50 addiu a1, t8, -0x5530             |         a1 = t8 + -0x5530;
    0x00405f54 lw t8, -0x7f48(gp)                |         t8 = sym.imp.popen
    0x00405f58 move t9, t8                       |         t9 = t8;
    0x00405f5c jalr t9                           |         t9 ();
    0x00405f60 nop                               |         
    0x00405f64 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00405f68 move t8, v0                       |         t8 = v0;
    0x00405f6c sw t8, 0x30(fp)                   |         *(arg_30h) = t8;
    0x00405f70 addiu t8, fp, 0x355c              |         t8 = fp + 0x355c;
    0x00405f74 move a0, t8                       |         a0 = t8;
    0x00405f78 addiu a1, zero, 0x40              |         a1 = 0x40;
    0x00405f7c lw a2, 0x30(fp)                   |         a2 = *(arg_30h);
    0x00405f80 lw t8, -0x7ee8(gp)                |         t8 = sym.imp.fgets;
    0x00405f84 move t9, t8                       |         t9 = t8;
    0x00405f88 jalr t9                           |         t9 ();
    0x00405f8c nop                               |         
    0x00405f90 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00405f94 lw a0, 0x30(fp)                   |         a0 = *(arg_30h);
    0x00405f98 lw t8, -0x7eac(gp)                |         t8 = sym.imp.pclose;
    0x00405f9c move t9, t8                       |         t9 = t8;
    0x00405fa0 jalr t9                           |         t9 ();
    0x00405fa4 nop                               |         
    0x00405fa8 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00405fac addiu t8, fp, 0x355c              |         t8 = fp + 0x355c;
    0x00405fb0 lw v0, -0x7fdc(gp)                |         v0 = *((gp - 8183));
                                                 |         /* str.pir_state:_s_n */
    0x00405fb4 addiu a0, v0, -0x552c             |         a0 = v0 + -0x552c;
    0x00405fb8 move a1, t8                       |         a1 = t8;
    0x00405fbc lw t8, -0x7f44(gp)                |         t8 = sym.imp.printf;
    0x00405fc0 move t9, t8                       |         t9 = t8;
    0x00405fc4 jalr t9                           |         t9 ();
    0x00405fc8 nop                               |         
    0x00405fcc lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00405fd0 addiu t8, fp, 0x355c              |         t8 = fp + 0x355c;
    0x00405fd4 move a0, t8                       |         a0 = t8;
    0x00405fd8 lw t8, -0x7e88(gp)                |         t8 = sym.imp.strlen;
    0x00405fdc move t9, t8                       |         t9 = t8;
    0x00405fe0 jalr t9                           |         t9 ();
    0x00405fe4 nop                               |         
    0x00405fe8 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00405fec move t8, v0                       |         t8 = v0;
    0x00405ff0 addiu t8, t8, -1                  |         t8 += -1;
    0x00405ff4 addiu v0, fp, 0x355c              |         v0 = fp + 0x355c;
    0x00405ff8 move a0, v0                       |         a0 = v0;
    0x00405ffc lw v0, -0x7fdc(gp)                |         v0 = *((gp - 8183));
                                                 |         /* esilref: 'on' */
    0x00406000 addiu a1, v0, -0x551c             |         a1 = v0 + -0x551c;
    0x00406004 move a2, t8                       |         a2 = t8;
    0x00406008 lw t8, -0x7e7c(gp)                |         t8 = sym.imp.strncmp;
    0x0040600c move t9, t8                       |         t9 = t8;
    0x00406010 jalr t9                           |         t9 ();
    0x00406014 nop                               |         
    0x00406018 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x0040601c move t8, v0                       |         t8 = v0;
                                                 |         if (t8 == 0) {
    0x00406020 bnez t8, 0x406038                 |             
    0x00406024 nop                               |             
    0x00406028 addiu t8, zero, 1                 |             t8 = 1;
    0x0040602c sb t8, 0x27(fp)                   |             *(arg_27h) = t8;
    0x00406030 b 0x406074                        |             goto label_4;
    0x00406034 nop                               |             
                                                 |         }
    0x00406038 lw t8, 0x2c(fp)                   |         t8 = *(arg_2ch);
    0x0040603c addiu t8, t8, 1                   |         t8++;
    0x00406040 sw t8, 0x2c(fp)                   |         *(arg_2ch) = t8;
                                                 | label_3:
    0x00406044 lw a0, 0x18(fp)                   |         a0 = *(arg_18h);
    0x00406048 lw t8, -0x7f38(gp)                |         t8 = sym.imp.atoi;
    0x0040604c move t9, t8                       |         t9 = t8;
    0x00406050 jalr t9                           |         t9 ();
    0x00406054 nop                               |         
    0x00406058 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x0040605c move t8, v0                       |         t8 = v0;
    0x00406060 sll v0, t8, 1                     |         v0 = t8 << 1;
    0x00406064 lw t8, 0x2c(fp)                   |         t8 = *(arg_2ch);
    0x00406068 slt t8, t8, v0                    |         t8 = (t8 < v0) ? 1 : 0;
    0x0040606c bnez t8, 0x405f28                 |         
                                                 |     } while (t8 != 0);
    0x00406070 nop                               |     
                                                 | label_4:
    0x00406074 lbu t8, 0x27(fp)                  |     t8 = *(arg_27h);
                                                 |     if (t8 != 0) {
    0x00406078 beqz t8, 0x4060a4                 |         
    0x0040607c nop                               |         
    0x00406080 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* esilref: 'ok' */
    0x00406084 addiu a0, t8, -0x5518             |         a0 = t8 + -0x5518;
    0x00406088 lw t8, -0x7f4c(gp)                |         t8 = sym.imp.puts;
    0x0040608c move t9, t8                       |         t9 = t8;
    0x00406090 jalr t9                           |         t9 ();
    0x00406094 nop                               |         
    0x00406098 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x0040609c b 0x4060c0                        |         goto label_5;
    0x004060a0 nop                               |         
                                                 |     }
    0x004060a4 lw t8, -0x7fdc(gp)                |     t8 = *((gp - 8183));
                                                 |     /* esilref: 'failed' */
    0x004060a8 addiu a0, t8, -0x5514             |     a0 = t8 + -0x5514;
    0x004060ac lw t8, -0x7f4c(gp)                |     t8 = sym.imp.puts;
    0x004060b0 move t9, t8                       |     t9 = t8;
    0x004060b4 jalr t9                           |     t9 ();
    0x004060b8 nop                               |     
    0x004060bc lw gp, 0x10(fp)                   |     gp = *(arg_10h);
                                                 | label_5:
    0x004060c0 nop                               |     
                                                 | label_1:
    0x004060c4 addiu t8, fp, 0x34                |     t8 = fp + 0x34;
    0x004060c8 move a0, t8                       |     a0 = t8;
    0x004060cc lw t8, -0x7e4c(gp)                |     t8 = sym.imp.PIB::PIB__;
    0x004060d0 move t9, t8                       |     t9 = t8;
    0x004060d4 jalr t9                           |     t9 ();
    0x004060d8 nop                               |     
    0x004060dc lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x004060e0 lw t8, -0x7e58(gp)                |     t8 = *((gp - 8086));
    0x004060e4 lw v0, 0x359c(fp)                 |     v0 = *(arg_359ch);
    0x004060e8 lw t8, (t8)                       |     t8 = *(t8);
                                                 |     if (v0 != t8) {
    0x004060ec beq v0, t8, 0x406148              |         
    0x004060f0 nop                               |         
    0x004060f4 b 0x406138                        |         goto label_6;
    0x004060f8 nop                               |         
                                                 | label_6:
    0x00406138 lw t8, -0x7ebc(gp)                |         t8 = sym.imp.__stack_chk_fail;
    0x0040613c move t9, t8                       |         t9 = t8;
    0x00406140 jalr t9                           |         t9 ();
    0x00406144 nop                               |         
                                                 |     }
    0x00406148 move sp, fp                       |     
    0x0040614c lw ra, 0x35ac(sp)                 |     ra = *(arg_35ach);
    0x00406150 lw fp, 0x35a8(sp)                 |     fp = *(arg_35a8h);
    0x00406154 lw s0, 0x35a4(sp)                 |     s0 = *(arg_35a4h);
    0x00406158 addiu sp, sp, 0x35b0              |     
    0x0040615c jr ra                             |     return v0;
    0x00406160 nop                               |     
                                                 | }
    ; assembly                                   | /* r2dec pseudo code output */
                                                 | /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/bin/mfgbox @ 0x406fa4 */
                                                 | #include <stdint.h>
                                                 |  
    ; (fcn) sym.TestRTC_int__char_const_ ()      | void TestRTC_int_char_const_ () {
                                                 |     /* TestRTC(int, char const*) */
    0x00406fa4 lui gp, 2                         |     
    0x00406fa8 addiu gp, gp, -0x1f54             |     
    0x00406fac addu gp, gp, t9                   |     gp += t9;
    0x00406fb0 addiu sp, sp, -0x100              |     
    0x00406fb4 sw ra, 0xfc(sp)                   |     *(var_fch) = ra;
    0x00406fb8 sw fp, 0xf8(sp)                   |     *(var_f8h) = fp;
    0x00406fbc move fp, sp                       |     fp = sp;
    0x00406fc0 sw gp, 0x10(sp)                   |     *(var_10h) = gp;
    0x00406fc4 sw a0, 0x1c(fp)                   |     *(arg_1ch) = a0;
    0x00406fc8 sw a1, 0x18(fp)                   |     *(arg_18h) = a1;
    0x00406fcc lw t8, -0x7e58(gp)                |     t8 = *((gp - 8086));
    0x00406fd0 lw t8, (t8)                       |     t8 = *(t8);
    0x00406fd4 sw t8, 0xf4(fp)                   |     *(arg_f4h) = t8;
    0x00406fd8 addiu v0, fp, 0x34                |     v0 = fp + 0x34;
    0x00406fdc addiu t8, zero, 0x40              |     t8 = 0x40;
    0x00406fe0 move a0, v0                       |     a0 = v0;
    0x00406fe4 move a1, zero                     |     a1 = 0;
    0x00406fe8 move a2, t8                       |     a2 = t8;
    0x00406fec lw t8, -0x7ef8(gp)                |     t8 = sym.imp.memset;
    0x00406ff0 move t9, t8                       |     t9 = t8;
    0x00406ff4 jalr t9                           |     t9 ();
    0x00406ff8 nop                               |     
    0x00406ffc lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00407000 addiu v0, fp, 0x74                |     v0 = fp + 0x74;
    0x00407004 addiu t8, zero, 0x40              |     t8 = 0x40;
    0x00407008 move a0, v0                       |     a0 = v0;
    0x0040700c move a1, zero                     |     a1 = 0;
    0x00407010 move a2, t8                       |     a2 = t8;
    0x00407014 lw t8, -0x7ef8(gp)                |     t8 = sym.imp.memset;
    0x00407018 move t9, t8                       |     t9 = t8;
    0x0040701c jalr t9                           |     t9 ();
    0x00407020 nop                               |     
    0x00407024 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00407028 sw zero, 0x28(fp)                 |     *(arg_28h) = 0;
    0x0040702c lw v0, 0x1c(fp)                   |     v0 = *(arg_1ch);
    0x00407030 addiu t8, zero, 2                 |     t8 = 2;
                                                 |     if (v0 != t8) {
    0x00407034 beq v0, t8, 0x40705c              |         
    0x00407038 nop                               |         
    0x0040703c lw t8, -0x7f8c(gp)                |         t8 = *(gp);
                                                 |         /* aav.0x00406f20 */
    0x00407040 addiu t8, t8, 0x6f20              |         t8 += 0x6f20;
    0x00407044 move t9, t8                       |         t9 = t8;
    0x00407048 jalr t9                           |         t9 ();
    0x0040704c nop                               |         
    0x00407050 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407054 b 0x40725c                        |         goto label_0;
    0x00407058 nop                               |         
                                                 |     }
    0x0040705c addiu t8, fp, 0xb4                |     t8 = fp + 0xb4;
    0x00407060 move a0, t8                       |     a0 = t8;
    0x00407064 lw t8, -0x7fdc(gp)                |     t8 = *((gp - 8183));
                                                 |     /* str.date__u__s */
    0x00407068 addiu a1, t8, -0x52fc             |     a1 = t8 + -0x52fc;
    0x0040706c lw a2, 0x18(fp)                   |     a2 = *(arg_18h);
    0x00407070 lw t8, -0x7f14(gp)                |     t8 = sym.imp.sprintf;
    0x00407074 move t9, t8                       |     t9 = t8;
    0x00407078 jalr t9                           |     t9 ();
    0x0040707c nop                               |     
    0x00407080 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00407084 addiu t8, fp, 0xb4                |     t8 = fp + 0xb4;
    0x00407088 move a0, t8                       |     a0 = t8;
    0x0040708c lw t8, -0x7e5c(gp)                |     t8 = sym.imp.system;
    0x00407090 move t9, t8                       |     t9 = t8;
    0x00407094 jalr t9                           |     t9 ();
    0x00407098 nop                               |     
    0x0040709c lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x004070a0 lw t8, -0x7fdc(gp)                |     t8 = *((gp - 8183));
                                                 |     /* str.hwclock__w__u */
    0x004070a4 addiu a0, t8, -0x52f0             |     a0 = t8 + -0x52f0;
    0x004070a8 lw t8, -0x7e5c(gp)                |     t8 = sym.imp.system;
    0x004070ac move t9, t8                       |     t9 = t8;
    0x004070b0 jalr t9                           |     t9 ();
    0x004070b4 nop                               |     
    0x004070b8 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x004070bc sw zero, 0x24(fp)                 |     *(arg_24h) = 0;
    0x004070c0 b 0x4071fc                        |     goto label_1;
    0x004070c4 nop                               |     
                                                 |     do {
    0x004070c8 addiu a0, zero, 1                 |         a0 = 1;
    0x004070cc lw t8, -0x7e70(gp)                |         t8 = sym.imp.sleep;
    0x004070d0 move t9, t8                       |         t9 = t8;
    0x004070d4 jalr t9                           |         t9 ();
    0x004070d8 nop                               |         
    0x004070dc lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x004070e0 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.date__u */
    0x004070e4 addiu a0, t8, -0x52e0             |         a0 = t8 + -0x52e0;
    0x004070e8 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
    0x004070ec addiu a1, t8, -0x52d8             |         a1 = t8 + -0x52d8;
    0x004070f0 lw t8, -0x7f48(gp)                |         t8 = sym.imp.popen
    0x004070f4 move t9, t8                       |         t9 = t8;
    0x004070f8 jalr t9                           |         t9 ();
    0x004070fc nop                               |         
    0x00407100 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407104 move t8, v0                       |         t8 = v0;
    0x00407108 sw t8, 0x2c(fp)                   |         *(arg_2ch) = t8;
    0x0040710c lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.hwclock */
    0x00407110 addiu a0, t8, -0x52d4             |         a0 = t8 + -0x52d4;
    0x00407114 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
    0x00407118 addiu a1, t8, -0x52d8             |         a1 = t8 + -0x52d8;
    0x0040711c lw t8, -0x7f48(gp)                |         t8 = sym.imp.popen
    0x00407120 move t9, t8                       |         t9 = t8;
    0x00407124 jalr t9                           |         t9 ();
    0x00407128 nop                               |         
    0x0040712c lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407130 move t8, v0                       |         t8 = v0;
    0x00407134 sw t8, 0x30(fp)                   |         *(arg_30h) = t8;
    0x00407138 addiu t8, fp, 0x34                |         t8 = fp + 0x34;
    0x0040713c move a0, t8                       |         a0 = t8;
    0x00407140 addiu a1, zero, 0x40              |         a1 = 0x40;
    0x00407144 lw a2, 0x2c(fp)                   |         a2 = *(arg_2ch);
    0x00407148 lw t8, -0x7ee8(gp)                |         t8 = sym.imp.fgets;
    0x0040714c move t9, t8                       |         t9 = t8;
    0x00407150 jalr t9                           |         t9 ();
    0x00407154 nop                               |         
    0x00407158 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x0040715c addiu t8, fp, 0x74                |         t8 = fp + 0x74;
    0x00407160 move a0, t8                       |         a0 = t8;
    0x00407164 addiu a1, zero, 0x40              |         a1 = 0x40;
    0x00407168 lw a2, 0x30(fp)                   |         a2 = *(arg_30h);
    0x0040716c lw t8, -0x7ee8(gp)                |         t8 = sym.imp.fgets;
    0x00407170 move t9, t8                       |         t9 = t8;
    0x00407174 jalr t9                           |         t9 ();
    0x00407178 nop                               |         
    0x0040717c lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407180 addiu v0, fp, 0x74                |         v0 = fp + 0x74;
    0x00407184 addiu t8, fp, 0x34                |         t8 = fp + 0x34;
    0x00407188 move a0, v0                       |         a0 = v0;
    0x0040718c move a1, t8                       |         a1 = t8;
    0x00407190 addiu a2, zero, 0x12              |         a2 = 0x12;
    0x00407194 lw t8, -0x7e7c(gp)                |         t8 = sym.imp.strncmp;
    0x00407198 move t9, t8                       |         t9 = t8;
    0x0040719c jalr t9                           |         t9 ();
    0x004071a0 nop                               |         
    0x004071a4 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x004071a8 move t8, v0                       |         t8 = v0;
                                                 |         if (t8 == 0) {
    0x004071ac bnez t8, 0x4071c0                 |             
    0x004071b0 nop                               |             
    0x004071b4 lw t8, 0x28(fp)                   |             t8 = *(arg_28h);
    0x004071b8 addiu t8, t8, 1                   |             t8++;
    0x004071bc sw t8, 0x28(fp)                   |             *(arg_28h) = t8;
                                                 |         }
    0x004071c0 lw a0, 0x2c(fp)                   |         a0 = *(arg_2ch);
    0x004071c4 lw t8, -0x7eac(gp)                |         t8 = sym.imp.pclose;
    0x004071c8 move t9, t8                       |         t9 = t8;
    0x004071cc jalr t9                           |         t9 ();
    0x004071d0 nop                               |         
    0x004071d4 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x004071d8 lw a0, 0x30(fp)                   |         a0 = *(arg_30h);
    0x004071dc lw t8, -0x7eac(gp)                |         t8 = sym.imp.pclose;
    0x004071e0 move t9, t8                       |         t9 = t8;
    0x004071e4 jalr t9                           |         t9 ();
    0x004071e8 nop                               |         
    0x004071ec lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x004071f0 lw t8, 0x24(fp)                   |         t8 = *(arg_24h);
    0x004071f4 addiu t8, t8, 1                   |         t8++;
    0x004071f8 sw t8, 0x24(fp)                   |         *(arg_24h) = t8;
                                                 | label_1:
    0x004071fc lw t8, 0x24(fp)                   |         t8 = *(arg_24h);
    0x00407200 slti t8, t8, 3                    |         t8 = (t8 < 3) ? 1 : 0;
    0x00407204 bnez t8, 0x4070c8                 |         
                                                 |     } while (t8 != 0);
    0x00407208 nop                               |     
    0x0040720c lw t8, 0x28(fp)                   |     t8 = *(arg_28h);
    0x00407210 slti t8, t8, 2                    |     t8 = (t8 < 2) ? 1 : 0;
                                                 |     if (t8 == 0) {
    0x00407214 bnez t8, 0x407240                 |         
    0x00407218 nop                               |         
    0x0040721c lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* esilref: 'ok' */
    0x00407220 addiu a0, t8, -0x52cc             |         a0 = t8 + -0x52cc;
    0x00407224 lw t8, -0x7f4c(gp)                |         t8 = sym.imp.puts;
    0x00407228 move t9, t8                       |         t9 = t8;
    0x0040722c jalr t9                           |         t9 ();
    0x00407230 nop                               |         
    0x00407234 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407238 b 0x40725c                        |         goto label_0;
    0x0040723c nop                               |         
                                                 |     }
    0x00407240 lw t8, -0x7fdc(gp)                |     t8 = *((gp - 8183));
                                                 |     /* esilref: 'failed' */
    0x00407244 addiu a0, t8, -0x52c8             |     a0 = t8 + -0x52c8;
    0x00407248 lw t8, -0x7f4c(gp)                |     t8 = sym.imp.puts;
    0x0040724c move t9, t8                       |     t9 = t8;
    0x00407250 jalr t9                           |     t9 ();
    0x00407254 nop                               |     
    0x00407258 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
                                                 | label_0:
    0x0040725c lw t8, -0x7e58(gp)                |     t8 = *((gp - 8086));
    0x00407260 lw v0, 0xf4(fp)                   |     v0 = *(arg_f4h);
    0x00407264 lw t8, (t8)                       |     t8 = *(t8);
                                                 |     if (v0 != t8) {
    0x00407268 beq v0, t8, 0x407280              |         
    0x0040726c nop                               |         
    0x00407270 lw t8, -0x7ebc(gp)                |         t8 = sym.imp.__stack_chk_fail;
    0x00407274 move t9, t8                       |         t9 = t8;
    0x00407278 jalr t9                           |         t9 ();
    0x0040727c nop                               |         
                                                 |     }
    0x00407280 move sp, fp                       |     
    0x00407284 lw ra, 0xfc(sp)                   |     ra = *(var_fch);
    0x00407288 lw fp, 0xf8(sp)                   |     fp = *(var_f8h);
    0x0040728c addiu sp, sp, 0x100               |     
    0x00407290 jr ra                             |     return v0;
    0x00407294 nop                               |     
                                                 | }
    ; assembly                                           | /* r2dec pseudo code output */
                                                         | /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/bin/mfgbox @ 0x408cb8 */
                                                         | #include <stdint.h>
                                                         |  
    ; (fcn) sym.TestWireless_int__char_const_ ()         | void TestWireless_int_char_const_ () {
                                                         |     /* TestWireless(int, char const**) */
    0x00408cb8 lui gp, 2                                 |     
    0x00408cbc addiu gp, gp, -0x3c68                     |     
    0x00408cc0 addu gp, gp, t9                           |     gp += t9;
    0x00408cc4 addiu sp, sp, -0x3968                     |     
    0x00408cc8 sw ra, 0x3964(sp)                         |     *(arg_3964h) = ra;
    0x00408ccc sw fp, 0x3960(sp)                         |     *(arg_3960h) = fp;
    0x00408cd0 sw s0, 0x395c(sp)                         |     *(arg_395ch) = s0;
    0x00408cd4 move fp, sp                               |     fp = sp;
    0x00408cd8 sw gp, 0x10(sp)                           |     *(arg_10h) = gp;
    0x00408cdc sw a0, 0x1c(fp)                           |     *(arg_1ch) = a0;
    0x00408ce0 sw a1, 0x18(fp)                           |     *(arg_18h) = a1;
    0x00408ce4 lw t8, -0x7e58(gp)                        |     t8 = *((gp - 8086));
    0x00408ce8 lw t8, (t8)                               |     t8 = *(t8);
    0x00408cec sw t8, 0x3954(fp)                         |     *(arg_3954h) = t8;
    0x00408cf0 addiu t8, fp, 0x2c                        |     t8 = fp + 0x2c;
    0x00408cf4 move a0, t8                               |     a0 = t8;
    0x00408cf8 lw t8, -0x7f84(gp)                        |     t8 = *(gp);
    0x00408cfc move t9, t8                               |     t9 = t8;
    0x00408d00 jalr t9                                   |     t9 ();
    0x00408d04 nop                                       |     
    0x00408d08 lw gp, 0x10(fp)                           |     gp = *(arg_10h);
    0x00408d0c addiu t8, fp, 0x2c                        |     t8 = fp + 0x2c;
    0x00408d10 move a0, t8                               |     a0 = t8;
    0x00408d14 lw t8, -0x7f18(gp)                        |     t8 = *(gp);
    0x00408d18 move t9, t8                               |     t9 = t8;
    0x00408d1c jalr t9                                   |     t9 ();
    0x00408d20 nop                                       |     
    0x00408d24 lw gp, 0x10(fp)                           |     gp = *(arg_10h);
    0x00408d28 addiu t8, fp, 0x2c                        |     t8 = fp + 0x2c;
    0x00408d2c move a0, t8                               |     a0 = t8;
    0x00408d30 lw t8, -0x7ec8(gp)                        |     t8 = *(gp);
    0x00408d34 move t9, t8                               |     t9 = t8;
    0x00408d38 jalr t9                                   |     t9 ();
    0x00408d3c nop                                       |     
    0x00408d40 lw gp, 0x10(fp)                           |     gp = *(arg_10h);
    0x00408d44 move t8, v0                               |     t8 = v0;
    0x00408d48 xori t8, t8, 1                            |     t8 ^= 1;
    0x00408d4c andi t8, t8, 0xff                         |     t8 &= 0xff;
                                                         |     if (t8 != 0) {
    0x00408d50 beqz t8, 0x408d80                         |         
    0x00408d54 nop                                       |         
    0x00408d58 lw t8, -0x7fdc(gp)                        |         t8 = *((gp - 8183));
                                                         |         /* str.No_Wireless_Capabilities */
    0x00408d5c addiu a0, t8, -0x4d90                     |         a0 = t8 + -0x4d90;
    0x00408d60 lw t8, -0x7f4c(gp)                        |         t8 = sym.imp.puts;
    0x00408d64 move t9, t8                               |         t9 = t8;
    0x00408d68 jalr t9                                   |         t9 ();
    0x00408d6c nop                                       |         
    0x00408d70 lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x00408d74 move s0, zero                             |         s0 = 0;
    0x00408d78 b 0x409340                                |         goto label_0;
    0x00408d7c nop                                       |         
                                                         |     }
    0x00408d80 lw v0, 0x1c(fp)                           |     v0 = *(arg_1ch);
    0x00408d84 addiu t8, zero, 2                         |     t8 = 2;
                                                         |     if (v0 == t8) {
    0x00408d88 bne v0, t8, 0x408e10                      |         
    0x00408d8c nop                                       |         
    0x00408d90 lw t8, 0x18(fp)                           |         t8 = *(arg_18h);
    0x00408d94 addiu t8, t8, 4                           |         t8 += 4;
    0x00408d98 lw t8, (t8)                               |         t8 = *(t8);
    0x00408d9c move a0, t8                               |         a0 = t8;
    0x00408da0 lw t8, -0x7fdc(gp)                        |         t8 = *((gp - 8183));
                                                         |         /* str.region */
    0x00408da4 addiu a1, t8, -0x4d74                     |         a1 = t8 + -0x4d74;
    0x00408da8 lw t8, -0x7f2c(gp)                        |         t8 = sym.imp.strcmp;
    0x00408dac move t9, t8                               |         t9 = t8;
    0x00408db0 jalr t9                                   |         t9 ();
    0x00408db4 nop                                       |         
    0x00408db8 lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x00408dbc move t8, v0                               |         t8 = v0;
                                                         |         if (t8 != 0) {
    0x00408dc0 bnez t8, 0x408e10                         |             goto label_1;
                                                         |         }
    0x00408dc4 nop                                       |         
    0x00408dc8 addiu t8, fp, 0x2c                        |         t8 = fp + 0x2c;
    0x00408dcc move a0, t8                               |         a0 = t8;
    0x00408dd0 lw t8, -0x7e74(gp)                        |         t8 = *(gp);
    0x00408dd4 move t9, t8                               |         t9 = t8;
    0x00408dd8 jalr t9                                   |         t9 ();
    0x00408ddc nop                                       |         
    0x00408de0 lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x00408de4 move t8, v0                               |         t8 = v0;
    0x00408de8 lw v0, -0x7fdc(gp)                        |         v0 = *((gp - 8183));
                                                         |         /* str.Region___d_n */
    0x00408dec addiu a0, v0, -0x4d6c                     |         a0 = v0 + -0x4d6c;
    0x00408df0 move a1, t8                               |         a1 = t8;
    0x00408df4 lw t8, -0x7f44(gp)                        |         t8 = sym.imp.printf;
    0x00408df8 move t9, t8                               |         t9 = t8;
    0x00408dfc jalr t9                                   |         t9 ();
    0x00408e00 nop                                       |         
    0x00408e04 lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x00408e08 b 0x40933c                                |         goto label_2;
    0x00408e0c nop                                       |         
                                                         |     }
                                                         | label_1:
    0x00408e10 lw v0, 0x1c(fp)                           |     v0 = *(arg_1ch);
    0x00408e14 addiu t8, zero, 2                         |     t8 = 2;
                                                         |     if (v0 == t8) {
    0x00408e18 bne v0, t8, 0x408eb0                      |         
    0x00408e1c nop                                       |         
    0x00408e20 lw t8, 0x18(fp)                           |         t8 = *(arg_18h);
    0x00408e24 addiu t8, t8, 4                           |         t8 += 4;
    0x00408e28 lw t8, (t8)                               |         t8 = *(t8);
    0x00408e2c move a0, t8                               |         a0 = t8;
    0x00408e30 lw t8, -0x7fdc(gp)                        |         t8 = *((gp - 8183));
                                                         |         /* str.enable */
    0x00408e34 addiu a1, t8, -0x4d5c                     |         a1 = t8 + -0x4d5c;
    0x00408e38 lw t8, -0x7f2c(gp)                        |         t8 = sym.imp.strcmp;
    0x00408e3c move t9, t8                               |         t9 = t8;
    0x00408e40 jalr t9                                   |         t9 ();
    0x00408e44 nop                                       |         
    0x00408e48 lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x00408e4c move t8, v0                               |         t8 = v0;
                                                         |         if (t8 != 0) {
    0x00408e50 bnez t8, 0x408eb0                         |             goto label_3;
                                                         |         }
    0x00408e54 nop                                       |         
    0x00408e58 lw t8, -0x7fdc(gp)                        |         t8 = *((gp - 8183));
                                                         |         /* str.curl_127.0.0.1_config_wireless.cgi_enableon____dev_null_2___dev_null */
    0x00408e5c addiu a0, t8, -0x4d54                     |         a0 = t8 + -0x4d54;
    0x00408e60 lw t8, -0x7e5c(gp)                        |         t8 = sym.imp.system;
    0x00408e64 move t9, t8                               |         t9 = t8;
    0x00408e68 jalr t9                                   |         t9 ();
    0x00408e6c nop                                       |         
    0x00408e70 lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x00408e74 addiu a0, zero, 3                         |         a0 = 3;
    0x00408e78 lw t8, -0x7e70(gp)                        |         t8 = sym.imp.sleep;
    0x00408e7c move t9, t8                               |         t9 = t8;
    0x00408e80 jalr t9                                   |         t9 ();
    0x00408e84 nop                                       |         
    0x00408e88 lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x00408e8c lw t8, -0x7fdc(gp)                        |         t8 = *((gp - 8183));
                                                         |         /* esilref: 'ok' */
    0x00408e90 addiu a0, t8, -0x4d0c                     |         a0 = t8 + -0x4d0c;
    0x00408e94 lw t8, -0x7f4c(gp)                        |         t8 = sym.imp.puts;
    0x00408e98 move t9, t8                               |         t9 = t8;
    0x00408e9c jalr t9                                   |         t9 ();
    0x00408ea0 nop                                       |         
    0x00408ea4 lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x00408ea8 b 0x40933c                                |         goto label_2;
    0x00408eac nop                                       |         
                                                         |     }
                                                         | label_3:
    0x00408eb0 lw v0, 0x1c(fp)                           |     v0 = *(arg_1ch);
    0x00408eb4 addiu t8, zero, 2                         |     t8 = 2;
                                                         |     if (v0 == t8) {
    0x00408eb8 bne v0, t8, 0x408f50                      |         
    0x00408ebc nop                                       |         
    0x00408ec0 lw t8, 0x18(fp)                           |         t8 = *(arg_18h);
    0x00408ec4 addiu t8, t8, 4                           |         t8 += 4;
    0x00408ec8 lw t8, (t8)                               |         t8 = *(t8);
    0x00408ecc move a0, t8                               |         a0 = t8;
    0x00408ed0 lw t8, -0x7fdc(gp)                        |         t8 = *((gp - 8183));
                                                         |         /* str.disable */
    0x00408ed4 addiu a1, t8, -0x4d08                     |         a1 = t8 + -0x4d08;
    0x00408ed8 lw t8, -0x7f2c(gp)                        |         t8 = sym.imp.strcmp;
    0x00408edc move t9, t8                               |         t9 = t8;
    0x00408ee0 jalr t9                                   |         t9 ();
    0x00408ee4 nop                                       |         
    0x00408ee8 lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x00408eec move t8, v0                               |         t8 = v0;
                                                         |         if (t8 != 0) {
    0x00408ef0 bnez t8, 0x408f50                         |             goto label_4;
                                                         |         }
    0x00408ef4 nop                                       |         
    0x00408ef8 lw t8, -0x7fdc(gp)                        |         t8 = *((gp - 8183));
                                                         |         /* str.curl_127.0.0.1_config_wireless.cgi_enableoff____dev_null_2___dev_null */
    0x00408efc addiu a0, t8, -0x4d00                     |         a0 = t8 + -0x4d00;
    0x00408f00 lw t8, -0x7e5c(gp)                        |         t8 = sym.imp.system;
    0x00408f04 move t9, t8                               |         t9 = t8;
    0x00408f08 jalr t9                                   |         t9 ();
    0x00408f0c nop                                       |         
    0x00408f10 lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x00408f14 addiu a0, zero, 3                         |         a0 = 3;
    0x00408f18 lw t8, -0x7e70(gp)                        |         t8 = sym.imp.sleep;
    0x00408f1c move t9, t8                               |         t9 = t8;
    0x00408f20 jalr t9                                   |         t9 ();
    0x00408f24 nop                                       |         
    0x00408f28 lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x00408f2c lw t8, -0x7fdc(gp)                        |         t8 = *((gp - 8183));
                                                         |         /* esilref: 'ok' */
    0x00408f30 addiu a0, t8, -0x4d0c                     |         a0 = t8 + -0x4d0c;
    0x00408f34 lw t8, -0x7f4c(gp)                        |         t8 = sym.imp.puts;
    0x00408f38 move t9, t8                               |         t9 = t8;
    0x00408f3c jalr t9                                   |         t9 ();
    0x00408f40 nop                                       |         
    0x00408f44 lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x00408f48 b 0x40933c                                |         goto label_2;
    0x00408f4c nop                                       |         
                                                         |     }
                                                         | label_4:
    0x00408f50 lw v0, 0x1c(fp)                           |     v0 = *(arg_1ch);
    0x00408f54 addiu t8, zero, 3                         |     t8 = 3;
                                                         |     if (v0 == t8) {
    0x00408f58 bne v0, t8, 0x409104                      |         
    0x00408f5c nop                                       |         
    0x00408f60 lw t8, 0x18(fp)                           |         t8 = *(arg_18h);
    0x00408f64 addiu t8, t8, 4                           |         t8 += 4;
    0x00408f68 lw t8, (t8)                               |         t8 = *(t8);
    0x00408f6c move a0, t8                               |         a0 = t8;
    0x00408f70 lw t8, -0x7fdc(gp)                        |         t8 = *((gp - 8183));
                                                         |         /* str.region */
    0x00408f74 addiu a1, t8, -0x4d74                     |         a1 = t8 + -0x4d74;
    0x00408f78 lw t8, -0x7f2c(gp)                        |         t8 = sym.imp.strcmp;
    0x00408f7c move t9, t8                               |         t9 = t8;
    0x00408f80 jalr t9                                   |         t9 ();
    0x00408f84 nop                                       |         
    0x00408f88 lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x00408f8c move t8, v0                               |         t8 = v0;
                                                         |         if (t8 != 0) {
    0x00408f90 bnez t8, 0x409104                         |             goto label_5;
                                                         |         }
    0x00408f94 nop                                       |         
    0x00408f98 lw t8, 0x18(fp)                           |         t8 = *(arg_18h);
    0x00408f9c addiu t8, t8, 8                           |         t8 += 8;
    0x00408fa0 lw t8, (t8)                               |         t8 = *(t8);
    0x00408fa4 move a0, t8                               |         a0 = t8;
    0x00408fa8 lw t8, -0x7f38(gp)                        |         t8 = sym.imp.atoi;
    0x00408fac move t9, t8                               |         t9 = t8;
    0x00408fb0 jalr t9                                   |         t9 ();
    0x00408fb4 nop                                       |         
    0x00408fb8 lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x00408fbc move t8, v0                               |         t8 = v0;
                                                         |         if (t8 < 0) {
    0x00408fc0 bltz t8, 0x409104                         |             goto label_5;
                                                         |         }
    0x00408fc4 nop                                       |         
    0x00408fc8 lw t8, 0x18(fp)                           |         t8 = *(arg_18h);
    0x00408fcc addiu t8, t8, 8                           |         t8 += 8;
    0x00408fd0 lw t8, (t8)                               |         t8 = *(t8);
    0x00408fd4 move a0, t8                               |         a0 = t8;
    0x00408fd8 lw t8, -0x7f38(gp)                        |         t8 = sym.imp.atoi;
    0x00408fdc move t9, t8                               |         t9 = t8;
    0x00408fe0 jalr t9                                   |         t9 ();
    0x00408fe4 nop                                       |         
    0x00408fe8 lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x00408fec move t8, v0                               |         t8 = v0;
    0x00408ff0 slti t8, t8, 8                            |         t8 = (t8 < 8) ? 1 : 0;
                                                         |         if (t8 == 0) {
    0x00408ff4 beqz t8, 0x409104                         |             goto label_5;
                                                         |         }
    0x00408ff8 nop                                       |         
    0x00408ffc lw t8, 0x18(fp)                           |         t8 = *(arg_18h);
    0x00409000 addiu t8, t8, 8                           |         t8 += 8;
    0x00409004 lw t8, (t8)                               |         t8 = *(t8);
    0x00409008 move a0, t8                               |         a0 = t8;
    0x0040900c lw t8, -0x7f38(gp)                        |         t8 = sym.imp.atoi;
    0x00409010 move t9, t8                               |         t9 = t8;
    0x00409014 jalr t9                                   |         t9 ();
    0x00409018 nop                                       |         
    0x0040901c lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x00409020 move t8, v0                               |         t8 = v0;
    0x00409024 addiu v0, fp, 0x2c                        |         v0 = fp + 0x2c;
    0x00409028 move a0, v0                               |         a0 = v0;
    0x0040902c move a1, t8                               |         a1 = t8;
    0x00409030 lw t8, -0x7f3c(gp)                        |         t8 = *(gp);
    0x00409034 move t9, t8                               |         t9 = t8;
    0x00409038 jalr t9                                   |         t9 ();
    0x0040903c nop                                       |         
    0x00409040 lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x00409044 addiu t8, fp, 0x2c                        |         t8 = fp + 0x2c;
    0x00409048 move a0, t8                               |         a0 = t8;
    0x0040904c lw t8, -0x7ec4(gp)                        |         t8 = *(gp);
    0x00409050 move t9, t8                               |         t9 = t8;
    0x00409054 jalr t9                                   |         t9 ();
    0x00409058 nop                                       |         
    0x0040905c lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x00409060 addiu t8, fp, 0x2c                        |         t8 = fp + 0x2c;
    0x00409064 move a0, t8                               |         a0 = t8;
    0x00409068 lw t8, -0x7e74(gp)                        |         t8 = *(gp);
    0x0040906c move t9, t8                               |         t9 = t8;
    0x00409070 jalr t9                                   |         t9 ();
    0x00409074 nop                                       |         
    0x00409078 lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x0040907c move s0, v0                               |         s0 = v0;
    0x00409080 lw t8, 0x18(fp)                           |         t8 = *(arg_18h);
    0x00409084 addiu t8, t8, 8                           |         t8 += 8;
    0x00409088 lw t8, (t8)                               |         t8 = *(t8);
    0x0040908c move a0, t8                               |         a0 = t8;
    0x00409090 lw t8, -0x7f38(gp)                        |         t8 = sym.imp.atoi;
    0x00409094 move t9, t8                               |         t9 = t8;
    0x00409098 jalr t9                                   |         t9 ();
    0x0040909c nop                                       |         
    0x004090a0 lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x004090a4 move t8, v0                               |         t8 = v0;
    0x004090a8 xor t8, s0, t8                            |         t8 = s0 ^ t8;
    0x004090ac sltiu t8, t8, 1                           |         t8 = (t8 < 1) ? 1 : 0;
    0x004090b0 andi t8, t8, 0xff                         |         t8 &= 0xff;
                                                         |         if (t8 != 0) {
    0x004090b4 beqz t8, 0x4090e0                         |             
    0x004090b8 nop                                       |             
    0x004090bc lw t8, -0x7fdc(gp)                        |             t8 = *((gp - 8183));
                                                         |             /* esilref: 'ok' */
    0x004090c0 addiu a0, t8, -0x4d0c                     |             a0 = t8 + -0x4d0c;
    0x004090c4 lw t8, -0x7f4c(gp)                        |             t8 = sym.imp.puts;
    0x004090c8 move t9, t8                               |             t9 = t8;
    0x004090cc jalr t9                                   |             t9 ();
    0x004090d0 nop                                       |             
    0x004090d4 lw gp, 0x10(fp)                           |             gp = *(arg_10h);
    0x004090d8 b 0x40933c                                |             goto label_2;
    0x004090dc nop                                       |             
                                                         |         }
    0x004090e0 lw t8, -0x7fdc(gp)                        |         t8 = *((gp - 8183));
                                                         |         /* esilref: 'failed' */
    0x004090e4 addiu a0, t8, -0x4cb8                     |         a0 = t8 + -0x4cb8;
    0x004090e8 lw t8, -0x7f4c(gp)                        |         t8 = sym.imp.puts;
    0x004090ec move t9, t8                               |         t9 = t8;
    0x004090f0 jalr t9                                   |         t9 ();
    0x004090f4 nop                                       |         
    0x004090f8 lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x004090fc b 0x40933c                                |         goto label_2;
    0x00409100 nop                                       |         
                                                         |     }
                                                         | label_5:
    0x00409104 lw v0, 0x1c(fp)                           |     v0 = *(arg_1ch);
    0x00409108 addiu t8, zero, 3                         |     t8 = 3;
                                                         |     if (v0 != t8) {
    0x0040910c bne v0, t8, 0x409324                      |         goto label_6;
                                                         |     }
    0x00409110 nop                                       |     
    0x00409114 lw t8, 0x18(fp)                           |     t8 = *(arg_18h);
    0x00409118 addiu t8, t8, 4                           |     t8 += 4;
    0x0040911c lw t8, (t8)                               |     t8 = *(t8);
    0x00409120 move a0, t8                               |     a0 = t8;
    0x00409124 lw t8, -0x7f38(gp)                        |     t8 = sym.imp.atoi;
    0x00409128 move t9, t8                               |     t9 = t8;
    0x0040912c jalr t9                                   |     t9 ();
    0x00409130 nop                                       |     
    0x00409134 lw gp, 0x10(fp)                           |     gp = *(arg_10h);
    0x00409138 move t8, v0                               |     t8 = v0;
                                                         |     if (t8 < 0) {
    0x0040913c bltz t8, 0x409324                         |         goto label_6;
                                                         |     }
    0x00409140 nop                                       |     
    0x00409144 lw t8, 0x18(fp)                           |     t8 = *(arg_18h);
    0x00409148 addiu t8, t8, 4                           |     t8 += 4;
    0x0040914c lw t8, (t8)                               |     t8 = *(t8);
    0x00409150 move a0, t8                               |     a0 = t8;
    0x00409154 lw t8, -0x7f38(gp)                        |     t8 = sym.imp.atoi;
    0x00409158 move t9, t8                               |     t9 = t8;
    0x0040915c jalr t9                                   |     t9 ();
    0x00409160 nop                                       |     
    0x00409164 lw gp, 0x10(fp)                           |     gp = *(arg_10h);
    0x00409168 move t8, v0                               |     t8 = v0;
    0x0040916c slti t8, t8, 8                            |     t8 = (t8 < 8) ? 1 : 0;
                                                         |     if (t8 == 0) {
    0x00409170 beqz t8, 0x409324                         |         goto label_6;
                                                         |     }
    0x00409174 nop                                       |     
    0x00409178 lw t8, 0x18(fp)                           |     t8 = *(arg_18h);
    0x0040917c addiu t8, t8, 4                           |     t8 += 4;
    0x00409180 lw t8, (t8)                               |     t8 = *(t8);
    0x00409184 move a0, t8                               |     a0 = t8;
    0x00409188 lw t8, -0x7f38(gp)                        |     t8 = sym.imp.atoi;
    0x0040918c move t9, t8                               |     t9 = t8;
    0x00409190 jalr t9                                   |     t9 ();
    0x00409194 nop                                       |     
    0x00409198 lw gp, 0x10(fp)                           |     gp = *(arg_10h);
    0x0040919c move t8, v0                               |     t8 = v0;
    0x004091a0 addiu v0, fp, 0x2c                        |     v0 = fp + 0x2c;
    0x004091a4 move a0, v0                               |     a0 = v0;
    0x004091a8 move a1, t8                               |     a1 = t8;
    0x004091ac lw t8, -0x7f3c(gp)                        |     t8 = *(gp);
    0x004091b0 move t9, t8                               |     t9 = t8;
    0x004091b4 jalr t9                                   |     t9 ();
    0x004091b8 nop                                       |     
    0x004091bc lw gp, 0x10(fp)                           |     gp = *(arg_10h);
    0x004091c0 addiu t8, fp, 0x2c                        |     t8 = fp + 0x2c;
    0x004091c4 move a0, t8                               |     a0 = t8;
    0x004091c8 lw t8, -0x7ec4(gp)                        |     t8 = *(gp);
    0x004091cc move t9, t8                               |     t9 = t8;
    0x004091d0 jalr t9                                   |     t9 ();
    0x004091d4 nop                                       |     
    0x004091d8 lw gp, 0x10(fp)                           |     gp = *(arg_10h);
    0x004091dc sw zero, 0x20(fp)                         |     *(arg_20h) = 0;
    0x004091e0 b 0x4092f0                                |     goto label_7;
    0x004091e4 nop                                       |     
                                                         |     do {
    0x004091e8 lw t8, 0x18(fp)                           |         t8 = *(arg_18h);
    0x004091ec addiu t8, t8, 8                           |         t8 += 8;
    0x004091f0 lw t8, (t8)                               |         t8 = *(t8);
    0x004091f4 addiu v0, fp, 0x3754                      |         v0 = fp + 0x3754;
    0x004091f8 move a0, v0                               |         a0 = v0;
    0x004091fc lw v0, -0x7fdc(gp)                        |         v0 = *((gp - 8183));
                                                         |         /* str.ping__c_1__w_1__s */
    0x00409200 addiu a1, v0, -0x4cb0                     |         a1 = v0 + -0x4cb0;
    0x00409204 move a2, t8                               |         a2 = t8;
    0x00409208 lw t8, -0x7f14(gp)                        |         t8 = sym.imp.sprintf;
    0x0040920c move t9, t8                               |         t9 = t8;
    0x00409210 jalr t9                                   |         t9 ();
    0x00409214 nop                                       |         
    0x00409218 lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x0040921c addiu t8, fp, 0x3754                      |         t8 = fp + 0x3754;
    0x00409220 move a0, t8                               |         a0 = t8;
    0x00409224 lw t8, -0x7fdc(gp)                        |         t8 = *((gp - 8183));
    0x00409228 addiu a1, t8, -0x4c9c                     |         a1 = t8 + -0x4c9c;
    0x0040922c lw t8, -0x7f48(gp)                        |         t8 = sym.imp.popen
    0x00409230 move t9, t8                               |         t9 = t8;
    0x00409234 jalr t9                                   |         t9 ();
    0x00409238 nop                                       |         
    0x0040923c lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x00409240 move t8, v0                               |         t8 = v0;
    0x00409244 sw t8, 0x24(fp)                           |         *(arg_24h) = t8;
    0x00409248 addiu t8, fp, 0x3554                      |         t8 = fp + 0x3554;
    0x0040924c move a0, t8                               |         a0 = t8;
    0x00409250 addiu a1, zero, 0x200                     |         a1 = 0x200;
    0x00409254 addiu a2, zero, 1                         |         a2 = 1;
    0x00409258 lw a3, 0x24(fp)                           |         a3 = *(arg_24h);
    0x0040925c lw t8, -0x7eb4(gp)                        |         t8 = sym.imp.fread;
    0x00409260 move t9, t8                               |         t9 = t8;
    0x00409264 jalr t9                                   |         t9 ();
    0x00409268 nop                                       |         
    0x0040926c lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x00409270 addiu t8, fp, 0x3554                      |         t8 = fp + 0x3554;
    0x00409274 move a0, t8                               |         a0 = t8;
    0x00409278 lw t8, -0x7fdc(gp)                        |         t8 = *((gp - 8183));
                                                         |         /* str.1_packets_received */
    0x0040927c addiu a1, t8, -0x4c98                     |         a1 = t8 + -0x4c98;
    0x00409280 lw t8, -0x7f24(gp)                        |         t8 = sym.imp.strstr;
    0x00409284 move t9, t8                               |         t9 = t8;
    0x00409288 jalr t9                                   |         t9 ();
    0x0040928c nop                                       |         
    0x00409290 lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x00409294 move t8, v0                               |         t8 = v0;
                                                         |         if (t8 != 0) {
    0x00409298 beqz t8, 0x4092c8                         |             
    0x0040929c nop                                       |             
    0x004092a0 lw t8, -0x7fdc(gp)                        |             t8 = *((gp - 8183));
                                                         |             /* esilref: 'ok' */
    0x004092a4 addiu a0, t8, -0x4d0c                     |             a0 = t8 + -0x4d0c;
    0x004092a8 lw t8, -0x7f4c(gp)                        |             t8 = sym.imp.puts;
    0x004092ac move t9, t8                               |             t9 = t8;
    0x004092b0 jalr t9                                   |             t9 ();
    0x004092b4 nop                                       |             
    0x004092b8 lw gp, 0x10(fp)                           |             gp = *(arg_10h);
    0x004092bc move s0, zero                             |             s0 = 0;
    0x004092c0 b 0x409340                                |             goto label_0;
    0x004092c4 nop                                       |             
                                                         |         }
    0x004092c8 lui t8, 7                                 |         t8 = 70000;
    0x004092cc ori a0, t8, 0xa120                        |         a0 = 0x7a120;
    0x004092d0 lw t8, -0x7e64(gp)                        |         t8 = sym.imp.usleep;
    0x004092d4 move t9, t8                               |         t9 = t8;
    0x004092d8 jalr t9                                   |         t9 ();
    0x004092dc nop                                       |         
    0x004092e0 lw gp, 0x10(fp)                           |         gp = *(arg_10h);
    0x004092e4 lw t8, 0x20(fp)                           |         t8 = *(arg_20h);
    0x004092e8 addiu t8, t8, 1                           |         t8++;
    0x004092ec sw t8, 0x20(fp)                           |         *(arg_20h) = t8;
                                                         | label_7:
    0x004092f0 lw t8, 0x20(fp)                           |         t8 = *(arg_20h);
    0x004092f4 slti t8, t8, 0xa                          |         t8 = (t8 < 0xa) ? 1 : 0;
    0x004092f8 bnez t8, 0x4091e8                         |         
                                                         |     } while (t8 != 0);
    0x004092fc nop                                       |     
    0x00409300 lw t8, -0x7fdc(gp)                        |     t8 = *((gp - 8183));
                                                         |     /* esilref: 'failed' */
    0x00409304 addiu a0, t8, -0x4cb8                     |     a0 = t8 + -0x4cb8;
    0x00409308 lw t8, -0x7f4c(gp)                        |     t8 = sym.imp.puts;
    0x0040930c move t9, t8                               |     t9 = t8;
    0x00409310 jalr t9                                   |     t9 ();
    0x00409314 nop                                       |     
    0x00409318 lw gp, 0x10(fp)                           |     gp = *(arg_10h);
    0x0040931c b 0x40933c                                |     goto label_2;
    0x00409320 nop                                       |     
                                                         | label_6:
    0x00409324 lw t8, -0x7fdc(gp)                        |     t8 = *((gp - 8183));
                                                         |     /* aav.0x00408be0 */
    0x00409328 addiu t8, t8, -0x7420                     |     t8 += -0x7420;
    0x0040932c move t9, t8                               |     t9 = t8;
    0x00409330 jalr t9                                   |     t9 ();
    0x00409334 nop                                       |     
    0x00409338 lw gp, 0x10(fp)                           |     gp = *(arg_10h);
                                                         | label_2:
    0x0040933c addiu s0, zero, 1                         |     s0 = 1;
                                                         | label_0:
    0x00409340 addiu t8, fp, 0x2c                        |     t8 = fp + 0x2c;
    0x00409344 move a0, t8                               |     a0 = t8;
    0x00409348 lw t8, -0x7e4c(gp)                        |     t8 = sym.imp.PIB::PIB__;
    0x0040934c move t9, t8                               |     t9 = t8;
    0x00409350 jalr t9                                   |     t9 ();
    0x00409354 nop                                       |     
    0x00409358 lw gp, 0x10(fp)                           |     gp = *(arg_10h);
    0x0040935c addiu t8, zero, 1                         |     t8 = 1;
                                                         |     if (s0 == t8) {
    0x00409360 bne s0, t8, 0x409478                      |         
    0x00409364 nop                                       |         
    0x00409368 nop                                       |         
    0x0040936c b 0x409478                                |         goto label_8;
    0x00409370 nop                                       |         
                                                         |     }
                                                         | label_8:
    0x00409478 lw t8, -0x7e58(gp)                        |     t8 = *((gp - 8086));
    0x0040947c lw v0, 0x3954(fp)                         |     v0 = *(arg_3954h);
    0x00409480 lw t8, (t8)                               |     t8 = *(t8);
                                                         |     if (v0 != t8) {
    0x00409484 beq v0, t8, 0x40949c                      |         
    0x00409488 nop                                       |         
    0x0040948c lw t8, -0x7ebc(gp)                        |         t8 = sym.imp.__stack_chk_fail;
    0x00409490 move t9, t8                               |         t9 = t8;
    0x00409494 jalr t9                                   |         t9 ();
    0x00409498 nop                                       |         
                                                         |     }
    0x0040949c move sp, fp                               |     
    0x004094a0 lw ra, 0x3964(sp)                         |     ra = *(arg_3964h);
    0x004094a4 lw fp, 0x3960(sp)                         |     fp = *(arg_3960h);
    0x004094a8 lw s0, 0x395c(sp)                         |     s0 = *(arg_395ch);
    0x004094ac addiu sp, sp, 0x3968                      |     
    0x004094b0 jr ra                                     |     return v0;
    0x004094b4 nop                                       |     
                                                         | }
    ; assembly                                   | /* r2dec pseudo code output */
                                                 | /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/bin/mfgbox @ 0x409b50 */
                                                 | #include <stdint.h>
                                                 |  
    ; (fcn) sym.checkWirelessCard_int_ ()        | void checkWirelessCard_int_ () {
                                                 |     /* checkWirelessCard(int) */
    0x00409b50 lui gp, 2                         |     
    0x00409b54 addiu gp, gp, -0x4b00             |     
    0x00409b58 addu gp, gp, t9                   |     gp += t9;
    0x00409b5c addiu sp, sp, -0xb0               |     
    0x00409b60 sw ra, 0xac(sp)                   |     *(var_ach) = ra;
    0x00409b64 sw fp, 0xa8(sp)                   |     *(var_a8h) = fp;
    0x00409b68 move fp, sp                       |     fp = sp;
    0x00409b6c sw gp, 0x10(sp)                   |     *(var_10h) = gp;
    0x00409b70 sw a0, 0x1c(fp)                   |     *(arg_1ch) = a0;
    0x00409b74 lw t8, -0x7e58(gp)                |     t8 = *((gp - 8086));
    0x00409b78 lw t8, (t8)                       |     t8 = *(t8);
    0x00409b7c sw t8, 0xa4(fp)                   |     *(arg_a4h) = t8;
    0x00409b80 lw v0, 0x1c(fp)                   |     v0 = *(arg_1ch);
    0x00409b84 addiu t8, zero, 1                 |     t8 = 1;
                                                 |     if (v0 == t8) {
    0x00409b88 bne v0, t8, 0x409cf4              |         
    0x00409b8c nop                               |         
    0x00409b90 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.cat__proc_bus_usb_devices___grep_Vendor2001 */
    0x00409b94 addiu a0, t8, -0x4b80             |         a0 = t8 + -0x4b80;
    0x00409b98 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
    0x00409b9c addiu a1, t8, -0x4b50             |         a1 = t8 + -0x4b50;
    0x00409ba0 lw t8, -0x7f48(gp)                |         t8 = sym.imp.popen
    0x00409ba4 move t9, t8                       |         t9 = t8;
    0x00409ba8 jalr t9                           |         t9 ();
    0x00409bac nop                               |         
    0x00409bb0 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00409bb4 move t8, v0                       |         t8 = v0;
    0x00409bb8 sw t8, 0x20(fp)                   |         *(arg_20h) = t8;
    0x00409bbc lw t8, 0x20(fp)                   |         t8 = *(arg_20h);
                                                 |         if (t8 == 0) {
    0x00409bc0 bnez t8, 0x409bf4                 |             
    0x00409bc4 nop                               |             
    0x00409bc8 lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* str.cat__proc_bus_usb_devices___grep_Vendor148f */
    0x00409bcc addiu a0, t8, -0x4b4c             |             a0 = t8 + -0x4b4c;
    0x00409bd0 lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
    0x00409bd4 addiu a1, t8, -0x4b50             |             a1 = t8 + -0x4b50;
    0x00409bd8 lw t8, -0x7f48(gp)                |             t8 = sym.imp.popen
    0x00409bdc move t9, t8                       |             t9 = t8;
    0x00409be0 jalr t9                           |             t9 ();
    0x00409be4 nop                               |             
    0x00409be8 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00409bec move t8, v0                       |             t8 = v0;
    0x00409bf0 sw t8, 0x20(fp)                   |             *(arg_20h) = t8;
                                                 |         }
    0x00409bf4 lw t8, 0x20(fp)                   |         t8 = *(arg_20h);
                                                 |         if (t8 != 0) {
    0x00409bf8 beqz t8, 0x409c28                 |             
    0x00409bfc nop                               |             
    0x00409c00 addiu t8, fp, 0x24                |             t8 = fp + 0x24;
    0x00409c04 move a0, t8                       |             a0 = t8;
    0x00409c08 addiu a1, zero, 1                 |             a1 = 1;
    0x00409c0c addiu a2, zero, 0x80              |             a2 = 0x80;
    0x00409c10 lw a3, 0x20(fp)                   |             a3 = *(arg_20h);
    0x00409c14 lw t8, -0x7eb4(gp)                |             t8 = sym.imp.fread;
    0x00409c18 move t9, t8                       |             t9 = t8;
    0x00409c1c jalr t9                           |             t9 ();
    0x00409c20 nop                               |             
    0x00409c24 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
                                                 |         }
    0x00409c28 addiu t8, fp, 0x24                |         t8 = fp + 0x24;
    0x00409c2c move a0, t8                       |         a0 = t8;
    0x00409c30 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.Vendor2001 */
    0x00409c34 addiu a1, t8, -0x4b1c             |         a1 = t8 + -0x4b1c;
    0x00409c38 lw t8, -0x7f24(gp)                |         t8 = sym.imp.strstr;
    0x00409c3c move t9, t8                       |         t9 = t8;
    0x00409c40 jalr t9                           |         t9 ();
    0x00409c44 nop                               |         
    0x00409c48 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00409c4c move t8, v0                       |         t8 = v0;
                                                 |         if (t8 == 0) {
    0x00409c50 bnez t8, 0x409cac                 |             
    0x00409c54 nop                               |             
    0x00409c58 addiu t8, fp, 0x24                |             t8 = fp + 0x24;
    0x00409c5c move a0, t8                       |             a0 = t8;
    0x00409c60 lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* str.Vendor148f */
    0x00409c64 addiu a1, t8, -0x4b10             |             a1 = t8 + -0x4b10;
    0x00409c68 lw t8, -0x7f24(gp)                |             t8 = sym.imp.strstr;
    0x00409c6c move t9, t8                       |             t9 = t8;
    0x00409c70 jalr t9                           |             t9 ();
    0x00409c74 nop                               |             
    0x00409c78 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00409c7c move t8, v0                       |             t8 = v0;
                                                 |             if (t8 != 0) {
    0x00409c80 bnez t8, 0x409cac                 |                 goto label_0;
                                                 |             }
    0x00409c84 nop                               |             
    0x00409c88 lw t8, -0x7fdc(gp)                |             t8 = *((gp - 8183));
                                                 |             /* str.Wireless_card_un_plug_ */
    0x00409c8c addiu a0, t8, -0x4b04             |             a0 = t8 + -0x4b04;
    0x00409c90 lw t8, -0x7f4c(gp)                |             t8 = sym.imp.puts;
    0x00409c94 move t9, t8                       |             t9 = t8;
    0x00409c98 jalr t9                           |             t9 ();
    0x00409c9c nop                               |             
    0x00409ca0 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
    0x00409ca4 b 0x409cc8                        |             goto label_1;
    0x00409ca8 nop                               |             
                                                 |         }
                                                 | label_0:
    0x00409cac lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.Wireless_card_pluged_ */
    0x00409cb0 addiu a0, t8, -0x4aec             |         a0 = t8 + -0x4aec;
    0x00409cb4 lw t8, -0x7f4c(gp)                |         t8 = sym.imp.puts;
    0x00409cb8 move t9, t8                       |         t9 = t8;
    0x00409cbc jalr t9                           |         t9 ();
    0x00409cc0 nop                               |         
    0x00409cc4 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
                                                 | label_1:
    0x00409cc8 lw t8, 0x20(fp)                   |         t8 = *(arg_20h);
                                                 |         if (t8 != 0) {
    0x00409ccc beqz t8, 0x409cec                 |             
    0x00409cd0 nop                               |             
    0x00409cd4 lw a0, 0x20(fp)                   |             a0 = *(arg_20h);
    0x00409cd8 lw t8, -0x7eac(gp)                |             t8 = sym.imp.pclose;
    0x00409cdc move t9, t8                       |             t9 = t8;
    0x00409ce0 jalr t9                           |             t9 ();
    0x00409ce4 nop                               |             
    0x00409ce8 lw gp, 0x10(fp)                   |             gp = *(arg_10h);
                                                 |         }
    0x00409cec b 0x409d10                        |         goto label_2;
    0x00409cf0 nop                               |         
                                                 |     }
    0x00409cf4 lw t8, -0x7fdc(gp)                |     t8 = *((gp - 8183));
                                                 |     /* str.Bad_argument._n_ */
    0x00409cf8 addiu a0, t8, -0x4ad4             |     a0 = t8 + -0x4ad4;
    0x00409cfc lw t8, -0x7f44(gp)                |     t8 = sym.imp.printf;
    0x00409d00 move t9, t8                       |     t9 = t8;
    0x00409d04 jalr t9                           |     t9 ();
    0x00409d08 nop                               |     
    0x00409d0c lw gp, 0x10(fp)                   |     gp = *(arg_10h);
                                                 | label_2:
    0x00409d10 lw t8, -0x7e58(gp)                |     t8 = *((gp - 8086));
    0x00409d14 lw v0, 0xa4(fp)                   |     v0 = *(arg_a4h);
    0x00409d18 lw t8, (t8)                       |     t8 = *(t8);
                                                 |     if (v0 != t8) {
    0x00409d1c beq v0, t8, 0x409d34              |         
    0x00409d20 nop                               |         
    0x00409d24 lw t8, -0x7ebc(gp)                |         t8 = sym.imp.__stack_chk_fail;
    0x00409d28 move t9, t8                       |         t9 = t8;
    0x00409d2c jalr t9                           |         t9 ();
    0x00409d30 nop                               |         
                                                 |     }
    0x00409d34 move sp, fp                       |     
    0x00409d38 lw ra, 0xac(sp)                   |     ra = *(var_ach);
    0x00409d3c lw fp, 0xa8(sp)                   |     fp = *(var_a8h);
    0x00409d40 addiu sp, sp, 0xb0                |     
    0x00409d44 jr ra                             |     return v0;
    0x00409d48 nop                               |     
                                                 | }
    ; assembly                                   | /* r2dec pseudo code output */
                                                 | /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/bin/mfgbox @ 0x407394 */
                                                 | #include <stdint.h>
                                                 |  
    ; (fcn) sym.test_char_const__char_ ()        | void test_char_const_char_ () {
                                                 |     /* test(char const*, char*) */
    0x00407394 lui gp, 2                         |     
    0x00407398 addiu gp, gp, -0x2344             |     
    0x0040739c addu gp, gp, t9                   |     gp += t9;
    0x004073a0 addiu sp, sp, -0x238              |     
    0x004073a4 sw ra, 0x234(sp)                  |     *(var_234h) = ra;
    0x004073a8 sw fp, 0x230(sp)                  |     *(var_230h) = fp;
    0x004073ac move fp, sp                       |     fp = sp;
    0x004073b0 sw gp, 0x10(sp)                   |     *(var_10h) = gp;
    0x004073b4 sw a0, 0x1c(fp)                   |     *(arg_1ch) = a0;
    0x004073b8 sw a1, 0x18(fp)                   |     *(arg_18h) = a1;
    0x004073bc lw t8, -0x7e58(gp)                |     t8 = *((gp - 8086));
    0x004073c0 lw t8, (t8)                       |     t8 = *(t8);
    0x004073c4 sw t8, 0x22c(fp)                  |     *(arg_22ch) = t8;
    0x004073c8 addiu t8, fp, 0x2c                |     t8 = fp + 0x2c;
    0x004073cc move a0, t8                       |     a0 = t8;
    0x004073d0 lw t8, -0x7fdc(gp)                |     t8 = *((gp - 8183));
                                                 |     /* str.mii_tool__F__s____dev_null_2___dev_null */
    0x004073d4 addiu a1, t8, -0x5200             |     a1 = t8 + -0x5200;
    0x004073d8 lw a2, 0x1c(fp)                   |     a2 = *(arg_1ch);
    0x004073dc lw t8, -0x7f14(gp)                |     t8 = sym.imp.sprintf;
    0x004073e0 move t9, t8                       |     t9 = t8;
    0x004073e4 jalr t9                           |     t9 ();
    0x004073e8 nop                               |     
    0x004073ec lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x004073f0 addiu t8, fp, 0x2c                |     t8 = fp + 0x2c;
    0x004073f4 move a0, t8                       |     a0 = t8;
    0x004073f8 lw t8, -0x7e5c(gp)                |     t8 = sym.imp.system;
    0x004073fc move t9, t8                       |     t9 = t8;
    0x00407400 jalr t9                           |     t9 ();
    0x00407404 nop                               |     
    0x00407408 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x0040740c sw zero, 0x24(fp)                 |     *(arg_24h) = 0;
    0x00407410 b 0x4074d8                        |     goto label_0;
    0x00407414 nop                               |     
                                                 |     do {
    0x00407418 lui t8, 7                         |         t8 = 70000;
    0x0040741c ori a0, t8, 0xa120                |         a0 = 0x7a120;
    0x00407420 lw t8, -0x7e64(gp)                |         t8 = sym.imp.usleep;
    0x00407424 move t9, t8                       |         t9 = t8;
    0x00407428 jalr t9                           |         t9 ();
    0x0040742c nop                               |         
    0x00407430 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407434 lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.mii_tool_eth0 */
    0x00407438 addiu a0, t8, -0x51d8             |         a0 = t8 + -0x51d8;
    0x0040743c lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
    0x00407440 addiu a1, t8, -0x51c8             |         a1 = t8 + -0x51c8;
    0x00407444 lw t8, -0x7f48(gp)                |         t8 = sym.imp.popen
    0x00407448 move t9, t8                       |         t9 = t8;
    0x0040744c jalr t9                           |         t9 ();
    0x00407450 nop                               |         
    0x00407454 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407458 move t8, v0                       |         t8 = v0;
    0x0040745c sw t8, 0x28(fp)                   |         *(arg_28h) = t8;
    0x00407460 lw a0, 0x18(fp)                   |         a0 = *(arg_18h);
    0x00407464 addiu a1, zero, 0x200             |         a1 = 0x200;
    0x00407468 lw a2, 0x28(fp)                   |         a2 = *(arg_28h);
    0x0040746c lw t8, -0x7ee8(gp)                |         t8 = sym.imp.fgets;
    0x00407470 move t9, t8                       |         t9 = t8;
    0x00407474 jalr t9                           |         t9 ();
    0x00407478 nop                               |         
    0x0040747c lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407480 lw a0, 0x28(fp)                   |         a0 = *(arg_28h);
    0x00407484 lw t8, -0x7eac(gp)                |         t8 = sym.imp.pclose;
    0x00407488 move t9, t8                       |         t9 = t8;
    0x0040748c jalr t9                           |         t9 ();
    0x00407490 nop                               |         
    0x00407494 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x00407498 lw a0, 0x18(fp)                   |         a0 = *(arg_18h);
    0x0040749c lw t8, -0x7fdc(gp)                |         t8 = *((gp - 8183));
                                                 |         /* str.link_ok */
    0x004074a0 addiu a1, t8, -0x51c4             |         a1 = t8 + -0x51c4;
    0x004074a4 lw t8, -0x7f24(gp)                |         t8 = sym.imp.strstr;
    0x004074a8 move t9, t8                       |         t9 = t8;
    0x004074ac jalr t9                           |         t9 ();
    0x004074b0 nop                               |         
    0x004074b4 lw gp, 0x10(fp)                   |         gp = *(arg_10h);
    0x004074b8 move t8, v0                       |         t8 = v0;
                                                 |         if (t8 != 0) {
    0x004074bc beqz t8, 0x4074cc                 |             
    0x004074c0 nop                               |             
    0x004074c4 b 0x4074e8                        |             goto label_1;
    0x004074c8 nop                               |             
                                                 |         }
    0x004074cc lw t8, 0x24(fp)                   |         t8 = *(arg_24h);
    0x004074d0 addiu t8, t8, 1                   |         t8++;
    0x004074d4 sw t8, 0x24(fp)                   |         *(arg_24h) = t8;
                                                 | label_0:
    0x004074d8 lw t8, 0x24(fp)                   |         t8 = *(arg_24h);
    0x004074dc slti t8, t8, 6                    |         t8 = (t8 < 6) ? 1 : 0;
    0x004074e0 bnez t8, 0x407418                 |         
                                                 |     } while (t8 != 0);
    0x004074e4 nop                               |     
                                                 | label_1:
    0x004074e8 lw t8, -0x7e58(gp)                |     t8 = *((gp - 8086));
    0x004074ec lw v0, 0x22c(fp)                  |     v0 = *(arg_22ch);
    0x004074f0 lw t8, (t8)                       |     t8 = *(t8);
                                                 |     if (v0 != t8) {
    0x004074f4 beq v0, t8, 0x40750c              |         
    0x004074f8 nop                               |         
    0x004074fc lw t8, -0x7ebc(gp)                |         t8 = sym.imp.__stack_chk_fail;
    0x00407500 move t9, t8                       |         t9 = t8;
    0x00407504 jalr t9                           |         t9 ();
    0x00407508 nop                               |         
                                                 |     }
    0x0040750c move sp, fp                       |     
    0x00407510 lw ra, 0x234(sp)                  |     ra = *(var_234h);
    0x00407514 lw fp, 0x230(sp)                  |     fp = *(var_230h);
    0x00407518 addiu sp, sp, 0x238               |     
    0x0040751c jr ra                             |     return v0;
    0x00407520 nop                               |     
                                                 | }

[*] Function popen used 16 times mfgbox