Function at 0x408a20
Capabilities:
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x104c
call fcn.005c1bc0
mov eax, dword [0x698b9c]
xor eax, esp
mov dword [esp + 0x1048], eax
mov ecx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov edx, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x1c]
push edi
mov dword [esp + 0x14], ecx
mov ecx, 0x1f
mov esi, str.CONNECT__s:_d_HTTP_1.0_r_nuser_agent:_MTTP2.0_r_nhost:__s_r_ncontent_length:_0_r_nproxy_connection:_Keep_Alive_r_npragma:_no_cache_r_n_r_n
lea edi, [esp + 0x128]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x10]
mov ecx, 0x27
mov esi, str.CONNECT__s:_d_HTTP_1.0_r_nuser_agent:_MTTP2.0_r_nProxy_Authorization:_Basic__s_r_nhost:__s_r_ncontent_length:_0_r_nproxy_connection:_Keep_Alive_r_npragma:_no_cache_r_n_r_n
lea edi, [esp + 0x1a8]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 8]
push eax
push ecx
mov ecx, dword [ebp + 0x24]
xor esi, esi
mov dword [esp + 0x18], esi
call fcn.00408750
add esp, 8
test eax, eax
je 0x408e67
mov eax, dword [esp + 0xc]
cmp eax, esi
je 0x408b3b
cmp byte [eax], 0
je 0x408b3b
mov edx, dword [esp + 0x14]
push edx
push eax
lea eax, [esp + 0xa58]
push str._s:_s
push eax
mov dword [esp + 0x1c], 0x400
call fcn.005c1f0c
lea eax, [esp + 0xa60]
add esp, 0x10
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408ae0
sub eax, edx
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0xc54]
push edx
push eax
lea edi, [esp + 0xa5c]
call fcn.004015b0
movzx edx, word [ebp + 0x20]
mov eax, dword [esp + 0x18]
add esp, 0xc
push ebx
lea ecx, [esp + 0xc54]
push ecx
push edx
mov byte [esp + eax + 0xc5c], 0
push ebx
lea eax, [esp + 0x1b8]
push eax
lea ecx, [esp + 0x25c]
push ecx
call fcn.005c1f0c
add esp, 0x18
jmp 0x408b5a
movzx edx, word [ebp + 0x20]
push ebx
push edx
push ebx
lea eax, [esp + 0x134]
push eax
lea ecx, [esp + 0x258]
push ecx
call fcn.005c1f0c
add esp, 0x14
cmp dword [0x69aaa4], 1
mov edi, eax
jg 0x408b81
lea edx, [esp + 0x248]
push edx
push 0xbd
push str....._base_srcwin32TSocket.c
push 1
call fcn.00401310
add esp, 0x10
test edi, edi
jle 0x408be7
mov ebx, dword [ebp + 8]
push 0
mov eax, edi
sub eax, esi
push eax
lea ecx, [esp + esi + 0x250]
push ecx
push ebx
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
je 0x408baa
add esi, eax
cmp esi, edi
jl 0x408b85
jmp 0x408bea
cmp dword [0x69aaa4], 3
jg 0x408e67
push str.Fail_to_send_header.
push 0xc4
push str....._base_srcwin32TSocket.c
push 3
call fcn.00401310
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1048]
xor ecx, esp
call fcn.005bfcb8
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 8]
mov ecx, dword [ebp + 0x24]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], 1
cmp ecx, 0xffffffff
je 0x408c24
mov eax, 0x10624dd3
mul ecx
shr edx, 6
mov dword [esp + 0x18], edx
imul edx, edx, 0x3e8
sub ecx, edx
imul ecx, ecx, 0x3e8
lea edi, [esp + 0x18]
mov dword [esp + 0x1c], ecx
jmp 0x408c28
mov edi, dword [esp + 0x10]
push 0x804
lea edx, [esp + 0x24c]
push 0
push edx
call fcn.005bfd50
add esp, 0xc
xor esi, esi
push edi
push 0
push 0
lea eax, [esp + 0x2c]
push eax
push 1
call sub.WS2_32.dll_select
cmp eax, 0xffffffff
je 0x408e3f
test eax, eax
je 0x408e3f
push 0
mov ecx, 0x800
sub ecx, esi
push ecx
lea edx, [esp + esi + 0x250]
push edx
push ebx
call sub.WS2_32.dll_recv
cmp eax, 0xffffffff
je 0x408e24
test eax, eax
je 0x408e24
add esi, eax
cmp esi, 4
jl 0x408cdc
cmp byte [esp + esi + 0x247], 0xa
jne 0x408cbf
mov al, byte [esp + esi + 0x246]
cmp al, 0xa
je 0x408cff
cmp al, 0xd
jne 0x408cbf
cmp byte [esp + esi + 0x245], 0xa
jne 0x408cbf
cmp byte [esp + esi + 0x244], al
je 0x408cff
lea eax, [esp + 0x248]
push str._r_n_r_n
push eax
call fcn.005c5a00
add esp, 8
test eax, eax
jne 0x408de8
cmp esi, 0x800
jl 0x408c41
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1048]
xor ecx, esp
call fcn.005bfcb8
mov esp, ebp
pop ebp
ret
xor edx, edx
xor ecx, ecx
test esi, esi
jle 0x408da8
jmp 0x408d10
mov al, byte [esp + ecx + 0x248]
cmp al, 0x20
jne 0x408d30
mov byte [esp + ecx + 0x248], 0
test edx, edx
jne 0x408d38
lea edx, [esp + ecx + 0x249]
jmp 0x408d38
cmp al, 0xd
je 0x408d3f
cmp al, 0xa
je 0x408d3f
inc ecx
cmp ecx, esi
jl 0x408d10
jmp 0x408d47
mov byte [esp + ecx + 0x248], 0
test edx, edx
je 0x408da8
push edx
call fcn.005c6819
mov ecx, eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
add esp, 4
cmp ecx, 2
jne 0x408da8
cmp dword [0x69aaa4], 1
jg 0x408d8e
push str.HTTP_Proxy_connected.
push 0x10f
push str....._base_srcwin32TSocket.c
push 1
call fcn.00401310
add esp, 0x10
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1048]
xor ecx, esp
call fcn.005bfcb8
mov esp, ebp
pop ebp
ret
cmp dword [0x69aaa4], 1
jg 0x408e67
lea edx, [esp + 0x248]
push edx
push 0x10b
push str....._base_srcwin32TSocket.c
push 1
call fcn.00401310
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1048]
xor ecx, esp
call fcn.005bfcb8
mov esp, ebp
pop ebp
ret
cmp dword [0x69aaa4], 1
jg 0x408e67
lea eax, [esp + 0x248]
push eax
push 0x114
push str....._base_srcwin32TSocket.c
push 1
call fcn.00401310
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1048]
xor ecx, esp
call fcn.005bfcb8
mov esp, ebp
pop ebp
ret
cmp dword [0x69aaa4], 3
jg 0x408e67
call sub.WS2_32.dll_WSAGetLastError
push eax
push str.recv_error__u
push 0xe9
jmp 0x408e58
cmp dword [0x69aaa4], 3
jg 0x408e67
call sub.WS2_32.dll_WSAGetLastError
push eax
push str.socket_error__u
push 0xe1
push str....._base_srcwin32TSocket.c
push 3
call fcn.00401310
add esp, 0x14
mov ecx, dword [esp + 0x1054]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.005bfcb8
mov esp, ebp
pop ebp
ret