[*] Binary protection state of dlist_test
Full RELRO No Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function strcpy tear down of dlist_test
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/dlist_test @ 0x1908 */
| #include <stdint.h>
|
; (fcn) sym.simple_maker () | void simple_maker () {
0x00001908 lui gp, 2 |
0x0000190c addiu gp, gp, -0x68f8 |
0x00001910 addu gp, gp, t9 | gp += t9;
0x00001914 addiu sp, sp, -0x28 |
0x00001918 lw t9, -0x7f44(gp) | t9 = sym.imp.malloc;
0x0000191c sw gp, 0x10(sp) | *(var_10h) = gp;
0x00001920 sw s2, 0x20(sp) | *(var_20h) = s2;
0x00001924 sw s1, 0x1c(sp) | *(var_1ch) = s1;
0x00001928 sw s0, 0x18(sp) | *(var_18h) = s0;
0x0000192c sw ra, 0x24(sp) | *(var_24h) = ra;
0x00001930 move s2, a0 | s2 = a0;
0x00001934 addiu a0, zero, 0x54 | a0 = 0x54;
0x00001938 move s1, a1 | s1 = a1;
0x0000193c jalr t9 | t9 ();
0x00001940 move s0, v0 | s0 = v0;
0x00001944 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00001948 beqz v0, 0x1980 | goto label_0;
| }
0x0000194c lw t9, -0x7f68(gp) | t9 = sym.imp.__strcpy_chk
0x00001950 sw s2, 0x50(v0) | *((v0 + 20)) = s2;
0x00001954 addiu a2, zero, 0x50 | a2 = 0x50;
0x00001958 move a1, s1 | a1 = s1;
0x0000195c move a0, v0 | a0 = v0;
0x00001960 jalr t9 | t9 ();
0x00001964 lw ra, 0x24(sp) | ra = *(var_24h);
| do {
0x00001968 move v0, s0 | v0 = s0;
0x0000196c lw s2, 0x20(sp) | s2 = *(var_20h);
0x00001970 lw s1, 0x1c(sp) | s1 = *(var_1ch);
0x00001974 lw s0, 0x18(sp) | s0 = *(var_18h);
0x00001978 addiu sp, sp, 0x28 |
0x0000197c jr ra | return v0;
| label_0:
0x00001980 lw v0, -0x7f24(gp) | v0 = *((gp - 8137));
0x00001984 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x00001988 lw t9, -0x7f3c(gp) | t9 = sym.imp.fwrite;
0x0000198c lw a3, (v0) | a3 = *(v0);
0x00001990 addiu a2, zero, 0x10 | a2 = 0x10;
0x00001994 addiu a1, zero, 1 | a1 = 1;
0x00001998 addiu a0, a0, 0x1ec4 | a0 += str.ERR_malloc_fail_n;
0x0000199c jalr t9 | t9 ();
0x000019a0 lw ra, 0x24(sp) | ra = *(var_24h);
0x000019a4 b 0x1968 |
| } while (1);
| }
[*] Function strcpy used 2 times dlist_test