[*] Binary protection state of mkfs.ext3
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function popen tear down of mkfs.ext3
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/mkfs.ext3 @ 0x763c */
| #include <stdint.h>
|
; (fcn) fcn.0000763c () | void fcn_0000763c () {
0x0000763c lui gp, 3 |
0x00007640 addiu gp, gp, 0x2a74 |
0x00007644 addu gp, gp, t9 | gp += t9;
0x00007648 addiu sp, sp, -0x460 |
0x0000764c lw v0, -0x7fd4(gp) | v0 = *(gp);
0x00007650 sw s3, 0x448(sp) | *(var_448h) = s3;
0x00007654 lw s3, -0x7b44(gp) | s3 = *((gp - 7889));
0x00007658 lw v0, (v0) | v0 = *(v0);
0x0000765c sw gp, 0x28(sp) | *(var_28h) = gp;
0x00007660 lw v1, (s3) | v1 = *(s3);
0x00007664 sw s6, 0x454(sp) | *(var_454h) = s6;
0x00007668 sw s4, 0x44c(sp) | *(var_44ch) = s4;
0x0000766c sw s0, 0x43c(sp) | *(var_43ch) = s0;
0x00007670 sw ra, 0x45c(sp) | *(var_45ch) = ra;
0x00007674 sw s7, 0x458(sp) | *(var_458h) = s7;
0x00007678 sw s5, 0x450(sp) | *(var_450h) = s5;
0x0000767c sw s2, 0x444(sp) | *(var_444h) = s2;
0x00007680 sw s1, 0x440(sp) | *(var_440h) = s1;
0x00007684 move s0, a0 | s0 = a0;
0x00007688 move s4, a1 | s4 = a1;
0x0000768c sw v1, 0x434(sp) | *(var_434h) = v1;
0x00007690 lw s6, 0x14(a0) | s6 = *((a0 + 5));
| if (v0 != 0) {
0x00007694 bnez v0, 0x77b8 | goto label_2;
| }
0x00007698 lw s1, -0x7fdc(gp) | s1 = *(gp);
| /* esilref: '-s ' */
0x0000769c addiu s1, s1, -0x300c | s1 += -0x300c;
| do {
0x000076a0 lw v0, -0x7fd0(gp) | v0 = *((gp - 8180));
0x000076a4 lw v0, 0x2a9c(v0) | v0 = *((v0 + 2727));
0x000076a8 slti v0, v0, 2 | v0 = (v0 < 2) ? 1 : 0;
0x000076ac lw s2, -0x7fdc(gp) | s2 = *(gp);
| if (v0 != 0) {
0x000076b0 bnez v0, 0x77c4 | goto label_3;
| }
0x000076b4 lw s2, -0x7fdc(gp) | s2 = *(gp);
| /* esilref: '-w ' */
0x000076b8 addiu s2, s2, -0x3008 | s2 += -0x3008;
| label_0:
0x000076bc lw t9, -0x7c4c(gp) | t9 = sym.imp.ext2fs_blocks_count;
0x000076c0 lw a0, 0x10(s0) | a0 = *((s0 + 4));
0x000076c4 lw s7, 0xc(s0) | s7 = *((s0 + 3));
0x000076c8 jalr t9 | t9 ();
0x000076cc lw gp, 0x28(sp) | gp = *(var_28h);
0x000076d0 sltiu a0, v0, 1 | a0 = (v0 < 1) ? 1 : 0;
0x000076d4 subu v1, v1, a0 | __asm ("subu v1, v1, a0");
0x000076d8 lw a3, -0x7fdc(gp) | a3 = *(gp);
0x000076dc lw t9, -0x7e6c(gp) | t9 = sym.imp.__sprintf_chk;
0x000076e0 addiu v0, v0, -1 | v0 += -1;
0x000076e4 addiu s5, sp, 0x34 | s5 = sp + 0x34;
0x000076e8 sw v0, 0x20(sp) | *(var_20h) = v0;
0x000076ec sw v1, 0x24(sp) | *(var_24h) = v1;
0x000076f0 sw s7, 0x1c(sp) | *(var_1ch) = s7;
0x000076f4 sw s2, 0x18(sp) | *(var_18h) = s2;
0x000076f8 sw s1, 0x14(sp) | *(var_14h) = s1;
0x000076fc sw s6, 0x10(sp) | *(var_10h) = s6;
| /* str.badblocks__b__d__X__s_s_s__llu */
0x00007700 addiu a3, a3, -0x3004 | a3 += -0x3004;
0x00007704 addiu a2, zero, 0x400 | a2 = 0x400;
0x00007708 addiu a1, zero, 1 | a1 = 1;
0x0000770c move a0, s5 | a0 = s5;
0x00007710 jalr t9 | t9 ();
0x00007714 lw gp, 0x28(sp) | gp = *(var_28h);
0x00007718 lw v0, -0x7fcc(gp) | v0 = *(gp);
0x0000771c lw v0, (v0) | v0 = *(v0);
0x00007720 lw a1, -0x7fdc(gp) | a1 = *(gp);
| if (v0 != 0) {
0x00007724 bnez v0, 0x77cc | goto label_4;
| }
| label_1:
0x00007728 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x0000772c lw t9, -0x7d78(gp) | t9 = sym.imp.popen
0x00007730 addiu a1, a1, -0xfe0 | a1 += -0xfe0;
0x00007734 move a0, s5 | a0 = s5;
0x00007738 jalr t9 | t9 ();
0x0000773c move s1, v0 | s1 = v0;
0x00007740 lw gp, 0x28(sp) | gp = *(var_28h);
| if (v0 == 0) {
0x00007744 beqz v0, 0x77e8 | goto label_5;
| }
0x00007748 lw a3, -0x7fc8(gp) | a3 = *((gp - 8178));
0x0000774c lw t9, -0x7cdc(gp) | t9 = sym.imp.ext2fs_read_bb_FILE;
0x00007750 move a0, s0 | a0 = s0;
0x00007754 addiu a3, a3, 0x754c | a3 += 0x754c;
0x00007758 move a2, s4 | a2 = s4;
0x0000775c move a1, v0 | a1 = v0;
0x00007760 jalr t9 | t9 ();
0x00007764 lw gp, 0x28(sp) | gp = *(var_28h);
0x00007768 move s0, v0 | s0 = v0;
0x0000776c lw t9, -0x7e60(gp) | t9 = sym.imp.pclose;
0x00007770 move a0, s1 | a0 = s1;
0x00007774 jalr t9 | t9 ();
0x00007778 lw gp, 0x28(sp) | gp = *(var_28h);
| if (s0 != 0) {
0x0000777c bnez s0, 0x7838 | goto label_6;
| }
0x00007780 lw v1, 0x434(sp) | v1 = *(var_434h);
0x00007784 lw v0, (s3) | v0 = *(s3);
0x00007788 lw ra, 0x45c(sp) | ra = *(var_45ch);
| if (v1 != v0) {
0x0000778c bne v1, v0, 0x782c | goto label_7;
| }
0x00007790 lw s7, 0x458(sp) | s7 = *(var_458h);
0x00007794 lw s6, 0x454(sp) | s6 = *(var_454h);
0x00007798 lw s5, 0x450(sp) | s5 = *(var_450h);
0x0000779c lw s4, 0x44c(sp) | s4 = *(var_44ch);
0x000077a0 lw s3, 0x448(sp) | s3 = *(var_448h);
0x000077a4 lw s2, 0x444(sp) | s2 = *(var_444h);
0x000077a8 lw s1, 0x440(sp) | s1 = *(var_440h);
0x000077ac lw s0, 0x43c(sp) | s0 = *(var_43ch);
0x000077b0 addiu sp, sp, 0x460 |
0x000077b4 jr ra | return v1;
| label_2:
0x000077b8 lw s1, -0x7fdc(gp) | s1 = *(gp);
0x000077bc addiu s1, s1, -0x246c | s1 += -0x246c;
0x000077c0 b 0x76a0 |
| } while (1);
| label_3:
0x000077c4 addiu s2, s2, -0x246c | s2 += -0x246c;
0x000077c8 b 0x76bc | goto label_0;
| label_4:
0x000077cc lw t9, -0x7d44(gp) | t9 = sym.imp.__printf_chk;
0x000077d0 move a2, s5 | a2 = s5;
| /* str.Running_command:__s_n */
0x000077d4 addiu a1, a1, -0x2fe4 | a1 += -0x2fe4;
0x000077d8 addiu a0, zero, 1 | a0 = 1;
0x000077dc jalr t9 | t9 ();
0x000077e0 lw gp, 0x28(sp) | gp = *(var_28h);
0x000077e4 b 0x7728 | goto label_1;
| label_5:
0x000077e8 lw t9, -0x7cf8(gp) | t9 = sym.imp.__errno_location;
0x000077ec jalr t9 | t9 ();
0x000077f0 nop |
0x000077f4 lw gp, 0x28(sp) | gp = *(var_28h);
0x000077f8 lw a1, (v0) | a1 = *(v0);
0x000077fc move a3, s5 | a3 = s5;
0x00007800 lw a0, -0x7fdc(gp) | a0 = *(gp);
0x00007804 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x00007808 lw t9, -0x7bf0(gp) | t9 = sym.imp.com_err;
| /* str.popen */
0x0000780c addiu a0, a0, -0x2fb0 | a0 += -0x2fb0;
| /* str.while_trying_to_run__s */
0x00007810 addiu a2, a2, -0x2fcc | a2 += -0x2fcc;
| do {
0x00007814 jalr t9 | t9 ();
0x00007818 nop |
0x0000781c lw gp, 0x28(sp) | gp = *(var_28h);
0x00007820 lw t9, -0x7c90(gp) | t9 = sym.imp.exit;
0x00007824 addiu a0, zero, 1 | a0 = 1;
0x00007828 jalr t9 | t9 ();
| label_7:
0x0000782c lw t9, -0x7bb0(gp) | t9 = sym.imp.__stack_chk_fail;
0x00007830 jalr t9 | t9 ();
0x00007834 nop |
| label_6:
0x00007838 lw a0, -0x7fdc(gp) | a0 = *(gp);
0x0000783c lw a3, -0x7fdc(gp) | a3 = *(gp);
0x00007840 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x00007844 lw t9, -0x7bf0(gp) | t9 = sym.imp.com_err;
| /* str.ext2fs_read_bb_FILE */
0x00007848 addiu a0, a0, -0x2f74 | a0 += -0x2f74;
| /* str.while_processing_list_of_bad_blocks_from_program */
0x0000784c addiu a3, a3, -0x2fa8 | a3 += -0x2fa8;
| /* esilref: '&s' */
0x00007850 addiu a2, a2, -0x1208 | a2 += -0x1208;
0x00007854 move a1, s0 | a1 = s0;
0x00007858 b 0x7814 |
| } while (1);
| }
[*] Function popen used 3 times mkfs.ext3