[*] Binary protection state of debugfs
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function popen tear down of debugfs
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/debugfs @ 0xe418 */
| #include <stdint.h>
|
; (fcn) sym.open_pager () | void open_pager () {
0x0000e418 lui gp, 4 |
0x0000e41c addiu gp, gp, -0x2d8 |
0x0000e420 addu gp, gp, t9 | gp += t9;
0x0000e424 addiu sp, sp, -0x98 |
0x0000e428 lw a0, -0x7fdc(gp) | a0 = *(gp);
0x0000e42c sw s2, 0x84(sp) | *(var_84h) = s2;
0x0000e430 lw s2, -0x7aa4(gp) | s2 = *((gp - 7849));
0x0000e434 lw t9, -0x7a84(gp) | t9 = sym.imp.ss_safe_getenv;
0x0000e438 sw ra, 0x94(sp) | *(var_94h) = ra;
0x0000e43c lw v0, (s2) | v0 = *(s2);
0x0000e440 sw gp, 0x18(sp) | *(var_18h) = gp;
0x0000e444 sw s0, 0x7c(sp) | *(var_7ch) = s0;
| /* str.DEBUGFS_PAGER */
0x0000e448 addiu a0, a0, -0x540 | a0 += -0x540;
0x0000e44c sw s5, 0x90(sp) | *(var_90h) = s5;
0x0000e450 sw s4, 0x8c(sp) | *(var_8ch) = s4;
0x0000e454 sw s3, 0x88(sp) | *(var_88h) = s3;
0x0000e458 sw s1, 0x80(sp) | *(var_80h) = s1;
0x0000e45c sw v0, 0x74(sp) | *(var_74h) = v0;
0x0000e460 jalr t9 | t9 ();
0x0000e464 nop |
0x0000e468 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000e46c addiu a1, zero, 1 | a1 = 1;
0x0000e470 addiu a0, zero, 0xd | a0 = 0xd;
0x0000e474 lw t9, -0x7ad4(gp) | t9 = sym.imp.signal;
0x0000e478 move s0, v0 | s0 = v0;
0x0000e47c jalr t9 | t9 ();
0x0000e480 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000e484 lw t9, -0x7db0(gp) | t9 = sym.imp.isatty;
0x0000e488 addiu a0, zero, 1 | a0 = 1;
0x0000e48c jalr t9 | t9 ();
0x0000e490 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x0000e494 beqz v0, 0xe4bc |
0x0000e498 lw a0, -0x7fdc(gp) | a0 = *(gp);
| if (s0 == 0) {
0x0000e49c beqz s0, 0xe518 | goto label_5;
| }
| label_1:
0x0000e4a0 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x0000e4a4 lw t9, -0x7a28(gp) | t9 = sym.imp.strcmp;
| /* str.__none__ */
0x0000e4a8 addiu a1, a1, -0x524 | a1 += -0x524;
0x0000e4ac move a0, s0 | a0 = s0;
0x0000e4b0 jalr t9 | t9 ();
0x0000e4b4 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x0000e4b8 bnez v0, 0xe4f4 | goto label_6;
| }
| }
| label_2:
0x0000e4bc lw v0, -0x7cb8(gp) | v0 = *((gp - 7982));
| label_0:
0x0000e4c0 lw v0, (v0) | v0 = *(v0);
| do {
0x0000e4c4 lw a0, 0x74(sp) | a0 = *(var_74h);
0x0000e4c8 lw v1, (s2) | v1 = *(s2);
0x0000e4cc lw ra, 0x94(sp) | ra = *(var_94h);
| if (a0 != v1) {
0x0000e4d0 bne a0, v1, 0xe5c4 | goto label_7;
| }
0x0000e4d4 lw s5, 0x90(sp) | s5 = *(var_90h);
0x0000e4d8 lw s4, 0x8c(sp) | s4 = *(var_8ch);
0x0000e4dc lw s3, 0x88(sp) | s3 = *(var_88h);
0x0000e4e0 lw s2, 0x84(sp) | s2 = *(var_84h);
0x0000e4e4 lw s1, 0x80(sp) | s1 = *(var_80h);
0x0000e4e8 lw s0, 0x7c(sp) | s0 = *(var_7ch);
0x0000e4ec addiu sp, sp, 0x98 |
0x0000e4f0 jr ra | return v0;
| label_6:
0x0000e4f4 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x0000e4f8 lw t9, -0x7d00(gp) | t9 = sym.imp.popen
0x0000e4fc addiu a1, a1, -0x528 | a1 += -0x528;
0x0000e500 move a0, s0 | a0 = s0;
0x0000e504 jalr t9 | t9 ();
0x0000e508 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000e50c bnez v0, 0xe4c4 |
| } while (v0 != 0);
0x0000e510 lw v0, -0x7cb8(gp) | v0 = *((gp - 7982));
0x0000e514 b 0xe4c0 | goto label_0;
| label_5:
0x0000e518 lw t9, -0x7a84(gp) | t9 = sym.imp.ss_safe_getenv;
| /* esilref: 'PAGER' */
0x0000e51c addiu a0, a0, -0x538 | a0 += -0x538;
0x0000e520 jalr t9 | t9 ();
0x0000e524 move s0, v0 | s0 = v0;
0x0000e528 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x0000e52c bnez v0, 0xe4a0 | goto label_1;
| }
0x0000e530 lw s5, -0x7f30(gp) | s5 = *((gp - 8140));
0x0000e534 lw v0, 0x502c(s5) | v0 = *((s5 + 5131));
0x0000e538 lw s3, -0x7fdc(gp) | s3 = *(gp);
| if (v0 == 0) {
0x0000e53c beqz v0, 0xe4bc | goto label_2;
| }
0x0000e540 lw s4, -0x7f30(gp) | s4 = *((gp - 8140));
| /* esilref: 'pager' */
0x0000e544 addiu s5, s5, 0x502c | s5 += 0x502c;
0x0000e548 addiu s0, sp, 0x24 | s0 = sp + 0x24;
| /* str._s__s */
0x0000e54c addiu s3, s3, -0x530 | s3 += -0x530;
0x0000e550 lw v0, 0x5020(s4) | v0 = *((s4 + 5128));
| /* esilref: '/usr/bin' */
| label_4:
0x0000e554 addiu s1, s4, 0x5020 | s1 = s4 + 0x5020;
| if (v0 == 0) {
0x0000e558 beqz v0, 0xe5ac | goto label_8;
| }
0x0000e55c lw v1, (s5) | v1 = *(s5);
| label_3:
0x0000e560 lw t9, -0x7e0c(gp) | t9 = sym.imp.__sprintf_chk;
0x0000e564 move a3, s3 | a3 = s3;
0x0000e568 addiu a2, zero, 0x50 | a2 = 0x50;
0x0000e56c addiu a1, zero, 1 | a1 = 1;
0x0000e570 move a0, s0 | a0 = s0;
0x0000e574 sw v1, 0x14(sp) | *(var_14h) = v1;
0x0000e578 sw v0, 0x10(sp) | *(var_10h) = v0;
0x0000e57c jalr t9 | t9 ();
0x0000e580 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000e584 addiu a1, zero, 1 | a1 = 1;
0x0000e588 lw t9, -0x7cb4(gp) | t9 = sym.imp.access;
0x0000e58c move a0, s0 | a0 = s0;
0x0000e590 jalr t9 | t9 ();
0x0000e594 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0000e598 beqz v0, 0xe4a0 | goto label_1;
| }
0x0000e59c addiu s1, s1, 4 | s1 += 4;
0x0000e5a0 lw v0, (s1) | v0 = *(s1);
0x0000e5a4 lw v1, (s5) | v1 = *(s5);
| if (v0 == 0) {
0x0000e5a8 bnel v0, zero, 0xe560 | goto label_3;
| }
| label_8:
0x0000e5ac addiu s5, s5, 4 | s5 += 4;
0x0000e5b0 lw v0, (s5) | v0 = *(s5);
0x0000e5b4 lw v0, 0x5020(s4) | v0 = *((s4 + 5128));
| if (v0 == 0) {
0x0000e5b8 bnel v0, zero, 0xe554 | goto label_4;
| }
0x0000e5bc lw v0, -0x7cb8(gp) | v0 = *((gp - 7982));
0x0000e5c0 b 0xe4c0 | goto label_0;
| label_7:
0x0000e5c4 lw t9, -0x7b08(gp) | t9 = sym.imp.__stack_chk_fail;
0x0000e5c8 jalr t9 | t9 ();
0x0000e5cc nop |
| }
[*] Function popen used 2 times debugfs