[*] Binary protection state of mdnsd
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function mmap tear down of mdnsd
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/mdnsd @ 0x24c20 */
| #include <stdint.h>
|
; (fcn) sym.mDNS_AddRecordToService () | void mDNS_AddRecordToService () {
0x00024c20 lui gp, 5 |
0x00024c24 addiu gp, gp, 0x450 |
0x00024c28 addu gp, gp, t9 | gp += t9;
0x00024c2c addiu sp, sp, -0x60 |
0x00024c30 lw t9, -0x7eec(gp) | t9 = sym.mDNSPlatformStoreSPSMACAddr;
0x00024c34 sw s0, 0x3c(sp) | *(var_3ch) = s0;
0x00024c38 move s0, a1 | s0 = a1;
0x00024c3c sw ra, 0x5c(sp) | *(var_5ch) = ra;
0x00024c40 sw gp, 0x28(sp) | *(var_28h) = gp;
0x00024c44 sw s5, 0x50(sp) | *(var_50h) = s5;
0x00024c48 sw s3, 0x48(sp) | *(var_48h) = s3;
0x00024c4c sw s1, 0x40(sp) | *(var_40h) = s1;
0x00024c50 sw s7, 0x58(sp) | *(var_58h) = s7;
0x00024c54 sw s6, 0x54(sp) | *(var_54h) = s6;
0x00024c58 sw s4, 0x4c(sp) | *(var_4ch) = s4;
0x00024c5c sw s2, 0x44(sp) | *(var_44h) = s2;
0x00024c60 lw a1, 0x74(sp) | a1 = *(arg_74h);
0x00024c64 move s3, a0 | s3 = a0;
0x00024c68 lw a0, 0x3c0(s0) | a0 = *((s0 + 240));
0x00024c6c addiu t9, t9, -0x42ec | t9 += -0x42ec;
0x00024c70 move t0, a3 | t0 = a3;
0x00024c74 move s1, a2 | s1 = a2;
0x00024c78 bal 0xbd14 | fcn_0000bd14 ();
0x00024c7c lw gp, 0x28(sp) | gp = *(var_28h);
0x00024c80 sw zero, (a2) | *(a2) = 0;
0x00024c84 sw v0, 0x18(sp) | *(var_18h) = v0;
0x00024c88 lw v1, -0x7d9c(gp) | v1 = *(gp);
0x00024c8c addiu v0, zero, 2 | v0 = 2;
0x00024c90 sw v0, 0x14(sp) | *(var_14h) = v0;
0x00024c94 lw v0, 0x70(sp) | v0 = *(arg_70h);
0x00024c98 addiu v1, v1, 0x510c | v1 += 0x510c;
0x00024c9c sw v1, 0x1c(sp) | *(var_1ch) = v1;
0x00024ca0 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00024ca4 sw s0, 0x20(sp) | *(var_20h) = s0;
0x00024ca8 lhu a3, 0xe(a2) | a3 = *((a2 + 7));
0x00024cac lw t9, -0x7df4(gp) | t9 = sym.mDNS_SetupResourceRecord;
0x00024cb0 addiu s5, a2, 8 | s5 = a2 + 8;
0x00024cb4 lw a2, 0x3c0(s0) | a2 = *((s0 + 240));
0x00024cb8 move a1, t0 | a1 = t0;
0x00024cbc move a0, s5 | a0 = s5;
0x00024cc0 bal 0x32598 | sym_mDNS_SetupResourceRecord ();
0x00024cc4 lw gp, 0x28(sp) | gp = *(var_28h);
0x00024cc8 lw a0, 0x748(s0) | a0 = *((s0 + 466));
0x00024ccc lw t9, -0x7eb4(gp) | t9 = sym.mDNSPlatformValidRecordForInterface;
0x00024cd0 addiu a1, a0, 0x100 | a1 = a0 + aav.0x00000100;
0x00024cd4 bal 0x31150 | sym_DomainNameLengthLimit ();
0x00024cd8 sltiu v1, v0, 0x101 | v1 = (v0 < 0x101) ? 1 : 0;
0x00024cdc lw gp, 0x28(sp) | gp = *(var_28h);
| if (v1 == 0) {
0x00024ce0 beqz v1, 0x24db4 | goto label_6;
| }
0x00024ce4 lw t9, -0x7ee0(gp) | t9 = sym.mDNSPlatformMemCopy;
0x00024ce8 lw a1, 0x748(s0) | a1 = *((s0 + 466));
0x00024cec move a2, v0 | a2 = v0;
0x00024cf0 addiu a0, s1, 0x180 | a0 = s1 + aav.0x00000180;
0x00024cf4 bal 0x652c | sym_mDNSPlatformMemCopy ();
0x00024cf8 lw gp, 0x28(sp) | gp = *(var_28h);
| do {
0x00024cfc lw s4, -0x7fc4(gp) | s4 = *(gp);
0x00024d00 lw t9, -0x7ea8(gp) | t9 = sym.mDNS_Lock_;
| /* str.mDNS_AddRecordToService */
0x00024d04 addiu a1, s4, 0x4638 | a1 = s4 + 0x4638;
0x00024d08 move a0, s3 | a0 = s3;
0x00024d0c bal 0x354b0 | sym_mDNS_Lock_ ();
0x00024d10 lhu v1, 0xe(s1) | v1 = *((s1 + 7));
0x00024d14 addiu v0, zero, 0x10 | v0 = 0x10;
0x00024d18 lw gp, 0x28(sp) | gp = *(var_28h);
| if (v1 != v0) {
0x00024d1c bne v1, v0, 0x24dbc | goto label_7;
| }
0x00024d20 lbu v0, 0xab0(s0) | v0 = *((s0 + 2736));
0x00024d24 andi v0, v0, 0x32 | v0 &= 0x32;
0x00024d28 addiu s2, s0, 0xab0 | s2 = s0 + 0xab0;
| if (v0 != 0) {
0x00024d2c bnez v0, 0x24dd8 | goto label_4;
| }
| label_1:
0x00024d30 lw v0, 0xc(s0) | v0 = *((s0 + 3));
| label_0:
0x00024d34 lhu a0, 0xe(v0) | a0 = *((v0 + 7));
| if (v0 == 0) {
0x00024d38 bnel v0, zero, 0x24e34 | goto label_8;
| }
| label_3:
0x00024d3c lw v0, 0xc(s0) | v0 = *((s0 + 3));
| label_2:
0x00024d40 addiu s2, s0, 0xc | s2 = s0 + 0xc;
| label_5:
0x00024d44 move s2, v0 | s2 = v0;
| if (v0 == 0) {
0x00024d48 bnel v0, zero, 0x24e54 | goto label_9;
| }
0x00024d4c lw t9, -0x7d94(gp) | t9 = sym.mDNS_Register_internal;
0x00024d50 addiu s0, s0, 0x728 | s0 += 0x728;
0x00024d54 sw s0, 0x40(s1) | *((s1 + 16)) = s0;
0x00024d58 move a1, s5 | a1 = s5;
0x00024d5c move a0, s3 | a0 = s3;
0x00024d60 bal 0x12550 | sym_mDNS_Register_internal ();
0x00024d64 lw gp, 0x28(sp) | gp = *(var_28h);
| if (v0 == 0) {
0x00024d68 bnez v0, 0x24d70 |
0x00024d6c sw s1, (s2) | *(s2) = s1;
| }
0x00024d70 lw t9, -0x7ea4(gp) | t9 = sym.mDNS_Unlock_;
0x00024d74 sw v0, 0x34(sp) | *(var_34h) = v0;
| /* str.mDNS_AddRecordToService */
0x00024d78 addiu a1, s4, 0x4638 | a1 = s4 + 0x4638;
0x00024d7c move a0, s3 | a0 = s3;
0x00024d80 bal 0x35620 | sym_mDNS_Unlock_ ();
0x00024d84 lw ra, 0x5c(sp) | ra = *(var_5ch);
0x00024d88 lw v0, 0x34(sp) | v0 = *(var_34h);
0x00024d8c lw s7, 0x58(sp) | s7 = *(var_58h);
0x00024d90 lw s6, 0x54(sp) | s6 = *(var_54h);
0x00024d94 lw s5, 0x50(sp) | s5 = *(var_50h);
0x00024d98 lw s4, 0x4c(sp) | s4 = *(var_4ch);
0x00024d9c lw s3, 0x48(sp) | s3 = *(var_48h);
0x00024da0 lw s2, 0x44(sp) | s2 = *(var_44h);
0x00024da4 lw s1, 0x40(sp) | s1 = *(var_40h);
0x00024da8 lw s0, 0x3c(sp) | s0 = *(var_3ch);
0x00024dac addiu sp, sp, 0x60 |
0x00024db0 jr ra | return v0;
| label_6:
0x00024db4 sb zero, 0x180(s1) | *(s1) = 0;
0x00024db8 b 0x24cfc |
| } while (1);
| label_7:
0x00024dbc addiu v0, zero, 0x21 | v0 = 0x21;
0x00024dc0 lw v0, 0xc(s0) | v0 = *((s0 + 3));
| if (v1 == v0) {
0x00024dc4 bnel v1, v0, 0x24d34 | goto label_0;
| }
0x00024dc8 lbu v0, 0x72c(s0) | v0 = *((s0 + 1836));
0x00024dcc andi v0, v0, 0x32 | v0 &= 0x32;
0x00024dd0 addiu s2, s0, 0x72c | s2 = s0 + 0x72c;
| if (v0 == 0) {
0x00024dd4 beqz v0, 0x24d30 | goto label_1;
| }
| label_4:
0x00024dd8 lw s6, 0x14(s1) | s6 = *((s1 + 5));
0x00024ddc lw s7, 8(s2) | s7 = *((s2 + 2));
| if (s6 == s7) {
0x00024de0 beql s6, s7, 0x24d40 | goto label_2;
| }
0x00024de4 lw v0, 0xc(s0) | v0 = *((s0 + 3));
0x00024de8 lw a1, 0x2c(s1) | a1 = *((s1 + 11));
0x00024dec lw t9, -0x7edc(gp) | t9 = sym.mDNSPlatformRetrieveTCPInfo;
0x00024df0 addiu a2, s3, 0x2f | a2 = s3 + 0x2f;
0x00024df4 addiu a1, a1, 4 | a1 += 4;
0x00024df8 addiu a0, s1, 0xc | a0 = s1 + 0xc;
0x00024dfc bal 0x374b0 | sym_GetRRDisplayString_rdb ();
0x00024e00 lw gp, 0x28(sp) | gp = *(var_28h);
0x00024e04 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00024e08 move a3, s7 | a3 = s7;
0x00024e0c lw a1, -0x7fc4(gp) | a1 = *(gp);
0x00024e10 lw t9, -0x7fa0(gp) | t9 = sym.LogMsgWithLevel;
0x00024e14 move a2, s6 | a2 = s6;
| /* str.mDNS_AddRecordToService:_Correcting_TTL_from__4d_to__4d_for__s */
0x00024e18 addiu a1, a1, 0x2260 | a1 += 0x2260;
0x00024e1c addiu a0, zero, 1 | a0 = 1;
0x00024e20 jalr t9 | t9 ();
0x00024e24 lw v0, 8(s2) | v0 = *((s2 + 2));
0x00024e28 lw gp, 0x28(sp) | gp = *(var_28h);
0x00024e2c sw v0, 0x14(s1) | *((s1 + 5)) = v0;
0x00024e30 b 0x24d3c | goto label_3;
| label_8:
0x00024e34 lw v0, (v0) | v0 = *(v0);
| if (a0 == v1) {
0x00024e38 bnel a0, v1, 0x24d34 | goto label_0;
| }
0x00024e3c lbu a0, 0xc(v0) | a0 = *((v0 + 12));
0x00024e40 andi a0, a0, 0x32 | a0 &= 0x32;
| if (a0 == 0) {
0x00024e44 beql a0, zero, 0x24d34 | goto label_0;
| }
0x00024e48 lw v0, (v0) | v0 = *(v0);
0x00024e4c addiu s2, v0, 0xc | s2 = v0 + 0xc;
0x00024e50 b 0x24dd8 | goto label_4;
| label_9:
0x00024e54 lw v0, (v0) | v0 = *(v0);
0x00024e58 b 0x24d44 | goto label_5;
| }
[*] Function mmap used 1 times mdnsd