[*] Binary protection state of logsave
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function sprintf tear down of logsave
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/logsave @ 0xae0 */
| #include <stdint.h>
|
; (fcn) main () | int32_t main () {
| /* [13] -r-x section size 3632 named .text */
0x00000ae0 lui gp, 2 |
0x00000ae4 addiu gp, gp, -0x6ac0 |
0x00000ae8 addu gp, gp, t9 | gp += t9;
0x00000aec lw v0, -0x7f44(gp) | v0 = *((gp - 8145));
0x00000af0 addiu sp, sp, -0x150 |
0x00000af4 lw v0, (v0) | v0 = *(v0);
0x00000af8 sw s3, 0x134(sp) | *(var_134h) = s3;
0x00000afc lw s3, -0x7fd8(gp) | s3 = *((gp - 8182));
0x00000b00 sw gp, 0x18(sp) | *(var_18h) = gp;
0x00000b04 sw s7, 0x144(sp) | *(var_144h) = s7;
0x00000b08 sw s6, 0x140(sp) | *(var_140h) = s6;
0x00000b0c sw s5, 0x13c(sp) | *(var_13ch) = s5;
0x00000b10 sw s4, 0x138(sp) | *(var_138h) = s4;
0x00000b14 sw s2, 0x130(sp) | *(var_130h) = s2;
0x00000b18 sw s1, 0x12c(sp) | *(var_12ch) = s1;
0x00000b1c sw s0, 0x128(sp) | *(var_128h) = s0;
0x00000b20 sw ra, 0x14c(sp) | *(var_14ch) = ra;
0x00000b24 sw fp, 0x148(sp) | *(var_148h) = fp;
0x00000b28 move s4, a0 | s4 = a0;
0x00000b2c move s1, a1 | s1 = a1;
0x00000b30 sw v0, 0x124(sp) | *(var_124h) = v0;
0x00000b34 addiu s2, zero, 1 | s2 = 1;
0x00000b38 addiu s0, zero, 0x301 | s0 = 0x301;
0x00000b3c addiu s3, s3, 0x1b28 | s3 += str.asv;
0x00000b40 lw s7, -0x7fdc(gp) | s7 = *((gp - 8183));
0x00000b44 addiu s6, zero, 1 | s6 = 1;
0x00000b48 lw s5, -0x7fdc(gp) | s5 = *((gp - 8183));
0x00000b4c b 0xb58 |
| while (v0 != v1) {
0x00000b50 addiu v1, zero, 0x109 | v1 = 0x109;
| if (v0 != 0) {
0x00000b54 movz s0, v1, v0 | s0 = v1;
| }
| label_0:
0x00000b58 lw t9, -0x7f90(gp) | t9 = sym.imp.getopt;
0x00000b5c move a2, s3 | a2 = s3;
0x00000b60 move a1, s1 | a1 = s1;
0x00000b64 move a0, s4 | a0 = s4;
0x00000b68 jalr t9 | t9 ();
0x00000b6c addiu v1, zero, -1 | v1 = -1;
0x00000b70 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == v1) {
0x00000b74 beq v0, v1, 0xba8 | goto label_7;
| }
0x00000b78 addiu v1, zero, 0x73 | v1 = 0x73;
0x00000b7c addiu v1, zero, 0x76 | v1 = 0x76;
| if (v0 == v1) {
0x00000b80 beq v0, v1, 0xba0 | goto label_8;
| }
0x00000b84 xori v0, v0, 0x61 | v0 ^= 0x61;
0x00000b88 bne v0, v1, 0xb50 |
| }
0x00000b8c lw v0, 0x2118(s5) | v0 = *((s5 + 2118));
0x00000b90 addiu s2, zero, 3 | s2 = 3;
0x00000b94 addiu v0, v0, 1 | v0++;
0x00000b98 sw v0, 0x2118(s5) | *((s5 + 2118)) = v0;
0x00000b9c b 0xb58 | goto label_0;
| label_8:
0x00000ba0 sw s6, 0x2114(s7) | *((s7 + 2117)) = s6;
0x00000ba4 b 0xb58 | goto label_0;
| label_7:
0x00000ba8 lw v1, -0x7f54(gp) | v1 = *((gp - 8149));
0x00000bac lw v0, (v1) | v0 = *(v1);
0x00000bb0 addiu a3, v0, 1 | a3 = v0 + 1;
| if (v0 == s4) {
0x00000bb4 beq v0, s4, 0xed0 | goto label_9;
| }
0x00000bb8 sll v0, v0, 2 | v0 <<= 2;
| if (a3 == s4) {
0x00000bbc beq a3, s4, 0xed0 | goto label_9;
| }
0x00000bc0 addiu a0, v0, 4 | a0 = v0 + 4;
0x00000bc4 lwx v0, v0(s1) | __asm ("lwx v0, v0(s1)");
0x00000bc8 lw t9, -0x7f78(gp) | t9 = sym.imp.open;
0x00000bcc addiu a2, zero, 0x1a4 | a2 = 0x1a4;
0x00000bd0 sw a3, (v1) | *(v1) = a3;
0x00000bd4 addu s1, s1, a0 | s1 += a0;
0x00000bd8 move a1, s0 | a1 = s0;
0x00000bdc move a0, v0 | a0 = v0;
0x00000be0 lw s6, -0x7fdc(gp) | s6 = *((gp - 8183));
0x00000be4 sw v0, 0x24(sp) | *(var_24h) = v0;
0x00000be8 jalr t9 | t9 ();
0x00000bec lw gp, 0x18(sp) | gp = *(var_18h);
0x00000bf0 lw a0, (s1) | a0 = *(s1);
0x00000bf4 sw v0, 0x2014(s6) | *((s6 + 2053)) = v0;
0x00000bf8 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00000bfc lw t9, -0x7f2c(gp) | t9 = sym.imp.strcmp;
0x00000c00 addiu a1, a1, 0x1b54 | a1 += 0x1b54;
0x00000c04 jalr t9 | t9 ();
0x00000c08 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000c0c move s5, v0 | s5 = v0;
0x00000c10 move a2, s2 | a2 = s2;
0x00000c14 lw s3, -0x7fd8(gp) | s3 = *((gp - 8182));
0x00000c18 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x00000c1c addiu s3, s3, 0x149c | s3 += fcn.0000149c;
0x00000c20 move a1, zero | a1 = 0;
0x00000c24 move t9, s3 | t9 = s3;
0x00000c28 addiu a0, a0, 0x1b58 | a0 += str.Log_of_;
0x00000c2c bal 0x149c | fcn_0000149c ();
0x00000c30 lw gp, 0x18(sp) | gp = *(var_18h);
| if (s5 == 0) {
0x00000c34 beqz s5, 0xef8 | goto label_10;
| }
0x00000c38 lw a0, (s1) | a0 = *(s1);
0x00000c3c move s4, s1 | s4 = s1;
| if (a0 == 0) {
0x00000c40 beqz a0, 0xc80 | goto label_11;
| }
0x00000c44 lw s5, -0x7fd8(gp) | s5 = *((gp - 8182));
0x00000c48 addiu s5, s5, 0x1b68 | s5 += 0x1b68;
| do {
0x00000c4c move a2, s2 | a2 = s2;
0x00000c50 move a1, zero | a1 = 0;
0x00000c54 move t9, s3 | t9 = s3;
0x00000c58 addiu s4, s4, 4 | s4 += 4;
0x00000c5c bal 0x149c | fcn_0000149c ();
0x00000c60 move a0, s5 | a0 = s5;
0x00000c64 move a2, s2 | a2 = s2;
0x00000c68 move t9, s3 | t9 = s3;
0x00000c6c move a1, zero | a1 = 0;
0x00000c70 bal 0x149c | fcn_0000149c ();
0x00000c74 lw a0, (s4) | a0 = *(s4);
0x00000c78 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000c7c bnez a0, 0xc4c |
| } while (a0 != 0);
| label_11:
0x00000c80 lw s7, -0x7fd8(gp) | s7 = *((gp - 8182));
0x00000c84 move a2, s2 | a2 = s2;
0x00000c88 move a1, zero | a1 = 0;
0x00000c8c move t9, s3 | t9 = s3;
0x00000c90 addiu a0, s7, 0x1bcc | a0 = s7 + 0x1bcc;
0x00000c94 bal 0x149c | fcn_0000149c ();
0x00000c98 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000c9c lw t9, -0x7f48(gp) | t9 = sym.imp.time;
0x00000ca0 move a0, zero | a0 = 0;
0x00000ca4 jalr t9 | t9 ();
0x00000ca8 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000cac addiu v1, sp, 0x34 | v1 = sp + 0x34;
0x00000cb0 move a0, v1 | a0 = v1;
0x00000cb4 lw t9, -0x7f50(gp) | t9 = sym.imp.ctime;
0x00000cb8 sw v1, 0x28(sp) | *(var_28h) = v1;
0x00000cbc sw v0, 0x34(sp) | *(var_34h) = v0;
0x00000cc0 jalr t9 | t9 ();
0x00000cc4 move a0, v0 | a0 = v0;
0x00000cc8 move a2, s2 | a2 = s2;
0x00000ccc move t9, s3 | t9 = s3;
0x00000cd0 move a1, zero | a1 = 0;
0x00000cd4 bal 0x149c | fcn_0000149c ();
0x00000cd8 move a2, s2 | a2 = s2;
0x00000cdc move a1, zero | a1 = 0;
0x00000ce0 move t9, s3 | t9 = s3;
0x00000ce4 addiu a0, s7, 0x1bcc | a0 = s7 + 0x1bcc;
0x00000ce8 bal 0x149c | fcn_0000149c ();
0x00000cec lw gp, 0x18(sp) | gp = *(var_18h);
0x00000cf0 lw t9, -0x7f9c(gp) | t9 = sym.imp.pipe;
0x00000cf4 addiu a0, sp, 0x3c | a0 = sp + 0x3c;
0x00000cf8 jalr t9 | t9 ();
0x00000cfc lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 < 0) {
0x00000d00 bltz v0, 0x1188 | goto label_12;
| }
0x00000d04 lw t9, -0x7f94(gp) | t9 = sym.imp.memset;
0x00000d08 addiu s4, sp, 0x44 | s4 = sp + 0x44;
0x00000d0c addiu a2, zero, 0x90 | a2 = 0x90;
0x00000d10 move a1, zero | a1 = 0;
0x00000d14 move a0, s4 | a0 = s4;
0x00000d18 jalr t9 | t9 ();
0x00000d1c lw gp, 0x18(sp) | gp = *(var_18h);
0x00000d20 move a2, zero | a2 = 0;
0x00000d24 move a1, s4 | a1 = s4;
0x00000d28 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
0x00000d2c lw t9, -0x7fa8(gp) | t9 = sym.imp.sigaction;
0x00000d30 addiu v0, v0, 0x1380 | v0 += 0x1380;
0x00000d34 addiu a0, zero, 2 | a0 = 2;
0x00000d38 sw v0, 0x48(sp) | *(var_48h) = v0;
0x00000d3c jalr t9 | t9 ();
0x00000d40 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000d44 move a2, zero | a2 = 0;
0x00000d48 move a1, s4 | a1 = s4;
0x00000d4c lw t9, -0x7fa8(gp) | t9 = sym.imp.sigaction;
0x00000d50 addiu a0, zero, 0xf | a0 = 0xf;
0x00000d54 jalr t9 | t9 ();
0x00000d58 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000d5c lui v0, 0x1000 | v0 = 0x10000000;
0x00000d60 lw t9, -0x7fa4(gp) | t9 = sym.imp.fork;
0x00000d64 sw v0, 0x44(sp) | *(var_44h) = v0;
0x00000d68 jalr t9 | t9 ();
0x00000d6c move s5, v0 | s5 = v0;
0x00000d70 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 < 0) {
0x00000d74 bltz v0, 0x1198 | goto label_13;
| }
0x00000d78 lw a0, 0x40(sp) | a0 = *(var_40h);
| if (v0 == 0) {
0x00000d7c beqz v0, 0x11a8 | goto label_14;
| }
0x00000d80 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00000d84 lw t9, -0x7fb0(gp) | t9 = sym.imp.close;
0x00000d88 sw v0, 0x2c(sp) | *(var_2ch) = v0;
0x00000d8c sw s5, 0x2010(v0) | *((v0 + 2052)) = s5;
0x00000d90 jalr t9 | t9 ();
0x00000d94 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000d98 addiu fp, sp, 0x38 | fp = sp + 0x38;
0x00000d9c lw s4, -0x7fd8(gp) | s4 = *((gp - 8182));
0x00000da0 addiu s4, s4, 0x16bc | s4 += fcn.000016bc;
0x00000da4 b 0xdb8 |
| while (v0 == 0) {
0x00000da8 move t9, s4 | t9 = s4;
0x00000dac bal 0x16bc | fcn_000016bc ();
0x00000db0 nop |
0x00000db4 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000db8 lw t9, -0x7f64(gp) | t9 = sym.imp.waitpid;
0x00000dbc move a0, s5 | a0 = s5;
0x00000dc0 addiu a2, zero, 1 | a2 = 1;
0x00000dc4 move a1, fp | a1 = fp;
0x00000dc8 jalr t9 | t9 ();
0x00000dcc lw a0, 0x3c(sp) | a0 = *(var_3ch);
0x00000dd0 beqz v0, 0xda8 |
| }
0x00000dd4 lw v1, 0x2c(sp) | v1 = *(var_2ch);
0x00000dd8 addiu v0, zero, -1 | v0 = -1;
0x00000ddc move t9, s4 | t9 = s4;
0x00000de0 sw v0, 0x2010(v1) | *((v1 + 2052)) = v0;
0x00000de4 bal 0x16bc | fcn_000016bc ();
0x00000de8 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000dec lw t9, -0x7fb0(gp) | t9 = sym.imp.close;
0x00000df0 lw a0, 0x3c(sp) | a0 = *(var_3ch);
0x00000df4 jalr t9 | t9 ();
0x00000df8 lw s5, 0x38(sp) | s5 = *(var_38h);
0x00000dfc andi v0, s5, 0x7f | v0 = s5 & 0x7f;
| if (v0 == 0) {
0x00000e00 beql v0, zero, 0xfb4 | goto label_15;
| }
0x00000e04 ext s5, s5, 8, 8 | __asm ("ext s5, s5, 8, 8");
0x00000e08 addiu v0, v0, 1 | v0++;
0x00000e0c seb v0, v0 | __asm ("seb v0, v0");
0x00000e10 sra v0, v0, 1 | v0 >>= 1;
| if (v0 > 0) {
0x00000e14 bgtzl v0, 0x1128 | goto label_16;
| }
0x00000e18 lw a0, (s1) | a0 = *(s1);
0x00000e1c move s5, zero | s5 = 0;
0x00000e20 move a2, s2 | a2 = s2;
| label_1:
0x00000e24 move a1, zero | a1 = 0;
0x00000e28 move t9, s3 | t9 = s3;
0x00000e2c addiu a0, s7, 0x1bcc | a0 = s7 + 0x1bcc;
0x00000e30 bal 0x149c | fcn_0000149c ();
0x00000e34 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000e38 lw t9, -0x7f48(gp) | t9 = sym.imp.time;
0x00000e3c move a0, zero | a0 = 0;
0x00000e40 jalr t9 | t9 ();
0x00000e44 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000e48 lw a0, 0x28(sp) | a0 = *(var_28h);
0x00000e4c lw t9, -0x7f50(gp) | t9 = sym.imp.ctime;
0x00000e50 sw v0, 0x34(sp) | *(var_34h) = v0;
0x00000e54 jalr t9 | t9 ();
0x00000e58 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000e5c move a0, v0 | a0 = v0;
0x00000e60 move a2, s2 | a2 = s2;
0x00000e64 move t9, s3 | t9 = s3;
0x00000e68 lw s1, -0x7fdc(gp) | s1 = *((gp - 8183));
0x00000e6c move a1, zero | a1 = 0;
0x00000e70 bal 0x149c | fcn_0000149c ();
0x00000e74 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000e78 move a2, s2 | a2 = s2;
0x00000e7c move a1, zero | a1 = 0;
0x00000e80 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x00000e84 move t9, s3 | t9 = s3;
0x00000e88 addiu a0, a0, 0x1bbc | a0 += str._________________n;
0x00000e8c bal 0x149c | fcn_0000149c ();
0x00000e90 lw v0, 0x211c(s1) | v0 = *((s1 + 2119));
0x00000e94 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00000e98 beqz v0, 0x109c | goto label_17;
| }
0x00000e9c lw t9, -0x7fa4(gp) | t9 = sym.imp.fork;
0x00000ea0 jalr t9 | t9 ();
0x00000ea4 nop |
0x00000ea8 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 < 0) {
0x00000eac bltz v0, 0x10e8 | goto label_18;
| }
0x00000eb0 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| if (v0 == 0) {
0x00000eb4 beqz v0, 0x1028 | goto label_19;
| }
0x00000eb8 lw v0, 0x2118(v0) | v0 = *((v0 + 2118));
0x00000ebc lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
| if (v0 == 0) {
0x00000ec0 bnel v0, zero, 0x110c | goto label_20;
| }
| label_4:
0x00000ec4 lw t9, -0x7f70(gp) | t9 = sym.imp.exit;
| label_3:
0x00000ec8 move a0, s5 | a0 = s5;
0x00000ecc jalr t9 | t9 ();
| label_9:
0x00000ed0 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00000ed4 lw t9, -0x7fa0(gp) | t9 = sym.imp.__printf_chk;
0x00000ed8 lw a2, (s1) | a2 = *(s1);
0x00000edc addiu a0, zero, 1 | a0 = 1;
0x00000ee0 addiu a1, a1, 0x1b30 | a1 += str.Usage:__s___asv__logfile_program_n;
0x00000ee4 jalr t9 | t9 ();
0x00000ee8 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000eec lw t9, -0x7f70(gp) | t9 = sym.imp.exit;
0x00000ef0 addiu a0, zero, 1 | a0 = 1;
0x00000ef4 jalr t9 | t9 ();
| label_10:
0x00000ef8 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x00000efc lw s7, -0x7fd8(gp) | s7 = *((gp - 8182));
0x00000f00 move a2, s2 | a2 = s2;
0x00000f04 move a1, zero | a1 = 0;
0x00000f08 move t9, s3 | t9 = s3;
0x00000f0c addiu a0, a0, 0x1b60 | a0 += str.stdin;
0x00000f10 bal 0x149c | fcn_0000149c ();
0x00000f14 move a2, s2 | a2 = s2;
0x00000f18 move a1, zero | a1 = 0;
0x00000f1c move t9, s3 | t9 = s3;
0x00000f20 addiu a0, s7, 0x1bcc | a0 = s7 + 0x1bcc;
0x00000f24 bal 0x149c | fcn_0000149c ();
0x00000f28 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000f2c move a0, zero | a0 = 0;
0x00000f30 move s1, zero | s1 = 0;
0x00000f34 lw t9, -0x7f48(gp) | t9 = sym.imp.time;
0x00000f38 addiu fp, zero, 0xb | fp = 0xb;
0x00000f3c jalr t9 | t9 ();
0x00000f40 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000f44 addiu v1, sp, 0x34 | v1 = sp + 0x34;
0x00000f48 move a0, v1 | a0 = v1;
0x00000f4c lw t9, -0x7f50(gp) | t9 = sym.imp.ctime;
0x00000f50 sw v1, 0x28(sp) | *(var_28h) = v1;
0x00000f54 sw v0, 0x34(sp) | *(var_34h) = v0;
0x00000f58 jalr t9 | t9 ();
0x00000f5c move a0, v0 | a0 = v0;
0x00000f60 move a2, s2 | a2 = s2;
0x00000f64 move t9, s3 | t9 = s3;
0x00000f68 move a1, zero | a1 = 0;
0x00000f6c bal 0x149c | fcn_0000149c ();
0x00000f70 move a2, s2 | a2 = s2;
0x00000f74 move a1, zero | a1 = 0;
0x00000f78 move t9, s3 | t9 = s3;
0x00000f7c addiu a0, s7, 0x1bcc | a0 = s7 + 0x1bcc;
0x00000f80 bal 0x149c | fcn_0000149c ();
0x00000f84 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000f88 lw s4, -0x7fd8(gp) | s4 = *((gp - 8182));
0x00000f8c addiu s4, s4, 0x16bc | s4 += fcn.000016bc;
| do {
| label_2:
0x00000f90 move t9, s4 | t9 = s4;
0x00000f94 move a0, zero | a0 = 0;
0x00000f98 bal 0x16bc | fcn_000016bc ();
0x00000f9c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00000fa0 beqz v0, 0x1014 | goto label_5;
| }
0x00000fa4 lw t9, -0x7f98(gp) | t9 = sym.imp.__errno_location;
| if (v0 < 0) {
0x00000fa8 bltz v0, 0x10bc | goto label_21;
| }
0x00000fac move s1, zero | s1 = 0;
0x00000fb0 b 0xf90 |
| } while (1);
| if (s5 == 0) {
| label_15:
0x00000fb4 beql s5, zero, 0xe24 | goto label_1;
| }
0x00000fb8 move a2, s2 | a2 = s2;
0x00000fbc lw a0, (s1) | a0 = *(s1);
0x00000fc0 addiu a2, zero, 3 | a2 = 3;
0x00000fc4 move t9, s3 | t9 = s3;
0x00000fc8 move a1, zero | a1 = 0;
0x00000fcc bal 0x149c | fcn_0000149c ();
0x00000fd0 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000fd4 addiu s1, sp, 0xd4 | s1 = sp + 0xd4;
0x00000fd8 addiu a2, zero, 0x50 | a2 = 0x50;
0x00000fdc lw a3, -0x7fd8(gp) | a3 = *((gp - 8182));
0x00000fe0 lw t9, -0x7fb4(gp) | t9 = sym.imp.__sprintf_chk
0x00000fe4 addiu a3, a3, 0x1b84 | a3 += str._exited_with_status_code__d_n;
0x00000fe8 addiu a1, zero, 1 | a1 = 1;
0x00000fec move a0, s1 | a0 = s1;
0x00000ff0 sw s5, 0x10(sp) | *(var_10h) = s5;
0x00000ff4 jalr t9 | t9 ();
0x00000ff8 addiu a2, zero, 3 | a2 = 3;
0x00000ffc move a1, zero | a1 = 0;
0x00001000 move t9, s3 | t9 = s3;
0x00001004 move a0, s1 | a0 = s1;
0x00001008 bal 0x149c | fcn_0000149c ();
0x0000100c move a2, s2 | a2 = s2;
0x00001010 b 0xe24 | goto label_1;
| label_5:
0x00001014 slti v0, s1, 4 | v0 = (s1 < 4) ? 1 : 0;
0x00001018 move a2, s2 | a2 = s2;
| if (v0 == 0) {
0x0000101c beqz v0, 0xe24 | goto label_1;
| }
0x00001020 addiu s1, s1, 1 | s1++;
0x00001024 b 0xf90 | goto label_2;
| label_19:
0x00001028 lw t9, -0x7f7c(gp) | t9 = sym.imp.setsid;
0x0000102c jalr t9 | t9 ();
0x00001030 nop |
0x00001034 lw gp, 0x18(sp) | gp = *(var_18h);
0x00001038 b 0x1064 |
| while (a0 < 0) {
0x0000103c lw a0, 0x24(sp) | a0 = *(var_24h);
0x00001040 addiu a2, zero, 0x1a4 | a2 = 0x1a4;
0x00001044 move a1, s0 | a1 = s0;
0x00001048 jalr t9 | t9 ();
0x0000104c lw gp, 0x18(sp) | gp = *(var_18h);
0x00001050 addiu a0, zero, 1 | a0 = 1;
0x00001054 lw t9, -0x7f4c(gp) | t9 = sym.imp.sleep;
0x00001058 sw v0, 0x2014(s6) | *((s6 + 2053)) = v0;
0x0000105c jalr t9 | t9 ();
0x00001060 lw gp, 0x18(sp) | gp = *(var_18h);
0x00001064 lw a0, 0x2014(s6) | a0 = *((s6 + 2053));
0x00001068 lw t9, -0x7f78(gp) | t9 = sym.imp.open;
0x0000106c bltz a0, 0x103c |
| }
0x00001070 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00001074 lw t9, -0x7fd8(gp) | t9 = *((gp - 8182));
0x00001078 lw a1, 0x211c(s1) | a1 = *((s1 + 2119));
0x0000107c addiu t9, t9, 0x13b0 | t9 += fcn.000013b0;
0x00001080 lw a2, 0x2120(v0) | a2 = *((v0 + 2120));
0x00001084 bal 0x13b0 | fcn_000013b0 ();
0x00001088 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000108c lw t9, -0x7f3c(gp) | t9 = sym.imp.free;
0x00001090 lw a0, 0x211c(s1) | a0 = *((s1 + 2119));
0x00001094 jalr t9 | t9 ();
0x00001098 lw gp, 0x18(sp) | gp = *(var_18h);
| label_17:
0x0000109c lw a0, 0x2014(s6) | a0 = *((s6 + 2053));
0x000010a0 lw t9, -0x7f70(gp) | t9 = sym.imp.exit;
| if (a0 < 0) {
0x000010a4 bltz a0, 0xec8 | goto label_3;
| }
0x000010a8 lw t9, -0x7fb0(gp) | t9 = sym.imp.close;
0x000010ac jalr t9 | t9 ();
0x000010b0 nop |
0x000010b4 lw gp, 0x18(sp) | gp = *(var_18h);
0x000010b8 b 0xec4 | goto label_4;
| label_21:
0x000010bc jalr t9 | t9 ();
0x000010c0 nop |
0x000010c4 lw v0, (v0) | v0 = *(v0);
0x000010c8 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == fp) {
0x000010cc beq v0, fp, 0x1014 | goto label_5;
| }
0x000010d0 addiu v1, zero, 4 | v1 = 4;
0x000010d4 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
| if (v0 == v1) {
0x000010d8 beq v0, v1, 0x1014 | goto label_5;
| }
0x000010dc lw t9, -0x7f60(gp) | t9 = sym.imp.perror;
0x000010e0 addiu a0, a0, 0x1b6c | a0 += str.read;
0x000010e4 b 0x10f4 | goto label_6;
| label_18:
0x000010e8 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x000010ec lw t9, -0x7f60(gp) | t9 = sym.imp.perror;
0x000010f0 addiu a0, a0, 0x1bd0 | a0 += str.fork;
| do {
| label_6:
0x000010f4 jalr t9 | t9 ();
0x000010f8 nop |
0x000010fc lw gp, 0x18(sp) | gp = *(var_18h);
0x00001100 lw t9, -0x7f70(gp) | t9 = sym.imp.exit;
0x00001104 addiu a0, zero, 1 | a0 = 1;
0x00001108 jalr t9 | t9 ();
| label_20:
0x0000110c lw t9, -0x7fa0(gp) | t9 = sym.imp.__printf_chk;
0x00001110 lw a2, 0x24(sp) | a2 = *(var_24h);
0x00001114 addiu a1, a1, 0x1bd8 | a1 += str.Backgrounding_to_save__s_later_n;
0x00001118 addiu a0, zero, 1 | a0 = 1;
0x0000111c jalr t9 | t9 ();
0x00001120 lw gp, 0x18(sp) | gp = *(var_18h);
0x00001124 b 0xec4 | goto label_4;
| label_16:
0x00001128 addiu a2, zero, 3 | a2 = 3;
0x0000112c move t9, s3 | t9 = s3;
0x00001130 move a1, zero | a1 = 0;
0x00001134 bal 0x149c | fcn_0000149c ();
0x00001138 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000113c lw v0, 0x38(sp) | v0 = *(var_38h);
0x00001140 addiu s1, sp, 0xd4 | s1 = sp + 0xd4;
0x00001144 lw a3, -0x7fd8(gp) | a3 = *((gp - 8182));
0x00001148 lw t9, -0x7fb4(gp) | t9 = sym.imp.__sprintf_chk
0x0000114c andi v0, v0, 0x7f | v0 &= 0x7f;
0x00001150 addiu a3, a3, 0x1ba4 | a3 += str.died_with_signal__d_n;
0x00001154 addiu a2, zero, 0x50 | a2 = 0x50;
0x00001158 addiu a1, zero, 1 | a1 = 1;
0x0000115c move a0, s1 | a0 = s1;
0x00001160 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00001164 jalr t9 | t9 ();
0x00001168 addiu a2, zero, 3 | a2 = 3;
0x0000116c move a1, zero | a1 = 0;
0x00001170 move a0, s1 | a0 = s1;
0x00001174 move t9, s3 | t9 = s3;
0x00001178 addiu s5, zero, 1 | s5 = 1;
0x0000117c bal 0x149c | fcn_0000149c ();
0x00001180 move a2, s2 | a2 = s2;
0x00001184 b 0xe24 | goto label_1;
| label_12:
0x00001188 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x0000118c lw t9, -0x7f60(gp) | t9 = sym.imp.perror;
0x00001190 addiu a0, a0, 0x1b74 | a0 += str.pipe;
0x00001194 b 0x10f4 |
| } while (1);
| label_13:
0x00001198 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x0000119c lw t9, -0x7f60(gp) | t9 = sym.imp.perror;
0x000011a0 addiu a0, a0, 0x1b7c | a0 += str.vfork;
0x000011a4 b 0x10f4 | goto label_6;
| label_14:
0x000011a8 lw t9, -0x7f28(gp) | t9 = sym.imp.dup2;
0x000011ac addiu a1, zero, 1 | a1 = 1;
0x000011b0 jalr t9 | t9 ();
0x000011b4 lw gp, 0x18(sp) | gp = *(var_18h);
0x000011b8 lw a0, 0x40(sp) | a0 = *(var_40h);
0x000011bc lw t9, -0x7f28(gp) | t9 = sym.imp.dup2;
0x000011c0 addiu a1, zero, 2 | a1 = 2;
0x000011c4 jalr t9 | t9 ();
0x000011c8 lw gp, 0x18(sp) | gp = *(var_18h);
0x000011cc lw t9, -0x7fb0(gp) | t9 = sym.imp.close;
0x000011d0 lw a0, 0x3c(sp) | a0 = *(var_3ch);
0x000011d4 jalr t9 | t9 ();
0x000011d8 lw gp, 0x18(sp) | gp = *(var_18h);
0x000011dc lw t9, -0x7fb0(gp) | t9 = sym.imp.close;
0x000011e0 lw a0, 0x40(sp) | a0 = *(var_40h);
0x000011e4 jalr t9 | t9 ();
0x000011e8 lw gp, 0x18(sp) | gp = *(var_18h);
0x000011ec lw a0, (s1) | a0 = *(s1);
0x000011f0 lw t9, -0x7f5c(gp) | t9 = sym.imp.execvp;
0x000011f4 move a1, s1 | a1 = s1;
0x000011f8 jalr t9 | t9 ();
0x000011fc lw gp, 0x18(sp) | gp = *(var_18h);
0x00001200 lw a0, (s1) | a0 = *(s1);
0x00001204 lw t9, -0x7f60(gp) | t9 = sym.imp.perror;
0x00001208 b 0x10f4 | goto label_6;
| }
[*] Function sprintf used 3 times logsave