[*] Binary protection state of mdnsd
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function printf tear down of mdnsd
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/mdnsd @ 0x396e0 */
| #include <stdint.h>
|
; (fcn) fcn.000396e0 () | void fcn_000396e0 () {
0x000396e0 lui gp, 4 |
0x000396e4 addiu gp, gp, -0x4670 |
0x000396e8 addu gp, gp, t9 | gp += t9;
0x000396ec addiu sp, sp, -0x30 |
0x000396f0 lw v0, -0x794c(gp) | v0 = *((gp - 7763));
0x000396f4 sw s1, 0x24(sp) | *(var_24h) = s1;
0x000396f8 sw gp, 0x10(sp) | *(var_10h) = gp;
0x000396fc sw ra, 0x2c(sp) | *(var_2ch) = ra;
0x00039700 sw s2, 0x28(sp) | *(var_28h) = s2;
0x00039704 sw s0, 0x20(sp) | *(var_20h) = s0;
0x00039708 sw a3, 0x3c(sp) | *(arg_3ch) = a3;
0x0003970c lw s0, (a0) | s0 = *(a0);
0x00039710 lw v1, (v0) | v1 = *(v0);
0x00039714 subu a1, a1, s0 | __asm ("subu a1, a1, s0");
0x00039718 sw v1, 0x1c(sp) | *(var_1ch) = v1;
0x0003971c move s1, v0 | s1 = v0;
| if (a1 != 0) {
0x00039720 beqz a1, 0x39748 |
0x00039724 addiu a3, sp, 0x3c | a3 = sp + 0x3c;
0x00039728 lw t9, -0x7b7c(gp) | t9 = sym.mDNS_vsnprintf
0x0003972c move s2, a0 | s2 = a0;
0x00039730 sw a3, 0x18(sp) | *(var_18h) = a3;
0x00039734 move a0, s0 | a0 = s0;
0x00039738 bal 0x3892c | sym_mDNS_vsnprintf ()
0x0003973c addu v0, s0, v0 | v0 = s0 + v0;
0x00039740 lw gp, 0x10(sp) | gp = *(var_10h);
0x00039744 sw v0, (s2) | *(s2) = v0;
| }
0x00039748 lw v1, 0x1c(sp) | v1 = *(var_1ch);
0x0003974c lw v0, (s1) | v0 = *(s1);
0x00039750 lw ra, 0x2c(sp) | ra = *(var_2ch);
| if (v1 != v0) {
0x00039754 beq v1, v0, 0x39764 |
0x00039758 lw t9, -0x7964(gp) | t9 = *(gp);
0x0003975c jalr t9 | t9 ();
0x00039760 nop |
| }
0x00039764 lw s2, 0x28(sp) | s2 = *(var_28h);
0x00039768 lw s1, 0x24(sp) | s1 = *(var_24h);
0x0003976c lw s0, 0x20(sp) | s0 = *(var_20h);
0x00039770 addiu sp, sp, 0x30 |
0x00039774 jr ra | return v1;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/mdnsd @ 0x48a00 */
| #include <stdint.h>
|
; (fcn) fcn.00048a00 () | void fcn_00048a00 () {
0x00048a00 lui gp, 3 |
0x00048a04 addiu gp, gp, -0x3990 |
0x00048a08 addu gp, gp, t9 | gp += t9;
0x00048a0c addiu sp, sp, -0x230 |
0x00048a10 lw t9, -0x7b7c(gp) | t9 = sym.mDNS_vsnprintf
0x00048a14 sw s1, 0x224(sp) | *(var_224h) = s1;
0x00048a18 lw s1, -0x794c(gp) | s1 = *((gp - 7763));
0x00048a1c sw gp, 0x10(sp) | *(var_10h) = gp;
0x00048a20 sw ra, 0x22c(sp) | *(var_22ch) = ra;
0x00048a24 sw s2, 0x228(sp) | *(var_228h) = s2;
0x00048a28 sw s0, 0x220(sp) | *(var_220h) = s0;
0x00048a2c lw v0, (s1) | v0 = *(s1);
0x00048a30 addiu s0, sp, 0x1c | s0 = sp + 0x1c;
0x00048a34 move a3, a2 | a3 = a2;
0x00048a38 move s2, a0 | s2 = a0;
0x00048a3c move a2, a1 | a2 = a1;
0x00048a40 move a0, s0 | a0 = s0;
0x00048a44 addiu a1, zero, 0x200 | a1 = aav.0x00000200;
0x00048a48 sw v0, 0x21c(sp) | *(var_21ch) = v0;
0x00048a4c bal 0x3892c | sym_mDNS_vsnprintf ()
0x00048a50 nop |
0x00048a54 lw gp, 0x10(sp) | gp = *(var_10h);
0x00048a58 addiu v1, sp, 0x220 | v1 = sp + 0x220;
0x00048a5c addu v0, v1, v0 | v0 = v1 + v0;
0x00048a60 lw a0, -0x7aa0(gp) | a0 = *(gp);
0x00048a64 lw t9, -0x7a9c(gp) | t9 = sym.mDNSPlatformWriteLogMsg;
0x00048a68 sb zero, -0x204(v0) | *(v0) = 0;
0x00048a6c move a2, s2 | a2 = s2;
0x00048a70 move a1, s0 | a1 = s0;
0x00048a74 bal 0x49924 | sym_mDNSPlatformWriteLogMsg ();
0x00048a78 lw v1, 0x21c(sp) | v1 = *(var_21ch);
0x00048a7c lw v0, (s1) | v0 = *(s1);
0x00048a80 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v1 != v0) {
0x00048a84 beq v1, v0, 0x48a94 |
0x00048a88 lw t9, -0x7964(gp) | t9 = *(gp);
0x00048a8c jalr t9 | t9 ();
0x00048a90 nop |
| }
0x00048a94 lw ra, 0x22c(sp) | ra = *(var_22ch);
0x00048a98 lw s2, 0x228(sp) | s2 = *(var_228h);
0x00048a9c lw s1, 0x224(sp) | s1 = *(var_224h);
0x00048aa0 lw s0, 0x220(sp) | s0 = *(var_220h);
0x00048aa4 addiu sp, sp, 0x230 |
0x00048aa8 jr ra | return v1;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/mdnsd @ 0x35820 */
| #include <stdint.h>
|
; (fcn) sym.mDNS_snprintf () | void mDNS_snprintf () {
0x00035820 lui gp, 4 |
0x00035824 addiu gp, gp, -0x7b0 |
0x00035828 addu gp, gp, t9 | gp += t9;
0x0003582c addiu sp, sp, -0x28 |
0x00035830 lw t9, -0x7b7c(gp) | t9 = sym.mDNS_vsnprintf
0x00035834 sw s0, 0x20(sp) | *(var_20h) = s0;
0x00035838 lw s0, -0x794c(gp) | s0 = *((gp - 7763));
0x0003583c sw gp, 0x10(sp) | *(var_10h) = gp;
0x00035840 sw a3, 0x34(sp) | *(arg_34h) = a3;
0x00035844 sw ra, 0x24(sp) | *(var_24h) = ra;
0x00035848 lw v0, (s0) | v0 = *(s0);
0x0003584c addiu a3, sp, 0x34 | a3 = sp + 0x34;
0x00035850 sw v0, 0x1c(sp) | *(var_1ch) = v0;
0x00035854 sw a3, 0x18(sp) | *(var_18h) = a3;
0x00035858 bal 0x3892c | sym_mDNS_vsnprintf ()
0x0003585c nop |
0x00035860 lw a0, 0x1c(sp) | a0 = *(var_1ch);
0x00035864 lw v1, (s0) | v1 = *(s0);
0x00035868 lw gp, 0x10(sp) | gp = *(var_10h);
| if (a0 != v1) {
0x0003586c beq a0, v1, 0x3587c |
0x00035870 lw t9, -0x7964(gp) | t9 = *(gp);
0x00035874 jalr t9 | t9 ();
0x00035878 nop |
| }
0x0003587c lw ra, 0x24(sp) | ra = *(var_24h);
0x00035880 lw s0, 0x20(sp) | s0 = *(var_20h);
0x00035884 addiu sp, sp, 0x28 |
0x00035888 jr ra | return v1;
| }
[*] Function printf used 8 times mdnsd