Function at 0x409408
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffa44
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x5bc], ebx
mov dword [ebp - 0x5b8], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 8], ecx
mov ebx, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0040431c
mov eax, dword [ebp - 8]
call fcn.0040431c
xor eax, eax
push ebp
push 0x409672
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x14]
call fcn.00403ee8
lea eax, [ebp - 0x5b4]
push eax
push 0x101
call sub.wsock32.dll_WSAStartup
push 6
push 1
push 2
call sub.wsock32.dll_socket
mov esi, eax
mov word [ebp - 0x24], 2
push ebx
call sub.wsock32.dll_htons
mov word [ebp - 0x22], ax
mov eax, dword [ebp - 4]
call fcn.0040432c
push eax
call sub.wsock32.dll_inet_addr
mov edi, eax
mov dword [ebp - 0x20], edi
inc edi
jne 0x4094ce
mov eax, dword [ebp - 4]
call fcn.0040432c
push eax
call sub.wsock32.dll_gethostbyname
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4094c1
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
call fcn.00403f3c
jmp 0x40963a
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x20], eax
push 0x10
lea eax, [ebp - 0x24]
push eax
push esi
call sub.wsock32.dll_connect
push 0x40968c
push dword [ebp - 8]
push 0x40969c
lea eax, [ebp - 0x10]
mov edx, 3
call fcn.004041ec
push dword [ebp - 0x10]
push 0x4096b0
push dword [ebp - 4]
lea eax, [ebp - 0x10]
mov edx, 3
call fcn.004041ec
push dword [ebp - 0x10]
push 0x4096cc
lea edx, [ebp - 0x5b8]
mov eax, ebx
call fcn.004091a4
push dword [ebp - 0x5b8]
lea eax, [ebp - 0x10]
mov edx, 3
call fcn.004041ec
push dword [ebp - 0x10]
push 0x4096d8
push dword [ebp - 8]
push 0x4096e4
lea eax, [ebp - 0x10]
mov edx, 4
call fcn.004041ec
lea eax, [ebp - 0x10]
mov edx, 0x4096f0
call fcn.00404134
push dword [ebp - 0x10]
push 0x409748
push dword [ebp - 4]
lea eax, [ebp - 0x10]
mov edx, 3
call fcn.004041ec
push dword [ebp - 0x10]
push 0x4096cc
lea edx, [ebp - 0x5bc]
mov eax, ebx
call fcn.004091a4
push dword [ebp - 0x5bc]
lea eax, [ebp - 0x10]
mov edx, 3
call fcn.004041ec
lea eax, [ebp - 0x10]
mov edx, 0x4096e4
call fcn.00404134
lea eax, [ebp - 0x10]
mov edx, 0x409758
call fcn.00404134
lea eax, [ebp - 0x10]
mov edx, 0x409774
call fcn.00404134
lea eax, [ebp - 0x10]
mov edx, 0x4096e4
call fcn.00404134
push 0
mov eax, dword [ebp - 0x10]
call fcn.0040412c
push eax
mov eax, dword [ebp - 0x10]
call fcn.0040432c
push eax
push esi
call sub.wsock32.dll_send
push 0
push 0x400
lea eax, [ebp - 0x424]
push eax
push esi
call sub.wsock32.dll_recv
mov ebx, eax
cmp ebx, 1
jl 0x409624
lea edx, [ebp - 0x424]
lea eax, [ebp - 0x10]
mov ecx, ebx
call fcn.00403fd8
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 0x10]
call fcn.00404134
jmp 0x4095ec
push esi
call sub.wsock32.dll_closesocket
call sub.wsock32.dll_WSACleanup
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
call fcn.00403f3c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409679
lea eax, [ebp - 0x5bc]
mov edx, 2
call fcn.00403f0c
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.00403f0c
lea eax, [ebp - 8]
mov edx, 2
call fcn.00403f0c
ret