Function at 0x527f5d
Capabilities:
Check for time delay via gettickcount
Check http status code

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
mov edi, ecx
mov ebx, edx
xor edx, edx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x48], edx
mov ecx, 0x36ee80
mov dword [ebp - 0x14], edx
mov esi, dword [edi]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x44], edx
mov eax, dword [esi + 0x19c]
test eax, eax
mov dword [ebp - 0x2c], edx
cmovne ecx, eax
cmp dword [edi + ebx*4 + 0x4b0], 2
mov eax, dword [edi + ebx*4 + 0x130]
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x34], eax
jne 0x527fb1
xor eax, eax
jmp 0x52887e
mov dword [edi + 0x21c], edx
cmp dword [edi + ebx*4 + 0x4b0], edx
jne 0x5281ea
movzx eax, word [ebp + 0xc]
push eax
push dword [ebp + 8]
push str.Establish_HTTP_proxy_tunnel_to__s:_hu_n
push esi
call fcn.00510c4e
mov eax, dword [esi + 0xd4]
add esp, 0x10
test eax, eax
je 0x527ff3
push eax
call dword [sym.imp.MSVCR120.dll_free]
and dword [esi + 0xd4], 0
pop ecx
xor eax, eax
inc eax
push 0xc
push eax
call dword [0x5c6c48]
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x5287b0
movzx eax, word [ebp + 0xc]
push eax
push dword [ebp + 8]
push str._s:_hu
call fcn.0051b50c
add esp, 0xc
mov dword [ebp - 0x40], eax
test eax, eax
je 0x5287b7
push 1
push eax
mov edx, str.CONNECT
mov ecx, edi
call fcn.0051550e
push dword [ebp - 0x40]
mov dword [ebp - 0xc], eax
call dword [sym.imp.MSVCR120.dll_free]
add esp, 0xc
cmp dword [ebp - 0xc], 0
jne 0x5281c4
cmp dword [edi + 0x114], 1
mov eax, 0x57f98c
mov dword [ebp - 0x24], eax
mov ecx, 0x59b448
mov dword [ebp - 0x20], eax
mov edx, 0x57f98c
mov eax, 0x59b444
cmovne eax, ecx
mov ecx, dword [edi + 0x1dc]
mov dword [ebp - 0x1c], eax
test ecx, ecx
movzx eax, word [ebp + 0xc]
push eax
mov eax, 0x58e168
cmove eax, edx
push eax
push dword [ebp + 8]
mov eax, str.___:
cmove eax, edx
push eax
push str._s_s_s:_hu
call fcn.0051b50c
add esp, 0x14
mov dword [ebp - 0x28], eax
test eax, eax
je 0x5287b7
mov edx, str.Host:
mov ecx, esi
call fcn.00514ecd
test eax, eax
jne 0x5280de
push dword [ebp - 0x28]
push str.Host:__s_r_n
call fcn.0051b50c
mov dword [ebp - 0x24], eax
pop ecx
pop ecx
test eax, eax
je 0x5287a0
mov edx, str.Proxy_Connection:
mov ecx, esi
call fcn.00514ecd
test eax, eax
mov ecx, str.Proxy_Connection:_Keep_Alive_r_n
mov eax, 0x57f98c
mov edx, str.User_Agent:
cmovne ecx, eax
mov dword [ebp - 0x40], ecx
mov ecx, esi
call fcn.00514ecd
test eax, eax
jne 0x52811d
cmp dword [esi + 0x3a4], eax
je 0x52811d
mov eax, dword [edi + 0x250]
mov dword [ebp - 0x20], eax
push dword [ebp - 0x40]
mov eax, dword [edi + 0x24c]
mov ecx, 0x57f98c
push dword [ebp - 0x20]
test eax, eax
cmovne ecx, eax
push ecx
push dword [ebp - 0x24]
push dword [ebp - 0x1c]
push dword [ebp - 0x28]
push str.CONNECT__s_HTTP__s_r_n_s_s_s_s
push ebx
call fcn.00515a4b
mov dword [ebp - 0xc], eax
add esp, 0x20
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x528162
cmp byte [eax], 0
je 0x528162
push eax
call dword [sym.imp.MSVCR120.dll_free]
pop ecx
push dword [ebp - 0x28]
call dword [sym.imp.MSVCR120.dll_free]
mov eax, dword [ebp - 0xc]
pop ecx
test eax, eax
jne 0x5281b1
mov edx, ebx
mov ecx, edi
call fcn.00515e81
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x5281b1
push 0x58fdd4
push ebx
call fcn.00515a4b
mov dword [ebp - 0xc], eax
pop ecx
pop ecx
test eax, eax
jne 0x5281b1
push dword [ebp - 0x10]
mov edx, edi
mov ecx, ebx
push eax
lea eax, [esi + 0x86c4]
push eax
call fcn.005158bd
add esp, 0xc
mov dword [ebp - 0xc], eax
xor ebx, ebx
test eax, eax
je 0x5281db
push str.Failed_sending_CONNECT_to_proxy
push esi
call fcn.00510cc2
pop ecx
pop ecx
test ebx, ebx
je 0x5281d0
push ebx
call dword [sym.imp.MSVCR120.dll_free]
pop ecx
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x52887e
mov eax, dword [ebp - 0x10]
xor ebx, ebx
inc ebx
mov dword [edi + eax*4 + 0x4b0], ebx
jmp 0x5281ed
xor ebx, ebx
inc ebx
push dword [edi + 0x124]
push dword [edi + 0x120]
call fcn.00519343
push edx
push eax
call fcn.00519359
mov ecx, dword [ebp - 0x3c]
add esp, 0x10
sub ecx, eax
test ecx, ecx
jle 0x52886e
cmp dword [esi + 0x540], 2
jne 0x528237
mov ecx, dword [ebp - 0x34]
or edx, 0xffffffff
push 0
push 0xffffffffffffffff
call fcn.0051836a
pop ecx
pop ecx
test eax, eax
je 0x527faa
and dword [ebp - 0x28], 0
lea eax, [esi + 0x55c]
and dword [ebp - 0x20], 0
mov dword [ebp - 0x24], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], ebx
test ebx, ebx
je 0x5283d7
cmp dword [ebp - 0x2c], 0
jne 0x52887b
push dword [edi + 0x124]
push dword [edi + 0x120]
call fcn.00519343
push edx
push eax
call fcn.00519359
mov ecx, dword [ebp - 0x3c]
add esp, 0x10
sub ecx, eax
test ecx, ecx
jle 0x52873c
mov edx, 0x3e8
cmp ecx, edx
mov eax, edx
cmovl eax, ecx
mov ecx, dword [ebp - 0x34]
push eax
push 0xffffffffffffffff
or edx, 0xffffffff
call fcn.0051836a
pop ecx
pop ecx
cmp eax, 0xffffffff
je 0x528732
test eax, eax
je 0x5283bb
mov edx, dword [ebp - 0x34]
lea eax, [ebp - 0x38]
push eax
mov eax, 0x4000
mov ecx, edi
sub eax, dword [ebp - 0x28]
push eax
push dword [ebp - 0x24]
call fcn.0051110d
add esp, 0xc
cmp eax, 0x51
je 0x5283ca
test eax, eax
jne 0x528365
mov ebx, dword [ebp - 0x38]
mov dword [ebp - 0x40], ebx
test ebx, ebx
jg 0x528326
xor ebx, ebx
mov dword [ebp - 8], ebx
cmp dword [esi + 0x118], ebx
je 0x52830e
cmp dword [esi + 0x85fc], ebx
je 0x52830e
inc eax
mov dword [edi + 0x21c], eax
jmp 0x5283bb
push str.Proxy_CONNECT_aborted
xor eax, eax
inc eax
push esi
mov dword [ebp - 0x2c], eax
call fcn.00510cc2
pop ecx
pop ecx
jmp 0x5283bb
add dword [ebp - 0x28], ebx
cmp dword [ebp - 8], 1
jle 0x52841a
mov eax, dword [ebp - 0x14]
lea ecx, [esi + 0x55c]
and dword [ebp - 0x28], 0
or eax, dword [ebp - 0x18]
mov dword [ebp - 0x24], ecx
je 0x52836c
mov ecx, dword [ebp - 0x14]
mov eax, ebx
cdq
sub ecx, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], ecx
sbb eax, edx
mov dword [ebp - 0x18], eax
test eax, eax
jg 0x5283b8
jl 0x528365
test ecx, ecx
jne 0x5283b8
xor ebx, ebx
mov dword [ebp - 8], ebx
jmp 0x5283bb
and dword [ebp - 0x1c], 0
lea eax, [ebp - 0x1c]
push eax
mov edx, ecx
mov ecx, edi
push ebx
call fcn.005296f7
pop ecx
pop ecx
cmp eax, 0xffffffff
jne 0x5283a7
push str.chunk_reading_DONE_n
push esi
call fcn.00510c4e
pop ecx
pop ecx
xor ebx, ebx
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 0x10]
mov dword [edi + eax*4 + 0x4b0], 2
jmp 0x5283bb
push dword [ebp - 0x1c]
push str.Read__zd_bytes_of_chunk__continue_n
push esi
call fcn.00510c4e
add esp, 0xc
mov ebx, dword [ebp - 8]
mov ecx, edi
call fcn.00518c4e
test eax, eax
jne 0x5287c0
cmp dword [ebp - 0x28], 0x4000
jb 0x52824e
mov eax, dword [ebp - 0x2c]
test eax, eax
jne 0x52887b
cmp dword [esi + 0x86b0], 0xc8
je 0x528754
mov ecx, edi
call fcn.00515250
test eax, eax
jne 0x52887e
mov eax, dword [ebp - 0x30]
xor edx, edx
cmp dword [edi + 0x1c4], edx
push 1
pop ecx
cmovne eax, ecx
mov dword [ebp - 0x30], eax
jmp 0x528759
xor eax, eax
mov dword [ebp - 0x1c], eax
test ebx, ebx
jle 0x5283b8
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x20]
inc edx
cmp byte [ecx], 0xa
mov dword [ebp - 0x20], edx
jne 0x5285e1
cmp dword [esi + 0x2e4], 0
je 0x528454
mov ecx, dword [ebp - 0xc]
xor eax, eax
push edi
push edx
push ecx
lea edx, [eax + 1]
mov ecx, esi
call fcn.0051126d
add esp, 0xc
cmp dword [esi + 0x2c8], 0
mov ecx, edi
push 2
pop edx
push 3
pop eax
push dword [ebp - 0x20]
cmovne edx, eax
push dword [ebp - 0xc]
call fcn.00510fd8
pop ecx
pop ecx
test eax, eax
jne 0x52887e
mov ecx, dword [ebp - 0xc]
mov al, byte [ecx]
cmp al, 0xd
je 0x5285f6
cmp al, 0xa
je 0x5285f6
mov edx, dword [ebp - 0x20]
push 0x11
mov al, byte [edx + ecx]
mov byte [edx + ecx], 0
mov edx, ecx
mov ecx, str.WWW_Authenticate:
mov byte [ebp - 1], al
call fcn.0052670c
pop ecx
test eax, eax
je 0x5284be
mov edx, dword [esi + 0x90]
cmp edx, 0x191
je 0x5284e0
mov edx, dword [ebp - 0xc]
mov ecx, str.Proxy_authenticate:
push 0x13
call fcn.0052670c
pop ecx
test eax, eax
je 0x5284f8
mov edx, dword [esi + 0x90]
cmp edx, 0x197
jne 0x5284f8
push dword [ebp - 0xc]
mov ecx, edi
call fcn.00515609
pop ecx
test eax, eax
jne 0x52887e
jmp 0x5285c4
mov edx, dword [ebp - 0xc]
mov ecx, str.Content_Length:
push 0xf
call fcn.0052670c
pop ecx
test eax, eax
je 0x52852b
mov eax, dword [ebp - 0xc]
push 0xa
add eax, 0xf
push 0
push eax
call dword [sym.imp.MSVCR120.dll__strtoi64]
add esp, 0xc
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], edx
jmp 0x5285c4
mov ecx, dword [ebp - 0xc]
mov edx, str.Connection:
push str.close
call fcn.00515b52
pop ecx
test eax, eax
jne 0x528590
mov ecx, dword [ebp - 0xc]
mov edx, str.Transfer_Encoding:
push str.chunked
call fcn.00515b52
pop ecx
test eax, eax
je 0x528579
push str.CONNECT_responded_chunked_n
push esi
call fcn.00510c4e
and dword [edi + 0x18], 0
xor eax, eax
inc eax
and dword [edi + 0x24], 0
pop ecx
pop ecx
mov dword [ebp - 0x44], eax
mov dword [edi + 0x1c], eax
jmp 0x5285c4
mov ecx, dword [ebp - 0xc]
mov edx, str.Proxy_Connection:
push str.close
call fcn.00515b52
pop ecx
test eax, eax
je 0x528598
xor eax, eax
inc eax
mov dword [ebp - 0x30], eax
jmp 0x5285c4
lea ebx, [esi + 0x90]
push ebx
lea eax, [ebp - 0x48]
push eax
push str.HTTP_1._d__d
push dword [ebp - 0xc]
call dword [sym.imp.MSVCR120.dll_sscanf]
add esp, 0x10
cmp eax, 2
jne 0x5285c1
mov eax, dword [ebx]
mov dword [esi + 0x86b0], eax
mov ebx, dword [ebp - 0x40]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x20]
mov al, byte [ebp - 1]
mov byte [edx + ecx], al
xor edx, edx
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x20], edx
lea eax, [ecx + 1]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x1c]
inc ecx
inc eax
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x1c], eax
cmp eax, ebx
jl 0x528429
jmp 0x5283b8
and dword [ebp - 0x28], 0
lea eax, [esi + 0x55c]
cmp dword [esi + 0x90], 0x197
mov dword [ebp - 0x24], eax
jne 0x528700
cmp dword [esi + 0x860c], 0
jne 0x528700
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
push 2
pop eax
mov dword [ebp - 8], eax
mov eax, ecx
or eax, edx
je 0x528673
push edx
push ecx
push str.Ignore__lld_bytes_of_response_body_n
push esi
call fcn.00510c4e
sub ebx, dword [ebp - 0x1c]
add esp, 0x10
mov ecx, dword [ebp - 0x14]
mov eax, ebx
cdq
sub ecx, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], ecx
sbb eax, edx
mov dword [ebp - 0x18], eax
test eax, eax
jg 0x52872a
jl 0x528392
test ecx, ecx
jne 0x52872a
jmp 0x528392
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x528392
xor eax, eax
inc eax
mov dword [esi + 0xc8], eax
mov eax, ebx
sub eax, dword [ebp - 0x1c]
push eax
push str._zd_bytes_of_chunk_left_n
push esi
call fcn.00510c4e
mov eax, dword [ebp - 0xc]
add esp, 0xc
inc eax
cmp byte [eax], 0xa
jne 0x5286ad
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x1c]
inc eax
jmp 0x5286b0
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0xc]
lea ecx, [ebp - 0x38]
push ecx
sub ebx, eax
mov ecx, edi
push ebx
lea edx, [edx + 1]
call fcn.005296f7
pop ecx
pop ecx
cmp eax, 0xffffffff
jne 0x5286f0
push str.chunk_reading_DONE_n
push esi
call fcn.00510c4e
mov eax, dword [ebp - 0x10]
xor ebx, ebx
pop ecx
pop ecx
mov dword [ebp - 8], ebx
mov dword [edi + eax*4 + 0x4b0], 2
jmp 0x52839a
push dword [ebp - 0x38]
push str.Read__zd_bytes_of_chunk__continue_n
push esi
call fcn.00510c4e
jmp 0x528727
xor eax, eax
cmp dword [esi + 0x86b0], 0xc8
mov dword [ebp - 8], eax
jne 0x52872a
sub ebx, dword [ebp - 0x1c]
lea eax, [ebx - 1]
test eax, eax
je 0x52872a
push eax
push str.Proxy_CONNECT_followed_by__zd_bytes_of_opaque_data._Data_ignored__known_bug_39_
push esi
call fcn.00510cc2
add esp, 0xc
mov ebx, dword [ebp - 8]
jmp 0x528397
push str.Proxy_CONNECT_aborted_due_to_select_poll_error
jmp 0x528313
push str.Proxy_CONNECT_aborted_due_to_timeout
push esi
call fcn.00510cc2
pop ecx
pop ecx
push 2
pop eax
mov dword [ebp - 0x2c], eax
jmp 0x5283da
mov eax, dword [ebp - 0x30]
xor edx, edx
test eax, eax
je 0x528765
cmp dword [esi + 0xd4], edx
jne 0x5287c7
mov ebx, dword [ebp - 0x10]
cmp dword [esi + 0xd4], edx
je 0x5287e2
cmp dword [edi + ebx*4 + 0x4b0], 2
jne 0x528792
push edx
push str.TUNNEL_STATE_switched_to:__d_n
push esi
mov dword [edi + ebx*4 + 0x4b0], edx
call fcn.00510c4e
add esp, 0xc
xor edx, edx
cmp dword [esi + 0xd4], edx
jne 0x527fb7
jmp 0x5287e2
push dword [ebp - 0x28]
mov esi, dword [sym.imp.MSVCR120.dll_free]
call esi
pop ecx
push ebx
call esi
pop ecx
push 0x1b
jmp 0x52887d
push ebx
call dword [sym.imp.MSVCR120.dll_free]
jmp 0x5287af
push 0x2a
jmp 0x52887d
mov ebx, dword [ebp - 0x10]
mov ecx, edi
mov edx, dword [edi + ebx*4 + 0x130]
call fcn.0050ffd8
or dword [edi + ebx*4 + 0x130], 0xffffffff
xor edx, edx
mov eax, dword [esi + 0x90]
cmp eax, 0xc8
je 0x528821
push eax
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push esi
call fcn.00510cc2
mov eax, dword [ebp - 0x30]
add esp, 0xc
test eax, eax
je 0x528817
cmp dword [esi + 0xd4], 0
je 0x528817
xor eax, eax
inc eax
mov dword [edi + 0x21c], eax
and dword [edi + ebx*4 + 0x4b0], 0
jmp 0x52887b
mov dword [edi + ebx*4 + 0x4b0], 2
mov eax, dword [edi + 0x24c]
test eax, eax
je 0x528846
push eax
call dword [sym.imp.MSVCR120.dll_free]
xor edx, edx
pop ecx
mov dword [edi + 0x24c], edx
xor eax, eax
mov dword [edi + 0x24c], edx
inc eax
push str.Proxy_replied_OK_to_CONNECT_request_n
push esi
mov dword [esi + 0x8600], eax
call fcn.00510c4e
and dword [esi + 0xc8], 0
pop ecx
pop ecx
jmp 0x527faa
push str.Proxy_CONNECT_aborted_due_to_timeout
push esi
call fcn.00510cc2
pop ecx
pop ecx
push 0x38
pop eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret