Function at 0x40f690
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Send http request with host header
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2194
call fcn.00487b00
mov eax, dword [0x4a4014]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
movzx esi, word [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
push esi
mov dword [ebp - 0x218c], eax
mov eax, dword [ebp + 0x14]
push edi
mov dword [ebp - 0x2190], eax
lea eax, [ebp - 0x2184]
push str.CONNECT__s:_d_HTTP_1.1_r_n
push eax
mov dword [ebp - 0x2194], ecx
call dword [sym.imp.USER32.dll_wsprintfA]
push esi
push edi
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [ebp - 0x2184]
mov ebx, eax
add ecx, ebx
push str.Host:__s:_d__r_n
push ecx
call edi
add ebx, eax
lea eax, [ebp - 0x2184]
add eax, ebx
push str.Proxy_Connection:_Keep_Alive_r_n
push eax
call edi
add ebx, eax
add esp, 0x28
mov eax, dword [ebp - 0x218c]
test eax, eax
je 0x40f793
cmp byte [eax], 0
je 0x40f793
push eax
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x84]
push 0x49b2ac
push eax
call esi
push dword [ebp - 0x2190]
lea eax, [ebp - 0x84]
push eax
call esi
push ecx
lea eax, [ebp - 0x184]
push eax
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, eax
lea ecx, [ebp - 0x84]
call fcn.0040e040
add esp, 8
test eax, eax
je 0x40f7a8
lea eax, [ebp - 0x184]
push eax
lea eax, [ebp - 0x2184]
add eax, ebx
push str.Proxy_Authorization:_Basic__s_r_n
push eax
call edi
add esp, 0xc
jmp 0x40f7a6
lea eax, [ebp - 0x2184]
add eax, ebx
push str.Proxy_Authorization:_Basic__r_n
push eax
call edi
add esp, 8
add ebx, eax
lea eax, [ebp - 0x2184]
add eax, ebx
push str.Content_length:_0_r_n_r_n
push eax
call edi
mov edi, dword [ebp - 0x2194]
add esp, 8
add ebx, eax
mov dword [ebp - 0x2188], 0
lea eax, [ebp - 0x2188]
push eax
push 0x8004667e
push dword [edi]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push 0
push ebx
lea eax, [ebp - 0x2184]
push eax
push dword [edi]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jle 0x40f87a
push 0x50
xor esi, esi
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ebx, dword [sym.imp.WS2_32.dll_recv]
lea eax, [ebp - 0x2184]
push esi
push 0x2000
push eax
push dword [edi]
call ebx
test eax, eax
jle 0x40f87a
add esi, eax
mov eax, 4
cmp esi, eax
jl 0x40f861
lea ecx, [ebp - 0x2184]
cmp byte [ecx + eax - 4], 0xd
jne 0x40f856
cmp byte [ebp + eax - 0x2187], 0xa
jne 0x40f856
cmp byte [ebp + eax - 0x2186], 0xd
jne 0x40f856
cmp byte [ebp + eax - 0x2185], 0xa
je 0x40f85d
inc eax
cmp eax, esi
jle 0x40f831
jmp 0x40f861
cmp eax, esi
jle 0x40f890
push 0
mov eax, 0x2000
sub eax, esi
push eax
lea eax, [ebp - 0x2184]
push eax
push dword [edi]
call ebx
test eax, eax
jg 0x40f820
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042c14d
mov esp, ebp
pop ebp
ret 0x10
lea ecx, [ebp - 0x2184]
mov edx, str.HTTP_1.0_200
mov esi, 9
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x40f8b7
add ecx, 4
add edx, 4
sub esi, 4
jae 0x40f8a0
mov al, byte [ecx]
cmp al, byte [edx]
je 0x40f8de
lea ecx, [ebp - 0x2184]
mov edx, str.HTTP_1.1_200
mov esi, 9
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x40f87a
add ecx, 4
add edx, 4
sub esi, 4
jae 0x40f8c7
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x40f87a
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042c14d
mov esp, ebp
pop ebp
ret 0x10