Function at 0x40b5a0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Resolve dns
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x5c
mov eax, dword [0x43fbfc]
xor eax, esp
mov dword [esp + 0x58], eax
push esi
mov esi, dword [esp + 0x64]
push edi
push 0x10
push esi
lea eax, [esp + 0x54]
push 0x11
push eax
mov dword [esp + 0x18], esi
call fcn.0041b13a
mov eax, esi
add esp, 0x10
lea edx, [eax + 1]
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40b5d0
sub eax, edx
cmp eax, 0x10
jae 0x40b5e4
mov byte [esp + eax + 0x4c], cl
push 1
push 0
push 0
push 0
push 1
push 2
mov byte [esp + 0x74], 0
call dword [sym.imp.WS2_32.dll_WSASocketA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40b636
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x6c]
push eax
push ecx
push edx
push esi
push str.NSocketUtil::connectSock____s___d___d__code:__d___failed.._n
push 3
call fcn.00403ef0
add esp, 0x18
or eax, edi
pop edi
pop esi
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.0041a1b8
add esp, 0x5c
ret
xor eax, eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
lea eax, [esp + 0x4c]
push eax
mov word [esp + 0x40], 2
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
mov dword [esp + 0x40], eax
jne 0x40b69d
lea ecx, [esp + 0x4c]
push ecx
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x40b67a
mov eax, dword [eax + 0xc]
cmp dword [eax], 0
jne 0x40b695
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.0041a1b8
add esp, 0x5c
ret
mov edx, dword [eax]
mov eax, dword [edx]
mov dword [esp + 0x40], eax
mov ecx, dword [esp + 0x6c]
push ebp
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x42], ax
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov ebp, eax
test ebp, ebp
jne 0x40b6d6
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop ebp
pop edi
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.0041a1b8
add esp, 0x5c
ret
push 0x10
push ebp
push edi
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
jne 0x40b708
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
push ebp
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
pop ebp
pop edi
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.0041a1b8
add esp, 0x5c
ret
push ebx
push 0x10
lea edx, [esp + 0x48]
push edx
push edi
mov dword [esp + 0x20], ebp
call dword [sym.imp.WS2_32.dll_connect]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, dword [esp + 0x78]
push 1
push esi
push 1
lea eax, [esp + 0x20]
push eax
push 1
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
cmp eax, 0xffffffff
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
je 0x40b7d9
jmp 0x40b750
cmp eax, 0x102
je 0x40b7ee
push 0x2c
lea ecx, [esp + 0x1c]
push 0
push ecx
call fcn.0041a540
add esp, 0xc
lea edx, [esp + 0x18]
push edx
push ebp
push edi
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
cmp eax, 0xffffffff
je 0x40b874
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x40b803
push str.NSocketUtil::connectSock_5_:_lNetworkEvents__0_IGNORE_for__spurious_WSAWaitForMultipleEvents__ISSUE__n
push 3
call fcn.00403ef0
add esp, 8
call ebx
mov ecx, dword [esp + 0x10]
push eax
mov eax, dword [esp + 0x78]
push esi
push eax
push ecx
push str.NSocketUtil::connectSock_5_:_DETAIL_param:___s___d___d__code:__d___n
push 3
call fcn.00403ef0
add esp, 0x18
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
push esi
push 1
lea edx, [esp + 0x20]
push edx
push 1
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
cmp eax, 0xffffffff
jne 0x40b750
call ebx
mov ecx, dword [esp + 0x10]
push eax
mov eax, dword [esp + 0x78]
push esi
push eax
push ecx
push str.NSocketUtil::connectSock_3_____s___d___d__code:__d___failed.._n
jmp 0x40b86a
call ebx
mov edx, dword [esp + 0x74]
push eax
mov eax, dword [esp + 0x14]
push esi
push edx
push eax
push str.NSocketUtil::connectSock_4_____s___d___d__code:__d___failed.._n
jmp 0x40b86a
cmp eax, 0x10
jne 0x40b857
xor ecx, ecx
lea ebx, [ebx]
add ecx, 1
mov edx, 0x10
sar edx, cl
cmp edx, 1
jne 0x40b810
cmp dword [esp + ecx*4 + 0x1c], 0
je 0x40b83b
call ebx
mov ecx, dword [esp + 0x10]
push eax
mov eax, dword [esp + 0x78]
push esi
push eax
push ecx
push str.NSocketUtil::connectSock_6_____s___d___d__code:__d___failed.._n
jmp 0x40b86a
push ebp
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
pop ebx
pop ebp
mov eax, edi
pop edi
pop esi
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.0041a1b8
add esp, 0x5c
ret
call ebx
mov edx, dword [esp + 0x74]
push eax
mov eax, dword [esp + 0x14]
push esi
push edx
push eax
push str.NSocketUtil::connectSock_8_____s___d___d__code:__d___failed.._n
push 3
call fcn.00403ef0
add esp, 0x18
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
push ebp
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov ecx, dword [esp + 0x68]
pop ebx
pop ebp
pop edi
pop esi
xor ecx, esp
or eax, 0xffffffff
call fcn.0041a1b8
add esp, 0x5c
ret