[*] Binary protection state of sadf
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function strcpy tear down of sadf
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/sadf @ 0x43b0 */
| #include <stdint.h>
|
; (fcn) main () | int32_t main () {
| /* [13] -r-x section size 358704 named .text */
0x000043b0 lui gp, 8 |
0x000043b4 addiu gp, gp, -0x53f0 |
0x000043b8 addu gp, gp, t9 | gp += t9;
0x000043bc lw v0, -0x7b7c(gp) | v0 = *((gp - 7903));
0x000043c0 addiu sp, sp, -0x478 |
0x000043c4 lw t9, -0x7f30(gp) | t9 = sym.get_kb_shift;
0x000043c8 sw v0, 0x2c(sp) | *(var_2ch) = v0;
0x000043cc lw v0, (v0) | v0 = *(v0);
0x000043d0 sw s1, 0x454(sp) | *(var_454h) = s1;
0x000043d4 sw s0, 0x450(sp) | *(var_450h) = s0;
0x000043d8 lw s1, -0x7fa0(gp) | s1 = *(gp);
0x000043dc lw s0, -0x7fa4(gp) | s0 = *(gp);
0x000043e0 sw v0, 0x44c(sp) | *(var_44ch) = v0;
0x000043e4 addiu v0, zero, 1 | v0 = 1;
0x000043e8 sw gp, 0x18(sp) | *(var_18h) = gp;
0x000043ec sw v0, 0x48(sp) | *(var_48h) = v0;
0x000043f0 sw ra, 0x474(sp) | *(var_474h) = ra;
0x000043f4 sw fp, 0x470(sp) | *(var_470h) = fp;
0x000043f8 sw s7, 0x46c(sp) | *(var_46ch) = s7;
0x000043fc sw s6, 0x468(sp) | *(var_468h) = s6;
0x00004400 sw s5, 0x464(sp) | *(var_464h) = s5;
0x00004404 sw s4, 0x460(sp) | *(var_460h) = s4;
0x00004408 sw s3, 0x45c(sp) | *(var_45ch) = s3;
0x0000440c sw s2, 0x458(sp) | *(var_458h) = s2;
0x00004410 sw s0, 0x38(sp) | *(var_38h) = s0;
0x00004414 sw s1, 0x30(sp) | *(var_30h) = s1;
0x00004418 move s4, a0 | s4 = a0;
0x0000441c move s3, a1 | s3 = a1;
0x00004420 jalr t9 | t9 ();
0x00004424 lw gp, 0x18(sp) | gp = *(var_18h);
0x00004428 sb zero, 0x24c(sp) | *(var_24ch) = 0;
0x0000442c sb zero, 0x4c(sp) | *(var_4ch) = 0;
0x00004430 lw t9, -0x7f2c(gp) | t9 = sym.allocate_bitmaps;
0x00004434 lw a0, -0x7fac(gp) | a0 = *(gp);
0x00004438 sw zero, 0xc(s0) | *((s0 + 3)) = 0;
0x0000443c sw zero, 0xc(s1) | *((s1 + 3)) = 0;
0x00004440 jalr t9 | t9 ();
0x00004444 lw gp, 0x18(sp) | gp = *(var_18h);
0x00004448 lw s2, 0x48(sp) | s2 = *(var_48h);
0x0000444c sw zero, 0x3c(sp) | *(var_3ch) = 0;
0x00004450 lw v0, -0x7fd8(gp) | v0 = *(gp);
0x00004454 lw s7, -0x7fdc(gp) | s7 = *(gp);
0x00004458 lw fp, -0x7fdc(gp) | fp = *(gp);
0x0000445c sw zero, (v0) | *(v0) = 0;
0x00004460 sw zero, 4(v0) | *((v0 + 1)) = 0;
0x00004464 sw zero, 8(v0) | *((v0 + 2)) = 0;
0x00004468 sw zero, 0xc(v0) | *((v0 + 3)) = 0;
0x0000446c sw zero, 0x10(v0) | *((v0 + 4)) = 0;
0x00004470 sw zero, 0x14(v0) | *((v0 + 5)) = 0;
0x00004474 sw zero, 0x18(v0) | *((v0 + 6)) = 0;
0x00004478 sw zero, 0x1c(v0) | *((v0 + 7)) = 0;
0x0000447c sw zero, 0x20(v0) | *((v0 + 8)) = 0;
0x00004480 sw zero, 0x24(v0) | *((v0 + 9)) = 0;
0x00004484 sw zero, 0x28(v0) | *((v0 + 10)) = 0;
0x00004488 sw zero, 0x2c(v0) | *((v0 + 11)) = 0;
0x0000448c sw zero, 0x30(v0) | *((v0 + 12)) = 0;
0x00004490 sw zero, 0x34(v0) | *((v0 + 13)) = 0;
0x00004494 sw zero, 0x38(v0) | *((v0 + 14)) = 0;
0x00004498 sw zero, 0x3c(v0) | *((v0 + 15)) = 0;
0x0000449c sw zero, 0x40(v0) | *((v0 + 16)) = 0;
0x000044a0 sw zero, 0x44(v0) | *((v0 + 17)) = 0;
0x000044a4 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x000044a8 lw s5, -0x7fdc(gp) | s5 = *(gp);
0x000044ac addiu v0, v0, -0x3bc0 | v0 += -0x3bc0;
0x000044b0 move s6, zero | s6 = 0;
0x000044b4 sw v0, 0x28(sp) | *(var_28h) = v0;
| /* str.autoscale */
0x000044b8 addiu s7, s7, -0x3c6c | s7 += -0x3c6c;
| /* str.oneday */
0x000044bc addiu fp, fp, -0x3c60 | fp += -0x3c60;
| label_0:
0x000044c0 slt v0, s2, s4 | v0 = (s2 < s4) ? 1 : 0;
0x000044c4 lw s0, -0x7fcc(gp) | s0 = *(gp);
| if (v0 == 0) {
0x000044c8 beqz v0, 0x4528 | goto label_20;
| }
0x000044cc sll s0, s2, 2 | s0 = s2 << 2;
| do {
0x000044d0 addu s0, s3, s0 | s0 = s3 + s0;
0x000044d4 lw t9, -0x7b50(gp) | t9 = sym.imp.strcmp;
0x000044d8 lw s1, (s0) | s1 = *(s0);
| /* esilref: '-I' */
0x000044dc addiu a1, s5, -0x3cc0 | a1 = s5 + -0x3cc0;
0x000044e0 move a0, s1 | a0 = s1;
0x000044e4 jalr t9 | t9 ();
0x000044e8 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x000044ec bnez v0, 0x4664 | goto label_21;
| }
0x000044f0 lw t9, -0x7f28(gp) | t9 = sym.parse_sar_I_opt;
| if (s6 == 0) {
0x000044f4 beqz s6, 0x493c | goto label_4;
| }
0x000044f8 lw a3, -0x7fac(gp) | a3 = *(gp);
0x000044fc lw a2, -0x7fcc(gp) | a2 = *(gp);
| label_1:
0x00004500 addiu a1, sp, 0x48 | a1 = sp + 0x48;
0x00004504 move a0, s3 | a0 = s3;
0x00004508 jalr t9 | t9 ();
0x0000450c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x00004510 bnez v0, 0x493c | goto label_4;
| }
| label_3:
0x00004514 lw s2, 0x48(sp) | s2 = *(var_48h);
| label_2:
0x00004518 slt v0, s2, s4 | v0 = (s2 < s4) ? 1 : 0;
0x0000451c sll s0, s2, 2 | s0 = s2 << 2;
0x00004520 bnez v0, 0x44d0 |
| } while (v0 != 0);
0x00004524 lw s0, -0x7fcc(gp) | s0 = *(gp);
| label_20:
0x00004528 lw v0, (s0) | v0 = *(s0);
0x0000452c ext v0, v0, 0x1c, 1 | __asm ("ext v0, v0, 0x1c, 1");
0x00004530 lw t9, -0x7f24(gp) | t9 = sym.set_bitmaps;
| if (v0 != 0) {
0x00004534 bnez v0, 0x4cd4 | goto label_22;
| }
| label_14:
0x00004538 lb v0, 0x4c(sp) | v0 = *(var_4ch);
0x0000453c lw t9, -0x7f20(gp) | t9 = sym.set_default_file;
| if (v0 == 0) {
0x00004540 beqz v0, 0x4cbc | goto label_23;
| }
| label_13:
0x00004544 lw s1, -0x7fd0(gp) | s1 = *(gp);
0x00004548 lb v1, 0x24c(sp) | v1 = *(var_24ch);
0x0000454c lw v0, (s1) | v0 = *(s1);
| if (v1 == 0) {
0x00004550 beqz v1, 0x4bb8 | goto label_24;
| }
0x00004554 addiu v1, zero, 9 | v1 = 9;
0x00004558 lw v0, -0x7b6c(gp) | v0 = *((gp - 7899));
| if (v0 == v1) {
0x0000455c beq v0, v1, 0x4be0 | goto label_25;
| }
0x00004560 lw a0, 0x30(sp) | a0 = *(var_30h);
| label_11:
0x00004564 lw v0, 0xc(a0) | v0 = *((a0 + 3));
0x00004568 lw a1, 0x38(sp) | a1 = *(var_38h);
| if (v0 != 0) {
0x0000456c bnez v0, 0x4b8c | goto label_26;
| }
| label_10:
0x00004570 lw v0, (s0) | v0 = *(s0);
| label_9:
0x00004574 andi v0, v0, 4 | v0 &= 4;
0x00004578 lw t9, -0x7f1c(gp) | t9 = sym.get_devmap_major;
| if (v0 != 0) {
0x0000457c bnez v0, 0x4ce8 | goto label_27;
| }
| label_15:
0x00004580 lw v1, (s0) | v1 = *(s0);
0x00004584 ext v0, v1, 0xe, 1 | __asm ("ext v0, v1, 0xe, 1");
0x00004588 ext a0, v1, 5, 1 | __asm ("ext a0, v1, 5, 1");
0x0000458c addu v0, v0, a0 | v0 += a0;
0x00004590 ext v1, v1, 7, 1 | __asm ("ext v1, v1, 7, 1");
0x00004594 addu v0, v0, v1 | v0 += v1;
0x00004598 slti v0, v0, 2 | v0 = (v0 < 2) ? 1 : 0;
0x0000459c lw v0, -0x7f58(gp) | v0 = *(gp);
| if (v0 == 0) {
0x000045a0 beqz v0, 0x493c | goto label_4;
| }
0x000045a4 lw v1, (v0) | v1 = *(v0);
0x000045a8 addiu v1, zero, -1 | v1 = -1;
| if (v1 == 0) {
0x000045ac beqz v1, 0x4b84 | goto label_28;
| }
| label_8:
0x000045b0 lw t9, -0x7f18(gp) | t9 = sym.select_default_activity;
0x000045b4 lw a0, -0x7fac(gp) | a0 = *(gp);
0x000045b8 jalr t9 | t9 ();
0x000045bc nop |
0x000045c0 lw gp, 0x18(sp) | gp = *(var_18h);
0x000045c4 lw t9, -0x7f14(gp) | t9 = sym.check_format_options;
0x000045c8 bal 0x5368 | sym_check_format_options ();
0x000045cc nop |
0x000045d0 lw gp, 0x18(sp) | gp = *(var_18h);
0x000045d4 lw v0, -0x7f7c(gp) | v0 = *(gp);
0x000045d8 lw v1, (v0) | v1 = *(v0);
| if (v1 < 0) {
0x000045dc bgezl v1, 0x45f0 |
0x000045e0 lw v1, (s1) | v1 = *(s1);
0x000045e4 addiu v1, zero, 1 | v1 = 1;
0x000045e8 sw v1, (v0) | *(v0) = v1;
0x000045ec lw v1, (s1) | v1 = *(s1);
| }
0x000045f0 addiu v0, zero, 6 | v0 = 6;
0x000045f4 lw t9, -0x7f10(gp) | t9 = sym.read_stats_from_file;
| if (v1 == v0) {
0x000045f8 beq v1, v0, 0x4ca4 | goto label_29;
| }
0x000045fc addiu a1, sp, 0x24c | a1 = sp + 0x24c;
0x00004600 addiu a0, sp, 0x4c | a0 = sp + 0x4c;
0x00004604 bal 0x7eb4 | sym_read_stats_from_file ();
0x00004608 lw gp, 0x18(sp) | gp = *(var_18h);
| label_12:
0x0000460c lw t9, -0x7f0c(gp) | t9 = sym.free_bitmaps;
0x00004610 lw a0, -0x7fac(gp) | a0 = *(gp);
0x00004614 jalr t9 | t9 ();
0x00004618 nop |
0x0000461c lw v0, 0x2c(sp) | v0 = *(var_2ch);
0x00004620 lw a0, 0x44c(sp) | a0 = *(var_44ch);
0x00004624 lw gp, 0x18(sp) | gp = *(var_18h);
0x00004628 lw v1, (v0) | v1 = *(v0);
0x0000462c move v0, zero | v0 = 0;
| if (a0 != v1) {
0x00004630 bne a0, v1, 0x50d8 | goto label_30;
| }
0x00004634 lw ra, 0x474(sp) | ra = *(var_474h);
0x00004638 lw fp, 0x470(sp) | fp = *(var_470h);
0x0000463c lw s7, 0x46c(sp) | s7 = *(var_46ch);
0x00004640 lw s6, 0x468(sp) | s6 = *(var_468h);
0x00004644 lw s5, 0x464(sp) | s5 = *(var_464h);
0x00004648 lw s4, 0x460(sp) | s4 = *(var_460h);
0x0000464c lw s3, 0x45c(sp) | s3 = *(var_45ch);
0x00004650 lw s2, 0x458(sp) | s2 = *(var_458h);
0x00004654 lw s1, 0x454(sp) | s1 = *(var_454h);
0x00004658 lw s0, 0x450(sp) | s0 = *(var_450h);
0x0000465c addiu sp, sp, 0x478 |
0x00004660 jr ra | return v0;
| label_21:
0x00004664 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x00004668 lw t9, -0x7b50(gp) | t9 = sym.imp.strcmp;
| /* esilref: '-P' */
0x0000466c addiu a1, a1, -0x3cbc | a1 += -0x3cbc;
0x00004670 move a0, s1 | a0 = s1;
0x00004674 jalr t9 | t9 ();
0x00004678 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x0000467c beqz v0, 0x4790 |
0x00004680 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x00004684 lw t9, -0x7c4c(gp) | t9 = sym.imp.strncmp;
0x00004688 addiu a2, zero, 6 | a2 = 6;
| /* str.__dev */
0x0000468c addiu a1, a1, -0x3cb8 | a1 += -0x3cb8;
0x00004690 move a0, s1 | a0 = s1;
0x00004694 jalr t9 | t9 ();
0x00004698 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0000469c beqz v0, 0x47a0 | goto label_31;
| }
0x000046a0 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x000046a4 lw t9, -0x7c4c(gp) | t9 = sym.imp.strncmp;
0x000046a8 addiu a2, zero, 5 | a2 = 5;
| /* str.__fs */
0x000046ac addiu a1, a1, -0x3cb0 | a1 += -0x3cb0;
0x000046b0 move a0, s1 | a0 = s1;
0x000046b4 jalr t9 | t9 ();
0x000046b8 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x000046bc beqz v0, 0x47f4 | goto label_32;
| }
0x000046c0 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x000046c4 lw t9, -0x7c4c(gp) | t9 = sym.imp.strncmp;
0x000046c8 addiu a2, zero, 8 | a2 = 8;
| /* str.__iface */
0x000046cc addiu a1, a1, -0x3ca8 | a1 += -0x3ca8;
0x000046d0 move a0, s1 | a0 = s1;
0x000046d4 jalr t9 | t9 ();
0x000046d8 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x000046dc beqz v0, 0x4830 | goto label_33;
| }
0x000046e0 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x000046e4 lw t9, -0x7b50(gp) | t9 = sym.imp.strcmp;
| /* esilref: '-s' */
0x000046e8 addiu a1, a1, -0x3c9c | a1 += -0x3c9c;
0x000046ec move a0, s1 | a0 = s1;
0x000046f0 jalr t9 | t9 ();
0x000046f4 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x000046f8 beqz v0, 0x48c8 | goto label_34;
| }
0x000046fc lw a1, -0x7fdc(gp) | a1 = *(gp);
0x00004700 lw t9, -0x7b50(gp) | t9 = sym.imp.strcmp;
| /* esilref: '-e' */
0x00004704 addiu a1, a1, -0x3c8c | a1 += -0x3c8c;
0x00004708 move a0, s1 | a0 = s1;
0x0000470c jalr t9 | t9 ();
0x00004710 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00004714 beqz v0, 0x48dc | goto label_35;
| }
0x00004718 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x0000471c lw t9, -0x7b50(gp) | t9 = sym.imp.strcmp;
| /* esilref: '-O' */
0x00004720 addiu a1, a1, -0x3c7c | a1 += -0x3c7c;
0x00004724 move a0, s1 | a0 = s1;
0x00004728 jalr t9 | t9 ();
0x0000472c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00004730 beqz v0, 0x4948 | goto label_36;
| }
0x00004734 lw t9, -0x7be4(gp) | t9 = sym.imp.strlen;
0x00004738 move a0, s1 | a0 = s1;
0x0000473c jalr t9 | t9 ();
0x00004740 sw v0, 0x24(sp) | *(var_24h) = v0;
0x00004744 addiu v0, v0, -2 | v0 += -2;
0x00004748 sltiu v0, v0, 2 | v0 = (v0 < 2) ? 1 : 0;
0x0000474c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x00004750 beqz v0, 0x4764 |
0x00004754 lbu v1, (s1) | v1 = *(s1);
0x00004758 addiu v0, zero, 0x2d | v0 = 0x2d;
0x0000475c lw a1, -0x7fdc(gp) | a1 = *(gp);
| if (v1 == v0) {
0x00004760 beq v1, v0, 0x4d54 | goto label_37;
| }
| }
| label_17:
0x00004764 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x00004768 lw t9, -0x7b50(gp) | t9 = sym.imp.strcmp;
| /* esilref: '--' */
0x0000476c addiu a1, a1, -0x3bf4 | a1 += -0x3bf4;
0x00004770 move a0, s1 | a0 = s1;
0x00004774 jalr t9 | t9 ();
0x00004778 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x0000477c bnez v0, 0x48f0 | goto label_38;
| }
0x00004780 addiu s2, s2, 1 | s2++;
0x00004784 sw s2, 0x48(sp) | *(var_48h) = s2;
0x00004788 addiu s6, zero, 1 | s6 = 1;
0x0000478c b 0x44c0 | goto label_0;
| }
0x00004790 lw t9, -0x7f08(gp) | t9 = sym.parse_sa_P_opt;
0x00004794 lw a3, -0x7fac(gp) | a3 = *(gp);
0x00004798 lw a2, -0x7fcc(gp) | a2 = *(gp);
0x0000479c b 0x4500 | goto label_1;
| label_31:
0x000047a0 lw t9, -0x7f80(gp) | t9 = sym.get_activity_position;
0x000047a4 lw a0, -0x7fac(gp) | a0 = *(gp);
0x000047a8 addiu a1, zero, 0xb | a1 = 0xb;
0x000047ac addiu a2, zero, 1 | a2 = 1;
0x000047b0 jalr t9 | t9 ();
0x000047b4 lw gp, 0x18(sp) | gp = *(var_18h);
0x000047b8 lw a0, 0x48(sp) | a0 = *(var_48h);
0x000047bc sll v0, v0, 2 | v0 <<= 2;
0x000047c0 sll a0, a0, 2 | a0 <<= 2;
0x000047c4 lw a1, -0x7fac(gp) | a1 = *(gp);
0x000047c8 lwx a0, a0(s3) | __asm ("lwx a0, a0(s3)");
0x000047cc lw t9, -0x7f04(gp) | t9 = sym.parse_sa_devices;
0x000047d0 lwx a1, v0(a1) | __asm ("lwx a1, v0(a1)");
0x000047d4 addiu v0, zero, 6 | v0 = 6;
| do {
0x000047d8 sw v0, 0x10(sp) | *(var_10h_2) = v0;
0x000047dc addiu a3, sp, 0x48 | a3 = sp + 0x48;
0x000047e0 addiu a2, zero, 0x80 | a2 = 0x80;
0x000047e4 jalr t9 | t9 ();
0x000047e8 lw gp, 0x18(sp) | gp = *(var_18h);
0x000047ec lw s2, 0x48(sp) | s2 = *(var_48h);
0x000047f0 b 0x4518 | goto label_2;
| label_32:
0x000047f4 lw t9, -0x7f80(gp) | t9 = sym.get_activity_position;
0x000047f8 lw a0, -0x7fac(gp) | a0 = *(gp);
0x000047fc addiu a1, zero, 0x25 | a1 = 0x25;
0x00004800 addiu a2, zero, 1 | a2 = 1;
0x00004804 jalr t9 | t9 ();
0x00004808 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000480c lw a0, 0x48(sp) | a0 = *(var_48h);
0x00004810 sll v0, v0, 2 | v0 <<= 2;
0x00004814 lw a1, -0x7fac(gp) | a1 = *(gp);
0x00004818 sll a0, a0, 2 | a0 <<= 2;
0x0000481c lw t9, -0x7f04(gp) | t9 = sym.parse_sa_devices;
0x00004820 lwx a1, v0(a1) | __asm ("lwx a1, v0(a1)");
0x00004824 lwx a0, a0(s3) | __asm ("lwx a0, a0(s3)");
0x00004828 addiu v0, zero, 5 | v0 = 5;
0x0000482c b 0x47d8 |
| } while (1);
| label_33:
0x00004830 lw t9, -0x7f80(gp) | t9 = sym.get_activity_position;
0x00004834 lw a0, -0x7fac(gp) | a0 = *(gp);
0x00004838 addiu a2, zero, 1 | a2 = 1;
0x0000483c addiu a1, zero, 0xc | a1 = 0xc;
0x00004840 jalr t9 | t9 ();
0x00004844 lw gp, 0x18(sp) | gp = *(var_18h);
0x00004848 lw a0, 0x48(sp) | a0 = *(var_48h);
0x0000484c sll v0, v0, 2 | v0 <<= 2;
0x00004850 lw s0, -0x7fac(gp) | s0 = *(gp);
0x00004854 sll a0, a0, 2 | a0 <<= 2;
0x00004858 addu s1, s0, v0 | s1 = s0 + v0;
0x0000485c lwx a0, a0(s3) | __asm ("lwx a0, a0(s3)");
0x00004860 lw t9, -0x7f04(gp) | t9 = sym.parse_sa_devices;
0x00004864 lw a1, (s1) | a1 = *(s1);
0x00004868 addiu v0, zero, 8 | v0 = 8;
0x0000486c addiu a3, sp, 0x48 | a3 = sp + 0x48;
0x00004870 addiu a2, zero, 0x10 | a2 = 0x10;
0x00004874 sw v0, 0x10(sp) | *(var_10h_2) = v0;
0x00004878 jalr t9 | t9 ();
0x0000487c lw gp, 0x18(sp) | gp = *(var_18h);
0x00004880 addiu a1, zero, 0xd | a1 = 0xd;
0x00004884 move a0, s0 | a0 = s0;
0x00004888 lw t9, -0x7f80(gp) | t9 = sym.get_activity_position;
0x0000488c addiu a2, zero, 1 | a2 = 1;
0x00004890 jalr t9 | t9 ();
0x00004894 sll v0, v0, 2 | v0 <<= 2;
0x00004898 lw a0, (s1) | a0 = *(s1);
0x0000489c lwx v0, v0(s0) | __asm ("lwx v0, v0(s0)");
0x000048a0 lw gp, 0x18(sp) | gp = *(var_18h);
0x000048a4 lw a1, 0x40(a0) | a1 = *((a0 + 16));
0x000048a8 lw v1, 4(v0) | v1 = *((v0 + 1));
0x000048ac lw a0, 0x44(a0) | a0 = *((a0 + 17));
0x000048b0 ori v1, v1, 0x100 | v1 |= aav.0x00000100;
0x000048b4 lw s2, 0x48(sp) | s2 = *(var_48h);
0x000048b8 sw a1, 0x40(v0) | *((v0 + 16)) = a1;
0x000048bc sw a0, 0x44(v0) | *((v0 + 17)) = a0;
0x000048c0 sw v1, 4(v0) | *((v0 + 1)) = v1;
0x000048c4 b 0x44c0 | goto label_0;
| label_34:
0x000048c8 lw a3, -0x7fdc(gp) | a3 = *(gp);
0x000048cc lw t9, -0x7f00(gp) | t9 = sym.parse_timestamp;
0x000048d0 lw a2, -0x7fa0(gp) | a2 = *(gp);
| /* str.08:00:00 */
0x000048d4 addiu a3, a3, -0x3c98 | a3 += -0x3c98;
0x000048d8 b 0x4500 | goto label_1;
| label_35:
0x000048dc lw a3, -0x7fdc(gp) | a3 = *(gp);
0x000048e0 lw t9, -0x7f00(gp) | t9 = sym.parse_timestamp;
0x000048e4 lw a2, -0x7fa4(gp) | a2 = *(gp);
| /* str.18:00:00 */
0x000048e8 addiu a3, a3, -0x3c88 | a3 += -0x3c88;
0x000048ec b 0x4500 | goto label_1;
| label_38:
0x000048f0 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x000048f4 lw t9, -0x7b50(gp) | t9 = sym.imp.strcmp;
| /* esilref: '-m' */
0x000048f8 addiu a1, a1, -0x3bf0 | a1 += -0x3bf0;
0x000048fc move a0, s1 | a0 = s1;
0x00004900 jalr t9 | t9 ();
0x00004904 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x00004908 bnez v0, 0x4c04 | goto label_39;
| }
0x0000490c lw v0, 4(s0) | v0 = *((s0 + 1));
0x00004910 addiu s2, s2, 1 | s2++;
0x00004914 sw s2, 0x48(sp) | *(var_48h) = s2;
| if (v0 == 0) {
0x00004918 beqz v0, 0x493c | goto label_4;
| }
0x0000491c lw t9, -0x7efc(gp) | t9 = sym.parse_sar_m_opt;
| if (s6 == 0) {
0x00004920 beqz s6, 0x493c | goto label_4;
| }
0x00004924 lw a2, -0x7fac(gp) | a2 = *(gp);
| label_16:
0x00004928 addiu a1, sp, 0x48 | a1 = sp + 0x48;
0x0000492c move a0, s3 | a0 = s3;
0x00004930 jalr t9 | t9 ();
0x00004934 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00004938 beqz v0, 0x4514 | goto label_3;
| }
| do {
| label_4:
0x0000493c lw t9, -0x7ef8(gp) | t9 = sym.usage;
| label_19:
0x00004940 lw a0, (s3) | a0 = *(s3);
0x00004944 bal 0x5260 | sym_usage ();
| label_36:
0x00004948 lw a0, 4(s0) | a0 = *((s0 + 1));
0x0000494c addiu s2, s2, 1 | s2++;
0x00004950 sw s2, 0x48(sp) | *(var_48h) = s2;
0x00004954 beqz a0, 0x493c |
| } while (a0 == 0);
0x00004958 lw s0, -0x7fdc(gp) | s0 = *(gp);
| if (s6 != 0) {
0x0000495c bnez s6, 0x493c | goto label_4;
| }
0x00004960 lw t9, -0x7c28(gp) | t9 = sym.imp.strtok;
| /* esilref: '' */
0x00004964 addiu a1, s0, -0x2644 | a1 = s0 + -0x2644;
0x00004968 jalr t9 | t9 ();
0x0000496c move s2, v0 | s2 = v0;
0x00004970 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00004974 beqz v0, 0x4a2c | goto label_18;
| }
0x00004978 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x0000497c lw s1, -0x7fdc(gp) | s1 = *(gp);
0x00004980 sw v0, 0x24(sp) | *(var_24h) = v0;
0x00004984 lw v0, -0x7fdc(gp) | v0 = *(gp);
| /* str.showinfo */
0x00004988 addiu v0, v0, -0x3c4c | v0 += -0x3c4c;
0x0000498c sw v0, 0x34(sp) | *(var_34h) = v0;
0x00004990 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00004994 sw v0, 0x40(sp) | *(var_40h) = v0;
0x00004998 b 0x49cc |
| while (v0 == 0) {
| label_7:
0x0000499c lw v1, -0x7fcc(gp) | v1 = *(gp);
0x000049a0 lui a0, 1 | a0 = 0x10000;
0x000049a4 lw v0, (v1) | v0 = *(v1);
0x000049a8 or v0, v0, a0 | v0 |= a0;
0x000049ac sw v0, (v1) | *(v1) = v0;
| label_6:
0x000049b0 lw t9, -0x7c28(gp) | t9 = sym.imp.strtok;
| /* esilref: '' */
0x000049b4 addiu a1, s0, -0x2644 | a1 = s0 + -0x2644;
0x000049b8 move a0, zero | a0 = 0;
0x000049bc jalr t9 | t9 ();
0x000049c0 move s2, v0 | s2 = v0;
0x000049c4 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x000049c8 beqz v0, 0x4a2c | goto label_18;
| }
| label_5:
0x000049cc lw t9, -0x7b50(gp) | t9 = sym.imp.strcmp;
| /* str.skipempty */
0x000049d0 addiu a1, s1, -0x3c78 | a1 = s1 + -0x3c78;
0x000049d4 move a0, s2 | a0 = s2;
0x000049d8 jalr t9 | t9 ();
0x000049dc lw gp, 0x18(sp) | gp = *(var_18h);
0x000049e0 beqz v0, 0x499c |
| }
0x000049e4 lw t9, -0x7b50(gp) | t9 = sym.imp.strcmp;
0x000049e8 move a1, s7 | a1 = s7;
0x000049ec move a0, s2 | a0 = s2;
0x000049f0 jalr t9 | t9 ();
0x000049f4 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x000049f8 bnez v0, 0x4a3c | goto label_40;
| }
0x000049fc lw v1, -0x7fcc(gp) | v1 = *(gp);
0x00004a00 lui a0, 2 | a0 = 0x20000;
0x00004a04 lw t9, -0x7c28(gp) | t9 = sym.imp.strtok;
0x00004a08 lw v0, (v1) | v0 = *(v1);
| /* esilref: '' */
0x00004a0c addiu a1, s0, -0x2644 | a1 = s0 + -0x2644;
0x00004a10 or v0, v0, a0 | v0 |= a0;
0x00004a14 sw v0, (v1) | *(v1) = v0;
0x00004a18 move a0, zero | a0 = 0;
0x00004a1c jalr t9 | t9 ();
0x00004a20 move s2, v0 | s2 = v0;
0x00004a24 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x00004a28 bnez v0, 0x49cc | goto label_5;
| }
| label_18:
0x00004a2c lw s2, 0x48(sp) | s2 = *(var_48h);
0x00004a30 addiu s2, s2, 1 | s2++;
0x00004a34 sw s2, 0x48(sp) | *(var_48h) = s2;
0x00004a38 b 0x44c0 | goto label_0;
| label_40:
0x00004a3c lw t9, -0x7b50(gp) | t9 = sym.imp.strcmp;
0x00004a40 move a1, fp | a1 = fp;
0x00004a44 move a0, s2 | a0 = s2;
0x00004a48 jalr t9 | t9 ();
0x00004a4c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00004a50 bnez v0, 0x4a6c |
0x00004a54 lw v1, -0x7fcc(gp) | v1 = *(gp);
0x00004a58 lui a0, 4 | a0 = 0x40000;
0x00004a5c lw v0, (v1) | v0 = *(v1);
0x00004a60 or v0, v0, a0 | v0 |= a0;
0x00004a64 sw v0, (v1) | *(v1) = v0;
0x00004a68 b 0x49b0 | goto label_6;
| }
0x00004a6c lw v0, 0x24(sp) | v0 = *(var_24h);
0x00004a70 lw t9, -0x7b50(gp) | t9 = sym.imp.strcmp;
0x00004a74 addiu a1, v0, -0x3c58 | a1 = v0 + -0x3c58;
0x00004a78 move a0, s2 | a0 = s2;
0x00004a7c jalr t9 | t9 ();
0x00004a80 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00004a84 bnez v0, 0x4aa0 |
0x00004a88 lw v1, -0x7fcc(gp) | v1 = *(gp);
0x00004a8c lui a0, 8 | a0 = 0x80000;
0x00004a90 lw v0, (v1) | v0 = *(v1);
0x00004a94 or v0, v0, a0 | v0 |= a0;
0x00004a98 sw v0, (v1) | *(v1) = v0;
0x00004a9c b 0x49b0 | goto label_6;
| }
0x00004aa0 lw t9, -0x7b50(gp) | t9 = sym.imp.strcmp;
0x00004aa4 lw a1, 0x34(sp) | a1 = *(var_34h);
0x00004aa8 move a0, s2 | a0 = s2;
0x00004aac jalr t9 | t9 ();
0x00004ab0 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00004ab4 bnez v0, 0x4ad0 |
0x00004ab8 lw v1, -0x7fcc(gp) | v1 = *(gp);
0x00004abc lui a0, 0x80 | a0 = 0x800000;
0x00004ac0 lw v0, (v1) | v0 = *(v1);
0x00004ac4 or v0, v0, a0 | v0 |= a0;
0x00004ac8 sw v0, (v1) | *(v1) = v0;
0x00004acc b 0x49b0 | goto label_6;
| }
0x00004ad0 lw v0, 0x40(sp) | v0 = *(var_40h);
0x00004ad4 lw t9, -0x7b50(gp) | t9 = sym.imp.strcmp;
0x00004ad8 addiu a1, v0, -0x3c40 | a1 = v0 + -0x3c40;
0x00004adc move a0, s2 | a0 = s2;
0x00004ae0 jalr t9 | t9 ();
0x00004ae4 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00004ae8 beqz v0, 0x499c | goto label_7;
| }
0x00004aec lw a1, -0x7fdc(gp) | a1 = *(gp);
0x00004af0 lw t9, -0x7c4c(gp) | t9 = sym.imp.strncmp;
0x00004af4 addiu a2, zero, 7 | a2 = 7;
| /* str.height */
0x00004af8 addiu a1, a1, -0x3c38 | a1 += -0x3c38;
0x00004afc move a0, s2 | a0 = s2;
0x00004b00 jalr t9 | t9 ();
0x00004b04 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x00004b08 bnez v0, 0x4d20 | goto label_41;
| }
0x00004b0c lb v0, 7(s2) | v0 = *((s2 + 7));
0x00004b10 addiu s2, s2, 7 | s2 += 7;
| if (v0 == 0) {
0x00004b14 beqz v0, 0x493c | goto label_4;
| }
0x00004b18 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x00004b1c lw t9, -0x7c60(gp) | t9 = sym.imp.strspn;
| /* str.0123456789 */
0x00004b20 addiu a1, a1, -0x3c30 | a1 += -0x3c30;
0x00004b24 move a0, s2 | a0 = s2;
0x00004b28 jalr t9 | t9 ();
0x00004b2c lw gp, 0x18(sp) | gp = *(var_18h);
0x00004b30 move a0, s2 | a0 = s2;
0x00004b34 lw t9, -0x7be4(gp) | t9 = sym.imp.strlen;
0x00004b38 sw v0, 0x44(sp) | *(var_44h) = v0;
0x00004b3c jalr t9 | t9 ();
0x00004b40 lw a1, 0x44(sp) | a1 = *(var_44h);
0x00004b44 lw gp, 0x18(sp) | gp = *(var_18h);
| if (a1 != v0) {
0x00004b48 bne a1, v0, 0x493c | goto label_4;
| }
0x00004b4c lw t9, -0x7c54(gp) | t9 = sym.imp.strtol;
0x00004b50 move a1, zero | a1 = 0;
0x00004b54 move a0, s2 | a0 = s2;
0x00004b58 addiu a2, zero, 0xa | a2 = 0xa;
0x00004b5c jalr t9 | t9 ();
0x00004b60 lw gp, 0x18(sp) | gp = *(var_18h);
0x00004b64 lw a0, -0x7fcc(gp) | a0 = *(gp);
0x00004b68 lw a1, -0x7f44(gp) | a1 = *(gp);
0x00004b6c lw v1, (a0) | v1 = *(a0);
0x00004b70 sw v0, (a1) | *(a1) = v0;
0x00004b74 lui v0, 0x20 | v0 = 0x200000;
0x00004b78 or v1, v1, v0 | v1 |= v0;
0x00004b7c sw v1, (a0) | *(a0) = v1;
0x00004b80 b 0x49b0 | goto label_6;
| label_28:
0x00004b84 sw v1, (v0) | *(v0) = v1;
0x00004b88 b 0x45b0 | goto label_8;
| label_26:
0x00004b8c lw v0, 0xc(a1) | v0 = *((a1 + 3));
| if (v0 == 0) {
0x00004b90 beql v0, zero, 0x4574 | goto label_9;
| }
0x00004b94 lw v0, (s0) | v0 = *(s0);
0x00004b98 lw v1, 8(a1) | v1 = *((a1 + 2));
0x00004b9c lw v0, 8(a0) | v0 = *((a0 + 2));
0x00004ba0 slt v0, v1, v0 | v0 = (v1 < v0) ? 1 : 0;
| if (v0 == 0) {
0x00004ba4 beql v0, zero, 0x4574 | goto label_9;
| }
0x00004ba8 lw v0, (s0) | v0 = *(s0);
0x00004bac addiu v1, v1, 0x18 | v1 += 0x18;
0x00004bb0 sw v1, 8(a1) | *((a1 + 2)) = v1;
0x00004bb4 b 0x4570 | goto label_10;
| label_24:
0x00004bb8 addiu v1, zero, 9 | v1 = 9;
0x00004bbc lw a0, 0x30(sp) | a0 = *(var_30h);
| if (v0 == v1) {
0x00004bc0 bnel v0, v1, 0x4564 | goto label_11;
| }
0x00004bc4 lw t9, -0x7c1c(gp) | t9 = sym.imp.__strcpy_chk
0x00004bc8 addiu a2, zero, 0x200 | a2 = aav.0x00000200;
0x00004bcc addiu a1, sp, 0x4c | a1 = sp + 0x4c;
0x00004bd0 addiu a0, sp, 0x24c | a0 = sp + 0x24c;
0x00004bd4 jalr t9 | t9 ();
0x00004bd8 lw gp, 0x18(sp) | gp = *(var_18h);
0x00004bdc lw v0, -0x7b6c(gp) | v0 = *((gp - 7899));
| label_25:
0x00004be0 lw a0, -0x7fdc(gp) | a0 = *(gp);
0x00004be4 lw t9, -0x7bb0(gp) | t9 = sym.imp.fwrite;
0x00004be8 lw a3, (v0) | a3 = *(v0);
| /* str.PCP_support_not_compiled_in_n */
0x00004bec addiu a0, a0, -0x3be8 | a0 += -0x3be8;
0x00004bf0 addiu a2, zero, 0x1c | a2 = 0x1c;
0x00004bf4 addiu a1, zero, 1 | a1 = 1;
0x00004bf8 jalr t9 | t9 ();
0x00004bfc lw gp, 0x18(sp) | gp = *(var_18h);
0x00004c00 b 0x4e44 | goto label_42;
| label_39:
0x00004c04 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x00004c08 lw t9, -0x7b50(gp) | t9 = sym.imp.strcmp;
| /* esilref: '-n' */
0x00004c0c addiu a1, a1, -0x3bec | a1 += -0x3bec;
0x00004c10 move a0, s1 | a0 = s1;
0x00004c14 jalr t9 | t9 ();
0x00004c18 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00004c1c beqz v0, 0x4d00 | goto label_43;
| }
0x00004c20 lbu v1, (s1) | v1 = *(s1);
0x00004c24 addiu v0, zero, 0x2d | v0 = 0x2d;
0x00004c28 lw a1, -0x7fdc(gp) | a1 = *(gp);
| if (v1 == v0) {
0x00004c2c beq v1, v0, 0x4e10 | goto label_44;
| }
0x00004c30 lw t9, -0x7c60(gp) | t9 = sym.imp.strspn;
| /* str.0123456789 */
0x00004c34 addiu a1, a1, -0x3c30 | a1 += -0x3c30;
0x00004c38 move a0, s1 | a0 = s1;
0x00004c3c jalr t9 | t9 ();
0x00004c40 lw v1, 0x24(sp) | v1 = *(var_24h);
0x00004c44 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v1 == v0) {
0x00004c48 beq v1, v0, 0x4fec | goto label_45;
| }
0x00004c4c lb v0, 0x4c(sp) | v0 = *(var_4ch);
0x00004c50 lw v0, 0x3c(sp) | v0 = *(var_3ch);
| if (v0 != 0) {
0x00004c54 bnez v0, 0x493c | goto label_4;
| }
0x00004c58 lw t9, -0x7c00(gp) | t9 = sym.imp.strncpy;
| if (v0 != 0) {
0x00004c5c bnez v0, 0x493c | goto label_4;
| }
0x00004c60 addiu v1, sp, 0x4c | v1 = sp + 0x4c;
0x00004c64 addiu s2, s2, 1 | s2++;
0x00004c68 move a0, v1 | a0 = v1;
0x00004c6c addiu a2, zero, 0x200 | a2 = aav.0x00000200;
0x00004c70 move a1, s1 | a1 = s1;
0x00004c74 sw s2, 0x48(sp) | *(var_48h) = s2;
0x00004c78 jalr t9 | t9 ();
0x00004c7c lw gp, 0x18(sp) | gp = *(var_18h);
0x00004c80 addiu a2, zero, -1 | a2 = -1;
0x00004c84 move a1, zero | a1 = 0;
0x00004c88 lw t9, -0x7ef4(gp) | t9 = sym.check_alt_sa_dir;
0x00004c8c move a0, v0 | a0 = v0;
0x00004c90 sb zero, 0x24b(sp) | *(var_24bh) = 0;
0x00004c94 jalr t9 | t9 ();
0x00004c98 lw gp, 0x18(sp) | gp = *(var_18h);
0x00004c9c lw s2, 0x48(sp) | s2 = *(var_48h);
0x00004ca0 b 0x4518 | goto label_2;
| label_29:
0x00004ca4 lw t9, -0x7ef0(gp) | t9 = sym.convert_file;
0x00004ca8 lw a1, -0x7fac(gp) | a1 = *(gp);
0x00004cac addiu a0, sp, 0x4c | a0 = sp + 0x4c;
0x00004cb0 bal 0xe7e4 | sym_convert_file ();
0x00004cb4 lw gp, 0x18(sp) | gp = *(var_18h);
0x00004cb8 b 0x460c | goto label_12;
| label_23:
0x00004cbc lw a1, 0x3c(sp) | a1 = *(var_3ch);
0x00004cc0 addiu a2, zero, -1 | a2 = -1;
0x00004cc4 addiu a0, sp, 0x4c | a0 = sp + 0x4c;
0x00004cc8 jalr t9 | t9 ();
0x00004ccc lw gp, 0x18(sp) | gp = *(var_18h);
0x00004cd0 b 0x4544 | goto label_13;
| label_22:
0x00004cd4 lw a0, -0x7fac(gp) | a0 = *(gp);
0x00004cd8 move a1, s0 | a1 = s0;
0x00004cdc jalr t9 | t9 ();
0x00004ce0 lw gp, 0x18(sp) | gp = *(var_18h);
0x00004ce4 b 0x4538 | goto label_14;
| label_27:
0x00004ce8 jalr t9 | t9 ();
0x00004cec nop |
0x00004cf0 lw gp, 0x18(sp) | gp = *(var_18h);
0x00004cf4 lw v1, -0x7eec(gp) | v1 = *(gp);
0x00004cf8 sw v0, (v1) | *(v1) = v0;
0x00004cfc b 0x4580 | goto label_15;
| label_43:
0x00004d00 lw v0, 4(s0) | v0 = *((s0 + 1));
0x00004d04 addiu s2, s2, 1 | s2++;
0x00004d08 sw s2, 0x48(sp) | *(var_48h) = s2;
| if (v0 == 0) {
0x00004d0c beqz v0, 0x493c | goto label_4;
| }
0x00004d10 lw t9, -0x7ee8(gp) | t9 = sym.parse_sar_n_opt;
| if (s6 == 0) {
0x00004d14 beqz s6, 0x493c | goto label_4;
| }
0x00004d18 lw a2, -0x7fac(gp) | a2 = *(gp);
0x00004d1c b 0x4928 | goto label_16;
| label_41:
0x00004d20 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x00004d24 lw t9, -0x7b50(gp) | t9 = sym.imp.strcmp;
| /* str.packed */
0x00004d28 addiu a1, a1, -0x3c24 | a1 += -0x3c24;
0x00004d2c move a0, s2 | a0 = s2;
0x00004d30 jalr t9 | t9 ();
0x00004d34 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x00004d38 bnez v0, 0x4dc8 | goto label_46;
| }
0x00004d3c lw v1, -0x7fcc(gp) | v1 = *(gp);
0x00004d40 lui a0, 0x40 | a0 = 0x400000;
0x00004d44 lw v0, (v1) | v0 = *(v1);
0x00004d48 or v0, v0, a0 | v0 |= a0;
0x00004d4c sw v0, (v1) | *(v1) = v0;
0x00004d50 b 0x49b0 | goto label_6;
| label_37:
0x00004d54 addiu a3, s1, 1 | a3 = s1 + 1;
0x00004d58 lw t9, -0x7c60(gp) | t9 = sym.imp.strspn;
0x00004d5c move a0, a3 | a0 = a3;
| /* str.0123456789 */
0x00004d60 addiu a1, a1, -0x3c30 | a1 += -0x3c30;
0x00004d64 sw a3, 0x34(sp) | *(var_34h) = a3;
0x00004d68 jalr t9 | t9 ();
0x00004d6c lw v1, 0x24(sp) | v1 = *(var_24h);
0x00004d70 addiu a1, zero, 1 | a1 = 1;
0x00004d74 xori v1, v1, 2 | v1 ^= 2;
0x00004d78 addiu a0, zero, 2 | a0 = 2;
| if (v1 != 0) {
0x00004d7c movz a0, a1, v1 | a0 = a1;
| }
0x00004d80 lw gp, 0x18(sp) | gp = *(var_18h);
0x00004d84 lw a3, 0x34(sp) | a3 = *(var_34h);
| if (v0 != a0) {
0x00004d88 bne v0, a0, 0x4764 | goto label_17;
| }
0x00004d8c lb v0, 0x4c(sp) | v0 = *(var_4ch);
0x00004d90 lw v0, 0x3c(sp) | v0 = *(var_3ch);
| if (v0 != 0) {
0x00004d94 bnez v0, 0x493c | goto label_4;
| }
0x00004d98 lw t9, -0x7c54(gp) | t9 = sym.imp.strtol;
| if (v0 != 0) {
0x00004d9c bnez v0, 0x493c | goto label_4;
| }
0x00004da0 addiu s2, s2, 1 | s2++;
0x00004da4 sw s2, 0x48(sp) | *(var_48h) = s2;
0x00004da8 addiu a2, zero, 0xa | a2 = 0xa;
0x00004dac move a1, zero | a1 = 0;
0x00004db0 move a0, a3 | a0 = a3;
0x00004db4 jalr t9 | t9 ();
0x00004db8 sw v0, 0x3c(sp) | *(var_3ch) = v0;
0x00004dbc lw gp, 0x18(sp) | gp = *(var_18h);
0x00004dc0 lw s2, 0x48(sp) | s2 = *(var_48h);
0x00004dc4 b 0x44c0 | goto label_0;
| label_46:
0x00004dc8 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x00004dcc lw t9, -0x7b50(gp) | t9 = sym.imp.strcmp;
| /* str.showtoc */
0x00004dd0 addiu a1, a1, -0x3c1c | a1 += -0x3c1c;
0x00004dd4 move a0, s2 | a0 = s2;
0x00004dd8 jalr t9 | t9 ();
0x00004ddc lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00004de0 beqz v0, 0x4e50 | goto label_47;
| }
0x00004de4 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x00004de8 lw t9, -0x7b50(gp) | t9 = sym.imp.strcmp;
| /* str.customcol */
0x00004dec addiu a1, a1, -0x3c14 | a1 += -0x3c14;
0x00004df0 move a0, s2 | a0 = s2;
0x00004df4 jalr t9 | t9 ();
0x00004df8 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x00004dfc bnez v0, 0x5040 | goto label_48;
| }
0x00004e00 lw v0, -0x7ee4(gp) | v0 = *(gp);
0x00004e04 addiu v1, zero, 1 | v1 = 1;
0x00004e08 sw v1, (v0) | *(v0) = v1;
0x00004e0c b 0x49b0 | goto label_6;
| label_44:
0x00004e10 lw t9, -0x7ee0(gp) | t9 = sym.parse_sar_opt;
| if (s6 == 0) {
0x00004e14 beqz s6, 0x4e68 | goto label_49;
| }
0x00004e18 lw a3, -0x7fcc(gp) | a3 = *(gp);
0x00004e1c lw a2, -0x7fac(gp) | a2 = *(gp);
0x00004e20 addiu s0, zero, 1 | s0 = 1;
0x00004e24 sw s0, 0x10(sp) | *(var_10h_2) = s0;
0x00004e28 addiu a1, sp, 0x48 | a1 = sp + 0x48;
0x00004e2c move a0, s3 | a0 = s3;
0x00004e30 jalr t9 | t9 ();
0x00004e34 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00004e38 beqz v0, 0x4a2c | goto label_18;
| }
0x00004e3c lw t9, -0x7ef8(gp) | t9 = sym.usage;
| if (v0 == s0) {
0x00004e40 beq v0, s0, 0x4940 | goto label_19;
| }
| label_42:
0x00004e44 lw t9, -0x7bd0(gp) | t9 = sym.imp.exit;
0x00004e48 addiu a0, zero, 1 | a0 = 1;
0x00004e4c jalr t9 | t9 ();
| label_47:
0x00004e50 lw v1, -0x7fcc(gp) | v1 = *(gp);
0x00004e54 lui a0, 0x400 | a0 = 0x4000000;
0x00004e58 lw v0, (v1) | v0 = *(v1);
0x00004e5c or v0, v0, a0 | v0 |= a0;
0x00004e60 sw v0, (v1) | *(v1) = v0;
0x00004e64 b 0x49b0 | goto label_6;
| label_49:
0x00004e68 lb v0, 1(s1) | v0 = *((s1 + 1));
0x00004e6c addiu s0, zero, 1 | s0 = 1;
| if (v0 == 0) {
0x00004e70 beqz v0, 0x4a2c | goto label_18;
| }
0x00004e74 lw s1, -0x7fd0(gp) | s1 = *(gp);
0x00004e78 lw a0, -0x7fcc(gp) | a0 = *(gp);
0x00004e7c addiu a1, zero, 4 | a1 = 4;
0x00004e80 addiu v0, v0, -0x43 | v0 += -0x43;
0x00004e84 andi v0, v0, 0xff | v0 &= 0xff;
0x00004e88 sltiu v1, v0, 0x36 | v1 = (v0 < 0x36) ? 1 : 0;
0x00004e8c lw v1, 0x28(sp) | v1 = *(var_28h);
| if (v1 == 0) {
0x00004e90 beqz v1, 0x493c | goto label_4;
| }
0x00004e94 sll v0, v0, 2 | v0 <<= 2;
0x00004e98 lwx v0, v0(v1) | __asm ("lwx v0, v0(v1)");
0x00004e9c addu v0, v0, gp | v0 += gp;
0x00004ea0 jr v0 | v0 ();
0x00004ea4 nop |
| label_45:
0x00004fec lw s0, -0x7f7c(gp) | s0 = *(gp);
0x00004ff0 lw v0, (s0) | v0 = *(s0);
0x00004ff4 lw t9, -0x7c54(gp) | t9 = sym.imp.strtol;
| if (v0 < 0) {
0x00004ff8 bltz v0, 0x506c | goto label_50;
| }
0x00004ffc lw s0, -0x7f58(gp) | s0 = *(gp);
0x00005000 lw v0, (s0) | v0 = *(s0);
0x00005004 addiu a2, zero, 0xa | a2 = 0xa;
| if (v0 != 0) {
0x00005008 bnez v0, 0x493c | goto label_4;
| }
0x0000500c addiu s2, s2, 1 | s2++;
0x00005010 move a1, zero | a1 = 0;
0x00005014 move a0, s1 | a0 = s1;
0x00005018 sw s2, 0x48(sp) | *(var_48h) = s2;
0x0000501c jalr t9 | t9 ();
0x00005020 lw gp, 0x18(sp) | gp = *(var_18h);
0x00005024 sw v0, (s0) | *(s0) = v0;
| if (v0 < 0) {
0x00005028 bltz v0, 0x493c | goto label_4;
| }
0x0000502c lw s2, 0x48(sp) | s2 = *(var_48h);
| if (v0 != 0) {
0x00005030 bnez v0, 0x44c0 | goto label_0;
| }
0x00005034 addiu v0, zero, -1 | v0 = -1;
0x00005038 sw v0, (s0) | *(s0) = v0;
0x0000503c b 0x44c0 | goto label_0;
| label_48:
0x00005040 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x00005044 lw t9, -0x7b50(gp) | t9 = sym.imp.strcmp;
| /* str.bwcol */
0x00005048 addiu a1, a1, -0x3c08 | a1 += -0x3c08;
0x0000504c move a0, s2 | a0 = s2;
0x00005050 jalr t9 | t9 ();
0x00005054 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x00005058 bnez v0, 0x5098 | goto label_51;
| }
0x0000505c lw v0, -0x7ee4(gp) | v0 = *(gp);
0x00005060 addiu v1, zero, 2 | v1 = 2;
0x00005064 sw v1, (v0) | *(v0) = v1;
0x00005068 b 0x49b0 | goto label_6;
| label_50:
0x0000506c addiu s2, s2, 1 | s2++;
0x00005070 addiu a2, zero, 0xa | a2 = 0xa;
0x00005074 move a1, zero | a1 = 0;
0x00005078 move a0, s1 | a0 = s1;
0x0000507c sw s2, 0x48(sp) | *(var_48h) = s2;
0x00005080 jalr t9 | t9 ();
0x00005084 lw gp, 0x18(sp) | gp = *(var_18h);
0x00005088 sw v0, (s0) | *(s0) = v0;
| if (v0 <= 0) {
0x0000508c blez v0, 0x493c | goto label_4;
| }
0x00005090 lw s2, 0x48(sp) | s2 = *(var_48h);
0x00005094 b 0x4518 | goto label_2;
| label_51:
0x00005098 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x0000509c lw t9, -0x7c4c(gp) | t9 = sym.imp.strncmp;
0x000050a0 addiu a2, zero, 0xb | a2 = 0xb;
| /* str.pcparchive */
0x000050a4 addiu a1, a1, -0x3c00 | a1 += -0x3c00;
0x000050a8 move a0, s2 | a0 = s2;
0x000050ac jalr t9 | t9 ();
0x000050b0 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x000050b4 bnez v0, 0x493c | goto label_4;
| }
0x000050b8 lw t9, -0x7c00(gp) | t9 = sym.imp.strncpy;
0x000050bc addiu a2, zero, 0x200 | a2 = aav.0x00000200;
0x000050c0 addiu a1, s2, 0xb | a1 = s2 + 0xb;
0x000050c4 addiu a0, sp, 0x24c | a0 = sp + 0x24c;
0x000050c8 jalr t9 | t9 ();
0x000050cc lw gp, 0x18(sp) | gp = *(var_18h);
0x000050d0 sb zero, 0x44b(sp) | *(var_44bh) = 0;
0x000050d4 b 0x49b0 | goto label_6;
| label_30:
0x000050d8 lw t9, -0x7b90(gp) | t9 = sym.imp.__stack_chk_fail;
0x000050dc jalr t9 | t9 ();
0x000050e0 nop |
0x000050e4 nop |
0x000050e8 nop |
0x000050ec nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/sadf @ 0x8df0 */
| #include <stdint.h>
|
; (fcn) sym.print_dbppc_timestamp () | void print_dbppc_timestamp () {
| label_2:
0x00008df0 lui gp, 7 |
0x00008df4 addiu gp, gp, 0x61d0 |
0x00008df8 addu gp, gp, t9 | gp += t9;
0x00008dfc xori a0, a0, 1 | a0 ^= 1;
0x00008e00 addiu sp, sp, -0x1d8 |
0x00008e04 lw v0, -0x7ebc(gp) | v0 = *(gp);
0x00008e08 sltiu a0, a0, 1 | a0 = (a0 < 1) ? 1 : 0;
0x00008e0c sll a0, a0, 2 | a0 <<= 2;
0x00008e10 sw s1, 0x1c4(sp) | *(var_1c4h) = s1;
0x00008e14 lw s1, -0x7b7c(gp) | s1 = *((gp - 7903));
0x00008e18 lwx a0, a0(v0) | __asm ("lwx a0, a0(v0)");
0x00008e1c lw v0, 0x1f0(sp) | v0 = *(arg_1f0h);
0x00008e20 lw t0, (s1) | t0 = *(s1);
0x00008e24 sw v0, 0x20(sp) | *(var_20h) = v0;
0x00008e28 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00008e2c lw v1, 0x1f4(sp) | v1 = *(arg_1f4h);
0x00008e30 lw t9, -0x7b48(gp) | t9 = sym.imp.__snprintf_chk;
0x00008e34 sw s4, 0x1d0(sp) | *(var_1d0h) = s4;
0x00008e38 sw s0, 0x1c0(sp) | *(var_1c0h) = s0;
0x00008e3c move s4, a2 | s4 = a2;
0x00008e40 addiu a1, a1, 0x80 | a1 += 0x80;
| /* str._s_s_lld_s */
0x00008e44 addiu v0, v0, -0x29a4 | v0 += -0x29a4;
0x00008e48 addiu s0, sp, 0x3c | s0 = sp + 0x3c;
0x00008e4c sw gp, 0x30(sp) | *(var_30h) = gp;
0x00008e50 sw s2, 0x1c8(sp) | *(var_1c8h) = s2;
0x00008e54 sw a0, 0x28(sp) | *(var_28h) = a0;
0x00008e58 sw a0, 0x18(sp) | *(var_18h) = a0;
0x00008e5c sw a1, 0x14(sp) | *(var_14h) = a1;
0x00008e60 sw ra, 0x1d4(sp) | *(var_1d4h) = ra;
0x00008e64 sw s3, 0x1cc(sp) | *(var_1cch) = s3;
0x00008e68 move s2, a3 | s2 = a3;
0x00008e6c sw v1, 0x24(sp) | *(var_24h) = v1;
0x00008e70 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00008e74 addiu a3, zero, 0x80 | a3 = 0x80;
0x00008e78 addiu a2, zero, 1 | a2 = 1;
0x00008e7c addiu a1, zero, 0x80 | a1 = 0x80;
0x00008e80 move a0, s0 | a0 = s0;
0x00008e84 sw t0, 0x1bc(sp) | *(var_1bch) = t0;
0x00008e88 jalr t9 | t9 ();
0x00008e8c nop |
0x00008e90 lb v0, (s4) | v0 = *(s4);
0x00008e94 lw gp, 0x30(sp) | gp = *(var_30h);
| if (v0 == 0) {
0x00008e98 beqz v0, 0x8f78 | goto label_3;
| }
0x00008e9c lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00008ea0 lw t9, -0x7b48(gp) | t9 = sym.imp.__snprintf_chk;
0x00008ea4 addiu v0, v0, -0x2998 | v0 += -0x2998;
0x00008ea8 addiu s3, sp, 0xbc | s3 = sp + 0xbc;
0x00008eac sw s4, 0x18(sp) | *(var_18h) = s4;
0x00008eb0 sw s0, 0x14(sp) | *(var_14h) = s0;
0x00008eb4 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00008eb8 addiu a3, zero, 0x100 | a3 = aav.0x00000100;
0x00008ebc addiu a2, zero, 1 | a2 = 1;
0x00008ec0 addiu a1, zero, 0x100 | a1 = aav.0x00000100;
0x00008ec4 move a0, s3 | a0 = s3;
0x00008ec8 jalr t9 | t9 ();
0x00008ecc lb v0, (s4) | v0 = *(s4);
0x00008ed0 lw gp, 0x30(sp) | gp = *(var_30h);
| if (v0 != 0) {
0x00008ed4 beqz v0, 0x8ee4 |
0x00008ed8 lw v0, 0x1e8(sp) | v0 = *(arg_1e8h);
0x00008edc lw v0, -0x7fdc(gp) | v0 = *(gp);
| if (v0 != 0) {
0x00008ee0 bnez v0, 0x8f70 | goto label_4;
| }
| }
0x00008ee4 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00008ee8 addiu v0, v0, -0x2890 | v0 += -0x2890;
| do {
| label_0:
0x00008eec sw v0, 0x1c(sp) | *(var_1ch) = v0;
0x00008ef0 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00008ef4 lw s0, -0x7f98(gp) | s0 = *((gp - 8166));
0x00008ef8 lw t9, -0x7b48(gp) | t9 = sym.imp.__snprintf_chk;
| /* str._s_s_s */
0x00008efc addiu v0, v0, -0x2990 | v0 += -0x2990;
0x00008f00 addiu a0, s0, 0x7520 | a0 = s0 + 0x7520;
0x00008f04 sw s2, 0x18(sp) | *(var_18h) = s2;
0x00008f08 sw s3, 0x14(sp) | *(var_14h) = s3;
0x00008f0c sw v0, 0x10(sp) | *(var_10h) = v0;
0x00008f10 addiu a3, zero, 0x200 | a3 = aav.0x00000200;
0x00008f14 addiu a2, zero, 1 | a2 = 1;
0x00008f18 addiu a1, zero, 0x200 | a1 = aav.0x00000200;
0x00008f1c jalr t9 | t9 ();
0x00008f20 lw gp, 0x30(sp) | gp = *(var_30h);
0x00008f24 addiu s0, s0, 0x7520 | s0 += 0x7520;
0x00008f28 lw v0, -0x7fcc(gp) | v0 = *(gp);
0x00008f2c sb zero, 0x1ff(s0) | *((s0 + 511)) = 0;
0x00008f30 lw v0, (v0) | v0 = *(v0);
0x00008f34 andi v0, v0, 0x800 | v0 &= 0x800;
0x00008f38 lw a1, -0x7fdc(gp) | a1 = *(gp);
| if (v0 == 0) {
0x00008f3c bnel v0, zero, 0x8fa0 | goto label_5;
| }
| label_1:
0x00008f40 lw a0, 0x1bc(sp) | a0 = *(var_1bch);
0x00008f44 lw v1, (s1) | v1 = *(s1);
0x00008f48 move v0, s0 | v0 = s0;
| if (a0 != v1) {
0x00008f4c bne a0, v1, 0x8fbc | goto label_6;
| }
0x00008f50 lw ra, 0x1d4(sp) | ra = *(var_1d4h);
0x00008f54 lw s4, 0x1d0(sp) | s4 = *(var_1d0h);
0x00008f58 lw s3, 0x1cc(sp) | s3 = *(var_1cch);
0x00008f5c lw s2, 0x1c8(sp) | s2 = *(var_1c8h);
0x00008f60 lw s1, 0x1c4(sp) | s1 = *(var_1c4h);
0x00008f64 lw s0, 0x1c0(sp) | s0 = *(var_1c0h);
0x00008f68 addiu sp, sp, 0x1d8 |
0x00008f6c jr ra | return v0;
| label_4:
0x00008f70 addiu v0, v0, -0x2b6c | v0 += -0x2b6c;
0x00008f74 b 0x8eec |
| } while (1);
| label_3:
0x00008f78 lw t9, -0x7c1c(gp) | t9 = sym.imp.__strcpy_chk
0x00008f7c addiu s3, sp, 0xbc | s3 = sp + 0xbc;
0x00008f80 addiu a2, zero, 0x100 | a2 = aav.0x00000100;
0x00008f84 move a1, s0 | a1 = s0;
0x00008f88 move a0, s3 | a0 = s3;
0x00008f8c jalr t9 | t9 ();
0x00008f90 lw gp, 0x30(sp) | gp = *(var_30h);
0x00008f94 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00008f98 addiu v0, v0, -0x2890 | v0 += -0x2890;
0x00008f9c b 0x8eec | goto label_0;
| label_5:
0x00008fa0 lw t9, -0x7c20(gp) | t9 = sym.imp.__printf_chk;
0x00008fa4 move a2, s0 | a2 = s0;
| /* esilref: '&s' */
0x00008fa8 addiu a1, a1, 0x35fc | a1 += 0x35fc;
0x00008fac addiu a0, zero, 1 | a0 = 1;
0x00008fb0 jalr t9 | t9 ();
0x00008fb4 lw gp, 0x30(sp) | gp = *(var_30h);
0x00008fb8 b 0x8f40 | goto label_1;
| label_6:
0x00008fbc lw t9, -0x7b90(gp) | t9 = sym.imp.__stack_chk_fail;
0x00008fc0 jalr t9 | t9 ();
0x00008fc4 nop |
0x00008fc8 lui gp, 7 |
0x00008fcc addiu gp, gp, 0x5ff8 |
0x00008fd0 addu gp, gp, t9 | gp += t9;
0x00008fd4 addiu sp, sp, -0x20 |
0x00008fd8 andi v1, a1, 1 | v1 = a1 & 1;
0x00008fdc sw gp, 0x10(sp) | *(var_10h_2) = gp;
0x00008fe0 sw ra, 0x1c(sp) | *(var_1ch_2) = ra;
0x00008fe4 lw t0, 0x30(sp) | t0 = *(var_10h);
0x00008fe8 lw t1, 0x34(sp) | t1 = *(var_14h);
0x00008fec lw a0, 0x3c(sp) | a0 = *(var_1ch);
0x00008ff0 lw v0, 0x40(sp) | v0 = *(var_20h);
| if (v1 == 0) {
0x00008ff4 bnez v1, 0x901c |
0x00008ff8 andi a1, a1, 4 | a1 &= 4;
0x00008ffc andi v0, v0, 0x800 | v0 &= 0x800;
| if (a1 != 0) {
0x00009000 beqz a1, 0x900c |
0x00009004 lw t9, -0x7bf8(gp) | t9 = sym.imp.putchar;
| if (v0 != 0) {
0x00009008 bnez v0, 0x9048 | goto label_7;
| }
| }
0x0000900c lw ra, 0x1c(sp) | ra = *(var_1ch_2);
0x00009010 move v0, zero | v0 = 0;
0x00009014 addiu sp, sp, 0x20 |
0x00009018 jr ra | return v0;
| }
0x0000901c andi v0, v0, 0x4020 | v0 &= 0x4020;
0x00009020 lw ra, 0x1c(sp) | ra = *(var_1ch_2);
0x00009024 sltiu v0, v0, 1 | v0 = (v0 < 1) ? 1 : 0;
0x00009028 lw t9, -0x7eb8(gp) | t9 = sym.print_dbppc_timestamp;
0x0000902c sw t0, 0x38(sp) | *(var_18h) = t0;
0x00009030 sw t1, 0x3c(sp) | *(var_1ch) = t1;
0x00009034 sw v0, 0x30(sp) | *(var_10h) = v0;
0x00009038 move a1, a0 | a1 = a0;
0x0000903c addiu a0, zero, 3 | a0 = 3;
0x00009040 addiu sp, sp, 0x20 |
0x00009044 b 0x8df0 | goto label_2;
| label_7:
0x00009048 addiu a0, zero, 0xa | a0 = 0xa;
0x0000904c jalr t9 | t9 ();
0x00009050 lw ra, 0x1c(sp) | ra = *(var_1ch_2);
0x00009054 move v0, zero | v0 = 0;
0x00009058 addiu sp, sp, 0x20 |
0x0000905c jr ra | return v0;
| }
[*] Function strcpy used 3 times sadf