Function at 0x40fb30
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbc8
push edi
push esi
push ebx
mov dword [ebp - 4], 0xffffffff
push dword [ebp + 8]
call sub.ws2_32.dll_inet_addr
mov esi, eax
push 6
push 1
push 2
call sub.ws2_32.dll_socket
cmp eax, 0xffffffff
je 0x40fe3f
mov dword [ebp - 0x42c], eax
mov word [ebp - 0x14], 2
push 0x8b
call sub.ws2_32.dll_htons
mov word [ebp - 0x12], ax
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x418], 1
lea eax, [ebp - 0x418]
push eax
push 0x8004667e
push dword [ebp - 0x42c]
call sub.ws2_32.dll_ioctlsocket
mov word [ebp - 0x430], 1
mov word [ebp - 0x42e], 0
push 4
lea eax, [ebp - 0x430]
push eax
push 0x80
push 0xffff
push dword [ebp - 0x42c]
call sub.ws2_32.dll_setsockopt
push 0x10
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x42c]
call sub.ws2_32.dll_connect
cmp eax, 0xffffffff
jne 0x40fe36
call sub.ws2_32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x40fd0a
mov dword [ebp - 0x420], 6
mov dword [ebp - 0x41c], 0
mov dword [ebp - 0x428], 1
mov eax, dword [ebp - 0x42c]
mov dword [ebp - 0x424], eax
lea eax, [ebp - 0x420]
push eax
push 0
lea eax, [ebp - 0x428]
push eax
push 0
push 0
call sub.ws2_32.dll_select
or eax, eax
je 0x40fd03
cmp eax, 0xffffffff
je 0x40fd03
push 0
push 0x4c
push 0x41b9c0
push dword [ebp - 0x42c]
call sub.ws2_32.dll_send
cmp eax, 0xffffffff
jne 0x40fc6b
jmp 0x40fd0a
mov dword [ebp - 0x420], 6
mov dword [ebp - 0x41c], 0
mov dword [ebp - 0x428], 1
mov eax, dword [ebp - 0x42c]
mov dword [ebp - 0x424], eax
lea eax, [ebp - 0x420]
push eax
push 0
push 0
lea eax, [ebp - 0x428]
push eax
push 0
call sub.ws2_32.dll_select
or eax, eax
je 0x40fcfc
cmp eax, 0xffffffff
je 0x40fcfc
push 0
push 0x400
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x42c]
call sub.ws2_32.dll_recv
cmp eax, 0xffffffff
jne 0x40fcd7
jmp 0x40fd0a
lea ecx, [ebp - 0x414]
cmp byte [ecx], 0x82
jne 0x40fce7
cmp eax, 7
jbe 0x40fce9
jmp 0x40fd0a
push dword [ebp - 0x42c]
pop dword [ebp - 4]
jmp 0x40fe3f
jmp 0x40fd0a
jmp 0x40fd0a
push dword [ebp - 0x42c]
call sub.ws2_32.dll_closesocket
push 6
push 1
push 2
call sub.ws2_32.dll_socket
cmp eax, 0xffffffff
je 0x40fe34
mov dword [ebp - 0x42c], eax
push 0x1bd
call sub.ws2_32.dll_htons
mov word [ebp - 0x12], ax
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x418], 1
lea eax, [ebp - 0x418]
push eax
push 0x8004667e
push dword [ebp - 0x42c]
call sub.ws2_32.dll_ioctlsocket
mov word [ebp - 0x430], 1
mov word [ebp - 0x42e], 0
push 4
lea eax, [ebp - 0x430]
push eax
push 0x80
push 0xffff
push dword [ebp - 0x42c]
call sub.ws2_32.dll_setsockopt
push 0x10
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x42c]
call sub.ws2_32.dll_connect
cmp eax, 0xffffffff
jne 0x40fe2e
call sub.ws2_32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x40fe14
mov dword [ebp - 0x420], 6
mov dword [ebp - 0x41c], 0
mov dword [ebp - 0x428], 1
mov eax, dword [ebp - 0x42c]
mov dword [ebp - 0x424], eax
lea eax, [ebp - 0x420]
push eax
push 0
lea eax, [ebp - 0x428]
push eax
push 0
push 0
call sub.ws2_32.dll_select
or eax, eax
je 0x40fe10
cmp eax, 0xffffffff
je 0x40fe10
push dword [ebp - 0x42c]
pop dword [ebp - 4]
jmp 0x40fe3f
jmp 0x40fe14
push 2
push dword [ebp - 0x42c]
call sub.ws2_32.dll_shutdown
push dword [ebp - 0x42c]
call sub.ws2_32.dll_closesocket
jmp 0x40fe34
or eax, eax
jne 0x40fe34
jmp 0x40fe03
jmp 0x40fe3f
or eax, eax
jne 0x40fe3f
jmp 0x40fc4d
mov eax, dword [ebp - 4]
pop ebx
pop esi
pop edi
leave
ret 8