[*] Binary protection state of mfgbox
Full RELRO Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function printf 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 @ 0x405204 */
| #include <stdint.h>
|
; (fcn) sym.GetFWVersion_int_ () | void GetFWVersion_int_ () {
| /* GetFWVersion(int) */
0x00405204 lui gp, 2 |
0x00405208 addiu gp, gp, -0x1b4 |
0x0040520c addu gp, gp, t9 | gp += t9;
0x00405210 addiu sp, sp, -0x1070 |
0x00405214 sw ra, 0x106c(sp) | *(var_106ch) = ra;
0x00405218 sw fp, 0x1068(sp) | *(var_1068h) = fp;
0x0040521c sw s1, 0x1064(sp) | *(var_1064h) = s1;
0x00405220 sw s0, 0x1060(sp) | *(var_1060h) = s0;
0x00405224 move fp, sp | fp = sp;
0x00405228 sw gp, 0x10(sp) | *(var_10h) = gp;
0x0040522c sw a0, 0x1c(fp) | *(arg_1ch) = a0;
0x00405230 lw t8, -0x7e58(gp) | t8 = *((gp - 8086));
0x00405234 lw t8, (t8) | t8 = *(t8);
0x00405238 sw t8, 0x105c(fp) | *(arg_105ch) = t8;
0x0040523c addiu t8, fp, 0x44 | t8 = fp + 0x44;
0x00405240 move a0, t8 | a0 = t8;
0x00405244 lw t8, -0x7f80(gp) | t8 = *(gp);
0x00405248 move t9, t8 | t9 = t8;
0x0040524c jalr t9 | t9 ();
0x00405250 nop |
0x00405254 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405258 lw v0, 0x1c(fp) | v0 = *(arg_1ch);
0x0040525c addiu t8, zero, 1 | t8 = 1;
| if (v0 != t8) {
0x00405260 beq v0, t8, 0x40528c |
0x00405264 nop |
0x00405268 lw t8, -0x7f8c(gp) | t8 = *(gp);
| /* aav.0x00405180 */
0x0040526c addiu t8, t8, 0x5180 | t8 += 0x5180;
0x00405270 move t9, t8 | t9 = t8;
0x00405274 jalr t9 | t9 ();
0x00405278 nop |
0x0040527c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405280 move s0, zero | s0 = 0;
0x00405284 b 0x4056b4 | goto label_0;
0x00405288 nop |
| }
0x0040528c addiu t8, fp, 0x44 | t8 = fp + 0x44;
0x00405290 move a0, t8 | a0 = t8;
0x00405294 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* str.System */
0x00405298 addiu a1, t8, -0x5618 | a1 = t8 + -0x5618;
0x0040529c move a2, zero | a2 = 0;
0x004052a0 lw t8, -0x7f1c(gp) | t8 = *(gp);
0x004052a4 move t9, t8 | t9 = t8;
0x004052a8 jalr t9 | t9 ();
0x004052ac nop |
0x004052b0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004052b4 addiu t8, fp, 0x34 | t8 = fp + 0x34;
0x004052b8 move a0, t8 | a0 = t8;
0x004052bc lw t8, -0x7f40(gp) | t8 = *(gp);
0x004052c0 move t9, t8 | t9 = t8;
0x004052c4 jalr t9 | t9 ();
0x004052c8 nop |
0x004052cc lw gp, 0x10(fp) | gp = *(arg_10h);
0x004052d0 addiu v0, fp, 0x38 | v0 = fp + 0x38;
0x004052d4 addiu t8, fp, 0x34 | t8 = fp + 0x34;
0x004052d8 move a0, v0 | a0 = v0;
0x004052dc lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str.Version */
0x004052e0 addiu a1, v0, -0x5610 | a1 = v0 + -0x5610;
0x004052e4 move a2, t8 | a2 = t8;
0x004052e8 lw t8, -0x7ed4(gp) | t8 = *(gp);
0x004052ec move t9, t8 | t9 = t8;
0x004052f0 jalr t9 | t9 ();
0x004052f4 nop |
0x004052f8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004052fc addiu v1, fp, 0x24 | v1 = fp + 0x24;
0x00405300 addiu v0, fp, 0x44 | v0 = fp + 0x44;
0x00405304 addiu t8, fp, 0x38 | t8 = fp + 0x38;
0x00405308 move a0, v1 | a0 = v1;
0x0040530c move a1, v0 | a1 = v0;
0x00405310 move a2, t8 | a2 = t8;
0x00405314 lw t8, -0x7ecc(gp) | t8 = *(gp);
0x00405318 move t9, t8 | t9 = t8;
0x0040531c jalr t9 | t9 ();
0x00405320 nop |
0x00405324 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405328 addiu t8, fp, 0x38 | t8 = fp + 0x38;
0x0040532c move a0, t8 | a0 = t8;
0x00405330 lw t8, -0x7e9c(gp) | t8 = *(gp);
0x00405334 move t9, t8 | t9 = t8;
0x00405338 jalr t9 | t9 ();
0x0040533c nop |
0x00405340 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405344 addiu t8, fp, 0x34 | t8 = fp + 0x34;
0x00405348 move a0, t8 | a0 = t8;
0x0040534c lw t8, -0x7f0c(gp) | t8 = *(gp);
0x00405350 move t9, t8 | t9 = t8;
0x00405354 jalr t9 | t9 ();
0x00405358 nop |
0x0040535c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405360 addiu t8, fp, 0x38 | t8 = fp + 0x38;
0x00405364 move a0, t8 | a0 = t8;
0x00405368 lw t8, -0x7f40(gp) | t8 = *(gp);
0x0040536c move t9, t8 | t9 = t8;
0x00405370 jalr t9 | t9 ();
0x00405374 nop |
0x00405378 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040537c addiu v0, fp, 0x2c | v0 = fp + 0x2c;
0x00405380 addiu t8, fp, 0x38 | t8 = fp + 0x38;
0x00405384 move a0, v0 | a0 = v0;
0x00405388 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str.OEMVersion */
0x0040538c addiu a1, v0, -0x5608 | a1 = v0 + -0x5608;
0x00405390 move a2, t8 | a2 = t8;
0x00405394 lw t8, -0x7ed4(gp) | t8 = *(gp);
0x00405398 move t9, t8 | t9 = t8;
0x0040539c jalr t9 | t9 ();
0x004053a0 nop |
0x004053a4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004053a8 addiu v1, fp, 0x28 | v1 = fp + 0x28;
0x004053ac addiu v0, fp, 0x44 | v0 = fp + 0x44;
0x004053b0 addiu t8, fp, 0x2c | t8 = fp + 0x2c;
0x004053b4 move a0, v1 | a0 = v1;
0x004053b8 move a1, v0 | a1 = v0;
0x004053bc move a2, t8 | a2 = t8;
0x004053c0 lw t8, -0x7ecc(gp) | t8 = *(gp);
0x004053c4 move t9, t8 | t9 = t8;
0x004053c8 jalr t9 | t9 ();
0x004053cc nop |
0x004053d0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004053d4 addiu t8, fp, 0x2c | t8 = fp + 0x2c;
0x004053d8 move a0, t8 | a0 = t8;
0x004053dc lw t8, -0x7e9c(gp) | t8 = *(gp);
0x004053e0 move t9, t8 | t9 = t8;
0x004053e4 jalr t9 | t9 ();
0x004053e8 nop |
0x004053ec lw gp, 0x10(fp) | gp = *(arg_10h);
0x004053f0 addiu t8, fp, 0x38 | t8 = fp + 0x38;
0x004053f4 move a0, t8 | a0 = t8;
0x004053f8 lw t8, -0x7f0c(gp) | t8 = *(gp);
0x004053fc move t9, t8 | t9 = t8;
0x00405400 jalr t9 | t9 ();
0x00405404 nop |
0x00405408 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040540c addiu t8, fp, 0x38 | t8 = fp + 0x38;
0x00405410 move a0, t8 | a0 = t8;
0x00405414 lw t8, -0x7f40(gp) | t8 = *(gp);
0x00405418 move t9, t8 | t9 = t8;
0x0040541c jalr t9 | t9 ();
0x00405420 nop |
0x00405424 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405428 addiu v0, fp, 0x34 | v0 = fp + 0x34;
0x0040542c addiu t8, fp, 0x38 | t8 = fp + 0x38;
0x00405430 move a0, v0 | a0 = v0;
0x00405434 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str.OEMBuild */
0x00405438 addiu a1, v0, -0x55fc | a1 = v0 + -0x55fc;
0x0040543c move a2, t8 | a2 = t8;
0x00405440 lw t8, -0x7ed4(gp) | t8 = *(gp);
0x00405444 move t9, t8 | t9 = t8;
0x00405448 jalr t9 | t9 ();
0x0040544c nop |
0x00405450 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405454 addiu v1, fp, 0x30 | v1 = fp + 0x30;
0x00405458 addiu v0, fp, 0x44 | v0 = fp + 0x44;
0x0040545c addiu t8, fp, 0x34 | t8 = fp + 0x34;
0x00405460 move a0, v1 | a0 = v1;
0x00405464 move a1, v0 | a1 = v0;
0x00405468 move a2, t8 | a2 = t8;
0x0040546c lw t8, -0x7ecc(gp) | t8 = *(gp);
0x00405470 move t9, t8 | t9 = t8;
0x00405474 jalr t9 | t9 ();
0x00405478 nop |
0x0040547c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405480 addiu t8, fp, 0x34 | t8 = fp + 0x34;
0x00405484 move a0, t8 | a0 = t8;
0x00405488 lw t8, -0x7e9c(gp) | t8 = *(gp);
0x0040548c move t9, t8 | t9 = t8;
0x00405490 jalr t9 | t9 ();
0x00405494 nop |
0x00405498 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040549c addiu t8, fp, 0x38 | t8 = fp + 0x38;
0x004054a0 move a0, t8 | a0 = t8;
0x004054a4 lw t8, -0x7f0c(gp) | t8 = *(gp);
0x004054a8 move t9, t8 | t9 = t8;
0x004054ac jalr t9 | t9 ();
0x004054b0 nop |
0x004054b4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004054b8 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x004054bc move a0, t8 | a0 = t8;
0x004054c0 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
0x004054c4 addiu a1, t8, -0x55f0 | a1 = t8 + -0x55f0;
0x004054c8 move a2, zero | a2 = 0;
0x004054cc lw t8, -0x7e8c(gp) | t8 = *(gp);
0x004054d0 move t9, t8 | t9 = t8;
0x004054d4 jalr t9 | t9 ();
0x004054d8 nop |
0x004054dc lw gp, 0x10(fp) | gp = *(arg_10h);
0x004054e0 move t8, v0 | t8 = v0;
0x004054e4 sw t8, 0x3c(fp) | *(arg_3ch) = t8;
0x004054e8 lw v0, 0x3c(fp) | v0 = *(arg_3ch);
0x004054ec addiu t8, zero, -1 | t8 = -1;
| if (v0 == t8) {
0x004054f0 bne v0, t8, 0x405520 |
0x004054f4 nop |
0x004054f8 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* str.failed_ */
0x004054fc addiu a0, t8, -0x55ec | a0 = t8 + -0x55ec;
0x00405500 lw t8, -0x7f4c(gp) | t8 = sym.imp.puts;
0x00405504 move t9, t8 | t9 = t8;
0x00405508 jalr t9 | t9 ();
0x0040550c nop |
0x00405510 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405514 move s0, zero | s0 = 0;
0x00405518 b 0x4055f8 | goto label_1;
0x0040551c nop |
| }
0x00405520 lw t8, 0x3c(fp) | t8 = *(arg_3ch);
0x00405524 addiu v1, fp, 0x38 | v1 = fp + 0x38;
0x00405528 addiu v0, fp, 0x24 | v0 = fp + 0x24;
0x0040552c move a0, v1 | a0 = v1;
0x00405530 move a1, v0 | a1 = v0;
0x00405534 move a2, t8 | a2 = t8;
0x00405538 addiu a3, zero, -1 | a3 = -1;
0x0040553c lw t8, -0x7ef4(gp) | t8 = *(gp);
0x00405540 move t9, t8 | t9 = t8;
0x00405544 jalr t9 | t9 ();
0x00405548 nop |
0x0040554c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405550 addiu t8, fp, 0x28 | t8 = fp + 0x28;
0x00405554 move a0, t8 | a0 = t8;
0x00405558 lw t8, -0x7e6c(gp) | t8 = *(gp);
0x0040555c move t9, t8 | t9 = t8;
0x00405560 jalr t9 | t9 ();
0x00405564 nop |
0x00405568 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040556c move s1, v0 | s1 = v0;
0x00405570 addiu t8, fp, 0x30 | t8 = fp + 0x30;
0x00405574 move a0, t8 | a0 = t8;
0x00405578 lw t8, -0x7e6c(gp) | t8 = *(gp);
0x0040557c move t9, t8 | t9 = t8;
0x00405580 jalr t9 | t9 ();
0x00405584 nop |
0x00405588 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040558c move s0, v0 | s0 = v0;
0x00405590 addiu t8, fp, 0x38 | t8 = fp + 0x38;
0x00405594 move a0, t8 | a0 = t8;
0x00405598 lw t8, -0x7e6c(gp) | t8 = *(gp);
0x0040559c move t9, t8 | t9 = t8;
0x004055a0 jalr t9 | t9 ();
0x004055a4 nop |
0x004055a8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004055ac move t8, v0 | t8 = v0;
0x004055b0 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str._s._s_s_n */
0x004055b4 addiu a0, v0, -0x55e4 | a0 = v0 + -0x55e4;
0x004055b8 move a1, s1 | a1 = s1;
0x004055bc move a2, s0 | a2 = s0;
0x004055c0 move a3, t8 | a3 = t8;
0x004055c4 lw t8, -0x7f44(gp) | t8 = sym.imp.printf
0x004055c8 move t9, t8 | t9 = t8;
0x004055cc jalr t9 | t9 ();
0x004055d0 nop |
0x004055d4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004055d8 addiu t8, fp, 0x38 | t8 = fp + 0x38;
0x004055dc move a0, t8 | a0 = t8;
0x004055e0 lw t8, -0x7e9c(gp) | t8 = *(gp);
0x004055e4 move t9, t8 | t9 = t8;
0x004055e8 jalr t9 | t9 ();
0x004055ec nop |
0x004055f0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004055f4 addiu s0, zero, 1 | s0 = 1;
| label_1:
0x004055f8 addiu t8, fp, 0x30 | t8 = fp + 0x30;
0x004055fc move a0, t8 | a0 = t8;
0x00405600 lw t8, -0x7e9c(gp) | t8 = *(gp);
0x00405604 move t9, t8 | t9 = t8;
0x00405608 jalr t9 | t9 ();
0x0040560c nop |
0x00405610 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405614 addiu t8, zero, 1 | t8 = 1;
| if (s0 != t8) {
0x00405618 beq s0, t8, 0x40562c |
0x0040561c nop |
0x00405620 move s0, zero | s0 = 0;
0x00405624 b 0x405634 | goto label_2;
0x00405628 nop |
| }
0x0040562c nop |
0x00405630 addiu s0, zero, 1 | s0 = 1;
| label_2:
0x00405634 addiu t8, fp, 0x28 | t8 = fp + 0x28;
0x00405638 move a0, t8 | a0 = t8;
0x0040563c lw t8, -0x7e9c(gp) | t8 = *(gp);
0x00405640 move t9, t8 | t9 = t8;
0x00405644 jalr t9 | t9 ();
0x00405648 nop |
0x0040564c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405650 addiu t8, zero, 1 | t8 = 1;
| if (s0 != t8) {
0x00405654 beq s0, t8, 0x405668 |
0x00405658 nop |
0x0040565c move s0, zero | s0 = 0;
0x00405660 b 0x405670 | goto label_3;
0x00405664 nop |
| }
0x00405668 nop |
0x0040566c addiu s0, zero, 1 | s0 = 1;
| label_3:
0x00405670 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00405674 move a0, t8 | a0 = t8;
0x00405678 lw t8, -0x7e9c(gp) | t8 = *(gp);
0x0040567c move t9, t8 | t9 = t8;
0x00405680 jalr t9 | t9 ();
0x00405684 nop |
0x00405688 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040568c addiu t8, zero, 1 | t8 = 1;
| if (s0 == t8) {
0x00405690 bne s0, t8, 0x4056a4 |
0x00405694 nop |
0x00405698 nop |
0x0040569c b 0x4056b0 | goto label_4;
0x004056a0 nop |
| }
0x004056a4 move s0, zero | s0 = 0;
0x004056a8 b 0x4056b4 | goto label_0;
0x004056ac nop |
| label_4:
0x004056b0 addiu s0, zero, 1 | s0 = 1;
| label_0:
0x004056b4 addiu t8, fp, 0x44 | t8 = fp + 0x44;
0x004056b8 move a0, t8 | a0 = t8;
0x004056bc lw t8, -0x7f04(gp) | t8 = sym.imp.TinyDB::TinyDB__;
0x004056c0 move t9, t8 | t9 = t8;
0x004056c4 jalr t9 | t9 ();
0x004056c8 nop |
0x004056cc lw gp, 0x10(fp) | gp = *(arg_10h);
0x004056d0 addiu t8, zero, 1 | t8 = 1;
| if (s0 == t8) {
0x004056d4 bne s0, t8, 0x405a74 |
0x004056d8 nop |
0x004056dc nop |
0x004056e0 b 0x405a74 | goto label_5;
0x004056e4 nop |
| }
| label_5:
0x00405a74 lw t8, -0x7e58(gp) | t8 = *((gp - 8086));
0x00405a78 lw v0, 0x105c(fp) | v0 = *(arg_105ch);
0x00405a7c lw t8, (t8) | t8 = *(t8);
| if (v0 != t8) {
0x00405a80 beq v0, t8, 0x405a98 |
0x00405a84 nop |
0x00405a88 lw t8, -0x7ebc(gp) | t8 = sym.imp.__stack_chk_fail;
0x00405a8c move t9, t8 | t9 = t8;
0x00405a90 jalr t9 | t9 ();
0x00405a94 nop |
| }
0x00405a98 move sp, fp |
0x00405a9c lw ra, 0x106c(sp) | ra = *(var_106ch);
0x00405aa0 lw fp, 0x1068(sp) | fp = *(var_1068h);
0x00405aa4 lw s1, 0x1064(sp) | s1 = *(var_1064h);
0x00405aa8 lw s0, 0x1060(sp) | s0 = *(var_1060h);
0x00405aac addiu sp, sp, 0x1070 |
0x00405ab0 jr ra | return v0;
0x00405ab4 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/bin/mfgbox @ 0x405b44 */
| #include <stdint.h>
|
; (fcn) sym.GetTVOutFormat_int_ () | void GetTVOutFormat_int_ () {
| /* GetTVOutFormat(int) */
0x00405b44 lui gp, 2 |
0x00405b48 addiu gp, gp, -0xaf4 |
0x00405b4c addu gp, gp, t9 | gp += t9;
0x00405b50 addiu sp, sp, -0x1050 |
0x00405b54 sw ra, 0x104c(sp) | *(var_104ch) = ra;
0x00405b58 sw fp, 0x1048(sp) | *(var_1048h) = fp;
0x00405b5c sw s0, 0x1044(sp) | *(var_1044h) = s0;
0x00405b60 move fp, sp | fp = sp;
0x00405b64 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00405b68 sw a0, 0x1c(fp) | *(arg_1ch) = a0;
0x00405b6c lw t8, -0x7e58(gp) | t8 = *((gp - 8086));
0x00405b70 lw t8, (t8) | t8 = *(t8);
0x00405b74 sw t8, 0x103c(fp) | *(arg_103ch) = t8;
0x00405b78 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00405b7c move a0, t8 | a0 = t8;
0x00405b80 lw t8, -0x7f80(gp) | t8 = *(gp);
0x00405b84 move t9, t8 | t9 = t8;
0x00405b88 jalr t9 | t9 ();
0x00405b8c nop |
0x00405b90 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405b94 lw v0, 0x1c(fp) | v0 = *(arg_1ch);
0x00405b98 addiu t8, zero, 1 | t8 = 1;
| if (v0 != t8) {
0x00405b9c beq v0, t8, 0x405bc8 |
0x00405ba0 nop |
0x00405ba4 lw t8, -0x7f8c(gp) | t8 = *(gp);
| /* aav.0x00405ac0 */
0x00405ba8 addiu t8, t8, 0x5ac0 | t8 += 0x5ac0;
0x00405bac move t9, t8 | t9 = t8;
0x00405bb0 jalr t9 | t9 ();
0x00405bb4 nop |
0x00405bb8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405bbc move s0, zero | s0 = 0;
0x00405bc0 b 0x405ca0 | goto label_0;
0x00405bc4 nop |
| }
0x00405bc8 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00405bcc move a0, t8 | a0 = t8;
0x00405bd0 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* str.TV_OUT */
0x00405bd4 addiu a1, t8, -0x55a4 | a1 = t8 + -0x55a4;
0x00405bd8 move a2, zero | a2 = 0;
0x00405bdc lw t8, -0x7f1c(gp) | t8 = *(gp);
0x00405be0 move t9, t8 | t9 = t8;
0x00405be4 jalr t9 | t9 ();
0x00405be8 nop |
0x00405bec lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405bf0 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00405bf4 move a0, t8 | a0 = t8;
0x00405bf8 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* str.OutputType */
0x00405bfc addiu a1, t8, -0x559c | a1 = t8 + -0x559c;
0x00405c00 lw t8, -0x7eb8(gp) | t8 = *(gp);
0x00405c04 move t9, t8 | t9 = t8;
0x00405c08 jalr t9 | t9 ();
0x00405c0c nop |
0x00405c10 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405c14 move t8, v0 | t8 = v0;
0x00405c18 sb t8, 0x23(fp) | *(arg_23h) = t8;
0x00405c1c lb t8, 0x23(fp) | t8 = *(arg_23h);
| if (t8 == 0) {
0x00405c20 bnez t8, 0x405c4c |
0x00405c24 nop |
0x00405c28 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* str.NTSC */
0x00405c2c addiu a0, t8, -0x5590 | a0 = t8 + -0x5590;
0x00405c30 lw t8, -0x7f4c(gp) | t8 = sym.imp.puts;
0x00405c34 move t9, t8 | t9 = t8;
0x00405c38 jalr t9 | t9 ();
0x00405c3c nop |
0x00405c40 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405c44 b 0x405c9c | goto label_1;
0x00405c48 nop |
| }
0x00405c4c lb v0, 0x23(fp) | v0 = *(arg_23h);
0x00405c50 addiu t8, zero, 1 | t8 = 1;
| if (v0 == t8) {
0x00405c54 bne v0, t8, 0x405c80 |
0x00405c58 nop |
0x00405c5c lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* str.PAL_ */
0x00405c60 addiu a0, t8, -0x5588 | a0 = t8 + -0x5588;
0x00405c64 lw t8, -0x7f4c(gp) | t8 = sym.imp.puts;
0x00405c68 move t9, t8 | t9 = t8;
0x00405c6c jalr t9 | t9 ();
0x00405c70 nop |
0x00405c74 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405c78 b 0x405c9c | goto label_1;
0x00405c7c nop |
| }
0x00405c80 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* str.unknow_type */
0x00405c84 addiu a0, t8, -0x5580 | a0 = t8 + -0x5580;
0x00405c88 lw t8, -0x7f44(gp) | t8 = sym.imp.printf
0x00405c8c move t9, t8 | t9 = t8;
0x00405c90 jalr t9 | t9 ();
0x00405c94 nop |
0x00405c98 lw gp, 0x10(fp) | gp = *(arg_10h);
| label_1:
0x00405c9c addiu s0, zero, 1 | s0 = 1;
| label_0:
0x00405ca0 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00405ca4 move a0, t8 | a0 = t8;
0x00405ca8 lw t8, -0x7f04(gp) | t8 = sym.imp.TinyDB::TinyDB__;
0x00405cac move t9, t8 | t9 = t8;
0x00405cb0 jalr t9 | t9 ();
0x00405cb4 nop |
0x00405cb8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00405cbc addiu t8, zero, 1 | t8 = 1;
| if (s0 != t8) {
0x00405cc0 beq s0, t8, 0x405cd0 |
0x00405cc4 nop |
0x00405cc8 b 0x405d18 | goto label_2;
0x00405ccc nop |
| }
0x00405cd0 nop |
0x00405cd4 b 0x405d18 | goto label_2;
0x00405cd8 nop |
| label_2:
0x00405d18 lw t8, -0x7e58(gp) | t8 = *((gp - 8086));
0x00405d1c lw v0, 0x103c(fp) | v0 = *(arg_103ch);
0x00405d20 lw t8, (t8) | t8 = *(t8);
| if (v0 != t8) {
0x00405d24 beq v0, t8, 0x405d3c |
0x00405d28 nop |
0x00405d2c lw t8, -0x7ebc(gp) | t8 = sym.imp.__stack_chk_fail;
0x00405d30 move t9, t8 | t9 = t8;
0x00405d34 jalr t9 | t9 ();
0x00405d38 nop |
| }
0x00405d3c move sp, fp |
0x00405d40 lw ra, 0x104c(sp) | ra = *(var_104ch);
0x00405d44 lw fp, 0x1048(sp) | fp = *(var_1048h);
0x00405d48 lw s0, 0x1044(sp) | s0 = *(var_1044h);
0x00405d4c addiu sp, sp, 0x1050 |
0x00405d50 jr ra | return v0;
0x00405d54 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/bin/mfgbox @ 0x4083b4 */
| #include <stdint.h>
|
; (fcn) sym.SensorCaps_int__char_const_ () | void SensorCaps_int_char_const_ () {
| /* SensorCaps(int, char const**) */
0x004083b4 lui gp, 2 |
0x004083b8 addiu gp, gp, -0x3364 |
0x004083bc addu gp, gp, t9 | gp += t9;
0x004083c0 addiu sp, sp, -0x4590 |
0x004083c4 sw ra, 0x458c(sp) | *(arg_458ch) = ra;
0x004083c8 sw fp, 0x4588(sp) | *(arg_4588h) = fp;
0x004083cc sw s1, 0x4584(sp) | *(arg_4584h) = s1;
0x004083d0 sw s0, 0x4580(sp) | *(arg_4580h) = s0;
0x004083d4 move fp, sp | fp = sp;
0x004083d8 sw gp, 0x10(sp) | *(arg_10h) = gp;
0x004083dc sw a0, 0x1c(fp) | *(arg_1ch) = a0;
0x004083e0 sw a1, 0x18(fp) | *(arg_18h) = a1;
0x004083e4 lw t8, -0x7e58(gp) | t8 = *((gp - 8086));
0x004083e8 lw t8, (t8) | t8 = *(t8);
0x004083ec sw t8, 0x457c(fp) | *(arg_457ch) = t8;
0x004083f0 addiu t8, fp, 0x1054 | t8 = fp + 0x1054;
0x004083f4 move a0, t8 | a0 = t8;
0x004083f8 lw t8, -0x7f84(gp) | t8 = *(gp);
0x004083fc move t9, t8 | t9 = t8;
0x00408400 jalr t9 | t9 ();
0x00408404 nop |
0x00408408 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040840c addiu t8, fp, 0x3c | t8 = fp + 0x3c;
0x00408410 move a0, t8 | a0 = t8;
0x00408414 lw t8, -0x7f80(gp) | t8 = *(gp);
0x00408418 move t9, t8 | t9 = t8;
0x0040841c jalr t9 | t9 ();
0x00408420 nop |
0x00408424 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408428 lw t8, 0x18(fp) | t8 = *(arg_18h);
0x0040842c lw t8, 4(t8) | t8 = *((t8 + 1));
0x00408430 sw t8, 0x28(fp) | *(arg_28h) = t8;
0x00408434 lw t8, 0x18(fp) | t8 = *(arg_18h);
0x00408438 lw t8, 8(t8) | t8 = *((t8 + 2));
0x0040843c sw t8, 0x2c(fp) | *(arg_2ch) = t8;
0x00408440 addiu t8, fp, 0x1054 | t8 = fp + 0x1054;
0x00408444 move a0, t8 | a0 = t8;
0x00408448 lw t8, -0x7f18(gp) | t8 = *(gp);
0x0040844c move t9, t8 | t9 = t8;
0x00408450 jalr t9 | t9 ();
0x00408454 nop |
0x00408458 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040845c addiu t8, fp, 0x3c | t8 = fp + 0x3c;
0x00408460 move a0, t8 | a0 = t8;
0x00408464 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* str.Image */
0x00408468 addiu a1, t8, -0x4eb0 | a1 = t8 + -0x4eb0;
0x0040846c move a2, zero | a2 = 0;
0x00408470 lw t8, -0x7f1c(gp) | t8 = *(gp);
0x00408474 move t9, t8 | t9 = t8;
0x00408478 jalr t9 | t9 ();
0x0040847c nop |
0x00408480 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408484 lw v0, 0x1c(fp) | v0 = *(arg_1ch);
0x00408488 addiu t8, zero, 3 | t8 = 3;
| if (v0 == t8) {
0x0040848c bne v0, t8, 0x4085c4 |
0x00408490 nop |
0x00408494 lw a0, 0x28(fp) | a0 = *(arg_28h);
0x00408498 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* esilref: 'get' */
0x0040849c addiu a1, t8, -0x4ea8 | a1 = t8 + -0x4ea8;
0x004084a0 lw t8, -0x7f2c(gp) | t8 = sym.imp.strcmp;
0x004084a4 move t9, t8 | t9 = t8;
0x004084a8 jalr t9 | t9 ();
0x004084ac nop |
0x004084b0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004084b4 move t8, v0 | t8 = v0;
| if (t8 != 0) {
0x004084b8 bnez t8, 0x4085c4 | goto label_0;
| }
0x004084bc nop |
0x004084c0 addiu v0, fp, 0x20 | v0 = fp + 0x20;
0x004084c4 addiu t8, fp, 0x1054 | t8 = fp + 0x1054;
0x004084c8 move a0, v0 | a0 = v0;
0x004084cc move a1, t8 | a1 = t8;
0x004084d0 lw t8, -0x7efc(gp) | t8 = *(gp);
0x004084d4 move t9, t8 | t9 = t8;
0x004084d8 jalr t9 | t9 ();
0x004084dc nop |
0x004084e0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004084e4 addiu t8, fp, 0x20 | t8 = fp + 0x20;
0x004084e8 move a0, t8 | a0 = t8;
0x004084ec lw t8, -0x7e6c(gp) | t8 = *(gp);
0x004084f0 move t9, t8 | t9 = t8;
0x004084f4 jalr t9 | t9 ();
0x004084f8 nop |
0x004084fc lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408500 move t8, v0 | t8 = v0;
0x00408504 move a0, t8 | a0 = t8;
0x00408508 lw a1, 0x2c(fp) | a1 = *(arg_2ch);
0x0040850c lw t8, -0x7f24(gp) | t8 = sym.imp.strstr;
0x00408510 move t9, t8 | t9 = t8;
0x00408514 jalr t9 | t9 ();
0x00408518 nop |
0x0040851c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408520 move t8, v0 | t8 = v0;
0x00408524 sltiu t8, t8, 1 | t8 = (t8 < 1) ? 1 : 0;
0x00408528 andi s0, t8, 0xff | s0 = t8 & 0xff;
0x0040852c addiu t8, fp, 0x20 | t8 = fp + 0x20;
0x00408530 move a0, t8 | a0 = t8;
0x00408534 lw t8, -0x7e9c(gp) | t8 = *(gp);
0x00408538 move t9, t8 | t9 = t8;
0x0040853c jalr t9 | t9 ();
0x00408540 nop |
0x00408544 lw gp, 0x10(fp) | gp = *(arg_10h);
| if (s0 != 0) {
0x00408548 beqz s0, 0x408578 |
0x0040854c nop |
0x00408550 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* esilref: 'failed' */
0x00408554 addiu a0, t8, -0x4ea4 | a0 = t8 + -0x4ea4;
0x00408558 lw t8, -0x7f4c(gp) | t8 = sym.imp.puts;
0x0040855c move t9, t8 | t9 = t8;
0x00408560 jalr t9 | t9 ();
0x00408564 nop |
0x00408568 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040856c move s0, zero | s0 = 0;
0x00408570 b 0x4088e0 | goto label_1;
0x00408574 nop |
| }
0x00408578 addiu t8, fp, 0x3c | t8 = fp + 0x3c;
0x0040857c move a0, t8 | a0 = t8;
0x00408580 lw a1, 0x2c(fp) | a1 = *(arg_2ch);
0x00408584 lw t8, -0x7eb8(gp) | t8 = *(gp);
0x00408588 move t9, t8 | t9 = t8;
0x0040858c jalr t9 | t9 ();
0x00408590 nop |
0x00408594 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408598 move t8, v0 | t8 = v0;
0x0040859c lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* esilref: '&d
' */
0x004085a0 addiu a0, v0, -0x4e9c | a0 = v0 + -0x4e9c;
0x004085a4 move a1, t8 | a1 = t8;
0x004085a8 lw t8, -0x7f44(gp) | t8 = sym.imp.printf
0x004085ac move t9, t8 | t9 = t8;
0x004085b0 jalr t9 | t9 ();
0x004085b4 nop |
0x004085b8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004085bc b 0x4088dc | goto label_2;
0x004085c0 nop |
| }
| label_0:
0x004085c4 lw v0, 0x1c(fp) | v0 = *(arg_1ch);
0x004085c8 addiu t8, zero, 4 | t8 = 4;
| if (v0 == t8) {
0x004085cc bne v0, t8, 0x4088c4 |
0x004085d0 nop |
0x004085d4 lw a0, 0x28(fp) | a0 = *(arg_28h);
0x004085d8 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* esilref: 'set' */
0x004085dc addiu a1, t8, -0x4e98 | a1 = t8 + -0x4e98;
0x004085e0 lw t8, -0x7f2c(gp) | t8 = sym.imp.strcmp;
0x004085e4 move t9, t8 | t9 = t8;
0x004085e8 jalr t9 | t9 ();
0x004085ec nop |
0x004085f0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004085f4 move t8, v0 | t8 = v0;
| if (t8 != 0) {
0x004085f8 bnez t8, 0x4088c4 | goto label_3;
| }
0x004085fc nop |
0x00408600 addiu v0, fp, 0x24 | v0 = fp + 0x24;
0x00408604 addiu t8, fp, 0x1054 | t8 = fp + 0x1054;
0x00408608 move a0, v0 | a0 = v0;
0x0040860c move a1, t8 | a1 = t8;
0x00408610 lw t8, -0x7efc(gp) | t8 = *(gp);
0x00408614 move t9, t8 | t9 = t8;
0x00408618 jalr t9 | t9 ();
0x0040861c nop |
0x00408620 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408624 addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00408628 move a0, t8 | a0 = t8;
0x0040862c lw t8, -0x7e6c(gp) | t8 = *(gp);
0x00408630 move t9, t8 | t9 = t8;
0x00408634 jalr t9 | t9 ();
0x00408638 nop |
0x0040863c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408640 move t8, v0 | t8 = v0;
0x00408644 move a0, t8 | a0 = t8;
0x00408648 lw a1, 0x2c(fp) | a1 = *(arg_2ch);
0x0040864c lw t8, -0x7f24(gp) | t8 = sym.imp.strstr;
0x00408650 move t9, t8 | t9 = t8;
0x00408654 jalr t9 | t9 ();
0x00408658 nop |
0x0040865c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408660 move t8, v0 | t8 = v0;
0x00408664 sltiu t8, t8, 1 | t8 = (t8 < 1) ? 1 : 0;
0x00408668 andi s0, t8, 0xff | s0 = t8 & 0xff;
0x0040866c addiu t8, fp, 0x24 | t8 = fp + 0x24;
0x00408670 move a0, t8 | a0 = t8;
0x00408674 lw t8, -0x7e9c(gp) | t8 = *(gp);
0x00408678 move t9, t8 | t9 = t8;
0x0040867c jalr t9 | t9 ();
0x00408680 nop |
0x00408684 lw gp, 0x10(fp) | gp = *(arg_10h);
| if (s0 != 0) {
0x00408688 beqz s0, 0x4086b8 |
0x0040868c nop |
0x00408690 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* esilref: 'failed' */
0x00408694 addiu a0, t8, -0x4ea4 | a0 = t8 + -0x4ea4;
0x00408698 lw t8, -0x7f4c(gp) | t8 = sym.imp.puts;
0x0040869c move t9, t8 | t9 = t8;
0x004086a0 jalr t9 | t9 ();
0x004086a4 nop |
0x004086a8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004086ac move s0, zero | s0 = 0;
0x004086b0 b 0x4088e0 | goto label_1;
0x004086b4 nop |
| }
0x004086b8 lw t8, 0x18(fp) | t8 = *(arg_18h);
0x004086bc addiu t8, t8, 0xc | t8 += 0xc;
0x004086c0 lw t8, (t8) | t8 = *(t8);
0x004086c4 move a0, t8 | a0 = t8;
0x004086c8 lw t8, -0x7f38(gp) | t8 = sym.imp.atoi;
0x004086cc move t9, t8 | t9 = t8;
0x004086d0 jalr t9 | t9 ();
0x004086d4 nop |
0x004086d8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004086dc sw v0, 0x30(fp) | *(arg_30h) = v0;
0x004086e0 lw a0, 0x2c(fp) | a0 = *(arg_2ch);
0x004086e4 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* str.InputSize */
0x004086e8 addiu a1, t8, -0x4e94 | a1 = t8 + -0x4e94;
0x004086ec lw t8, -0x7f2c(gp) | t8 = sym.imp.strcmp;
0x004086f0 move t9, t8 | t9 = t8;
0x004086f4 jalr t9 | t9 ();
0x004086f8 nop |
0x004086fc lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408700 move t8, v0 | t8 = v0;
| if (t8 == 0) {
0x00408704 bnez t8, 0x408788 |
0x00408708 nop |
0x0040870c lw t8, 0x30(fp) | t8 = *(arg_30h);
| if (t8 != 0) {
0x00408710 beqz t8, 0x408738 |
0x00408714 nop |
0x00408718 lw v0, 0x30(fp) | v0 = *(arg_30h);
0x0040871c addiu t8, zero, 1 | t8 = 1;
| if (v0 == t8) {
0x00408720 beq v0, t8, 0x408738 | goto label_4;
| }
0x00408724 nop |
0x00408728 lw v0, 0x30(fp) | v0 = *(arg_30h);
0x0040872c addiu t8, zero, 5 | t8 = 5;
| if (v0 != t8) {
0x00408730 bne v0, t8, 0x408788 | goto label_5;
| }
0x00408734 nop |
| }
| label_4:
0x00408738 lw t8, 0x30(fp) | t8 = *(arg_30h);
0x0040873c andi t8, t8, 0xff | t8 &= 0xff;
0x00408740 addiu v0, fp, 0x3c | v0 = fp + 0x3c;
0x00408744 move a0, v0 | a0 = v0;
0x00408748 lw a1, 0x2c(fp) | a1 = *(arg_2ch);
0x0040874c move a2, t8 | a2 = t8;
0x00408750 lw t8, -0x7edc(gp) | t8 = *(gp);
0x00408754 move t9, t8 | t9 = t8;
0x00408758 jalr t9 | t9 ();
0x0040875c nop |
0x00408760 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408764 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* esilref: 'ok' */
0x00408768 addiu a0, t8, -0x4e88 | a0 = t8 + -0x4e88;
0x0040876c lw t8, -0x7f4c(gp) | t8 = sym.imp.puts;
0x00408770 move t9, t8 | t9 = t8;
0x00408774 jalr t9 | t9 ();
0x00408778 nop |
0x0040877c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408780 b 0x4088bc | goto label_6;
0x00408784 nop |
| }
| label_5:
0x00408788 lw a0, 0x2c(fp) | a0 = *(arg_2ch);
0x0040878c lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* str.Frequency */
0x00408790 addiu a1, t8, -0x4e84 | a1 = t8 + -0x4e84;
0x00408794 lw t8, -0x7f2c(gp) | t8 = sym.imp.strcmp;
0x00408798 move t9, t8 | t9 = t8;
0x0040879c jalr t9 | t9 ();
0x004087a0 nop |
0x004087a4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004087a8 move t8, v0 | t8 = v0;
| if (t8 == 0) {
0x004087ac bnez t8, 0x408830 |
0x004087b0 nop |
0x004087b4 lw t8, 0x30(fp) | t8 = *(arg_30h);
| if (t8 != 0) {
0x004087b8 beqz t8, 0x4087e0 |
0x004087bc nop |
0x004087c0 lw v0, 0x30(fp) | v0 = *(arg_30h);
0x004087c4 addiu t8, zero, 1 | t8 = 1;
| if (v0 == t8) {
0x004087c8 beq v0, t8, 0x4087e0 | goto label_7;
| }
0x004087cc nop |
0x004087d0 lw v0, 0x30(fp) | v0 = *(arg_30h);
0x004087d4 addiu t8, zero, 2 | t8 = 2;
| if (v0 != t8) {
0x004087d8 bne v0, t8, 0x408830 | goto label_8;
| }
0x004087dc nop |
| }
| label_7:
0x004087e0 lw t8, 0x30(fp) | t8 = *(arg_30h);
0x004087e4 andi t8, t8, 0xff | t8 &= 0xff;
0x004087e8 addiu v0, fp, 0x3c | v0 = fp + 0x3c;
0x004087ec move a0, v0 | a0 = v0;
0x004087f0 lw a1, 0x2c(fp) | a1 = *(arg_2ch);
0x004087f4 move a2, t8 | a2 = t8;
0x004087f8 lw t8, -0x7edc(gp) | t8 = *(gp);
0x004087fc move t9, t8 | t9 = t8;
0x00408800 jalr t9 | t9 ();
0x00408804 nop |
0x00408808 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040880c lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* esilref: 'ok' */
0x00408810 addiu a0, t8, -0x4e88 | a0 = t8 + -0x4e88;
0x00408814 lw t8, -0x7f4c(gp) | t8 = sym.imp.puts;
0x00408818 move t9, t8 | t9 = t8;
0x0040881c jalr t9 | t9 ();
0x00408820 nop |
0x00408824 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408828 b 0x4088bc | goto label_6;
0x0040882c nop |
| }
| label_8:
0x00408830 lw t8, 0x30(fp) | t8 = *(arg_30h);
| if (t8 != 0) {
0x00408834 beqz t8, 0x40884c |
0x00408838 nop |
0x0040883c lw v0, 0x30(fp) | v0 = *(arg_30h);
0x00408840 addiu t8, zero, 1 | t8 = 1;
| if (v0 != t8) {
0x00408844 bne v0, t8, 0x40889c | goto label_9;
| }
0x00408848 nop |
| }
0x0040884c lw t8, 0x30(fp) | t8 = *(arg_30h);
0x00408850 andi t8, t8, 0xff | t8 &= 0xff;
0x00408854 addiu v0, fp, 0x3c | v0 = fp + 0x3c;
0x00408858 move a0, v0 | a0 = v0;
0x0040885c lw a1, 0x2c(fp) | a1 = *(arg_2ch);
0x00408860 move a2, t8 | a2 = t8;
0x00408864 lw t8, -0x7edc(gp) | t8 = *(gp);
0x00408868 move t9, t8 | t9 = t8;
0x0040886c jalr t9 | t9 ();
0x00408870 nop |
0x00408874 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408878 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* esilref: 'ok' */
0x0040887c addiu a0, t8, -0x4e88 | a0 = t8 + -0x4e88;
0x00408880 lw t8, -0x7f4c(gp) | t8 = sym.imp.puts;
0x00408884 move t9, t8 | t9 = t8;
0x00408888 jalr t9 | t9 ();
0x0040888c nop |
0x00408890 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408894 b 0x4088bc | goto label_6;
0x00408898 nop |
| label_9:
0x0040889c lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* aav.0x004082c0 */
0x004088a0 addiu t8, t8, -0x7d40 | t8 += -0x7d40;
0x004088a4 move t9, t8 | t9 = t8;
0x004088a8 jalr t9 | t9 ();
0x004088ac nop |
0x004088b0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004088b4 b 0x4088dc | goto label_2;
0x004088b8 nop |
| label_6:
0x004088bc b 0x4088dc | goto label_2;
0x004088c0 nop |
| }
| label_3:
0x004088c4 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* aav.0x004082c0 */
0x004088c8 addiu t8, t8, -0x7d40 | t8 += -0x7d40;
0x004088cc move t9, t8 | t9 = t8;
0x004088d0 jalr t9 | t9 ();
0x004088d4 nop |
0x004088d8 lw gp, 0x10(fp) | gp = *(arg_10h);
| label_2:
0x004088dc addiu s0, zero, 1 | s0 = 1;
| label_1:
0x004088e0 addiu t8, fp, 0x3c | t8 = fp + 0x3c;
0x004088e4 move a0, t8 | a0 = t8;
0x004088e8 lw t8, -0x7f04(gp) | t8 = sym.imp.TinyDB::TinyDB__;
0x004088ec move t9, t8 | t9 = t8;
0x004088f0 jalr t9 | t9 ();
0x004088f4 nop |
0x004088f8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004088fc addiu t8, zero, 1 | t8 = 1;
| if (s0 != t8) {
0x00408900 beq s0, t8, 0x408914 |
0x00408904 nop |
0x00408908 move s0, zero | s0 = 0;
0x0040890c b 0x40891c | goto label_10;
0x00408910 nop |
| }
0x00408914 nop |
0x00408918 addiu s0, zero, 1 | s0 = 1;
| label_10:
0x0040891c addiu t8, fp, 0x1054 | t8 = fp + 0x1054;
0x00408920 move a0, t8 | a0 = t8;
0x00408924 lw t8, -0x7e4c(gp) | t8 = sym.imp.PIB::PIB__;
0x00408928 move t9, t8 | t9 = t8;
0x0040892c jalr t9 | t9 ();
0x00408930 nop |
0x00408934 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00408938 addiu t8, zero, 1 | t8 = 1;
| if (s0 == t8) {
0x0040893c bne s0, t8, 0x408b90 |
0x00408940 nop |
0x00408944 nop |
0x00408948 b 0x408b90 | goto label_11;
0x0040894c nop |
| }
| label_11:
0x00408b90 lw t8, -0x7e58(gp) | t8 = *((gp - 8086));
0x00408b94 lw v0, 0x457c(fp) | v0 = *(arg_457ch);
0x00408b98 lw t8, (t8) | t8 = *(t8);
| if (v0 != t8) {
0x00408b9c beq v0, t8, 0x408bb4 |
0x00408ba0 nop |
0x00408ba4 lw t8, -0x7ebc(gp) | t8 = sym.imp.__stack_chk_fail;
0x00408ba8 move t9, t8 | t9 = t8;
0x00408bac jalr t9 | t9 ();
0x00408bb0 nop |
| }
0x00408bb4 move sp, fp |
0x00408bb8 lw ra, 0x458c(sp) | ra = *(arg_458ch);
0x00408bbc lw fp, 0x4588(sp) | fp = *(arg_4588h);
0x00408bc0 lw s1, 0x4584(sp) | s1 = *(arg_4584h);
0x00408bc4 lw s0, 0x4580(sp) | s0 = *(arg_4580h);
0x00408bc8 addiu sp, sp, 0x4590 |
0x00408bcc jr ra | return v0;
0x00408bd0 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 @ 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 |
| }
[*] Function printf used 8 times mfgbox