[*] Binary protection state of lightd
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of lightd
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/lightd @ 0x1cba4 */
| #include <stdint.h>
|
; (fcn) sym.debug_output () | void debug_output () {
0x0001cba4 lui gp, 2 |
0x0001cba8 addiu gp, gp, 0x44fc |
0x0001cbac addu gp, gp, t9 | gp += t9;
0x0001cbb0 addiu sp, sp, -0x38 |
0x0001cbb4 lw v0, -0x7fc0(gp) | v0 = *(gp);
0x0001cbb8 sw s0, 0x2c(sp) | *(var_2ch) = s0;
0x0001cbbc lw s0, -0x7d08(gp) | s0 = *((gp - 8002));
0x0001cbc0 lw v0, (v0) | v0 = *(v0);
0x0001cbc4 sw gp, 0x18(sp) | *(var_18h) = gp;
0x0001cbc8 lw v1, (s0) | v1 = *(s0);
0x0001cbcc sw s1, 0x30(sp) | *(var_30h) = s1;
0x0001cbd0 sw v1, 0x24(sp) | *(var_24h) = v1;
0x0001cbd4 addiu v1, sp, 0x44 | v1 = sp + 0x44;
0x0001cbd8 sw ra, 0x34(sp) | *(var_34h) = ra;
0x0001cbdc move s1, a2 | s1 = a2;
0x0001cbe0 sw a3, 0x44(sp) | *(arg_44h) = a3;
0x0001cbe4 sw v1, 0x20(sp) | *(var_20h) = v1;
0x0001cbe8 bnez v0, 0x1cc2c |
| while (1) {
0x0001cbec lw v0, -0x7d90(gp) | v0 = *((gp - 8036));
0x0001cbf0 lw t9, -0x7cac(gp) | t9 = sym.imp.__vfprintf_chk
0x0001cbf4 lw a3, 0x20(sp) | a3 = *(var_20h);
0x0001cbf8 lw a0, (v0) | a0 = *(v0);
0x0001cbfc move a2, s1 | a2 = s1;
0x0001cc00 addiu a1, zero, 1 | a1 = 1;
0x0001cc04 jalr t9 | t9 ();
0x0001cc08 lw a0, 0x24(sp) | a0 = *(var_24h);
0x0001cc0c lw v1, (s0) | v1 = *(s0);
0x0001cc10 lw gp, 0x18(sp) | gp = *(var_18h);
| if (a0 != v1) {
0x0001cc14 bne a0, v1, 0x1cc54 | goto label_0;
| }
0x0001cc18 lw ra, 0x34(sp) | ra = *(var_34h);
0x0001cc1c lw s1, 0x30(sp) | s1 = *(var_30h);
0x0001cc20 lw s0, 0x2c(sp) | s0 = *(var_2ch);
0x0001cc24 addiu sp, sp, 0x38 |
0x0001cc28 jr ra | return v1;
0x0001cc2c lw a2, -0x7fc4(gp) | a2 = *(gp);
0x0001cc30 lw t9, -0x7d30(gp) | t9 = sym.imp.__syslog_chk;
0x0001cc34 sw a1, 0x10(sp) | *(var_10h) = a1;
0x0001cc38 move a3, a0 | a3 = a0;
| /* str.__d:_d_: */
0x0001cc3c addiu a2, a2, 0x7f68 | a2 += 0x7f68;
0x0001cc40 addiu a1, zero, 1 | a1 = 1;
0x0001cc44 addiu a0, zero, 6 | a0 = 6;
0x0001cc48 jalr t9 | t9 ();
0x0001cc4c lw gp, 0x18(sp) | gp = *(var_18h);
0x0001cc50 b 0x1cbec |
| }
| label_0:
0x0001cc54 lw t9, -0x7d5c(gp) | t9 = sym.imp.__stack_chk_fail;
0x0001cc58 jalr t9 | t9 ();
0x0001cc5c nop |
| }
[*] Function fprintf used 2 times lightd