[*] Binary protection state of systemd-growfs
Full RELRO Canary found NX disabled PIE enabled RPATH No RUNPATH No Symbols
[*] Function printf tear down of systemd-growfs
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/lib/systemd/systemd-growfs @ 0x1cc0 */
| #include <stdint.h>
|
; (fcn) fcn.00001cc0 () | void fcn_00001cc0 () {
0x00001cc0 lui gp, 2 |
0x00001cc4 addiu gp, gp, -0x5cc0 |
0x00001cc8 addu gp, gp, t9 | gp += t9;
0x00001ccc addiu sp, sp, -0x1060 |
0x00001cd0 lw t9, -0x7f3c(gp) | t9 = sym.imp.memset;
0x00001cd4 sw s2, 0x1044(sp) | *(var_1044h) = s2;
0x00001cd8 lw s2, -0x7f7c(gp) | s2 = *((gp - 8159));
0x00001cdc sw gp, 0x28(sp) | *(var_28h) = gp;
0x00001ce0 sw s7, 0x1058(sp) | *(var_1058h) = s7;
0x00001ce4 sw s6, 0x1054(sp) | *(var_1054h) = s6;
0x00001ce8 sw s5, 0x1050(sp) | *(var_1050h) = s5;
0x00001cec sw s4, 0x104c(sp) | *(var_104ch) = s4;
0x00001cf0 sw s3, 0x1048(sp) | *(var_1048h) = s3;
0x00001cf4 sw s1, 0x1040(sp) | *(var_1040h) = s1;
0x00001cf8 sw s0, 0x103c(sp) | *(var_103ch) = s0;
0x00001cfc sw ra, 0x105c(sp) | *(var_105ch) = ra;
0x00001d00 lw v0, (s2) | v0 = *(s2);
0x00001d04 lw s0, 0x1070(sp) | s0 = *(arg_1070h);
0x00001d08 addiu s3, sp, 0x30 | s3 = sp + 0x30;
0x00001d0c move s6, a0 | s6 = a0;
0x00001d10 move s5, a1 | s5 = a1;
0x00001d14 move s1, a2 | s1 = a2;
0x00001d18 lw s7, 0x1074(sp) | s7 = *(arg_1074h);
0x00001d1c addiu a2, zero, 0x1000 | a2 = 0x1000;
0x00001d20 move a1, zero | a1 = 0;
0x00001d24 move a0, s3 | a0 = s3;
0x00001d28 sw v0, 0x1034(sp) | *(var_1034h) = v0;
0x00001d2c move s4, a3 | s4 = a3;
0x00001d30 jalr t9 | t9 ();
0x00001d34 sra v0, s0, 0x1f | v0 = s0 >> 0x1f;
0x00001d38 lw gp, 0x28(sp) | gp = *(var_28h);
| if (s7 != v0) {
0x00001d3c bne s7, v0, 0x1e38 | goto label_2;
| }
0x00001d40 mult s4, s0 | __asm ("mult s4, s0");
0x00001d44 madd s7, s1 | __asm ("madd s7, s1");
0x00001d48 mflo s7 | __asm ("mflo s7");
0x00001d4c multu s0, s1 | __asm ("multu s0, s1");
0x00001d50 mfhi v1 | __asm ("mfhi v1");
0x00001d54 addu v1, s7, v1 | v1 = s7 + v1;
0x00001d58 mflo v0 | __asm ("mflo v0");
| if (v1 == 0) {
0x00001d5c beqz v1, 0x1ebc | goto label_3;
| }
0x00001d60 sw v0, 0x18(sp) | *(var_18h) = v0;
| label_1:
0x00001d64 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00001d68 lw t9, -0x7f9c(gp) | t9 = sym.imp.__snprintf_chk
0x00001d6c addiu v0, v0, 0x2ae4 | v0 += str._llu;
0x00001d70 sw v1, 0x1c(sp) | *(var_1ch) = v1;
0x00001d74 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00001d78 addiu a3, zero, 0xff8 | a3 = 0xff8;
0x00001d7c addiu a2, zero, 1 | a2 = 1;
0x00001d80 addiu a1, zero, 0xff8 | a1 = 0xff8;
0x00001d84 addiu a0, sp, 0x38 | a0 = sp + 0x38;
0x00001d88 jalr t9 | t9 ();
0x00001d8c lw gp, 0x28(sp) | gp = *(var_28h);
0x00001d90 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
0x00001d94 lbu v0, 0x40f0(v0) | v0 = *((v0 + 16624));
0x00001d98 lw t9, -0x7f70(gp) | t9 = sym.imp.ioctl;
0x00001d9c beqz v0, 0x1ddc |
| while (v0 == 0) {
0x00001da0 move v0, zero | v0 = 0;
| label_0:
0x00001da4 lw a0, 0x1034(sp) | a0 = *(var_1034h);
0x00001da8 lw v1, (s2) | v1 = *(s2);
0x00001dac lw ra, 0x105c(sp) | ra = *(var_105ch);
| if (a0 != v1) {
0x00001db0 bne a0, v1, 0x1f30 | goto label_4;
| }
0x00001db4 lw s7, 0x1058(sp) | s7 = *(var_1058h);
0x00001db8 lw s6, 0x1054(sp) | s6 = *(var_1054h);
0x00001dbc lw s5, 0x1050(sp) | s5 = *(var_1050h);
0x00001dc0 lw s4, 0x104c(sp) | s4 = *(var_104ch);
0x00001dc4 lw s3, 0x1048(sp) | s3 = *(var_1048h);
0x00001dc8 lw s2, 0x1044(sp) | s2 = *(var_1044h);
0x00001dcc lw s1, 0x1040(sp) | s1 = *(var_1040h);
0x00001dd0 lw s0, 0x103c(sp) | s0 = *(var_103ch);
0x00001dd4 addiu sp, sp, 0x1060 |
0x00001dd8 jr ra | return v0;
0x00001ddc lui a1, 0x9000 | a1 = 0x90000000;
0x00001de0 move a2, s3 | a2 = s3;
0x00001de4 ori a1, a1, 0x9403 | a1 |= 0x9403;
0x00001de8 move a0, s5 | a0 = s5;
0x00001dec jalr t9 | t9 ();
0x00001df0 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001df4 beqz v0, 0x1da0 |
| }
0x00001df8 lw t9, -0x7f2c(gp) | t9 = sym.imp.__errno_location;
0x00001dfc jalr t9 | t9 ();
0x00001e00 nop |
0x00001e04 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001e08 move a0, zero | a0 = 0;
0x00001e0c lw t9, -0x7fac(gp) | t9 = sym.imp.log_get_max_level_realm;
0x00001e10 lw s0, (v0) | s0 = *(v0);
0x00001e14 jalr t9 | t9 ();
0x00001e18 slti v0, v0, 3 | v0 = (v0 < 3) ? 1 : 0;
0x00001e1c lw gp, 0x28(sp) | gp = *(var_28h);
| if (v0 != 0) {
0x00001e20 beqz v0, 0x1e74 |
0x00001e24 move a1, s0 | a1 = s0;
| if (s0 >= 0) {
0x00001e28 bltz s0, 0x1e64 |
0x00001e2c andi v0, a1, 0xff | v0 = a1 & 0xff;
0x00001e30 negu v0, v0 | __asm ("negu v0, v0");
0x00001e34 b 0x1da4 | goto label_0;
| label_2:
0x00001e38 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00001e3c lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x00001e40 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00001e44 addiu v0, v0, 0x2ff4 | v0 += str.resize_btrfs;
0x00001e48 lw t9, -0x7f4c(gp) | t9 = sym.imp.log_assert_failed_realm;
0x00001e4c sw v0, 0x10(sp) | *(var_10h) = v0;
0x00001e50 addiu a3, zero, 0x33 | a3 = 0x33;
0x00001e54 addiu a2, a2, 0x2a5f | a2 += 0x2a5f;
0x00001e58 addiu a1, a1, 0x2a78 | a1 += str._uint64_t___int__blocksize__blocksize;
0x00001e5c move a0, zero | a0 = 0;
0x00001e60 jalr t9 | t9 ();
| }
0x00001e64 negu a1, s0 | __asm ("negu a1, s0");
0x00001e68 andi v0, a1, 0xff | v0 = a1 & 0xff;
0x00001e6c negu v0, v0 | __asm ("negu v0, v0");
0x00001e70 b 0x1da4 | goto label_0;
| }
0x00001e74 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00001e78 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x00001e7c addiu v0, v0, 0x2aec | v0 += str.Failed_to_resize___s__to__llu_blocks__btrfs_:__m;
0x00001e80 sw v0, 0x14(sp) | *(var_14h) = v0;
0x00001e84 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00001e88 lw t9, -0x7f88(gp) | t9 = sym.imp.log_internal_realm;
0x00001e8c addiu v0, v0, 0x2fe4 | v0 += 0x2fe4;
0x00001e90 sw s1, 0x20(sp) | *(var_20h) = s1;
0x00001e94 sw s4, 0x24(sp) | *(var_24h) = s4;
0x00001e98 sw s6, 0x18(sp) | *(var_18h) = s6;
0x00001e9c sw v0, 0x10(sp) | *(var_10h) = v0;
0x00001ea0 addiu a3, zero, 0x44 | a3 = 0x44;
0x00001ea4 addiu a2, a2, 0x2a5f | a2 += 0x2a5f;
0x00001ea8 move a1, s0 | a1 = s0;
0x00001eac addiu a0, zero, 3 | a0 = 3;
0x00001eb0 jalr t9 | t9 ();
0x00001eb4 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001eb8 b 0x1da4 | goto label_0;
| label_3:
0x00001ebc lui a0, 0x1000 | a0 = 0x10000000;
0x00001ec0 sltu a0, v0, a0 | a0 = (v0 < a0) ? 1 : 0;
| if (a0 == 0) {
0x00001ec4 beql a0, zero, 0x1d64 | goto label_1;
| }
0x00001ec8 sw v0, 0x18(sp) | *(var_18h) = v0;
0x00001ecc lw t9, -0x7fac(gp) | t9 = sym.imp.log_get_max_level_realm;
0x00001ed0 move a0, zero | a0 = 0;
0x00001ed4 jalr t9 | t9 ();
0x00001ed8 slti v0, v0, 4 | v0 = (v0 < 4) ? 1 : 0;
0x00001edc lw gp, 0x28(sp) | gp = *(var_28h);
| if (v0 != 0) {
0x00001ee0 beqz v0, 0x1eec |
0x00001ee4 addiu v0, zero, -0x7a | v0 = -0x7a;
0x00001ee8 b 0x1da4 | goto label_0;
| }
0x00001eec lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00001ef0 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x00001ef4 addiu v0, v0, 0x2aa0 | v0 += str._s:_resizing_of_btrfs_volumes_smaller_than_256M_is_not_supported;
0x00001ef8 sw v0, 0x14(sp) | *(var_14h) = v0;
0x00001efc lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00001f00 lw t9, -0x7f88(gp) | t9 = sym.imp.log_internal_realm;
0x00001f04 addiu v0, v0, 0x2fe4 | v0 += 0x2fe4;
0x00001f08 sw s6, 0x18(sp) | *(var_18h) = s6;
0x00001f0c sw v0, 0x10(sp) | *(var_10h) = v0;
0x00001f10 addiu a3, zero, 0x37 | a3 = 0x37;
0x00001f14 addiu a2, a2, 0x2a5f | a2 += 0x2a5f;
0x00001f18 move a1, zero | a1 = 0;
0x00001f1c addiu a0, zero, 4 | a0 = 4;
0x00001f20 jalr t9 | t9 ();
0x00001f24 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001f28 addiu v0, zero, -0x7a | v0 = -0x7a;
0x00001f2c b 0x1da4 | goto label_0;
| label_4:
0x00001f30 lw t9, -0x7f8c(gp) | t9 = sym.imp.__stack_chk_fail;
0x00001f34 jalr t9 | t9 ();
0x00001f38 nop |
0x00001f3c nop |
| }
[*] Function printf used 2 times systemd-growfs