Function at 0x529c57
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 + 0x4a4], 2
mov eax, dword [edi + ebx*4 + 0x130]
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x34], eax
jne 0x529cab
xor eax, eax
jmp 0x52a578
mov dword [edi + 0x218], edx
cmp dword [edi + ebx*4 + 0x4a4], edx
jne 0x529ee4
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.00512948
mov eax, dword [esi + 0xd4]
add esp, 0x10
test eax, eax
je 0x529ced
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 [0x5cdc48]
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x52a4aa
movzx eax, word [ebp + 0xc]
push eax
push dword [ebp + 8]
push str._s:_hu
call fcn.0051d206
add esp, 0xc
mov dword [ebp - 0x40], eax
test eax, eax
je 0x52a4b1
push 1
push eax
mov edx, str.CONNECT
mov ecx, edi
call fcn.00517208
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 0x529ebe
cmp dword [edi + 0x114], 1
mov eax, 0x583988
mov dword [ebp - 0x24], eax
mov ecx, 0x59ebbc
mov dword [ebp - 0x20], eax
mov edx, 0x583988
mov eax, 0x59ebb8
cmovne eax, ecx
mov ecx, dword [edi + 0x1d8]
mov dword [ebp - 0x1c], eax
test ecx, ecx
movzx eax, word [ebp + 0xc]
push eax
mov eax, 0x591918
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.0051d206
add esp, 0x14
mov dword [ebp - 0x28], eax
test eax, eax
je 0x52a4b1
mov edx, str.Host:
mov ecx, esi
call fcn.00516bc7
test eax, eax
jne 0x529dd8
push dword [ebp - 0x28]
push str.Host:__s_r_n
call fcn.0051d206
mov dword [ebp - 0x24], eax
pop ecx
pop ecx
test eax, eax
je 0x52a49a
mov edx, str.Proxy_Connection:
mov ecx, esi
call fcn.00516bc7
test eax, eax
mov ecx, str.Proxy_Connection:_Keep_Alive_r_n
mov eax, 0x583988
mov edx, str.User_Agent:
cmovne ecx, eax
mov dword [ebp - 0x40], ecx
mov ecx, esi
call fcn.00516bc7
test eax, eax
jne 0x529e17
cmp dword [esi + 0x3a4], eax
je 0x529e17
mov eax, dword [edi + 0x24c]
mov dword [ebp - 0x20], eax
push dword [ebp - 0x40]
mov eax, dword [edi + 0x248]
mov ecx, 0x583988
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.00517745
mov dword [ebp - 0xc], eax
add esp, 0x20
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x529e5c
cmp byte [eax], 0
je 0x529e5c
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 0x529eab
mov edx, ebx
mov ecx, edi
call fcn.00517b7b
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x529eab
push 0x593584
push ebx
call fcn.00517745
mov dword [ebp - 0xc], eax
pop ecx
pop ecx
test eax, eax
jne 0x529eab
push dword [ebp - 0x10]
mov edx, edi
mov ecx, ebx
push eax
lea eax, [esi + 0x86c4]
push eax
call fcn.005175b7
add esp, 0xc
mov dword [ebp - 0xc], eax
xor ebx, ebx
test eax, eax
je 0x529ed5
push str.Failed_sending_CONNECT_to_proxy
push esi
call fcn.005129bc
pop ecx
pop ecx
test ebx, ebx
je 0x529eca
push ebx
call dword [sym.imp.MSVCR120.dll_free]
pop ecx
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x52a578
mov eax, dword [ebp - 0x10]
xor ebx, ebx
inc ebx
mov dword [edi + eax*4 + 0x4a4], ebx
jmp 0x529ee7
xor ebx, ebx
inc ebx
push dword [edi + 0x124]
push dword [edi + 0x120]
call fcn.0051b03d
push edx
push eax
call fcn.0051b053
mov ecx, dword [ebp - 0x3c]
add esp, 0x10
sub ecx, eax
test ecx, ecx
jle 0x52a568
cmp dword [esi + 0x540], 2
jne 0x529f31
mov ecx, dword [ebp - 0x34]
or edx, 0xffffffff
push 0
push 0xffffffffffffffff
call fcn.0051a064
pop ecx
pop ecx
test eax, eax
je 0x529ca4
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 0x52a0d1
cmp dword [ebp - 0x2c], 0
jne 0x52a575
push dword [edi + 0x124]
push dword [edi + 0x120]
call fcn.0051b03d
push edx
push eax
call fcn.0051b053
mov ecx, dword [ebp - 0x3c]
add esp, 0x10
sub ecx, eax
test ecx, ecx
jle 0x52a436
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.0051a064
pop ecx
pop ecx
cmp eax, 0xffffffff
je 0x52a42c
test eax, eax
je 0x52a0b5
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.00512e07
add esp, 0xc
cmp eax, 0x51
je 0x52a0c4
test eax, eax
jne 0x52a05f
mov ebx, dword [ebp - 0x38]
mov dword [ebp - 0x40], ebx
test ebx, ebx
jg 0x52a020
xor ebx, ebx
mov dword [ebp - 8], ebx
cmp dword [esi + 0x118], ebx
je 0x52a008
cmp dword [esi + 0x85fc], ebx
je 0x52a008
inc eax
mov dword [edi + 0x218], eax
jmp 0x52a0b5
push str.Proxy_CONNECT_aborted
xor eax, eax
inc eax
push esi
mov dword [ebp - 0x2c], eax
call fcn.005129bc
pop ecx
pop ecx
jmp 0x52a0b5
add dword [ebp - 0x28], ebx
cmp dword [ebp - 8], 1
jle 0x52a114
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 0x52a066
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 0x52a0b2
jl 0x52a05f
test ecx, ecx
jne 0x52a0b2
xor ebx, ebx
mov dword [ebp - 8], ebx
jmp 0x52a0b5
and dword [ebp - 0x1c], 0
lea eax, [ebp - 0x1c]
push eax
mov edx, ecx
mov ecx, edi
push ebx
call fcn.0052b3f1
pop ecx
pop ecx
cmp eax, 0xffffffff
jne 0x52a0a1
push str.chunk_reading_DONE_n
push esi
call fcn.00512948
pop ecx
pop ecx
xor ebx, ebx
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 0x10]
mov dword [edi + eax*4 + 0x4a4], 2
jmp 0x52a0b5
push dword [ebp - 0x1c]
push str.Read__zd_bytes_of_chunk__continue_n
push esi
call fcn.00512948
add esp, 0xc
mov ebx, dword [ebp - 8]
mov ecx, edi
call fcn.0051a948
test eax, eax
jne 0x52a4ba
cmp dword [ebp - 0x28], 0x4000
jb 0x529f48
mov eax, dword [ebp - 0x2c]
test eax, eax
jne 0x52a575
cmp dword [esi + 0x86b0], 0xc8
je 0x52a44e
mov ecx, edi
call fcn.00516f4a
test eax, eax
jne 0x52a578
mov eax, dword [ebp - 0x30]
xor edx, edx
cmp dword [edi + 0x1c0], edx
push 1
pop ecx
cmovne eax, ecx
mov dword [ebp - 0x30], eax
jmp 0x52a453
xor eax, eax
mov dword [ebp - 0x1c], eax
test ebx, ebx
jle 0x52a0b2
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x20]
inc edx
cmp byte [ecx], 0xa
mov dword [ebp - 0x20], edx
jne 0x52a2db
cmp dword [esi + 0x2e4], 0
je 0x52a14e
mov ecx, dword [ebp - 0xc]
xor eax, eax
push edi
push edx
push ecx
lea edx, [eax + 1]
mov ecx, esi
call fcn.00512f67
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.00512cd2
pop ecx
pop ecx
test eax, eax
jne 0x52a578
mov ecx, dword [ebp - 0xc]
mov al, byte [ecx]
cmp al, 0xd
je 0x52a2f0
cmp al, 0xa
je 0x52a2f0
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.00528406
pop ecx
test eax, eax
je 0x52a1b8
mov edx, dword [esi + 0x90]
cmp edx, 0x191
je 0x52a1da
mov edx, dword [ebp - 0xc]
mov ecx, str.Proxy_authenticate:
push 0x13
call fcn.00528406
pop ecx
test eax, eax
je 0x52a1f2
mov edx, dword [esi + 0x90]
cmp edx, 0x197
jne 0x52a1f2
push dword [ebp - 0xc]
mov ecx, edi
call fcn.00517303
pop ecx
test eax, eax
jne 0x52a578
jmp 0x52a2be
mov edx, dword [ebp - 0xc]
mov ecx, str.Content_Length:
push 0xf
call fcn.00528406
pop ecx
test eax, eax
je 0x52a225
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 0x52a2be
mov ecx, dword [ebp - 0xc]
mov edx, str.Connection:
push str.close
call fcn.0051784c
pop ecx
test eax, eax
jne 0x52a28a
mov ecx, dword [ebp - 0xc]
mov edx, str.Transfer_Encoding:
push str.chunked
call fcn.0051784c
pop ecx
test eax, eax
je 0x52a273
push str.CONNECT_responded_chunked_n
push esi
call fcn.00512948
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 0x52a2be
mov ecx, dword [ebp - 0xc]
mov edx, str.Proxy_Connection:
push str.close
call fcn.0051784c
pop ecx
test eax, eax
je 0x52a292
xor eax, eax
inc eax
mov dword [ebp - 0x30], eax
jmp 0x52a2be
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 0x52a2bb
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 0x52a123
jmp 0x52a0b2
and dword [ebp - 0x28], 0
lea eax, [esi + 0x55c]
cmp dword [esi + 0x90], 0x197
mov dword [ebp - 0x24], eax
jne 0x52a3fa
cmp dword [esi + 0x860c], 0
jne 0x52a3fa
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 0x52a36d
push edx
push ecx
push str.Ignore__lld_bytes_of_response_body_n
push esi
call fcn.00512948
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 0x52a424
jl 0x52a08c
test ecx, ecx
jne 0x52a424
jmp 0x52a08c
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x52a08c
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.00512948
mov eax, dword [ebp - 0xc]
add esp, 0xc
inc eax
cmp byte [eax], 0xa
jne 0x52a3a7
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x1c]
inc eax
jmp 0x52a3aa
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.0052b3f1
pop ecx
pop ecx
cmp eax, 0xffffffff
jne 0x52a3ea
push str.chunk_reading_DONE_n
push esi
call fcn.00512948
mov eax, dword [ebp - 0x10]
xor ebx, ebx
pop ecx
pop ecx
mov dword [ebp - 8], ebx
mov dword [edi + eax*4 + 0x4a4], 2
jmp 0x52a094
push dword [ebp - 0x38]
push str.Read__zd_bytes_of_chunk__continue_n
push esi
call fcn.00512948
jmp 0x52a421
xor eax, eax
cmp dword [esi + 0x86b0], 0xc8
mov dword [ebp - 8], eax
jne 0x52a424
sub ebx, dword [ebp - 0x1c]
lea eax, [ebx - 1]
test eax, eax
je 0x52a424
push eax
push str.Proxy_CONNECT_followed_by__zd_bytes_of_opaque_data._Data_ignored__known_bug_39_
push esi
call fcn.005129bc
add esp, 0xc
mov ebx, dword [ebp - 8]
jmp 0x52a091
push str.Proxy_CONNECT_aborted_due_to_select_poll_error
jmp 0x52a00d
push str.Proxy_CONNECT_aborted_due_to_timeout
push esi
call fcn.005129bc
pop ecx
pop ecx
push 2
pop eax
mov dword [ebp - 0x2c], eax
jmp 0x52a0d4
mov eax, dword [ebp - 0x30]
xor edx, edx
test eax, eax
je 0x52a45f
cmp dword [esi + 0xd4], edx
jne 0x52a4c1
mov ebx, dword [ebp - 0x10]
cmp dword [esi + 0xd4], edx
je 0x52a4dc
cmp dword [edi + ebx*4 + 0x4a4], 2
jne 0x52a48c
push edx
push str.TUNNEL_STATE_switched_to:__d_n
push esi
mov dword [edi + ebx*4 + 0x4a4], edx
call fcn.00512948
add esp, 0xc
xor edx, edx
cmp dword [esi + 0xd4], edx
jne 0x529cb1
jmp 0x52a4dc
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 0x52a577
push ebx
call dword [sym.imp.MSVCR120.dll_free]
jmp 0x52a4a9
push 0x2a
jmp 0x52a577
mov ebx, dword [ebp - 0x10]
mov ecx, edi
mov edx, dword [edi + ebx*4 + 0x130]
call fcn.00511cd2
or dword [edi + ebx*4 + 0x130], 0xffffffff
xor edx, edx
mov eax, dword [esi + 0x90]
cmp eax, 0xc8
je 0x52a51b
push eax
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push esi
call fcn.005129bc
mov eax, dword [ebp - 0x30]
add esp, 0xc
test eax, eax
je 0x52a511
cmp dword [esi + 0xd4], 0
je 0x52a511
xor eax, eax
inc eax
mov dword [edi + 0x218], eax
and dword [edi + ebx*4 + 0x4a4], 0
jmp 0x52a575
mov dword [edi + ebx*4 + 0x4a4], 2
mov eax, dword [edi + 0x248]
test eax, eax
je 0x52a540
push eax
call dword [sym.imp.MSVCR120.dll_free]
xor edx, edx
pop ecx
mov dword [edi + 0x248], edx
xor eax, eax
mov dword [edi + 0x248], edx
inc eax
push str.Proxy_replied_OK_to_CONNECT_request_n
push esi
mov dword [esi + 0x8600], eax
call fcn.00512948
and dword [esi + 0xc8], 0
pop ecx
pop ecx
jmp 0x529ca4
push str.Proxy_CONNECT_aborted_due_to_timeout
push esi
call fcn.005129bc
pop ecx
pop ecx
push 0x38
pop eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret