Function at 0x40c9b0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Convert ip address from string
Create tcp socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x27c
mov eax, dword [0x431008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov dword [ebp - 0x27c], eax
xor edi, edi
lea eax, [ebp - 0x278]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40ca11
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d5cc
mov esp, ebp
pop ebp
ret 8
mov eax, 2
push 0xd
mov word [ebp - 0xd8], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0xd6], ax
cmp ebx, 0x42cbf5
jne 0x40caa4
lea eax, [ebp - 0x8c]
mov dword [ebp - 0xc4], edi
push eax
lea eax, [ebp - 0xc4]
mov dword [ebp - 0x8c], edi
push eax
xorps xmm0, xmm0
mov dword [ebp - 0xc0], edi
push 0
push str.time.nist.gov
movlpd qword [ebp - 0xb4], xmm0
movlpd qword [ebp - 0xac], xmm0
mov dword [ebp - 0xbc], 1
mov dword [ebp - 0xb8], 6
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov eax, dword [ebp - 0x8c]
test eax, eax
je 0x40c9f6
mov eax, dword [eax + 0x18]
mov eax, dword [eax + 4]
mov dword [ebp - 0xd4], eax
jmp 0x40cab4
lea eax, [ebp - 0xd4]
push eax
push ebx
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
push 4
lea eax, [ebp - 0x90]
mov dword [ebp - 0x90], 0x3e8
push eax
push 0x1006
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
push 0x10
lea eax, [ebp - 0xd8]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x40cc0b
push 0x80
push eax
lea eax, [ebp - 0x88]
push eax
call fcn.0040eec0
add esp, 0xc
lea eax, [ebp - 0x88]
push 0
push 0x80
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x40cc04
lea eax, [ebp - 0xdc]
push eax
lea eax, [ebp - 0xe0]
push eax
lea eax, [ebp - 0xe4]
push eax
lea eax, [ebp - 0xa4]
push eax
lea eax, [ebp - 0xa0]
push eax
lea eax, [ebp - 0x9c]
push eax
lea eax, [ebp - 0x98]
push eax
lea eax, [ebp - 0x94]
push eax
lea eax, [ebp - 0x8c]
push eax
lea eax, [ebp - 0xe8]
push eax
push str._d__d__d__d__d:_d:_d__d__d__d
lea eax, [ebp - 0x88]
push 0x80
push eax
call fcn.0040c980
mov eax, dword [ebp - 0x8c]
add esp, 0x34
mov ebx, dword [ebp - 0x27c]
add eax, 0x7d0
mov dword [ebp - 0x8c], eax
add eax, 0xfffff894
mov dword [ebp - 0xb4], eax
mov eax, dword [ebp - 0x94]
dec eax
mov dword [ebp - 0xb8], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0xbc], eax
mov eax, dword [ebp - 0x9c]
mov dword [ebp - 0xc0], eax
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0xc4], eax
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0xc8], eax
test ebx, ebx
je 0x40cbff
lea eax, [ebp - 0xc8]
push eax
call fcn.004135ae
add esp, 4
add eax, 0x7080
mov dword [ebx], eax
adc edx, edi
mov dword [ebx + 4], edx
mov edi, 1
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040d5cc
mov esp, ebp
pop ebp
ret 8