[*] Binary protection state of mdnsd
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function sprintf tear down of mdnsd
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/mdnsd @ 0x8d00 */
| #include <stdint.h>
|
; (fcn) sym.plen_to_mask () | void plen_to_mask () {
0x00008d00 lui gp, 7 |
0x00008d04 addiu gp, gp, -0x3c90 |
0x00008d08 addu gp, gp, t9 | gp += t9;
0x00008d0c addiu sp, sp, -0x48 |
0x00008d10 sw s5, 0x34(sp) | *(var_34h) = s5;
0x00008d14 sw s4, 0x30(sp) | *(var_30h) = s4;
0x00008d18 lw s5, -0x7fc4(gp) | s5 = *(gp);
0x00008d1c lw s4, -0x7fc4(gp) | s4 = *(gp);
0x00008d20 sw s7, 0x3c(sp) | *(var_3ch) = s7;
0x00008d24 sw s6, 0x38(sp) | *(var_38h) = s6;
0x00008d28 sw s3, 0x2c(sp) | *(var_2ch) = s3;
0x00008d2c sw s1, 0x24(sp) | *(var_24h) = s1;
0x00008d30 sw gp, 0x18(sp) | *(var_18h) = gp;
0x00008d34 sw ra, 0x44(sp) | *(var_44h) = ra;
0x00008d38 sw fp, 0x40(sp) | *(var_40h) = fp;
0x00008d3c sw s2, 0x28(sp) | *(var_28h) = s2;
0x00008d40 sw s0, 0x20(sp) | *(var_20h) = s0;
0x00008d44 move s7, a0 | s7 = a0;
0x00008d48 move s3, a1 | s3 = a1;
0x00008d4c move s1, zero | s1 = 0;
0x00008d50 addiu s6, zero, 0x10 | s6 = 0x10;
| /* str._s:_x */
0x00008d54 addiu s4, s4, -0x4520 | s4 += -0x4520;
| /* esilref: '&x' */
0x00008d58 addiu s5, s5, -0x30f8 | s5 += -0x30f8;
| do {
0x00008d5c slti s2, s7, 0x11 | s2 = (s7 < 0x11) ? 1 : 0;
0x00008d60 move v0, s6 | v0 = s6;
| if (s2 == 0) {
0x00008d64 movn v0, s7, s2 | v0 = s7;
| }
0x00008d68 move s2, v0 | s2 = v0;
0x00008d6c ori s0, zero, 0xffff | s0 = 0xffff;
0x00008d70 subu v0, s6, v0 | __asm ("subu v0, s6, v0");
0x00008d74 sllv s0, s0, v0 | s0 <<= v0;
0x00008d78 andi s0, s0, 0xffff | s0 &= 0xffff;
| if (s1 != 0) {
0x00008d7c bnez s1, 0x8de0 | goto label_1;
| }
0x00008d80 lw t9, -0x7a58(gp) | t9 = sym.imp.__sprintf_chk
0x00008d84 sw s0, 0x10(sp) | *(var_10h) = s0;
0x00008d88 move a3, s5 | a3 = s5;
0x00008d8c addiu a2, zero, -1 | a2 = -1;
0x00008d90 addiu a1, zero, 1 | a1 = 1;
0x00008d94 move a0, s3 | a0 = s3;
0x00008d98 jalr t9 | t9 ();
0x00008d9c lw gp, 0x18(sp) | gp = *(var_18h);
| label_0:
0x00008da0 addiu s1, s1, 1 | s1++;
0x00008da4 addiu v0, zero, 8 | v0 = 8;
0x00008da8 subu s7, s7, s2 | __asm ("subu s7, s7, s2");
0x00008dac bne s1, v0, 0x8d5c |
| } while (s1 != v0);
0x00008db0 lw ra, 0x44(sp) | ra = *(var_44h);
0x00008db4 lw fp, 0x40(sp) | fp = *(var_40h);
0x00008db8 lw s7, 0x3c(sp) | s7 = *(var_3ch);
0x00008dbc lw s6, 0x38(sp) | s6 = *(var_38h);
0x00008dc0 lw s5, 0x34(sp) | s5 = *(var_34h);
0x00008dc4 lw s4, 0x30(sp) | s4 = *(var_30h);
0x00008dc8 lw s3, 0x2c(sp) | s3 = *(var_2ch);
0x00008dcc lw s2, 0x28(sp) | s2 = *(var_28h);
0x00008dd0 lw s1, 0x24(sp) | s1 = *(var_24h);
0x00008dd4 lw s0, 0x20(sp) | s0 = *(var_20h);
0x00008dd8 addiu sp, sp, 0x48 |
0x00008ddc jr ra | return v0;
| label_1:
0x00008de0 lw t9, -0x7940(gp) | t9 = sym.imp.strdup;
0x00008de4 move a0, s3 | a0 = s3;
0x00008de8 jalr t9 | t9 ();
0x00008dec lw gp, 0x18(sp) | gp = *(var_18h);
0x00008df0 move a3, s4 | a3 = s4;
0x00008df4 addiu a2, zero, -1 | a2 = -1;
0x00008df8 lw t9, -0x7a58(gp) | t9 = sym.imp.__sprintf_chk
0x00008dfc addiu a1, zero, 1 | a1 = 1;
0x00008e00 move a0, s3 | a0 = s3;
0x00008e04 sw s0, 0x14(sp) | *(var_14h) = s0;
0x00008e08 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00008e0c move fp, v0 | fp = v0;
0x00008e10 jalr t9 | t9 ();
0x00008e14 lw gp, 0x18(sp) | gp = *(var_18h);
0x00008e18 lw t9, -0x793c(gp) | t9 = sym.imp.free;
0x00008e1c move a0, fp | a0 = fp;
0x00008e20 jalr t9 | t9 ();
0x00008e24 lw gp, 0x18(sp) | gp = *(var_18h);
0x00008e28 b 0x8da0 | goto label_0;
| }
[*] Function sprintf used 3 times mdnsd