Function at 0x4d1360
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1ac
mov ebp, edx
mov edi, ecx
test ecx, ecx
je 0x4d13d0
test ebp, 0x4000
je 0x4d13dd
mov eax, dword [edi]
test eax, eax
je 0x4d14e7
mov ecx, dword [eax + 8]
mov edx, dword [eax + 0xc]
cmp ecx, 0xffffffff
je 0x4d13a7
mov esi, edx
xor esi, ecx
cmp esi, 0x12345678
jne 0x4d13a7
cmp dword [eax + 0x18], 1
jne 0x4d13a7
cmp dword [eax + 4], 0
je 0x4d13dd
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], str.dnssd_clientstub_kDNSServiceFlagsShareConnection_used_with_invalid_DNSServiceRef__p__08X__08X
call fcn.004d0a30
mov dword [edi], 0
mov eax, 0xfffefffb
jmp 0x4d14f9
mov dword [esp + 4], str.dnssd_clientstub_DNSService_operation_with_NULL_DNSServiceRef
jmp 0x4d14ef
cmp byte [0x5c4b04], 0
jne 0x4d1419
lea eax, [esp + 0x1c]
mov byte [0x5c4b04], 1
mov dword [esp], 0x202
mov dword [esp + 4], eax
call dword [sym.imp.WS2_32.dll_WSAStartup]
sub esp, 8
test eax, eax
je 0x4d1419
mov dword [edi], 0
mov eax, 0xfffeffe5
jmp 0x4d14f9
call fcn.004d3d80
xor ebx, ebx
test eax, eax
mov dword [esp], 0x38
setne byte [esp + 0x17]
call sub.msvcrt.dll_malloc
mov esi, eax
test eax, eax
je 0x4d1504
mov ecx, dword [esp + 0x1c8]
mov edx, dword [esp + 0x1c4]
mov eax, dword [esp + 0x1c0]
movaps xmm0, xmmword [0x59c380]
mov dword [esi], 0
mov dword [esi + 4], 0
test ebp, 0x4000
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
movups xmmword [esi + 8], xmm0
mov dword [esi + 0x28], edx
mov dword [esi + 0x2c], ecx
mov ecx, dword [esp + 0x1cc]
mov dword [esi + 0x30], ecx
mov dword [esi + 0x34], 0
je 0x4d151e
mov eax, dword [edi]
nop word cs:[eax + eax]
nop dword [eax]
mov ecx, eax
mov eax, dword [eax]
test eax, eax
jne 0x4d14b0
mov dword [ecx], esi
mov eax, dword [edi]
inc dword [eax + 0x10]
jne 0x4d14c6
mov eax, dword [edi]
inc dword [eax + 0x14]
mov eax, dword [edi]
mov dword [esi + 4], eax
mov ecx, dword [eax + 8]
mov dword [esi + 8], ecx
mov ecx, dword [eax + 0xc]
mov dword [esi + 0xc], ecx
movsd xmm0, qword [eax + 0x10]
movsd qword [esi + 0x10], xmm0
xor eax, eax
mov dword [edi], esi
jmp 0x4d14f9
mov dword [esp + 4], str.dnssd_clientstub_kDNSServiceFlagsShareConnection_used_with_NULL_DNSServiceRef
call fcn.004d0a30
mov eax, 0xfffefffc
add esp, 0x1ac
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [esp + 4], str.dnssd_clientstub_ConnectToServer:_malloc_failed
call fcn.004d0a30
mov dword [edi], 0
mov eax, 0xfffefffd
jmp 0x4d14f9
mov ebp, esi
mov dword [edi], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 2
add ebp, 0x18
call dword [sym.imp.WS2_32.dll_socket]
sub esp, 0xc
mov ecx, eax
mov dword [esi + 8], eax
xor ecx, 0x12345678
cmp eax, 0xffffffff
mov dword [esi + 0xc], ecx
je 0x4d160e
mov dword [esp + 0x18], ebp
mov word [esp + 0x1c], 2
mov dword [esp], str.127.0.0.1
call dword [sym.imp.WS2_32.dll_inet_addr]
sub esp, 4
mov dword [esp + 0x20], eax
mov dword [esp], 0x14ea
call dword [sym.imp.WS2_32.dll_htons]
sub esp, 4
mov word [esp + 0x1e], ax
mov eax, dword [esi + 8]
lea ecx, [esp + 0x1c]
mov dword [esp + 8], 0x10
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_connect]
sub esp, 0xc
test eax, eax
je 0x4d14e1
mov al, byte [esp + 0x17]
mov ebp, dword [sym.imp.WS2_32.dll_connect]
mov bl, al
shl ebx, 2
nop word [eax + eax]
inc ebx
cmp ebx, 4
jae 0x4d16c2
mov dword [esp], 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
mov eax, dword [esi + 8]
lea ecx, [esp + 0x1c]
mov dword [esp + 8], 0x10
mov dword [esp + 4], ecx
mov dword [esp], eax
call ebp
sub esp, 0xc
test eax, eax
jne 0x4d15d0
jmp 0x4d14e1
mov ebx, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call ebx
mov edi, eax
call ebx
mov dword [esp], eax
call fcn.004d3b00
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp + 4], str.dnssd_clientstub_ConnectToServer:_socket_failed__d__s
call fcn.004d0a30
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 8]
mov edx, ecx
xor edx, eax
cmp edx, 0x12345678
jne 0x4d175f
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0xffffffff
mov dword [esi + 0xc], 0xdddddddd
mov dword [ebp + 4], 0
mov dword [ebp], 0
mov dword [ebp + 0xc], 0
mov dword [ebp + 8], 0
mov dword [ebp + 0x14], 0
mov dword [ebp + 0x10], 0
mov dword [ebp + 0x18], 0
mov eax, dword [esi + 0x34]
test eax, eax
je 0x4d16b0
mov edi, dword [eax]
mov dword [esp], eax
call fcn.00506b00
test edi, edi
mov eax, edi
jne 0x4d16a0
mov dword [esp], esi
call fcn.00506b00
mov eax, 0xfffefffd
jmp 0x4d14f9
mov eax, dword [esi + 8]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_closesocket]
sub esp, 4
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 8]
mov edx, ecx
xor edx, eax
cmp edx, 0x12345678
jne 0x4d1782
mov eax, dword [esp + 0x18]
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0xffffffff
mov dword [esi + 0xc], 0xdddddddd
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [eax + 0xc], 0
mov dword [eax + 8], 0
mov dword [eax + 0x14], 0
mov dword [eax + 0x10], 0
mov dword [eax + 0x18], 0
mov eax, dword [esi + 0x34]
test eax, eax
je 0x4d174d
mov edi, dword [eax]
mov dword [esp], eax
call fcn.00506b00
test edi, edi
mov eax, edi
jne 0x4d173d
mov dword [esp], esi
call fcn.00506b00
mov eax, 0xfffeffe5
jmp 0x4d14f9
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov dword [esp + 4], str.dnssd_clientstub_attempt_to_dispose_invalid_DNSServiceRef__p__08X__08X
call fcn.004d0a30
mov eax, 0xfffefffd
jmp 0x4d14f9
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov dword [esp + 4], str.dnssd_clientstub_attempt_to_dispose_invalid_DNSServiceRef__p__08X__08X
call fcn.004d0a30
mov eax, 0xfffeffe5
jmp 0x4d14f9