Function at 0x10012547
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebx]
push edi
xor edi, edi
mov dword [ebp - 0x3c], edi
mov eax, dword [esi + 0x19c]
mov dword [ebp - 0x28], eax
cmp eax, edi
jne 0x1001256e
mov dword [ebp - 0x28], 0x36ee80
mov eax, dword [ebp + 0xc]
lea ecx, [ebx + eax*4 + 0x130]
lea eax, [ebx + eax*4 + 0x510]
cmp dword [eax], 2
mov dword [ebp - 0x38], ecx
mov ecx, dword [ecx]
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x30], eax
je 0x10012dc6
mov dword [ebx + 0x21c], edi
cmp dword [eax], edi
jne 0x100127f0
movzx eax, word [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push str.Establish_HTTP_proxy_tunnel_to__s:_hu_n
push esi
call fcn.100178f2
lea edi, [esi + 0xd4]
mov eax, dword [edi]
add esp, 0x10
test eax, eax
je 0x100125dc
push eax
call fcn.100e4180
and dword [edi], 0
pop ecx
call fcn.1000e779
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x100125f0
push 0x1b
pop eax
jmp 0x10012dc8
movzx eax, word [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push str._s:_hu
call fcn.10014079
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x10012616
push dword [ebp - 0xc]
call fcn.100e4180
pop ecx
jmp 0x100125e8
push 1
push edi
push str.CONNECT
push ebx
call fcn.1000e2c3
push edi
mov dword [ebp - 8], eax
call fcn.100e4180
add esp, 0x14
cmp dword [ebp - 8], 0
jne 0x100127c8
cmp dword [ebx + 0x114], 1
mov edi, 0x101037e1
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], 0x101042d8
je 0x1001265f
mov dword [ebp - 0x10], 0x101042dc
mov eax, dword [ebx + 0x1dc]
mov edx, 0x10104438
test eax, eax
jne 0x100126cc
mov edx, edi
mov ecx, edi
movzx eax, word [ebp + 0x14]
push eax
push edx
push dword [ebp + 0x10]
push ecx
push str._s_s_s:_hu
call fcn.10014079
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x1001260b
push str.Host:
push esi
call fcn.1000dd48
pop ecx
pop ecx
test eax, eax
jne 0x100126d3
push ebx
push str.Host:__s_r_n
call fcn.10014079
pop ecx
pop ecx
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x100126d3
push ebx
call fcn.100e4180
push dword [ebp - 0xc]
call fcn.100e4180
pop ecx
jmp 0x10012613
mov ecx, 0x10104424
jmp 0x10012672
push str.Proxy_Connection:
push esi
call fcn.1000dd48
pop ecx
pop ecx
test eax, eax
jne 0x100126eb
mov dword [ebp - 0x18], str.Proxy_Connection:_Keep_Alive_r_n
push str.User_Agent:
push esi
call fcn.1000dd48
pop ecx
pop ecx
test eax, eax
jne 0x10012710
cmp dword [esi + 0x3a8], eax
je 0x10012710
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x250]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x24c]
test eax, eax
je 0x1001271f
mov edi, eax
push dword [ebp - 0x18]
push dword [ebp - 0x14]
push edi
push dword [ebp - 0x1c]
push dword [ebp - 0x10]
push ebx
push str.CONNECT__s_HTTP__s_r_n_s_s_s_s
push dword [ebp - 0xc]
call fcn.1000eed7
add esp, 0x20
cmp dword [ebp - 0x1c], 0
mov dword [ebp - 8], eax
je 0x10012755
mov eax, dword [ebp - 0x1c]
cmp byte [eax], 0
je 0x10012755
push eax
call fcn.100e4180
pop ecx
push ebx
call fcn.100e4180
xor edi, edi
pop ecx
cmp dword [ebp - 8], edi
jne 0x100127a9
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.1000f009
pop ecx
pop ecx
mov dword [ebp - 8], eax
cmp eax, edi
jne 0x100127a9
push 0x10103c98
push dword [ebp - 0xc]
call fcn.1000eed7
pop ecx
pop ecx
mov dword [ebp - 8], eax
cmp eax, edi
jne 0x100127a9
push dword [ebp + 0xc]
lea eax, [esi + 0x8f2c]
push edi
push eax
push dword [ebp + 8]
push dword [ebp - 0xc]
call fcn.1000e786
add esp, 0x14
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], edi
cmp dword [ebp - 8], edi
je 0x100127e2
push str.Failed_sending_CONNECT_to_proxy
push esi
mov dword [esi + 0x8fbc], 1
call fcn.1001795c
pop ecx
pop ecx
cmp dword [ebp - 0xc], 0
je 0x100127d7
push dword [ebp - 0xc]
call fcn.100e4180
pop ecx
mov eax, dword [ebp - 8]
test eax, eax
jne 0x10012dc8
mov eax, dword [ebp - 0x30]
mov ebx, dword [ebp + 8]
mov dword [eax], 1
xor edi, edi
push dword [ebx + 0x124]
push dword [ebx + 0x120]
call fcn.1001d007
push edx
push eax
call fcn.1001d01d
mov ecx, dword [ebp - 0x28]
sub ecx, eax
add esp, 0x10
test ecx, ecx
jg 0x10012828
push str.Proxy_CONNECT_aborted_due_to_timeout
push esi
call fcn.1001795c
pop ecx
pop ecx
push 0x38
jmp 0x100125ea
cmp dword [esi + 0x550], 2
jne 0x10012855
cmp dword [esi + 0x8fb8], edi
jne 0x10012dc6
push edi
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp - 0x2c]
call fcn.1001737b
add esp, 0x10
test eax, eax
je 0x10012dc6
lea eax, [esi + 0x56c]
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x1c], edi
mov dword [ebp + 0xc], edi
mov dword [ebp - 0xc], 1
cmp dword [ebp - 0xc], edi
je 0x10012cdc
cmp dword [ebp - 0x24], edi
jne 0x10012821
push dword [ebx + 0x124]
push dword [ebx + 0x120]
call fcn.1001d007
push edx
push eax
call fcn.1001d01d
mov ecx, dword [ebp - 0x28]
sub ecx, eax
add esp, 0x10
cmp ecx, edi
jle 0x10012814
mov eax, 0x3e8
cmp ecx, eax
jl 0x100128af
mov ecx, eax
push ecx
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp - 0x2c]
call fcn.1001737b
add esp, 0x10
cmp eax, 0xffffffff
je 0x10012cac
cmp eax, edi
je 0x10012cc0
lea eax, [ebp - 0x18]
push eax
mov eax, 0x4000
sub eax, dword [ebp - 0x1c]
push eax
push dword [ebp - 0x14]
push dword [ebp - 0x2c]
push ebx
call fcn.100176ca
add esp, 0x14
mov dword [ebp - 8], eax
cmp eax, 0x51
je 0x10012ccf
cmp eax, edi
je 0x10012908
mov dword [esi + 0x8fbc], 1
jmp 0x10012981
mov ecx, dword [ebp - 0x18]
cmp ecx, edi
jg 0x10012947
mov dword [ebp - 0xc], edi
cmp dword [esi + 0x118], edi
je 0x10012931
cmp dword [esi + 0x8e60], edi
je 0x10012931
mov dword [ebx + 0x21c], 1
jmp 0x10012cc0
xor eax, eax
inc eax
mov dword [ebp - 0x24], eax
mov dword [esi + 0x8fbc], eax
push str.Proxy_CONNECT_aborted
jmp 0x10012cb8
add dword [ebp - 0x1c], ecx
cmp dword [ebp - 0xc], 1
jle 0x100129c8
lea eax, [esi + 0x56c]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x44]
or eax, dword [ebp - 0x40]
mov dword [ebp - 0x1c], edi
je 0x10012989
mov eax, ecx
cdq
sub dword [ebp - 0x44], eax
sbb dword [ebp - 0x40], edx
cmp dword [ebp - 0x40], edi
jg 0x10012cc0
jl 0x10012981
cmp dword [ebp - 0x44], edi
ja 0x10012cc0
mov dword [ebp - 0xc], edi
jmp 0x10012cc0
lea eax, [ebp - 0x10]
push eax
push ecx
push dword [ebp - 0x14]
mov dword [ebp - 0x10], edi
push ebx
call fcn.100113cd
add esp, 0x10
cmp eax, 0xffffffff
jne 0x100129b5
push str.chunk_reading_DONE_n
push esi
call fcn.100178f2
mov dword [ebp - 0xc], edi
jmp 0x10012cbe
push dword [ebp - 0x10]
push str.Read__zd_bytes_of_chunk__continue_n
push esi
call fcn.100178f2
jmp 0x10012ca7
cmp ecx, edi
mov dword [ebp - 0x10], edi
jle 0x10012cc0
mov eax, dword [ebp - 0x14]
inc dword [ebp + 0xc]
cmp byte [eax], 0xa
jne 0x10012bb3
cmp dword [esi + 0x2e4], edi
je 0x100129fc
push ebx
push dword [ebp + 0xc]
push dword [ebp - 4]
push 1
push esi
call fcn.1001783e
add esp, 0x14
push 2
pop eax
cmp dword [esi + 0x2c8], edi
je 0x10012a0a
push 3
pop eax
push dword [ebp + 0xc]
push dword [ebp - 4]
push eax
push ebx
call fcn.10017b41
add esp, 0x10
mov dword [ebp - 8], eax
cmp eax, edi
jne 0x10012d7a
mov eax, dword [ebp - 4]
mov al, byte [eax]
cmp al, 0xd
je 0x10012bca
cmp al, 0xa
je 0x10012bca
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0xc]
lea edi, [ecx + eax]
mov al, byte [edi]
push str.WWW_Authenticate:
mov byte [ebp + 0xf], al
mov byte [edi], 0
call fcn.100e2420
push eax
push dword [ebp - 4]
push str.WWW_Authenticate:
call fcn.100172ef
add esp, 0x10
test eax, eax
je 0x10012a77
mov eax, dword [esi + 0x90]
cmp eax, 0x191
je 0x10012aa3
push str.Proxy_authenticate:
call fcn.100e2420
push eax
push dword [ebp - 4]
push str.Proxy_authenticate:
call fcn.100172ef
add esp, 0x10
test eax, eax
je 0x10012ac0
mov eax, dword [esi + 0x90]
cmp eax, 0x197
jne 0x10012ac0
push dword [ebp - 4]
push eax
push ebx
call fcn.1000e3c2
add esp, 0xc
mov dword [ebp - 8], eax
test eax, eax
jne 0x10012dc8
jmp 0x10012b9e
push str.Content_Length:
call fcn.100e2420
push eax
push dword [ebp - 4]
push str.Content_Length:
call fcn.100172ef
add esp, 0x10
test eax, eax
je 0x10012b05
push 0xa
push 0
push str.Content_Length:
call fcn.100e2420
add eax, dword [ebp - 4]
pop ecx
push eax
call fcn.100e28da
add esp, 0xc
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], edx
jmp 0x10012b9e
push str.close
push str.Connection:
push dword [ebp - 4]
call fcn.1000e9da
add esp, 0xc
test eax, eax
jne 0x10012b6d
push str.chunked
push str.Transfer_Encoding:
push dword [ebp - 4]
call fcn.1000e9da
add esp, 0xc
test eax, eax
je 0x10012b54
push str.CONNECT_responded_chunked_n
push esi
call fcn.100178f2
push ebx
mov dword [ebp - 0x34], 1
call fcn.100113b9
add esp, 0xc
jmp 0x10012b9e
push str.close
push str.Proxy_Connection:
push dword [ebp - 4]
call fcn.1000e9da
add esp, 0xc
test eax, eax
je 0x10012b76
mov dword [ebp - 0x20], 1
jmp 0x10012b9e
lea ebx, [esi + 0x90]
push ebx
lea eax, [ebp - 0x3c]
push eax
push str.HTTP_1._d__d
push dword [ebp - 4]
call fcn.100e2cc2
add esp, 0x10
cmp eax, 2
jne 0x10012b9e
mov eax, dword [ebx]
mov dword [esi + 0x8f18], eax
mov al, byte [ebp + 0xf]
and dword [ebp + 0xc], 0
mov ebx, dword [ebp + 8]
mov byte [edi], al
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 4], eax
xor edi, edi
inc dword [ebp - 0x14]
inc dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x18]
jl 0x100129d3
jmp 0x10012cc0
cmp dword [esi + 0x90], 0x197
lea eax, [esi + 0x56c]
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x14], eax
jne 0x10012c81
cmp dword [esi + 0x8e74], edi
jne 0x10012c81
mov eax, dword [ebp - 0x44]
or eax, dword [ebp - 0x40]
mov dword [ebp - 0xc], 2
je 0x10012c20
push dword [ebp - 0x40]
push dword [ebp - 0x44]
push str.Ignore__lld_bytes_of_response_body_n
push esi
call fcn.100178f2
mov eax, dword [ebp - 0x18]
add esp, 0x10
sub eax, dword [ebp - 0x10]
jmp 0x10012966
cmp dword [ebp - 0x34], edi
je 0x10012981
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x10]
mov dword [esi + 0xc8], 1
push eax
push str._zd_bytes_of_chunk_left_n
push esi
call fcn.100178f2
mov eax, dword [ebp - 4]
add esp, 0xc
inc eax
cmp byte [eax], 0xa
jne 0x10012c57
inc dword [ebp - 0x10]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 4]
inc eax
push eax
push ebx
call fcn.100113cd
add esp, 0x10
cmp eax, 0xffffffff
je 0x100129a2
push dword [ebp - 0x18]
jmp 0x100129b8
cmp dword [esi + 0x8f18], 0xc8
mov dword [ebp - 0xc], edi
jne 0x10012cc0
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x10]
dec eax
cmp eax, edi
je 0x10012cc0
push eax
push str.Proxy_CONNECT_followed_by__zd_bytes_of_opaque_data._Data_ignored__known_bug_39_
push esi
call fcn.1001795c
add esp, 0xc
jmp 0x10012cc0
mov dword [ebp - 0x24], 1
push str.Proxy_CONNECT_aborted_due_to_select_poll_error
push esi
call fcn.1001795c
pop ecx
pop ecx
push ebx
call fcn.10016e0f
pop ecx
test eax, eax
jne 0x10012d7f
cmp dword [ebp - 0x1c], 0x4000
jb 0x1001286e
cmp dword [ebp - 0x24], edi
jne 0x10012821
cmp dword [esi + 0x8f18], 0xc8
je 0x10012d1d
cmp dword [esi + 0x8fbc], edi
jne 0x10012d03
push ebx
call fcn.1000ed22
pop ecx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
cmp eax, edi
jne 0x10012dc8
cmp dword [ebx + 0x1c4], edi
je 0x10012d1d
mov dword [ebp - 0x20], 1
cmp dword [ebp - 0x20], edi
je 0x10012d3d
cmp dword [esi + 0xd4], edi
je 0x10012d3d
mov eax, dword [ebp - 0x38]
push dword [eax]
push ebx
call fcn.10008e37
mov eax, dword [ebp - 0x38]
or dword [eax], 0xffffffff
pop ecx
pop ecx
mov eax, dword [esi + 0x90]
cmp eax, 0xc8
je 0x10012d86
push eax
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push esi
call fcn.1001795c
add esp, 0xc
cmp dword [ebp - 0x20], edi
je 0x10012d70
cmp dword [esi + 0xd4], edi
je 0x10012d70
mov dword [ebx + 0x21c], 1
mov eax, dword [ebp - 0x30]
mov dword [eax], edi
jmp 0x10012821
mov eax, dword [ebp - 8]
jmp 0x10012dc8
push 0x2a
jmp 0x100125ea
mov eax, dword [ebp - 0x30]
lea edi, [ebx + 0x24c]
mov dword [eax], 2
mov eax, dword [edi]
test eax, eax
je 0x10012da5
push eax
call fcn.100e4180
and dword [edi], 0
pop ecx
and dword [edi], 0
push str.Proxy_replied_OK_to_CONNECT_request_n
push esi
mov dword [esi + 0x8e64], 1
call fcn.100178f2
and dword [esi + 0xc8], 0
pop ecx
pop ecx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret