Function at 0x401ef0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
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
mov eax, 0x10028
call fcn.00417260
mov eax, dword [0x42c010]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, edx
push 6
push 1
push 2
mov esi, ecx
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x10024], eax
test eax, eax
je 0x402153
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x402153
mov ecx, 2
mov word [ebp - 0x1001c], cx
mov eax, dword [eax + 0xc]
push ebx
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x10018], eax
call dword [sym.imp.WS2_32.dll_htons]
mov ebx, dword [ebp - 0x10024]
mov word [ebp - 0x1001a], ax
lea eax, [ebp - 0x1001c]
push 0x10
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x402153
push esi
push edi
lea eax, [ebp - 0x1000c]
push str.GET__s_HTTP_1.1_r_nHost:__s_r_nConnection:_close_r_n_r_n
push eax
call fcn.00402180
lea ecx, [ebp - 0x1000c]
add esp, 0x10
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401fa0
push 0
sub ecx, edx
lea eax, [ebp - 0x1000c]
push ecx
push eax
push ebx
call dword [sym.imp.WS2_32.dll_send]
mov edi, dword [sym.imp.WS2_32.dll_recv]
xor al, al
mov byte [ebp - 0x1001d], al
jmp 0x401fd0
push 0xffff
xor esi, esi
lea eax, [ebp - 0x1000c]
push esi
push eax
call fcn.0040fee0
add esp, 0xc
jmp 0x401ff0
push 0
push 1
lea eax, [ebp - 0x1001e]
push eax
push ebx
call edi
test eax, eax
jle 0x40201c
mov al, byte [ebp - 0x1001e]
mov byte [ebp + esi - 0x1000c], al
cmp al, 0xa
je 0x40201c
inc esi
cmp esi, 0xfffe
jl 0x401ff0
test esi, esi
jle 0x402142
dec esi
js 0x402051
jmp 0x402030
cmp byte [ebp + esi - 0x1000c], 0x20
jge 0x402051
cmp esi, 0xffff
jae 0x402179
mov byte [ebp + esi - 0x1000c], 0
dec esi
jns 0x402030
lea ecx, [ebp - 0x1000c]
lea edx, [ecx + 1]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402060
sub ecx, edx
je 0x402142
lea eax, [ebp - 0x10028]
mov dword [ebp - 0x10028], 0
push eax
lea eax, [ebp - 0x1000c]
push 0x42895c
push eax
call fcn.0040d6cf
mov ecx, eax
add esp, 0xc
test ecx, ecx
je 0x402142
mov edx, str.HTTP_1.0
mov bl, byte [eax]
cmp bl, byte [edx]
jne 0x4020c3
test bl, bl
je 0x4020bf
mov bl, byte [eax + 1]
cmp bl, byte [edx + 1]
jne 0x4020c3
add eax, 2
add edx, 2
test bl, bl
jne 0x4020a3
xor eax, eax
jmp 0x4020c8
sbb eax, eax
or eax, 1
test eax, eax
je 0x402104
mov eax, str.HTTP_1.1
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x4020f1
test dl, dl
je 0x4020ed
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x4020f1
add ecx, 2
add eax, 2
test dl, dl
jne 0x4020d1
xor eax, eax
jmp 0x4020f6
sbb eax, eax
or eax, 1
mov ebx, dword [ebp - 0x10024]
test eax, eax
jne 0x401fd0
lea eax, [ebp - 0x10028]
push eax
push 0x42895c
push 0
call fcn.0040d6cf
push eax
call fcn.0040d7bc
mov ebx, dword [ebp - 0x10024]
add esp, 0x10
mov dword [0x45f260], eax
cmp eax, 0xc8
jne 0x401fd0
mov byte [ebp - 0x1001d], 1
jmp 0x401fd0
mov al, byte [ebp - 0x1001d]
test al, al
jne 0x402166
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040c5b1
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040c5b1
mov esp, ebp
pop ebp
ret
call fcn.0040d5f3
int3