Function at 0x418970
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get socket status
Receive data
Receive data on socket

Disassembly:
sub esp, 0x2ec
mov dword [esp + 0x2c0], 0xffffffff
mov dword [esp + 0xb0], 0xffffffff
mov dword [esp + 0xb4], 5
mov dword [esp + 0xb8], 0
mov dword [esp + 0xbc], 0
mov dword [esp + 0x2dc], 0
jmp 0x4189dd
mov eax, dword [esp + 0x2dc]
mov edx, dword [esp + eax*4 + 0xc0]
mov eax, dword [esp + 0x2f0]
mov eax, dword [eax]
cmp edx, eax
je 0x4189ef
add dword [esp + 0x2dc], 1
mov eax, dword [esp + 0xbc]
cmp eax, dword [esp + 0x2dc]
ja 0x4189ba
jmp 0x4189f0
nop
mov eax, dword [esp + 0xbc]
cmp eax, dword [esp + 0x2dc]
jne 0x418a36
mov eax, dword [esp + 0xbc]
cmp eax, 0x3f
ja 0x418a36
mov eax, dword [esp + 0x2f0]
mov eax, dword [eax]
mov edx, eax
mov eax, dword [esp + 0x2dc]
mov dword [esp + eax*4 + 0xc0], edx
mov eax, dword [esp + 0xbc]
add eax, 1
mov dword [esp + 0xbc], eax
mov eax, dword [esp + 0x2f0]
mov eax, dword [eax]
lea edx, [eax + 1]
lea eax, [esp + 0xb4]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
lea eax, [esp + 0xbc]
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.WS2_32.dll_select
sub esp, 0x14
test eax, eax
jle 0x418d84
mov eax, dword [esp + 0x2f0]
mov eax, dword [eax]
lea edx, [esp + 0xbc]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
sub esp, 8
test eax, eax
je 0x418d84
mov eax, dword [esp + 0x2f0]
mov eax, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
lea edx, [esp + 0xb0]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.WS2_32.dll_recv
sub esp, 0x10
test eax, eax
jle 0x418d87
mov eax, dword [esp + 0xb0]
cmp eax, 1
jne 0x418b9f
mov eax, dword [esp + 0x2f0]
mov eax, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 6
lea edx, [esp + 0x1c0]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.WS2_32.dll_recv
sub esp, 0x10
cmp eax, 6
jne 0x418d8a
mov word [esp + 0x2c4], 2
mov dword [esp + 8], 2
lea eax, [esp + 0x1c0]
mov dword [esp + 4], eax
lea eax, [esp + 0x2c4]
add eax, 2
mov dword [esp], eax
call fcn.0041a5e1
mov dword [esp + 8], 4
lea eax, [esp + 0x1c0]
add eax, 2
mov dword [esp + 4], eax
lea eax, [esp + 0x2c4]
add eax, 4
mov dword [esp], eax
call fcn.0041a5e1
mov dword [esp + 8], 8
mov dword [esp + 4], 0
lea eax, [esp + 0x2c4]
add eax, 8
mov dword [esp], eax
call fcn.0041a59f
jmp 0x418ca9
mov eax, dword [esp + 0x2f0]
mov eax, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x100
lea edx, [esp + 0x1c0]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.WS2_32.dll_recv
sub esp, 0x10
mov dword [esp + 0x2d8], eax
cmp dword [esp + 0x2d8], 0
jle 0x418d8d
mov dword [esp + 0xac], 0
mov dword [esp + 8], pe_nt_image_headers32
lea eax, [esp + 0x1c0]
mov dword [esp + 4], eax
lea eax, [esp + 0x2c]
mov dword [esp], eax
call fcn.00419918
mov dword [esp + 0x2d4], eax
mov eax, dword [esp + 0x2d4]
lea edx, [eax + 1]
lea eax, [esp + 0x1c0]
add eax, edx
mov dword [esp + 8], 2
mov dword [esp + 4], eax
lea eax, [esp + 0xac]
mov dword [esp], eax
call fcn.0041a5e1
mov eax, dword [esp + 0xac]
movzx eax, ax
mov dword [esp], eax
call sub.WS2_32.dll_ntohs
sub esp, 4
movzx eax, ax
mov dword [esp + 0xac], eax
mov eax, dword [esp + 0xac]
lea edx, [esp + 0x2c4]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
lea eax, [esp + 0x2c]
mov dword [esp], eax
call fcn.00407c90
xor eax, 1
test al, al
je 0x418ca9
mov eax, dword [esp + 0x2f0]
mov eax, dword [eax]
mov dword [esp + 4], 1
mov dword [esp], eax
call fcn.00418934
nop
jmp 0x418d8e
mov dword [esp + 8], 6
mov dword [esp + 4], 1
mov dword [esp], 2
call sub.WS2_32.dll_socket
sub esp, 0xc
mov dword [esp + 0x2c0], eax
mov eax, dword [esp + 0x2c0]
cmp eax, 0xffffffff
jne 0x418cf9
mov eax, dword [esp + 0x2f0]
mov eax, dword [eax]
mov dword [esp + 4], 2
mov dword [esp], eax
call fcn.00418934
jmp 0x418d8e
mov eax, dword [esp + 0x2c0]
mov dword [esp + 8], 0x10
lea edx, [esp + 0x2c4]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.WS2_32.dll_connect
sub esp, 0xc
cmp eax, 0xffffffff
je 0x418d5a
mov eax, dword [esp + 0x2f0]
mov eax, dword [eax]
mov dword [esp + 4], 3
mov dword [esp], eax
call fcn.00418934
mov eax, dword [esp + 0x2f0]
mov edx, dword [eax]
mov eax, dword [esp + 0x2c0]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0041838c
jmp 0x418d8e
mov eax, dword [esp + 0x2f0]
mov eax, dword [eax]
mov dword [esp + 4], 2
mov dword [esp], eax
call fcn.00418934
lea eax, [esp + 0x2c0]
mov dword [esp], eax
call fcn.00408d8a
jmp 0x418d8e
nop
jmp 0x418d8e
nop
jmp 0x418d8e
nop
jmp 0x418d8e
nop
add esp, 0x2ec
ret