Function at 0x402670
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.00412dd0
mov eax, dword [0x42d518]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push 6
push 1
push 2
mov ebx, edx
mov esi, ecx
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x10024], eax
test eax, eax
je 0x4028d3
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x4028d3
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
push 0x10
lea eax, [ebp - 0x1001c]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x4028d3
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.00402900
lea ecx, [ebp - 0x1000c]
add esp, 0x10
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402720
push 0
sub ecx, edx
push ecx
lea eax, [ebp - 0x1000c]
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 0x402750
push 0xffff
xor esi, esi
lea eax, [ebp - 0x1000c]
push esi
push eax
call fcn.00411d60
add esp, 0xc
jmp 0x402770
push 0
push 1
lea eax, [ebp - 0x1001e]
push eax
push ebx
call edi
test eax, eax
jle 0x40279c
mov al, byte [ebp - 0x1001e]
mov byte [ebp + esi - 0x1000c], al
cmp al, 0xa
je 0x40279c
inc esi
cmp esi, 0xfffe
jl 0x402770
test esi, esi
jle 0x4028c2
dec esi
js 0x4027d1
jmp 0x4027b0
cmp byte [ebp + esi - 0x1000c], 0x20
jge 0x4027d1
cmp esi, 0xffff
jae 0x4028f9
dec esi
mov byte [ebp + esi - 0x1000b], 0
jns 0x4027b0
lea ecx, [ebp - 0x1000c]
lea edx, [ecx + 1]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4027e0
sub ecx, edx
je 0x4028c2
lea eax, [ebp - 0x10028]
push eax
lea eax, [ebp - 0x1000c]
push 0x428a28
push eax
mov dword [ebp - 0x10028], 0
call fcn.0040e700
mov ecx, eax
add esp, 0xc
test ecx, ecx
je 0x4028c2
mov edx, str.HTTP_1.0
mov bl, byte [eax]
cmp bl, byte [edx]
jne 0x402843
test bl, bl
je 0x40283f
mov bl, byte [eax + 1]
cmp bl, byte [edx + 1]
jne 0x402843
add eax, 2
add edx, 2
test bl, bl
jne 0x402823
xor eax, eax
jmp 0x402848
sbb eax, eax
or eax, 1
test eax, eax
je 0x402884
mov eax, str.HTTP_1.1
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x402871
test dl, dl
je 0x40286d
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x402871
add ecx, 2
add eax, 2
test dl, dl
jne 0x402851
xor eax, eax
jmp 0x402876
sbb eax, eax
or eax, 1
mov ebx, dword [ebp - 0x10024]
test eax, eax
jne 0x402750
lea eax, [ebp - 0x10028]
push eax
push 0x428a28
push 0
call fcn.0040e700
push eax
call fcn.0040e7eb
mov ebx, dword [ebp - 0x10024]
add esp, 0x10
mov dword [0x433f80], eax
cmp eax, 0xc8
jne 0x402750
mov byte [ebp - 0x1001d], 1
jmp 0x402750
mov al, byte [ebp - 0x1001d]
test al, al
jne 0x4028e6
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.0040cf20
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
pop edi
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.0040cf20
mov esp, ebp
pop ebp
ret
call fcn.0040e626
int3