Function at 0x1011850a
Capabilities:
Check http status code
Get socket status

Disassembly:
push ebp
sub esp, 0x400
lea ebp, [esp - 4]
mov eax, dword [0x101cd7b4]
xor eax, ebp
mov dword [ebp + 0x400], eax
push 0x620
mov eax, 0x10191d76
call fcn.1015e3fe
push dword [ebp + 0x418]
mov eax, dword [ebp + 0x414]
and dword [ebp - 0x3c], 0
mov edi, dword [ebp + 0x40c]
mov ebx, dword [ebp + 0x410]
mov esi, ecx
mov dword [ebp - 0x2c], eax
push dword [ebp - 0x2c]
lea edx, [esi + 4]
push edx
lea ecx, [esi + 0xa0]
mov eax, dword [ecx]
lea edx, [ebp - 0x40]
push edx
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x30], edi
mov dword [ebp - 4], 1
call dword [eax + 4]
mov ecx, dword [eax]
and dword [eax], 0
mov dword [edi], ecx
mov eax, dword [ebp - 0x40]
test eax, eax
mov dword [ebp - 0x3c], 1
je 0x10118593
lea ecx, [eax + 4]
mov eax, dword [ecx]
push 1
call dword [eax]
push 1
push 2
lea ecx, [ebp - 0x3a4]
call fcn.100112f0
movzx eax, word [ebx + 0x3a]
push eax
mov byte [ebp - 4], 2
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x3a4]
push str.CONNECT
push eax
call fcn.10010130
pop ecx
pop ecx
add ebx, 0x48
push ebx
push eax
call fcn.100258f0
pop ecx
pop ecx
mov ebx, 0x10199d90
push ebx
push eax
call fcn.10010130
pop ecx
pop ecx
push dword [ebp - 0x18]
mov ecx, eax
call fcn.10025790
push str._HTTP_1.1_r_n
push eax
call fcn.10010130
cmp dword [esi + 0x7c], 0
pop ecx
pop ecx
je 0x10118704
push 0x3ff
lea eax, [ebp + 1]
push 0
push eax
mov byte [ebp], 0
call fcn.101596b0
add esp, 0xc
push 1
push 2
lea ecx, [ebp - 0x424]
call fcn.100112f0
lea eax, [esi + 0x68]
push eax
lea eax, [ebp - 0x424]
push eax
mov byte [ebp - 4], 3
call fcn.100258f0
pop ecx
pop ecx
push ebx
push eax
call fcn.10010130
pop ecx
pop ecx
lea ecx, [esi + 0x84]
push ecx
push eax
call fcn.100258f0
pop ecx
pop ecx
lea eax, [ebp - 0x1b8]
push eax
lea ecx, [ebp - 0x424]
call fcn.10008a20
mov ebx, eax
lea eax, [ebp - 0x244]
push eax
lea ecx, [ebp - 0x424]
mov byte [ebp - 4], 4
call fcn.10008a20
cmp dword [eax + 0x18], 0x10
mov ecx, dword [ebx + 0x14]
jb 0x10118691
mov eax, dword [eax + 4]
jmp 0x10118694
add eax, 4
push 2
lea edx, [ebp - 0x54]
push edx
lea edx, [ebp]
push edx
push ecx
push eax
mov ecx, esi
call fcn.101181e3
push 0
push 1
lea ecx, [ebp - 0x244]
call fcn.10003eb0
push 0
push 1
lea ecx, [ebp - 0x1b8]
mov byte [ebp - 4], 3
call fcn.10003eb0
lea eax, [ebp - 0x3a4]
push str.Proxy_Authorization:_Basic
push eax
call fcn.10010130
pop ecx
pop ecx
lea ecx, [ebp]
push ecx
push eax
call fcn.10010130
pop ecx
pop ecx
push 0x10199d80
push eax
call fcn.10010130
pop ecx
pop ecx
lea ecx, [ebp - 0x424]
mov byte [ebp - 4], 2
call fcn.10004820
lea eax, [ebp - 0x3a4]
push str.Accept:___r_n
push eax
call fcn.10010130
pop ecx
pop ecx
push str.Content_Type:_text_html_r_n
push eax
call fcn.10010130
pop ecx
pop ecx
push str.Proxy_Connection:_Keep_Alive_r_n
push eax
call fcn.10010130
pop ecx
pop ecx
push str.Content_length:_0_r_n_r_n
push eax
call fcn.10010130
mov ebx, dword [edi]
pop ecx
pop ecx
lea eax, [ebp - 0x1d4]
push eax
lea ecx, [ebp - 0x3a4]
call fcn.10008a20
mov esi, eax
lea eax, [ebp - 0xbc]
push eax
lea ecx, [ebp - 0x3a4]
mov byte [ebp - 4], 5
call fcn.10008a20
cmp dword [eax + 0x18], 0x10
mov esi, dword [esi + 0x14]
mov byte [ebp - 4], 6
jb 0x1011877c
mov eax, dword [eax + 4]
jmp 0x1011877f
add eax, 4
mov edx, dword [ebx]
push esi
push eax
mov ecx, ebx
call dword [edx + 8]
xor esi, esi
push esi
push 1
lea ecx, [ebp - 0xbc]
call fcn.10003eb0
push esi
push 1
lea ecx, [ebp - 0x1d4]
call fcn.10003eb0
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], esi
mov eax, dword [ebp + 0x418]
push 0x32
xor edx, edx
pop ecx
div ecx
mov byte [ebp - 4], 7
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
cmp dword [ebp - 0x18], eax
jge 0x10118b72
mov eax, dword [ebp - 0x2c]
mov al, byte [eax]
test al, al
jne 0x1011882d
push str.terminate
lea ecx, [ebp - 0xf4]
call fcn.10006620
push str.http_connect_fail
lea ecx, [ebp - 0x20c]
mov byte [ebp - 4], 8
call fcn.10006620
lea eax, [ebp - 0xf4]
push eax
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x264]
mov byte [ebp - 4], 9
call fcn.1010d42d
push 0x101bfcf8
lea eax, [ebp - 0x264]
push eax
call fcn.10159cdd
xor edx, edx
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x44], 0xc350
mov dword [ebp - 0x62c], edx
xor eax, eax
cmp eax, edx
jae 0x10118858
mov ecx, dword [edi]
mov ecx, dword [ecx + 8]
cmp dword [ebp + eax*4 - 0x628], ecx
je 0x10118856
inc eax
jmp 0x10118841
cmp eax, edx
jne 0x10118871
cmp edx, 0x40
jae 0x10118871
mov ecx, dword [edi]
mov ecx, dword [ecx + 8]
mov dword [ebp + eax*4 - 0x628], ecx
inc dword [ebp - 0x62c]
xor edx, edx
mov dword [ebp - 0x528], edx
xor eax, eax
cmp eax, edx
jae 0x10118892
mov ecx, dword [edi]
mov ecx, dword [ecx + 8]
cmp dword [ebp + eax*4 - 0x524], ecx
je 0x10118890
inc eax
jmp 0x1011887b
cmp eax, edx
jne 0x101188ab
cmp edx, 0x40
jae 0x101188ab
mov ecx, dword [edi]
mov ecx, dword [ecx + 8]
mov dword [ebp + eax*4 - 0x524], ecx
inc dword [ebp - 0x528]
mov eax, dword [edi]
mov eax, dword [eax + 8]
lea ecx, [ebp - 0x48]
push ecx
lea ecx, [ebp - 0x528]
push ecx
push esi
lea ecx, [ebp - 0x62c]
push ecx
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x10118921
push str.select_error
lea ecx, [ebp - 0x84]
call fcn.10006620
push str.http_connect_fail
lea ecx, [ebp - 0x148]
mov byte [ebp - 4], 0xa
call fcn.10006620
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x148]
push eax
lea ecx, [ebp - 0x2c4]
mov byte [ebp - 4], 0xb
call fcn.1010d42d
push 0x101bfcf8
lea eax, [ebp - 0x2c4]
jmp 0x10118827
cmp eax, esi
jle 0x10118b03
mov eax, dword [edi]
mov eax, dword [eax + 8]
lea ecx, [ebp - 0x62c]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x10118b0b
cmp dword [ebp - 0x24], esi
jne 0x1011894c
xor ebx, ebx
jmp 0x10118952
mov ebx, dword [ebp - 0x20]
sub ebx, dword [ebp - 0x24]
push 0
lea eax, [ebx + 0x400]
push eax
lea ecx, [ebp - 0x28]
call fcn.101131a5
push dword [ebp - 0x2c]
mov eax, dword [ebp - 0x30]
mov edi, dword [eax]
mov esi, dword [edi]
push 0x400
push ebx
lea ecx, [ebp - 0x28]
add esi, 4
call fcn.10111faa
push eax
mov ecx, edi
call dword [esi]
xor esi, esi
cmp eax, esi
jne 0x101189da
push str.closed
lea ecx, [ebp - 0x228]
call fcn.10006620
push str.http_connect_fail
lea ecx, [ebp - 0x180]
mov byte [ebp - 4], 0xc
call fcn.10006620
lea eax, [ebp - 0x228]
push eax
lea eax, [ebp - 0x180]
push eax
lea ecx, [ebp - 0x2e4]
mov byte [ebp - 4], 0xd
call fcn.1010d42d
push 0x101bfcf8
lea eax, [ebp - 0x2e4]
jmp 0x10118827
cmp eax, 0x400
lea ecx, [ebp - 0x28]
jae 0x101189fc
add ebx, eax
push ebx
call fcn.10111faa
push esi
inc ebx
push ebx
lea ecx, [ebp - 0x28]
mov byte [eax], 0
call fcn.101131a5
jmp 0x10118a09
lea eax, [ebp - 0x11]
push eax
mov byte [ebp - 0x11], 0
call fcn.101184ac
push esi
lea ecx, [ebp - 0x28]
call fcn.10111faa
push str._r_n_r_n
push eax
call fcn.1015a5c0
cmp eax, esi
pop ecx
pop ecx
je 0x10118ad0
push esi
lea ecx, [ebp - 0x28]
call fcn.10111faa
mov ecx, dword [ebp - 0x38]
push eax
call fcn.1011833b
cmp eax, 0xc8
jne 0x10118a7f
lea ecx, [ebp - 0x28]
call fcn.10004a10
lea ecx, [ebp - 0x3a4]
mov byte [ebp - 4], 1
call fcn.10004820
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x400]
xor ecx, ebp
call fcn.10159cce
add ebp, 0x404
leave
ret 0x10
push str.server_refuse
lea ecx, [ebp - 0x1f0]
call fcn.10006620
push str.http_connect_fail
lea ecx, [ebp - 0x110]
mov byte [ebp - 4], 0xe
call fcn.10006620
lea eax, [ebp - 0x1f0]
push eax
lea eax, [ebp - 0x110]
push eax
lea ecx, [ebp - 0x324]
mov byte [ebp - 4], 0xf
call fcn.1010d42d
push 0x101bfcf8
lea eax, [ebp - 0x324]
jmp 0x10118827
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x20]
lea ecx, [ebp - 0x50]
call fcn.1014eda3
push 1
lea eax, [ebp - 0x68]
push eax
lea ecx, [ebp - 0x50]
call fcn.101183c9
push dword [eax + 4]
lea ecx, [ebp - 0x28]
push dword [eax]
lea eax, [ebp - 0x60]
push eax
call fcn.1011839c
mov edi, dword [ebp - 0x30]
xor esi, esi
inc dword [ebp - 0x18]
jmp 0x101187c6
mov eax, dword [edi]
mov eax, dword [eax + 8]
lea ecx, [ebp - 0x528]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x10118b03
push str.closed
lea ecx, [ebp - 0x12c]
call fcn.10006620
push str.http_connect_fail
lea ecx, [ebp - 0x164]
mov byte [ebp - 4], 0x10
call fcn.10006620
lea eax, [ebp - 0x12c]
push eax
lea eax, [ebp - 0x164]
push eax
lea ecx, [ebp - 0x304]
mov byte [ebp - 4], 0x11
call fcn.1010d42d
push 0x101bfcf8
lea eax, [ebp - 0x304]
jmp 0x10118827
push str.timeout
lea ecx, [ebp - 0x19c]
call fcn.10006620
push str.http_connect_fail
lea ecx, [ebp - 0xa0]
mov byte [ebp - 4], 0x12
call fcn.10006620
lea eax, [ebp - 0x19c]
push eax
lea eax, [ebp - 0xa0]
push eax
lea ecx, [ebp - 0x2a4]
mov byte [ebp - 4], 0x13
call fcn.1010d42d
push 0x101bfcf8
lea eax, [ebp - 0x2a4]
jmp 0x10118827