[*] Binary protection state of logrotate
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function strcpy tear down of logrotate
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/logrotate @ 0xc9a8 */
| #include <stdint.h>
|
; (fcn) fcn.0000c9a8 () | void fcn_0000c9a8 () {
0x0000c9a8 lui gp, 2 |
0x0000c9ac addiu gp, gp, 0x1688 |
0x0000c9b0 addu gp, gp, t9 | gp += t9;
0x0000c9b4 lw v0, -0x7dc0(gp) | v0 = *((gp - 8048));
0x0000c9b8 addiu sp, sp, -0x1a8 |
0x0000c9bc lw t9, -0x7f44(gp) | t9 = sym.imp.__xstat64;
0x0000c9c0 sw v0, 0x1c(sp) | *(var_1ch) = v0;
0x0000c9c4 lw v0, (v0) | v0 = *(v0);
0x0000c9c8 sw gp, 0x10(sp) | *(var_10h) = gp;
0x0000c9cc sw s0, 0x180(sp) | *(var_180h) = s0;
0x0000c9d0 sw a0, 0x18(sp) | *(var_18h) = a0;
0x0000c9d4 sw ra, 0x1a4(sp) | *(var_1a4h) = ra;
0x0000c9d8 sw fp, 0x1a0(sp) | *(var_1a0h) = fp;
0x0000c9dc sw s7, 0x19c(sp) | *(var_19ch) = s7;
0x0000c9e0 sw s6, 0x198(sp) | *(var_198h) = s6;
0x0000c9e4 sw s5, 0x194(sp) | *(var_194h) = s5;
0x0000c9e8 sw s4, 0x190(sp) | *(var_190h) = s4;
0x0000c9ec sw s3, 0x18c(sp) | *(var_18ch) = s3;
0x0000c9f0 sw s2, 0x188(sp) | *(var_188h) = s2;
0x0000c9f4 sw s1, 0x184(sp) | *(var_184h) = s1;
0x0000c9f8 move s0, a1 | s0 = a1;
0x0000c9fc addiu a2, sp, 0xd8 | a2 = sp + 0xd8;
0x0000ca00 move a1, a0 | a1 = a0;
0x0000ca04 sw v0, 0x17c(sp) | *(var_17ch) = v0;
0x0000ca08 addiu a0, zero, 3 | a0 = 3;
0x0000ca0c jalr t9 | t9 ();
0x0000ca10 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x0000ca14 bnez v0, 0xcd30 | goto label_9;
| }
0x0000ca18 lw v0, 0xf0(sp) | v0 = *(var_f0h_2);
0x0000ca1c addiu v1, zero, 0x4000 | v1 = 0x4000;
0x0000ca20 andi v0, v0, 0xf000 | v0 &= 0xf000;
0x0000ca24 lw s2, -0x7f9c(gp) | s2 = *((gp - 8167));
| if (v0 != v1) {
0x0000ca28 beq v0, v1, 0xcac4 |
0x0000ca2c addiu s3, sp, 0x30 | s3 = sp + 0x30;
0x0000ca30 addiu s2, s2, 0x4f18 | s2 += fcn.00004f18;
0x0000ca34 move a1, s0 | a1 = s0;
0x0000ca38 move t9, s2 | t9 = s2;
0x0000ca3c move a0, s3 | a0 = s3;
0x0000ca40 bal 0x4f18 | fcn_00004f18 ();
0x0000ca44 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000ca48 lw a0, 0x18(sp) | a0 = *(var_18h);
0x0000ca4c lw t9, -0x7f9c(gp) | t9 = *((gp - 8167));
0x0000ca50 addiu t9, t9, 0x56d4 | t9 += fcn.000056d4;
0x0000ca54 move a1, s0 | a1 = s0;
0x0000ca58 bal 0x56d4 | fcn_000056d4 ();
0x0000ca5c move s4, v0 | s4 = v0;
0x0000ca60 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x0000ca64 bnez v0, 0xcd74 | goto label_10;
| }
0x0000ca68 lw s1, -0x7f9c(gp) | s1 = *((gp - 8167));
0x0000ca6c addiu s1, s1, 0x497c | s1 += fcn.0000497c;
0x0000ca70 move t9, s1 | t9 = s1;
| label_3:
0x0000ca74 move a0, s3 | a0 = s3;
0x0000ca78 bal 0x497c | fcn_0000497c ();
0x0000ca7c lw gp, 0x10(sp) | gp = *(var_10h);
| label_2:
0x0000ca80 lw v0, 0x1c(sp) | v0 = *(var_1ch);
0x0000ca84 lw a0, 0x17c(sp) | a0 = *(var_17ch);
0x0000ca88 lw v1, (v0) | v1 = *(v0);
0x0000ca8c move v0, s4 | v0 = s4;
| if (a0 != v1) {
0x0000ca90 bne a0, v1, 0xd04c | goto label_11;
| }
0x0000ca94 lw ra, 0x1a4(sp) | ra = *(var_1a4h);
0x0000ca98 lw fp, 0x1a0(sp) | fp = *(var_1a0h);
0x0000ca9c lw s7, 0x19c(sp) | s7 = *(var_19ch);
0x0000caa0 lw s6, 0x198(sp) | s6 = *(var_198h);
0x0000caa4 lw s5, 0x194(sp) | s5 = *(var_194h);
0x0000caa8 lw s4, 0x190(sp) | s4 = *(var_190h);
0x0000caac lw s3, 0x18c(sp) | s3 = *(var_18ch);
0x0000cab0 lw s2, 0x188(sp) | s2 = *(var_188h);
0x0000cab4 lw s1, 0x184(sp) | s1 = *(var_184h);
0x0000cab8 lw s0, 0x180(sp) | s0 = *(var_180h);
0x0000cabc addiu sp, sp, 0x1a8 |
0x0000cac0 jr ra | return v1;
| }
0x0000cac4 lw a0, -0x7fd8(gp) | a0 = *(gp);
0x0000cac8 lw t9, -0x7e98(gp) | t9 = sym.imp.open64;
0x0000cacc move a1, zero | a1 = 0;
| /* esilref: '(' */
0x0000cad0 addiu a0, a0, 0x3878 | a0 += 0x3878;
0x0000cad4 jalr t9 | t9 ();
0x0000cad8 move v1, v0 | v1 = v0;
0x0000cadc sw v0, 0x2c(sp) | *(var_2ch_2) = v0;
0x0000cae0 addiu v0, zero, -1 | v0 = -1;
0x0000cae4 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v1 == v0) {
0x0000cae8 beq v1, v0, 0xcea0 | goto label_12;
| }
0x0000caec lw t9, -0x7f64(gp) | t9 = sym.imp.opendir;
0x0000caf0 lw a0, 0x18(sp) | a0 = *(var_18h);
0x0000caf4 jalr t9 | t9 ();
0x0000caf8 move s4, v0 | s4 = v0;
0x0000cafc lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x0000cb00 beqz v0, 0xcee0 | goto label_13;
| }
0x0000cb04 lw v0, -0x7fd8(gp) | v0 = *(gp);
0x0000cb08 lw s1, -0x7fd4(gp) | s1 = *((gp - 8181));
| /* str.Ignoring__s__because_of__s_pattern_match_n */
0x0000cb0c addiu v0, v0, 0x38c0 | v0 += 0x38c0;
0x0000cb10 lw s5, -0x7fd4(gp) | s5 = *((gp - 8181));
0x0000cb14 move s2, zero | s2 = 0;
0x0000cb18 sw zero, 0x28(sp) | *(var_28h) = 0;
0x0000cb1c sw zero, 0x24(sp) | *(var_24h_2) = 0;
0x0000cb20 sw v0, 0x20(sp) | *(var_20h_2) = v0;
| label_4:
0x0000cb24 addiu s3, zero, 0x2e | s3 = 0x2e;
0x0000cb28 lw t9, -0x7f20(gp) | t9 = sym.imp.readdir64;
| label_5:
0x0000cb2c move a0, s4 | a0 = s4;
0x0000cb30 jalr t9 | t9 ();
0x0000cb34 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x0000cb38 beqz v0, 0xcbc8 | goto label_14;
| }
| label_0:
0x0000cb3c lb v1, 0x13(v0) | v1 = *((v0 + 19));
0x0000cb40 addiu fp, v0, 0x13 | fp = v0 + 0x13;
| if (v1 == s3) {
0x0000cb44 beq v1, s3, 0xce6c | goto label_15;
| }
0x0000cb48 lw v0, 0x62f8(s1) | v0 = *((s1 + 6334));
| label_6:
0x0000cb4c move s6, zero | s6 = 0;
| if (v0 <= 0) {
0x0000cb50 blez v0, 0xcda4 | goto label_16;
| }
0x0000cb54 lw v0, 0x62fc(s5) | v0 = *((s5 + 6335));
0x0000cb58 b 0xcb74 |
| while (v0 != 0) {
0x0000cb5c lw v0, 0x62f8(s1) | v0 = *((s1 + 6334));
0x0000cb60 addiu s6, s6, 1 | s6++;
0x0000cb64 slt v0, s6, v0 | v0 = (s6 < v0) ? 1 : 0;
0x0000cb68 lui v0, 0xcccc | v0 = 0xcccc0000;
| if (v0 == 0) {
0x0000cb6c beqz v0, 0xcda8 | goto label_17;
| }
0x0000cb70 lw v0, 0x62fc(s5) | v0 = *((s5 + 6335));
0x0000cb74 sll a3, s6, 2 | a3 = s6 << 2;
0x0000cb78 lw t9, -0x7e04(gp) | t9 = sym.imp.fnmatch;
0x0000cb7c lwx s7, a3(v0) | __asm ("lwx s7, a3(v0)");
0x0000cb80 addiu a2, zero, 4 | a2 = 4;
0x0000cb84 move a1, fp | a1 = fp;
0x0000cb88 move a0, s7 | a0 = s7;
0x0000cb8c jalr t9 | t9 ();
0x0000cb90 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cb94 bnez v0, 0xcb5c |
| }
0x0000cb98 lw t9, -0x7fdc(gp) | t9 = sym.message;
0x0000cb9c lw a1, 0x20(sp) | a1 = *(var_20h_2);
0x0000cba0 move a3, s7 | a3 = s7;
0x0000cba4 move a2, fp | a2 = fp;
0x0000cba8 addiu a0, zero, 2 | a0 = 2;
0x0000cbac bal 0xd3d8 | sym_message ();
0x0000cbb0 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cbb4 lw t9, -0x7f20(gp) | t9 = sym.imp.readdir64;
0x0000cbb8 move a0, s4 | a0 = s4;
0x0000cbbc jalr t9 | t9 ();
0x0000cbc0 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x0000cbc4 bnez v0, 0xcb3c | goto label_0;
| }
| label_14:
0x0000cbc8 lw t9, -0x7f60(gp) | t9 = sym.imp.closedir;
0x0000cbcc move a0, s4 | a0 = s4;
0x0000cbd0 jalr t9 | t9 ();
0x0000cbd4 lw gp, 0x10(sp) | gp = *(var_10h);
| if (s2 == 0) {
0x0000cbd8 beqz s2, 0xcf34 | goto label_18;
| }
0x0000cbdc lw a3, -0x7f9c(gp) | a3 = *((gp - 8167));
0x0000cbe0 lw t9, -0x7f28(gp) | t9 = sym.imp.qsort;
0x0000cbe4 lw a0, 0x24(sp) | a0 = *(var_24h_2);
0x0000cbe8 addiu a3, a3, 0x48f0 | a3 += 0x48f0;
0x0000cbec addiu a2, zero, 4 | a2 = 4;
0x0000cbf0 move a1, s2 | a1 = s2;
0x0000cbf4 jalr t9 | t9 ();
0x0000cbf8 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cbfc lw t9, -0x7ddc(gp) | t9 = sym.imp.chdir;
0x0000cc00 lw a0, 0x18(sp) | a0 = *(var_18h);
0x0000cc04 jalr t9 | t9 ();
0x0000cc08 move s4, v0 | s4 = v0;
0x0000cc0c lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x0000cc10 bnez v0, 0xcf68 | goto label_19;
| }
0x0000cc14 lw v0, -0x7f9c(gp) | v0 = *((gp - 8167));
0x0000cc18 lw s5, -0x7f9c(gp) | s5 = *((gp - 8167));
0x0000cc1c addiu v0, v0, 0x56d4 | v0 += fcn.000056d4;
0x0000cc20 move s7, v0 | s7 = v0;
0x0000cc24 lw v0, -0x7fd8(gp) | v0 = *(gp);
0x0000cc28 lw s6, -0x7f9c(gp) | s6 = *((gp - 8167));
| /* str.found_error_in_file__s__skipping_n */
0x0000cc2c addiu v0, v0, 0x3930 | v0 += 0x3930;
0x0000cc30 lw s1, 0x24(sp) | s1 = *(var_24h_2);
0x0000cc34 move s3, zero | s3 = 0;
0x0000cc38 addiu fp, sp, 0x30 | fp = sp + 0x30;
0x0000cc3c addiu s5, s5, 0x4f18 | s5 += fcn.00004f18;
0x0000cc40 sw v0, 0x20(sp) | *(var_20h_2) = v0;
0x0000cc44 b 0xcc64 |
| while (v0 == 0) {
0x0000cc48 move a0, fp | a0 = fp;
0x0000cc4c addiu t9, s6, 0x497c | t9 = s6 + fcn.0000497c;
0x0000cc50 addiu s3, s3, 1 | s3++;
0x0000cc54 bal 0x497c | fcn_0000497c ();
0x0000cc58 addiu s1, s1, 4 | s1 += 4;
0x0000cc5c lw gp, 0x10(sp) | gp = *(var_10h);
| if (s2 == s3) {
0x0000cc60 beq s2, s3, 0xccf0 | goto label_20;
| }
| label_1:
0x0000cc64 lw v0, (s1) | v0 = *(s1);
0x0000cc68 move a1, s0 | a1 = s0;
| if (v0 == 0) {
0x0000cc6c beqz v0, 0xd028 | goto label_21;
| }
0x0000cc70 move t9, s5 | t9 = s5;
0x0000cc74 move a0, fp | a0 = fp;
0x0000cc78 bal 0x4f18 | fcn_00004f18 ();
0x0000cc7c lw a0, (s1) | a0 = *(s1);
0x0000cc80 move t9, s7 | t9 = s7;
0x0000cc84 move a1, s0 | a1 = s0;
0x0000cc88 jalr t9 | t9 ();
0x0000cc8c lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cc90 beqz v0, 0xcc48 |
| }
0x0000cc94 lw t9, -0x7fdc(gp) | t9 = sym.message;
0x0000cc98 lw a2, (s1) | a2 = *(s1);
0x0000cc9c lw a1, 0x20(sp) | a1 = *(var_20h_2);
0x0000cca0 addiu a0, zero, 5 | a0 = 5;
0x0000cca4 bal 0xd3d8 | sym_message ();
0x0000cca8 addiu v0, s6, 0x497c | v0 = s6 + fcn.0000497c;
0x0000ccac move t9, v0 | t9 = v0;
0x0000ccb0 sw v0, 0x18(sp) | *(var_18h) = v0;
0x0000ccb4 move a0, s0 | a0 = s0;
0x0000ccb8 bal 0x497c | fcn_0000497c ();
0x0000ccbc move a1, fp | a1 = fp;
0x0000ccc0 move t9, s5 | t9 = s5;
0x0000ccc4 move a0, s0 | a0 = s0;
0x0000ccc8 bal 0x4f18 | fcn_00004f18 ();
0x0000cccc lw v0, 0x18(sp) | v0 = *(var_18h);
0x0000ccd0 move a0, fp | a0 = fp;
0x0000ccd4 move t9, v0 | t9 = v0;
0x0000ccd8 addiu s3, s3, 1 | s3++;
0x0000ccdc addiu s4, zero, 1 | s4 = 1;
0x0000cce0 jalr t9 | t9 ();
0x0000cce4 addiu s1, s1, 4 | s1 += 4;
0x0000cce8 lw gp, 0x10(sp) | gp = *(var_10h);
| if (s2 != s3) {
0x0000ccec bne s2, s3, 0xcc64 | goto label_1;
| }
| label_20:
0x0000ccf0 lw t9, -0x7f18(gp) | t9 = sym.imp.fchdir;
0x0000ccf4 lw a0, 0x2c(sp) | a0 = *(var_2ch_2);
0x0000ccf8 jalr t9 | t9 ();
0x0000ccfc lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 < 0) {
0x0000cd00 bltz v0, 0xcf4c | goto label_22;
| }
| label_8:
0x0000cd04 lw t9, -0x7f5c(gp) | t9 = sym.imp.close;
0x0000cd08 lw a0, 0x2c(sp) | a0 = *(var_2ch_2);
0x0000cd0c jalr t9 | t9 ();
0x0000cd10 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cd14 lw a0, 0x24(sp) | a0 = *(var_24h_2);
0x0000cd18 lw t9, -0x7f9c(gp) | t9 = *((gp - 8167));
0x0000cd1c addiu t9, t9, 0x490c | t9 += fcn.0000490c;
0x0000cd20 move a1, s2 | a1 = s2;
0x0000cd24 bal 0x490c | fcn_0000490c ();
0x0000cd28 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cd2c b 0xca80 | goto label_2;
| label_9:
0x0000cd30 lw t9, -0x7eb8(gp) | t9 = sym.imp.__errno_location;
0x0000cd34 addiu s4, zero, 1 | s4 = 1;
0x0000cd38 jalr t9 | t9 ();
0x0000cd3c lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cd40 lw t9, -0x7e54(gp) | t9 = sym.imp.strerror;
0x0000cd44 lw a0, (v0) | a0 = *(v0);
0x0000cd48 jalr t9 | t9 ();
0x0000cd4c lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cd50 lw a2, 0x18(sp) | a2 = *(var_18h);
0x0000cd54 move a3, v0 | a3 = v0;
0x0000cd58 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x0000cd5c lw t9, -0x7fdc(gp) | t9 = sym.message;
| /* str.cannot_stat__s:__s_n */
0x0000cd60 addiu a1, a1, 0x3864 | a1 += 0x3864;
0x0000cd64 addiu a0, zero, 5 | a0 = 5;
0x0000cd68 bal 0xd3d8 | sym_message ();
0x0000cd6c lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cd70 b 0xca80 | goto label_2;
| label_10:
0x0000cd74 lw s1, -0x7f9c(gp) | s1 = *((gp - 8167));
0x0000cd78 addiu s1, s1, 0x497c | s1 += fcn.0000497c;
0x0000cd7c move t9, s1 | t9 = s1;
0x0000cd80 move a0, s0 | a0 = s0;
0x0000cd84 bal 0x497c | fcn_0000497c ();
0x0000cd88 move a1, s3 | a1 = s3;
0x0000cd8c move a0, s0 | a0 = s0;
0x0000cd90 move t9, s2 | t9 = s2;
0x0000cd94 addiu s4, zero, 1 | s4 = 1;
0x0000cd98 bal 0x4f18 | fcn_00004f18 ();
0x0000cd9c move t9, s1 | t9 = s1;
0x0000cda0 b 0xca74 | goto label_3;
| label_16:
0x0000cda4 lui v0, 0xcccc | v0 = 0xcccccccd;
| label_17:
0x0000cda8 ori v0, v0, 0xcccd |
0x0000cdac multu s2, v0 | __asm ("multu s2, v0");
0x0000cdb0 mfhi v0 | __asm ("mfhi v0");
0x0000cdb4 srl v0, v0, 3 | v0 >>= 3;
0x0000cdb8 sll v1, v0, 2 | v1 = v0 << 2;
0x0000cdbc addu v0, v1, v0 | v0 = v1 + v0;
0x0000cdc0 sll v0, v0, 1 | v0 <<= 1;
0x0000cdc4 lw v0, 0x24(sp) | v0 = *(var_24h_2);
| if (s2 != v0) {
0x0000cdc8 bne s2, v0, 0xce94 | goto label_23;
| }
0x0000cdcc lw v0, 0x28(sp) | v0 = *(var_28h);
0x0000cdd0 lw t9, -0x7e3c(gp) | t9 = sym.imp.realloc;
0x0000cdd4 lw a0, 0x24(sp) | a0 = *(var_24h_2);
0x0000cdd8 addiu a1, v0, 0x28 | a1 = v0 + 0x28;
0x0000cddc jalr t9 | t9 ();
0x0000cde0 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x0000cde4 beqz v0, 0xcfac | goto label_24;
| }
0x0000cde8 sll s3, s2, 2 | s3 = s2 << 2;
0x0000cdec addu s3, v0, s3 | s3 = v0 + s3;
0x0000cdf0 sw v0, 0x24(sp) | *(var_24h_2) = v0;
0x0000cdf4 sw zero, (s3) | *(s3) = 0;
0x0000cdf8 sw zero, 4(s3) | *((s3 + 1)) = 0;
0x0000cdfc sw zero, 8(s3) | *((s3 + 2)) = 0;
0x0000ce00 sw zero, 0xc(s3) | *((s3 + 3)) = 0;
0x0000ce04 sw zero, 0x10(s3) | *((s3 + 4)) = 0;
0x0000ce08 sw zero, 0x14(s3) | *((s3 + 5)) = 0;
0x0000ce0c sw zero, 0x18(s3) | *((s3 + 6)) = 0;
0x0000ce10 sw zero, 0x1c(s3) | *((s3 + 7)) = 0;
0x0000ce14 sw zero, 0x20(s3) | *((s3 + 8)) = 0;
0x0000ce18 sw zero, 0x24(s3) | *((s3 + 9)) = 0;
| label_7:
0x0000ce1c lw t9, -0x7e84(gp) | t9 = sym.imp.strlen;
0x0000ce20 move a0, fp | a0 = fp;
0x0000ce24 jalr t9 | t9 ();
0x0000ce28 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000ce2c lw t9, -0x7e48(gp) | t9 = sym.imp.malloc;
0x0000ce30 addiu a0, v0, 1 | a0 = v0 + 1;
0x0000ce34 jalr t9 | t9 ();
0x0000ce38 lw v1, 0x28(sp) | v1 = *(var_28h);
0x0000ce3c lw gp, 0x10(sp) | gp = *(var_10h);
0x0000ce40 addiu v1, v1, 4 | v1 += 4;
0x0000ce44 sw v0, (s3) | *(s3) = v0;
0x0000ce48 sw v1, 0x28(sp) | *(var_28h) = v1;
| if (v0 == 0) {
0x0000ce4c beqz v0, 0xcfac | goto label_24;
| }
0x0000ce50 lw t9, -0x7e28(gp) | t9 = sym.imp.strcpy
0x0000ce54 move a1, fp | a1 = fp;
0x0000ce58 move a0, v0 | a0 = v0;
0x0000ce5c jalr t9 | t9 ();
0x0000ce60 addiu s2, s2, 1 | s2++;
0x0000ce64 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000ce68 b 0xcb24 | goto label_4;
| label_15:
0x0000ce6c lb v1, 0x14(v0) | v1 = *((v0 + 20));
0x0000ce70 lw t9, -0x7f20(gp) | t9 = sym.imp.readdir64;
| if (v1 == 0) {
0x0000ce74 beqz v1, 0xcb2c | goto label_5;
| }
0x0000ce78 lw v0, 0x62f8(s1) | v0 = *((s1 + 6334));
| if (v1 == s3) {
0x0000ce7c bnel v1, s3, 0xcb4c | goto label_6;
| }
0x0000ce80 lb v0, 0x15(v0) | v0 = *((v0 + 21));
0x0000ce84 lw v0, 0x62f8(s1) | v0 = *((s1 + 6334));
| if (v0 != 0) {
0x0000ce88 bnez v0, 0xcb4c | goto label_6;
| }
0x0000ce8c b 0xcb2c | goto label_5;
0x0000ce90 nop |
| label_23:
0x0000ce94 lw v1, 0x28(sp) | v1 = *(var_28h);
0x0000ce98 addu s3, v0, v1 | s3 = v0 + v1;
0x0000ce9c b 0xce1c | goto label_7;
| label_12:
0x0000cea0 lw t9, -0x7eb8(gp) | t9 = sym.imp.__errno_location;
0x0000cea4 addiu s4, zero, 1 | s4 = 1;
0x0000cea8 jalr t9 | t9 ();
0x0000ceac lw gp, 0x10(sp) | gp = *(var_10h);
0x0000ceb0 lw t9, -0x7e54(gp) | t9 = sym.imp.strerror;
0x0000ceb4 lw a0, (v0) | a0 = *(v0);
0x0000ceb8 jalr t9 | t9 ();
0x0000cebc lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cec0 move a2, v0 | a2 = v0;
0x0000cec4 addiu a0, zero, 5 | a0 = 5;
0x0000cec8 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x0000cecc lw t9, -0x7fdc(gp) | t9 = sym.message;
| /* str.cannot_open_current_directory:__s_n */
0x0000ced0 addiu a1, a1, 0x387c | a1 += 0x387c;
0x0000ced4 bal 0xd3d8 | sym_message ();
0x0000ced8 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cedc b 0xca80 | goto label_2;
| label_13:
0x0000cee0 lw t9, -0x7eb8(gp) | t9 = sym.imp.__errno_location;
0x0000cee4 addiu s4, zero, 1 | s4 = 1;
0x0000cee8 jalr t9 | t9 ();
0x0000ceec lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cef0 lw t9, -0x7e54(gp) | t9 = sym.imp.strerror;
0x0000cef4 lw a0, (v0) | a0 = *(v0);
0x0000cef8 jalr t9 | t9 ();
0x0000cefc lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cf00 lw a2, 0x18(sp) | a2 = *(var_18h);
0x0000cf04 move a3, v0 | a3 = v0;
0x0000cf08 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x0000cf0c lw t9, -0x7fdc(gp) | t9 = sym.message;
| /* str.cannot_open_directory__s:__s_n */
0x0000cf10 addiu a1, a1, 0x38a0 | a1 += 0x38a0;
0x0000cf14 addiu a0, zero, 5 | a0 = 5;
0x0000cf18 bal 0xd3d8 | sym_message ();
0x0000cf1c lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cf20 lw t9, -0x7f5c(gp) | t9 = sym.imp.close;
0x0000cf24 lw a0, 0x2c(sp) | a0 = *(var_2ch_2);
0x0000cf28 jalr t9 | t9 ();
0x0000cf2c lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cf30 b 0xca80 | goto label_2;
| label_18:
0x0000cf34 lw t9, -0x7f5c(gp) | t9 = sym.imp.close;
0x0000cf38 lw a0, 0x2c(sp) | a0 = *(var_2ch_2);
0x0000cf3c move s4, zero | s4 = 0;
0x0000cf40 jalr t9 | t9 ();
0x0000cf44 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cf48 b 0xca80 | goto label_2;
| label_22:
0x0000cf4c lw a1, -0x7fd8(gp) | a1 = *(gp);
0x0000cf50 lw t9, -0x7fdc(gp) | t9 = sym.message;
| /* str.could_not_change_directory_to_. */
0x0000cf54 addiu a1, a1, 0x3954 | a1 += 0x3954;
0x0000cf58 addiu a0, zero, 5 | a0 = 5;
0x0000cf5c bal 0xd3d8 | sym_message ();
0x0000cf60 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cf64 b 0xcd04 | goto label_8;
| label_19:
0x0000cf68 lw t9, -0x7eb8(gp) | t9 = sym.imp.__errno_location;
0x0000cf6c addiu s4, zero, 1 | s4 = 1;
0x0000cf70 jalr t9 | t9 ();
0x0000cf74 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cf78 lw t9, -0x7e54(gp) | t9 = sym.imp.strerror;
0x0000cf7c lw a0, (v0) | a0 = *(v0);
0x0000cf80 jalr t9 | t9 ();
0x0000cf84 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cf88 lw a2, 0x18(sp) | a2 = *(var_18h);
0x0000cf8c move a3, v0 | a3 = v0;
0x0000cf90 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x0000cf94 lw t9, -0x7fdc(gp) | t9 = sym.message;
| /* str.error_in_chdir___s__:__s_n */
0x0000cf98 addiu a1, a1, 0x3900 | a1 += 0x3900;
0x0000cf9c addiu a0, zero, 5 | a0 = 5;
0x0000cfa0 bal 0xd3d8 | sym_message ();
0x0000cfa4 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cfa8 b 0xcd04 | goto label_8;
| label_24:
0x0000cfac lw t9, -0x7f9c(gp) | t9 = *((gp - 8167));
0x0000cfb0 lw a0, 0x24(sp) | a0 = *(var_24h_2);
0x0000cfb4 addiu t9, t9, 0x490c | t9 += fcn.0000490c;
0x0000cfb8 move a1, s2 | a1 = s2;
0x0000cfbc bal 0x490c | fcn_0000490c ();
0x0000cfc0 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cfc4 move a0, s4 | a0 = s4;
0x0000cfc8 lw t9, -0x7f60(gp) | t9 = sym.imp.closedir;
0x0000cfcc addiu s4, zero, 1 | s4 = 1;
0x0000cfd0 jalr t9 | t9 ();
0x0000cfd4 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cfd8 lw t9, -0x7f5c(gp) | t9 = sym.imp.close;
0x0000cfdc lw a0, 0x2c(sp) | a0 = *(var_2ch_2);
0x0000cfe0 jalr t9 | t9 ();
0x0000cfe4 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cfe8 lw t9, -0x7eb8(gp) | t9 = sym.imp.__errno_location;
0x0000cfec jalr t9 | t9 ();
0x0000cff0 nop |
0x0000cff4 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000cff8 lw t9, -0x7e54(gp) | t9 = sym.imp.strerror;
0x0000cffc lw a0, (v0) | a0 = *(v0);
0x0000d000 jalr t9 | t9 ();
0x0000d004 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000d008 move a2, v0 | a2 = v0;
0x0000d00c addiu a0, zero, 5 | a0 = 5;
0x0000d010 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x0000d014 lw t9, -0x7fdc(gp) | t9 = sym.message;
| /* str.cannot_realloc:__s_n */
0x0000d018 addiu a1, a1, 0x38ec | a1 += 0x38ec;
0x0000d01c bal 0xd3d8 | sym_message ();
0x0000d020 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000d024 b 0xca80 | goto label_2;
| label_21:
0x0000d028 lw a3, -0x7fd8(gp) | a3 = *(gp);
0x0000d02c lw a1, -0x7fd8(gp) | a1 = *(gp);
0x0000d030 lw a0, -0x7fd8(gp) | a0 = *(gp);
0x0000d034 lw t9, -0x7f68(gp) | t9 = sym.imp.__assert_fail;
| /* str.readConfigPath */
0x0000d038 addiu a3, a3, 0x3ba4 | a3 += 0x3ba4;
0x0000d03c addiu a2, zero, 0x298 | a2 = 0x298;
| /* str..._logrotate_3.15.1_config.c */
0x0000d040 addiu a1, a1, 0x32a0 | a1 += 0x32a0;
| /* str.namelist_i____NULL */
0x0000d044 addiu a0, a0, 0x391c | a0 += 0x391c;
0x0000d048 jalr t9 | t9 ();
| label_11:
0x0000d04c lw t9, -0x7de4(gp) | t9 = sym.imp.__stack_chk_fail;
0x0000d050 jalr t9 | t9 ();
0x0000d054 nop |
| }
[*] Function strcpy used 2 times logrotate