Function at 0x40bfeb
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Receive data
Receive data on socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
push ebx
push esi
push edi
push dword [ebp + 0x10]
push 0x41c6e4
call fcn.00403cd9
mov esi, dword [ebp + 0xc]
or ebx, 0xffffffff
pop ecx
cmp dword [esi + 0x124], ebx
pop ecx
je 0x40c01f
push esi
push dword [ebp + 8]
call fcn.0040bf4b
pop ecx
pop ecx
push 6
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
cmp eax, ebx
mov dword [esi + 0x124], eax
jne 0x40c03f
push 0x41c538
jmp 0x40c119
xor edi, edi
mov word [ebp - 0x10], 2
push edi
mov word [ebp - 0xe], di
call dword [sym.imp.WSOCK32.dll_htonl]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x10]
push 0x10
push eax
push dword [esi + 0x124]
call dword [sym.imp.WSOCK32.dll_bind]
cmp eax, ebx
jne 0x40c075
push 0x41c530
jmp 0x40c119
push dword [ebp + 0x10]
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, ebx
mov dword [ebp - 0x14], eax
jne 0x40c0c8
push dword [ebp + 0x10]
call dword [sym.imp.WSOCK32.dll_gethostbyname]
mov edi, eax
test edi, edi
jne 0x40c09b
push 0x41c6d4
jmp 0x40c119
push 0x10
lea eax, [ebp - 0x10]
push 0
push eax
call fcn.0040e030
movsx eax, word [edi + 0xa]
push eax
mov eax, dword [edi + 0xc]
push dword [eax]
lea eax, [ebp - 0xc]
push eax
call fcn.0040cb80
mov ax, word [edi + 8]
add esp, 0x18
mov word [ebp - 0x10], ax
jmp 0x40c0ec
push 0x10
lea eax, [ebp - 0x10]
push edi
push eax
call fcn.0040e030
lea eax, [ebp - 0x14]
push 4
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.0040cb80
add esp, 0x18
mov word [ebp - 0x10], 2
mov ax, word [esi + 0x1cc]
push eax
call dword [sym.imp.WSOCK32.dll_htons]
mov word [ebp - 0xe], ax
lea eax, [ebp - 0x10]
push 0x10
push eax
push dword [esi + 0x124]
call dword [sym.imp.WSOCK32.dll_connect]
cmp eax, ebx
jne 0x40c126
push 0x41c6cc
push esi
call fcn.0040b6b6
pop ecx
pop ecx
jmp 0x40c23e
push 0x41c6a8
call fcn.00403cd9
pop ecx
lea eax, [ebp - 0x208]
push 0
push 0x1f4
push eax
push dword [esi + 0x124]
call dword [sym.imp.WSOCK32.dll_recv]
cmp eax, ebx
je 0x40c227
test eax, eax
jle 0x40c227
and byte [ebp + eax - 0x208], 0
lea eax, [ebp - 0x208]
push eax
push 0x41c69c
call fcn.00403cd9
lea eax, [ebp - 0x208]
push eax
call fcn.0040c940
add esp, 0xc
test eax, eax
jbe 0x40c1d9
lea eax, [ebp - 0x208]
push eax
call fcn.0040c940
cmp byte [ebp + eax - 0x209], 0xa
pop ecx
je 0x40c1b5
lea eax, [ebp - 0x208]
push eax
call fcn.0040c940
cmp byte [ebp + eax - 0x209], 0xd
pop ecx
jne 0x40c1d9
lea eax, [ebp - 0x208]
push eax
call fcn.0040c940
and byte [ebp + eax - 0x209], 0
lea eax, [ebp - 0x208]
push eax
call fcn.0040c940
pop ecx
pop ecx
jmp 0x40c183
lea eax, [ebp - 0x208]
push 0x20
push eax
call fcn.0040c880
mov esi, eax
pop ecx
test esi, esi
pop ecx
je 0x40c1fa
and byte [esi], 0
inc esi
push esi
call fcn.004081ec
pop ecx
cmp byte [ebp - 0x208], 0x32
jne 0x40c207
xor eax, eax
jmp 0x40c240
cmp byte [ebp - 0x208], 0x35
jne 0x40c213
push esi
jmp 0x40c218
push 0x4177c0
push dword [ebp + 0x14]
call fcn.0040c6a0
pop ecx
pop ecx
push 0xfffffffffffffffe
pop eax
jmp 0x40c240
push 0x41c694
push esi
call fcn.0040b6b6
push esi
push dword [ebp + 8]
call fcn.0040bf4b
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret