[*] Binary protection state of sadc
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function strcpy tear down of sadc
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/libexec/sa/sadc @ 0x27f0 */
| #include <stdint.h>
|
; (fcn) main () | int32_t main () {
| /* [13] -r-x section size 54400 named .text */
0x000027f0 lui gp, 3 |
0x000027f4 addiu gp, gp, -0x6cb0 |
0x000027f8 addu gp, gp, t9 | gp += t9;
0x000027fc lw v0, -0x7cf4(gp) | v0 = *((gp - 7997));
0x00002800 addiu sp, sp, -0x470 |
0x00002804 lw t9, -0x7f48(gp) | t9 = sym.get_HZ;
0x00002808 sw v0, 0x34(sp) | *(var_34h) = v0;
0x0000280c lw v0, (v0) | v0 = *(v0);
0x00002810 sw gp, 0x18(sp) | *(var_18h) = gp;
0x00002814 sw v0, 0x444(sp) | *(var_444h) = v0;
0x00002818 addiu v0, zero, -1 | v0 = -1;
0x0000281c sw ra, 0x46c(sp) | *(var_46ch) = ra;
0x00002820 sw fp, 0x468(sp) | *(var_468h) = fp;
0x00002824 sw s7, 0x464(sp) | *(var_464h) = s7;
0x00002828 sw s6, 0x460(sp) | *(var_460h) = s6;
0x0000282c sw s5, 0x45c(sp) | *(var_45ch) = s5;
0x00002830 sw s4, 0x458(sp) | *(var_458h) = s4;
0x00002834 sw s2, 0x450(sp) | *(var_450h) = s2;
0x00002838 sw s0, 0x448(sp) | *(var_448h) = s0;
0x0000283c sw v0, 0x40(sp) | *(var_40h) = v0;
0x00002840 sw s3, 0x454(sp) | *(var_454h) = s3;
0x00002844 sw s1, 0x44c(sp) | *(var_44ch) = s1;
0x00002848 sw zero, 0x3c(sp) | *(var_3ch) = 0;
0x0000284c move s6, a0 | s6 = a0;
0x00002850 move s4, a1 | s4 = a1;
0x00002854 bal 0x6c44 | sym_get_HZ ();
0x00002858 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000285c move s2, zero | s2 = 0;
0x00002860 lw v0, -0x7f7c(gp) | v0 = *(gp);
0x00002864 lw t9, -0x7f44(gp) | t9 = sym.get_kb_shift;
0x00002868 sw v0, 0x2c(sp) | *(var_2ch) = v0;
0x0000286c move s0, v0 | s0 = v0;
0x00002870 bal 0x6bb4 | sym_get_kb_shift ();
0x00002874 lw gp, 0x18(sp) | gp = *(var_18h);
0x00002878 sb zero, 0x244(sp) | *(var_244h) = 0;
0x0000287c sb zero, (s0) | *(s0) = 0;
0x00002880 lw v0, -0x7fd0(gp) | v0 = sym.imp.strspn;
0x00002884 lw s5, -0x7fd0(gp) | s5 = sym.imp.strspn;
| /* esilref: '-L' */
0x00002888 addiu v0, v0, 0x248 | v0 += 0x248;
0x0000288c lw s7, -0x7fd0(gp) | s7 = sym.imp.strspn;
0x00002890 sw v0, 0x24(sp) | *(var_24h) = v0;
0x00002894 lw v0, -0x7fd0(gp) | v0 = sym.imp.strspn;
0x00002898 lw fp, -0x7fd0(gp) | fp = sym.imp.strspn;
0x0000289c sb zero, 0x44(sp) | *(var_44h) = 0;
0x000028a0 sw zero, 0x30(sp) | *(var_30h) = 0;
| /* esilref: '-S' */
0x000028a4 addiu s5, s5, 0x23c | s5 += 0x23c;
| /* esilref: '-D' */
0x000028a8 addiu s7, s7, 0x240 | s7 += 0x240;
0x000028ac sw v0, 0x28(sp) | *(var_28h) = v0;
| label_0:
0x000028b0 addiu s1, s2, 1 | s1 = s2 + 1;
0x000028b4 slt v0, s1, s6 | v0 = (s1 < s6) ? 1 : 0;
0x000028b8 lw s0, -0x7fbc(gp) | s0 = *(gp);
| if (v0 == 0) {
0x000028bc beqz v0, 0x2914 | goto label_9;
| }
| do {
0x000028c0 sll s0, s1, 2 | s0 = s1 << 2;
0x000028c4 addu s0, s4, s0 | s0 = s4 + s0;
0x000028c8 lw t9, -0x7cc4(gp) | t9 = sym.imp.strcmp;
0x000028cc lw s3, (s0) | s3 = *(s0);
0x000028d0 move a1, s5 | a1 = s5;
0x000028d4 move a0, s3 | a0 = s3;
0x000028d8 jalr t9 | t9 ();
0x000028dc lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x000028e0 bnez v0, 0x2a18 | goto label_10;
| }
0x000028e4 lw v0, 4(s0) | v0 = *((s0 + 1));
0x000028e8 addiu s2, s2, 2 | s2 += 2;
| if (v0 == 0) {
0x000028ec beqz v0, 0x2b8c | goto label_1;
| }
0x000028f0 lw t9, -0x7f40(gp) | t9 = sym.parse_sadc_S_option;
0x000028f4 move a1, s2 | a1 = s2;
0x000028f8 move a0, s4 | a0 = s4;
0x000028fc addiu s1, s2, 1 | s1 = s2 + 1;
0x00002900 bal 0x3110 | sym_parse_sadc_S_option ();
0x00002904 slt v0, s1, s6 | v0 = (s1 < s6) ? 1 : 0;
0x00002908 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000290c bnez v0, 0x28c0 |
| } while (v0 != 0);
0x00002910 lw s0, -0x7fbc(gp) | s0 = *(gp);
| label_9:
0x00002914 lw s2, (s0) | s2 = *(s0);
0x00002918 andi v0, s2, 2 | v0 = s2 & 2;
0x0000291c lb v0, 0x44(sp) | v0 = *(var_44h);
| if (v0 != 0) {
0x00002920 bnez v0, 0x2d50 | goto label_11;
| }
0x00002924 lw v1, -0x7fd8(gp) | v1 = *(gp);
| if (v0 != 0) {
0x00002928 bnez v0, 0x2c2c | goto label_12;
| }
0x0000292c lw v1, (v1) | v1 = *(v1);
0x00002930 addiu s1, sp, 0x44 | s1 = sp + 0x44;
| if (v1 != 0) {
0x00002934 bnez v1, 0x2c18 | goto label_5;
| }
0x00002938 lw v0, (s0) | v0 = *(s0);
| label_3:
0x0000293c addiu v1, zero, -0x41 | v1 = -0x41;
0x00002940 and v0, v0, v1 | v0 &= v1;
0x00002944 sw v0, (s0) | *(s0) = v0;
0x00002948 lw t9, -0x7f58(gp) | t9 = sym.sa_sys_init;
| label_2:
0x0000294c bal 0x36f0 | sym_sa_sys_init ();
0x00002950 nop |
0x00002954 lw gp, 0x18(sp) | gp = *(var_18h);
0x00002958 move a2, zero | a2 = 0;
0x0000295c lw t9, -0x7fa0(gp) | t9 = sym.get_activity_nr;
0x00002960 lw a0, -0x7fcc(gp) | a0 = *(gp);
0x00002964 addiu a1, zero, 1 | a1 = 1;
0x00002968 bal 0x5f58 | sym_get_activity_nr ();
0x0000296c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00002970 beqz v0, 0x2d3c | goto label_13;
| }
| label_4:
0x00002974 lw s0, -0x7fdc(gp) | s0 = *(gp);
0x00002978 lw v0, (s0) | v0 = *(s0);
0x0000297c move a2, zero | a2 = 0;
| if (v0 == 0) {
0x00002980 bnez v0, 0x2990 |
0x00002984 lw v0, 0x2c(sp) | v0 = *(var_2ch);
0x00002988 lb a2, (v0) | a2 = *(v0);
0x0000298c sltiu a2, a2, 1 | a2 = (a2 < 1) ? 1 : 0;
| }
0x00002990 lw t9, -0x7f50(gp) | t9 = sym.open_ofile;
0x00002994 move a1, s1 | a1 = s1;
0x00002998 addiu a0, sp, 0x40 | a0 = sp + 0x40;
0x0000299c bal 0x436c | sym_open_ofile ();
0x000029a0 lw gp, 0x18(sp) | gp = *(var_18h);
0x000029a4 lw t9, -0x7f3c(gp) | t9 = sym.open_stdout;
0x000029a8 addiu a0, sp, 0x3c | a0 = sp + 0x3c;
0x000029ac bal 0x42ec | sym_open_stdout ();
0x000029b0 lw v0, (s0) | v0 = *(s0);
0x000029b4 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x000029b8 bnez v0, 0x2c74 | goto label_14;
| }
0x000029bc lw a0, 0x40(sp) | a0 = *(var_40h);
0x000029c0 lw v0, 0x2c(sp) | v0 = *(var_2ch);
| if (a0 >= 0) {
0x000029c4 bltz a0, 0x29fc |
0x000029c8 lb v0, (v0) | v0 = *(v0);
0x000029cc lw t9, -0x7f38(gp) | t9 = sym.write_special_record;
| if (v0 != 0) {
0x000029d0 bnez v0, 0x2d84 | goto label_15;
| }
0x000029d4 addiu a1, zero, 2 | a1 = 2;
0x000029d8 bal 0x3f10 | sym_write_special_record ();
0x000029dc lw gp, 0x18(sp) | gp = *(var_18h);
| label_7:
0x000029e0 lw a0, 0x40(sp) | a0 = *(var_40h);
0x000029e4 lw t9, -0x7f34(gp) | t9 = sym.sa_sys_free;
| if (a0 < 0) {
0x000029e8 bltz a0, 0x2a00 | goto label_16;
| }
0x000029ec lw t9, -0x7db4(gp) | t9 = sym.imp.close;
0x000029f0 jalr t9 | t9 ();
0x000029f4 nop |
0x000029f8 lw gp, 0x18(sp) | gp = *(var_18h);
| }
0x000029fc lw t9, -0x7f34(gp) | t9 = sym.sa_sys_free;
| label_16:
0x00002a00 bal 0x3990 | sym_sa_sys_free ();
0x00002a04 nop |
0x00002a08 lw gp, 0x18(sp) | gp = *(var_18h);
0x00002a0c lw t9, -0x7d3c(gp) | t9 = sym.imp.exit;
0x00002a10 move a0, zero | a0 = 0;
0x00002a14 jalr t9 | t9 ();
| label_10:
0x00002a18 lw t9, -0x7cc4(gp) | t9 = sym.imp.strcmp;
0x00002a1c move a1, s7 | a1 = s7;
0x00002a20 move a0, s3 | a0 = s3;
0x00002a24 jalr t9 | t9 ();
0x00002a28 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00002a2c bnez v0, 0x2a48 |
0x00002a30 lw v1, -0x7fbc(gp) | v1 = *(gp);
0x00002a34 move s2, s1 | s2 = s1;
0x00002a38 lw v0, (v1) | v0 = *(v1);
0x00002a3c ori v0, v0, 0x400 | v0 |= 0x400;
0x00002a40 sw v0, (v1) | *(v1) = v0;
0x00002a44 b 0x28b0 | goto label_0;
| }
0x00002a48 lw t9, -0x7cc4(gp) | t9 = sym.imp.strcmp;
| /* esilref: '-F' */
0x00002a4c addiu a1, fp, 0x244 | a1 = fp + 0x244;
0x00002a50 move a0, s3 | a0 = s3;
0x00002a54 jalr t9 | t9 ();
0x00002a58 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00002a5c bnez v0, 0x2a78 |
0x00002a60 lw v1, -0x7fbc(gp) | v1 = *(gp);
0x00002a64 move s2, s1 | s2 = s1;
0x00002a68 lw v0, (v1) | v0 = *(v1);
0x00002a6c ori v0, v0, 8 | v0 |= 8;
0x00002a70 sw v0, (v1) | *(v1) = v0;
0x00002a74 b 0x28b0 | goto label_0;
| }
0x00002a78 lw t9, -0x7cc4(gp) | t9 = sym.imp.strcmp;
0x00002a7c lw a1, 0x24(sp) | a1 = *(var_24h);
0x00002a80 move a0, s3 | a0 = s3;
0x00002a84 jalr t9 | t9 ();
0x00002a88 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00002a8c bnez v0, 0x2aa8 |
0x00002a90 lw v1, -0x7fbc(gp) | v1 = *(gp);
0x00002a94 move s2, s1 | s2 = s1;
0x00002a98 lw v0, (v1) | v0 = *(v1);
0x00002a9c ori v0, v0, 0x40 | v0 |= 0x40;
0x00002aa0 sw v0, (v1) | *(v1) = v0;
0x00002aa4 b 0x28b0 | goto label_0;
| }
0x00002aa8 lw v0, 0x28(sp) | v0 = *(var_28h);
0x00002aac lw t9, -0x7cc4(gp) | t9 = sym.imp.strcmp;
0x00002ab0 addiu a1, v0, 0x24c | a1 = v0 + 0x24c;
0x00002ab4 move a0, s3 | a0 = s3;
0x00002ab8 jalr t9 | t9 ();
0x00002abc lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x00002ac0 beqz v0, 0x2b2c |
0x00002ac4 lw a1, -0x7fd0(gp) | a1 = sym.imp.strspn;
0x00002ac8 lw t9, -0x7cc4(gp) | t9 = sym.imp.strcmp;
| /* esilref: '-Z' */
0x00002acc addiu a1, a1, 0x250 | a1 += 0x250;
0x00002ad0 move a0, s3 | a0 = s3;
0x00002ad4 jalr t9 | t9 ();
0x00002ad8 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00002adc bnez v0, 0x2af4 |
0x00002ae0 lw v0, -0x7fd8(gp) | v0 = *(gp);
0x00002ae4 addiu v1, zero, 1 | v1 = 1;
0x00002ae8 move s2, s1 | s2 = s1;
0x00002aec sw v1, (v0) | *(v0) = v1;
0x00002af0 b 0x28b0 | goto label_0;
| }
0x00002af4 lw a1, -0x7fd0(gp) | a1 = sym.imp.strspn;
0x00002af8 lw t9, -0x7cc4(gp) | t9 = sym.imp.strcmp;
| /* esilref: '-f' */
0x00002afc addiu a1, a1, 0x254 | a1 += 0x254;
0x00002b00 move a0, s3 | a0 = s3;
0x00002b04 jalr t9 | t9 ();
0x00002b08 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x00002b0c bnez v0, 0x2b40 | goto label_17;
| }
0x00002b10 lw v1, -0x7fbc(gp) | v1 = *(gp);
0x00002b14 lui a0, 0x800 | a0 = 0x8000000;
0x00002b18 move s2, s1 | s2 = s1;
0x00002b1c lw v0, (v1) | v0 = *(v1);
0x00002b20 or v0, v0, a0 | v0 |= a0;
0x00002b24 sw v0, (v1) | *(v1) = v0;
0x00002b28 b 0x28b0 | goto label_0;
| }
0x00002b2c lw t9, -0x7f30(gp) | t9 = sym.print_version;
0x00002b30 move s2, s1 | s2 = s1;
0x00002b34 bal 0x6820 | sym_print_version ();
0x00002b38 lw gp, 0x18(sp) | gp = *(var_18h);
0x00002b3c b 0x28b0 | goto label_0;
| label_17:
0x00002b40 lw a1, -0x7fd0(gp) | a1 = sym.imp.strspn;
0x00002b44 lw t9, -0x7cc4(gp) | t9 = sym.imp.strcmp;
| /* esilref: '-C' */
0x00002b48 addiu a1, a1, 0x258 | a1 += 0x258;
0x00002b4c move a0, s3 | a0 = s3;
0x00002b50 jalr t9 | t9 ();
0x00002b54 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x00002b58 bnez v0, 0x2b98 | goto label_18;
| }
0x00002b5c lw a1, 4(s0) | a1 = *((s0 + 1));
0x00002b60 addiu s2, s2, 2 | s2 += 2;
| if (a1 == 0) {
0x00002b64 beqz a1, 0x2b8c | goto label_1;
| }
0x00002b68 lw t9, -0x7d6c(gp) | t9 = sym.imp.strncpy;
0x00002b6c lw a0, -0x7f7c(gp) | a0 = *(gp);
0x00002b70 addiu a2, zero, 0x40 | a2 = 0x40;
0x00002b74 jalr t9 | t9 ();
0x00002b78 lw v1, 0x2c(sp) | v1 = *(var_2ch);
0x00002b7c lw gp, 0x18(sp) | gp = *(var_18h);
0x00002b80 lb v0, (v1) | v0 = *(v1);
0x00002b84 sb zero, 0x3f(v1) | *((v1 + 63)) = 0;
| if (v0 != 0) {
0x00002b88 bnez v0, 0x28b0 | goto label_0;
| }
| label_1:
0x00002b8c lw t9, -0x7fc8(gp) | t9 = sym.usage;
| do {
0x00002b90 lw a0, (s4) | a0 = *(s4);
0x00002b94 bal 0x3050 | sym_usage ();
| label_18:
0x00002b98 lw a1, -0x7fd0(gp) | a1 = sym.imp.strspn;
0x00002b9c lw t9, -0x7dbc(gp) | t9 = sym.imp.strspn;
| /* str.0123456789 */
0x00002ba0 addiu a1, a1, 0x25c | a1 += 0x25c;
0x00002ba4 move a0, s3 | a0 = s3;
0x00002ba8 jalr t9 | t9 ();
0x00002bac lw gp, 0x18(sp) | gp = *(var_18h);
0x00002bb0 move a0, s3 | a0 = s3;
0x00002bb4 lw t9, -0x7d50(gp) | t9 = sym.imp.strlen;
0x00002bb8 move s0, v0 | s0 = v0;
0x00002bbc jalr t9 | t9 ();
0x00002bc0 lw gp, 0x18(sp) | gp = *(var_18h);
| if (s0 == v0) {
0x00002bc4 beq s0, v0, 0x2d9c | goto label_19;
| }
0x00002bc8 lb v0, 0x44(sp) | v0 = *(var_44h);
0x00002bcc lw t9, -0x7fc8(gp) | t9 = sym.usage;
0x00002bd0 bnez v0, 0x2b90 |
| } while (v0 != 0);
0x00002bd4 lw s2, -0x7fbc(gp) | s2 = *(gp);
0x00002bd8 lw s0, (s2) | s0 = *(s2);
0x00002bdc andi v0, s0, 2 | v0 = s0 & 2;
0x00002be0 lw a1, -0x7fd0(gp) | a1 = sym.imp.strspn;
| if (v0 != 0) {
0x00002be4 bnez v0, 0x2b8c | goto label_1;
| }
0x00002be8 lw t9, -0x7cc4(gp) | t9 = sym.imp.strcmp;
0x00002bec addiu v0, zero, -1 | v0 = -1;
0x00002bf0 addiu a1, a1, 0x268 | a1 += 0x268;
0x00002bf4 move a0, s3 | a0 = s3;
0x00002bf8 sw v0, 0x3c(sp) | *(var_3ch) = v0;
0x00002bfc jalr t9 | t9 ();
0x00002c00 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x00002c04 bnez v0, 0x2dd8 | goto label_20;
| }
0x00002c08 ori s0, s0, 2 | s0 |= 2;
0x00002c0c sw s0, (s2) | *(s2) = s0;
0x00002c10 move s2, s1 | s2 = s1;
0x00002c14 b 0x28b0 | goto label_0;
| label_5:
0x00002c18 sw zero, 0x3c(sp) | *(var_3ch) = 0;
| label_6:
0x00002c1c lw t9, -0x7f58(gp) | t9 = sym.sa_sys_init;
| if (v0 != 0) {
0x00002c20 bnez v0, 0x294c | goto label_2;
| }
0x00002c24 lw v0, (s0) | v0 = *(s0);
0x00002c28 b 0x293c | goto label_3;
| label_12:
0x00002c2c lw t9, -0x7d7c(gp) | t9 = sym.imp.__strcpy_chk
0x00002c30 addiu s1, sp, 0x44 | s1 = sp + 0x44;
0x00002c34 addiu a2, zero, 0x200 | a2 = aav.0x00000200;
0x00002c38 move a1, s1 | a1 = s1;
0x00002c3c addiu a0, sp, 0x244 | a0 = sp + 0x244;
0x00002c40 jalr t9 | t9 ();
0x00002c44 lw gp, 0x18(sp) | gp = *(var_18h);
0x00002c48 ext a2, s2, 0xa, 1 | __asm ("ext a2, s2, 0xa, 1");
0x00002c4c move a1, zero | a1 = 0;
0x00002c50 lw t9, -0x7f2c(gp) | t9 = sym.check_alt_sa_dir;
0x00002c54 move a0, s1 | a0 = s1;
0x00002c58 bal 0x631c | sym_check_alt_sa_dir ();
0x00002c5c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00002c60 beqz v0, 0x2d94 | goto label_21;
| }
0x00002c64 lw v0, (s0) | v0 = *(s0);
0x00002c68 ori v0, v0, 2 | v0 |= 2;
0x00002c6c sw v0, (s0) | *(s0) = v0;
0x00002c70 b 0x2d6c | goto label_8;
| label_14:
0x00002c74 lw v1, -0x7f28(gp) | v1 = *(gp);
0x00002c78 lw t9, -0x7d60(gp) | t9 = sym.imp.memset;
0x00002c7c move a0, v1 | a0 = v1;
0x00002c80 addiu a2, zero, 0x90 | a2 = 0x90;
0x00002c84 move a1, zero | a1 = 0;
0x00002c88 jalr t9 | t9 ();
0x00002c8c lw gp, 0x18(sp) | gp = *(var_18h);
0x00002c90 move v1, v0 | v1 = v0;
0x00002c94 move a1, v0 | a1 = v0;
0x00002c98 lw v0, -0x7f24(gp) | v0 = sym.alarm_handler;
0x00002c9c lw t9, -0x7da0(gp) | t9 = sym.imp.sigaction;
0x00002ca0 sw v0, 4(v1) | *((v1 + 1)) = v0;
0x00002ca4 move a2, zero | a2 = 0;
0x00002ca8 addiu a0, zero, 0xe | a0 = 0xe;
0x00002cac jalr t9 | t9 ();
0x00002cb0 lw gp, 0x18(sp) | gp = *(var_18h);
0x00002cb4 lw t9, -0x7d00(gp) | t9 = sym.imp.alarm;
0x00002cb8 lw a0, (s0) | a0 = *(s0);
0x00002cbc jalr t9 | t9 ();
0x00002cc0 lw gp, 0x18(sp) | gp = *(var_18h);
0x00002cc4 addiu v0, sp, 0x244 | v0 = sp + 0x244;
0x00002cc8 lw a0, 0x30(sp) | a0 = *(var_30h);
0x00002ccc lw t9, -0x7f20(gp) | t9 = sym.rw_sa_stat_loop;
0x00002cd0 lw a2, 0x40(sp) | a2 = *(var_40h);
0x00002cd4 lw a1, 0x3c(sp) | a1 = *(var_3ch);
0x00002cd8 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00002cdc move a3, s1 | a3 = s1;
0x00002ce0 bal 0x4a18 | sym_rw_sa_stat_loop ();
0x00002ce4 lw gp, 0x18(sp) | gp = *(var_18h);
0x00002ce8 lw t9, -0x7f34(gp) | t9 = sym.sa_sys_free;
0x00002cec bal 0x3990 | sym_sa_sys_free ();
0x00002cf0 nop |
0x00002cf4 lw v0, 0x34(sp) | v0 = *(var_34h);
0x00002cf8 lw a0, 0x444(sp) | a0 = *(var_444h);
0x00002cfc lw gp, 0x18(sp) | gp = *(var_18h);
0x00002d00 lw v1, (v0) | v1 = *(v0);
0x00002d04 move v0, zero | v0 = 0;
| if (a0 != v1) {
0x00002d08 bne a0, v1, 0x2e38 | goto label_22;
| }
0x00002d0c lw ra, 0x46c(sp) | ra = *(var_46ch);
0x00002d10 lw fp, 0x468(sp) | fp = *(var_468h);
0x00002d14 lw s7, 0x464(sp) | s7 = *(var_464h);
0x00002d18 lw s6, 0x460(sp) | s6 = *(var_460h);
0x00002d1c lw s5, 0x45c(sp) | s5 = *(var_45ch);
0x00002d20 lw s4, 0x458(sp) | s4 = *(var_458h);
0x00002d24 lw s3, 0x454(sp) | s3 = *(var_454h);
0x00002d28 lw s2, 0x450(sp) | s2 = *(var_450h);
0x00002d2c lw s1, 0x44c(sp) | s1 = *(var_44ch);
0x00002d30 lw s0, 0x448(sp) | s0 = *(var_448h);
0x00002d34 addiu sp, sp, 0x470 |
0x00002d38 jr ra | return v0;
| label_13:
0x00002d3c lw t9, -0x7f1c(gp) | t9 = sym.print_collect_error;
0x00002d40 bal 0x6580 | sym_print_collect_error ();
0x00002d44 nop |
0x00002d48 lw gp, 0x18(sp) | gp = *(var_18h);
0x00002d4c b 0x2974 | goto label_4;
| label_11:
0x00002d50 lw t9, -0x7f4c(gp) | t9 = sym.set_default_file;
0x00002d54 addiu s1, sp, 0x44 | s1 = sp + 0x44;
0x00002d58 ext a2, s2, 0xa, 1 | __asm ("ext a2, s2, 0xa, 1");
0x00002d5c move a1, zero | a1 = 0;
0x00002d60 move a0, s1 | a0 = s1;
0x00002d64 bal 0x6158 | sym_set_default_file ();
0x00002d68 lw gp, 0x18(sp) | gp = *(var_18h);
| label_8:
0x00002d6c lw v0, -0x7fd8(gp) | v0 = *(gp);
0x00002d70 lw v0, (v0) | v0 = *(v0);
0x00002d74 lb v0, 0x44(sp) | v0 = *(var_44h);
| if (v0 != 0) {
0x00002d78 bnez v0, 0x2c18 | goto label_5;
| }
0x00002d7c b 0x2c1c | goto label_6;
0x00002d80 nop |
| label_15:
0x00002d84 addiu a1, zero, 4 | a1 = 4;
0x00002d88 bal 0x3f10 | sym_write_special_record ();
0x00002d8c lw gp, 0x18(sp) | gp = *(var_18h);
0x00002d90 b 0x29e0 | goto label_7;
| label_21:
0x00002d94 sb zero, 0x244(sp) | *(var_244h) = 0;
0x00002d98 b 0x2d6c | goto label_8;
| label_19:
0x00002d9c lw s0, -0x7fdc(gp) | s0 = *(gp);
0x00002da0 lw v0, (s0) | v0 = *(s0);
0x00002da4 lw v0, 0x30(sp) | v0 = *(var_30h);
| if (v0 == 0) {
0x00002da8 beqz v0, 0x2e08 | goto label_23;
| }
0x00002dac lw t9, -0x7db0(gp) | t9 = sym.imp.strtol;
| if (v0 > 0) {
0x00002db0 bgtz v0, 0x2b8c | goto label_1;
| }
0x00002db4 addiu a2, zero, 0xa | a2 = 0xa;
0x00002db8 move a1, zero | a1 = 0;
0x00002dbc move a0, s3 | a0 = s3;
0x00002dc0 jalr t9 | t9 ();
0x00002dc4 sw v0, 0x30(sp) | *(var_30h) = v0;
0x00002dc8 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 <= 0) {
0x00002dcc blez v0, 0x2b8c | goto label_1;
| }
0x00002dd0 move s2, s1 | s2 = s1;
0x00002dd4 b 0x28b0 | goto label_0;
| label_20:
0x00002dd8 lbu v1, (s3) | v1 = *(s3);
0x00002ddc addiu v0, zero, 0x2d | v0 = 0x2d;
0x00002de0 lw t9, -0x7d6c(gp) | t9 = sym.imp.strncpy;
| if (v1 == v0) {
0x00002de4 beq v1, v0, 0x2b8c | goto label_1;
| }
0x00002de8 addiu a2, zero, 0x200 | a2 = aav.0x00000200;
0x00002dec move a1, s3 | a1 = s3;
0x00002df0 addiu a0, sp, 0x44 | a0 = sp + 0x44;
0x00002df4 jalr t9 | t9 ();
0x00002df8 move s2, s1 | s2 = s1;
0x00002dfc lw gp, 0x18(sp) | gp = *(var_18h);
0x00002e00 sb zero, 0x243(sp) | *(var_243h) = 0;
0x00002e04 b 0x28b0 | goto label_0;
| label_23:
0x00002e08 lw t9, -0x7db0(gp) | t9 = sym.imp.strtol;
0x00002e0c addiu a2, zero, 0xa | a2 = 0xa;
0x00002e10 move a1, zero | a1 = 0;
0x00002e14 move a0, s3 | a0 = s3;
0x00002e18 jalr t9 | t9 ();
0x00002e1c lw gp, 0x18(sp) | gp = *(var_18h);
0x00002e20 sw v0, (s0) | *(s0) = v0;
| if (v0 <= 0) {
0x00002e24 blez v0, 0x2b8c | goto label_1;
| }
0x00002e28 addiu v0, zero, -1 | v0 = -1;
0x00002e2c move s2, s1 | s2 = s1;
0x00002e30 sw v0, 0x30(sp) | *(var_30h) = v0;
0x00002e34 b 0x28b0 | goto label_0;
| label_22:
0x00002e38 lw t9, -0x7d08(gp) | t9 = sym.imp.__stack_chk_fail;
0x00002e3c jalr t9 | t9 ();
0x00002e40 nop |
0x00002e44 nop |
0x00002e48 nop |
0x00002e4c nop |
| }
[*] Function strcpy used 2 times sadc