Function at 0x4fc7d6
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [ebp + 0xc]
and dword [ebp - 0x20], 0
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov ebx, dword [esi + 0xc]
push ebx
mov eax, dword [ebx + eax*4 + 0x158]
mov edi, dword [ebx + 0x4d8]
mov dword [ebp - 0x1c], eax
call fcn.004fd05f
pop ecx
test al, al
jne 0x4fcfa2
mov byte [ebx + 0x254], al
cmp dword [edi + 0x20], 0
jne 0x4fc9c0
push dword [ebp + 0x14]
and dword [ebp - 0xc], 0
push dword [ebp + 0x10]
and dword [ebp - 8], 0
push str.Establish_HTTP_proxy_tunnel_to__s:_d_n
push esi
call fcn.004f572f
push dword [esi + 0x130]
call dword [0x62ff1c]
and dword [esi + 0x130], 0
lea eax, [ebp - 0x38]
push 0x20000
push eax
call fcn.004f1911
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push ebx
push esi
call fcn.004fcfbf
add esp, 0x34
test eax, eax
jne 0x4fcfa4
push 1
push dword [ebp - 0xc]
push eax
push str.CONNECT
push ebx
push esi
call fcn.004f9cd6
add esp, 0x18
mov dword [ebp - 4], eax
test eax, eax
jne 0x4fc990
cmp dword [ebx + 0xc0], 1
mov ecx, 0x5f72a0
push str.Proxy_Connection
mov eax, 0x5f72a4
mov dword [ebp - 4], 0x5976a8
cmovne eax, ecx
push ebx
push esi
mov dword [ebp - 0x18], eax
call fcn.004f8a7b
test eax, eax
mov ecx, str.Proxy_Connection:_Keep_Alive_r_n
push str.User_Agent
mov eax, 0x5976a8
cmovne ecx, eax
push ebx
push esi
mov dword [ebp - 0x14], ecx
call fcn.004f8a7b
add esp, 0x18
test eax, eax
jne 0x4fc8f5
cmp dword [esi + 0x5b0], eax
je 0x4fc8f5
mov eax, dword [esi + 0xc90]
mov dword [ebp - 4], eax
push dword [ebp - 0x14]
mov eax, dword [esi + 0xc8c]
mov edx, 0x5976a8
push dword [ebp - 4]
test eax, eax
mov ecx, edx
cmovne ecx, eax
cmp dword [ebp - 8], 0
push ecx
mov eax, edx
cmovne eax, dword [ebp - 8]
push eax
push dword [ebp - 0x18]
lea eax, [ebp - 0x38]
push dword [ebp - 0xc]
push str.CONNECT__s_HTTP__s_r_n_s_s_s_s
push eax
call fcn.004f18d4
add esp, 0x20
mov dword [ebp - 4], eax
test eax, eax
jne 0x4fc983
lea eax, [ebp - 0x38]
push eax
push 1
push esi
call fcn.004f8494
add esp, 0xc
mov dword [ebp - 4], eax
test eax, eax
jne 0x4fc983
lea eax, [ebp - 0x38]
push 0x59b980
push eax
call fcn.004f18b1
mov dword [ebp - 4], eax
pop ecx
pop ecx
test eax, eax
jne 0x4fc983
push dword [ebp + 0xc]
push eax
lea eax, [esi + 0xce8]
push eax
lea eax, [ebp - 0x38]
push esi
push eax
call fcn.004f8874
add esp, 0x14
mov dword [ebp - 4], eax
test eax, eax
je 0x4fc990
push str.Failed_sending_CONNECT_to_proxy
push esi
call fcn.004f5683
pop ecx
pop ecx
push dword [ebp - 8]
call dword [0x62ff1c]
push dword [ebp - 0xc]
call dword [0x62ff1c]
lea eax, [ebp - 0x38]
push eax
call fcn.004f18f4
mov eax, dword [ebp - 4]
add esp, 0xc
test eax, eax
jne 0x4fcfa4
mov dword [edi + 0x20], 1
push 1
push 0
push esi
call fcn.004f5ee1
add esp, 0xc
test edx, edx
jl 0x4fcfad
jg 0x4fc9df
test eax, eax
je 0x4fcfad
push dword [ebp + 0xc]
push ebx
call fcn.004f5e46
pop ecx
pop ecx
test al, al
je 0x4fcfa2
and dword [ebp - 8], 0
jmp 0x4fcdb5
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp + 0xb]
push eax
push dword [ebp - 0x1c]
push esi
call fcn.004f57e2
add esp, 0x14
mov dword [ebp - 0x18], eax
cmp eax, 0x51
je 0x4fcfa2
push esi
call fcn.004fb581
pop ecx
test eax, eax
jne 0x4fcfa9
cmp dword [ebp - 0x18], eax
jne 0x4fcdfb
cmp dword [ebp - 0x10], eax
jle 0x4fcdc1
cmp dword [edi + 0x10], 2
jne 0x4fcab2
mov ecx, dword [edi + 0x18]
mov eax, ecx
mov edx, dword [edi + 0x1c]
or eax, edx
je 0x4fca78
sub ecx, 1
mov dword [edi + 0x18], ecx
sbb edx, 0
mov dword [edi + 0x1c], edx
js 0x4fca6c
jg 0x4fcdb5
test ecx, ecx
jne 0x4fcdb5
mov dword [edi + 0x20], 2
jmp 0x4fcdfb
and dword [ebp - 0x18], 0
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x18]
push eax
push 1
lea eax, [ebp + 0xb]
push eax
push esi
call fcn.00508348
add esp, 0x14
cmp eax, 0xffffffff
jne 0x4fcdb5
push str.chunk_reading_DONE_n
push esi
call fcn.004f572f
and dword [edi + 0x10], 0
pop ecx
pop ecx
jmp 0x4fcdae
push 1
lea eax, [ebp + 0xb]
push eax
push edi
call fcn.004f18eb
add esp, 0xc
test eax, eax
jne 0x4fce7e
cmp byte [ebp + 0xb], 0xa
jne 0x4fcdb5
push edi
call fcn.00450f01
push edi
mov dword [ebp - 4], eax
call fcn.00459df1
push eax
push dword [ebp - 4]
mov dword [ebp - 0xc], eax
push 1
push esi
call fcn.004f55ff
add esp, 0x18
cmp byte [esi + 0x705], 0
jne 0x4fcb23
push dword [ebp - 0xc]
xor eax, eax
cmp byte [esi + 0x6ec], al
push dword [ebp - 4]
setne al
add eax, 2
push eax
push esi
call fcn.004f55d2
add esp, 0x10
test eax, eax
jne 0x4fcfa4
mov eax, dword [ebp - 0xc]
cdq
add dword [esi + 0xce0], eax
mov eax, dword [ebp - 4]
adc dword [esi + 0xce4], edx
mov cl, byte [eax]
cmp cl, 0xd
je 0x4fcd06
cmp cl, 0xa
je 0x4fcd06
push 0x11
push eax
push str.WWW_Authenticate:
call fcn.004f67ad
add esp, 0xc
test eax, eax
je 0x4fcb6e
mov eax, dword [esi + 0xf8]
mov dword [ebp - 0xc], eax
cmp eax, 0x191
je 0x4fcb94
push 0x13
push dword [ebp - 4]
push str.Proxy_authenticate:
call fcn.004f67ad
add esp, 0xc
test eax, eax
je 0x4fcbdc
mov eax, dword [esi + 0xf8]
mov dword [ebp - 0xc], eax
cmp eax, 0x197
jne 0x4fcbdc
push dword [ebp - 4]
call fcn.004f8b87
mov dword [ebp - 0x18], eax
pop ecx
test eax, eax
je 0x4fce77
cmp dword [ebp - 0xc], 0x197
push eax
sete cl
movzx ecx, cl
push ecx
push esi
call fcn.004f9a15
push dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
call dword [0x62ff1c]
mov eax, dword [ebp - 0x14]
add esp, 0x10
test eax, eax
jne 0x4fcfa4
jmp 0x4fccfa
push 0xf
push dword [ebp - 4]
push str.Content_Length:
call fcn.004f67ad
add esp, 0xc
test eax, eax
je 0x4fcc30
mov ecx, dword [esi + 0xf8]
lea eax, [ecx - 0xc8]
cmp eax, 0x64
jae 0x4fcc14
push ecx
push str.Ignoring_Content_Length_in_CONNECT__03d_response_n
push esi
call fcn.004f572f
jmp 0x4fccaa
lea eax, [edi + 0x18]
push eax
mov eax, dword [ebp - 4]
push 0xa
add eax, 0xf
push 0
push eax
call fcn.004fe816
add esp, 0x10
jmp 0x4fccfa
push str.close
push str.Connection:
push dword [ebp - 4]
call fcn.004f8ae5
add esp, 0xc
test al, al
jne 0x4fccf6
push 0x12
push dword [ebp - 4]
push str.Transfer_Encoding:
call fcn.004f67ad
add esp, 0xc
test eax, eax
je 0x4fccaf
mov ecx, dword [esi + 0xf8]
lea eax, [ecx - 0xc8]
cmp eax, 0x64
jae 0x4fcc7c
push ecx
push str.Ignoring_Transfer_Encoding_in_CONNECT__03d_response_n
jmp 0x4fcc09
push str.chunked
push str.Transfer_Encoding:
push dword [ebp - 4]
call fcn.004f8ae5
add esp, 0xc
test al, al
je 0x4fccfa
push str.CONNECT_responded_chunked_n
push esi
call fcn.004f572f
push esi
mov byte [edi + 0x24], 1
call fcn.00508323
add esp, 0xc
jmp 0x4fccfa
push str.close
push str.Proxy_Connection:
push dword [ebp - 4]
call fcn.004f8ae5
add esp, 0xc
test al, al
jne 0x4fccf6
lea eax, [esi + 0xf8]
push eax
lea eax, [ebp - 0x20]
push eax
push str.HTTP_1._d__d
push dword [ebp - 4]
call fcn.0046c260
add esp, 0x10
cmp eax, 2
jne 0x4fccfa
mov eax, dword [esi + 0xf8]
mov dword [esi + 0xccc], eax
jmp 0x4fccfa
mov byte [edi + 0x25], 1
push edi
call fcn.004f1929
pop ecx
jmp 0x4fcdb5
cmp dword [esi + 0xf8], 0x197
jne 0x4fcd98
cmp byte [esi + 0xcb9], 0
jne 0x4fcd98
mov eax, dword [edi + 0x18]
or eax, dword [edi + 0x1c]
mov dword [edi + 0x10], 2
je 0x4fcd44
push dword [edi + 0x1c]
push dword [edi + 0x18]
push str.Ignore__I64d_bytes_of_response_body_n
push esi
call fcn.004f572f
add esp, 0x10
jmp 0x4fcd9c
cmp byte [edi + 0x24], 0
je 0x4fcd98
push str.Ignore_chunked_response_body_n
push esi
call fcn.004f572f
mov ecx, dword [ebp - 4]
mov byte [esi + 0x147], 1
lea eax, [ecx + 1]
cmp byte [eax], 0xa
cmove ecx, eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ecx + 1]
push eax
push esi
call fcn.00508348
add esp, 0x1c
cmp eax, 0xffffffff
jne 0x4fcd9c
push str.chunk_reading_DONE_n
push esi
call fcn.004f572f
pop ecx
pop ecx
mov dword [edi + 0x20], 2
and dword [edi + 0x10], 0
cmp dword [edi + 0x10], 0
jne 0x4fc9fb
mov eax, dword [edi + 0x18]
or eax, dword [edi + 0x1c]
jne 0x4fcdb5
mov dword [edi + 0x20], 2
cmp dword [edi + 0x10], 0
jne 0x4fc9fb
jmp 0x4fcdff
cmp dword [esi + 0x178], 0
je 0x4fcde7
cmp dword [esi + 0x990], 0
je 0x4fcde7
push str.Proxy_CONNECT_connection_closed_n
push esi
mov byte [ebx + 0x254], 1
call fcn.004f572f
jmp 0x4fcdf9
push str.Proxy_CONNECT_aborted
push esi
mov dword [ebp - 8], 1
call fcn.004f5683
pop ecx
pop ecx
and dword [edi + 0x10], 0
push esi
call fcn.004fb581
pop ecx
test eax, eax
jne 0x4fcfa9
cmp dword [ebp - 8], eax
jne 0x4fce8b
mov eax, dword [esi + 0xccc]
sub eax, 0xc8
cmp eax, 0x64
jb 0x4fce3e
push esi
call fcn.004f8c39
pop ecx
test eax, eax
jne 0x4fcfa4
cmp byte [ebx + 0x255], al
je 0x4fce3e
mov byte [edi + 0x25], 1
cmp byte [edi + 0x25], 0
je 0x4fce4d
cmp dword [esi + 0x130], 0
jne 0x4fce92
mov eax, dword [esi + 0x130]
test eax, eax
je 0x4fceb1
cmp dword [edi + 0x20], 2
jne 0x4fce6d
push 1
push esi
call fcn.004fd286
mov eax, dword [esi + 0x130]
pop ecx
pop ecx
test eax, eax
jne 0x4fc811
jmp 0x4fceb1
push 0x1b
jmp 0x4fcfbc
push str.CONNECT_response_too_large_
push esi
call fcn.004f5683
pop ecx
pop ecx
push 0x38
jmp 0x4fcfbc
mov eax, dword [ebp + 0xc]
push dword [ebx + eax*4 + 0x158]
push ebx
push esi
call fcn.004f5dd4
mov eax, dword [ebp + 0xc]
add esp, 0xc
or dword [ebx + eax*4 + 0x158], 0xffffffff
mov eax, dword [esi + 0xccc]
sub eax, 0xc8
cmp eax, 0x64
jb 0x4fcf57
cmp byte [edi + 0x25], 0
je 0x4fcef1
cmp dword [esi + 0x130], 0
je 0x4fcef1
push str.Connect_me_again_please_n
push esi
mov byte [ebx + 0x254], 1
call fcn.004f572f
push esi
call fcn.004fd257
add esp, 0xc
jmp 0x4fcf2b
push dword [esi + 0x130]
call dword [0x62ff1c]
and dword [esi + 0x130], 0
push 2
push ebx
call fcn.004f5e98
mov eax, dword [ebp + 0xc]
push dword [ebx + eax*4 + 0x158]
push ebx
push esi
call fcn.004f5dd4
mov eax, dword [ebp + 0xc]
add esp, 0x18
or dword [ebx + eax*4 + 0x158], 0xffffffff
and dword [edi + 0x20], 0
cmp byte [ebx + 0x254], 0
jne 0x4fcfa2
push edi
call fcn.004f18f4
push dword [esi + 0xf8]
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push esi
call fcn.004f5683
add esp, 0x10
jmp 0x4fce8b
mov dword [edi + 0x20], 2
push dword [esi + 0xc8c]
call dword [0x62ff1c]
push dword [esi + 0xccc]
and dword [esi + 0xc8c], 0
push str.Proxy_replied__d_to_CONNECT_request_n
push esi
mov word [esi + 0x994], 1
call fcn.004f572f
mov byte [esi + 0x147], 0
push edi
mov byte [ebx + 0x262], 0
call fcn.004f18f4
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
push 0x2a
jmp 0x4fcfbc
push str.Proxy_CONNECT_aborted_due_to_timeout
push esi
call fcn.004f5683
pop ecx
pop ecx
push 0x1c
pop eax
jmp 0x4fcfa4