Function at 0x50213e
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.005029c7
pop ecx
test al, al
jne 0x50290a
mov byte [ebx + 0x254], al
cmp dword [edi + 0x20], 0
jne 0x502328
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.004fb098
push dword [esi + 0x130]
call dword [0x638f60]
and dword [esi + 0x130], 0
lea eax, [ebp - 0x38]
push 0x20000
push eax
call fcn.004f727a
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.00502927
add esp, 0x34
test eax, eax
jne 0x50290c
push 1
push dword [ebp - 0xc]
push eax
push str.CONNECT
push ebx
push esi
call fcn.004ff63e
add esp, 0x18
mov dword [ebp - 4], eax
test eax, eax
jne 0x5022f8
cmp dword [ebx + 0xc0], 1
mov ecx, 0x5fec88
push str.Proxy_Connection
mov eax, 0x5fec8c
mov dword [ebp - 4], 0x59e6b8
cmovne eax, ecx
push ebx
push esi
mov dword [ebp - 0x18], eax
call fcn.004fe3e3
test eax, eax
mov ecx, str.Proxy_Connection:_Keep_Alive_r_n
push str.User_Agent
mov eax, 0x59e6b8
cmovne ecx, eax
push ebx
push esi
mov dword [ebp - 0x14], ecx
call fcn.004fe3e3
add esp, 0x18
test eax, eax
jne 0x50225d
cmp dword [esi + 0x5b0], eax
je 0x50225d
mov eax, dword [esi + 0xc90]
mov dword [ebp - 4], eax
push dword [ebp - 0x14]
mov eax, dword [esi + 0xc8c]
mov edx, 0x59e6b8
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.004f723d
add esp, 0x20
mov dword [ebp - 4], eax
test eax, eax
jne 0x5022eb
lea eax, [ebp - 0x38]
push eax
push 1
push esi
call fcn.004fddfc
add esp, 0xc
mov dword [ebp - 4], eax
test eax, eax
jne 0x5022eb
lea eax, [ebp - 0x38]
push 0x5a28bc
push eax
call fcn.004f721a
mov dword [ebp - 4], eax
pop ecx
pop ecx
test eax, eax
jne 0x5022eb
push dword [ebp + 0xc]
push eax
lea eax, [esi + 0xce8]
push eax
lea eax, [ebp - 0x38]
push esi
push eax
call fcn.004fe1dc
add esp, 0x14
mov dword [ebp - 4], eax
test eax, eax
je 0x5022f8
push str.Failed_sending_CONNECT_to_proxy
push esi
call fcn.004fafec
pop ecx
pop ecx
push dword [ebp - 8]
call dword [0x638f60]
push dword [ebp - 0xc]
call dword [0x638f60]
lea eax, [ebp - 0x38]
push eax
call fcn.004f725d
mov eax, dword [ebp - 4]
add esp, 0xc
test eax, eax
jne 0x50290c
mov dword [edi + 0x20], 1
push 1
push 0
push esi
call fcn.004fb84a
add esp, 0xc
test edx, edx
jl 0x502915
jg 0x502347
test eax, eax
je 0x502915
push dword [ebp + 0xc]
push ebx
call fcn.004fb7af
pop ecx
pop ecx
test al, al
je 0x50290a
and dword [ebp - 8], 0
jmp 0x50271d
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp + 0xb]
push eax
push dword [ebp - 0x1c]
push esi
call fcn.004fb14b
add esp, 0x14
mov dword [ebp - 0x18], eax
cmp eax, 0x51
je 0x50290a
push esi
call fcn.00500ee9
pop ecx
test eax, eax
jne 0x502911
cmp dword [ebp - 0x18], eax
jne 0x502763
cmp dword [ebp - 0x10], eax
jle 0x502729
cmp dword [edi + 0x10], 2
jne 0x50241a
mov ecx, dword [edi + 0x18]
mov eax, ecx
mov edx, dword [edi + 0x1c]
or eax, edx
je 0x5023e0
sub ecx, 1
mov dword [edi + 0x18], ecx
sbb edx, 0
mov dword [edi + 0x1c], edx
js 0x5023d4
jg 0x50271d
test ecx, ecx
jne 0x50271d
mov dword [edi + 0x20], 2
jmp 0x502763
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.0050de91
add esp, 0x14
cmp eax, 0xffffffff
jne 0x50271d
push str.chunk_reading_DONE_n
push esi
call fcn.004fb098
and dword [edi + 0x10], 0
pop ecx
pop ecx
jmp 0x502716
push 1
lea eax, [ebp + 0xb]
push eax
push edi
call fcn.004f7254
add esp, 0xc
test eax, eax
jne 0x5027e6
cmp byte [ebp + 0xb], 0xa
jne 0x50271d
push edi
call fcn.00456836
push edi
mov dword [ebp - 4], eax
call fcn.0045f72a
push eax
push dword [ebp - 4]
mov dword [ebp - 0xc], eax
push 1
push esi
call fcn.004faf68
add esp, 0x18
cmp byte [esi + 0x705], 0
jne 0x50248b
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.004faf3b
add esp, 0x10
test eax, eax
jne 0x50290c
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 0x50266e
cmp cl, 0xa
je 0x50266e
push 0x11
push eax
push str.WWW_Authenticate:
call fcn.004fc116
add esp, 0xc
test eax, eax
je 0x5024d6
mov eax, dword [esi + 0xf8]
mov dword [ebp - 0xc], eax
cmp eax, 0x191
je 0x5024fc
push 0x13
push dword [ebp - 4]
push str.Proxy_authenticate:
call fcn.004fc116
add esp, 0xc
test eax, eax
je 0x502544
mov eax, dword [esi + 0xf8]
mov dword [ebp - 0xc], eax
cmp eax, 0x197
jne 0x502544
push dword [ebp - 4]
call fcn.004fe4ef
mov dword [ebp - 0x18], eax
pop ecx
test eax, eax
je 0x5027df
cmp dword [ebp - 0xc], 0x197
push eax
sete cl
movzx ecx, cl
push ecx
push esi
call fcn.004ff37d
push dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
call dword [0x638f60]
mov eax, dword [ebp - 0x14]
add esp, 0x10
test eax, eax
jne 0x50290c
jmp 0x502662
push 0xf
push dword [ebp - 4]
push str.Content_Length:
call fcn.004fc116
add esp, 0xc
test eax, eax
je 0x502598
mov ecx, dword [esi + 0xf8]
lea eax, [ecx - 0xc8]
cmp eax, 0x64
jae 0x50257c
push ecx
push str.Ignoring_Content_Length_in_CONNECT__03d_response_n
push esi
call fcn.004fb098
jmp 0x502612
lea eax, [edi + 0x18]
push eax
mov eax, dword [ebp - 4]
push 0xa
add eax, 0xf
push 0
push eax
call fcn.0050417e
add esp, 0x10
jmp 0x502662
push str.close
push str.Connection:
push dword [ebp - 4]
call fcn.004fe44d
add esp, 0xc
test al, al
jne 0x50265e
push 0x12
push dword [ebp - 4]
push str.Transfer_Encoding:
call fcn.004fc116
add esp, 0xc
test eax, eax
je 0x502617
mov ecx, dword [esi + 0xf8]
lea eax, [ecx - 0xc8]
cmp eax, 0x64
jae 0x5025e4
push ecx
push str.Ignoring_Transfer_Encoding_in_CONNECT__03d_response_n
jmp 0x502571
push str.chunked
push str.Transfer_Encoding:
push dword [ebp - 4]
call fcn.004fe44d
add esp, 0xc
test al, al
je 0x502662
push str.CONNECT_responded_chunked_n
push esi
call fcn.004fb098
push esi
mov byte [edi + 0x24], 1
call fcn.0050de6c
add esp, 0xc
jmp 0x502662
push str.close
push str.Proxy_Connection:
push dword [ebp - 4]
call fcn.004fe44d
add esp, 0xc
test al, al
jne 0x50265e
lea eax, [esi + 0xf8]
push eax
lea eax, [ebp - 0x20]
push eax
push str.HTTP_1._d__d
push dword [ebp - 4]
call fcn.00471b96
add esp, 0x10
cmp eax, 2
jne 0x502662
mov eax, dword [esi + 0xf8]
mov dword [esi + 0xccc], eax
jmp 0x502662
mov byte [edi + 0x25], 1
push edi
call fcn.004f7292
pop ecx
jmp 0x50271d
cmp dword [esi + 0xf8], 0x197
jne 0x502700
cmp byte [esi + 0xcb9], 0
jne 0x502700
mov eax, dword [edi + 0x18]
or eax, dword [edi + 0x1c]
mov dword [edi + 0x10], 2
je 0x5026ac
push dword [edi + 0x1c]
push dword [edi + 0x18]
push str.Ignore__I64d_bytes_of_response_body_n
push esi
call fcn.004fb098
add esp, 0x10
jmp 0x502704
cmp byte [edi + 0x24], 0
je 0x502700
push str.Ignore_chunked_response_body_n
push esi
call fcn.004fb098
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.0050de91
add esp, 0x1c
cmp eax, 0xffffffff
jne 0x502704
push str.chunk_reading_DONE_n
push esi
call fcn.004fb098
pop ecx
pop ecx
mov dword [edi + 0x20], 2
and dword [edi + 0x10], 0
cmp dword [edi + 0x10], 0
jne 0x502363
mov eax, dword [edi + 0x18]
or eax, dword [edi + 0x1c]
jne 0x50271d
mov dword [edi + 0x20], 2
cmp dword [edi + 0x10], 0
jne 0x502363
jmp 0x502767
cmp dword [esi + 0x178], 0
je 0x50274f
cmp dword [esi + 0x990], 0
je 0x50274f
push str.Proxy_CONNECT_connection_closed_n
push esi
mov byte [ebx + 0x254], 1
call fcn.004fb098
jmp 0x502761
push str.Proxy_CONNECT_aborted
push esi
mov dword [ebp - 8], 1
call fcn.004fafec
pop ecx
pop ecx
and dword [edi + 0x10], 0
push esi
call fcn.00500ee9
pop ecx
test eax, eax
jne 0x502911
cmp dword [ebp - 8], eax
jne 0x5027f3
mov eax, dword [esi + 0xccc]
sub eax, 0xc8
cmp eax, 0x64
jb 0x5027a6
push esi
call fcn.004fe5a1
pop ecx
test eax, eax
jne 0x50290c
cmp byte [ebx + 0x255], al
je 0x5027a6
mov byte [edi + 0x25], 1
cmp byte [edi + 0x25], 0
je 0x5027b5
cmp dword [esi + 0x130], 0
jne 0x5027fa
mov eax, dword [esi + 0x130]
test eax, eax
je 0x502819
cmp dword [edi + 0x20], 2
jne 0x5027d5
push 1
push esi
call fcn.00502bee
mov eax, dword [esi + 0x130]
pop ecx
pop ecx
test eax, eax
jne 0x502179
jmp 0x502819
push 0x1b
jmp 0x502924
push str.CONNECT_response_too_large_
push esi
call fcn.004fafec
pop ecx
pop ecx
push 0x38
jmp 0x502924
mov eax, dword [ebp + 0xc]
push dword [ebx + eax*4 + 0x158]
push ebx
push esi
call fcn.004fb73d
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 0x5028bf
cmp byte [edi + 0x25], 0
je 0x502859
cmp dword [esi + 0x130], 0
je 0x502859
push str.Connect_me_again_please_n
push esi
mov byte [ebx + 0x254], 1
call fcn.004fb098
push esi
call fcn.00502bbf
add esp, 0xc
jmp 0x502893
push dword [esi + 0x130]
call dword [0x638f60]
and dword [esi + 0x130], 0
push 2
push ebx
call fcn.004fb801
mov eax, dword [ebp + 0xc]
push dword [ebx + eax*4 + 0x158]
push ebx
push esi
call fcn.004fb73d
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 0x50290a
push edi
call fcn.004f725d
push dword [esi + 0xf8]
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push esi
call fcn.004fafec
add esp, 0x10
jmp 0x5027f3
mov dword [edi + 0x20], 2
push dword [esi + 0xc8c]
call dword [0x638f60]
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.004fb098
mov byte [esi + 0x147], 0
push edi
mov byte [ebx + 0x262], 0
call fcn.004f725d
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
push 0x2a
jmp 0x502924
push str.Proxy_CONNECT_aborted_due_to_timeout
push esi
call fcn.004fafec
pop ecx
pop ecx
push 0x1c
pop eax
jmp 0x50290c