Function at 0x402de0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x40b891
push eax
mov eax, 0x6010
mov dword fs:[0], esp
call fcn.0040b3b0
push ebx
push ebp
push esi
push edi
mov ebx, ecx
call fcn.00403a00
mov edx, eax
mov eax, dword [esp + 0x6030]
mov ecx, 0x20
lea ebp, [eax + 0xe34]
xor eax, eax
mov edi, ebp
test edx, edx
rep stosd dword es:[edi], eax
je 0x402e45
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebx
call fcn.00403a00
mov edx, eax
mov eax, dword [esp + 0x6034]
mov ecx, 0x20
lea ebp, [eax + 0xe34]
xor eax, eax
mov edi, ebp
test edx, edx
rep stosd dword es:[edi], eax
je 0x402e87
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x1400
xor eax, eax
lea edi, [esp + 0x1020]
mov dword [esp + 0x101c], 0
rep stosd dword es:[edi], eax
lea eax, [esp + 0x101c]
mov ecx, ebx
push eax
call fcn.004039f0
push eax
mov ecx, ebx
call fcn.00403a10
mov ecx, dword [esp + 0x6038]
push eax
call fcn.004066b0
test eax, eax
je 0x403063
push 0
push 1
push 2
call sub.WSOCK32.dll_socket
or esi, 0xffffffff
mov dword [ebx + 0x5d0], eax
cmp eax, esi
je 0x403063
lea ecx, [ebx + 0x5d4]
push 0x10
push ecx
push eax
call sub.WSOCK32.dll_connect
cmp eax, esi
jne 0x402f45
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
mov dword [esp + 0x6028], 0
call sub.WSOCK32.dll_WSAGetLastError
push eax
lea edx, [esp + 0x14]
push 0x4103fc
push edx
call sub.MFC42.DLL_CString::Format
mov eax, dword [ebx + 0x5d0]
add esp, 0xc
push eax
call sub.WSOCK32.dll_closesocket
mov dword [esp + 0x6028], esi
lea ecx, [esp + 0x10]
jmp 0x40305e
mov ecx, dword [esp + 0x101c]
mov eax, dword [ebx + 0x5d0]
push 0
lea edx, [esp + 0x1024]
push ecx
push edx
push eax
call sub.WSOCK32.dll_send
cmp eax, esi
je 0x40301b
test eax, eax
je 0x40301b
mov edx, dword [ebx + 0x5d0]
mov ecx, 0x1400
xor eax, eax
lea edi, [esp + 0x1020]
rep stosd dword es:[edi], eax
push eax
lea ecx, [esp + 0x1024]
push 0x1000
push ecx
push edx
call sub.WSOCK32.dll_recv
cmp eax, esi
je 0x402fe2
test eax, eax
je 0x402fe2
mov eax, dword [ebx + 0x5d0]
push eax
call sub.WSOCK32.dll_closesocket
lea ecx, [esp + 0x18]
lea edx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x6038]
lea eax, [esp + 0x1020]
push edx
push eax
mov dword [esp + 0x24], 0x1000
call fcn.004068e0
neg eax
sbb eax, eax
neg eax
jmp 0x403065
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString
mov dword [esp + 0x6028], 2
call sub.WSOCK32.dll_WSAGetLastError
push eax
lea ecx, [esp + 0x18]
push 0x4103ec
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
mov dword [esp + 0x6028], esi
lea ecx, [esp + 0x14]
jmp 0x40305e
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
mov dword [esp + 0x6028], 1
call sub.WSOCK32.dll_WSAGetLastError
push eax
lea edx, [esp + 0x14]
push 0x4103dc
push edx
call sub.MFC42.DLL_CString::Format
mov eax, dword [ebx + 0x5d0]
add esp, 0xc
push eax
call sub.WSOCK32.dll_closesocket
mov dword [esp + 0x6028], esi
lea ecx, [esp + 0x10]
call fcn.0040b142
xor eax, eax
mov ecx, dword [esp + 0x6020]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x601c
ret 8