[*] Binary protection state of db_analysis
Full RELRO Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function printf tear down of db_analysis
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/sbin/db_analysis @ 0x401e18 */
| #include <stdint.h>
|
; (fcn) main () | int32_t main () {
0x00401e18 lui gp, 2 |
0x00401e1c addiu gp, gp, -0xdf8 |
0x00401e20 addu gp, gp, t9 | gp += t9;
0x00401e24 addiu sp, sp, -0x1188 |
0x00401e28 sw ra, 0x1184(sp) | *(var_1184h) = ra;
0x00401e2c sw fp, 0x1180(sp) | *(var_1180h) = fp;
0x00401e30 sw s7, 0x117c(sp) | *(var_117ch) = s7;
0x00401e34 sw s6, 0x1178(sp) | *(var_1178h) = s6;
0x00401e38 sw s5, 0x1174(sp) | *(var_1174h) = s5;
0x00401e3c sw s4, 0x1170(sp) | *(var_1170h) = s4;
0x00401e40 sw s3, 0x116c(sp) | *(var_116ch) = s3;
0x00401e44 sw s2, 0x1168(sp) | *(var_1168h) = s2;
0x00401e48 sw s1, 0x1164(sp) | *(var_1164h) = s1;
0x00401e4c sw s0, 0x1160(sp) | *(var_1160h) = s0;
0x00401e50 move fp, sp | fp = sp;
0x00401e54 sw gp, 0x18(sp) | *(var_18h) = gp;
0x00401e58 sw a0, 0x54(fp) | *(arg_54h) = a0;
0x00401e5c sw a1, 0x50(fp) | *(arg_50h) = a1;
0x00401e60 lw t8, -0x7eb0(gp) | t8 = *((gp - 8108));
0x00401e64 lw t8, (t8) | t8 = *(t8);
0x00401e68 sw t8, 0x115c(fp) | *(arg_115ch) = t8;
0x00401e6c sw zero, 0x74(fp) | *(arg_74h) = 0;
0x00401e70 addiu t8, fp, 0x104 | t8 = fp + 0x104;
0x00401e74 move a0, t8 | a0 = t8;
0x00401e78 lw t8, -0x7ebc(gp) | t8 = *(gp);
0x00401e7c move t9, t8 | t9 = t8;
0x00401e80 jalr t9 | t9 ();
0x00401e84 nop |
0x00401e88 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00401e8c addiu t8, fp, 0x104 | t8 = fp + 0x104;
0x00401e90 move a0, t8 | a0 = t8;
0x00401e94 lw t8, -0x7f28(gp) | t8 = *(gp);
0x00401e98 move t9, t8 | t9 = t8;
0x00401e9c jalr t9 | t9 ();
0x00401ea0 nop |
0x00401ea4 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00401ea8 nop |
0x00401eac lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
0x00401eb0 addiu a0, t8, -0x6a7c | a0 = t8 + -0x6a7c;
0x00401eb4 lw t8, -0x7f64(gp) | t8 = *(gp);
0x00401eb8 move t9, t8 | t9 = t8;
0x00401ebc jalr t9 | t9 ();
0x00401ec0 nop |
0x00401ec4 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00401ec8 addiu t8, fp, 0x144 | t8 = fp + 0x144;
0x00401ecc move a0, t8 | a0 = t8;
0x00401ed0 lw t8, -0x7fd0(gp) | t8 = *(gp);
0x00401ed4 move t9, t8 | t9 = t8;
0x00401ed8 jalr t9 | t9 ();
0x00401edc nop |
0x00401ee0 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00401ee4 addiu t8, fp, 0x144 | t8 = fp + 0x144;
0x00401ee8 move a0, t8 | a0 = t8;
0x00401eec lw t8, -0x7fd8(gp) | t8 = *(gp);
| /* str.Microphone */
0x00401ef0 addiu a1, t8, 0x7850 | a1 = t8 + 0x7850;
0x00401ef4 move a2, zero | a2 = 0;
0x00401ef8 lw t8, -0x7f6c(gp) | t8 = *(gp);
0x00401efc move t9, t8 | t9 = t8;
0x00401f00 jalr t9 | t9 ();
0x00401f04 nop |
0x00401f08 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00401f0c addiu t8, fp, 0x144 | t8 = fp + 0x144;
0x00401f10 move a0, t8 | a0 = t8;
0x00401f14 lw t8, -0x7fd8(gp) | t8 = *(gp);
| /* str.Enable */
0x00401f18 addiu a1, t8, 0x785c | a1 = t8 + 0x785c;
0x00401f1c lw t8, -0x7f0c(gp) | t8 = *(gp);
0x00401f20 move t9, t8 | t9 = t8;
0x00401f24 jalr t9 | t9 ();
0x00401f28 nop |
0x00401f2c lw gp, 0x18(fp) | gp = *(arg_18h);
0x00401f30 move t8, v0 | t8 = v0;
0x00401f34 sltu t8, zero, t8 | t8 = (0 < t8) ? 1 : 0;
0x00401f38 sb t8, 0x5d(fp) | *(arg_5dh) = t8;
0x00401f3c addiu t8, fp, 0x144 | t8 = fp + 0x144;
0x00401f40 move a0, t8 | a0 = t8;
0x00401f44 lw t8, -0x7fd8(gp) | t8 = *(gp);
| /* str.Volume */
0x00401f48 addiu a1, t8, 0x7864 | a1 = t8 + 0x7864;
0x00401f4c lw t8, -0x7f2c(gp) | t8 = *(gp);
0x00401f50 move t9, t8 | t9 = t8;
0x00401f54 jalr t9 | t9 ();
0x00401f58 nop |
0x00401f5c lw gp, 0x18(fp) | gp = *(arg_18h);
0x00401f60 lui t8, 0xcccc | t8 = 0xcccccccd;
0x00401f64 ori t8, t8, 0xcccd |
0x00401f68 multu v0, t8 | __asm ("multu v0, t8");
0x00401f6c mfhi t8 | __asm ("mfhi t8");
0x00401f70 srl t8, t8, 3 | t8 >>= 3;
0x00401f74 sw t8, 0x90(fp) | *(arg_90h) = t8;
0x00401f78 addiu t8, fp, 0x144 | t8 = fp + 0x144;
0x00401f7c move a0, t8 | a0 = t8;
0x00401f80 lw t8, -0x7fd8(gp) | t8 = *(gp);
| /* str.AudioDetection */
0x00401f84 addiu a1, t8, 0x786c | a1 = t8 + 0x786c;
0x00401f88 lw t8, -0x7edc(gp) | t8 = *(gp);
0x00401f8c move t9, t8 | t9 = t8;
0x00401f90 jalr t9 | t9 ();
0x00401f94 nop |
0x00401f98 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00401f9c addiu t8, fp, 0x144 | t8 = fp + 0x144;
0x00401fa0 move a0, t8 | a0 = t8;
0x00401fa4 lw t8, -0x7fd8(gp) | t8 = *(gp);
| /* str.Enable */
0x00401fa8 addiu a1, t8, 0x785c | a1 = t8 + 0x785c;
0x00401fac lw t8, -0x7f0c(gp) | t8 = *(gp);
0x00401fb0 move t9, t8 | t9 = t8;
0x00401fb4 jalr t9 | t9 ();
0x00401fb8 nop |
0x00401fbc lw gp, 0x18(fp) | gp = *(arg_18h);
0x00401fc0 move t8, v0 | t8 = v0;
0x00401fc4 sltu t8, zero, t8 | t8 = (0 < t8) ? 1 : 0;
0x00401fc8 sb t8, 0x5e(fp) | *(arg_5eh) = t8;
0x00401fcc addiu t8, fp, 0x144 | t8 = fp + 0x144;
0x00401fd0 move a0, t8 | a0 = t8;
0x00401fd4 lw t8, -0x7fd8(gp) | t8 = *(gp);
| /* str.SoundLevelEnable */
0x00401fd8 addiu a1, t8, 0x787c | a1 = t8 + 0x787c;
0x00401fdc lw t8, -0x7f0c(gp) | t8 = *(gp);
0x00401fe0 move t9, t8 | t9 = t8;
0x00401fe4 jalr t9 | t9 ();
0x00401fe8 nop |
0x00401fec lw gp, 0x18(fp) | gp = *(arg_18h);
0x00401ff0 move t8, v0 | t8 = v0;
0x00401ff4 sltu t8, zero, t8 | t8 = (0 < t8) ? 1 : 0;
0x00401ff8 sb t8, 0x5f(fp) | *(arg_5fh) = t8;
0x00401ffc addiu t8, fp, 0x144 | t8 = fp + 0x144;
0x00402000 move a0, t8 | a0 = t8;
0x00402004 lw t8, -0x7fd8(gp) | t8 = *(gp);
| /* str.DetectLevel */
0x00402008 addiu a1, t8, 0x7890 | a1 = t8 + 0x7890;
0x0040200c lw t8, -0x7f2c(gp) | t8 = *(gp);
0x00402010 move t9, t8 | t9 = t8;
0x00402014 jalr t9 | t9 ();
0x00402018 nop |
0x0040201c lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402020 move t8, v0 | t8 = v0;
0x00402024 addiu t8, t8, -0x32 | t8 += -0x32;
0x00402028 lui v0, 0x6666 | v0 = 0x66666667;
0x0040202c ori v0, v0, 0x6667 |
0x00402030 mult t8, v0 | __asm ("mult t8, v0");
0x00402034 mfhi v0 | __asm ("mfhi v0");
0x00402038 sra v0, v0, 1 | v0 >>= 1;
0x0040203c sra t8, t8, 0x1f | t8 >>= 0x1f;
0x00402040 subu t8, v0, t8 | __asm ("subu t8, v0, t8");
0x00402044 sw t8, 0x78(fp) | *(arg_78h) = t8;
0x00402048 lw t8, 0x78(fp) | t8 = *(arg_78h);
| if (t8 < 0) {
0x0040204c bgez t8, 0x402058 |
0x00402050 nop |
0x00402054 sw zero, 0x78(fp) | *(arg_78h) = 0;
| }
0x00402058 lw a0, -0x7f24(gp) | a0 = *((gp - 8137));
0x0040205c lw t8, -0x7fd8(gp) | t8 = *(gp);
| /* str.valueLevel: */
0x00402060 addiu a1, t8, 0x789c | a1 = t8 + 0x789c;
0x00402064 lw t8, -0x7ef8(gp) | t8 = *(gp);
0x00402068 move t9, t8 | t9 = t8;
0x0040206c jalr t9 | t9 ();
0x00402070 nop |
0x00402074 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402078 move t8, v0 | t8 = v0;
0x0040207c move a0, t8 | a0 = t8;
0x00402080 lw a1, 0x90(fp) | a1 = *(arg_90h);
0x00402084 lw t8, -0x7eac(gp) | t8 = *(gp);
0x00402088 move t9, t8 | t9 = t8;
0x0040208c jalr t9 | t9 ();
0x00402090 nop |
0x00402094 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402098 move t8, v0 | t8 = v0;
0x0040209c move a0, t8 | a0 = t8;
0x004020a0 lw a1, -0x7f78(gp) | a1 = *((gp - 8158));
0x004020a4 lw t8, -0x7f60(gp) | t8 = *(gp);
0x004020a8 move t9, t8 | t9 = t8;
0x004020ac jalr t9 | t9 ();
0x004020b0 nop |
0x004020b4 lw gp, 0x18(fp) | gp = *(arg_18h);
0x004020b8 lw a0, -0x7f24(gp) | a0 = *((gp - 8137));
0x004020bc lw t8, -0x7fd8(gp) | t8 = *(gp);
| /* str.dbLevel: */
0x004020c0 addiu a1, t8, 0x78a8 | a1 = t8 + 0x78a8;
0x004020c4 lw t8, -0x7ef8(gp) | t8 = *(gp);
0x004020c8 move t9, t8 | t9 = t8;
0x004020cc jalr t9 | t9 ();
0x004020d0 nop |
0x004020d4 lw gp, 0x18(fp) | gp = *(arg_18h);
0x004020d8 move t8, v0 | t8 = v0;
0x004020dc move a0, t8 | a0 = t8;
0x004020e0 lw a1, 0x78(fp) | a1 = *(arg_78h);
0x004020e4 lw t8, -0x7eac(gp) | t8 = *(gp);
0x004020e8 move t9, t8 | t9 = t8;
0x004020ec jalr t9 | t9 ();
0x004020f0 nop |
0x004020f4 lw gp, 0x18(fp) | gp = *(arg_18h);
0x004020f8 move t8, v0 | t8 = v0;
0x004020fc move a0, t8 | a0 = t8;
0x00402100 lw a1, -0x7f78(gp) | a1 = *((gp - 8158));
0x00402104 lw t8, -0x7f60(gp) | t8 = *(gp);
0x00402108 move t9, t8 | t9 = t8;
0x0040210c jalr t9 | t9 ();
0x00402110 nop |
0x00402114 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402118 addiu t8, fp, 0xf0 | t8 = fp + 0xf0;
0x0040211c move a0, t8 | a0 = t8;
0x00402120 lw t8, -0x7ef4(gp) | t8 = *(gp);
0x00402124 move t9, t8 | t9 = t8;
0x00402128 jalr t9 | t9 ();
0x0040212c nop |
0x00402130 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402134 addiu t8, fp, 0xf0 | t8 = fp + 0xf0;
0x00402138 move a0, t8 | a0 = t8;
0x0040213c addiu a1, zero, 0x491 | a1 = 0x491;
0x00402140 lw t8, -0x7f40(gp) | t8 = *(gp);
0x00402144 move t9, t8 | t9 = t8;
0x00402148 jalr t9 | t9 ();
0x0040214c nop |
0x00402150 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402154 addiu v1, fp, 0xf0 | v1 = fp + 0xf0;
0x00402158 addiu v0, fp, 0x64 | v0 = fp + 0x64;
0x0040215c addiu t8, fp, 0x68 | t8 = fp + 0x68;
0x00402160 addiu a0, fp, 0x60 | a0 = fp + 0x60;
0x00402164 sw a0, 0x10(sp) | *(var_10h) = a0;
0x00402168 move a0, v1 | a0 = v1;
0x0040216c move a1, zero | a1 = 0;
0x00402170 move a2, v0 | a2 = v0;
0x00402174 move a3, t8 | a3 = t8;
0x00402178 lw t8, -0x7ec0(gp) | t8 = *(gp);
0x0040217c move t9, t8 | t9 = t8;
0x00402180 jalr t9 | t9 ();
0x00402184 nop |
0x00402188 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0040218c lw v0, 0x60(fp) | v0 = *(arg_60h);
0x00402190 addiu t8, zero, 3 | t8 = 3;
| if (v0 == t8) {
0x00402194 bne v0, t8, 0x4021ac |
0x00402198 nop |
0x0040219c lw v0, 0x64(fp) | v0 = *(arg_64h);
0x004021a0 addiu t8, zero, 2 | t8 = 2;
| if (v0 == t8) {
0x004021a4 beq v0, t8, 0x4021ec | goto label_1;
| }
0x004021a8 nop |
| }
0x004021ac addiu a0, zero, 4 | a0 = 4;
0x004021b0 lw t8, -0x7f48(gp) | t8 = sym.imp.__cxa_allocate_exception;
0x004021b4 move t9, t8 | t9 = t8;
0x004021b8 jalr t9 | t9 ();
0x004021bc nop |
0x004021c0 lw gp, 0x18(fp) | gp = *(arg_18h);
0x004021c4 move t8, v0 | t8 = v0;
0x004021c8 addiu v0, zero, 1 | v0 = 1;
0x004021cc sw v0, (t8) | *(t8) = v0;
0x004021d0 move a0, t8 | a0 = t8;
0x004021d4 lw a1, -0x7f34(gp) | a1 = *((gp - 8141));
0x004021d8 move a2, zero | a2 = 0;
0x004021dc lw t8, -0x7f5c(gp) | t8 = sym.imp.__cxa_throw;
0x004021e0 move t9, t8 | t9 = t8;
0x004021e4 jalr t9 | t9 ();
0x004021e8 nop |
| label_1:
0x004021ec addiu t8, fp, 0x144 | t8 = fp + 0x144;
0x004021f0 move a0, t8 | a0 = t8;
0x004021f4 lw t8, -0x7ea4(gp) | t8 = *(gp);
0x004021f8 move t9, t8 | t9 = t8;
0x004021fc jalr t9 | t9 ();
0x00402200 nop |
0x00402204 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402208 sw zero, 0x6c(fp) | *(arg_6ch) = 0;
0x0040220c addiu t8, zero, 0x400 | t8 = 0x400;
0x00402210 sw t8, 0x94(fp) | *(arg_94h) = t8;
0x00402214 move v0, zero | v0 = 0;
0x00402218 move v1, zero | v1 = 0;
0x0040221c sw v0, 0xb8(fp) | *(arg_b8h) = v0;
0x00402220 sw v1, 0xbc(fp) | *(arg_bch) = v1;
0x00402224 sw zero, 0x7c(fp) | *(arg_7ch) = 0;
0x00402228 sw zero, 0x80(fp) | *(arg_80h) = 0;
0x0040222c addiu v0, fp, 0x104 | v0 = fp + 0x104;
0x00402230 addiu t8, fp, 0x6c | t8 = fp + 0x6c;
0x00402234 move a0, v0 | a0 = v0;
0x00402238 move a1, t8 | a1 = t8;
0x0040223c lw t8, -0x7f38(gp) | t8 = *(gp);
0x00402240 move t9, t8 | t9 = t8;
0x00402244 jalr t9 | t9 ();
0x00402248 nop |
0x0040224c lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402250 mtlo v0 | __asm ("mtlo v0");
0x00402254 mthi v1 | __asm ("mthi v1");
0x00402258 mflo v0 | __asm ("mflo v0");
0x0040225c mfhi v1 | __asm ("mfhi v1");
0x00402260 sw v0, 0xc0(fp) | *(arg_c0h) = v0;
0x00402264 sw v1, 0xc4(fp) | *(arg_c4h) = v1;
0x00402268 addiu t8, fp, 0x104 | t8 = fp + 0x104;
0x0040226c move a0, t8 | a0 = t8;
0x00402270 addiu a1, zero, 0xa | a1 = 0xa;
0x00402274 lw t8, -0x7f74(gp) | t8 = *(gp);
0x00402278 move t9, t8 | t9 = t8;
0x0040227c jalr t9 | t9 ();
0x00402280 nop |
0x00402284 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402288 nop |
0x0040228c sw zero, 0x84(fp) | *(arg_84h) = 0;
0x00402290 lw a0, 0x90(fp) | a0 = *(arg_90h);
0x00402294 lw a1, 0x78(fp) | a1 = *(arg_78h);
0x00402298 lw t8, -0x7fcc(gp) | t8 = sym.getBasicValue_int__int_;
0x0040229c move t9, t8 | t9 = t8;
0x004022a0 jalr t9 | t9 ();
0x004022a4 nop |
0x004022a8 lw gp, 0x18(fp) | gp = *(arg_18h);
0x004022ac move t8, v0 | t8 = v0;
0x004022b0 sw t8, 0x98(fp) | *(arg_98h) = t8;
0x004022b4 sw zero, 0x88(fp) | *(arg_88h) = 0;
0x004022b8 addiu t8, fp, 0x70 | t8 = fp + 0x70;
0x004022bc move a0, t8 | a0 = t8;
0x004022c0 move a1, zero | a1 = 0;
0x004022c4 lw a2, -0x7fc8(gp) | a2 = sym.waitSuspendEvent_void_;
0x004022c8 move a3, zero | a3 = 0;
0x004022cc lw t8, -0x7f18(gp) | t8 = sym.imp.pthread_create;
0x004022d0 move t9, t8 | t9 = t8;
0x004022d4 jalr t9 | t9 ();
0x004022d8 nop |
0x004022dc lw gp, 0x18(fp) | gp = *(arg_18h);
0x004022e0 move v0, zero | v0 = 0;
0x004022e4 move v1, zero | v1 = 0;
0x004022e8 sw v0, 0xc8(fp) | *(arg_c8h) = v0;
0x004022ec sw v1, 0xcc(fp) | *(arg_cch) = v1;
0x004022f0 move t8, zero | t8 = 0;
0x004022f4 move t9, zero | t9 = 0;
0x004022f8 sw t8, 0xd0(fp) | *(arg_d0h) = t8;
0x004022fc sw t9, 0xd4(fp) | *(arg_d4h) = t9;
| label_0:
0x00402300 lw t8, -0x7fd4(gp) | t8 = *(gp);
0x00402304 lbu t8, (t8) | t8 = *(t8);
| if (t8 != 0) {
0x00402308 beqz t8, 0x402330 |
0x0040230c nop |
0x00402310 addiu a0, zero, 2 | a0 = 2;
0x00402314 lw t8, -0x7ec8(gp) | t8 = sym.imp.sleep;
0x00402318 move t9, t8 | t9 = t8;
0x0040231c jalr t9 | t9 ();
0x00402320 nop |
0x00402324 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402328 b 0x402c98 | goto label_2;
0x0040232c nop |
| }
0x00402330 lw t8, 0x6c(fp) | t8 = *(arg_6ch);
| if (t8 == 0) {
0x00402334 bnez t8, 0x40237c |
0x00402338 nop |
0x0040233c addiu t8, fp, 0x104 | t8 = fp + 0x104;
0x00402340 move a0, t8 | a0 = t8;
0x00402344 lw t8, -0x7eb4(gp) | t8 = *(gp);
0x00402348 move t9, t8 | t9 = t8;
0x0040234c jalr t9 | t9 ();
0x00402350 nop |
0x00402354 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402358 addiu t8, fp, 0x104 | t8 = fp + 0x104;
0x0040235c move a0, t8 | a0 = t8;
0x00402360 lw t8, -0x7eb8(gp) | t8 = *(gp);
0x00402364 move t9, t8 | t9 = t8;
0x00402368 jalr t9 | t9 ();
0x0040236c nop |
0x00402370 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402374 b 0x4023f8 | goto label_3;
0x00402378 nop |
| }
0x0040237c lw v0, 0x6c(fp) | v0 = *(arg_6ch);
0x00402380 lw t8, 0x94(fp) | t8 = *(arg_94h);
0x00402384 slt t8, v0, t8 | t8 = (v0 < t8) ? 1 : 0;
| if (t8 == 0) {
0x00402388 bnez t8, 0x4023b4 |
0x0040238c nop |
0x00402390 addiu t8, fp, 0x104 | t8 = fp + 0x104;
0x00402394 move a0, t8 | a0 = t8;
0x00402398 lw t8, -0x7eb8(gp) | t8 = *(gp);
0x0040239c move t9, t8 | t9 = t8;
0x004023a0 jalr t9 | t9 ();
0x004023a4 nop |
0x004023a8 lw gp, 0x18(fp) | gp = *(arg_18h);
0x004023ac b 0x4023f8 | goto label_3;
0x004023b0 nop |
| }
0x004023b4 addiu v0, fp, 0x104 | v0 = fp + 0x104;
0x004023b8 addiu t8, fp, 0x6c | t8 = fp + 0x6c;
0x004023bc move a0, v0 | a0 = v0;
0x004023c0 move a1, t8 | a1 = t8;
0x004023c4 lw t8, -0x7f38(gp) | t8 = *(gp);
0x004023c8 move t9, t8 | t9 = t8;
0x004023cc jalr t9 | t9 ();
0x004023d0 nop |
0x004023d4 lw gp, 0x18(fp) | gp = *(arg_18h);
0x004023d8 mtlo v0 | __asm ("mtlo v0");
0x004023dc mthi v1 | __asm ("mthi v1");
0x004023e0 mflo v0 | __asm ("mflo v0");
0x004023e4 mfhi v1 | __asm ("mfhi v1");
0x004023e8 sw v0, 0xc0(fp) | *(arg_c0h) = v0;
0x004023ec sw v1, 0xc4(fp) | *(arg_c4h) = v1;
0x004023f0 b 0x402c98 | goto label_2;
0x004023f4 nop |
| label_3:
0x004023f8 lw t8, 0x88(fp) | t8 = *(arg_88h);
0x004023fc addiu t8, t8, 1 | t8++;
0x00402400 sw t8, 0x88(fp) | *(arg_88h) = t8;
0x00402404 sw zero, 0x8c(fp) | *(arg_8ch) = 0;
0x00402408 b 0x40247c | goto label_4;
0x0040240c nop |
| do {
0x00402410 lw v0, 0x13c(fp) | v0 = *(arg_13ch);
0x00402414 lw t8, 0x8c(fp) | t8 = *(arg_8ch);
0x00402418 sll t8, t8, 1 | t8 <<= 1;
0x0040241c addu t8, v0, t8 | t8 = v0 + t8;
0x00402420 sw t8, 0x9c(fp) | *(arg_9ch) = t8;
0x00402424 lw t8, 0x9c(fp) | t8 = *(arg_9ch);
0x00402428 lh t8, (t8) | t8 = *(t8);
| if (t8 < 0) {
0x0040242c bgez t8, 0x402438 |
0x00402430 nop |
0x00402434 negu t8, t8 | __asm ("negu t8, t8");
| }
0x00402438 sw t8, 0xa0(fp) | *(arg_a0h) = t8;
0x0040243c lw t8, 0xa0(fp) | t8 = *(arg_a0h);
0x00402440 move s6, t8 | s6 = t8;
0x00402444 sra t8, t8, 0x1f | t8 >>= 0x1f;
0x00402448 move s7, t8 | s7 = t8;
0x0040244c lw v0, 0xb8(fp) | v0 = *(arg_b8h);
0x00402450 lw v1, 0xbc(fp) | v1 = *(arg_bch);
0x00402454 addu t8, v0, s6 | t8 = v0 + s6;
0x00402458 sltu a0, t8, v0 | a0 = (t8 < v0) ? 1 : 0;
0x0040245c addu t9, v1, s7 | t9 = v1 + s7;
0x00402460 addu v0, a0, t9 | v0 = a0 + t9;
0x00402464 move t9, v0 | t9 = v0;
0x00402468 sw t8, 0xb8(fp) | *(arg_b8h) = t8;
0x0040246c sw t9, 0xbc(fp) | *(arg_bch) = t9;
0x00402470 lw t8, 0x8c(fp) | t8 = *(arg_8ch);
0x00402474 addiu t8, t8, 1 | t8++;
0x00402478 sw t8, 0x8c(fp) | *(arg_8ch) = t8;
| label_4:
0x0040247c lw v0, 0x8c(fp) | v0 = *(arg_8ch);
0x00402480 lw t8, 0x94(fp) | t8 = *(arg_94h);
0x00402484 slt t8, v0, t8 | t8 = (v0 < t8) ? 1 : 0;
0x00402488 bnez t8, 0x402410 |
| } while (t8 != 0);
0x0040248c nop |
0x00402490 lw v0, 0xbc(fp) | v0 = *(arg_bch);
0x00402494 lw t8, 0xcc(fp) | t8 = *(arg_cch);
0x00402498 sltu t8, t8, v0 | t8 = (t8 < v0) ? 1 : 0;
| if (t8 == 0) {
0x0040249c bnez t8, 0x4024c8 |
0x004024a0 nop |
0x004024a4 lw v0, 0xbc(fp) | v0 = *(arg_bch);
0x004024a8 lw t8, 0xcc(fp) | t8 = *(arg_cch);
| if (v0 != t8) {
0x004024ac bne v0, t8, 0x4024e8 | goto label_5;
| }
0x004024b0 nop |
0x004024b4 lw v0, 0xb8(fp) | v0 = *(arg_b8h);
0x004024b8 lw t8, 0xc8(fp) | t8 = *(arg_c8h);
0x004024bc sltu t8, t8, v0 | t8 = (t8 < v0) ? 1 : 0;
| if (t8 == 0) {
0x004024c0 beqz t8, 0x4024e8 | goto label_5;
| }
0x004024c4 nop |
| }
0x004024c8 lw t8, 0xb8(fp) | t8 = *(arg_b8h);
0x004024cc lw t9, 0xbc(fp) | t9 = *(arg_bch);
0x004024d0 mtlo t8 | __asm ("mtlo t8");
0x004024d4 mthi t9 | __asm ("mthi t9");
0x004024d8 mflo v0 | __asm ("mflo v0");
0x004024dc mfhi v1 | __asm ("mfhi v1");
0x004024e0 sw v0, 0xc8(fp) | *(arg_c8h) = v0;
0x004024e4 sw v1, 0xcc(fp) | *(arg_cch) = v1;
| label_5:
0x004024e8 lw v0, 0xd0(fp) | v0 = *(arg_d0h);
0x004024ec lw v1, 0xd4(fp) | v1 = *(arg_d4h);
0x004024f0 lw a0, 0xb8(fp) | a0 = *(arg_b8h);
0x004024f4 lw a1, 0xbc(fp) | a1 = *(arg_bch);
0x004024f8 addu t8, v0, a0 | t8 = v0 + a0;
0x004024fc sltu a2, t8, v0 | a2 = (t8 < v0) ? 1 : 0;
0x00402500 addu t9, v1, a1 | t9 = v1 + a1;
0x00402504 addu v0, a2, t9 | v0 = a2 + t9;
0x00402508 move t9, v0 | t9 = v0;
0x0040250c sw t8, 0xd0(fp) | *(arg_d0h) = t8;
0x00402510 sw t9, 0xd4(fp) | *(arg_d4h) = t9;
0x00402514 lw v0, 0x88(fp) | v0 = *(arg_88h);
0x00402518 addiu t8, zero, 0x10 | t8 = 0x10;
| if (v0 == t8) {
0x0040251c bne v0, t8, 0x402acc |
0x00402520 nop |
0x00402524 move t8, zero | t8 = 0;
0x00402528 move t9, zero | t9 = 0;
0x0040252c sw t8, 0xd8(fp) | *(arg_d8h) = t8;
0x00402530 sw t9, 0xdc(fp) | *(arg_dch) = t9;
0x00402534 lw a0, 0xd0(fp) | a0 = *(arg_d0h);
0x00402538 lw a1, 0xd4(fp) | a1 = *(arg_d4h);
0x0040253c move a2, zero | a2 = 0;
0x00402540 move a3, zero | a3 = 0;
0x00402544 lw t8, -0x7f14(gp) | t8 = sym.imp.__cmpdi2;
0x00402548 move t9, t8 | t9 = t8;
0x0040254c jalr t9 | t9 ();
0x00402550 nop |
0x00402554 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402558 slti t8, v0, 1 | t8 = (v0 < 1) ? 1 : 0;
| if (t8 == 0) {
0x0040255c bnez t8, 0x402598 |
0x00402560 nop |
0x00402564 lw v0, 0xd0(fp) | v0 = *(arg_d0h);
0x00402568 lw v1, 0xd4(fp) | v1 = *(arg_d4h);
0x0040256c mtlo v0 | __asm ("mtlo v0");
0x00402570 mthi v1 | __asm ("mthi v1");
0x00402574 mflo v0 | __asm ("mflo v0");
0x00402578 mfhi v1 | __asm ("mfhi v1");
0x0040257c mtc1 v0, f0 | __asm ("mtc1 v0, f0");
0x00402580 mthc1 v1, f0 | __asm ("mthc1 v1, f0");
| }
0x00402598 lw t8, 0xd0(fp) | t8 = *(arg_d0h);
0x0040259c andi t8, t8, 1 | t8 &= 1;
0x004025a0 sw t8, 0x48(fp) | *(arg_48h) = t8;
0x004025a4 lw t8, 0xd4(fp) | t8 = *(arg_d4h);
0x004025a8 andi t8, t8, 0 | t8 = 0;
0x004025ac sw t8, 0x4c(fp) | *(arg_4ch) = t8;
0x004025b0 lw t8, 0xd4(fp) | t8 = *(arg_d4h);
0x004025b4 sll t8, t8, 0x1f | t8 <<= 0x1f;
0x004025b8 lw v0, 0xd0(fp) | v0 = *(arg_d0h);
0x004025bc srl s0, v0, 1 | s0 = v0 >> 1;
0x004025c0 or s0, t8, s0 | s0 = t8 | s0;
0x004025c4 lw t8, 0xd4(fp) | t8 = *(arg_d4h);
0x004025c8 srl s1, t8, 1 | s1 = t8 >> 1;
0x004025cc lw v0, 0x48(fp) | v0 = *(arg_48h);
0x004025d0 or v0, v0, s0 | v0 |= s0;
0x004025d4 sw v0, 0x40(fp) | *(arg_40h) = v0;
0x004025d8 lw v1, 0x4c(fp) | v1 = *(arg_4ch);
0x004025dc or v1, v1, s1 | v1 |= s1;
0x004025e0 sw v1, 0x44(fp) | *(arg_44h) = v1;
0x004025e4 ldc1 f0, 0x40(fp) | __asm ("ldc1 f0, (arg_40h)");
| }
0x00402acc move v0, zero | v0 = 0;
0x00402ad0 move v1, zero | v1 = 0;
0x00402ad4 sw v0, 0xb8(fp) | *(arg_b8h) = v0;
0x00402ad8 sw v1, 0xbc(fp) | *(arg_bch) = v1;
0x00402adc lw v0, 0xc0(fp) | v0 = *(arg_c0h);
0x00402ae0 lw v1, 0xc4(fp) | v1 = *(arg_c4h);
0x00402ae4 addiu a0, zero, 1 | a0 = 1;
0x00402ae8 move a1, zero | a1 = 0;
0x00402aec addu t8, v0, a0 | t8 = v0 + a0;
0x00402af0 sltu a2, t8, v0 | a2 = (t8 < v0) ? 1 : 0;
0x00402af4 addu t9, v1, a1 | t9 = v1 + a1;
0x00402af8 addu v0, a2, t9 | v0 = a2 + t9;
0x00402afc move t9, v0 | t9 = v0;
0x00402b00 sw t8, 0xc0(fp) | *(arg_c0h) = t8;
0x00402b04 sw t9, 0xc4(fp) | *(arg_c4h) = t9;
0x00402b08 addiu v0, fp, 0x104 | v0 = fp + 0x104;
0x00402b0c addiu t8, fp, 0x6c | t8 = fp + 0x6c;
0x00402b10 move a0, v0 | a0 = v0;
0x00402b14 move a1, t8 | a1 = t8;
0x00402b18 lw t8, -0x7f68(gp) | t8 = *(gp);
0x00402b1c move t9, t8 | t9 = t8;
0x00402b20 jalr t9 | t9 ();
0x00402b24 nop |
0x00402b28 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402b2c mtlo v0 | __asm ("mtlo v0");
0x00402b30 mthi v1 | __asm ("mthi v1");
0x00402b34 mflo v0 | __asm ("mflo v0");
0x00402b38 mfhi v1 | __asm ("mfhi v1");
0x00402b3c sw v0, 0xe8(fp) | *(arg_e8h) = v0;
0x00402b40 sw v1, 0xec(fp) | *(arg_ech) = v1;
0x00402b44 lw v0, 0xe8(fp) | v0 = *(arg_e8h);
0x00402b48 lw t8, 0xc0(fp) | t8 = *(arg_c0h);
| if (v0 == t8) {
0x00402b4c bne v0, t8, 0x402b6c |
0x00402b50 nop |
0x00402b54 lw v0, 0xec(fp) | v0 = *(arg_ech);
0x00402b58 lw t8, 0xc4(fp) | t8 = *(arg_c4h);
| if (v0 != t8) {
0x00402b5c bne v0, t8, 0x402b6c | goto label_6;
| }
0x00402b60 nop |
0x00402b64 b 0x402c98 | goto label_2;
0x00402b68 nop |
| }
| label_6:
0x00402b6c lw v0, 0xe8(fp) | v0 = *(arg_e8h);
0x00402b70 lw v1, 0xec(fp) | v1 = *(arg_ech);
0x00402b74 addiu a0, zero, 0xc8 | a0 = 0xc8;
0x00402b78 move a1, zero | a1 = 0;
0x00402b7c addu t8, v0, a0 | t8 = v0 + a0;
0x00402b80 sltu a2, t8, v0 | a2 = (t8 < v0) ? 1 : 0;
0x00402b84 addu t9, v1, a1 | t9 = v1 + a1;
0x00402b88 addu v0, a2, t9 | v0 = a2 + t9;
0x00402b8c move t9, v0 | t9 = v0;
0x00402b90 lw v1, 0xc0(fp) | v1 = *(arg_c0h);
0x00402b94 move v0, t8 | v0 = t8;
| if (v1 == v0) {
0x00402b98 bne v1, v0, 0x402bb0 |
0x00402b9c nop |
0x00402ba0 lw v0, 0xc4(fp) | v0 = *(arg_c4h);
0x00402ba4 move t8, t9 | t8 = t9;
| if (v0 == t8) {
0x00402ba8 beq v0, t8, 0x402bc4 | goto label_7;
| }
0x00402bac nop |
| }
0x00402bb0 lw t8, 0xe8(fp) | t8 = *(arg_e8h);
0x00402bb4 lw v0, 0xec(fp) | v0 = *(arg_ech);
0x00402bb8 or t8, t8, v0 | t8 |= v0;
| if (t8 == 0) {
0x00402bbc bnez t8, 0x402bd0 |
0x00402bc0 nop |
| label_7:
0x00402bc4 sw zero, 0x6c(fp) | *(arg_6ch) = 0;
0x00402bc8 b 0x402c98 | goto label_2;
0x00402bcc nop |
| }
0x00402bd0 lw v0, 0xec(fp) | v0 = *(arg_ech);
0x00402bd4 lw t8, 0xc4(fp) | t8 = *(arg_c4h);
0x00402bd8 sltu t8, t8, v0 | t8 = (t8 < v0) ? 1 : 0;
| if (t8 == 0) {
0x00402bdc bnez t8, 0x402c08 |
0x00402be0 nop |
0x00402be4 lw v0, 0xec(fp) | v0 = *(arg_ech);
0x00402be8 lw t8, 0xc4(fp) | t8 = *(arg_c4h);
| if (v0 != t8) {
0x00402bec bne v0, t8, 0x402c4c | goto label_8;
| }
0x00402bf0 nop |
0x00402bf4 lw v0, 0xe8(fp) | v0 = *(arg_e8h);
0x00402bf8 lw t8, 0xc0(fp) | t8 = *(arg_c0h);
0x00402bfc sltu t8, t8, v0 | t8 = (t8 < v0) ? 1 : 0;
| if (t8 == 0) {
0x00402c00 beqz t8, 0x402c4c | goto label_8;
| }
0x00402c04 nop |
| }
0x00402c08 addiu v0, fp, 0x104 | v0 = fp + 0x104;
0x00402c0c addiu t8, fp, 0x6c | t8 = fp + 0x6c;
0x00402c10 move a0, v0 | a0 = v0;
0x00402c14 move a1, t8 | a1 = t8;
0x00402c18 lw t8, -0x7f38(gp) | t8 = *(gp);
0x00402c1c move t9, t8 | t9 = t8;
0x00402c20 jalr t9 | t9 ();
0x00402c24 nop |
0x00402c28 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402c2c mtlo v0 | __asm ("mtlo v0");
0x00402c30 mthi v1 | __asm ("mthi v1");
0x00402c34 mflo v0 | __asm ("mflo v0");
0x00402c38 mfhi v1 | __asm ("mfhi v1");
0x00402c3c sw v0, 0xc0(fp) | *(arg_c0h) = v0;
0x00402c40 sw v1, 0xc4(fp) | *(arg_c4h) = v1;
0x00402c44 b 0x402c98 | goto label_2;
0x00402c48 nop |
| label_8:
0x00402c4c lw t8, -0x7fd8(gp) | t8 = *(gp);
| /* str.not_a_reasonable_id:__lld */
0x00402c50 addiu a0, t8, 0x78b4 | a0 = t8 + 0x78b4;
0x00402c54 lw a2, 0xe8(fp) | a2 = *(arg_e8h);
0x00402c58 lw a3, 0xec(fp) | a3 = *(arg_ech);
0x00402c5c lw t8, -0x7f8c(gp) | t8 = sym.imp.printf
0x00402c60 move t9, t8 | t9 = t8;
0x00402c64 jalr t9 | t9 ();
0x00402c68 nop |
0x00402c6c lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402c70 nop |
0x00402c74 addiu t8, fp, 0xf0 | t8 = fp + 0xf0;
0x00402c78 move a0, t8 | a0 = t8;
0x00402c7c lw t8, -0x7ed8(gp) | t8 = *(gp);
0x00402c80 move t9, t8 | t9 = t8;
0x00402c84 jalr t9 | t9 ();
0x00402c88 nop |
0x00402c8c lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402c90 b 0x402ca0 | goto label_9;
0x00402c94 nop |
| label_2:
0x00402c98 b 0x402300 | goto label_0;
0x00402c9c nop |
| label_9:
0x00402ca0 addiu t8, fp, 0x144 | t8 = fp + 0x144;
0x00402ca4 move a0, t8 | a0 = t8;
0x00402ca8 lw t8, -0x7f44(gp) | t8 = sym.imp.TinyDB::TinyDB__;
0x00402cac move t9, t8 | t9 = t8;
0x00402cb0 jalr t9 | t9 ();
0x00402cb4 nop |
0x00402cb8 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402cbc addiu t8, fp, 0x104 | t8 = fp + 0x104;
0x00402cc0 move a0, t8 | a0 = t8;
0x00402cc4 lw t8, -0x7f50(gp) | t8 = *(gp);
0x00402cc8 move t9, t8 | t9 = t8;
0x00402ccc jalr t9 | t9 ();
0x00402cd0 nop |
0x00402cd4 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402cd8 lw s0, 0x74(fp) | s0 = *(arg_74h);
0x00402cdc addiu t8, fp, 0x104 | t8 = fp + 0x104;
0x00402ce0 move a0, t8 | a0 = t8;
0x00402ce4 lw t8, -0x7f84(gp) | t8 = *(gp);
0x00402ce8 move t9, t8 | t9 = t8;
0x00402cec jalr t9 | t9 ();
0x00402cf0 nop |
0x00402cf4 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402cf8 move t8, s0 | t8 = s0;
0x00402cfc move v0, t8 | v0 = t8;
0x00402d00 lw t8, -0x7eb0(gp) | t8 = *((gp - 8108));
0x00402d04 lw v1, 0x115c(fp) | v1 = *(arg_115ch);
0x00402d08 lw t8, (t8) | t8 = *(t8);
| if (v1 != t8) {
0x00402d0c beq v1, t8, 0x4031cc |
0x00402d10 nop |
0x00402d14 b 0x4031bc | goto label_10;
0x00402d18 nop |
| label_10:
0x004031bc lw t8, -0x7f10(gp) | t8 = sym.imp.__stack_chk_fail;
0x004031c0 move t9, t8 | t9 = t8;
0x004031c4 jalr t9 | t9 ();
0x004031c8 nop |
| }
0x004031cc move sp, fp |
0x004031d0 lw ra, 0x1184(sp) | ra = *(var_1184h);
0x004031d4 lw fp, 0x1180(sp) | fp = *(var_1180h);
0x004031d8 lw s7, 0x117c(sp) | s7 = *(var_117ch);
0x004031dc lw s6, 0x1178(sp) | s6 = *(var_1178h);
0x004031e0 lw s5, 0x1174(sp) | s5 = *(var_1174h);
0x004031e4 lw s4, 0x1170(sp) | s4 = *(var_1170h);
0x004031e8 lw s3, 0x116c(sp) | s3 = *(var_116ch);
0x004031ec lw s2, 0x1168(sp) | s2 = *(var_1168h);
0x004031f0 lw s1, 0x1164(sp) | s1 = *(var_1164h);
0x004031f4 lw s0, 0x1160(sp) | s0 = *(var_1160h);
0x004031f8 addiu sp, sp, 0x1188 |
0x004031fc jr ra | return v1;
0x00403200 nop |
| }
[*] Function printf used 2 times db_analysis