[*] Binary protection state of watchDog
Full RELRO Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of watchDog
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/sbin/watchDog @ 0x4080bc */
| #include <stdint.h>
|
; (fcn) method.CommonBehavior.sendCmd_char_const__unsigned_int__unsigned_int__unsigned_int_ () | void method_CommonBehavior_sendCmd_char_const_unsigned_int_unsigned_int_unsigned_int_ () {
| /* CommonBehavior::sendCmd(char const*, unsigned int, unsigned int, unsigned int) */
0x004080bc lui gp, 2 |
0x004080c0 addiu gp, gp, 0x2154 |
0x004080c4 addu gp, gp, t9 | gp += t9;
0x004080c8 addiu sp, sp, -0xd8 |
0x004080cc sw ra, 0xd4(sp) | *(var_d4h) = ra;
0x004080d0 sw s2, 0xd0(sp) | *(var_d0h) = s2;
0x004080d4 sw s1, 0xcc(sp) | *(var_cch) = s1;
0x004080d8 sw s0, 0xc8(sp) | *(var_c8h) = s0;
0x004080dc addiu s1, sp, 0x20 | s1 = sp + 0x20;
0x004080e0 lw t8, -0x7d2c(gp) | t8 = *((gp - 8011));
0x004080e4 move a0, s1 | a0 = s1;
0x004080e8 lw t9, -0x7db0(gp) | t9 = *(gp);
0x004080ec lw v0, (t8) | v0 = *(t8);
0x004080f0 move s2, t8 | s2 = t8;
0x004080f4 sw gp, 0x18(sp) | *(var_18h) = gp;
0x004080f8 sw v0, 0xc4(sp) | *(var_c4h) = v0;
0x004080fc addiu v0, zero, -1 | v0 = -1;
0x00408100 sw v0, 0x24(sp) | *(var_24h) = v0;
0x00408104 addiu v0, zero, 0x1e | v0 = 0x1e;
0x00408108 sw v0, 0x28(sp) | *(var_28h) = v0;
0x0040810c lw v0, -0x7f70(gp) | v0 = *(gp);
0x00408110 sw a2, 0x2c(sp) | *(var_2ch) = a2;
0x00408114 addiu a2, sp, 0x2c | a2 = sp + 0x2c;
0x00408118 addiu v0, v0, 8 | v0 += 8;
0x0040811c sw v0, 0x20(sp) | *(var_20h) = v0;
0x00408120 lw v0, 0xe8(sp) | v0 = *(arg_e8h);
0x00408124 sw a3, 0x30(sp) | *(var_30h) = a3;
0x00408128 addiu a3, zero, 0xc | a3 = 0xc;
0x0040812c sw v0, 0x34(sp) | *(var_34h) = v0;
0x00408130 addiu v0, sp, 0x38 | v0 = sp + 0x38;
0x00408134 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00408138 addiu v0, zero, 0x8c | v0 = 0x8c;
0x0040813c sw v0, 0x14(sp) | *(var_14h) = v0;
0x00408140 jalr t9 | t9 ();
0x00408144 lw gp, 0x18(sp) | gp = *(var_18h);
0x00408148 move s0, v0 | s0 = v0;
| if (v0 < 0) {
0x0040814c bgez v0, 0x408174 |
0x00408150 lw t8, -0x7df0(gp) | t8 = *((gp - 8060));
0x00408154 move a2, v0 | a2 = v0;
0x00408158 lw a1, -0x7fc4(gp) | a1 = *((gp - 8177));
0x0040815c lw a0, (t8) | a0 = *(t8);
0x00408160 lw t9, -0x7e54(gp) | t9 = sym.imp.fprintf
| /* str.OOPS___sendCmd_return__d_n */
0x00408164 addiu a1, a1, -0x1860 | a1 += -0x1860;
0x00408168 jalr t9 | t9 ();
0x0040816c lw gp, 0x18(sp) | gp = *(var_18h);
0x00408170 b 0x4081b8 |
| } else {
0x00408174 lw a2, 0x38(sp) | a2 = *(var_38h);
0x00408178 lw a0, -0x7fc4(gp) | a0 = *((gp - 8177));
| if (a2 != 0) {
0x0040817c beqz a2, 0x4081a4 |
0x00408180 lw t8, -0x7df0(gp) | t8 = *((gp - 8060));
0x00408184 lw a1, -0x7fc4(gp) | a1 = *((gp - 8177));
0x00408188 lw a0, (t8) | a0 = *(t8);
0x0040818c lw t9, -0x7e54(gp) | t9 = sym.imp.fprintf
| /* str.OOPS___sendCmd_result__d_n */
0x00408190 addiu a1, a1, -0x1844 | a1 += -0x1844;
0x00408194 jalr t9 | t9 ();
0x00408198 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040819c addiu s0, zero, -1 | s0 = -1;
0x004081a0 b 0x4081b8 |
| } else {
0x004081a4 lw a1, 0x3c(sp) | a1 = *(var_3ch);
0x004081a8 lw t9, -0x7eb4(gp) | t9 = sym.imp.printf;
| /* str.sendCmd_:__d_n */
0x004081ac addiu a0, a0, -0x1828 | a0 += -0x1828;
0x004081b0 jalr t9 | t9 ();
0x004081b4 lw gp, 0x18(sp) | gp = *(var_18h);
| }
| }
0x004081b8 lw t9, -0x7f6c(gp) | t9 = *(gp);
0x004081bc move a0, s1 | a0 = s1;
0x004081c0 jalr t9 | t9 ();
0x004081c4 move v0, s0 | v0 = s0;
0x004081c8 lw v1, 0xc4(sp) | v1 = *(var_c4h);
0x004081cc lw t8, (s2) | t8 = *(s2);
0x004081d0 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v1 != t8) {
0x004081d4 beq v1, t8, 0x408208 |
0x004081d8 lw t9, -0x7dec(gp) | t9 = sym.imp.__stack_chk_fail;
0x004081dc jalr t9 | t9 ();
0x004081e0 nop |
0x004081e4 lw gp, 0x18(sp) | gp = *(var_18h);
0x004081e8 move s0, a0 | s0 = a0;
0x004081ec lw t9, -0x7f6c(gp) | t9 = *(gp);
0x004081f0 move a0, s1 | a0 = s1;
0x004081f4 jalr t9 | t9 ();
0x004081f8 lw gp, 0x18(sp) | gp = *(var_18h);
0x004081fc lw t9, -0x7dcc(gp) | t9 = sym.imp._Unwind_Resume;
0x00408200 move a0, s0 | a0 = s0;
0x00408204 jalr t9 | t9 ();
| }
0x00408208 lw ra, 0xd4(sp) | ra = *(var_d4h);
0x0040820c lw s2, 0xd0(sp) | s2 = *(var_d0h);
0x00408210 lw s1, 0xcc(sp) | s1 = *(var_cch);
0x00408214 lw s0, 0xc8(sp) | s0 = *(var_c8h);
0x00408218 addiu sp, sp, 0xd8 |
0x0040821c jr ra | return v1;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/sbin/watchDog @ 0x403d74 */
| #include <stdint.h>
|
; (fcn) method.Watchdog.start_loop__ () | void method_Watchdog_start_loop_ () {
| /* Watchdog::start_loop() */
0x00403d74 lui gp, 2 |
0x00403d78 addiu gp, gp, 0x649c |
0x00403d7c addu gp, gp, t9 | gp += t9;
0x00403d80 addiu sp, sp, -0xf8 |
0x00403d84 sw ra, 0xf4(sp) | *(var_f4h) = ra;
0x00403d88 sw fp, 0xf0(sp) | *(var_f0h) = fp;
0x00403d8c sw s7, 0xec(sp) | *(var_ech) = s7;
0x00403d90 sw s6, 0xe8(sp) | *(var_e8h) = s6;
0x00403d94 sw s5, 0xe4(sp) | *(var_e4h) = s5;
0x00403d98 sw s4, 0xe0(sp) | *(var_e0h) = s4;
0x00403d9c sw s3, 0xdc(sp) | *(var_dch) = s3;
0x00403da0 sw s2, 0xd8(sp) | *(var_d8h) = s2;
0x00403da4 sw s1, 0xd4(sp) | *(var_d4h) = s1;
0x00403da8 sw s0, 0xd0(sp) | *(var_d0h) = s0;
0x00403dac move s0, a0 | s0 = a0;
0x00403db0 lw s4, -0x7d2c(gp) | s4 = *((gp - 8011));
0x00403db4 lw s7, -0x7fc4(gp) | s7 = *((gp - 8177));
0x00403db8 lw t8, (s4) | t8 = *(s4);
0x00403dbc lw fp, -0x7fc4(gp) | fp = *((gp - 8177));
| /* str.e_1_33mReceived_command_id__d__sub_id__d__action__d_e_0m */
0x00403dc0 addiu s7, s7, -0x1f0c | s7 += -0x1f0c;
0x00403dc4 lw s6, -0x7fc4(gp) | s6 = *((gp - 8177));
0x00403dc8 sw gp, 0x18(sp) | *(var_18h) = gp;
| /* str.Error__Unexpected_command_id__u_n */
0x00403dcc addiu fp, fp, -0x1ed0 | fp += -0x1ed0;
0x00403dd0 sw t8, 0xcc(sp) | *(var_cch) = t8;
| label_4:
0x00403dd4 lw s5, -0x7fb8(gp) | s5 = *(gp);
0x00403dd8 lw t8, (s5) | t8 = *(s5);
0x00403ddc lw s1, -0x7fb4(gp) | s1 = *(gp);
| if (t8 != 0) {
0x00403de0 bnez t8, 0x404734 | goto label_5;
| }
0x00403de4 lw t8, (s1) | t8 = *(s1);
0x00403de8 move s2, s1 | s2 = s1;
| if (t8 != 0) {
0x00403dec beqz t8, 0x403e00 |
0x00403df0 lw t9, -0x7ec0(gp) | t9 = sym.imp.puts;
| /* str.watchdog_is_reloaded */
0x00403df4 addiu a0, s6, -0x1f24 | a0 = s6 + -0x1f24;
0x00403df8 jalr t9 | t9 ();
0x00403dfc sw zero, (s1) | *(s1) = 0;
| }
0x00403e00 lw a0, 0xc(s0) | a0 = *((s0 + 3));
0x00403e04 lw t8, (a0) | t8 = *(a0);
0x00403e08 lw t9, 0xd8(t8) | t9 = *((t8 + 54));
0x00403e0c jalr t9 | t9 ();
0x00403e10 nop |
0x00403e14 lw a0, 0xc(s0) | a0 = *((s0 + 3));
0x00403e18 lw t8, (a0) | t8 = *(a0);
0x00403e1c lw t9, 8(t8) | t9 = *((t8 + 2));
0x00403e20 jalr t9 | t9 ();
0x00403e24 nop |
0x00403e28 lw gp, 0x18(sp) | gp = *(var_18h);
0x00403e2c lw t9, -0x7fb0(gp) | t9 = *(gp);
0x00403e30 lw a0, 0xc(s0) | a0 = *((s0 + 3));
0x00403e34 jalr t9 | t9 ();
0x00403e38 lw a0, 0xc(s0) | a0 = *((s0 + 3));
0x00403e3c lw t8, (a0) | t8 = *(a0);
0x00403e40 lw t9, 0x20(t8) | t9 = *((t8 + 8));
0x00403e44 jalr t9 | t9 ();
0x00403e48 nop |
0x00403e4c lw gp, 0x18(sp) | gp = *(var_18h);
0x00403e50 lw s3, -0x7fc4(gp) | s3 = *((gp - 8177));
0x00403e54 lw t8, (s5) | t8 = *(s5);
| label_3:
0x00403e58 lw t9, -0x7fac(gp) | t9 = *(gp);
| if (t8 != 0) {
0x00403e5c bnez t8, 0x404700 | goto label_6;
| }
0x00403e60 lw t8, (s2) | t8 = *(s2);
0x00403e64 lw t9, -0x7d5c(gp) | t9 = sym.imp.gettimeofday;
| if (t8 != 0) {
0x00403e68 bnez t8, 0x4046fc | goto label_7;
| }
0x00403e6c addiu a0, sp, 0x24 | a0 = sp + 0x24;
0x00403e70 move a1, zero | a1 = 0;
0x00403e74 addiu s1, sp, 0x2c | s1 = sp + 0x2c;
0x00403e78 jalr t9 | t9 ();
0x00403e7c lui t8, 1 | t8 = 0x10000;
0x00403e80 lw gp, 0x18(sp) | gp = *(var_18h);
0x00403e84 ori t8, t8, 0x86a0 | t8 |= 0x86a0;
0x00403e88 sw zero, 0x10(sp) | *(var_10h) = 0;
0x00403e8c move a0, s0 | a0 = s0;
0x00403e90 lw t9, -0x7d78(gp) | t9 = *(gp);
0x00403e94 addiu a1, sp, 0x34 | a1 = sp + 0x34;
0x00403e98 sw t8, 0x14(sp) | *(var_14h) = t8;
0x00403e9c addiu a2, zero, 0xc | a2 = 0xc;
0x00403ea0 addiu a3, sp, 0x20 | a3 = sp + 0x20;
0x00403ea4 jalr t9 | t9 ();
0x00403ea8 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 <= 0) {
0x00403eac blez v0, 0x404640 | goto label_8;
| }
0x00403eb0 lw t9, -0x7e44(gp) | t9 = sym.imp.memset;
0x00403eb4 addiu a0, sp, 0x50 | a0 = sp + 0x50;
0x00403eb8 move a1, zero | a1 = 0;
0x00403ebc addiu a2, zero, 0x7c | a2 = 0x7c;
0x00403ec0 sw zero, 0x40(sp) | *(var_40h) = 0;
0x00403ec4 sw zero, 0x44(sp) | *(var_44h) = 0;
0x00403ec8 sw zero, 0x48(sp) | *(var_48h) = 0;
0x00403ecc sw zero, 0x4c(sp) | *(var_4ch) = 0;
0x00403ed0 jalr t9 | t9 ();
0x00403ed4 move a1, s7 | a1 = s7;
0x00403ed8 lw gp, 0x18(sp) | gp = *(var_18h);
0x00403edc lw t8, 0x3c(sp) | t8 = *(var_3ch);
0x00403ee0 lw a0, -0x7fa8(gp) | a0 = *(gp);
0x00403ee4 lw t9, -0x7e68(gp) | t9 = *(gp);
0x00403ee8 lw a2, 0x34(sp) | a2 = *(var_34h);
0x00403eec lw a3, 0x38(sp) | a3 = *(var_38h);
0x00403ef0 sw t8, 0x10(sp) | *(var_10h) = t8;
0x00403ef4 jalr t9 | t9 ();
0x00403ef8 addiu t8, zero, 0x2b3 | t8 = 0x2b3;
0x00403efc lw a1, 0x34(sp) | a1 = *(var_34h);
0x00403f00 lw gp, 0x18(sp) | gp = *(var_18h);
0x00403f04 lw a0, 0xc(s0) | a0 = *((s0 + 3));
| if (a1 == t8) {
0x00403f08 beq a1, t8, 0x40452c | goto label_9;
| }
0x00403f0c sltiu t8, a1, 0x2b4 | t8 = (a1 < 0x2b4) ? 1 : 0;
0x00403f10 addiu t8, zero, 0x30e | t8 = 0x30e;
| if (t8 != 0) {
0x00403f14 beqz t8, 0x4040ec |
0x00403f18 addiu t8, zero, 0x27d | t8 = 0x27d;
0x00403f1c sltiu t8, a1, 0x27e | t8 = (a1 < 0x27e) ? 1 : 0;
| if (a1 == t8) {
0x00403f20 beq a1, t8, 0x404348 | goto label_10;
| }
0x00403f24 addiu t8, zero, 0x289 | t8 = 0x289;
| if (t8 != 0) {
0x00403f28 beqz t8, 0x404000 |
0x00403f2c addiu t8, zero, 0x274 | t8 = 0x274;
0x00403f30 sltiu t8, a1, 0x275 | t8 = (a1 < 0x275) ? 1 : 0;
| if (a1 == t8) {
0x00403f34 beq a1, t8, 0x4043e8 | goto label_11;
| }
0x00403f38 addiu t8, zero, 0x25d | t8 = 0x25d;
| if (t8 != 0) {
0x00403f3c beqz t8, 0x403fa0 |
0x00403f40 sltiu t8, a1, 0x25e | t8 = (a1 < 0x25e) ? 1 : 0;
| if (a1 == t8) {
0x00403f44 beq a1, t8, 0x4044b0 | goto label_12;
| }
0x00403f48 addiu t8, zero, 0x263 | t8 = 0x263;
| if (t8 != 0) {
0x00403f4c beqz t8, 0x403f78 |
0x00403f50 addiu t8, zero, 0x25b | t8 = 0x25b;
0x00403f54 sltiu t8, a1, 0x25c | t8 = (a1 < 0x25c) ? 1 : 0;
| if (a1 == t8) {
0x00403f58 beq a1, t8, 0x404480 | goto label_13;
| }
0x00403f5c addiu t8, zero, 0x25a | t8 = 0x25a;
| if (t8 == 0) {
0x00403f60 beqz t8, 0x4044a4 | goto label_14;
| }
| if (a1 != t8) {
0x00403f64 bne a1, t8, 0x4045e8 | goto label_15;
| }
0x00403f68 nop |
0x00403f6c lw t8, (a0) | t8 = *(a0);
0x00403f70 lw t9, 0x34(t8) | t9 = *((t8 + 13));
0x00403f74 b 0x4045e0 | goto label_16;
| }
0x00403f78 addiu t8, zero, 0x264 | t8 = 0x264;
| if (a1 == t8) {
0x00403f7c beq a1, t8, 0x4043b8 | goto label_17;
| }
0x00403f80 addiu t8, zero, 0x262 | t8 = 0x262;
| if (a1 == t8) {
0x00403f84 beq a1, t8, 0x404304 | goto label_18;
| }
| if (a1 != t8) {
0x00403f88 bne a1, t8, 0x4045e8 | goto label_15;
| }
0x00403f8c nop |
0x00403f90 lw t8, (a0) | t8 = *(a0);
0x00403f94 move a1, zero | a1 = 0;
0x00403f98 lw t9, 0x74(t8) | t9 = *((t8 + 29));
0x00403f9c b 0x4043c4 | goto label_19;
| }
0x00403fa0 addiu t8, zero, 0x278 | t8 = 0x278;
0x00403fa4 sltiu t8, a1, 0x279 | t8 = (a1 < 0x279) ? 1 : 0;
| if (a1 == t8) {
0x00403fa8 beq a1, t8, 0x4044bc | goto label_20;
| }
0x00403fac addiu t8, zero, 0x27b | t8 = 0x27b;
| if (t8 != 0) {
0x00403fb0 beqz t8, 0x403fdc |
0x00403fb4 addiu t8, zero, 0x276 | t8 = 0x276;
| if (a1 == t8) {
0x00403fb8 beq a1, t8, 0x4043f8 | goto label_21;
| }
0x00403fbc nop |
0x00403fc0 sltiu a1, a1, 0x277 | a1 = (a1 < 0x277) ? 1 : 0;
| if (a1 == 0) {
0x00403fc4 beqz a1, 0x4043d4 | goto label_22;
| }
0x00403fc8 nop |
0x00403fcc lw t8, (a0) | t8 = *(a0);
0x00403fd0 move a1, zero | a1 = 0;
0x00403fd4 lw t9, 0x78(t8) | t9 = *((t8 + 30));
0x00403fd8 b 0x4043e0 | goto label_23;
| }
0x00403fdc sltiu t8, a1, 0x27c | t8 = (a1 < 0x27c) ? 1 : 0;
| if (a1 == t8) {
0x00403fe0 beq a1, t8, 0x404310 | goto label_24;
| }
0x00403fe4 addiu t8, zero, 0x279 | t8 = 0x279;
| if (t8 == 0) {
0x00403fe8 beqz t8, 0x40433c | goto label_25;
| }
| if (a1 != t8) {
0x00403fec bne a1, t8, 0x4045e8 | goto label_15;
| }
0x00403ff0 nop |
0x00403ff4 lw t8, (a0) | t8 = *(a0);
0x00403ff8 lw t9, 0x40(t8) | t9 = *((t8 + 16));
0x00403ffc b 0x4042ec | goto label_0;
| }
0x00404000 sltiu t8, a1, 0x28a | t8 = (a1 < 0x28a) ? 1 : 0;
| if (a1 == t8) {
0x00404004 beq a1, t8, 0x404384 | goto label_26;
| }
0x00404008 addiu t8, zero, 0x2a2 | t8 = 0x2a2;
| if (t8 != 0) {
0x0040400c beqz t8, 0x404074 |
0x00404010 addiu t8, zero, 0x283 | t8 = 0x283;
0x00404014 sltiu t8, a1, 0x284 | t8 = (a1 < 0x284) ? 1 : 0;
| if (a1 == t8) {
0x00404018 beq a1, t8, 0x404324 | goto label_27;
| }
0x0040401c addiu t8, zero, 0x285 | t8 = 0x285;
| if (t8 != 0) {
0x00404020 beqz t8, 0x404050 |
0x00404024 addiu t8, zero, 0x27f | t8 = 0x27f;
0x00404028 sltiu t8, a1, 0x27f | t8 = (a1 < 0x27f) ? 1 : 0;
| if (a1 == t8) {
0x0040402c beq a1, t8, 0x404378 | goto label_28;
| }
0x00404030 addiu t8, zero, 0x280 | t8 = 0x280;
| if (t8 != 0) {
0x00404034 bnez t8, 0x40436c | goto label_29;
| }
0x00404038 addiu t8, zero, 1 | t8 = 1;
| if (a1 != t8) {
0x0040403c bne a1, t8, 0x4045e8 | goto label_15;
| }
0x00404040 sw t8, (s2) | *(s2) = t8;
0x00404044 lw t8, (a0) | t8 = *(a0);
0x00404048 lw t9, 0xd4(t8) | t9 = *((t8 + 53));
0x0040404c b 0x4045c8 | goto label_30;
| }
0x00404050 sltiu t8, a1, 0x285 | t8 = (a1 < 0x285) ? 1 : 0;
| if (a1 == t8) {
0x00404054 beq a1, t8, 0x404438 | goto label_31;
| }
0x00404058 addiu t8, zero, 0x286 | t8 = 0x286;
| if (t8 != 0) {
0x0040405c bnez t8, 0x4042e4 | goto label_32;
| }
| if (a1 != t8) {
0x00404060 bne a1, t8, 0x4045e8 | goto label_15;
| }
0x00404064 nop |
0x00404068 lw t8, (a0) | t8 = *(a0);
0x0040406c lw t9, 0x80(t8) | t9 = *((t8 + 32));
0x00404070 b 0x404518 | goto label_33;
| }
0x00404074 sltiu t8, a1, 0x2a3 | t8 = (a1 < 0x2a3) ? 1 : 0;
| if (a1 == t8) {
0x00404078 beq a1, t8, 0x404474 | goto label_34;
| }
0x0040407c addiu t8, zero, 0x2af | t8 = 0x2af;
| if (t8 != 0) {
0x00404080 beqz t8, 0x4040a8 |
0x00404084 addiu t8, zero, 0x28b | t8 = 0x28b;
0x00404088 sltiu t8, a1, 0x28b | t8 = (a1 < 0x28b) ? 1 : 0;
| if (a1 == t8) {
0x0040408c beq a1, t8, 0x4043a4 | goto label_35;
| }
0x00404090 addiu t8, zero, 0x295 | t8 = 0x295;
| if (t8 != 0) {
0x00404094 bnez t8, 0x404398 | goto label_36;
| }
0x00404098 lw t9, -0x7fa4(gp) | t9 = *(gp);
| if (a1 == t8) {
0x0040409c beq a1, t8, 0x404538 | goto label_37;
| }
0x004040a0 lw t8, (a0) | t8 = *(a0);
0x004040a4 b 0x4045ec | goto label_38;
| }
0x004040a8 sltiu t8, a1, 0x2b0 | t8 = (a1 < 0x2b0) ? 1 : 0;
| if (a1 == t8) {
0x004040ac beq a1, t8, 0x404418 | goto label_39;
| }
0x004040b0 addiu t8, zero, 0x2b0 | t8 = 0x2b0;
| if (t8 != 0) {
0x004040b4 beqz t8, 0x4040d0 |
0x004040b8 addiu t8, zero, 0x2a3 | t8 = 0x2a3;
| if (a1 != t8) {
0x004040bc bne a1, t8, 0x4045e8 | goto label_15;
| }
0x004040c0 nop |
0x004040c4 lw t8, (a0) | t8 = *(a0);
0x004040c8 lw t9, 0x44(t8) | t9 = *((t8 + 17));
0x004040cc b 0x4042ec | goto label_0;
| }
0x004040d0 addiu t8, zero, 0x2b2 | t8 = 0x2b2;
| if (a1 == t8) {
0x004040d4 beq a1, t8, 0x404408 | goto label_40;
| }
| if (a1 != t8) {
0x004040d8 bne a1, t8, 0x4045e8 | goto label_15;
| }
0x004040dc nop |
0x004040e0 lw t8, (a0) | t8 = *(a0);
0x004040e4 lw t9, 0xa4(t8) | t9 = *((t8 + 41));
0x004040e8 b 0x4045e0 | goto label_16;
| }
0x004040ec sltiu t8, a1, 0x30f | t8 = (a1 < 0x30f) ? 1 : 0;
| if (a1 == t8) {
0x004040f0 beq a1, t8, 0x4045d8 | goto label_41;
| }
0x004040f4 addiu t8, zero, 0x578 | t8 = 0x578;
| if (t8 != 0) {
0x004040f8 beqz t8, 0x4041ec |
0x004040fc addiu t8, zero, 0x301 | t8 = 0x301;
0x00404100 sltiu t8, a1, 0x302 | t8 = (a1 < 0x302) ? 1 : 0;
| if (a1 == t8) {
0x00404104 beq a1, t8, 0x404498 | goto label_42;
| }
0x00404108 addiu t8, zero, 0x308 | t8 = 0x308;
| if (t8 != 0) {
0x0040410c beqz t8, 0x404170 |
0x00404110 addiu t8, zero, 0x2c7 | t8 = 0x2c7;
0x00404114 sltiu t8, a1, 0x2c8 | t8 = (a1 < 0x2c8) ? 1 : 0;
| if (a1 == t8) {
0x00404118 beq a1, t8, 0x4045a4 | goto label_43;
| }
0x0040411c addiu t8, zero, 0x2fe | t8 = 0x2fe;
| if (t8 != 0) {
0x00404120 beqz t8, 0x40414c |
0x00404124 addiu t8, zero, 0x2b8 | t8 = 0x2b8;
0x00404128 addiu t8, zero, 0x2b9 | t8 = 0x2b9;
| if (a1 == t8) {
0x0040412c beq a1, t8, 0x404504 | goto label_44;
| }
0x00404130 addiu t8, zero, 0x2b7 | t8 = 0x2b7;
| if (a1 == t8) {
0x00404134 beq a1, t8, 0x404444 | goto label_45;
| }
| if (a1 != t8) {
0x00404138 bne a1, t8, 0x4045e8 | goto label_15;
| }
0x0040413c nop |
0x00404140 lw t8, (a0) | t8 = *(a0);
0x00404144 lw t9, 0x28(t8) | t9 = *((t8 + 10));
0x00404148 b 0x4045e0 | goto label_16;
| }
0x0040414c addiu t8, zero, 0x2ff | t8 = 0x2ff;
| if (a1 == t8) {
0x00404150 beq a1, t8, 0x4044c8 | goto label_46;
| }
0x00404154 addiu t8, zero, 0x2fb | t8 = 0x2fb;
| if (a1 == t8) {
0x00404158 beq a1, t8, 0x4044e0 | goto label_47;
| }
| if (a1 != t8) {
0x0040415c bne a1, t8, 0x4045e8 | goto label_15;
| }
0x00404160 nop |
0x00404164 lw t8, (a0) | t8 = *(a0);
0x00404168 lw t9, 0x38(t8) | t9 = *((t8 + 14));
0x0040416c b 0x4045e0 | goto label_16;
| }
0x00404170 sltiu t8, a1, 0x309 | t8 = (a1 < 0x309) ? 1 : 0;
| if (a1 == t8) {
0x00404174 beq a1, t8, 0x40448c | goto label_48;
| }
0x00404178 addiu t8, zero, 0x30b | t8 = 0x30b;
| if (t8 != 0) {
0x0040417c beqz t8, 0x4041a8 |
0x00404180 addiu t8, zero, 0x305 | t8 = 0x305;
0x00404184 addiu t8, zero, 0x306 | t8 = 0x306;
| if (a1 == t8) {
0x00404188 beq a1, t8, 0x4044d4 | goto label_49;
| }
0x0040418c addiu t8, zero, 0x302 | t8 = 0x302;
| if (a1 == t8) {
0x00404190 beq a1, t8, 0x4044ec | goto label_50;
| }
| if (a1 != t8) {
0x00404194 bne a1, t8, 0x4045e8 | goto label_15;
| }
0x00404198 nop |
0x0040419c lw t8, (a0) | t8 = *(a0);
0x004041a0 lw t9, 0x38(t8) | t9 = *((t8 + 14));
0x004041a4 b 0x4042ec | goto label_0;
| }
0x004041a8 sltiu t8, a1, 0x30c | t8 = (a1 < 0x30c) ? 1 : 0;
| if (a1 == t8) {
0x004041ac beq a1, t8, 0x4044f8 | goto label_51;
| }
0x004041b0 addiu t8, zero, 0x30c | t8 = 0x30c;
| if (t8 != 0) {
0x004041b4 beqz t8, 0x4041d0 |
0x004041b8 addiu t8, zero, 0x309 | t8 = 0x309;
| if (a1 != t8) {
0x004041bc bne a1, t8, 0x4045e8 | goto label_15;
| }
0x004041c0 nop |
0x004041c4 lw t8, (a0) | t8 = *(a0);
0x004041c8 lw t9, 0x84(t8) | t9 = *((t8 + 33));
0x004041cc b 0x4045c8 | goto label_30;
| }
0x004041d0 addiu t8, zero, 0x30d | t8 = 0x30d;
| if (a1 == t8) {
0x004041d4 beq a1, t8, 0x404510 | goto label_52;
| }
| if (a1 != t8) {
0x004041d8 bne a1, t8, 0x4045e8 | goto label_15;
| }
0x004041dc nop |
0x004041e0 lw t8, (a0) | t8 = *(a0);
0x004041e4 lw t9, 0xbc(t8) | t9 = *((t8 + 47));
0x004041e8 b 0x4045e0 | goto label_16;
| }
0x004041ec sltiu t8, a1, 0x579 | t8 = (a1 < 0x579) ? 1 : 0;
| if (a1 == t8) {
0x004041f0 beq a1, t8, 0x404450 | goto label_53;
| }
0x004041f4 addiu t8, zero, 0x5dc | t8 = 0x5dc;
| if (t8 != 0) {
0x004041f8 beqz t8, 0x40425c |
0x004041fc addiu t8, zero, 0x3ed | t8 = 0x3ed;
0x00404200 sltiu t8, a1, 0x3ee | t8 = (a1 < 0x3ee) ? 1 : 0;
| if (a1 == t8) {
0x00404204 beq a1, t8, 0x40458c | goto label_54;
| }
0x00404208 addiu t8, zero, 0x3ef | t8 = 0x3ef;
| if (t8 != 0) {
0x0040420c beqz t8, 0x404238 |
0x00404210 addiu t8, zero, 0x3eb | t8 = 0x3eb;
0x00404214 sltiu t8, a1, 0x3ec | t8 = (a1 < 0x3ec) ? 1 : 0;
| if (a1 == t8) {
0x00404218 beq a1, t8, 0x404580 | goto label_55;
| }
0x0040421c addiu t8, zero, 0x3ea | t8 = 0x3ea;
| if (t8 == 0) {
0x00404220 beqz t8, 0x404598 | goto label_56;
| }
| if (a1 != t8) {
0x00404224 bne a1, t8, 0x4045e8 | goto label_15;
| }
0x00404228 nop |
0x0040422c lw t8, (a0) | t8 = *(a0);
0x00404230 lw t9, 0xa8(t8) | t9 = *((t8 + 42));
0x00404234 b 0x4045ac | goto label_57;
| }
0x00404238 sltiu t8, a1, 0x3ef | t8 = (a1 < 0x3ef) ? 1 : 0;
| if (a1 == t8) {
0x0040423c beq a1, t8, 0x4045c0 | goto label_58;
| }
0x00404240 addiu t8, zero, 0x517 | t8 = 0x517;
| if (t8 != 0) {
0x00404244 bnez t8, 0x4045b4 | goto label_59;
| }
| if (a1 != t8) {
0x00404248 bne a1, t8, 0x4045e8 | goto label_15;
| }
0x0040424c nop |
0x00404250 lw t8, (a0) | t8 = *(a0);
0x00404254 lw t9, 0x58(t8) | t9 = *((t8 + 22));
0x00404258 b 0x4043b0 | goto label_60;
| }
0x0040425c sltiu t8, a1, 0x5dd | t8 = (a1 < 0x5dd) ? 1 : 0;
| if (a1 != t8) {
0x00404260 beq a1, t8, 0x4042d8 |
0x00404264 addiu t8, zero, 0x642 | t8 = 0x642;
| if (t8 != 0) {
0x00404268 beqz t8, 0x404294 |
0x0040426c addiu t8, zero, 0x57a | t8 = 0x57a;
0x00404270 sltiu t8, a1, 0x57a | t8 = (a1 < 0x57a) ? 1 : 0;
| if (a1 == t8) {
0x00404274 beq a1, t8, 0x404468 | goto label_61;
| }
0x00404278 addiu t8, zero, 0x57b | t8 = 0x57b;
| if (t8 != 0) {
0x0040427c bnez t8, 0x40445c | goto label_62;
| }
| if (a1 != t8) {
0x00404280 bne a1, t8, 0x4045e8 | goto label_15;
| }
0x00404284 nop |
0x00404288 lw t8, (a0) | t8 = *(a0);
0x0040428c lw t9, 0x9c(t8) | t9 = *((t8 + 39));
0x00404290 b 0x4045c8 | goto label_30;
| }
0x00404294 sltiu t8, a1, 0x643 | t8 = (a1 < 0x643) ? 1 : 0;
| if (a1 == t8) {
0x00404298 beq a1, t8, 0x404354 | goto label_63;
| }
0x0040429c addiu t8, zero, 0x643 | t8 = 0x643;
| if (t8 != 0) {
0x004042a0 beqz t8, 0x4042bc |
0x004042a4 addiu t8, zero, 0x5dd | t8 = 0x5dd;
| if (a1 != t8) {
0x004042a8 bne a1, t8, 0x4045e8 | goto label_15;
| }
0x004042ac nop |
0x004042b0 lw t8, (a0) | t8 = *(a0);
0x004042b4 lw t9, 0x10(t8) | t9 = *((t8 + 4));
0x004042b8 b 0x4042ec | goto label_0;
| }
0x004042bc addiu t8, zero, 0x644 | t8 = 0x644;
| if (a1 == t8) {
0x004042c0 beq a1, t8, 0x404360 | goto label_64;
| }
| if (a1 != t8) {
0x004042c4 bne a1, t8, 0x4045e8 | goto label_15;
| }
0x004042c8 nop |
0x004042cc lw t8, (a0) | t8 = *(a0);
0x004042d0 lw t9, 0x1c(t8) | t9 = *((t8 + 7));
0x004042d4 b 0x4045c8 | goto label_30;
| }
0x004042d8 lw t8, (a0) | t8 = *(a0);
0x004042dc lw t9, 0x10(t8) | t9 = *((t8 + 4));
0x004042e0 b 0x4045e0 | goto label_16;
| label_32:
0x004042e4 lw t8, (a0) | t8 = *(a0);
0x004042e8 lw t9, 0x70(t8) | t9 = *((t8 + 28));
| label_0:
0x004042ec move a1, zero | a1 = 0;
| do {
| label_1:
0x004042f0 jalr t9 | t9 ();
0x004042f4 nop |
0x004042f8 lw gp, 0x18(sp) | gp = *(var_18h);
| label_2:
0x004042fc sw v0, 0x40(sp) | *(var_40h) = v0;
0x00404300 b 0x404624 | goto label_65;
| label_18:
0x00404304 lw t8, (a0) | t8 = *(a0);
0x00404308 lw t9, 0x5c(t8) | t9 = *((t8 + 23));
0x0040430c b 0x4043b0 | goto label_60;
| label_24:
0x00404310 lw t8, (a0) | t8 = *(a0);
0x00404314 lw a1, 0x3c(sp) | a1 = *(var_3ch);
0x00404318 lw t9, 0x6c(t8) | t9 = *((t8 + 27));
0x0040431c sltiu a1, a1, 1 | a1 = (a1 < 1) ? 1 : 0;
0x00404320 b 0x4042f0 |
| } while (1);
| label_27:
0x00404324 lw t8, -0x7fa0(gp) | t8 = *(gp);
0x00404328 addiu v0, zero, 1 | v0 = 1;
0x0040432c sw v0, (t8) | *(t8) = v0;
0x00404330 lw t8, (a0) | t8 = *(a0);
0x00404334 lw t9, 0x70(t8) | t9 = *((t8 + 28));
0x00404338 b 0x4045e0 | goto label_16;
| label_25:
0x0040433c lw t8, (a0) | t8 = *(a0);
0x00404340 lw t9, 0x14(t8) | t9 = *((t8 + 5));
0x00404344 b 0x4045e0 | goto label_16;
| label_10:
0x00404348 lw t8, (a0) | t8 = *(a0);
0x0040434c lw t9, 0x14(t8) | t9 = *((t8 + 5));
0x00404350 b 0x4042ec | goto label_0;
| label_63:
0x00404354 lw t8, (a0) | t8 = *(a0);
0x00404358 lw t9, 0x18(t8) | t9 = *((t8 + 6));
0x0040435c b 0x4045e0 | goto label_16;
| label_64:
0x00404360 lw t8, (a0) | t8 = *(a0);
0x00404364 lw t9, 0x18(t8) | t9 = *((t8 + 6));
0x00404368 b 0x4042ec | goto label_0;
| label_29:
0x0040436c lw t8, (a0) | t8 = *(a0);
0x00404370 lw t9, 0x24(t8) | t9 = *((t8 + 9));
0x00404374 b 0x4045e0 | goto label_16;
| label_28:
0x00404378 lw t8, (a0) | t8 = *(a0);
0x0040437c lw t9, 0x24(t8) | t9 = *((t8 + 9));
0x00404380 b 0x4042ec | goto label_0;
| label_26:
0x00404384 lw t8, (a0) | t8 = *(a0);
0x00404388 move a1, zero | a1 = 0;
0x0040438c addiu a2, zero, -1 | a2 = -1;
0x00404390 lw t9, 0x50(t8) | t9 = *((t8 + 20));
0x00404394 b 0x404428 | goto label_66;
| label_36:
0x00404398 lw t8, (a0) | t8 = *(a0);
0x0040439c lw t9, 0x50(t8) | t9 = *((t8 + 20));
0x004043a0 b 0x404400 | goto label_67;
| label_35:
0x004043a4 lw t8, (a0) | t8 = *(a0);
0x004043a8 lw t9, 0x50(t8) | t9 = *((t8 + 20));
0x004043ac b 0x4043dc | goto label_68;
| label_60:
0x004043b0 lw a1, 0x38(sp) | a1 = *(var_38h);
0x004043b4 b 0x4042f0 | goto label_1;
| label_17:
0x004043b8 lw t8, (a0) | t8 = *(a0);
0x004043bc addiu a1, zero, 1 | a1 = 1;
0x004043c0 lw t9, 0x74(t8) | t9 = *((t8 + 29));
| label_19:
0x004043c4 jalr t9 | t9 ();
0x004043c8 nop |
0x004043cc lw gp, 0x18(sp) | gp = *(var_18h);
0x004043d0 b 0x404524 | goto label_69;
| label_22:
0x004043d4 lw t8, (a0) | t8 = *(a0);
0x004043d8 lw t9, 0x78(t8) | t9 = *((t8 + 30));
| label_68:
0x004043dc addiu a1, zero, 1 | a1 = 1;
| do {
| label_23:
0x004043e0 move a2, zero | a2 = 0;
0x004043e4 b 0x404428 | goto label_66;
| label_11:
0x004043e8 lw t8, (a0) | t8 = *(a0);
0x004043ec move a1, zero | a1 = 0;
0x004043f0 lw t9, 0x78(t8) | t9 = *((t8 + 30));
0x004043f4 b 0x404424 | goto label_70;
| label_21:
0x004043f8 lw t8, (a0) | t8 = *(a0);
0x004043fc lw t9, 0x78(t8) | t9 = *((t8 + 30));
| label_67:
0x00404400 addiu a1, zero, 1 | a1 = 1;
0x00404404 b 0x404424 | goto label_70;
| label_40:
0x00404408 lw t8, (a0) | t8 = *(a0);
0x0040440c addiu a1, zero, 4 | a1 = 4;
0x00404410 lw t9, 0x78(t8) | t9 = *((t8 + 30));
0x00404414 b 0x4043e0 |
| } while (1);
| label_39:
0x00404418 lw t8, (a0) | t8 = *(a0);
0x0040441c addiu a1, zero, 4 | a1 = 4;
0x00404420 lw t9, 0x78(t8) | t9 = *((t8 + 30));
| label_70:
0x00404424 addiu a2, zero, 1 | a2 = 1;
| label_66:
0x00404428 jalr t9 | t9 ();
0x0040442c nop |
0x00404430 lw gp, 0x18(sp) | gp = *(var_18h);
0x00404434 b 0x4042fc | goto label_2;
| label_31:
0x00404438 lw t8, (a0) | t8 = *(a0);
0x0040443c lw t9, 0xcc(t8) | t9 = *((t8 + 51));
0x00404440 b 0x4045c8 | goto label_30;
| label_45:
0x00404444 lw t8, (a0) | t8 = *(a0);
0x00404448 lw t9, 0x88(t8) | t9 = *((t8 + 34));
0x0040444c b 0x4045c8 | goto label_30;
| label_53:
0x00404450 lw t8, (a0) | t8 = *(a0);
0x00404454 lw t9, 0x90(t8) | t9 = *((t8 + 36));
0x00404458 b 0x4045c8 | goto label_30;
| label_62:
0x0040445c lw t8, (a0) | t8 = *(a0);
0x00404460 lw t9, 0x98(t8) | t9 = *((t8 + 38));
0x00404464 b 0x4045c8 | goto label_30;
| label_61:
0x00404468 lw t8, (a0) | t8 = *(a0);
0x0040446c lw t9, 0xa0(t8) | t9 = *((t8 + 40));
0x00404470 b 0x4045c8 | goto label_30;
| label_34:
0x00404474 lw t8, (a0) | t8 = *(a0);
0x00404478 lw t9, 0x44(t8) | t9 = *((t8 + 17));
0x0040447c b 0x4045e0 | goto label_16;
| label_13:
0x00404480 lw t8, (a0) | t8 = *(a0);
0x00404484 lw t9, 0x34(t8) | t9 = *((t8 + 13));
0x00404488 b 0x4042ec | goto label_0;
| label_48:
0x0040448c lw t8, (a0) | t8 = *(a0);
0x00404490 lw t9, 0x3c(t8) | t9 = *((t8 + 15));
0x00404494 b 0x4045e0 | goto label_16;
| label_42:
0x00404498 lw t8, (a0) | t8 = *(a0);
0x0040449c lw t9, 0x3c(t8) | t9 = *((t8 + 15));
0x004044a0 b 0x4042ec | goto label_0;
| label_14:
0x004044a4 lw t8, (a0) | t8 = *(a0);
0x004044a8 lw t9, 0x30(t8) | t9 = *((t8 + 12));
0x004044ac b 0x4045e0 | goto label_16;
| label_12:
0x004044b0 lw t8, (a0) | t8 = *(a0);
0x004044b4 lw t9, 0x30(t8) | t9 = *((t8 + 12));
0x004044b8 b 0x4042ec | goto label_0;
| label_20:
0x004044bc lw t8, (a0) | t8 = *(a0);
0x004044c0 lw t9, 0x40(t8) | t9 = *((t8 + 16));
0x004044c4 b 0x4045e0 | goto label_16;
| label_46:
0x004044c8 lw t8, (a0) | t8 = *(a0);
0x004044cc lw t9, 0x48(t8) | t9 = *((t8 + 18));
0x004044d0 b 0x4045e0 | goto label_16;
| label_49:
0x004044d4 lw t8, (a0) | t8 = *(a0);
0x004044d8 lw t9, 0x48(t8) | t9 = *((t8 + 18));
0x004044dc b 0x4042ec | goto label_0;
| label_47:
0x004044e0 lw t8, (a0) | t8 = *(a0);
0x004044e4 lw t9, 0x4c(t8) | t9 = *((t8 + 19));
0x004044e8 b 0x4045e0 | goto label_16;
| label_50:
0x004044ec lw t8, (a0) | t8 = *(a0);
0x004044f0 lw t9, 0x4c(t8) | t9 = *((t8 + 19));
0x004044f4 b 0x4042ec | goto label_0;
| label_51:
0x004044f8 lw t8, (a0) | t8 = *(a0);
0x004044fc lw t9, 0x8c(t8) | t9 = *((t8 + 35));
0x00404500 b 0x4045c8 | goto label_30;
| label_44:
0x00404504 lw t8, (a0) | t8 = *(a0);
0x00404508 lw t9, 0x28(t8) | t9 = *((t8 + 10));
0x0040450c b 0x4042ec | goto label_0;
| label_52:
0x00404510 lw t8, (a0) | t8 = *(a0);
0x00404514 lw t9, 0x2c(t8) | t9 = *((t8 + 11));
| label_33:
0x00404518 jalr t9 | t9 ();
0x0040451c nop |
0x00404520 lw gp, 0x18(sp) | gp = *(var_18h);
| label_69:
0x00404524 sw v0, 0x44(sp) | *(var_44h) = v0;
0x00404528 b 0x404624 | goto label_65;
| label_9:
0x0040452c lw t8, (a0) | t8 = *(a0);
0x00404530 lw t9, 0xa4(t8) | t9 = *((t8 + 41));
0x00404534 b 0x4042ec | goto label_0;
| label_37:
0x00404538 lw t8, -0x7e94(gp) | t8 = *((gp - 8101));
0x0040453c move a1, s1 | a1 = s1;
0x00404540 addiu t8, t8, 0xc | t8 += 0xc;
0x00404544 sw t8, 0x2c(sp) | *(var_2ch) = t8;
0x00404548 jalr t9 | t9 ();
0x0040454c lw gp, 0x18(sp) | gp = *(var_18h);
0x00404550 lw a1, 0x2c(sp) | a1 = *(var_2ch);
0x00404554 addiu a0, sp, 0x4c | a0 = sp + 0x4c;
0x00404558 lw t9, -0x7e20(gp) | t9 = sym.imp.strncpy;
0x0040455c addiu a2, zero, 0x80 | a2 = 0x80;
0x00404560 sw v0, 0x44(sp) | *(var_44h) = v0;
0x00404564 jalr t9 | t9 ();
0x00404568 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040456c lw t9, -0x7db4(gp) | t9 = *(gp);
0x00404570 move a0, s1 | a0 = s1;
0x00404574 jalr t9 | t9 ();
0x00404578 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040457c b 0x404624 | goto label_65;
| label_55:
0x00404580 lw t8, (a0) | t8 = *(a0);
0x00404584 lw t9, 0xac(t8) | t9 = *((t8 + 43));
0x00404588 b 0x4045ac | goto label_57;
| label_54:
0x0040458c lw t8, (a0) | t8 = *(a0);
0x00404590 lw t9, 0xb0(t8) | t9 = *((t8 + 44));
0x00404594 b 0x4045ac | goto label_57;
| label_56:
0x00404598 lw t8, (a0) | t8 = *(a0);
0x0040459c lw t9, 0xb4(t8) | t9 = *((t8 + 45));
0x004045a0 b 0x4045ac | goto label_57;
| label_43:
0x004045a4 lw t8, (a0) | t8 = *(a0);
0x004045a8 lw t9, 0xb8(t8) | t9 = *((t8 + 46));
| label_57:
0x004045ac lw a1, 0x3c(sp) | a1 = *(var_3ch);
0x004045b0 b 0x4042f0 | goto label_1;
| label_59:
0x004045b4 lw t8, (a0) | t8 = *(a0);
0x004045b8 lw t9, 0xc4(t8) | t9 = *((t8 + 49));
0x004045bc b 0x4045c8 | goto label_30;
| label_58:
0x004045c0 lw t8, (a0) | t8 = *(a0);
0x004045c4 lw t9, 0xc8(t8) | t9 = *((t8 + 50));
| label_30:
0x004045c8 jalr t9 | t9 ();
0x004045cc nop |
0x004045d0 lw gp, 0x18(sp) | gp = *(var_18h);
0x004045d4 b 0x4042fc | goto label_2;
| label_41:
0x004045d8 lw t8, (a0) | t8 = *(a0);
0x004045dc lw t9, 0xc0(t8) | t9 = *((t8 + 48));
| label_16:
0x004045e0 addiu a1, zero, 1 | a1 = 1;
0x004045e4 b 0x4042f0 | goto label_1;
| label_15:
0x004045e8 lw t8, (a0) | t8 = *(a0);
| label_38:
0x004045ec lw t9, 0xdc(t8) | t9 = *((t8 + 55));
0x004045f0 lw a2, 0x38(sp) | a2 = *(var_38h);
0x004045f4 jalr t9 | t9 ();
0x004045f8 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x004045fc beqz v0, 0x404624 |
0x00404600 addiu t8, zero, -1 | t8 = -1;
0x00404604 move a1, fp | a1 = fp;
0x00404608 sw t8, 0x40(sp) | *(var_40h) = t8;
0x0040460c lw t8, -0x7df0(gp) | t8 = *((gp - 8060));
0x00404610 lw t9, -0x7e54(gp) | t9 = sym.imp.fprintf
0x00404614 lw a0, (t8) | a0 = *(t8);
0x00404618 lw a2, 0x34(sp) | a2 = *(var_34h);
0x0040461c jalr t9 | t9 ();
0x00404620 lw gp, 0x18(sp) | gp = *(var_18h);
| }
| label_65:
0x00404624 lw t9, -0x7ec4(gp) | t9 = *(gp);
0x00404628 move a0, s0 | a0 = s0;
0x0040462c lw a1, 0x20(sp) | a1 = *(var_20h);
0x00404630 addiu a2, sp, 0x40 | a2 = sp + 0x40;
0x00404634 addiu a3, zero, 0x8c | a3 = 0x8c;
0x00404638 jalr t9 | t9 ();
0x0040463c lw gp, 0x18(sp) | gp = *(var_18h);
| label_8:
0x00404640 lw t9, -0x7d5c(gp) | t9 = sym.imp.gettimeofday;
0x00404644 move a0, s1 | a0 = s1;
0x00404648 move a1, zero | a1 = 0;
0x0040464c jalr t9 | t9 ();
0x00404650 lw t8, 0x24(sp) | t8 = *(var_24h);
0x00404654 lw v1, 0x2c(sp) | v1 = *(var_2ch);
0x00404658 lw s1, 0x30(sp) | s1 = *(var_30h);
0x0040465c subu v1, v1, t8 | __asm ("subu v1, v1, t8");
0x00404660 addiu t8, zero, 0x3e8 | t8 = 0x3e8;
0x00404664 mult v1, t8 | __asm ("mult v1, t8");
0x00404668 lw v0, 0x28(sp) | v0 = *(var_28h);
0x0040466c subu v0, s1, v0 | __asm ("subu v0, s1, v0");
0x00404670 mflo v1 | __asm ("mflo v1");
0x00404674 div zero, v0, t8 | __asm ("div zero, v0, t8");
| if (t8 == 0) {
0x00404678 bnez t8, 0x404680 |
0x0040467c break 7 | __asm ("break 7");
| }
0x00404680 mflo s1 | __asm ("mflo s1");
0x00404684 addu s1, v1, s1 | s1 = v1 + s1;
0x00404688 slti t8, s1, 0xc8 | t8 = (s1 < 0xc8) ? 1 : 0;
0x0040468c lw gp, 0x18(sp) | gp = *(var_18h);
| if (t8 != 0) {
0x00404690 beqz t8, 0x4046b0 |
0x00404694 lw a0, 0xc(s0) | a0 = *((s0 + 3));
0x00404698 lw t8, (a0) | t8 = *(a0);
0x0040469c lw t9, 0xc(t8) | t9 = *((t8 + 3));
0x004046a0 move a1, s1 | a1 = s1;
0x004046a4 jalr t9 | t9 ();
0x004046a8 lw gp, 0x18(sp) | gp = *(var_18h);
0x004046ac b 0x4046f4 |
| } else {
0x004046b0 lw t9, -0x7e68(gp) | t9 = *(gp);
0x004046b4 lw a0, -0x7fa8(gp) | a0 = *(gp);
| /* str. */
0x004046b8 addiu a1, s3, -0x1eac | a1 = s3 + -0x1eac;
0x004046bc jalr t9 | t9 ();
0x004046c0 move a2, s1 | a2 = s1;
0x004046c4 lw gp, 0x18(sp) | gp = *(var_18h);
0x004046c8 lw a1, -0x7fc4(gp) | a1 = *((gp - 8177));
0x004046cc lw t9, -0x7e68(gp) | t9 = *(gp);
0x004046d0 lw a0, -0x7fa8(gp) | a0 = *(gp);
| /* str._elapsedMsec___10d_ */
0x004046d4 addiu a1, a1, -0x1e8c | a1 += -0x1e8c;
0x004046d8 jalr t9 | t9 ();
0x004046dc lw gp, 0x18(sp) | gp = *(var_18h);
0x004046e0 lw a0, -0x7fa8(gp) | a0 = *(gp);
0x004046e4 lw t9, -0x7e68(gp) | t9 = *(gp);
| /* str. */
0x004046e8 addiu a1, s3, -0x1eac | a1 = s3 + -0x1eac;
0x004046ec jalr t9 | t9 ();
0x004046f0 lw gp, 0x18(sp) | gp = *(var_18h);
| }
0x004046f4 lw t8, (s5) | t8 = *(s5);
0x004046f8 b 0x403e58 | goto label_3;
| label_7:
0x004046fc lw t9, -0x7fac(gp) | t9 = *(gp);
| label_6:
0x00404700 lw a0, 0xc(s0) | a0 = *((s0 + 3));
0x00404704 jalr t9 | t9 ();
0x00404708 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040470c b 0x403dd4 | goto label_4;
| label_5:
0x00404734 lw v0, 0xcc(sp) | v0 = *(var_cch);
0x00404738 lw t8, (s4) | t8 = *(s4);
0x0040473c lw ra, 0xf4(sp) | ra = *(var_f4h);
| if (v0 != t8) {
0x00404740 beq v0, t8, 0x404750 |
0x00404744 lw t9, -0x7dec(gp) | t9 = sym.imp.__stack_chk_fail;
0x00404748 jalr t9 | t9 ();
0x0040474c nop |
| }
0x00404750 lw fp, 0xf0(sp) | fp = *(var_f0h);
0x00404754 lw s7, 0xec(sp) | s7 = *(var_ech);
0x00404758 lw s6, 0xe8(sp) | s6 = *(var_e8h);
0x0040475c lw s5, 0xe4(sp) | s5 = *(var_e4h);
0x00404760 lw s4, 0xe0(sp) | s4 = *(var_e0h);
0x00404764 lw s3, 0xdc(sp) | s3 = *(var_dch);
0x00404768 lw s2, 0xd8(sp) | s2 = *(var_d8h);
0x0040476c lw s1, 0xd4(sp) | s1 = *(var_d4h);
0x00404770 lw s0, 0xd0(sp) | s0 = *(var_d0h);
0x00404774 addiu sp, sp, 0xf8 |
0x00404778 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/sbin/watchDog @ 0x40c4cc */
| #include <stdint.h>
|
; (fcn) sym.touch_char_const_ () | void touch_char_const_ () {
| /* touch(char const*) */
0x0040c4cc lui gp, 2 |
0x0040c4d0 addiu gp, gp, -0x22bc |
0x0040c4d4 addu gp, gp, t9 | gp += t9;
0x0040c4d8 addiu sp, sp, -0x30 |
0x0040c4dc sw ra, 0x2c(sp) | *(var_2ch) = ra;
0x0040c4e0 sw s1, 0x28(sp) | *(var_28h) = s1;
0x0040c4e4 sw s0, 0x24(sp) | *(var_24h) = s0;
0x0040c4e8 addiu a1, zero, 0x102 | a1 = 0x102;
0x0040c4ec lw s0, -0x7d2c(gp) | s0 = *((gp - 8011));
0x0040c4f0 addiu a2, zero, 0x1b6 | a2 = 0x1b6;
0x0040c4f4 lw t9, -0x7d30(gp) | t9 = sym.imp.open;
0x0040c4f8 move s1, a0 | s1 = a0;
0x0040c4fc lw t8, (s0) | t8 = *(s0);
0x0040c500 sw gp, 0x10(sp) | *(var_10h) = gp;
0x0040c504 sw t8, 0x1c(sp) | *(var_1ch) = t8;
0x0040c508 jalr t9 | t9 ();
0x0040c50c nop |
0x0040c510 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 < 0) {
0x0040c514 bgez v0, 0x40c554 |
0x0040c518 lw a0, -0x7fc4(gp) | a0 = *((gp - 8177));
0x0040c51c lw t9, -0x7e48(gp) | t9 = sym.imp.perror;
| /* str.open */
0x0040c520 addiu a0, a0, -0x1e04 | a0 += -0x1e04;
0x0040c524 jalr t9 | t9 ();
0x0040c528 move a2, s1 | a2 = s1;
0x0040c52c lw gp, 0x10(sp) | gp = *(var_10h);
0x0040c530 lw t8, -0x7df0(gp) | t8 = *((gp - 8060));
0x0040c534 lw a1, -0x7fc4(gp) | a1 = *((gp - 8177));
0x0040c538 lw t9, -0x7e54(gp) | t9 = sym.imp.fprintf
0x0040c53c lw a0, (t8) | a0 = *(t8);
| /* str.Can_not_create_file__s_n */
0x0040c540 addiu a1, a1, -0xf48 | a1 += -0xf48;
0x0040c544 jalr t9 | t9 ();
0x0040c548 move v0, zero | v0 = 0;
0x0040c54c lw gp, 0x10(sp) | gp = *(var_10h);
0x0040c550 b 0x40c568 |
| } else {
0x0040c554 lw t9, -0x7e08(gp) | t9 = sym.imp.close;
0x0040c558 move a0, v0 | a0 = v0;
0x0040c55c jalr t9 | t9 ();
0x0040c560 addiu v0, zero, 1 | v0 = 1;
0x0040c564 lw gp, 0x10(sp) | gp = *(var_10h);
| }
0x0040c568 lw v1, 0x1c(sp) | v1 = *(var_1ch);
0x0040c56c lw t8, (s0) | t8 = *(s0);
0x0040c570 lw ra, 0x2c(sp) | ra = *(var_2ch);
| if (v1 != t8) {
0x0040c574 beq v1, t8, 0x40c584 |
0x0040c578 lw t9, -0x7dec(gp) | t9 = sym.imp.__stack_chk_fail;
0x0040c57c jalr t9 | t9 ();
0x0040c580 nop |
| }
0x0040c584 lw s1, 0x28(sp) | s1 = *(var_28h);
0x0040c588 lw s0, 0x24(sp) | s0 = *(var_24h);
0x0040c58c addiu sp, sp, 0x30 |
0x0040c590 jr ra | return v1;
| }
[*] Function fprintf used 5 times watchDog