[*] Binary protection state of mdhcp6
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function strcpy tear down of mdhcp6
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/mdhcp6 @ 0x5780 */
| #include <stdint.h>
|
; (fcn) sym.if_hwaddress () | void if_hwaddress () {
0x00005780 lui gp, 2 |
0x00005784 addiu gp, gp, -0x65b0 |
0x00005788 addu gp, gp, t9 | gp += t9;
0x0000578c addiu sp, sp, -0x58 |
0x00005790 lw t9, -0x7eb8(gp) | t9 = sym.imp.__strcpy_chk
0x00005794 sw s0, 0x40(sp) | *(var_40h) = s0;
0x00005798 lw s0, -0x7e14(gp) | s0 = *((gp - 8069));
0x0000579c addiu v1, sp, 0x1c | v1 = sp + 0x1c;
0x000057a0 sw gp, 0x10(sp) | *(var_10h) = gp;
0x000057a4 lw v0, (s0) | v0 = *(s0);
0x000057a8 sw ra, 0x54(sp) | *(var_54h) = ra;
0x000057ac sw s4, 0x50(sp) | *(var_50h) = s4;
0x000057b0 sw s3, 0x4c(sp) | *(var_4ch) = s3;
0x000057b4 sw s2, 0x48(sp) | *(var_48h) = s2;
0x000057b8 sw s1, 0x44(sp) | *(var_44h) = s1;
0x000057bc move s4, a1 | s4 = a1;
0x000057c0 move s1, a0 | s1 = a0;
0x000057c4 move a1, a3 | a1 = a3;
0x000057c8 move a0, v1 | a0 = v1;
0x000057cc move s2, a2 | s2 = a2;
0x000057d0 sw v0, 0x3c(sp) | *(var_3ch) = v0;
0x000057d4 addiu a2, zero, 0x10 | a2 = 0x10;
0x000057d8 lw s3, 0x68(sp) | s3 = *(arg_68h);
0x000057dc jalr t9 | t9 ();
0x000057e0 lw gp, 0x10(sp) | gp = *(var_10h);
0x000057e4 move a0, s1 | a0 = s1;
0x000057e8 move a2, v0 | a2 = v0;
0x000057ec lw t9, -0x7e40(gp) | t9 = sym.imp.ioctl;
0x000057f0 ori a1, zero, 0x8927 | a1 = 0x8927;
0x000057f4 jalr t9 | t9 ();
0x000057f8 move s1, s0 | s1 = s0;
0x000057fc lw gp, 0x10(sp) | gp = *(var_10h);
0x00005800 addiu s0, zero, -1 | s0 = -1;
| if (v0 >= 0) {
0x00005804 bltz v0, 0x5850 |
0x00005808 lhu v0, 0x2c(sp) | v0 = *(var_2ch);
0x0000580c addiu v1, zero, 1 | v1 = 1;
0x00005810 addiu v1, zero, 6 | v1 = 6;
| if (v0 != v1) {
0x00005814 beq v0, v1, 0x5820 |
0x00005818 sh v0, (s3) | *(s3) = v0;
| if (v0 == v1) {
0x0000581c bnel v0, v1, 0x5828 | goto label_0;
| }
| }
0x00005820 addiu v0, zero, 1 | v0 = 1;
0x00005824 sh v0, (s3) | *(s3) = v0;
| label_0:
0x00005828 sltiu s0, s2, 6 | s0 = (s2 < 6) ? 1 : 0;
0x0000582c addiu v0, zero, 6 | v0 = 6;
| if (s0 == 0) {
0x00005830 movn v0, s2, s0 | v0 = s2;
| }
0x00005834 lw t9, -0x7e10(gp) | t9 = sym.imp.memcpy;
0x00005838 move a2, v0 | a2 = v0;
0x0000583c addiu a1, sp, 0x2e | a1 = sp + 0x2e;
0x00005840 move a0, s4 | a0 = s4;
0x00005844 move s0, v0 | s0 = v0;
0x00005848 jalr t9 | t9 ();
0x0000584c lw gp, 0x10(sp) | gp = *(var_10h);
| }
0x00005850 lw a0, 0x3c(sp) | a0 = *(var_3ch);
0x00005854 lw v1, (s1) | v1 = *(s1);
0x00005858 move v0, s0 | v0 = s0;
| if (a0 != v1) {
0x0000585c beq a0, v1, 0x586c |
0x00005860 lw t9, -0x7e30(gp) | t9 = sym.imp.__stack_chk_fail;
0x00005864 jalr t9 | t9 ();
0x00005868 nop |
| }
0x0000586c lw ra, 0x54(sp) | ra = *(var_54h);
0x00005870 lw s4, 0x50(sp) | s4 = *(var_50h);
0x00005874 lw s3, 0x4c(sp) | s3 = *(var_4ch);
0x00005878 lw s2, 0x48(sp) | s2 = *(var_48h);
0x0000587c lw s1, 0x44(sp) | s1 = *(var_44h);
0x00005880 lw s0, 0x40(sp) | s0 = *(var_40h);
0x00005884 addiu sp, sp, 0x58 |
0x00005888 jr ra | return v0;
| }
[*] Function strcpy used 2 times mdhcp6