[*] Binary protection state of e2initrd_helper
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of e2initrd_helper
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/lib/e2initrd_helper @ 0x1670 */
| #include <stdint.h>
|
; (fcn) fcn.00001670 () | void fcn_00001670 () {
0x00001670 lui gp, 2 |
0x00001674 addiu gp, gp, -0x7660 |
0x00001678 addu gp, gp, t9 | gp += t9;
0x0000167c lw v0, -0x7f30(gp) | v0 = *((gp - 8140));
0x00001680 addiu sp, sp, -0x20 |
0x00001684 lw a3, -0x7fdc(gp) | a3 = *((gp - 8183));
0x00001688 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x0000168c lw t9, -0x7f98(gp) | t9 = sym.imp.__fprintf_chk
0x00001690 lw a0, (v0) | a0 = *(v0);
0x00001694 addiu a3, a3, 0x1c78 | a3 += str.e2initrd_helper;
0x00001698 sw gp, 0x10(sp) | *(var_10h) = gp;
0x0000169c sw ra, 0x1c(sp) | *(var_1ch) = ra;
0x000016a0 addiu a2, a2, 0x1c88 | a2 += str.Usage:__s__r_device_n;
0x000016a4 addiu a1, zero, 1 | a1 = 1;
0x000016a8 jalr t9 | t9 ();
0x000016ac lw gp, 0x10(sp) | gp = *(var_10h);
0x000016b0 lw t9, -0x7f78(gp) | t9 = sym.imp.exit;
0x000016b4 addiu a0, zero, 1 | a0 = 1;
0x000016b8 jalr t9 | t9 ();
0x000016bc lui gp, 2 |
0x000016c0 addiu gp, gp, -0x76ac |
0x000016c4 addu gp, gp, t9 | gp += t9;
0x000016c8 addiu sp, sp, -0x28 |
0x000016cc sw s1, 0x1c(sp) | *(var_1ch_2) = s1;
0x000016d0 lw s1, (a0) | s1 = *(a0);
0x000016d4 sw gp, 0x10(sp) | *(var_10h_2) = gp;
0x000016d8 sw ra, 0x24(sp) | *(var_24h) = ra;
0x000016dc sw s2, 0x20(sp) | *(var_20h) = s2;
0x000016e0 sw s0, 0x18(sp) | *(var_18h) = s0;
0x000016e4 lb s0, (s1) | s0 = *(s1);
0x000016e8 lw t9, -0x7fb0(gp) | t9 = sym.imp.__ctype_b_loc;
| if (s0 == 0) {
0x000016ec beqz s0, 0x1780 | goto label_0;
| }
0x000016f0 move s2, a0 | s2 = a0;
0x000016f4 jalr t9 | t9 ();
0x000016f8 lw a1, (v0) | a1 = *(v0);
0x000016fc b 0x170c |
| while (v0 == 0) {
0x00001700 lb s0, (s1) | s0 = *(s1);
0x00001704 move a0, s1 | a0 = s1;
| if (s0 == 0) {
0x00001708 beqz s0, 0x1760 | goto label_1;
| }
0x0000170c sll s0, s0, 1 | s0 <<= 1;
0x00001710 addu s0, a1, s0 | s0 = a1 + s0;
0x00001714 lhu v0, (s0) | v0 = *(s0);
0x00001718 andi v0, v0, 0x2000 | v0 &= 0x2000;
0x0000171c addiu s1, s1, 1 | s1++;
0x00001720 bnel v0, zero, 0x1700 |
| }
0x00001724 lb v0, (s1) | v0 = *(s1);
0x00001728 move v1, s1 | v1 = s1;
| if (v0 != 0) {
0x0000172c bnez v0, 0x1744 | goto label_2;
| }
0x00001730 move a0, s1 | a0 = s1;
0x00001734 b 0x1760 | goto label_1;
| do {
0x00001738 lb v0, 1(v1) | v0 = *((v1 + 1));
0x0000173c move v1, a0 | v1 = a0;
| if (v0 == 0) {
0x00001740 beqz v0, 0x1760 | goto label_1;
| }
| label_2:
0x00001744 sll v0, v0, 1 | v0 <<= 1;
0x00001748 addu v0, a1, v0 | v0 = a1 + v0;
0x0000174c lhu v0, (v0) | v0 = *(v0);
0x00001750 andi v0, v0, 0x2000 | v0 &= 0x2000;
0x00001754 addiu a0, v1, 1 | a0 = v1 + 1;
0x00001758 beqz v0, 0x1738 |
| } while (v0 == 0);
0x0000175c sb zero, (v1) | *(v1) = 0;
| label_1:
0x00001760 lw ra, 0x24(sp) | ra = *(var_24h);
0x00001764 sw a0, (s2) | *(s2) = a0;
0x00001768 move v0, s1 | v0 = s1;
0x0000176c lw s2, 0x20(sp) | s2 = *(var_20h);
0x00001770 lw s1, 0x1c(sp) | s1 = *(var_1ch_2);
0x00001774 lw s0, 0x18(sp) | s0 = *(var_18h);
0x00001778 addiu sp, sp, 0x28 |
0x0000177c jr ra | return v0;
| label_0:
0x00001780 lw ra, 0x24(sp) | ra = *(var_24h);
0x00001784 move s1, zero | s1 = 0;
0x00001788 move v0, s1 | v0 = s1;
0x0000178c lw s2, 0x20(sp) | s2 = *(var_20h);
0x00001790 lw s1, 0x1c(sp) | s1 = *(var_1ch_2);
0x00001794 lw s0, 0x18(sp) | s0 = *(var_18h);
0x00001798 addiu sp, sp, 0x28 |
0x0000179c jr ra | return v0;
| }
[*] Function fprintf used 2 times e2initrd_helper