[*] Binary protection state of dbox
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function sprintf tear down of dbox
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/dbox @ 0x844c */
| #include <stdint.h>
|
; (fcn) sym.coredump () | void coredump () {
0x0000844c lui gp, 3 |
0x00008450 addiu gp, gp, -0x73dc |
0x00008454 addu gp, gp, t9 | gp += t9;
0x00008458 addiu sp, sp, -0x58 |
0x0000845c lw t9, -0x7e18(gp) | t9 = sym.imp.pipe;
0x00008460 sw s2, 0x44(sp) | *(var_44h_2) = s2;
0x00008464 lw s2, -0x7d68(gp) | s2 = *((gp - 8026));
0x00008468 sw s0, 0x3c(sp) | *(var_3ch) = s0;
0x0000846c addiu s0, zero, -1 | s0 = -1;
0x00008470 lw v0, (s2) | v0 = *(s2);
0x00008474 sw gp, 0x18(sp) | *(var_18h_2) = gp;
0x00008478 sw ra, 0x54(sp) | *(var_54h) = ra;
0x0000847c sw s4, 0x4c(sp) | *(var_4ch_2) = s4;
0x00008480 sw s3, 0x48(sp) | *(var_48h_2) = s3;
0x00008484 sw s1, 0x40(sp) | *(var_40h) = s1;
0x00008488 sw s5, 0x50(sp) | *(var_50h_2) = s5;
0x0000848c move s4, a0 | s4 = a0;
0x00008490 sw v0, 0x34(sp) | *(var_34h) = v0;
0x00008494 addiu a0, sp, 0x24 | a0 = sp + 0x24;
0x00008498 sw s0, 0x24(sp) | *(var_24h_2) = s0;
0x0000849c sw s0, 0x28(sp) | *(var_28h) = s0;
0x000084a0 sw s0, 0x2c(sp) | *(var_2ch) = s0;
0x000084a4 sw s0, 0x30(sp) | *(var_30h) = s0;
0x000084a8 move s3, a1 | s3 = a1;
0x000084ac jalr t9 | t9 ();
0x000084b0 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x000084b4 addiu a0, sp, 0x2c | a0 = sp + 0x2c;
0x000084b8 lw t9, -0x7e18(gp) | t9 = sym.imp.pipe;
0x000084bc move s1, v0 | s1 = v0;
0x000084c0 jalr t9 | t9 ();
0x000084c4 or v0, s1, v0 | v0 = s1 | v0;
0x000084c8 lw gp, 0x18(sp) | gp = *(var_18h_2);
| if (v0 != 0) {
0x000084cc bnez v0, 0x86b4 | goto label_0;
| }
0x000084d0 lw t9, -0x7df0(gp) | t9 = sym.imp.fcntl;
0x000084d4 lw a0, 0x2c(sp) | a0 = *(var_2ch);
0x000084d8 addiu a2, zero, 1 | a2 = 1;
0x000084dc addiu a1, zero, 2 | a1 = 2;
0x000084e0 jalr t9 | t9 ();
0x000084e4 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x000084e8 lw a0, 0x24(sp) | a0 = *(var_24h_2);
0x000084ec addiu a2, zero, 1 | a2 = 1;
0x000084f0 lw t9, -0x7df0(gp) | t9 = sym.imp.fcntl;
0x000084f4 addiu a1, zero, 2 | a1 = 2;
0x000084f8 jalr t9 | t9 ();
0x000084fc lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00008500 addiu a2, zero, 0x64 | a2 = 0x64;
0x00008504 addiu a1, zero, 1 | a1 = 1;
0x00008508 lw s1, -0x7fb8(gp) | s1 = *((gp - 8174));
0x0000850c lw a3, -0x7fdc(gp) | a3 = *(gp);
0x00008510 lw t9, -0x7df8(gp) | t9 = sym.imp.__sprintf_chk
| /* esilref: '&d' */
0x00008514 addiu a3, a3, 0x55a0 | a3 += 0x55a0;
0x00008518 addiu a0, s1, -0x6b40 | a0 = s1 + -0x6b40;
0x0000851c sw s3, 0x10(sp) | *(var_10h_2) = s3;
0x00008520 jalr t9 | t9 ();
0x00008524 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00008528 addiu s1, s1, -0x6b40 | s1 += -0x6b40;
0x0000852c lw v0, -0x7fb8(gp) | v0 = *((gp - 8174));
0x00008530 lw v1, -0x7fb8(gp) | v1 = *((gp - 8174));
0x00008534 lw t9, -0x7be0(gp) | t9 = sym.imp.fileno;
0x00008538 lw v0, -0x6978(v0) | v0 = *((v0 - 6750));
0x0000853c lw s5, -0x6974(v1) | s5 = *((v1 - 6749));
0x00008540 lw v1, -0x7dc0(gp) | v1 = *((gp - 8048));
0x00008544 sll v0, v0, 2 | v0 <<= 2;
0x00008548 addu v0, s5, v0 | v0 = s5 + v0;
0x0000854c lw a0, (v1) | a0 = *(v1);
0x00008550 sw s1, -4(v0) | *((v0 - 1)) = s1;
0x00008554 lw s1, (s5) | s1 = *(s5);
0x00008558 jalr t9 | t9 ();
0x0000855c lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00008560 move a2, v0 | a2 = v0;
0x00008564 lw v0, 0x28(sp) | v0 = *(var_28h);
0x00008568 lw a3, 0x30(sp) | a3 = *(var_30h);
0x0000856c lw t9, -0x7f38(gp) | t9 = sym.sys_run_nowait;
0x00008570 move a1, s5 | a1 = s5;
0x00008574 move a0, s1 | a0 = s1;
0x00008578 sw zero, 0x14(sp) | *(var_14h) = 0;
0x0000857c sw v0, 0x10(sp) | *(var_10h_2) = v0;
0x00008580 bal 0xab3c | sym_sys_run_nowait ();
0x00008584 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00008588 lw a0, 0x28(sp) | a0 = *(var_28h);
0x0000858c lw t9, -0x7d90(gp) | t9 = sym.imp.close;
0x00008590 move s1, v0 | s1 = v0;
0x00008594 jalr t9 | t9 ();
0x00008598 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x0000859c lw t9, -0x7d90(gp) | t9 = sym.imp.close;
0x000085a0 lw s5, -0x7fb8(gp) | s5 = *((gp - 8174));
0x000085a4 lw a0, 0x30(sp) | a0 = *(var_30h);
0x000085a8 jalr t9 | t9 ();
0x000085ac lw gp, 0x18(sp) | gp = *(var_18h_2);
0x000085b0 lw a0, 0x2c(sp) | a0 = *(var_2ch);
0x000085b4 move a1, s4 | a1 = s4;
0x000085b8 lw t9, -0x7fa4(gp) | t9 = sym.safe_copyfd;
0x000085bc sw s0, 0x28(sp) | *(var_28h) = s0;
0x000085c0 sw s0, 0x30(sp) | *(var_30h) = s0;
0x000085c4 bal 0xbec0 | sym_safe_copyfd ();
0x000085c8 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x000085cc lw a1, -0x6970(s5) | a1 = *((s5 - 6748));
0x000085d0 lw t9, -0x7fa4(gp) | t9 = sym.safe_copyfd;
0x000085d4 lw a0, 0x2c(sp) | a0 = *(var_2ch);
0x000085d8 bal 0xbec0 | sym_safe_copyfd ();
0x000085dc lw gp, 0x18(sp) | gp = *(var_18h_2);
0x000085e0 lw a1, -0x6970(s5) | a1 = *((s5 - 6748));
0x000085e4 lw t9, -0x7fa4(gp) | t9 = sym.safe_copyfd;
0x000085e8 lw a0, 0x24(sp) | a0 = *(var_24h_2);
0x000085ec bal 0xbec0 | sym_safe_copyfd ();
0x000085f0 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x000085f4 move a2, zero | a2 = 0;
0x000085f8 addiu a1, sp, 0x20 | a1 = sp + 0x20;
0x000085fc lw t9, -0x7d60(gp) | t9 = sym.imp.waitpid;
0x00008600 move a0, s1 | a0 = s1;
0x00008604 jalr t9 | t9 ();
0x00008608 lw gp, 0x18(sp) | gp = *(var_18h_2);
| if (s1 == v0) {
0x0000860c bne s1, v0, 0x861c |
0x00008610 lw v0, 0x20(sp) | v0 = *(var_20h_2);
0x00008614 lw t9, -0x7d90(gp) | t9 = sym.imp.close;
| if (v0 == 0) {
0x00008618 beqz v0, 0x8644 | goto label_1;
| }
| }
0x0000861c lw v0, -0x7d38(gp) | v0 = *((gp - 8014));
0x00008620 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x00008624 lw t9, -0x7c34(gp) | t9 = sym.imp.__fprintf_chk;
0x00008628 lw a0, (v0) | a0 = *(v0);
0x0000862c move a3, s3 | a3 = s3;
| /* str.dump_error_for_pid__d_n */
0x00008630 addiu a2, a2, 0x5638 | a2 += 0x5638;
0x00008634 addiu a1, zero, 1 | a1 = 1;
0x00008638 jalr t9 | t9 ();
0x0000863c lw gp, 0x18(sp) | gp = *(var_18h_2);
| do {
0x00008640 lw t9, -0x7d90(gp) | t9 = sym.imp.close;
| label_1:
0x00008644 lw a0, 0x24(sp) | a0 = *(var_24h_2);
0x00008648 jalr t9 | t9 ();
0x0000864c lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00008650 lw t9, -0x7d90(gp) | t9 = sym.imp.close;
0x00008654 lw a0, 0x28(sp) | a0 = *(var_28h);
0x00008658 jalr t9 | t9 ();
0x0000865c lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00008660 lw t9, -0x7d90(gp) | t9 = sym.imp.close;
0x00008664 lw a0, 0x2c(sp) | a0 = *(var_2ch);
0x00008668 jalr t9 | t9 ();
0x0000866c lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00008670 lw t9, -0x7d90(gp) | t9 = sym.imp.close;
0x00008674 lw a0, 0x30(sp) | a0 = *(var_30h);
0x00008678 jalr t9 | t9 ();
0x0000867c lw a0, 0x34(sp) | a0 = *(var_34h);
0x00008680 lw v1, (s2) | v1 = *(s2);
0x00008684 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00008688 move v0, zero | v0 = 0;
| if (a0 != v1) {
0x0000868c bne a0, v1, 0x86cc | goto label_2;
| }
0x00008690 lw ra, 0x54(sp) | ra = *(var_54h);
0x00008694 lw s5, 0x50(sp) | s5 = *(var_50h_2);
0x00008698 lw s4, 0x4c(sp) | s4 = *(var_4ch_2);
0x0000869c lw s3, 0x48(sp) | s3 = *(var_48h_2);
0x000086a0 lw s2, 0x44(sp) | s2 = *(var_44h_2);
0x000086a4 lw s1, 0x40(sp) | s1 = *(var_40h);
0x000086a8 lw s0, 0x3c(sp) | s0 = *(var_3ch);
0x000086ac addiu sp, sp, 0x58 |
0x000086b0 jr ra | return v0;
| label_0:
0x000086b4 lw a0, -0x7fdc(gp) | a0 = *(gp);
0x000086b8 lw t9, -0x7cb0(gp) | t9 = sym.imp.perror;
| /* str.pipes */
0x000086bc addiu a0, a0, 0x51a4 | a0 += 0x51a4;
0x000086c0 jalr t9 | t9 ();
0x000086c4 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x000086c8 b 0x8640 |
| } while (1);
| label_2:
0x000086cc lw t9, -0x7db0(gp) | t9 = sym.imp.__stack_chk_fail;
0x000086d0 jalr t9 | t9 ();
0x000086d4 nop |
0x000086d8 nop |
0x000086dc nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/dbox @ 0x7c50 */
| #include <stdint.h>
|
; (fcn) sym.dump_one () | void dump_one () {
0x00007c50 lui gp, 3 |
0x00007c54 addiu gp, gp, -0x6be0 |
0x00007c58 addu gp, gp, t9 | gp += t9;
0x00007c5c addiu sp, sp, -0xa0 |
0x00007c60 lw t9, -0x7e18(gp) | t9 = sym.imp.pipe;
0x00007c64 sw s6, 0x90(sp) | *(var_90h) = s6;
0x00007c68 lw s6, -0x7d68(gp) | s6 = *((gp - 8026));
0x00007c6c sw fp, 0x98(sp) | *(var_98h) = fp;
0x00007c70 sw s0, 0x78(sp) | *(var_78h) = s0;
0x00007c74 lw v0, (s6) | v0 = *(s6);
0x00007c78 addiu fp, zero, -1 | fp = -1;
0x00007c7c sll s0, a3, 2 | s0 = a3 << 2;
0x00007c80 sw gp, 0x18(sp) | *(var_18h) = gp;
0x00007c84 sw ra, 0x9c(sp) | *(var_9ch) = ra;
0x00007c88 sw s5, 0x8c(sp) | *(var_8ch) = s5;
0x00007c8c sw s4, 0x88(sp) | *(var_88h) = s4;
0x00007c90 sw s2, 0x80(sp) | *(var_80h) = s2;
0x00007c94 sw a0, 0x24(sp) | *(var_24h) = a0;
0x00007c98 sw a1, 0xa4(sp) | *(arg_a4h) = a1;
0x00007c9c addiu a0, sp, 0x44 | a0 = sp + 0x44;
0x00007ca0 sw s7, 0x94(sp) | *(var_94h) = s7;
0x00007ca4 sw s3, 0x84(sp) | *(var_84h) = s3;
0x00007ca8 sw s1, 0x7c(sp) | *(var_7ch) = s1;
0x00007cac sw v0, 0x74(sp) | *(var_74h) = v0;
0x00007cb0 sw fp, 0x44(sp) | *(var_44h) = fp;
0x00007cb4 sw fp, 0x48(sp) | *(var_48h) = fp;
0x00007cb8 sw fp, 0x4c(sp) | *(var_4ch) = fp;
0x00007cbc sw fp, 0x50(sp) | *(var_50h) = fp;
0x00007cc0 move s5, a3 | s5 = a3;
0x00007cc4 move s4, a2 | s4 = a2;
0x00007cc8 lwx s0, s0(a2) | __asm ("lwx s0, s0(a2)");
0x00007ccc jalr t9 | t9 ();
0x00007cd0 lw gp, 0x18(sp) | gp = *(var_18h);
0x00007cd4 addiu a0, sp, 0x4c | a0 = sp + 0x4c;
0x00007cd8 lw t9, -0x7e18(gp) | t9 = sym.imp.pipe;
0x00007cdc move s2, v0 | s2 = v0;
0x00007ce0 jalr t9 | t9 ();
0x00007ce4 or s2, s2, v0 | s2 |= v0;
0x00007ce8 lw gp, 0x18(sp) | gp = *(var_18h);
| if (s2 != 0) {
0x00007cec bnez s2, 0x80bc | goto label_10;
| }
0x00007cf0 lw t9, -0x7df0(gp) | t9 = sym.imp.fcntl;
0x00007cf4 lw a0, 0x4c(sp) | a0 = *(var_4ch);
0x00007cf8 addiu a2, zero, 1 | a2 = 1;
0x00007cfc addiu a1, zero, 2 | a1 = 2;
0x00007d00 jalr t9 | t9 ();
0x00007d04 lw gp, 0x18(sp) | gp = *(var_18h);
0x00007d08 lw a0, 0x44(sp) | a0 = *(var_44h);
0x00007d0c addiu a2, zero, 1 | a2 = 1;
0x00007d10 lw t9, -0x7df0(gp) | t9 = sym.imp.fcntl;
0x00007d14 addiu a1, zero, 2 | a1 = 2;
0x00007d18 jalr t9 | t9 ();
0x00007d1c lw gp, 0x18(sp) | gp = *(var_18h);
0x00007d20 addiu a2, zero, 0x64 | a2 = 0x64;
0x00007d24 addiu a1, zero, 1 | a1 = 1;
0x00007d28 lw s1, -0x7fb8(gp) | s1 = *((gp - 8174));
0x00007d2c lw a3, -0x7fdc(gp) | a3 = *(gp);
0x00007d30 lw t9, -0x7df8(gp) | t9 = sym.imp.__sprintf_chk
| /* esilref: '&d' */
0x00007d34 addiu a3, a3, 0x55a0 | a3 += 0x55a0;
0x00007d38 addiu a0, s1, -0x6adc | a0 = s1 + -0x6adc;
0x00007d3c sw s0, 0x10(sp) | *(var_10h_3) = s0;
0x00007d40 jalr t9 | t9 ();
0x00007d44 lw gp, 0x18(sp) | gp = *(var_18h);
0x00007d48 addiu s3, s1, -0x6adc | s3 = s1 + -0x6adc;
0x00007d4c lw v0, -0x7fb8(gp) | v0 = *((gp - 8174));
0x00007d50 lw a0, -0x7fb8(gp) | a0 = *((gp - 8174));
0x00007d54 lw t9, -0x7be0(gp) | t9 = sym.imp.fileno;
0x00007d58 lw v0, -0x6978(v0) | v0 = *((v0 - 6750));
0x00007d5c lw s7, -0x6974(a0) | s7 = *((a0 - 6749));
0x00007d60 sll v0, v0, 2 | v0 <<= 2;
0x00007d64 lw a0, -0x7dc0(gp) | a0 = *((gp - 8048));
0x00007d68 addu v0, s7, v0 | v0 = s7 + v0;
0x00007d6c lw a0, (a0) | a0 = *(a0);
0x00007d70 sw s3, -4(v0) | *((v0 - 1)) = s3;
0x00007d74 lw t0, (s7) | t0 = *(s7);
0x00007d78 sw t0, 0x20(sp) | *(var_20h_3) = t0;
0x00007d7c jalr t9 | t9 ();
0x00007d80 lw gp, 0x18(sp) | gp = *(var_18h);
0x00007d84 lw t0, 0x20(sp) | t0 = *(var_20h_3);
0x00007d88 move a2, v0 | a2 = v0;
0x00007d8c lw v0, 0x48(sp) | v0 = *(var_48h);
0x00007d90 lw a3, 0x50(sp) | a3 = *(var_50h);
0x00007d94 lw t9, -0x7f38(gp) | t9 = sym.sys_run_nowait;
0x00007d98 move a0, t0 | a0 = t0;
0x00007d9c move a1, s7 | a1 = s7;
0x00007da0 sw zero, 0x14(sp) | *(var_14h_2) = 0;
0x00007da4 sw v0, 0x10(sp) | *(var_10h_3) = v0;
0x00007da8 bal 0xab3c | sym_sys_run_nowait ();
0x00007dac lw gp, 0x18(sp) | gp = *(var_18h);
0x00007db0 lw a0, 0x48(sp) | a0 = *(var_48h);
0x00007db4 sw v0, 0x2c(sp) | *(var_2ch_3) = v0;
0x00007db8 lw t9, -0x7d90(gp) | t9 = sym.imp.close;
0x00007dbc addiu s7, sp, 0x54 | s7 = sp + 0x54;
0x00007dc0 jalr t9 | t9 ();
0x00007dc4 lw gp, 0x18(sp) | gp = *(var_18h);
0x00007dc8 lw t9, -0x7d90(gp) | t9 = sym.imp.close;
0x00007dcc lw a0, 0x50(sp) | a0 = *(var_50h);
0x00007dd0 jalr t9 | t9 ();
0x00007dd4 lw gp, 0x18(sp) | gp = *(var_18h);
0x00007dd8 addiu a3, zero, 0x1e | a3 = 0x1e;
0x00007ddc addiu a2, zero, 1 | a2 = 1;
0x00007de0 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00007de4 lw t9, -0x7e08(gp) | t9 = sym.imp.__snprintf_chk;
| /* str._proc__d_cmdline */
0x00007de8 addiu v0, v0, 0x55a4 | v0 += 0x55a4;
0x00007dec addiu a1, zero, 0x1e | a1 = 0x1e;
0x00007df0 move a0, s7 | a0 = s7;
0x00007df4 sw s0, 0x14(sp) | *(var_14h_2) = s0;
0x00007df8 sw v0, 0x10(sp) | *(var_10h_3) = v0;
0x00007dfc sw fp, 0x48(sp) | *(var_48h) = fp;
0x00007e00 sw fp, 0x50(sp) | *(var_50h) = fp;
0x00007e04 jalr t9 | t9 ();
0x00007e08 lw gp, 0x18(sp) | gp = *(var_18h);
0x00007e0c move a1, zero | a1 = 0;
0x00007e10 lw t9, -0x7bf4(gp) | t9 = sym.imp.open;
0x00007e14 move a0, s7 | a0 = s7;
0x00007e18 jalr t9 | t9 ();
0x00007e1c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == fp) {
0x00007e20 beq v0, fp, 0x80e4 | goto label_11;
| }
0x00007e24 lw t9, -0x7cac(gp) | t9 = sym.imp.read;
0x00007e28 move a0, v0 | a0 = v0;
0x00007e2c addiu a2, zero, 0x50 | a2 = 0x50;
0x00007e30 move a1, s3 | a1 = s3;
0x00007e34 sw v0, 0x20(sp) | *(var_20h_3) = v0;
0x00007e38 jalr t9 | t9 ();
0x00007e3c lw gp, 0x18(sp) | gp = *(var_18h);
0x00007e40 lw a3, 0x20(sp) | a3 = *(var_20h_3);
0x00007e44 move s7, v0 | s7 = v0;
0x00007e48 lw t9, -0x7d90(gp) | t9 = sym.imp.close;
0x00007e4c move a0, a3 | a0 = a3;
| if (v0 == fp) {
0x00007e50 beq v0, fp, 0x80d8 | goto label_12;
| }
0x00007e54 jalr t9 | t9 ();
0x00007e58 nop |
0x00007e5c addu a1, s3, s7 | a1 = s3 + s7;
0x00007e60 lw gp, 0x18(sp) | gp = *(var_18h);
0x00007e64 sb zero, (a1) | *(a1) = 0;
0x00007e68 lb a0, -0x6adc(s1) | a0 = *((s1 - 27356));
0x00007e6c move v0, s3 | v0 = s3;
| if (a0 == 0) {
0x00007e70 beqz a0, 0x83fc | goto label_13;
| }
0x00007e74 addiu a3, zero, 1 | a3 = 1;
0x00007e78 move a1, zero | a1 = 0;
0x00007e7c subu a3, a3, s3 | __asm ("subu a3, a3, s3");
| do {
0x00007e80 addu v1, a3, v0 | v1 = a3 + v0;
0x00007e84 addiu v0, v0, 1 | v0++;
0x00007e88 xori a2, a0, 0x2f | a2 = a0 ^ 0x2f;
0x00007e8c lb a0, (v0) | a0 = *(v0);
| if (a2 != 0) {
0x00007e90 movz a1, v1, a2 | a1 = v1;
| }
0x00007e94 bnez a0, 0x7e80 |
| } while (a0 != 0);
0x00007e98 subu s7, v1, a1 | __asm ("subu s7, v1, a1");
0x00007e9c addiu v0, zero, 0x5a | v0 = 0x5a;
0x00007ea0 subu v0, v0, s7 | __asm ("subu v0, v0, s7");
0x00007ea4 addu a1, s3, a1 | a1 = s3 + a1;
0x00007ea8 move a2, s7 | a2 = s7;
0x00007eac addu fp, s3, s7 | fp = s3 + s7;
0x00007eb0 sw v0, 0x20(sp) | *(var_20h_3) = v0;
| label_8:
0x00007eb4 lw t9, -0x7c9c(gp) | t9 = sym.imp.__memcpy_chk;
0x00007eb8 addiu a3, zero, 0x64 | a3 = 0x64;
0x00007ebc addiu a0, s1, -0x6adc | a0 = s1 + -0x6adc;
0x00007ec0 jalr t9 | t9 ();
0x00007ec4 lw gp, 0x18(sp) | gp = *(var_18h);
0x00007ec8 lw a1, 0x20(sp) | a1 = *(var_20h_3);
0x00007ecc sw s0, 0x14(sp) | *(var_14h_2) = s0;
0x00007ed0 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00007ed4 lw t9, -0x7e08(gp) | t9 = sym.imp.__snprintf_chk;
| /* str.._d_ */
0x00007ed8 addiu v0, v0, 0x55b8 | v0 += sym.cored_mgm_connect;
0x00007edc sw v0, 0x10(sp) | *(var_10h_3) = v0;
0x00007ee0 addiu a3, zero, -1 | a3 = -1;
0x00007ee4 addiu a2, zero, 1 | a2 = 1;
0x00007ee8 move a0, fp | a0 = fp;
0x00007eec jalr t9 | t9 ();
0x00007ef0 addu v0, v0, s7 | v0 += s7;
0x00007ef4 lw gp, 0x18(sp) | gp = *(var_18h);
0x00007ef8 sw v0, 0x34(sp) | *(var_34h_3) = v0;
| label_3:
0x00007efc lw v0, 0x44(sp) | v0 = *(var_44h);
0x00007f00 move s1, zero | s1 = 0;
0x00007f04 sw v0, 0x28(sp) | *(var_28h_3) = v0;
0x00007f08 lw v0, -0x7fb8(gp) | v0 = *((gp - 8174));
0x00007f0c addiu fp, v0, -0x6a78 | fp = v0 + -0x6a78;
| label_0:
0x00007f10 addu a3, fp, s1 | a3 = fp + s1;
| do {
0x00007f14 lw t9, -0x7cac(gp) | t9 = sym.imp.read;
0x00007f18 lw a0, 0x28(sp) | a0 = *(var_28h_3);
0x00007f1c move a1, a3 | a1 = a3;
0x00007f20 sw a3, 0x20(sp) | *(var_20h_3) = a3;
0x00007f24 addiu a2, zero, 0x100 | a2 = aav.0x00000100;
0x00007f28 jalr t9 | t9 ();
0x00007f2c move s7, v0 | s7 = v0;
0x00007f30 lw gp, 0x18(sp) | gp = *(var_18h);
0x00007f34 lw a3, 0x20(sp) | a3 = *(var_20h_3);
| if (v0 < 0) {
0x00007f38 bltz v0, 0x8094 | goto label_14;
| }
0x00007f3c lw t9, -0x7dfc(gp) | t9 = sym.imp.memchr;
0x00007f40 move a2, v0 | a2 = v0;
0x00007f44 addiu a1, zero, 0xa | a1 = 0xa;
0x00007f48 move a0, a3 | a0 = a3;
0x00007f4c jalr t9 | t9 ();
0x00007f50 addu s1, s1, s7 | s1 += s7;
0x00007f54 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x00007f58 bnez v0, 0x8118 | goto label_15;
| }
0x00007f5c sltiu v0, s1, 0x100 | v0 = (s1 < aav.0x00000100) ? 1 : 0;
0x00007f60 addu a3, fp, s1 | a3 = fp + s1;
0x00007f64 bnez v0, 0x7f14 |
| } while (v0 != 0);
0x00007f68 lw v0, -0x7d38(gp) | v0 = *((gp - 8014));
0x00007f6c lw a0, -0x7fdc(gp) | a0 = *(gp);
0x00007f70 lw t9, -0x7d94(gp) | t9 = sym.imp.fwrite;
0x00007f74 lw a3, (v0) | a3 = *(v0);
0x00007f78 addiu a2, zero, 0x19 | a2 = 0x19;
0x00007f7c addiu a1, zero, 1 | a1 = 1;
| /* str.failed_to_read_ctl_line._n */
0x00007f80 addiu a0, a0, 0x55cc | a0 += 0x55cc;
0x00007f84 jalr t9 | t9 ();
0x00007f88 addiu v0, sp, 0x40 | v0 = sp + 0x40;
0x00007f8c lw gp, 0x18(sp) | gp = *(var_18h);
0x00007f90 sw v0, 0x20(sp) | *(var_20h_3) = v0;
| label_1:
0x00007f94 lw s4, -0x7fb8(gp) | s4 = *((gp - 8174));
0x00007f98 lw t9, -0x7fa4(gp) | t9 = sym.safe_copyfd;
0x00007f9c lw a0, 0x4c(sp) | a0 = *(var_4ch);
0x00007fa0 lw a1, -0x6970(s4) | a1 = *((s4 - 6748));
0x00007fa4 move s1, zero | s1 = 0;
0x00007fa8 bal 0xbec0 | sym_safe_copyfd ();
0x00007fac lw gp, 0x18(sp) | gp = *(var_18h);
| label_5:
0x00007fb0 lw t9, -0x7fa4(gp) | t9 = sym.safe_copyfd;
0x00007fb4 lw a1, -0x6970(s4) | a1 = *((s4 - 6748));
0x00007fb8 lw a0, 0x44(sp) | a0 = *(var_44h);
0x00007fbc bal 0xbec0 | sym_safe_copyfd ();
0x00007fc0 lw gp, 0x18(sp) | gp = *(var_18h);
0x00007fc4 lw s4, 0x2c(sp) | s4 = *(var_2ch_3);
0x00007fc8 lw a1, 0x20(sp) | a1 = *(var_20h_3);
0x00007fcc lw t9, -0x7d60(gp) | t9 = sym.imp.waitpid;
0x00007fd0 move a2, zero | a2 = 0;
0x00007fd4 move a0, s4 | a0 = s4;
0x00007fd8 jalr t9 | t9 ();
0x00007fdc lw gp, 0x18(sp) | gp = *(var_18h);
| if (s4 == v0) {
0x00007fe0 bne s4, v0, 0x7ff0 |
0x00007fe4 lw v0, 0x40(sp) | v0 = *(var_40h_2);
| if (v0 == 0) {
0x00007fe8 beqz v0, 0x83a8 | goto label_16;
| }
0x00007fec nop |
| }
0x00007ff0 lw v0, -0x7d38(gp) | v0 = *((gp - 8014));
0x00007ff4 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x00007ff8 lw t9, -0x7c34(gp) | t9 = sym.imp.__fprintf_chk;
0x00007ffc lw a0, (v0) | a0 = *(v0);
0x00008000 move a3, s0 | a3 = s0;
| /* str.dump_error_for_pid__d */
0x00008004 addiu a2, a2, 0x5618 | a2 += 0x5618;
0x00008008 addiu a1, zero, 1 | a1 = 1;
0x0000800c jalr t9 | t9 ();
0x00008010 lw gp, 0x18(sp) | gp = *(var_18h);
| label_2:
0x00008014 lw t9, -0x7d90(gp) | t9 = sym.imp.close;
| label_6:
0x00008018 lw a0, 0x44(sp) | a0 = *(var_44h);
0x0000801c jalr t9 | t9 ();
0x00008020 lw gp, 0x18(sp) | gp = *(var_18h);
0x00008024 lw t9, -0x7d90(gp) | t9 = sym.imp.close;
0x00008028 lw a0, 0x48(sp) | a0 = *(var_48h);
0x0000802c jalr t9 | t9 ();
0x00008030 lw gp, 0x18(sp) | gp = *(var_18h);
0x00008034 lw t9, -0x7d90(gp) | t9 = sym.imp.close;
0x00008038 lw a0, 0x4c(sp) | a0 = *(var_4ch);
0x0000803c jalr t9 | t9 ();
0x00008040 lw gp, 0x18(sp) | gp = *(var_18h);
0x00008044 lw t9, -0x7d90(gp) | t9 = sym.imp.close;
0x00008048 lw a0, 0x50(sp) | a0 = *(var_50h);
0x0000804c jalr t9 | t9 ();
0x00008050 lw a0, 0x74(sp) | a0 = *(var_74h);
0x00008054 lw v1, (s6) | v1 = *(s6);
0x00008058 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000805c move v0, s2 | v0 = s2;
| if (a0 != v1) {
0x00008060 bne a0, v1, 0x8440 | goto label_17;
| }
0x00008064 lw ra, 0x9c(sp) | ra = *(var_9ch);
0x00008068 lw fp, 0x98(sp) | fp = *(var_98h);
0x0000806c lw s7, 0x94(sp) | s7 = *(var_94h);
0x00008070 lw s6, 0x90(sp) | s6 = *(var_90h);
0x00008074 lw s5, 0x8c(sp) | s5 = *(var_8ch);
0x00008078 lw s4, 0x88(sp) | s4 = *(var_88h);
0x0000807c lw s3, 0x84(sp) | s3 = *(var_84h);
0x00008080 lw s2, 0x80(sp) | s2 = *(var_80h);
0x00008084 lw s1, 0x7c(sp) | s1 = *(var_7ch);
0x00008088 lw s0, 0x78(sp) | s0 = *(var_78h);
0x0000808c addiu sp, sp, 0xa0 |
0x00008090 jr ra | return v0;
| label_14:
0x00008094 lw t9, -0x7be4(gp) | t9 = sym.imp.__errno_location;
0x00008098 jalr t9 | t9 ();
0x0000809c nop |
0x000080a0 lw v0, (v0) | v0 = *(v0);
0x000080a4 addiu v1, zero, 4 | v1 = 4;
0x000080a8 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == v1) {
0x000080ac beq v0, v1, 0x7f10 | goto label_0;
| }
| do {
0x000080b0 addiu v0, sp, 0x40 | v0 = sp + 0x40;
0x000080b4 sw v0, 0x20(sp) | *(var_20h_3) = v0;
0x000080b8 b 0x7f94 | goto label_1;
| label_10:
0x000080bc lw a0, -0x7fdc(gp) | a0 = *(gp);
0x000080c0 lw t9, -0x7cb0(gp) | t9 = sym.imp.perror;
| /* str.pipes */
0x000080c4 addiu a0, a0, 0x51a4 | a0 += 0x51a4;
0x000080c8 jalr t9 | t9 ();
0x000080cc move s2, zero | s2 = 0;
0x000080d0 lw gp, 0x18(sp) | gp = *(var_18h);
0x000080d4 b 0x8014 | goto label_2;
| label_12:
0x000080d8 jalr t9 | t9 ();
0x000080dc nop |
0x000080e0 lw gp, 0x18(sp) | gp = *(var_18h);
| label_11:
0x000080e4 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x000080e8 lw t9, -0x7e08(gp) | t9 = sym.imp.__snprintf_chk;
| /* str.unknown._d_ */
0x000080ec addiu v0, v0, 0x55c0 | v0 += 0x55c0;
0x000080f0 sw s0, 0x14(sp) | *(var_14h_2) = s0;
0x000080f4 sw v0, 0x10(sp) | *(var_10h_3) = v0;
0x000080f8 addiu a3, zero, 0x64 | a3 = 0x64;
0x000080fc addiu a2, zero, 1 | a2 = 1;
0x00008100 addiu a1, zero, 0x5a | a1 = 0x5a;
0x00008104 addiu a0, s1, -0x6adc | a0 = s1 + -0x6adc;
0x00008108 jalr t9 | t9 ();
0x0000810c sw v0, 0x34(sp) | *(var_34h_3) = v0;
0x00008110 lw gp, 0x18(sp) | gp = *(var_18h);
0x00008114 b 0x7efc | goto label_3;
| label_15:
0x00008118 addu v0, fp, s1 | v0 = fp + s1;
0x0000811c blez s1, 0x80b0 |
| } while (s1 <= 0);
0x00008120 lw a0, -0x7fb8(gp) | a0 = *((gp - 8174));
0x00008124 lw t9, -0x7d40(gp) | t9 = sym.imp.strtoul;
0x00008128 addiu v1, sp, 0x40 | v1 = sp + 0x40;
0x0000812c addiu a0, a0, -0x6a70 | a0 += -0x6a70;
0x00008130 sw v1, 0x20(sp) | *(var_20h_3) = v1;
0x00008134 addiu a2, zero, 0xa | a2 = 0xa;
0x00008138 move a1, v1 | a1 = v1;
0x0000813c sb zero, (v0) | *(v0) = 0;
0x00008140 jalr t9 | t9 ();
0x00008144 lw a0, 0x40(sp) | a0 = *(var_40h_2);
0x00008148 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000814c sw v0, 0x30(sp) | *(var_30h_3) = v0;
| if (a0 == 0) {
0x00008150 beqz a0, 0x8294 | goto label_18;
| }
0x00008154 addiu v1, a0, 0x15 | v1 = a0 + 0x15;
0x00008158 sw v1, 0x40(sp) | *(var_40h_2) = v1;
0x0000815c lb a0, 0x15(a0) | a0 = *((a0 + 21));
0x00008160 move s7, zero | s7 = 0;
| if (a0 == 0) {
0x00008164 beqz a0, 0x8194 | goto label_19;
| }
0x00008168 addiu v0, zero, 0x20 | v0 = 0x20;
| do {
0x0000816c addiu v1, v1, 1 | v1++;
| if (a0 != v0) {
0x00008170 bnel a0, v0, 0x8180 |
0x00008174 sb zero, (v1) | *(v1) = 0;
0x00008178 addiu s7, s7, 1 | s7++;
0x0000817c addiu v1, v1, 1 | v1++;
| }
0x00008180 lb a0, (v1) | a0 = *(v1);
0x00008184 bnez a0, 0x816c |
| } while (a0 != 0);
0x00008188 nop |
0x0000818c lw v1, 0x40(sp) | v1 = *(var_40h_2);
0x00008190 lb a0, (v1) | a0 = *(v1);
| label_19:
0x00008194 lw t9, -0x7d14(gp) | t9 = sym.imp.__ctype_b_loc;
0x00008198 sw a0, 0x3c(sp) | *(var_3ch_3) = a0;
0x0000819c sw v1, 0x38(sp) | *(var_38h_2) = v1;
0x000081a0 jalr t9 | t9 ();
0x000081a4 addu s1, fp, s1 | s1 = fp + s1;
0x000081a8 lw gp, 0x18(sp) | gp = *(var_18h);
0x000081ac sw v0, 0x28(sp) | *(var_28h_3) = v0;
0x000081b0 move fp, zero | fp = 0;
0x000081b4 lw a1, (v0) | a1 = *(v0);
0x000081b8 lw v1, 0x38(sp) | v1 = *(var_38h_2);
0x000081bc lw a0, 0x3c(sp) | a0 = *(var_3ch_3);
0x000081c0 b 0x81cc |
| while (v0 == 0) {
0x000081c4 sw v1, 0x40(sp) | *(var_40h_2) = v1;
0x000081c8 lb a0, (v1) | a0 = *(v1);
| label_4:
0x000081cc sll a0, a0, 1 | a0 <<= 1;
0x000081d0 addu v0, a1, a0 | v0 = a1 + a0;
0x000081d4 move a0, v1 | a0 = v1;
0x000081d8 lhu v0, (v0) | v0 = *(v0);
0x000081dc andi v0, v0, 0x800 | v0 &= 0x800;
0x000081e0 addiu v1, v1, 1 | v1++;
0x000081e4 beqz v0, 0x81c4 |
| }
0x000081e8 sltu v0, a0, s1 | v0 = (a0 < s1) ? 1 : 0;
0x000081ec lw t9, -0x7d40(gp) | t9 = sym.imp.strtoul;
| if (v0 == 0) {
0x000081f0 beqz v0, 0x8294 | goto label_18;
| }
0x000081f4 addiu a2, zero, 0xa | a2 = 0xa;
0x000081f8 move a1, zero | a1 = 0;
0x000081fc jalr t9 | t9 ();
0x00008200 lw gp, 0x18(sp) | gp = *(var_18h);
0x00008204 lw a2, 0xb0(sp) | a2 = *(arg_b0h);
0x00008208 move a3, v0 | a3 = v0;
0x0000820c lw t9, -0x7f34(gp) | t9 = sym.proc_plist_remove_pid;
0x00008210 move a1, s5 | a1 = s5;
0x00008214 move a0, s4 | a0 = s4;
0x00008218 bal 0x90f4 | sym_proc_plist_remove_pid ();
0x0000821c lw v1, 0x28(sp) | v1 = *(var_28h_3);
0x00008220 lw v0, 0x40(sp) | v0 = *(var_40h_2);
0x00008224 lw a1, (v1) | a1 = *(v1);
0x00008228 lb v1, (v0) | v1 = *(v0);
0x0000822c sll v1, v1, 1 | v1 <<= 1;
0x00008230 addu v1, a1, v1 | v1 = a1 + v1;
0x00008234 lhu v1, (v1) | v1 = *(v1);
0x00008238 andi v1, v1, 0x800 | v1 &= 0x800;
0x0000823c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v1 == 0) {
0x00008240 beqz v1, 0x826c | goto label_20;
| }
0x00008244 addiu a0, v0, 1 | a0 = v0 + 1;
| do {
0x00008248 sw a0, 0x40(sp) | *(var_40h_2) = a0;
0x0000824c lb v1, (a0) | v1 = *(a0);
0x00008250 move v0, a0 | v0 = a0;
0x00008254 sll v1, v1, 1 | v1 <<= 1;
0x00008258 addu v1, a1, v1 | v1 = a1 + v1;
0x0000825c lhu v1, (v1) | v1 = *(v1);
0x00008260 andi v1, v1, 0x800 | v1 &= 0x800;
0x00008264 addiu a0, a0, 1 | a0++;
0x00008268 bnez v1, 0x8248 |
| } while (v1 != 0);
| label_20:
0x0000826c addiu v1, v0, 1 | v1 = v0 + 1;
0x00008270 sltu a0, v1, s1 | a0 = (v1 < s1) ? 1 : 0;
0x00008274 sw v1, 0x40(sp) | *(var_40h_2) = v1;
| if (a0 != 0) {
0x00008278 beqz a0, 0x8294 |
0x0000827c addiu fp, fp, 1 | fp++;
0x00008280 slt a0, s7, fp | a0 = (s7 < fp) ? 1 : 0;
0x00008284 lw s1, 0x30(sp) | s1 = *(var_30h_3);
| if (a0 == 0) {
0x00008288 bnel a0, zero, 0x8298 | goto label_21;
| }
0x0000828c lb a0, 1(v0) | a0 = *((v0 + 1));
0x00008290 b 0x81cc | goto label_4;
| }
| label_18:
0x00008294 lw s1, 0x30(sp) | s1 = *(var_30h_3);
| label_21:
0x00008298 lw a2, -0x7fdc(gp) | a2 = *(gp);
| if (s1 == 0) {
0x0000829c beqz s1, 0x7f94 | goto label_1;
| }
0x000082a0 lw v0, 0x34(sp) | v0 = *(var_34h_3);
0x000082a4 lw t9, -0x7e1c(gp) | t9 = sym.imp.snprintf;
0x000082a8 addiu a1, zero, 0x64 | a1 = 0x64;
| /* str.core */
0x000082ac addiu a2, a2, 0x55e8 | a2 += 0x55e8;
0x000082b0 subu a1, a1, v0 | __asm ("subu a1, a1, v0");
0x000082b4 addu a0, s3, v0 | a0 = s3 + v0;
0x000082b8 jalr t9 | t9 ();
0x000082bc lw gp, 0x18(sp) | gp = *(var_18h);
0x000082c0 lw a0, 0x24(sp) | a0 = *(var_24h);
0x000082c4 move a2, s1 | a2 = s1;
0x000082c8 lw t9, -0x7f98(gp) | t9 = sym.tar_addfile;
0x000082cc move a1, s3 | a1 = s3;
0x000082d0 bal 0xa580 | sym_tar_addfile ();
0x000082d4 lw gp, 0x18(sp) | gp = *(var_18h);
0x000082d8 lw a0, 0x4c(sp) | a0 = *(var_4ch);
0x000082dc lw t9, -0x7fa4(gp) | t9 = sym.safe_copyfd;
0x000082e0 lw a1, 0xa4(sp) | a1 = *(arg_a4h);
0x000082e4 bal 0xbec0 | sym_safe_copyfd ();
0x000082e8 move s4, v0 | s4 = v0;
0x000082ec lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == s1) {
0x000082f0 beq v0, s1, 0x83f4 | goto label_22;
| }
0x000082f4 lw s1, -0x7d38(gp) | s1 = *((gp - 8014));
0x000082f8 addiu v0, zero, -1 | v0 = -1;
0x000082fc lw s5, (s1) | s5 = *(s1);
| if (s4 == v0) {
0x00008300 bne s4, v0, 0x8320 |
0x00008304 lw t9, -0x7be4(gp) | t9 = sym.imp.__errno_location;
0x00008308 jalr t9 | t9 ();
0x0000830c nop |
0x00008310 lw v1, (v0) | v1 = *(v0);
0x00008314 addiu v0, zero, 0x20 | v0 = 0x20;
0x00008318 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v1 == v0) {
0x0000831c beq v1, v0, 0x8418 | goto label_23;
| }
| }
0x00008320 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x00008324 lw v0, 0x30(sp) | v0 = *(var_30h_3);
0x00008328 lw t9, -0x7c34(gp) | t9 = sym.imp.__fprintf_chk;
0x0000832c sw s0, 0x14(sp) | *(var_14h_2) = s0;
0x00008330 sw v0, 0x10(sp) | *(var_10h_3) = v0;
0x00008334 move a3, s4 | a3 = s4;
| /* str.WARNING:_err_d_clen_d_pid_d_n */
0x00008338 addiu a2, a2, 0x55f8 | a2 += 0x55f8;
0x0000833c addiu a1, zero, 1 | a1 = 1;
0x00008340 move a0, s5 | a0 = s5;
0x00008344 jalr t9 | t9 ();
0x00008348 lw gp, 0x18(sp) | gp = *(var_18h);
| label_9:
0x0000834c lw s4, -0x7fb8(gp) | s4 = *((gp - 8174));
0x00008350 lw t9, -0x7fa4(gp) | t9 = sym.safe_copyfd;
0x00008354 lw a0, 0x4c(sp) | a0 = *(var_4ch);
0x00008358 lw a1, -0x6970(s4) | a1 = *((s4 - 6748));
0x0000835c bal 0xbec0 | sym_safe_copyfd ();
0x00008360 lw gp, 0x18(sp) | gp = *(var_18h);
0x00008364 lw a0, (s1) | a0 = *(s1);
0x00008368 lw t9, -0x7be0(gp) | t9 = sym.imp.fileno;
0x0000836c lw s1, 0x44(sp) | s1 = *(var_44h);
0x00008370 jalr t9 | t9 ();
0x00008374 lw gp, 0x18(sp) | gp = *(var_18h);
0x00008378 move a1, v0 | a1 = v0;
0x0000837c lw t9, -0x7fa4(gp) | t9 = sym.safe_copyfd;
0x00008380 move a0, s1 | a0 = s1;
0x00008384 bal 0xbec0 | sym_safe_copyfd ();
0x00008388 lw gp, 0x18(sp) | gp = *(var_18h);
| label_7:
0x0000838c lw t9, -0x7f8c(gp) | t9 = sym.tar_fakewrite;
0x00008390 lw a1, 0x30(sp) | a1 = *(var_30h_3);
0x00008394 lw a0, 0x24(sp) | a0 = *(var_24h);
0x00008398 addiu s1, zero, 1 | s1 = 1;
0x0000839c bal 0xa820 | sym_tar_fakewrite ();
0x000083a0 lw gp, 0x18(sp) | gp = *(var_18h);
0x000083a4 b 0x7fb0 | goto label_5;
| label_16:
0x000083a8 lw t9, -0x7d90(gp) | t9 = sym.imp.close;
| if (s1 == 0) {
0x000083ac beqz s1, 0x8018 | goto label_6;
| }
0x000083b0 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x000083b4 lw v0, 0x34(sp) | v0 = *(var_34h_3);
0x000083b8 lw t9, -0x7e1c(gp) | t9 = sym.imp.snprintf;
0x000083bc addiu a1, zero, 0x64 | a1 = 0x64;
| /* str.fdmap */
0x000083c0 addiu a2, a2, 0x5630 | a2 += 0x5630;
0x000083c4 subu a1, a1, v0 | __asm ("subu a1, a1, v0");
0x000083c8 addu a0, s3, v0 | a0 = s3 + v0;
0x000083cc jalr t9 | t9 ();
0x000083d0 lw gp, 0x18(sp) | gp = *(var_18h);
0x000083d4 lw a3, 0xa4(sp) | a3 = *(arg_a4h);
0x000083d8 lw a0, 0x24(sp) | a0 = *(var_24h);
0x000083dc lw t9, -0x7f30(gp) | t9 = sym.proc_append_fdmap;
0x000083e0 move a2, s0 | a2 = s0;
0x000083e4 move a1, s3 | a1 = s3;
0x000083e8 bal 0x9e68 | sym_proc_append_fdmap ();
0x000083ec lw gp, 0x18(sp) | gp = *(var_18h);
0x000083f0 b 0x8014 | goto label_2;
| label_22:
0x000083f4 lw s4, -0x7fb8(gp) | s4 = *((gp - 8174));
0x000083f8 b 0x838c | goto label_7;
| label_13:
0x000083fc addiu v0, zero, 0x5a | v0 = 0x5a;
0x00008400 move s7, zero | s7 = 0;
0x00008404 sw v0, 0x20(sp) | *(var_20h_3) = v0;
0x00008408 move fp, s3 | fp = s3;
0x0000840c move a2, zero | a2 = 0;
0x00008410 move a1, s3 | a1 = s3;
0x00008414 b 0x7eb4 | goto label_8;
| label_23:
0x00008418 lw a0, -0x7fdc(gp) | a0 = *(gp);
0x0000841c lw t9, -0x7d94(gp) | t9 = sym.imp.fwrite;
0x00008420 move a3, s5 | a3 = s5;
0x00008424 addiu a2, zero, 7 | a2 = 7;
0x00008428 addiu a1, zero, 1 | a1 = 1;
| /* str.ABORT__n */
0x0000842c addiu a0, a0, 0x55f0 | a0 += 0x55f0;
0x00008430 jalr t9 | t9 ();
0x00008434 addiu s2, zero, 0x20 | s2 = 0x20;
0x00008438 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000843c b 0x834c | goto label_9;
| label_17:
0x00008440 lw t9, -0x7db0(gp) | t9 = sym.imp.__stack_chk_fail;
0x00008444 jalr t9 | t9 ();
0x00008448 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/dbox @ 0xa580 */
| #include <stdint.h>
|
; (fcn) sym.tar_addfile () | void tar_addfile () {
0x0000a580 lui gp, 2 |
0x0000a584 addiu gp, gp, 0x6af0 |
0x0000a588 addu gp, gp, t9 | gp += t9;
0x0000a58c addiu sp, sp, -0x248 |
0x0000a590 lw t9, -0x7c90(gp) | t9 = sym.imp.memset;
0x0000a594 sw s2, 0x234(sp) | *(var_234h) = s2;
0x0000a598 lw s2, -0x7d68(gp) | s2 = *((gp - 8026));
0x0000a59c sw s1, 0x230(sp) | *(var_230h) = s1;
0x0000a5a0 sw s0, 0x22c(sp) | *(var_22ch) = s0;
0x0000a5a4 lw v0, (s2) | v0 = *(s2);
0x0000a5a8 move s0, a0 | s0 = a0;
0x0000a5ac addiu s1, sp, 0x24 | s1 = sp + 0x24;
0x0000a5b0 sw gp, 0x18(sp) | *(var_18h) = gp;
0x0000a5b4 sw s5, 0x240(sp) | *(var_240h) = s5;
0x0000a5b8 sw s4, 0x23c(sp) | *(var_23ch) = s4;
0x0000a5bc sw s3, 0x238(sp) | *(var_238h) = s3;
0x0000a5c0 sw ra, 0x244(sp) | *(var_244h) = ra;
0x0000a5c4 move s3, a1 | s3 = a1;
0x0000a5c8 move s4, a2 | s4 = a2;
0x0000a5cc move a1, zero | a1 = 0;
0x0000a5d0 addiu a2, zero, 0x200 | a2 = 0x200;
0x0000a5d4 move a0, s1 | a0 = s1;
0x0000a5d8 sw v0, 0x224(sp) | *(var_224h) = v0;
0x0000a5dc jalr t9 | t9 ();
0x0000a5e0 nop |
0x0000a5e4 lw s5, (s0) | s5 = *(s0);
0x0000a5e8 lw gp, 0x18(sp) | gp = *(var_18h);
| if (s5 == 0) {
0x0000a5ec beqz s5, 0xa80c | goto label_1;
| }
0x0000a5f0 lw t9, -0x7d44(gp) | t9 = sym.imp.strlen;
0x0000a5f4 move a0, s5 | a0 = s5;
0x0000a5f8 jalr t9 | t9 ();
0x0000a5fc lw gp, 0x18(sp) | gp = *(var_18h);
0x0000a600 move a1, s5 | a1 = s5;
0x0000a604 addiu a3, zero, 0x200 | a3 = 0x200;
0x0000a608 lw t9, -0x7d1c(gp) | t9 = sym.imp.__mempcpy_chk;
0x0000a60c move a2, v0 | a2 = v0;
0x0000a610 move a0, s1 | a0 = s1;
0x0000a614 jalr t9 | t9 ();
0x0000a618 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000a61c move s5, v0 | s5 = v0;
| label_0:
0x0000a620 lw t9, -0x7d44(gp) | t9 = sym.imp.strlen;
0x0000a624 move a0, s3 | a0 = s3;
0x0000a628 jalr t9 | t9 ();
0x0000a62c lw gp, 0x18(sp) | gp = *(var_18h);
0x0000a630 move a2, v0 | a2 = v0;
0x0000a634 move a1, s3 | a1 = s3;
0x0000a638 lw t9, -0x7d3c(gp) | t9 = sym.imp.memcpy;
0x0000a63c move a0, s5 | a0 = s5;
0x0000a640 jalr t9 | t9 ();
0x0000a644 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000a648 sw s4, 0x10(sp) | *(var_10h) = s4;
0x0000a64c lw a0, -0x7fdc(gp) | a0 = *(gp);
0x0000a650 lw v0, -0x7fdc(gp) | v0 = *(gp);
| /* str.0000644 */
0x0000a654 addiu a1, a0, 0x5850 | a1 = a0 + 0x5850;
| /* str.0000100 */
0x0000a658 addiu a2, v0, 0x585c | a2 = v0 + 0x585c;
0x0000a65c lw v1, 0x585c(v0) | v1 = *((v0 + 5655));
0x0000a660 lw t0, 4(a1) | t0 = *((a1 + 1));
0x0000a664 lw t1, 0x5850(a0) | t1 = *((a0 + 5652));
0x0000a668 lw v0, 4(a2) | v0 = *((a2 + 1));
0x0000a66c lw a3, -0x7fdc(gp) | a3 = *(gp);
0x0000a670 lw t9, -0x7df8(gp) | t9 = sym.imp.__sprintf_chk
0x0000a674 sw t0, 0x8c(sp) | *(var_8ch) = t0;
0x0000a678 sw v1, 0x90(sp) | *(var_90h) = v1;
0x0000a67c sw v1, 0x98(sp) | *(var_98h) = v1;
| /* str._11.11lo */
0x0000a680 addiu a3, a3, 0x5870 | a3 += 0x5870;
0x0000a684 addiu a2, zero, 0xc | a2 = 0xc;
0x0000a688 addiu a1, zero, 1 | a1 = 1;
0x0000a68c sw t1, 0x88(sp) | *(var_88h) = t1;
0x0000a690 addiu a0, sp, 0xa0 | a0 = sp + 0xa0;
0x0000a694 sw v0, 0x94(sp) | *(var_94h) = v0;
0x0000a698 sw v0, 0x9c(sp) | *(var_9ch) = v0;
0x0000a69c jalr t9 | t9 ();
0x0000a6a0 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000a6a4 lw t9, -0x7d98(gp) | t9 = sym.imp.time;
0x0000a6a8 move a0, zero | a0 = 0;
0x0000a6ac jalr t9 | t9 ();
0x0000a6b0 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000a6b4 addiu a2, zero, 0xc | a2 = 0xc;
0x0000a6b8 addiu a1, zero, 1 | a1 = 1;
0x0000a6bc lw a3, -0x7fdc(gp) | a3 = *(gp);
0x0000a6c0 lw t9, -0x7df8(gp) | t9 = sym.imp.__sprintf_chk
| /* str._11.11o */
0x0000a6c4 addiu a3, a3, 0x587c | a3 += 0x587c;
0x0000a6c8 addiu a0, sp, 0xac | a0 = sp + 0xac;
0x0000a6cc sw v0, 0x10(sp) | *(var_10h) = v0;
0x0000a6d0 jalr t9 | t9 ();
0x0000a6d4 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000a6d8 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x0000a6dc lw v1, -0x7fdc(gp) | v1 = *(gp);
| /* str.ustar */
0x0000a6e0 addiu a1, v0, 0x5884 | a1 = v0 + 0x5884;
0x0000a6e4 lw a0, 0x5884(v0) | a0 = *((v0 + 5665));
0x0000a6e8 lw a2, 0x588c(v1) | a2 = *((v1 + 5667));
0x0000a6ec addiu v0, sp, 0x125 | v0 = sp + 0x125;
| /* str.admin */
0x0000a6f0 addiu v1, v1, 0x588c | v1 += 0x588c;
0x0000a6f4 lbu a1, 4(a1) | a1 = *((a1 + 4));
0x0000a6f8 swl a0, 0x128(sp) | __asm ("swl a0, (var_128h)");
0x0000a6fc swr a0, (v0) | __asm ("swr a0, (v0)");
0x0000a700 lbu t0, 4(v1) | t0 = *((v1 + 4));
0x0000a704 sb a1, 4(v0) | *((v0 + 4)) = a1;
0x0000a708 addiu a0, zero, 0x20 | a0 = 0x20;
0x0000a70c addiu v0, sp, 0x12d | v0 = sp + 0x12d;
0x0000a710 lbu a3, 5(v1) | a3 = *((v1 + 5));
0x0000a714 sb a0, 0x12c(sp) | *(var_12ch) = a0;
0x0000a718 sb a0, 0x12b(sp) | *(var_12bh) = a0;
0x0000a71c swl a2, 0x130(sp) | __asm ("swl a2, (var_130h)");
0x0000a720 swr a2, (v0) | __asm ("swr a2, (v0)");
0x0000a724 sb t0, 4(v0) | *((v0 + 4)) = t0;
0x0000a728 sb a3, 5(v0) | *((v0 + 5)) = a3;
0x0000a72c addiu v0, sp, 0x14d | v0 = sp + 0x14d;
0x0000a730 swl a2, 0x150(sp) | __asm ("swl a2, (var_150h)");
0x0000a734 addiu a0, sp, 0xb8 | a0 = sp + 0xb8;
0x0000a738 lui a1, 0x2020 | a1 = 0x20200000;
0x0000a73c swr a2, (v0) | __asm ("swr a2, (v0)");
0x0000a740 addiu a1, a1, 0x2020 | a1 += 0x2020;
0x0000a744 sb t0, 4(v0) | *((v0 + 4)) = t0;
0x0000a748 sb a3, 5(v0) | *((v0 + 5)) = a3;
0x0000a74c addiu v0, zero, 0x30 | v0 = 0x30;
0x0000a750 sb v0, 0xc0(sp) | *(var_c0h) = v0;
0x0000a754 sw a1, 0xb8(sp) | *(var_b8h) = a1;
0x0000a758 move v1, zero | v1 = 0;
0x0000a75c sw a1, 4(a0) | *((a0 + 1)) = a1;
0x0000a760 move v0, s1 | v0 = s1;
0x0000a764 addiu a2, sp, 0x224 | a2 = sp + aav.0x00000224;
| do {
0x0000a768 addiu v0, v0, 1 | v0++;
0x0000a76c lbu a1, -1(v0) | a1 = *((v0 - 1));
0x0000a770 addu v1, v1, a1 | v1 += a1;
0x0000a774 bne v0, a2, 0xa768 |
| } while (v0 != a2);
0x0000a778 lui v0, 1 | v0 = 0x1fe00;
0x0000a77c ori v0, v0, 0xfe00 |
0x0000a780 slt a1, v1, v0 | a1 = (v1 < v0) ? 1 : 0;
0x0000a784 lw a3, -0x7fdc(gp) | a3 = *(gp);
| if (a1 != 0) {
0x0000a788 movz v1, v0, a1 | v1 = v0;
| }
0x0000a78c lw t9, -0x7df8(gp) | t9 = sym.imp.__sprintf_chk
0x0000a790 sw v1, 0x10(sp) | *(var_10h) = v1;
| /* str._6.6o */
0x0000a794 addiu a3, a3, 0x5894 | a3 += 0x5894;
0x0000a798 addiu a2, zero, 8 | a2 = 8;
0x0000a79c addiu a1, zero, 1 | a1 = 1;
0x0000a7a0 jalr t9 | t9 ();
0x0000a7a4 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000a7a8 lw a0, 8(s0) | a0 = *((s0 + 2));
0x0000a7ac lw t9, -0x7fdc(gp) | t9 = *(gp);
0x0000a7b0 addiu t9, t9, -0x5bc0 | t9 += -0x5bc0;
0x0000a7b4 addiu a1, s0, 0xc | a1 = s0 + 0xc;
0x0000a7b8 bal 0xa440 | fcn_0000a440 ();
0x0000a7bc lw gp, 0x18(sp) | gp = *(var_18h);
0x0000a7c0 lw a0, 8(s0) | a0 = *((s0 + 2));
0x0000a7c4 addiu a2, zero, 0x200 | a2 = 0x200;
0x0000a7c8 lw t9, -0x7fac(gp) | t9 = sym.safe_write;
0x0000a7cc move a1, s1 | a1 = s1;
0x0000a7d0 bal 0xbddc | sym_safe_write ();
0x0000a7d4 lw v1, 0x224(sp) | v1 = *(var_224h);
0x0000a7d8 lw v0, (s2) | v0 = *(s2);
0x0000a7dc lw gp, 0x18(sp) | gp = *(var_18h);
0x0000a7e0 sw zero, 0xc(s0) | *((s0 + 3)) = 0;
| if (v1 == v0) {
0x0000a7e4 bne v1, v0, 0xa814 |
0x0000a7e8 lw ra, 0x244(sp) | ra = *(var_244h);
0x0000a7ec lw s5, 0x240(sp) | s5 = *(var_240h);
0x0000a7f0 lw s4, 0x23c(sp) | s4 = *(var_23ch);
0x0000a7f4 lw s3, 0x238(sp) | s3 = *(var_238h);
0x0000a7f8 lw s2, 0x234(sp) | s2 = *(var_234h);
0x0000a7fc lw s1, 0x230(sp) | s1 = *(var_230h);
0x0000a800 lw s0, 0x22c(sp) | s0 = *(var_22ch);
0x0000a804 addiu sp, sp, 0x248 |
0x0000a808 jr ra | return v1;
| label_1:
0x0000a80c move s5, s1 | s5 = s1;
0x0000a810 b 0xa620 | goto label_0;
| }
0x0000a814 lw t9, -0x7db0(gp) | t9 = sym.imp.__stack_chk_fail;
0x0000a818 jalr t9 | t9 ();
0x0000a81c nop |
| }
[*] Function sprintf used 6 times dbox