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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2dc
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x2c0], 0xffffffff
mov dword [ebp - 0x2bc], 0xffffffff
mov dword [ebp - 0x2b4], 5
mov dword [ebp - 0x2b0], 0
mov eax, dword [ebx]
mov dword [ebp - 0x118], eax
mov dword [ebp - 0x11c], 1
lea edx, [ebp - 0x2b4]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
lea esi, [ebp - 0x11c]
mov dword [esp + 4], esi
inc eax
mov dword [esp], eax
call sub.WS2_32.dll_select
sub esp, 0x14
test eax, eax
jle 0x40c4c4
mov dword [esp + 4], esi
mov eax, dword [ebx]
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
push edi
push edi
test eax, eax
je 0x40c4c4
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
lea eax, [ebp - 0x2bc]
mov dword [esp + 4], eax
mov eax, dword [ebx]
mov dword [esp], eax
call sub.WS2_32.dll_recv
sub esp, 0x10
test eax, eax
jle 0x40c4c4
cmp dword [ebp - 0x2bc], 1
lea esi, [ebp - 0x21c]
mov dword [esp + 0xc], 0
jne 0x40c380
mov dword [esp + 8], 6
mov dword [esp + 4], esi
mov eax, dword [ebx]
mov dword [esp], eax
call sub.WS2_32.dll_recv
sub esp, 0x10
cmp eax, 6
jne 0x40c4c4
mov word [ebp - 0x2ac], 2
mov dword [esp + 8], 2
mov dword [esp + 4], esi
lea eax, [ebp - 0x2aa]
mov dword [esp], eax
call fcn.00409cc0
mov dword [esp + 8], 4
lea eax, [ebp - 0x21a]
mov dword [esp + 4], eax
lea eax, [ebp - 0x2a8]
mov dword [esp], eax
call fcn.00409cc0
mov dword [esp + 8], 8
mov dword [esp + 4], 0
lea eax, [ebp - 0x2a4]
mov dword [esp], eax
call fcn.00409bfc
jmp 0x40c420
mov dword [esp + 8], 0x100
mov dword [esp + 4], esi
mov eax, dword [ebx]
mov dword [esp], eax
call sub.WS2_32.dll_recv
sub esp, 0x10
test eax, eax
jle 0x40c4c4
mov dword [ebp - 0x2b8], 0
mov dword [esp + 8], pe_nt_image_headers32
mov dword [esp + 4], esi
lea edi, [ebp - 0x29c]
mov dword [esp], edi
call fcn.00409768
mov dword [esp + 8], 2
lea eax, [esi + eax + 1]
mov dword [esp + 4], eax
lea eax, [ebp - 0x2b8]
mov dword [esp], eax
call fcn.00409cc0
movzx eax, word [ebp - 0x2b8]
mov dword [esp], eax
call sub.WS2_32.dll_ntohs
push esi
movzx eax, ax
mov dword [ebp - 0x2b8], eax
lea edx, [ebp - 0x2ac]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.004031d4
test al, al
jne 0x40c420
mov dword [esp + 4], 1
jmp 0x40c452
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 [ebp - 0x2c0], eax
cmp eax, 0xffffffff
jne 0x40c45e
mov dword [esp + 4], 2
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0040c1de
jmp 0x40c4c4
mov dword [esp + 8], 0x10
lea edx, [ebp - 0x2ac]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.WS2_32.dll_connect
sub esp, 0xc
inc eax
mov eax, dword [ebx]
je 0x40c4a6
mov dword [esp + 4], 3
mov dword [esp], eax
call fcn.0040c1de
mov eax, dword [ebx]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c0]
mov dword [esp], eax
call fcn.0040c034
jmp 0x40c4c4
mov dword [esp + 4], 2
mov dword [esp], eax
call fcn.0040c1de
lea eax, [ebp - 0x2c0]
mov dword [esp], eax
call fcn.00403c80
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret