Function at 0x4cad40
Capabilities:
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Get socket status
Send data
Send data on socket
Start tcp server

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x138
mov ebx, dword [ecx + 4]
mov dword [esp], 0xfffeffff
mov ebp, edx
mov edi, ecx
mov esi, 1
cmp dword [edx + 4], 0
jne 0x4cad77
mov eax, dword [edi + 0xc]
xor esi, esi
lea ecx, [eax - 2]
cmp ecx, 9
ja 0x4cad77
mov esi, dword [eax*4 + 0x5af1f0]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
cmp eax, 0xffffffff
je 0x4cae31
mov edx, ecx
xor edx, eax
cmp edx, 0x12345678
jne 0x4cae31
test esi, esi
je 0x4cae5a
mov dword [esp + 0x10], ebx
mov dword [esp + 0x1c], 0x10
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp eax, 0xffffffff
je 0x4caf8d
mov dword [esp + 0x14], esi
mov dword [esp + 0x34], 2
push str.127.0.0.1
call dword [sym.imp.WS2_32.dll_inet_addr]
lea esi, [esp + 0x34]
mov dword [esp + 0x38], eax
push 0x10
push esi
push ebx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x4cafcf
lea eax, [esp + 0x1c]
push eax
push esi
push ebx
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
js 0x4caffd
push 1
push ebx
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
js 0x4cb0d7
movzx eax, word [esp + 0x36]
mov dword [esp + 4], ebx
mov ebx, dword [esp + 0x10]
mov dword [esp + 8], ebp
mov byte [edi + 0x1c], al
mov byte [edi + 0x1d], ah
jmp 0x4cae6a
sub esp, 0x14
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebp
mov dword [esp + 4], str.dnssd_clientstub_deliver_request:_invalid_DNSServiceRef__p__08X__08X
call fcn.004c9fc0
add esp, 0x14
mov eax, 0xfffefffb
jmp 0x4cb139
mov dword [esp + 8], ebp
mov dword [esp + 0x14], esi
mov dword [esp + 4], 0xffffffff
mov dword [esp + 0xc], edi
push edi
call fcn.004cd240
add esp, 4
add ebx, 0x1c
mov dword [esp + 0x10], ebx
je 0x4caeb3
mov eax, dword [esp + 8]
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0xc]
mov esi, dword [eax + 8]
nop
push 0
push edi
push ebx
push esi
call dword [sym.imp.WS2_32.dll_send]
mov ebp, eax
test eax, eax
js 0x4cafbb
cmp edi, ebp
jb 0x4cafbb
add ebx, ebp
sub edi, ebp
jne 0x4cae90
mov esi, dword [esp + 0x14]
mov ebp, 0xffffffff
test esi, esi
jne 0x4caed1
mov eax, dword [esp + 8]
mov ebp, dword [eax + 8]
cmp dword [eax + 0x18], 0x10
jne 0x4cb02b
cmp byte [0x5d99d8], 0
mov edi, dword [esp + 0xc]
mov ebx, dword [esp + 4]
mov dword [esp + 0x18], 0x10
jne 0x4cb0ca
lea ecx, [esp + 0x2c]
mov dword [esp + 0x38], ebx
mov dword [esp + 0x2c], 0xa
mov dword [esp + 0x34], 1
mov dword [esp + 0x30], 0
lea eax, [ebx + 1]
lea edx, [esp + 0x34]
push ecx
push 0
push 0
push edx
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
je 0x4cb0b0
cmp byte [0x5d99d8], 1
je 0x4cb0ca
lea eax, [esp + 0x18]
mov dword [esp], 0
lea ecx, [esp + 0x1c]
push eax
push ecx
push ebx
call dword [sym.imp.WS2_32.dll_accept]
cmp eax, 0xffffffff
je 0x4cb1c8
mov ebp, eax
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [esp + 8]
mov ebx, 0xffffffff
cmp dword [eax + 0x18], 0x10
jne 0x4cb033
mov dword [esp], 0
mov ebx, 0xffffffff
test esi, esi
jne 0x4cb115
jmp 0x4cb12d
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
mov ebp, ebx
mov ebx, eax
call esi
push eax
call fcn.004cd010
sub esp, 0x10
mov dword [esp + 0xc], ebx
mov ebx, ebp
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.TCP_socket
jmp 0x4cb100
test ebp, ebp
js 0x4cb144
mov eax, 0x5ae78d
xor ecx, ecx
jmp 0x4cb15d
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
mov ebp, ebx
mov ebx, eax
call esi
push eax
call fcn.004cd010
sub esp, 0x10
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], eax
mov ebx, ebp
mov dword [esp + 8], str.TCP_bind
jmp 0x4cb100
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
mov ebp, ebx
mov ebx, eax
call esi
push eax
call fcn.004cd010
sub esp, 0x10
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], eax
mov ebx, ebp
mov dword [esp + 8], str.TCP_getsockname
jmp 0x4cb100
mov edi, dword [esp + 0xc]
mov ebx, dword [esp + 4]
cmp byte [0x5d99d8], 0
jne 0x4cb0ca
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38], ebp
mov dword [esp + 0x1c], 0xa
mov dword [esp + 0x34], 1
mov dword [esp + 0x20], 0
lea eax, [ebp + 1]
lea edx, [esp + 0x34]
push ecx
push 0
push 0
push edx
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
je 0x4cb0b0
cmp byte [0x5d99d8], 1
je 0x4cb0ca
mov dword [esp], 0
mov edx, esp
mov ecx, ebp
push 4
call fcn.004ca360
add esp, 4
test eax, eax
js 0x4cb207
push dword [esp]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [esp], eax
test esi, esi
jne 0x4cb115
jmp 0x4cb12d
sub esp, 8
mov dword [esp + 4], str.dnssd_clientstub_wait_for_daemon_timed_out
call fcn.004c9fc0
add esp, 8
mov byte [0x5d99d8], 1
mov dword [esp], 0xfffeffe0
test esi, esi
jne 0x4cb115
jmp 0x4cb12d
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
mov ebp, ebx
mov ebx, eax
call esi
push eax
call fcn.004cd010
sub esp, 0x10
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], eax
mov ebx, ebp
mov dword [esp + 8], str.TCP_listen
mov dword [esp + 4], str.dnssd_clientstub_deliver_request:__s_failed__d___s_
call fcn.004c9fc0
add esp, 0x14
mov ebp, 0xffffffff
cmp ebx, 0xffffffff
je 0x4cb121
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
cmp ebp, 0xffffffff
je 0x4cb12d
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
push edi
call fcn.00537860
add esp, 4
mov eax, dword [esp]
add esp, 0x138
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebx, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call ebx
mov ecx, ebx
mov ebx, eax
call ecx
push eax
call fcn.004cd010
mov ecx, ebx
add esp, 4
mov ebx, dword [esp + 4]
sub esp, 0x1c
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], ebp
mov dword [esp + 8], esi
mov dword [esp + 4], str.dnssd_clientstub_write_all__d__failed__ld__ld__d__s
call fcn.004c9fc0
add esp, 0x1c
mov eax, dword [esp + 8]
mov eax, dword [eax + 8]
sub esp, 0x10
mov ecx, dword [esp + 0x20]
mov dword [esp + 8], eax
mov dword [esp + 4], str.dnssd_clientstub_deliver_request_ERROR:_write_all__d___lu_bytes__failed
mov dword [esp + 0xc], ecx
call fcn.004c9fc0
add esp, 0x10
mov edi, dword [esp + 0xc]
mov esi, dword [esp + 0x14]
mov ebp, 0xffffffff
test esi, esi
jne 0x4cb115
jmp 0x4cb12d
mov ebp, esi
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
mov ebx, eax
call esi
mov esi, ebp
push eax
call fcn.004cd010
sub esp, 0x10
mov dword [esp + 0xc], ebx
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.accept
mov dword [esp + 4], str.dnssd_clientstub_deliver_request:__s_failed__d___s_
call fcn.004c9fc0
add esp, 0x14
jmp 0x4cb1b6
mov dword [esp], 0xfffeffe5
test esi, esi
jne 0x4cb115
jmp 0x4cb12d