[*] Binary protection state of tz_dst
Full RELRO Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of tz_dst
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/sbin/tz_dst @ 0x401fbc */
| #include <stdint.h>
|
; (fcn) aav.0x00401fbc () | void aav_0x00401fbc () {
0x00401fbc lui gp, 2 |
0x00401fc0 addiu gp, gp, 0x3064 |
0x00401fc4 addu gp, gp, t9 | gp += t9;
0x00401fc8 addiu sp, sp, -0x88 |
0x00401fcc sw ra, 0x84(sp) | *(var_84h) = ra;
0x00401fd0 sw fp, 0x80(sp) | *(var_80h) = fp;
0x00401fd4 sw s0, 0x7c(sp) | *(var_7ch) = s0;
0x00401fd8 move fp, sp | fp = sp;
0x00401fdc sw gp, 0x10(sp) | *(var_10h) = gp;
0x00401fe0 sw a0, 0x24(fp) | *(arg_24h) = a0;
0x00401fe4 sw a1, 0x20(fp) | *(arg_20h) = a1;
0x00401fe8 sw a2, 0x1c(fp) | *(arg_1ch) = a2;
0x00401fec lw t8, -0x7ec0(gp) | t8 = *((gp - 8112));
0x00401ff0 lw t8, (t8) | t8 = *(t8);
0x00401ff4 sw t8, 0x74(fp) | *(arg_74h) = t8;
0x00401ff8 addiu t8, fp, 0x68 | t8 = fp + 0x68;
0x00401ffc move a0, t8 | a0 = t8;
0x00402000 lw t8, -0x7fcc(gp) | t8 = *(gp);
0x00402004 move t9, t8 | t9 = t8;
0x00402008 jalr t9 | t9 ();
0x0040200c nop |
0x00402010 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402014 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00402018 lbu t8, (t8) | t8 = *(t8);
| if (t8 == 0) {
0x0040201c bnez t8, 0x402034 |
0x00402020 nop |
0x00402024 lw t8, 0x24(fp) | t8 = *(arg_24h);
0x00402028 sb zero, (t8) | *(t8) = 0;
0x0040202c b 0x4027e8 | goto label_0;
0x00402030 nop |
| }
0x00402034 addiu t8, fp, 0x34 | t8 = fp + 0x34;
0x00402038 move a0, t8 | a0 = t8;
0x0040203c lw t8, -0x7f54(gp) | t8 = *(gp);
0x00402040 move t9, t8 | t9 = t8;
0x00402044 jalr t9 | t9 ();
0x00402048 nop |
0x0040204c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402050 addiu v0, fp, 0x30 | v0 = fp + 0x30;
0x00402054 addiu t8, fp, 0x34 | t8 = fp + 0x34;
0x00402058 move a0, v0 | a0 = v0;
0x0040205c lw a1, 0x20(fp) | a1 = *(arg_20h);
0x00402060 move a2, t8 | a2 = t8;
0x00402064 lw t8, -0x7f18(gp) | t8 = *(gp);
0x00402068 move t9, t8 | t9 = t8;
0x0040206c jalr t9 | t9 ();
0x00402070 nop |
0x00402074 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402078 addiu v0, fp, 0x30 | v0 = fp + 0x30;
0x0040207c addiu t8, fp, 0x68 | t8 = fp + 0x68;
0x00402080 move a0, v0 | a0 = v0;
0x00402084 move a1, t8 | a1 = t8;
0x00402088 addiu a2, zero, 0x3a | a2 = 0x3a;
0x0040208c lw t8, -0x7edc(gp) | t8 = sym.imp.seperate_std::string_const__std::vector_std::string__std::allocator_std::string_____char_;
0x00402090 move t9, t8 | t9 = t8;
0x00402094 jalr t9 | t9 ();
0x00402098 nop |
0x0040209c lw gp, 0x10(fp) | gp = *(arg_10h);
0x004020a0 move t8, v0 | t8 = v0;
0x004020a4 sw t8, 0x38(fp) | *(arg_38h) = t8;
0x004020a8 addiu t8, fp, 0x30 | t8 = fp + 0x30;
0x004020ac move a0, t8 | a0 = t8;
0x004020b0 lw t8, -0x7ef4(gp) | t8 = *((gp - 8125));
0x004020b4 move t9, t8 | t9 = t8;
0x004020b8 jalr t9 | t9 ();
0x004020bc nop |
0x004020c0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004020c4 addiu t8, fp, 0x34 | t8 = fp + 0x34;
0x004020c8 move a0, t8 | a0 = t8;
0x004020cc lw t8, -0x7f38(gp) | t8 = *(gp);
0x004020d0 move t9, t8 | t9 = t8;
0x004020d4 jalr t9 | t9 ();
0x004020d8 nop |
0x004020dc lw gp, 0x10(fp) | gp = *(arg_10h);
0x004020e0 lw t8, 0x38(fp) | t8 = *(arg_38h);
| if (t8 != 0) {
0x004020e4 beqz t8, 0x4027a8 |
0x004020e8 nop |
0x004020ec addiu t8, fp, 0x68 | t8 = fp + 0x68;
0x004020f0 move a0, t8 | a0 = t8;
0x004020f4 move a1, zero | a1 = 0;
0x004020f8 lw t8, -0x7fc8(gp) | t8 = *(gp);
0x004020fc move t9, t8 | t9 = t8;
0x00402100 jalr t9 | t9 ();
0x00402104 nop |
0x00402108 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040210c move t8, v0 | t8 = v0;
0x00402110 move a0, t8 | a0 = t8;
0x00402114 move a1, zero | a1 = 0;
0x00402118 lw t8, -0x7ecc(gp) | t8 = *(gp);
0x0040211c move t9, t8 | t9 = t8;
0x00402120 jalr t9 | t9 ();
0x00402124 nop |
0x00402128 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040212c move t8, v0 | t8 = v0;
0x00402130 lb t8, (t8) | t8 = *(t8);
0x00402134 xori t8, t8, 0x2d | t8 ^= 0x2d;
0x00402138 sltiu t8, t8, 1 | t8 = (t8 < 1) ? 1 : 0;
0x0040213c sb t8, 0x2e(fp) | *(arg_2eh) = t8;
0x00402140 addiu t8, fp, 0x68 | t8 = fp + 0x68;
0x00402144 move a0, t8 | a0 = t8;
0x00402148 move a1, zero | a1 = 0;
0x0040214c lw t8, -0x7fc8(gp) | t8 = *(gp);
0x00402150 move t9, t8 | t9 = t8;
0x00402154 jalr t9 | t9 ();
0x00402158 nop |
0x0040215c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402160 move t8, v0 | t8 = v0;
0x00402164 move a0, t8 | a0 = t8;
0x00402168 move a1, zero | a1 = 0;
0x0040216c lw t8, -0x7ecc(gp) | t8 = *(gp);
0x00402170 move t9, t8 | t9 = t8;
0x00402174 jalr t9 | t9 ();
0x00402178 nop |
0x0040217c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402180 move t8, v0 | t8 = v0;
0x00402184 lb v0, (t8) | v0 = *(t8);
0x00402188 addiu t8, zero, 0x2d | t8 = 0x2d;
| if (v0 != t8) {
0x0040218c beq v0, t8, 0x4021e8 |
0x00402190 nop |
0x00402194 addiu t8, fp, 0x68 | t8 = fp + 0x68;
0x00402198 move a0, t8 | a0 = t8;
0x0040219c move a1, zero | a1 = 0;
0x004021a0 lw t8, -0x7fc8(gp) | t8 = *(gp);
0x004021a4 move t9, t8 | t9 = t8;
0x004021a8 jalr t9 | t9 ();
0x004021ac nop |
0x004021b0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004021b4 move t8, v0 | t8 = v0;
0x004021b8 move a0, t8 | a0 = t8;
0x004021bc move a1, zero | a1 = 0;
0x004021c0 lw t8, -0x7ecc(gp) | t8 = *(gp);
0x004021c4 move t9, t8 | t9 = t8;
0x004021c8 jalr t9 | t9 ();
0x004021cc nop |
0x004021d0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004021d4 move t8, v0 | t8 = v0;
0x004021d8 lb v0, (t8) | v0 = *(t8);
0x004021dc addiu t8, zero, 0x2b | t8 = 0x2b;
| if (v0 != t8) {
0x004021e0 bne v0, t8, 0x402250 | goto label_1;
| }
0x004021e4 nop |
| }
0x004021e8 addiu t8, fp, 0x68 | t8 = fp + 0x68;
0x004021ec move a0, t8 | a0 = t8;
0x004021f0 move a1, zero | a1 = 0;
0x004021f4 lw t8, -0x7fc8(gp) | t8 = *(gp);
0x004021f8 move t9, t8 | t9 = t8;
0x004021fc jalr t9 | t9 ();
0x00402200 nop |
0x00402204 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402208 move t8, v0 | t8 = v0;
0x0040220c move a0, t8 | a0 = t8;
0x00402210 lw t8, -0x7ec8(gp) | t8 = *(gp);
0x00402214 move t9, t8 | t9 = t8;
0x00402218 jalr t9 | t9 ();
0x0040221c nop |
0x00402220 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402224 move t8, v0 | t8 = v0;
0x00402228 addiu t8, t8, 1 | t8++;
0x0040222c move a0, t8 | a0 = t8;
0x00402230 lw t8, -0x7f50(gp) | t8 = sym.imp.atoi;
0x00402234 move t9, t8 | t9 = t8;
0x00402238 jalr t9 | t9 ();
0x0040223c nop |
0x00402240 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402244 move t8, v0 | t8 = v0;
0x00402248 b 0x4022ac | goto label_2;
0x0040224c nop |
| label_1:
0x00402250 addiu t8, fp, 0x68 | t8 = fp + 0x68;
0x00402254 move a0, t8 | a0 = t8;
0x00402258 move a1, zero | a1 = 0;
0x0040225c lw t8, -0x7fc8(gp) | t8 = *(gp);
0x00402260 move t9, t8 | t9 = t8;
0x00402264 jalr t9 | t9 ();
0x00402268 nop |
0x0040226c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402270 move t8, v0 | t8 = v0;
0x00402274 move a0, t8 | a0 = t8;
0x00402278 lw t8, -0x7ec8(gp) | t8 = *(gp);
0x0040227c move t9, t8 | t9 = t8;
0x00402280 jalr t9 | t9 ();
0x00402284 nop |
0x00402288 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040228c move t8, v0 | t8 = v0;
0x00402290 move a0, t8 | a0 = t8;
0x00402294 lw t8, -0x7f50(gp) | t8 = sym.imp.atoi;
0x00402298 move t9, t8 | t9 = t8;
0x0040229c jalr t9 | t9 ();
0x004022a0 nop |
0x004022a4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004022a8 move t8, v0 | t8 = v0;
| label_2:
0x004022ac sw t8, 0x3c(fp) | *(arg_3ch) = t8;
0x004022b0 lw t8, 0x38(fp) | t8 = *(arg_38h);
0x004022b4 sltiu t8, t8, 2 | t8 = (t8 < 2) ? 1 : 0;
| if (t8 == 0) {
0x004022b8 bnez t8, 0x402324 |
0x004022bc nop |
0x004022c0 addiu t8, fp, 0x68 | t8 = fp + 0x68;
0x004022c4 move a0, t8 | a0 = t8;
0x004022c8 addiu a1, zero, 1 | a1 = 1;
0x004022cc lw t8, -0x7fc8(gp) | t8 = *(gp);
0x004022d0 move t9, t8 | t9 = t8;
0x004022d4 jalr t9 | t9 ();
0x004022d8 nop |
0x004022dc lw gp, 0x10(fp) | gp = *(arg_10h);
0x004022e0 move t8, v0 | t8 = v0;
0x004022e4 move a0, t8 | a0 = t8;
0x004022e8 lw t8, -0x7ec8(gp) | t8 = *(gp);
0x004022ec move t9, t8 | t9 = t8;
0x004022f0 jalr t9 | t9 ();
0x004022f4 nop |
0x004022f8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004022fc move t8, v0 | t8 = v0;
0x00402300 move a0, t8 | a0 = t8;
0x00402304 lw t8, -0x7f50(gp) | t8 = sym.imp.atoi;
0x00402308 move t9, t8 | t9 = t8;
0x0040230c jalr t9 | t9 ();
0x00402310 nop |
0x00402314 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402318 move t8, v0 | t8 = v0;
0x0040231c b 0x402328 | goto label_3;
0x00402320 nop |
| }
0x00402324 move t8, zero | t8 = 0;
| label_3:
0x00402328 sw t8, 0x40(fp) | *(arg_40h) = t8;
0x0040232c lbu t8, 0x2e(fp) | t8 = *(arg_2eh);
| if (t8 != 0) {
0x00402330 beqz t8, 0x402358 |
0x00402334 nop |
0x00402338 lw v0, 0x3c(fp) | v0 = *(arg_3ch);
0x0040233c addiu t8, zero, -0x3c | t8 = -0x3c;
0x00402340 mult v0, t8 | __asm ("mult v0, t8");
0x00402344 lw t8, 0x40(fp) | t8 = *(arg_40h);
0x00402348 mflo v0 | __asm ("mflo v0");
0x0040234c subu t8, v0, t8 | __asm ("subu t8, v0, t8");
0x00402350 b 0x402370 | goto label_4;
0x00402354 nop |
| }
0x00402358 lw t8, 0x3c(fp) | t8 = *(arg_3ch);
0x0040235c sll t8, t8, 2 | t8 <<= 2;
0x00402360 sll v0, t8, 4 | v0 = t8 << 4;
0x00402364 subu v0, v0, t8 | __asm ("subu v0, v0, t8");
0x00402368 lw t8, 0x40(fp) | t8 = *(arg_40h);
0x0040236c addu t8, v0, t8 | t8 = v0 + t8;
| label_4:
0x00402370 sw t8, 0x44(fp) | *(arg_44h) = t8;
0x00402374 addiu t8, fp, 0x30 | t8 = fp + 0x30;
0x00402378 move a0, t8 | a0 = t8;
0x0040237c lw t8, -0x7f54(gp) | t8 = *(gp);
0x00402380 move t9, t8 | t9 = t8;
0x00402384 jalr t9 | t9 ();
0x00402388 nop |
0x0040238c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402390 addiu v0, fp, 0x34 | v0 = fp + 0x34;
0x00402394 addiu t8, fp, 0x30 | t8 = fp + 0x30;
0x00402398 move a0, v0 | a0 = v0;
0x0040239c lw a1, 0x1c(fp) | a1 = *(arg_1ch);
0x004023a0 move a2, t8 | a2 = t8;
0x004023a4 lw t8, -0x7f18(gp) | t8 = *(gp);
0x004023a8 move t9, t8 | t9 = t8;
0x004023ac jalr t9 | t9 ();
0x004023b0 nop |
0x004023b4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004023b8 addiu v0, fp, 0x34 | v0 = fp + 0x34;
0x004023bc addiu t8, fp, 0x68 | t8 = fp + 0x68;
0x004023c0 move a0, v0 | a0 = v0;
0x004023c4 move a1, t8 | a1 = t8;
0x004023c8 addiu a2, zero, 0x3a | a2 = 0x3a;
0x004023cc lw t8, -0x7edc(gp) | t8 = sym.imp.seperate_std::string_const__std::vector_std::string__std::allocator_std::string_____char_;
0x004023d0 move t9, t8 | t9 = t8;
0x004023d4 jalr t9 | t9 ();
0x004023d8 nop |
0x004023dc lw gp, 0x10(fp) | gp = *(arg_10h);
0x004023e0 move t8, v0 | t8 = v0;
0x004023e4 xori t8, t8, 2 | t8 ^= 2;
0x004023e8 sltiu t8, t8, 1 | t8 = (t8 < 1) ? 1 : 0;
0x004023ec andi s0, t8, 0xff | s0 = t8 & 0xff;
0x004023f0 addiu t8, fp, 0x34 | t8 = fp + 0x34;
0x004023f4 move a0, t8 | a0 = t8;
0x004023f8 lw t8, -0x7ef4(gp) | t8 = *((gp - 8125));
0x004023fc move t9, t8 | t9 = t8;
0x00402400 jalr t9 | t9 ();
0x00402404 nop |
0x00402408 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040240c addiu t8, fp, 0x30 | t8 = fp + 0x30;
0x00402410 move a0, t8 | a0 = t8;
0x00402414 lw t8, -0x7f38(gp) | t8 = *(gp);
0x00402418 move t9, t8 | t9 = t8;
0x0040241c jalr t9 | t9 ();
0x00402420 nop |
0x00402424 lw gp, 0x10(fp) | gp = *(arg_10h);
| if (s0 != 0) {
0x00402428 beqz s0, 0x4027a0 |
0x0040242c nop |
0x00402430 addiu t8, fp, 0x68 | t8 = fp + 0x68;
0x00402434 move a0, t8 | a0 = t8;
0x00402438 move a1, zero | a1 = 0;
0x0040243c lw t8, -0x7fc8(gp) | t8 = *(gp);
0x00402440 move t9, t8 | t9 = t8;
0x00402444 jalr t9 | t9 ();
0x00402448 nop |
0x0040244c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402450 move t8, v0 | t8 = v0;
0x00402454 move a0, t8 | a0 = t8;
0x00402458 move a1, zero | a1 = 0;
0x0040245c lw t8, -0x7ecc(gp) | t8 = *(gp);
0x00402460 move t9, t8 | t9 = t8;
0x00402464 jalr t9 | t9 ();
0x00402468 nop |
0x0040246c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402470 move t8, v0 | t8 = v0;
0x00402474 lb t8, (t8) | t8 = *(t8);
0x00402478 xori t8, t8, 0x2d | t8 ^= 0x2d;
0x0040247c sltiu t8, t8, 1 | t8 = (t8 < 1) ? 1 : 0;
0x00402480 sb t8, 0x2f(fp) | *(arg_2fh) = t8;
0x00402484 addiu t8, fp, 0x68 | t8 = fp + 0x68;
0x00402488 move a0, t8 | a0 = t8;
0x0040248c move a1, zero | a1 = 0;
0x00402490 lw t8, -0x7fc8(gp) | t8 = *(gp);
0x00402494 move t9, t8 | t9 = t8;
0x00402498 jalr t9 | t9 ();
0x0040249c nop |
0x004024a0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004024a4 move t8, v0 | t8 = v0;
0x004024a8 move a0, t8 | a0 = t8;
0x004024ac move a1, zero | a1 = 0;
0x004024b0 lw t8, -0x7ecc(gp) | t8 = *(gp);
0x004024b4 move t9, t8 | t9 = t8;
0x004024b8 jalr t9 | t9 ();
0x004024bc nop |
0x004024c0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004024c4 move t8, v0 | t8 = v0;
0x004024c8 lb v0, (t8) | v0 = *(t8);
0x004024cc addiu t8, zero, 0x2d | t8 = 0x2d;
| if (v0 != t8) {
0x004024d0 beq v0, t8, 0x40252c |
0x004024d4 nop |
0x004024d8 addiu t8, fp, 0x68 | t8 = fp + 0x68;
0x004024dc move a0, t8 | a0 = t8;
0x004024e0 move a1, zero | a1 = 0;
0x004024e4 lw t8, -0x7fc8(gp) | t8 = *(gp);
0x004024e8 move t9, t8 | t9 = t8;
0x004024ec jalr t9 | t9 ();
0x004024f0 nop |
0x004024f4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004024f8 move t8, v0 | t8 = v0;
0x004024fc move a0, t8 | a0 = t8;
0x00402500 move a1, zero | a1 = 0;
0x00402504 lw t8, -0x7ecc(gp) | t8 = *(gp);
0x00402508 move t9, t8 | t9 = t8;
0x0040250c jalr t9 | t9 ();
0x00402510 nop |
0x00402514 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402518 move t8, v0 | t8 = v0;
0x0040251c lb v0, (t8) | v0 = *(t8);
0x00402520 addiu t8, zero, 0x2b | t8 = 0x2b;
| if (v0 != t8) {
0x00402524 bne v0, t8, 0x402594 | goto label_5;
| }
0x00402528 nop |
| }
0x0040252c addiu t8, fp, 0x68 | t8 = fp + 0x68;
0x00402530 move a0, t8 | a0 = t8;
0x00402534 move a1, zero | a1 = 0;
0x00402538 lw t8, -0x7fc8(gp) | t8 = *(gp);
0x0040253c move t9, t8 | t9 = t8;
0x00402540 jalr t9 | t9 ();
0x00402544 nop |
0x00402548 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040254c move t8, v0 | t8 = v0;
0x00402550 move a0, t8 | a0 = t8;
0x00402554 lw t8, -0x7ec8(gp) | t8 = *(gp);
0x00402558 move t9, t8 | t9 = t8;
0x0040255c jalr t9 | t9 ();
0x00402560 nop |
0x00402564 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402568 move t8, v0 | t8 = v0;
0x0040256c addiu t8, t8, 1 | t8++;
0x00402570 move a0, t8 | a0 = t8;
0x00402574 lw t8, -0x7f50(gp) | t8 = sym.imp.atoi;
0x00402578 move t9, t8 | t9 = t8;
0x0040257c jalr t9 | t9 ();
0x00402580 nop |
0x00402584 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402588 move t8, v0 | t8 = v0;
0x0040258c b 0x4025f0 | goto label_6;
0x00402590 nop |
| label_5:
0x00402594 addiu t8, fp, 0x68 | t8 = fp + 0x68;
0x00402598 move a0, t8 | a0 = t8;
0x0040259c move a1, zero | a1 = 0;
0x004025a0 lw t8, -0x7fc8(gp) | t8 = *(gp);
0x004025a4 move t9, t8 | t9 = t8;
0x004025a8 jalr t9 | t9 ();
0x004025ac nop |
0x004025b0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004025b4 move t8, v0 | t8 = v0;
0x004025b8 move a0, t8 | a0 = t8;
0x004025bc lw t8, -0x7ec8(gp) | t8 = *(gp);
0x004025c0 move t9, t8 | t9 = t8;
0x004025c4 jalr t9 | t9 ();
0x004025c8 nop |
0x004025cc lw gp, 0x10(fp) | gp = *(arg_10h);
0x004025d0 move t8, v0 | t8 = v0;
0x004025d4 move a0, t8 | a0 = t8;
0x004025d8 lw t8, -0x7f50(gp) | t8 = sym.imp.atoi;
0x004025dc move t9, t8 | t9 = t8;
0x004025e0 jalr t9 | t9 ();
0x004025e4 nop |
0x004025e8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004025ec move t8, v0 | t8 = v0;
| label_6:
0x004025f0 sw t8, 0x48(fp) | *(arg_48h) = t8;
0x004025f4 addiu t8, fp, 0x68 | t8 = fp + 0x68;
0x004025f8 move a0, t8 | a0 = t8;
0x004025fc addiu a1, zero, 1 | a1 = 1;
0x00402600 lw t8, -0x7fc8(gp) | t8 = *(gp);
0x00402604 move t9, t8 | t9 = t8;
0x00402608 jalr t9 | t9 ();
0x0040260c nop |
0x00402610 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402614 move t8, v0 | t8 = v0;
0x00402618 move a0, t8 | a0 = t8;
0x0040261c lw t8, -0x7ec8(gp) | t8 = *(gp);
0x00402620 move t9, t8 | t9 = t8;
0x00402624 jalr t9 | t9 ();
0x00402628 nop |
0x0040262c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402630 move t8, v0 | t8 = v0;
0x00402634 move a0, t8 | a0 = t8;
0x00402638 lw t8, -0x7f50(gp) | t8 = sym.imp.atoi;
0x0040263c move t9, t8 | t9 = t8;
0x00402640 jalr t9 | t9 ();
0x00402644 nop |
0x00402648 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040264c sw v0, 0x4c(fp) | *(arg_4ch) = v0;
0x00402650 lbu t8, 0x2f(fp) | t8 = *(arg_2fh);
| if (t8 != 0) {
0x00402654 beqz t8, 0x40267c |
0x00402658 nop |
0x0040265c lw v0, 0x48(fp) | v0 = *(arg_48h);
0x00402660 addiu t8, zero, -0x3c | t8 = -0x3c;
0x00402664 mult v0, t8 | __asm ("mult v0, t8");
0x00402668 lw t8, 0x4c(fp) | t8 = *(arg_4ch);
0x0040266c mflo v0 | __asm ("mflo v0");
0x00402670 subu t8, v0, t8 | __asm ("subu t8, v0, t8");
0x00402674 b 0x402694 | goto label_7;
0x00402678 nop |
| }
0x0040267c lw t8, 0x48(fp) | t8 = *(arg_48h);
0x00402680 sll t8, t8, 2 | t8 <<= 2;
0x00402684 sll v0, t8, 4 | v0 = t8 << 4;
0x00402688 subu v0, v0, t8 | __asm ("subu v0, v0, t8");
0x0040268c lw t8, 0x4c(fp) | t8 = *(arg_4ch);
0x00402690 addu t8, v0, t8 | t8 = v0 + t8;
| label_7:
0x00402694 sw t8, 0x50(fp) | *(arg_50h) = t8;
0x00402698 lw v0, 0x44(fp) | v0 = *(arg_44h);
0x0040269c lw t8, 0x50(fp) | t8 = *(arg_50h);
0x004026a0 subu t8, v0, t8 | __asm ("subu t8, v0, t8");
0x004026a4 sw t8, 0x54(fp) | *(arg_54h) = t8;
0x004026a8 lw t8, 0x54(fp) | t8 = *(arg_54h);
| if (t8 < 0) {
0x004026ac bgez t8, 0x402734 |
0x004026b0 nop |
0x004026b4 lw t8, 0x54(fp) | t8 = *(arg_54h);
0x004026b8 negu t8, t8 | __asm ("negu t8, t8");
0x004026bc sw t8, 0x54(fp) | *(arg_54h) = t8;
0x004026c0 lw t8, 0x54(fp) | t8 = *(arg_54h);
0x004026c4 lui v0, 0x8888 | v0 = 0x88888889;
0x004026c8 ori v0, v0, 0x8889 |
0x004026cc mult t8, v0 | __asm ("mult t8, v0");
0x004026d0 mfhi v0 | __asm ("mfhi v0");
0x004026d4 addu v0, v0, t8 | v0 += t8;
0x004026d8 sra v0, v0, 5 | v0 >>= 5;
0x004026dc sra t8, t8, 0x1f | t8 >>= 0x1f;
0x004026e0 subu t8, v0, t8 | __asm ("subu t8, v0, t8");
0x004026e4 sw t8, 0x58(fp) | *(arg_58h) = t8;
0x004026e8 lw v0, 0x58(fp) | v0 = *(arg_58h);
0x004026ec addiu t8, zero, -0x3c | t8 = -0x3c;
0x004026f0 mult v0, t8 | __asm ("mult v0, t8");
0x004026f4 lw t8, 0x54(fp) | t8 = *(arg_54h);
0x004026f8 mflo v0 | __asm ("mflo v0");
0x004026fc addu t8, v0, t8 | t8 = v0 + t8;
0x00402700 sw t8, 0x5c(fp) | *(arg_5ch) = t8;
0x00402704 lw a0, 0x24(fp) | a0 = *(arg_24h);
0x00402708 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* str.__02d:_02d */
0x0040270c addiu a1, t8, -0x6d68 | a1 = t8 + -0x6d68;
0x00402710 lw a2, 0x58(fp) | a2 = *(arg_58h);
0x00402714 lw a3, 0x5c(fp) | a3 = *(arg_5ch);
0x00402718 lw t8, -0x7f3c(gp) | t8 = sym.imp.sprintf;
0x0040271c move t9, t8 | t9 = t8;
0x00402720 jalr t9 | t9 ();
0x00402724 nop |
0x00402728 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040272c b 0x4027a0 | goto label_8;
0x00402730 nop |
| }
0x00402734 lw t8, 0x54(fp) | t8 = *(arg_54h);
0x00402738 lui v0, 0x8888 | v0 = 0x88888889;
0x0040273c ori v0, v0, 0x8889 |
0x00402740 mult t8, v0 | __asm ("mult t8, v0");
0x00402744 mfhi v0 | __asm ("mfhi v0");
0x00402748 addu v0, v0, t8 | v0 += t8;
0x0040274c sra v0, v0, 5 | v0 >>= 5;
0x00402750 sra t8, t8, 0x1f | t8 >>= 0x1f;
0x00402754 subu t8, v0, t8 | __asm ("subu t8, v0, t8");
0x00402758 sw t8, 0x60(fp) | *(arg_60h) = t8;
0x0040275c lw v0, 0x60(fp) | v0 = *(arg_60h);
0x00402760 addiu t8, zero, -0x3c | t8 = -0x3c;
0x00402764 mult v0, t8 | __asm ("mult v0, t8");
0x00402768 lw t8, 0x54(fp) | t8 = *(arg_54h);
0x0040276c mflo v0 | __asm ("mflo v0");
0x00402770 addu t8, v0, t8 | t8 = v0 + t8;
0x00402774 sw t8, 0x64(fp) | *(arg_64h) = t8;
0x00402778 lw a0, 0x24(fp) | a0 = *(arg_24h);
0x0040277c lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* str._02d:_02d */
0x00402780 addiu a1, t8, -0x6d5c | a1 = t8 + -0x6d5c;
0x00402784 lw a2, 0x60(fp) | a2 = *(arg_60h);
0x00402788 lw a3, 0x64(fp) | a3 = *(arg_64h);
0x0040278c lw t8, -0x7f3c(gp) | t8 = sym.imp.sprintf;
0x00402790 move t9, t8 | t9 = t8;
0x00402794 jalr t9 | t9 ();
0x00402798 nop |
0x0040279c lw gp, 0x10(fp) | gp = *(arg_10h);
| }
| label_8:
0x004027a0 b 0x4027e8 | goto label_0;
0x004027a4 nop |
| }
0x004027a8 lw t8, -0x7f10(gp) | t8 = *((gp - 8132));
0x004027ac lw t8, (t8) | t8 = *(t8);
0x004027b0 move a0, t8 | a0 = t8;
0x004027b4 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* str.OOPS__Invalid_std_offset:__s_n */
0x004027b8 addiu a1, t8, -0x6d50 | a1 = t8 + -0x6d50;
0x004027bc lw a2, 0x20(fp) | a2 = *(arg_20h);
0x004027c0 lw t8, -0x7f34(gp) | t8 = sym.imp.fprintf
0x004027c4 move t9, t8 | t9 = t8;
0x004027c8 jalr t9 | t9 ();
0x004027cc nop |
0x004027d0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004027d4 addiu a0, zero, 1 | a0 = 1;
0x004027d8 lw t8, -0x7f40(gp) | t8 = sym.imp.exit;
0x004027dc move t9, t8 | t9 = t8;
0x004027e0 jalr t9 | t9 ();
0x004027e4 nop |
| label_0:
0x004027e8 addiu t8, fp, 0x68 | t8 = fp + 0x68;
0x004027ec move a0, t8 | a0 = t8;
0x004027f0 lw t8, -0x7fc4(gp) | t8 = *(gp);
0x004027f4 move t9, t8 | t9 = t8;
0x004027f8 jalr t9 | t9 ();
0x004027fc nop |
0x00402800 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402804 lw t8, -0x7ec0(gp) | t8 = *((gp - 8112));
0x00402808 lw v0, 0x74(fp) | v0 = *(arg_74h);
0x0040280c lw t8, (t8) | t8 = *(t8);
| if (v0 != t8) {
0x00402810 beq v0, t8, 0x40291c |
0x00402814 nop |
0x00402818 b 0x40290c | goto label_9;
0x0040281c nop |
| label_9:
0x0040290c lw t8, -0x7f08(gp) | t8 = sym.imp.__stack_chk_fail;
0x00402910 move t9, t8 | t9 = t8;
0x00402914 jalr t9 | t9 ();
0x00402918 nop |
| }
0x0040291c move sp, fp |
0x00402920 lw ra, 0x84(sp) | ra = *(var_84h);
0x00402924 lw fp, 0x80(sp) | fp = *(var_80h);
0x00402928 lw s0, 0x7c(sp) | s0 = *(var_7ch);
0x0040292c addiu sp, sp, 0x88 |
0x00402930 jr ra | return v0;
0x00402934 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/sbin/tz_dst @ 0x402938 */
| #include <stdint.h>
|
; (fcn) aav.0x00402938 () | void aav_0x00402938 () {
0x00402938 lui gp, 2 |
0x0040293c addiu gp, gp, 0x26e8 |
0x00402940 addu gp, gp, t9 | gp += t9;
0x00402944 addiu sp, sp, -0xf0 |
0x00402948 sw ra, 0xec(sp) | *(var_ech) = ra;
0x0040294c sw fp, 0xe8(sp) | *(var_e8h) = fp;
0x00402950 move fp, sp | fp = sp;
0x00402954 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00402958 sw a0, 0x1c(fp) | *(arg_1ch) = a0;
0x0040295c lw t8, -0x7ec0(gp) | t8 = *((gp - 8112));
0x00402960 lw t8, (t8) | t8 = *(t8);
0x00402964 sw t8, 0xe4(fp) | *(arg_e4h) = t8;
0x00402968 addiu t8, fp, 0x28 | t8 = fp + 0x28;
0x0040296c move a0, t8 | a0 = t8;
0x00402970 lw t8, -0x7ec4(gp) | t8 = sym.imp.cam_get_tzone2__tzone_setting2_;
0x00402974 move t9, t8 | t9 = t8;
0x00402978 jalr t9 | t9 ();
0x0040297c nop |
0x00402980 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402984 move t8, v0 | t8 = v0;
0x00402988 sltu t8, zero, t8 | t8 = (0 < t8) ? 1 : 0;
0x0040298c andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x00402990 beqz t8, 0x4029a4 |
0x00402994 nop |
0x00402998 move t8, zero | t8 = 0;
0x0040299c b 0x403278 | goto label_0;
0x004029a0 nop |
| }
0x004029a4 lw t8, -0x7f10(gp) | t8 = *((gp - 8132));
0x004029a8 lw v0, (t8) | v0 = *(t8);
0x004029ac lbu t8, 0x28(fp) | t8 = *(arg_28h);
0x004029b0 move a0, v0 | a0 = v0;
0x004029b4 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str.auto_tz:__d_n */
0x004029b8 addiu a1, v0, -0x6d30 | a1 = v0 + -0x6d30;
0x004029bc move a2, t8 | a2 = t8;
0x004029c0 lw t8, -0x7f34(gp) | t8 = sym.imp.fprintf
0x004029c4 move t9, t8 | t9 = t8;
0x004029c8 jalr t9 | t9 ();
0x004029cc nop |
0x004029d0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004029d4 lw t8, -0x7f10(gp) | t8 = *((gp - 8132));
0x004029d8 lw v0, (t8) | v0 = *(t8);
0x004029dc addiu t8, fp, 0x28 | t8 = fp + 0x28;
0x004029e0 addiu t8, t8, 1 | t8++;
0x004029e4 move a0, v0 | a0 = v0;
0x004029e8 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str.std_code:__s_n */
0x004029ec addiu a1, v0, -0x6d20 | a1 = v0 + -0x6d20;
0x004029f0 move a2, t8 | a2 = t8;
0x004029f4 lw t8, -0x7f34(gp) | t8 = sym.imp.fprintf
0x004029f8 move t9, t8 | t9 = t8;
0x004029fc jalr t9 | t9 ();
0x00402a00 nop |
0x00402a04 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402a08 lw t8, -0x7f10(gp) | t8 = *((gp - 8132));
0x00402a0c lw v0, (t8) | v0 = *(t8);
0x00402a10 addiu t8, fp, 0x28 | t8 = fp + 0x28;
0x00402a14 addiu t8, t8, 0x11 | t8 += 0x11;
0x00402a18 move a0, v0 | a0 = v0;
0x00402a1c lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str.std_offset:__s_n */
0x00402a20 addiu a1, v0, -0x6d10 | a1 = v0 + -0x6d10;
0x00402a24 move a2, t8 | a2 = t8;
0x00402a28 lw t8, -0x7f34(gp) | t8 = sym.imp.fprintf
0x00402a2c move t9, t8 | t9 = t8;
0x00402a30 jalr t9 | t9 ();
0x00402a34 nop |
0x00402a38 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402a3c lw t8, -0x7f10(gp) | t8 = *((gp - 8132));
0x00402a40 lw v0, (t8) | v0 = *(t8);
0x00402a44 lw t8, 0x4c(fp) | t8 = *(arg_4ch);
0x00402a48 move a0, v0 | a0 = v0;
0x00402a4c lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str.index:__d_n */
0x00402a50 addiu a1, v0, -0x6d00 | a1 = v0 + -0x6d00;
0x00402a54 move a2, t8 | a2 = t8;
0x00402a58 lw t8, -0x7f34(gp) | t8 = sym.imp.fprintf
0x00402a5c move t9, t8 | t9 = t8;
0x00402a60 jalr t9 | t9 ();
0x00402a64 nop |
0x00402a68 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402a6c lw t8, -0x7f10(gp) | t8 = *((gp - 8132));
0x00402a70 lw v0, (t8) | v0 = *(t8);
0x00402a74 lbu t8, 0x50(fp) | t8 = *(arg_50h);
0x00402a78 move a0, v0 | a0 = v0;
0x00402a7c lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str.enable_dst:__d_n */
0x00402a80 addiu a1, v0, -0x6cf4 | a1 = v0 + -0x6cf4;
0x00402a84 move a2, t8 | a2 = t8;
0x00402a88 lw t8, -0x7f34(gp) | t8 = sym.imp.fprintf
0x00402a8c move t9, t8 | t9 = t8;
0x00402a90 jalr t9 | t9 ();
0x00402a94 nop |
0x00402a98 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402a9c lw t8, -0x7f10(gp) | t8 = *((gp - 8132));
0x00402aa0 lw v0, (t8) | v0 = *(t8);
0x00402aa4 lbu t8, 0x51(fp) | t8 = *(arg_51h);
0x00402aa8 move a0, v0 | a0 = v0;
0x00402aac lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str.auto_dst:__d_n */
0x00402ab0 addiu a1, v0, -0x6ce4 | a1 = v0 + -0x6ce4;
0x00402ab4 move a2, t8 | a2 = t8;
0x00402ab8 lw t8, -0x7f34(gp) | t8 = sym.imp.fprintf
0x00402abc move t9, t8 | t9 = t8;
0x00402ac0 jalr t9 | t9 ();
0x00402ac4 nop |
0x00402ac8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402acc lw t8, -0x7f10(gp) | t8 = *((gp - 8132));
0x00402ad0 lw v0, (t8) | v0 = *(t8);
0x00402ad4 addiu t8, fp, 0x28 | t8 = fp + 0x28;
0x00402ad8 addiu t8, t8, 0x2a | t8 += 0x2a;
0x00402adc move a0, v0 | a0 = v0;
0x00402ae0 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str.dst_code:__s_n */
0x00402ae4 addiu a1, v0, -0x6cd4 | a1 = v0 + -0x6cd4;
0x00402ae8 move a2, t8 | a2 = t8;
0x00402aec lw t8, -0x7f34(gp) | t8 = sym.imp.fprintf
0x00402af0 move t9, t8 | t9 = t8;
0x00402af4 jalr t9 | t9 ();
0x00402af8 nop |
0x00402afc lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402b00 lw t8, -0x7f10(gp) | t8 = *((gp - 8132));
0x00402b04 lw v0, (t8) | v0 = *(t8);
0x00402b08 addiu t8, fp, 0x28 | t8 = fp + 0x28;
0x00402b0c addiu t8, t8, 0x3a | t8 += 0x3a;
0x00402b10 move a0, v0 | a0 = v0;
0x00402b14 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str.dst_offset:__s_n */
0x00402b18 addiu a1, v0, -0x6cc4 | a1 = v0 + -0x6cc4;
0x00402b1c move a2, t8 | a2 = t8;
0x00402b20 lw t8, -0x7f34(gp) | t8 = sym.imp.fprintf
0x00402b24 move t9, t8 | t9 = t8;
0x00402b28 jalr t9 | t9 ();
0x00402b2c nop |
0x00402b30 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402b34 lw t8, -0x7f10(gp) | t8 = *((gp - 8132));
0x00402b38 lw v0, (t8) | v0 = *(t8);
0x00402b3c addiu t8, fp, 0x28 | t8 = fp + 0x28;
0x00402b40 addiu t8, t8, 0x5a | t8 += 0x5a;
0x00402b44 move a0, v0 | a0 = v0;
0x00402b48 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str.dst_start:__s_n */
0x00402b4c addiu a1, v0, -0x6cb4 | a1 = v0 + -0x6cb4;
0x00402b50 move a2, t8 | a2 = t8;
0x00402b54 lw t8, -0x7f34(gp) | t8 = sym.imp.fprintf
0x00402b58 move t9, t8 | t9 = t8;
0x00402b5c jalr t9 | t9 ();
0x00402b60 nop |
0x00402b64 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402b68 lw t8, -0x7f10(gp) | t8 = *((gp - 8132));
0x00402b6c lw v0, (t8) | v0 = *(t8);
0x00402b70 addiu t8, fp, 0x28 | t8 = fp + 0x28;
0x00402b74 addiu t8, t8, 0x7a | t8 += 0x7a;
0x00402b78 move a0, v0 | a0 = v0;
0x00402b7c lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str.dst_end:__s_n */
0x00402b80 addiu a1, v0, -0x6ca4 | a1 = v0 + -0x6ca4;
0x00402b84 move a2, t8 | a2 = t8;
0x00402b88 lw t8, -0x7f34(gp) | t8 = sym.imp.fprintf
0x00402b8c move t9, t8 | t9 = t8;
0x00402b90 jalr t9 | t9 ();
0x00402b94 nop |
0x00402b98 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402b9c addiu t8, zero, 0x5e | t8 = 0x5e;
0x00402ba0 sb t8, 0x23(fp) | *(arg_23h) = t8;
0x00402ba4 lw t8, 0x4c(fp) | t8 = *(arg_4ch);
| if (t8 > 0) {
0x00402ba8 blez t8, 0x402bc0 |
0x00402bac nop |
0x00402bb0 lw t8, 0x4c(fp) | t8 = *(arg_4ch);
0x00402bb4 slti t8, t8, 0x5f | t8 = (t8 < 0x5f) ? 1 : 0;
| if (t8 != 0) {
0x00402bb8 bnez t8, 0x402bcc | goto label_1;
| }
0x00402bbc nop |
| }
0x00402bc0 move t8, zero | t8 = 0;
0x00402bc4 b 0x403278 | goto label_0;
0x00402bc8 nop |
| label_1:
0x00402bcc lw t8, 0x4c(fp) | t8 = *(arg_4ch);
0x00402bd0 addiu t8, t8, -1 | t8 += -1;
0x00402bd4 sw t8, 0x4c(fp) | *(arg_4ch) = t8;
0x00402bd8 lbu t8, 0x28(fp) | t8 = *(arg_28h);
| if (t8 != 0) {
0x00402bdc beqz t8, 0x402c60 |
0x00402be0 nop |
0x00402be4 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00402be8 addiu v0, t8, 1 | v0 = t8 + 1;
0x00402bec lw t8, 0x4c(fp) | t8 = *(arg_4ch);
0x00402bf0 sll v1, t8, 6 | v1 = t8 << 6;
0x00402bf4 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* esilref: 'DST' */
0x00402bf8 addiu t8, t8, -0x683c | t8 += -0x683c;
0x00402bfc addu t8, v1, t8 | t8 = v1 + t8;
0x00402c00 move a0, v0 | a0 = v0;
0x00402c04 move a1, t8 | a1 = t8;
0x00402c08 lw t8, -0x7f60(gp) | t8 = sym.imp.strcpy;
0x00402c0c move t9, t8 | t9 = t8;
0x00402c10 jalr t9 | t9 ();
0x00402c14 nop |
0x00402c18 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402c1c lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00402c20 addiu v0, t8, 0x11 | v0 = t8 + 0x11;
0x00402c24 lw t8, 0x4c(fp) | t8 = *(arg_4ch);
0x00402c28 sll t8, t8, 6 | t8 <<= 6;
0x00402c2c addiu v1, t8, 8 | v1 = t8 + 8;
0x00402c30 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* esilref: 'DST' */
0x00402c34 addiu t8, t8, -0x683c | t8 += -0x683c;
0x00402c38 addu t8, v1, t8 | t8 = v1 + t8;
0x00402c3c move a0, v0 | a0 = v0;
0x00402c40 move a1, t8 | a1 = t8;
0x00402c44 lw t8, -0x7f60(gp) | t8 = sym.imp.strcpy;
0x00402c48 move t9, t8 | t9 = t8;
0x00402c4c jalr t9 | t9 ();
0x00402c50 nop |
0x00402c54 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402c58 b 0x402cdc | goto label_2;
0x00402c5c nop |
| }
0x00402c60 lb t8, 0x29(fp) | t8 = *(arg_29h);
| if (t8 != 0) {
0x00402c64 beqz t8, 0x402c78 |
0x00402c68 nop |
0x00402c6c lb t8, 0x39(fp) | t8 = *(arg_39h);
| if (t8 != 0) {
0x00402c70 bnez t8, 0x402c84 | goto label_3;
| }
0x00402c74 nop |
| }
0x00402c78 move t8, zero | t8 = 0;
0x00402c7c b 0x403278 | goto label_0;
0x00402c80 nop |
| label_3:
0x00402c84 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00402c88 addiu v0, t8, 1 | v0 = t8 + 1;
0x00402c8c addiu t8, fp, 0x28 | t8 = fp + 0x28;
0x00402c90 addiu t8, t8, 1 | t8++;
0x00402c94 move a0, v0 | a0 = v0;
0x00402c98 move a1, t8 | a1 = t8;
0x00402c9c lw t8, -0x7f60(gp) | t8 = sym.imp.strcpy;
0x00402ca0 move t9, t8 | t9 = t8;
0x00402ca4 jalr t9 | t9 ();
0x00402ca8 nop |
0x00402cac lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402cb0 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00402cb4 addiu v0, t8, 0x11 | v0 = t8 + 0x11;
0x00402cb8 addiu t8, fp, 0x28 | t8 = fp + 0x28;
0x00402cbc addiu t8, t8, 0x11 | t8 += 0x11;
0x00402cc0 move a0, v0 | a0 = v0;
0x00402cc4 move a1, t8 | a1 = t8;
0x00402cc8 lw t8, -0x7f60(gp) | t8 = sym.imp.strcpy;
0x00402ccc move t9, t8 | t9 = t8;
0x00402cd0 jalr t9 | t9 ();
0x00402cd4 nop |
0x00402cd8 lw gp, 0x10(fp) | gp = *(arg_10h);
| label_2:
0x00402cdc lbu t8, 0x50(fp) | t8 = *(arg_50h);
0x00402ce0 sltu t8, zero, t8 | t8 = (0 < t8) ? 1 : 0;
0x00402ce4 andi v0, t8, 0xff | v0 = t8 & 0xff;
0x00402ce8 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00402cec sb v0, (t8) | *(t8) = v0;
0x00402cf0 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00402cf4 lbu t8, (t8) | t8 = *(t8);
| if (t8 != 0) {
0x00402cf8 beqz t8, 0x403108 |
0x00402cfc nop |
0x00402d00 lbu t8, 0x51(fp) | t8 = *(arg_51h);
| if (t8 != 0) {
0x00402d04 beqz t8, 0x402e78 |
0x00402d08 nop |
0x00402d0c lw v0, 0x4c(fp) | v0 = *(arg_4ch);
0x00402d10 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
0x00402d14 sll v0, v0, 6 | v0 <<= 6;
| /* esilref: 'DST' */
0x00402d18 addiu t8, t8, -0x683c | t8 += -0x683c;
0x00402d1c addu t8, v0, t8 | t8 = v0 + t8;
0x00402d20 lb t8, 0x10(t8) | t8 = *((t8 + 16));
| if (t8 == 0) {
0x00402d24 bnez t8, 0x402d3c |
0x00402d28 nop |
0x00402d2c lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00402d30 sb zero, (t8) | *(t8) = 0;
0x00402d34 b 0x403098 | goto label_4;
0x00402d38 nop |
| }
0x00402d3c lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00402d40 addiu v0, t8, 0x31 | v0 = t8 + 0x31;
0x00402d44 lw t8, 0x4c(fp) | t8 = *(arg_4ch);
0x00402d48 sll t8, t8, 6 | t8 <<= 6;
0x00402d4c addiu v1, t8, 0x10 | v1 = t8 + 0x10;
0x00402d50 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* esilref: 'DST' */
0x00402d54 addiu t8, t8, -0x683c | t8 += -0x683c;
0x00402d58 addu t8, v1, t8 | t8 = v1 + t8;
0x00402d5c move a0, v0 | a0 = v0;
0x00402d60 move a1, t8 | a1 = t8;
0x00402d64 lw t8, -0x7f60(gp) | t8 = sym.imp.strcpy;
0x00402d68 move t9, t8 | t9 = t8;
0x00402d6c jalr t9 | t9 ();
0x00402d70 nop |
0x00402d74 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402d78 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00402d7c addiu t8, t8, 0x41 | t8 += 0x41;
0x00402d80 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00402d84 lw v1, -0x6c94(v0) | v1 = *((v0 - 6949));
0x00402d88 swl v1, 3(t8) | __asm ("swl v1, 3(t8)");
0x00402d8c swr v1, (t8) | __asm ("swr v1, (t8)");
| /* esilref: '01:00' */
0x00402d90 addiu v0, v0, -0x6c94 | v0 += -0x6c94;
0x00402d94 lbu v1, 4(v0) | v1 = *((v0 + 4));
0x00402d98 sb v1, 4(t8) | *((t8 + 4)) = v1;
0x00402d9c lbu v0, 5(v0) | v0 = *((v0 + 5));
0x00402da0 sb v0, 5(t8) | *((t8 + 5)) = v0;
0x00402da4 lw t8, 0x4c(fp) | t8 = *(arg_4ch);
0x00402da8 move v1, t8 | v1 = t8;
0x00402dac lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00402db0 addiu v0, t8, 0x61 | v0 = t8 + 0x61;
0x00402db4 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00402db8 addiu t8, t8, 0x81 | t8 += 0x81;
0x00402dbc move a0, v1 | a0 = v1;
0x00402dc0 move a1, v0 | a1 = v0;
0x00402dc4 move a2, t8 | a2 = t8;
0x00402dc8 lw t8, -0x7fc0(gp) | t8 = *(gp);
| /* aav.0x00401d9c */
0x00402dcc addiu t8, t8, 0x1d9c | t8 += 0x1d9c;
0x00402dd0 move t9, t8 | t9 = t8;
0x00402dd4 jalr t9 | t9 ();
0x00402dd8 nop |
0x00402ddc lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402de0 move t8, v0 | t8 = v0;
0x00402de4 xori t8, t8, 1 | t8 ^= 1;
0x00402de8 andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 == 0) {
0x00402dec beqz t8, 0x403098 | goto label_4;
| }
0x00402df0 nop |
0x00402df4 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00402df8 addiu v0, t8, 0x61 | v0 = t8 + 0x61;
0x00402dfc lw t8, 0x4c(fp) | t8 = *(arg_4ch);
0x00402e00 sll t8, t8, 6 | t8 <<= 6;
0x00402e04 addiu v1, t8, 0x18 | v1 = t8 + 0x18;
0x00402e08 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* esilref: 'DST' */
0x00402e0c addiu t8, t8, -0x683c | t8 += -0x683c;
0x00402e10 addu t8, v1, t8 | t8 = v1 + t8;
0x00402e14 move a0, v0 | a0 = v0;
0x00402e18 move a1, t8 | a1 = t8;
0x00402e1c lw t8, -0x7f60(gp) | t8 = sym.imp.strcpy;
0x00402e20 move t9, t8 | t9 = t8;
0x00402e24 jalr t9 | t9 ();
0x00402e28 nop |
0x00402e2c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402e30 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00402e34 addiu v0, t8, 0x81 | v0 = t8 + 0x81;
0x00402e38 lw t8, 0x4c(fp) | t8 = *(arg_4ch);
0x00402e3c sll t8, t8, 6 | t8 <<= 6;
0x00402e40 addiu v1, t8, 0x28 | v1 = t8 + 0x28;
0x00402e44 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* esilref: 'DST' */
0x00402e48 addiu t8, t8, -0x683c | t8 += -0x683c;
0x00402e4c addu t8, v1, t8 | t8 = v1 + t8;
0x00402e50 addiu t8, t8, 4 | t8 += 4;
0x00402e54 move a0, v0 | a0 = v0;
0x00402e58 move a1, t8 | a1 = t8;
0x00402e5c lw t8, -0x7f60(gp) | t8 = sym.imp.strcpy;
0x00402e60 move t9, t8 | t9 = t8;
0x00402e64 jalr t9 | t9 ();
0x00402e68 nop |
0x00402e6c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402e70 b 0x403098 | goto label_4;
0x00402e74 nop |
| }
0x00402e78 lbu t8, 0x28(fp) | t8 = *(arg_28h);
| if (t8 == 0) {
0x00402e7c bnez t8, 0x402e90 |
0x00402e80 nop |
0x00402e84 lb t8, 0x52(fp) | t8 = *(arg_52h);
| if (t8 != 0) {
0x00402e88 bnez t8, 0x402fb8 | goto label_5;
| }
0x00402e8c nop |
| }
0x00402e90 lw v0, 0x4c(fp) | v0 = *(arg_4ch);
0x00402e94 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
0x00402e98 sll v0, v0, 6 | v0 <<= 6;
| /* esilref: 'DST' */
0x00402e9c addiu t8, t8, -0x683c | t8 += -0x683c;
0x00402ea0 addu t8, v0, t8 | t8 = v0 + t8;
0x00402ea4 lb t8, 0x10(t8) | t8 = *((t8 + 16));
| if (t8 == 0) {
0x00402ea8 bnez t8, 0x402f74 |
0x00402eac nop |
0x00402eb0 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00402eb4 addiu v0, t8, 0x31 | v0 = t8 + 0x31;
0x00402eb8 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00402ebc addiu t8, t8, 1 | t8++;
0x00402ec0 move a0, v0 | a0 = v0;
0x00402ec4 move a1, t8 | a1 = t8;
0x00402ec8 lw t8, -0x7f60(gp) | t8 = sym.imp.strcpy;
0x00402ecc move t9, t8 | t9 = t8;
0x00402ed0 jalr t9 | t9 ();
0x00402ed4 nop |
0x00402ed8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402edc lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00402ee0 addiu t8, t8, 0x31 | t8 += 0x31;
0x00402ee4 move a0, t8 | a0 = t8;
0x00402ee8 lw t8, -0x7ee4(gp) | t8 = sym.imp.strlen;
0x00402eec move t9, t8 | t9 = t8;
0x00402ef0 jalr t9 | t9 ();
0x00402ef4 nop |
0x00402ef8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402efc move t8, v0 | t8 = v0;
0x00402f00 sw t8, 0x24(fp) | *(arg_24h) = t8;
0x00402f04 lw t8, 0x24(fp) | t8 = *(arg_24h);
0x00402f08 slti t8, t8, 2 | t8 = (t8 < 2) ? 1 : 0;
| if (t8 == 0) {
0x00402f0c bnez t8, 0x402f6c |
0x00402f10 nop |
0x00402f14 lw t8, 0x24(fp) | t8 = *(arg_24h);
0x00402f18 addiu t8, t8, -2 | t8 += -2;
0x00402f1c lw v0, 0x1c(fp) | v0 = *(arg_1ch);
0x00402f20 addu t8, v0, t8 | t8 = v0 + t8;
0x00402f24 lb v0, 0x31(t8) | v0 = *((t8 + 49));
0x00402f28 addiu t8, zero, 0x53 | t8 = 0x53;
| if (v0 != t8) {
0x00402f2c bne v0, t8, 0x402f6c | goto label_6;
| }
0x00402f30 nop |
0x00402f34 lw t8, 0x24(fp) | t8 = *(arg_24h);
0x00402f38 addiu t8, t8, -1 | t8 += -1;
0x00402f3c lw v0, 0x1c(fp) | v0 = *(arg_1ch);
0x00402f40 addu t8, v0, t8 | t8 = v0 + t8;
0x00402f44 lb v0, 0x31(t8) | v0 = *((t8 + 49));
0x00402f48 addiu t8, zero, 0x54 | t8 = 0x54;
| if (v0 != t8) {
0x00402f4c bne v0, t8, 0x402f6c | goto label_6;
| }
0x00402f50 nop |
0x00402f54 lw t8, 0x24(fp) | t8 = *(arg_24h);
0x00402f58 addiu t8, t8, -2 | t8 += -2;
0x00402f5c lw v0, 0x1c(fp) | v0 = *(arg_1ch);
0x00402f60 addu t8, v0, t8 | t8 = v0 + t8;
0x00402f64 addiu v0, zero, 0x44 | v0 = 0x44;
0x00402f68 sb v0, 0x31(t8) | *((t8 + 49)) = v0;
| }
| label_6:
0x00402f6c b 0x402fe4 | goto label_7;
0x00402f70 nop |
| }
0x00402f74 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00402f78 addiu v0, t8, 0x31 | v0 = t8 + 0x31;
0x00402f7c lw t8, 0x4c(fp) | t8 = *(arg_4ch);
0x00402f80 sll t8, t8, 6 | t8 <<= 6;
0x00402f84 addiu v1, t8, 0x10 | v1 = t8 + 0x10;
0x00402f88 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* esilref: 'DST' */
0x00402f8c addiu t8, t8, -0x683c | t8 += -0x683c;
0x00402f90 addu t8, v1, t8 | t8 = v1 + t8;
0x00402f94 move a0, v0 | a0 = v0;
0x00402f98 move a1, t8 | a1 = t8;
0x00402f9c lw t8, -0x7f60(gp) | t8 = sym.imp.strcpy;
0x00402fa0 move t9, t8 | t9 = t8;
0x00402fa4 jalr t9 | t9 ();
0x00402fa8 nop |
0x00402fac lw gp, 0x10(fp) | gp = *(arg_10h);
0x00402fb0 b 0x402fe4 | goto label_7;
0x00402fb4 nop |
| label_5:
0x00402fb8 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00402fbc addiu v0, t8, 0x31 | v0 = t8 + 0x31;
0x00402fc0 addiu t8, fp, 0x28 | t8 = fp + 0x28;
0x00402fc4 addiu t8, t8, 0x2a | t8 += 0x2a;
0x00402fc8 move a0, v0 | a0 = v0;
0x00402fcc move a1, t8 | a1 = t8;
0x00402fd0 lw t8, -0x7f60(gp) | t8 = sym.imp.strcpy;
0x00402fd4 move t9, t8 | t9 = t8;
0x00402fd8 jalr t9 | t9 ();
0x00402fdc nop |
0x00402fe0 lw gp, 0x10(fp) | gp = *(arg_10h);
| label_7:
0x00402fe4 lb t8, 0x62(fp) | t8 = *(arg_62h);
| if (t8 != 0) {
0x00402fe8 beqz t8, 0x403008 |
0x00402fec nop |
0x00402ff0 lb t8, 0x82(fp) | t8 = *(arg_82h);
| if (t8 == 0) {
0x00402ff4 beqz t8, 0x403008 | goto label_8;
| }
0x00402ff8 nop |
0x00402ffc lb t8, 0xa2(fp) | t8 = *(arg_a2h);
| if (t8 != 0) {
0x00403000 bnez t8, 0x403014 | goto label_9;
| }
0x00403004 nop |
| }
| label_8:
0x00403008 move t8, zero | t8 = 0;
0x0040300c b 0x403278 | goto label_0;
0x00403010 nop |
| label_9:
0x00403014 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00403018 addiu v0, t8, 0x41 | v0 = t8 + 0x41;
0x0040301c addiu t8, fp, 0x28 | t8 = fp + 0x28;
0x00403020 addiu t8, t8, 0x3a | t8 += 0x3a;
0x00403024 move a0, v0 | a0 = v0;
0x00403028 move a1, t8 | a1 = t8;
0x0040302c lw t8, -0x7f60(gp) | t8 = sym.imp.strcpy;
0x00403030 move t9, t8 | t9 = t8;
0x00403034 jalr t9 | t9 ();
0x00403038 nop |
0x0040303c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00403040 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00403044 addiu v0, t8, 0x61 | v0 = t8 + 0x61;
0x00403048 addiu t8, fp, 0x28 | t8 = fp + 0x28;
0x0040304c addiu t8, t8, 0x5a | t8 += 0x5a;
0x00403050 move a0, v0 | a0 = v0;
0x00403054 move a1, t8 | a1 = t8;
0x00403058 lw t8, -0x7f60(gp) | t8 = sym.imp.strcpy;
0x0040305c move t9, t8 | t9 = t8;
0x00403060 jalr t9 | t9 ();
0x00403064 nop |
0x00403068 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040306c lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00403070 addiu v0, t8, 0x81 | v0 = t8 + 0x81;
0x00403074 addiu t8, fp, 0x28 | t8 = fp + 0x28;
0x00403078 addiu t8, t8, 0x7a | t8 += 0x7a;
0x0040307c move a0, v0 | a0 = v0;
0x00403080 move a1, t8 | a1 = t8;
0x00403084 lw t8, -0x7f60(gp) | t8 = sym.imp.strcpy;
0x00403088 move t9, t8 | t9 = t8;
0x0040308c jalr t9 | t9 ();
0x00403090 nop |
0x00403094 lw gp, 0x10(fp) | gp = *(arg_10h);
| label_4:
0x00403098 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x0040309c lbu t8, (t8) | t8 = *(t8);
| if (t8 == 0) {
0x004030a0 beqz t8, 0x403108 | goto label_10;
| }
0x004030a4 nop |
0x004030a8 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x004030ac addiu v0, t8, 0x11 | v0 = t8 + 0x11;
0x004030b0 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x004030b4 addiu t8, t8, 0x41 | t8 += 0x41;
0x004030b8 addiu v1, fp, 0xc4 | v1 = fp + 0xc4;
0x004030bc move a0, v1 | a0 = v1;
0x004030c0 move a1, v0 | a1 = v0;
0x004030c4 move a2, t8 | a2 = t8;
0x004030c8 lw t8, -0x7fc0(gp) | t8 = *(gp);
| /* aav.0x00401fbc */
0x004030cc addiu t8, t8, 0x1fbc | t8 += 0x1fbc;
0x004030d0 move t9, t8 | t9 = t8;
0x004030d4 jalr t9 | t9 ();
0x004030d8 nop |
0x004030dc lw gp, 0x10(fp) | gp = *(arg_10h);
0x004030e0 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x004030e4 addiu v0, t8, 0x41 | v0 = t8 + 0x41;
0x004030e8 addiu t8, fp, 0xc4 | t8 = fp + 0xc4;
0x004030ec move a0, v0 | a0 = v0;
0x004030f0 move a1, t8 | a1 = t8;
0x004030f4 lw t8, -0x7f60(gp) | t8 = sym.imp.strcpy;
0x004030f8 move t9, t8 | t9 = t8;
0x004030fc jalr t9 | t9 ();
0x00403100 nop |
0x00403104 lw gp, 0x10(fp) | gp = *(arg_10h);
| }
| label_10:
0x00403108 lw t8, -0x7f10(gp) | t8 = *((gp - 8132));
0x0040310c lw v0, (t8) | v0 = *(t8);
0x00403110 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00403114 lbu t8, (t8) | t8 = *(t8);
0x00403118 move a0, v0 | a0 = v0;
0x0040311c lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str._n_nenable_dst:__d_n */
0x00403120 addiu a1, v0, -0x6c8c | a1 = v0 + -0x6c8c;
0x00403124 move a2, t8 | a2 = t8;
0x00403128 lw t8, -0x7f34(gp) | t8 = sym.imp.fprintf
0x0040312c move t9, t8 | t9 = t8;
0x00403130 jalr t9 | t9 ();
0x00403134 nop |
0x00403138 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040313c lw t8, -0x7f10(gp) | t8 = *((gp - 8132));
0x00403140 lw v0, (t8) | v0 = *(t8);
0x00403144 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00403148 addiu t8, t8, 1 | t8++;
0x0040314c move a0, v0 | a0 = v0;
0x00403150 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str.std_code:__s_n */
0x00403154 addiu a1, v0, -0x6d20 | a1 = v0 + -0x6d20;
0x00403158 move a2, t8 | a2 = t8;
0x0040315c lw t8, -0x7f34(gp) | t8 = sym.imp.fprintf
0x00403160 move t9, t8 | t9 = t8;
0x00403164 jalr t9 | t9 ();
0x00403168 nop |
0x0040316c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00403170 lw t8, -0x7f10(gp) | t8 = *((gp - 8132));
0x00403174 lw v0, (t8) | v0 = *(t8);
0x00403178 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x0040317c addiu t8, t8, 0x11 | t8 += 0x11;
0x00403180 move a0, v0 | a0 = v0;
0x00403184 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str.std_offset:__s_n */
0x00403188 addiu a1, v0, -0x6d10 | a1 = v0 + -0x6d10;
0x0040318c move a2, t8 | a2 = t8;
0x00403190 lw t8, -0x7f34(gp) | t8 = sym.imp.fprintf
0x00403194 move t9, t8 | t9 = t8;
0x00403198 jalr t9 | t9 ();
0x0040319c nop |
0x004031a0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004031a4 lw t8, -0x7f10(gp) | t8 = *((gp - 8132));
0x004031a8 lw v0, (t8) | v0 = *(t8);
0x004031ac lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x004031b0 addiu t8, t8, 0x31 | t8 += 0x31;
0x004031b4 move a0, v0 | a0 = v0;
0x004031b8 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str.dst_code:__s_n */
0x004031bc addiu a1, v0, -0x6cd4 | a1 = v0 + -0x6cd4;
0x004031c0 move a2, t8 | a2 = t8;
0x004031c4 lw t8, -0x7f34(gp) | t8 = sym.imp.fprintf
0x004031c8 move t9, t8 | t9 = t8;
0x004031cc jalr t9 | t9 ();
0x004031d0 nop |
0x004031d4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004031d8 lw t8, -0x7f10(gp) | t8 = *((gp - 8132));
0x004031dc lw v0, (t8) | v0 = *(t8);
0x004031e0 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x004031e4 addiu t8, t8, 0x41 | t8 += 0x41;
0x004031e8 move a0, v0 | a0 = v0;
0x004031ec lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str.dst_offset:__s_n */
0x004031f0 addiu a1, v0, -0x6cc4 | a1 = v0 + -0x6cc4;
0x004031f4 move a2, t8 | a2 = t8;
0x004031f8 lw t8, -0x7f34(gp) | t8 = sym.imp.fprintf
0x004031fc move t9, t8 | t9 = t8;
0x00403200 jalr t9 | t9 ();
0x00403204 nop |
0x00403208 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040320c lw t8, -0x7f10(gp) | t8 = *((gp - 8132));
0x00403210 lw v0, (t8) | v0 = *(t8);
0x00403214 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x00403218 addiu t8, t8, 0x61 | t8 += 0x61;
0x0040321c move a0, v0 | a0 = v0;
0x00403220 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str.dst_start:__s_n */
0x00403224 addiu a1, v0, -0x6cb4 | a1 = v0 + -0x6cb4;
0x00403228 move a2, t8 | a2 = t8;
0x0040322c lw t8, -0x7f34(gp) | t8 = sym.imp.fprintf
0x00403230 move t9, t8 | t9 = t8;
0x00403234 jalr t9 | t9 ();
0x00403238 nop |
0x0040323c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00403240 lw t8, -0x7f10(gp) | t8 = *((gp - 8132));
0x00403244 lw v0, (t8) | v0 = *(t8);
0x00403248 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x0040324c addiu t8, t8, 0x81 | t8 += 0x81;
0x00403250 move a0, v0 | a0 = v0;
0x00403254 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str.dst_end:__s_n */
0x00403258 addiu a1, v0, -0x6ca4 | a1 = v0 + -0x6ca4;
0x0040325c move a2, t8 | a2 = t8;
0x00403260 lw t8, -0x7f34(gp) | t8 = sym.imp.fprintf
0x00403264 move t9, t8 | t9 = t8;
0x00403268 jalr t9 | t9 ();
0x0040326c nop |
0x00403270 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00403274 addiu t8, zero, 1 | t8 = 1;
| label_0:
0x00403278 move v0, t8 | v0 = t8;
0x0040327c lw t8, -0x7ec0(gp) | t8 = *((gp - 8112));
0x00403280 lw v1, 0xe4(fp) | v1 = *(arg_e4h);
0x00403284 lw t8, (t8) | t8 = *(t8);
| if (v1 != t8) {
0x00403288 beq v1, t8, 0x4032a0 |
0x0040328c nop |
0x00403290 lw t8, -0x7f08(gp) | t8 = sym.imp.__stack_chk_fail;
0x00403294 move t9, t8 | t9 = t8;
0x00403298 jalr t9 | t9 ();
0x0040329c nop |
| }
0x004032a0 move sp, fp |
0x004032a4 lw ra, 0xec(sp) | ra = *(var_ech);
0x004032a8 lw fp, 0xe8(sp) | fp = *(var_e8h);
0x004032ac addiu sp, sp, 0xf0 |
0x004032b0 jr ra | return v1;
0x004032b4 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/sbin/tz_dst @ 0x4039b4 */
| #include <stdint.h>
|
; (fcn) aav.0x004039b4 () | void aav_0x004039b4 () {
0x004039b4 lui gp, 2 |
0x004039b8 addiu gp, gp, 0x166c |
0x004039bc addu gp, gp, t9 | gp += t9;
0x004039c0 addiu sp, sp, -0x98 |
0x004039c4 sw ra, 0x94(sp) | *(var_94h) = ra;
0x004039c8 sw fp, 0x90(sp) | *(var_90h) = fp;
0x004039cc move fp, sp | fp = sp;
0x004039d0 sw gp, 0x28(sp) | *(var_28h) = gp;
0x004039d4 sw a0, 0x34(fp) | *(arg_34h) = a0;
0x004039d8 lw t8, -0x7ec0(gp) | t8 = *((gp - 8112));
0x004039dc lw t8, (t8) | t8 = *(t8);
0x004039e0 sw t8, 0x8c(fp) | *(arg_8ch) = t8;
0x004039e4 lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* str._etc_TZ */
0x004039e8 addiu a0, t8, -0x6c78 | a0 = t8 + -0x6c78;
0x004039ec lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
0x004039f0 addiu a1, t8, -0x6c70 | a1 = t8 + -0x6c70;
0x004039f4 lw t8, -0x7f04(gp) | t8 = sym.imp.fopen;
0x004039f8 move t9, t8 | t9 = t8;
0x004039fc jalr t9 | t9 ();
0x00403a00 nop |
0x00403a04 lw gp, 0x28(fp) | gp = *(arg_28h);
0x00403a08 move t8, v0 | t8 = v0;
0x00403a0c sw t8, 0x38(fp) | *(arg_38h) = t8;
0x00403a10 lw t8, 0x38(fp) | t8 = *(arg_38h);
| if (t8 == 0) {
0x00403a14 bnez t8, 0x403a40 |
0x00403a18 nop |
0x00403a1c lw t8, -0x7fdc(gp) | t8 = *((gp - 8183));
| /* str.fopen */
0x00403a20 addiu a0, t8, -0x6c6c | a0 = t8 + -0x6c6c;
0x00403a24 lw t8, -0x7f2c(gp) | t8 = sym.imp.perror;
0x00403a28 move t9, t8 | t9 = t8;
0x00403a2c jalr t9 | t9 ();
0x00403a30 nop |
0x00403a34 lw gp, 0x28(fp) | gp = *(arg_28h);
0x00403a38 b 0x403b5c | goto label_0;
0x00403a3c nop |
| }
0x00403a40 lw t8, 0x34(fp) | t8 = *(arg_34h);
0x00403a44 lbu t8, (t8) | t8 = *(t8);
0x00403a48 xori t8, t8, 1 | t8 ^= 1;
0x00403a4c andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x00403a50 beqz t8, 0x403aa0 |
0x00403a54 nop |
0x00403a58 lw t8, 0x34(fp) | t8 = *(arg_34h);
0x00403a5c addiu t8, t8, 1 | t8++;
0x00403a60 lw v0, 0x34(fp) | v0 = *(arg_34h);
0x00403a64 addiu v1, v0, 0x11 | v1 = v0 + 0x11;
0x00403a68 addiu v0, fp, 0x3c | v0 = fp + 0x3c;
0x00403a6c sw v1, 0x10(sp) | *(var_10h) = v1;
0x00403a70 move a0, v0 | a0 = v0;
0x00403a74 addiu a1, zero, 0x50 | a1 = 0x50;
0x00403a78 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str._s_s_n */
0x00403a7c addiu a2, v0, -0x6c64 | a2 = v0 + -0x6c64;
0x00403a80 move a3, t8 | a3 = t8;
0x00403a84 lw t8, -0x7ef0(gp) | t8 = sym.imp.snprintf;
0x00403a88 move t9, t8 | t9 = t8;
0x00403a8c jalr t9 | t9 ();
0x00403a90 nop |
0x00403a94 lw gp, 0x28(fp) | gp = *(arg_28h);
0x00403a98 b 0x403b10 | goto label_1;
0x00403a9c nop |
| }
0x00403aa0 lw t8, 0x34(fp) | t8 = *(arg_34h);
0x00403aa4 addiu t8, t8, 1 | t8++;
0x00403aa8 lw v0, 0x34(fp) | v0 = *(arg_34h);
0x00403aac addiu a3, v0, 0x11 | a3 = v0 + 0x11;
0x00403ab0 lw v0, 0x34(fp) | v0 = *(arg_34h);
0x00403ab4 addiu a2, v0, 0x31 | a2 = v0 + 0x31;
0x00403ab8 lw v0, 0x34(fp) | v0 = *(arg_34h);
0x00403abc addiu a1, v0, 0x41 | a1 = v0 + 0x41;
0x00403ac0 lw v0, 0x34(fp) | v0 = *(arg_34h);
0x00403ac4 addiu a0, v0, 0x61 | a0 = v0 + 0x61;
0x00403ac8 lw v0, 0x34(fp) | v0 = *(arg_34h);
0x00403acc addiu v1, v0, 0x81 | v1 = v0 + 0x81;
0x00403ad0 addiu v0, fp, 0x3c | v0 = fp + 0x3c;
0x00403ad4 sw a3, 0x10(sp) | *(var_10h) = a3;
0x00403ad8 sw a2, 0x14(sp) | *(var_14h) = a2;
0x00403adc sw a1, 0x18(sp) | *(var_18h) = a1;
0x00403ae0 sw a0, 0x1c(sp) | *(var_1ch) = a0;
0x00403ae4 sw v1, 0x20(sp) | *(var_20h) = v1;
0x00403ae8 move a0, v0 | a0 = v0;
0x00403aec addiu a1, zero, 0x50 | a1 = 0x50;
0x00403af0 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| /* str._s_s_s_s__s__s_n */
0x00403af4 addiu a2, v0, -0x6c5c | a2 = v0 + -0x6c5c;
0x00403af8 move a3, t8 | a3 = t8;
0x00403afc lw t8, -0x7ef0(gp) | t8 = sym.imp.snprintf;
0x00403b00 move t9, t8 | t9 = t8;
0x00403b04 jalr t9 | t9 ();
0x00403b08 nop |
0x00403b0c lw gp, 0x28(fp) | gp = *(arg_28h);
| label_1:
0x00403b10 addiu t8, fp, 0x3c | t8 = fp + 0x3c;
0x00403b14 lw a0, 0x38(fp) | a0 = *(arg_38h);
0x00403b18 move a1, t8 | a1 = t8;
0x00403b1c lw t8, -0x7f34(gp) | t8 = sym.imp.fprintf
0x00403b20 move t9, t8 | t9 = t8;
0x00403b24 jalr t9 | t9 ();
0x00403b28 nop |
0x00403b2c lw gp, 0x28(fp) | gp = *(arg_28h);
0x00403b30 lw a0, 0x38(fp) | a0 = *(arg_38h);
0x00403b34 lw t8, -0x7f00(gp) | t8 = sym.imp.fclose;
0x00403b38 move t9, t8 | t9 = t8;
0x00403b3c jalr t9 | t9 ();
0x00403b40 nop |
0x00403b44 lw gp, 0x28(fp) | gp = *(arg_28h);
0x00403b48 lw t8, -0x7f24(gp) | t8 = sym.imp.tzset;
0x00403b4c move t9, t8 | t9 = t8;
0x00403b50 jalr t9 | t9 ();
0x00403b54 nop |
0x00403b58 lw gp, 0x28(fp) | gp = *(arg_28h);
| label_0:
0x00403b5c lw t8, -0x7ec0(gp) | t8 = *((gp - 8112));
0x00403b60 lw v0, 0x8c(fp) | v0 = *(arg_8ch);
0x00403b64 lw t8, (t8) | t8 = *(t8);
| if (v0 != t8) {
0x00403b68 beq v0, t8, 0x403b80 |
0x00403b6c nop |
0x00403b70 lw t8, -0x7f08(gp) | t8 = sym.imp.__stack_chk_fail;
0x00403b74 move t9, t8 | t9 = t8;
0x00403b78 jalr t9 | t9 ();
0x00403b7c nop |
| }
0x00403b80 move sp, fp |
0x00403b84 lw ra, 0x94(sp) | ra = *(var_94h);
0x00403b88 lw fp, 0x90(sp) | fp = *(var_90h);
0x00403b8c addiu sp, sp, 0x98 |
0x00403b90 jr ra | return v0;
0x00403b94 nop |
| }
[*] Function fprintf used 20 times tz_dst