Function at 0x508e20
Capabilities:
Check http status code

Disassembly:
sub esp, 0x24
push ebx
mov ebx, dword [esp + 0x30]
push ebp
mov ebp, dword [esp + 0x30]
push esi
lea eax, [ebx*4 + 0x1a8]
mov dword [esp + 0x2c], 0
add eax, ebp
mov esi, dword [ebp + 0x5d0]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + ebx*4 + 0x1a8]
mov dword [esp + 0x28], eax
push edi
mov edi, dword [ebp]
test esi, esi
je 0x50986d
cmp dword [esi + 0x401c], 2
je 0x50986d
mov byte [ebp + 0x29a], 0
nop dword [eax]
nop dword [eax + eax]
cmp dword [esi + 0x401c], 0
jne 0x5090f6
push dword [esp + 0x44]
mov ebx, dword [esp + 0x44]
push ebx
push str.Establish_HTTP_proxy_tunnel_to__s:_d_n
push edi
call fcn.00504920
push dword [edi + 0x140]
call dword [0x600ab4]
add esp, 0x14
mov dword [edi + 0x140], 0
call fcn.0050e880
mov ebp, eax
test ebp, ebp
je 0x509724
push dword [esp + 0x44]
push ebx
push str._s:_d
call fcn.00507a50
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
je 0x50971b
push 1
push eax
push str.CONNECT
push dword [esp + 0x44]
call fcn.0050f5a0
push dword [esp + 0x28]
mov ebx, eax
call dword [0x600ab4]
add esp, 0x14
test ebx, ebx
jne 0x5090cd
mov edx, dword [esp + 0x38]
mov ecx, 0x5b19c0
mov eax, 0x5b19bc
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], 0x5c28cc
cmp dword [edx + 0xec], 1
cmovne eax, ecx
mov cl, byte [edx + 0x28a]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x40]
cmp eax, dword [edx + 0x9c]
je 0x508f59
push 0x3a
push eax
call fcn.004c3bc0
add esp, 8
test eax, eax
setne cl
push dword [esp + 0x44]
test cl, cl
mov edx, 0x5c28cc
mov eax, 0x5d7778
cmove eax, edx
push eax
push dword [esp + 0x48]
mov eax, 0x5b0fd0
cmove eax, edx
push eax
push str._s_s_s:_d
call fcn.00507a50
add esp, 0x14
mov dword [esp + 0x10], eax
test eax, eax
je 0x50971b
push str.Host
push dword [esp + 0x3c]
call fcn.0050ef20
add esp, 8
test eax, eax
jne 0x508fc7
push dword [esp + 0x10]
push str.Host:__s_r_n
call fcn.00507a50
mov ebx, eax
add esp, 8
mov dword [esp + 0x18], ebx
test ebx, ebx
je 0x5096f1
push str.Proxy_Connection
push dword [esp + 0x3c]
call fcn.0050ef20
test eax, eax
mov ecx, str.Proxy_Connection:_Keep_Alive_r_n
mov eax, 0x5c28cc
push str.User_Agent
push dword [esp + 0x44]
cmovne ecx, eax
mov dword [esp + 0x34], ecx
call fcn.0050ef20
add esp, 0x10
test eax, eax
jne 0x509013
cmp dword [edi + 0x5d8], eax
je 0x509013
mov eax, dword [esp + 0x38]
mov eax, dword [eax + 0x2e0]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x38]
mov edx, 0x5c28cc
push dword [esp + 0x24]
mov ecx, edx
push dword [esp + 0x18]
mov eax, dword [eax + 0x2dc]
test eax, eax
cmovne ecx, eax
mov eax, edx
push ecx
test ebx, ebx
cmovne eax, ebx
push eax
push dword [esp + 0x38]
push dword [esp + 0x24]
push str.CONNECT__s_HTTP__s_r_n_s_s_s_s
push ebp
call fcn.0050eab0
mov ebx, eax
add esp, 0x20
mov eax, dword [esp + 0x18]
test eax, eax
je 0x509064
push eax
call dword [0x600ab4]
add esp, 4
push dword [esp + 0x10]
call dword [0x600ab4]
add esp, 4
test ebx, ebx
jne 0x5090b9
push ebp
push 1
push dword [esp + 0x40]
call fcn.0050eb20
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x5090b9
push 0x5d0d38
push ebp
call fcn.0050eab0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x5090b9
push dword [esp + 0x3c]
push eax
lea eax, [edi + 0xc40]
push eax
push dword [esp + 0x44]
push ebp
call fcn.0050e890
add esp, 0x14
mov ebx, eax
xor ebp, ebp
test ebx, ebx
je 0x5090cd
push str.Failed_sending_CONNECT_to_proxy
push edi
call fcn.00504840
add esp, 8
push ebp
call fcn.0050e860
add esp, 4
test ebx, ebx
jne 0x509711
mov ebp, dword [esp + 0x38]
mov dword [esi + 0x4000], ebx
mov ebx, dword [esp + 0x3c]
mov dword [esi + 0x401c], 1
push 1
push 0
push edi
call fcn.00505e10
add esp, 0xc
test edx, edx
jl 0x509884
jg 0x509115
test eax, eax
je 0x509884
push ebx
push ebp
call fcn.00505340
add esp, 8
test al, al
je 0x50986d
xor ebx, ebx
mov dword [esp + 0x10], ebx
cmp dword [esi + 0x4004], ebx
je 0x5095c7
lea ebx, [esi + 0x4000]
nop
mov eax, dword [esi + 0x400c]
cmp eax, ebx
jae 0x509731
lea ecx, [esp + 0x1c]
push ecx
push 1
push eax
push dword [esp + 0x38]
push ebp
call fcn.005049b0
mov ebx, eax
add esp, 0x14
cmp ebx, 0x51
je 0x50986d
push ebp
call fcn.00512020
add esp, 4
test eax, eax
jne 0x509877
test ebx, ebx
jne 0x5095b9
cmp dword [esp + 0x1c], ebx
jle 0x509695
cmp dword [esi + 0x4004], 1
jle 0x509231
mov ecx, dword [esi + 0x4010]
mov eax, ecx
mov edx, dword [esi + 0x4014]
or eax, edx
mov dword [esi + 0x400c], esi
je 0x5091ef
sub ecx, 1
mov dword [esi + 0x4010], ecx
sbb edx, ebx
mov dword [esi + 0x4014], edx
js 0x5095af
jg 0x5091d7
test ecx, ecx
je 0x5095af
lea ebx, [esi + 0x4000]
cmp dword [esi + 0x4004], 0
jne 0x509140
jmp 0x5095c3
lea eax, [esp + 0x28]
mov dword [esp + 0x28], 0
push eax
push 1
push esi
push ebp
call fcn.0052a6d0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x5091d7
push str.chunk_reading_DONE_n
push edi
call fcn.00504920
add esp, 8
mov dword [esi + 0x4004], 0
mov dword [esi + 0x401c], 2
jmp 0x5091d7
mov ecx, dword [esi + 0x4000]
lea ebx, [esi + 0x4000]
mov eax, dword [esi + 0x400c]
inc ecx
mov dword [ebx], ecx
cmp byte [eax], 0xa
je 0x509254
inc eax
mov dword [esi + 0x400c], eax
jmp 0x5091dd
cmp byte [edi + 0x510], 0
je 0x50926f
push ecx
push dword [esi + 0x4008]
push 1
push edi
call fcn.005047b0
add esp, 0x10
cmp byte [edi + 0x688], 0
jne 0x5092a0
push dword [ebx]
xor eax, eax
cmp byte [edi + 0x505], al
push dword [esi + 0x4008]
setne al
add eax, 2
push eax
push ebp
call fcn.00504780
add esp, 0x10
test eax, eax
jne 0x50986f
mov eax, dword [ebx]
add dword [edi + 0xc3c], eax
mov eax, dword [ebx]
add dword [edi + 0xa0], eax
mov ecx, dword [esi + 0x4008]
mov al, byte [ecx]
cmp al, 0xd
je 0x5094cd
cmp al, 0xa
je 0x5094cd
mov eax, dword [ebx]
push 0x11
mov byte [ecx + eax], 0
push dword [esi + 0x4008]
push str.WWW_Authenticate:
call fcn.00507250
add esp, 0xc
test eax, eax
je 0x5092f5
mov ebx, dword [edi + 0xf8]
cmp ebx, 0x191
je 0x50931c
push 0x13
push dword [esi + 0x4008]
push str.Proxy_authenticate:
call fcn.00507250
add esp, 0xc
test eax, eax
je 0x509368
mov ebx, dword [edi + 0xf8]
cmp ebx, 0x197
jne 0x509368
push dword [esi + 0x4008]
call fcn.0050f060
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x509724
cmp ebx, 0x197
push ebp
sete cl
movzx ecx, cl
push ecx
push dword [esp + 0x40]
call fcn.0050f320
push ebp
mov ebx, eax
call dword [0x600ab4]
add esp, 0x10
test ebx, ebx
jne 0x509711
mov ebp, dword [esp + 0x38]
jmp 0x5094b0
push 0xf
push dword [esi + 0x4008]
push str.Content_Length:
call fcn.00507250
add esp, 0xc
test eax, eax
je 0x5093c8
mov ecx, dword [edi + 0xf8]
lea eax, [ecx - 0xc8]
cmp eax, 0x64
jae 0x5093a6
push ecx
push str.Ignoring_Content_Length_in_CONNECT__03d_response_n
push edi
call fcn.00504920
add esp, 0xc
jmp 0x5094b0
lea eax, [esi + 0x4010]
push eax
mov eax, dword [esi + 0x4008]
push 0xa
add eax, 0xf
push 0
push eax
call fcn.00513b00
add esp, 0x10
jmp 0x5094b0
push str.close
push str.Connection:
push dword [esi + 0x4008]
call fcn.0050efa0
add esp, 0xc
test al, al
jne 0x5094a9
push 0x12
push dword [esi + 0x4008]
push str.Transfer_Encoding:
call fcn.00507250
add esp, 0xc
test eax, eax
je 0x50945f
mov ecx, dword [edi + 0xf8]
lea eax, [ecx - 0xc8]
cmp eax, 0x64
jae 0x509426
push ecx
push str.Ignoring_Transfer_Encoding_in_CONNECT__03d_response_n
push edi
call fcn.00504920
add esp, 0xc
jmp 0x5094b0
push str.chunked
push str.Transfer_Encoding:
push dword [esi + 0x4008]
call fcn.0050efa0
add esp, 0xc
test al, al
je 0x5094b0
push str.CONNECT_responded_chunked_n
push edi
call fcn.00504920
push ebp
mov byte [esi + 0x4018], 1
call fcn.0052a6b0
add esp, 0xc
jmp 0x5094b0
push str.close
push str.Proxy_Connection:
push dword [esi + 0x4008]
call fcn.0050efa0
add esp, 0xc
test al, al
jne 0x5094a9
lea ebx, [edi + 0xf8]
push ebx
lea eax, [esp + 0x34]
push eax
push str.HTTP_1._d__d
push dword [esi + 0x4008]
call fcn.004130f5
add esp, 0x10
cmp eax, 2
jne 0x5094b0
mov eax, dword [ebx]
mov dword [edi + 0xc24], eax
jmp 0x5094b0
mov byte [esi + 0x4020], 1
lea ebx, [esi + 0x4000]
mov dword [esi + 0x400c], esi
mov dword [ebx], 0
mov dword [esi + 0x4008], esi
jmp 0x5091dd
mov dword [esi + 0x400c], esi
cmp dword [edi + 0xf8], 0x197
jne 0x509584
cmp byte [edi + 0x9b4], 0
jne 0x509584
mov edx, dword [esi + 0x4010]
mov eax, edx
mov ecx, dword [esi + 0x4014]
or eax, ecx
mov dword [esi + 0x4004], 2
je 0x50951e
push ecx
push edx
push str.Ignore__I64d_bytes_of_response_body_n
push edi
call fcn.00504920
add esp, 0x10
jmp 0x50958e
cmp byte [esi + 0x4018], 0
je 0x509584
push str.Ignore_chunked_response_body_n
push edi
call fcn.00504920
mov byte [edi + 0x139], 1
add esp, 8
mov ecx, dword [esi + 0x4008]
cmp byte [ecx + 1], 0xa
lea eax, [ecx + 1]
jne 0x509553
mov dword [esi + 0x4008], eax
mov ecx, eax
lea eax, [esp + 0x1c]
push eax
push 1
lea eax, [ecx + 1]
push eax
push ebp
call fcn.0052a6d0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x50958e
push str.chunk_reading_DONE_n
push edi
call fcn.00504920
add esp, 8
mov dword [esi + 0x401c], 2
mov dword [esi + 0x4004], 0
mov eax, dword [esi + 0x4010]
or eax, dword [esi + 0x4014]
jne 0x5091dd
mov dword [esi + 0x401c], 2
jmp 0x5091dd
mov dword [esi + 0x401c], 2
mov dword [esi + 0x4004], 0
mov ebx, dword [esp + 0x10]
push ebp
call fcn.00512020
add esp, 4
test eax, eax
jne 0x509877
test ebx, ebx
jne 0x50973f
mov eax, dword [edi + 0xc24]
sub eax, 0xc8
cmp eax, 0x64
jb 0x509610
push ebp
call fcn.0050f130
add esp, 4
test eax, eax
jne 0x50986f
cmp byte [ebp + 0x281], al
je 0x509610
mov byte [esi + 0x4020], 1
cmp byte [esi + 0x4020], 0
je 0x509626
cmp dword [edi + 0x140], 0
jne 0x50974c
mov eax, dword [edi + 0x140]
test eax, eax
je 0x509763
cmp dword [esi + 0x401c], 2
jne 0x509684
mov eax, dword [ebp + 0x5d0]
mov dword [eax + 0x401c], 0
mov dword [eax + 0x4004], 1
mov dword [eax + 0x4008], eax
mov dword [eax + 0x400c], eax
mov dword [eax + 0x4010], 0
mov dword [eax + 0x4014], 0
mov byte [eax + 0x4020], 0
mov eax, dword [edi + 0x140]
test eax, eax
je 0x509763
mov ebx, dword [esp + 0x3c]
jmp 0x508e80
cmp dword [edi + 0x180], 0
je 0x5096cf
cmp dword [edi + 0x9ac], 0
je 0x5096cf
push str.Proxy_CONNECT_connection_closed_n
push edi
mov byte [ebp + 0x29a], 1
call fcn.00504920
mov ebx, dword [esp + 0x18]
add esp, 8
mov dword [esi + 0x4004], 0
jmp 0x5095c7
push str.Proxy_CONNECT_aborted
push edi
mov ebx, 1
call fcn.00504840
add esp, 8
mov dword [esi + 0x4004], 0
jmp 0x5095c7
push dword [esp + 0x10]
call dword [0x600ab4]
push ebp
call fcn.0050e860
add esp, 8
mov eax, 0x1b
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x24
ret
push ebp
call fcn.0050e860
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x24
ret
push str.CONNECT_response_too_large_
push edi
call fcn.00504840
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x38
pop ebx
add esp, 0x24
ret
mov ebx, dword [esp + 0x20]
push dword [ebx]
push ebp
call fcn.005052d0
add esp, 8
mov dword [ebx], 0xffffffff
jmp 0x509767
mov ebx, dword [esp + 0x20]
mov eax, dword [edi + 0xc24]
sub eax, 0xc8
cmp eax, 0x64
jb 0x509824
cmp byte [esi + 0x4020], 0
je 0x5097c1
cmp dword [edi + 0x140], 0
je 0x5097c1
push str.Connect_me_again_please_n
push edi
mov byte [ebp + 0x29a], 1
call fcn.00504920
mov eax, dword [ebp + 0x5d0]
push str.CONNECT_phase_completed__n
mov dword [eax + 0x401c], 2
push dword [ebp]
call fcn.00504920
add esp, 0x10
jmp 0x5097f0
push dword [edi + 0x140]
call dword [0x600ab4]
push 2
push ebp
mov dword [edi + 0x140], 0
call fcn.005053d0
push dword [ebx]
push ebp
call fcn.005052d0
add esp, 0x14
mov dword [ebx], 0xffffffff
mov dword [esi + 0x401c], 0
cmp byte [ebp + 0x29a], 0
jne 0x50986d
push dword [edi + 0xf8]
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push edi
call fcn.00504840
add esp, 0xc
mov eax, 0x38
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov dword [esi + 0x401c], 2
push dword [ebp + 0x2dc]
call dword [0x600ab4]
mov dword [ebp + 0x2dc], 0
push dword [edi + 0xc24]
mov byte [edi + 0x9b0], 1
push str.Proxy_replied__d_to_CONNECT_request_n
push edi
call fcn.00504920
mov byte [edi + 0x139], 0
add esp, 0x10
mov byte [ebp + 0x293], 0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
pop edi
pop esi
pop ebp
mov eax, 0x2a
pop ebx
add esp, 0x24
ret
push str.Proxy_CONNECT_aborted_due_to_timeout
push edi
call fcn.00504840
add esp, 8
mov eax, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret