Function at 0x4ca8f0
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
test ecx, ecx
je 0x4ca960
mov ebp, edx
mov edi, ecx
test edx, 0x4000
je 0x4ca96d
mov eax, dword [edi]
test eax, eax
je 0x4caa77
mov ecx, dword [eax + 8]
mov edx, dword [eax + 0xc]
cmp ecx, 0xffffffff
je 0x4ca937
mov esi, edx
xor esi, ecx
cmp esi, 0x12345678
jne 0x4ca937
cmp dword [eax + 0x18], 1
jne 0x4ca937
cmp dword [eax + 4], 0
je 0x4ca96d
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.004c9fc0
mov dword [edi], 0
mov eax, 0xfffefffb
jmp 0x4caa89
mov dword [esp + 4], str.dnssd_clientstub_DNSService_operation_with_NULL_DNSServiceRef
jmp 0x4caa7f
cmp byte [0x5d99d4], 0
jne 0x4ca9a9
lea eax, [esp + 0x1c]
mov byte [0x5d99d4], 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 0x4ca9a9
mov dword [edi], 0
mov eax, 0xfffeffe5
jmp 0x4caa89
call fcn.004cd290
xor ebx, ebx
test eax, eax
mov dword [esp], 0x38
setne byte [esp + 0x17]
call sub.msvcrt.dll_malloc
test eax, eax
je 0x4caa94
mov esi, eax
mov ecx, dword [esp + 0x1c8]
mov edx, dword [esp + 0x1c4]
mov eax, dword [esp + 0x1c0]
movaps xmm0, xmmword [0x5ae360]
test ebp, 0x4000
mov dword [esi], 0
mov dword [esi + 4], 0
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 0x4caaae
mov eax, dword [edi]
nop word cs:[eax + eax]
nop dword [eax]
mov ecx, eax
mov eax, dword [eax]
test eax, eax
jne 0x4caa40
mov dword [ecx], esi
mov eax, dword [edi]
inc dword [eax + 0x10]
jne 0x4caa56
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 0x4caa89
mov dword [esp + 4], str.dnssd_clientstub_kDNSServiceFlagsShareConnection_used_with_NULL_DNSServiceRef
call fcn.004c9fc0
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.004c9fc0
mov dword [edi], 0
mov eax, 0xfffefffd
jmp 0x4caa89
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 0x4cab9e
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 0x4caa71
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 0x4cac52
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 0x4cab60
jmp 0x4caa71
mov ebx, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call ebx
mov edi, eax
call ebx
mov dword [esp], eax
call fcn.004cd010
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp + 4], str.dnssd_clientstub_ConnectToServer:_socket_failed__d__s
call fcn.004c9fc0
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 8]
mov edx, ecx
xor edx, eax
cmp edx, 0x12345678
jne 0x4cacef
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 0x4cac40
mov edi, dword [eax]
mov dword [esp], eax
call fcn.00537860
test edi, edi
mov eax, edi
jne 0x4cac30
mov dword [esp], esi
call fcn.00537860
mov eax, 0xfffefffd
jmp 0x4caa89
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 0x4cad12
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 0x4cacdd
mov edi, dword [eax]
mov dword [esp], eax
call fcn.00537860
test edi, edi
mov eax, edi
jne 0x4caccd
mov dword [esp], esi
call fcn.00537860
mov eax, 0xfffeffe5
jmp 0x4caa89
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.004c9fc0
mov eax, 0xfffefffd
jmp 0x4caa89
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.004c9fc0
mov eax, 0xfffeffe5
jmp 0x4caa89