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

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
push rbx
push rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0xb0
mov rbp, qword [rcx + 0x1a8]
mov rdi, qword [rcx]
xor ebx, ebx
xor eax, eax
xor esi, esi
cmp dword [rcx + 0x7d0], 2
mov qword [rsp + 0x68], rbp
mov r14d, r9d
mov r15, r8
mov r13, rcx
mov dword [rsp + 0x78], 0
mov qword [rsp + 0x58], 0
mov dword [rsp + 0x48], ebx
mov dword [rsp + 0x60], eax
mov dword [rsp + 0xf0], esi
je 0x1400ca7d7
mov qword [rsp + 0xa8], r12
mov dword [rcx + 0x300], eax
cmp dword [r13 + 0x7d0], 0
mov r12d, 1
jne 0x1400c9dfd
lea rdx, str.Establish_HTTP_proxy_tunnel_to__s:_hu_n
mov r9d, r14d
mov r8, r15
mov rcx, rdi
call fcn.1400b99e0
mov rcx, qword [rdi + 0x1e0]
test rcx, rcx
je 0x1400c9bde
call qword [sub.MSVCR120.dll_free]
mov qword [rdi + 0x1e0], 0
mov edx, 0x18
mov rcx, r12
call qword [sub.MSVCR120.dll_calloc]
mov rsi, rax
test rax, rax
je 0x1400ca657
lea rcx, str._s:_hu
mov r8d, r14d
mov rdx, r15
call fcn.1400be5e0
mov rbp, rax
test rax, rax
je 0x1400ca64e
lea rdx, str.CONNECT
mov r9d, r12d
mov r8, rax
mov rcx, r13
call fcn.1400c2c90
mov rcx, rbp
mov ebx, eax
call qword [sub.MSVCR120.dll_free]
test ebx, ebx
jne 0x1400ca677
cmp dword [r13 + 0x188], 1
mov r8, qword [rsp + 0x100]
lea rax, [0x1402664dc]
lea rcx, [0x1402667ec]
lea r12, [0x140266604]
lea r9, [0x1402ead48]
cmove r12, rax
mov eax, dword [r13 + 0x2c0]
lea rdx, [0x1402ead49]
test eax, eax
lea rax, [0x14026683c]
lea rbp, [0x1402ead45]
cmovne r9, rcx
lea rcx, str._s_s_s:_hu
cmovne rdx, rax
lea r15, [0x1402ead47]
mov dword [rsp + 0x20], r14d
call fcn.1400be5e0
mov r14, rax
test rax, rax
je 0x1400ca64e
lea rdx, str.Host:
mov rcx, r13
call fcn.1400c23c0
test rax, rax
jne 0x1400c9ce7
lea rcx, str.Host:__s_r_n
mov rdx, r14
call fcn.1400be5e0
mov rbp, rax
test rax, rax
je 0x1400ca645
lea rdx, [0x1402686f8]
mov rcx, r13
call fcn.1400c23c0
lea rbx, str.Proxy_Connection:_Keep_Alive_r_n
lea rdx, str.User_Agent:
test rax, rax
lea rax, [0x1402ead46]
mov rcx, r13
cmovne rbx, rax
call fcn.1400c23c0
test rax, rax
jne 0x1400c9d2f
cmp qword [rdi + 0x618], rax
je 0x1400c9d2f
mov r15, qword [r13 + 0x350]
mov rax, qword [r13 + 0x348]
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], r15
test rax, rax
lea rcx, [0x1402ead4a]
lea rdx, str.CONNECT__s_HTTP__s_r_n_s_s_s_s
cmovne rcx, rax
mov r9, r12
mov r8, r14
mov qword [rsp + 0x28], rcx
mov rcx, rsi
mov qword [rsp + 0x20], rbp
call fcn.1400c3380
mov ebx, eax
test rbp, rbp
je 0x1400c9d83
cmp byte [rbp], 0
je 0x1400c9d83
mov rcx, rbp
call qword [sub.MSVCR120.dll_free]
mov rcx, r14
call qword [sub.MSVCR120.dll_free]
test ebx, ebx
jne 0x1400ca661
mov r12d, 1
mov r8, rsi
mov rcx, r13
mov edx, r12d
call fcn.1400c39e0
mov ebx, eax
test eax, eax
jne 0x1400ca661
lea rdx, [0x14026685c]
mov rcx, rsi
call fcn.1400c3380
mov ebx, eax
test eax, eax
jne 0x1400ca661
lea r8, [rdi + 0x8b68]
xor r9d, r9d
mov rdx, r13
mov rcx, rsi
call fcn.1400c3160
mov ebx, eax
test eax, eax
jne 0x1400ca661
mov esi, dword [rsp + 0xf0]
mov rbp, qword [rsp + 0x68]
mov dword [r13 + 0x7d0], r12d
mov r8d, dword [rdi + 0x338]
mov edx, dword [rdi + 0x33c]
xor ecx, ecx
test r8d, r8d
mov ebx, 0x493e0
cmovg ecx, r12d
test edx, edx
jle 0x1400c9e1f
or ecx, 2
dec ecx
je 0x1400c9e3a
dec ecx
je 0x1400c9e36
dec ecx
jne 0x1400c9e3d
mov ebx, edx
cmp r8d, edx
cmovl ebx, r8d
jmp 0x1400c9e3d
mov ebx, edx
jmp 0x1400c9e3d
mov ebx, r8d
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
mov r9d, edx
shr r9d, 6
mov dword [rsp + 0x80], r9d
imul eax, r9d, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov rcx, qword [rdi + 0x7d0]
mov dword [rsp + 0x84], eax
mov r8, qword [rsp + 0x80]
mov rax, rcx
shr rax, 0x20
shr r8, 0x20
sub ecx, r9d
sub r8d, eax
mov eax, 0x10624dd3
imul r8d
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, ecx, 0x3e8
sub eax, edx
add ebx, eax
je 0x1400ca7bb
test ebx, ebx
jle 0x1400ca7bb
xor r9d, r9d
or r8, 0xffffffffffffffff
mov rcx, rbp
call fcn.1400b9290
test eax, eax
je 0x1400ca7b7
lea rax, [rdi + 0x880]
xor r12d, r12d
xor ebp, ebp
mov qword [rsp + 0x50], rax
mov rbx, rax
mov eax, 1
mov qword [rsp + 0x40], r12
xor r14d, r14d
mov r15d, eax
mov dword [rsp + 0xf8], eax
jmp 0x1400c9f05
mov eax, 1
test r15d, r15d
je 0x1400ca3d6
test esi, esi
jne 0x1400ca7ca
mov r8d, dword [rdi + 0x338]
mov edx, dword [rdi + 0x33c]
xor ecx, ecx
test r8d, r8d
mov esi, 0x493e0
cmovg ecx, eax
test edx, edx
jle 0x1400c9f37
or ecx, 2
dec ecx
je 0x1400c9f52
dec ecx
je 0x1400c9f4e
dec ecx
jne 0x1400c9f55
mov esi, edx
cmp r8d, edx
cmovl esi, r8d
jmp 0x1400c9f55
mov esi, edx
jmp 0x1400c9f55
mov esi, r8d
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
mov r9d, edx
shr r9d, 6
mov dword [rsp + 0x88], r9d
imul eax, r9d, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov rcx, qword [rdi + 0x7d0]
mov dword [rsp + 0x8c], eax
mov r8, qword [rsp + 0x88]
mov rax, rcx
shr rax, 0x20
shr r8, 0x20
sub ecx, r9d
sub r8d, eax
mov eax, 0x10624dd3
imul r8d
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, ecx, 0x3e8
sub eax, edx
add esi, eax
je 0x1400ca691
test esi, esi
jle 0x1400ca691
mov rcx, qword [rsp + 0x68]
mov r9d, 0x3e8
cmp esi, r9d
cmovl r9d, esi
or r8, 0xffffffffffffffff
call fcn.1400b9290
cmp eax, 0xffffffff
je 0x1400ca5b3
test eax, eax
je 0x1400ca3b2
mov rsi, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x68]
lea rax, [rsp + 0x70]
mov r9d, 0x4000
mov r8, rsi
mov rcx, r13
sub r9, r12
mov qword [rsp + 0x20], rax
call fcn.1400b9f80
cmp eax, 0x51
je 0x1400ca3c2
test eax, eax
je 0x1400ca044
xor r15d, r15d
mov dword [rsp + 0xf8], r15d
jmp 0x1400ca3b2
mov r12, qword [rsp + 0x70]
test r12, r12
jg 0x1400ca0a9
xor r15d, r15d
mov dword [rsp + 0xf8], r15d
cmp dword [rdi + 0x258], r15d
je 0x1400ca08a
cmp dword [rdi + 0x8a60], r15d
je 0x1400ca08a
lea rdx, str.Proxy_CONNECT_connection_closed
mov rcx, rdi
mov dword [r13 + 0x300], 1
call fcn.1400b99e0
jmp 0x1400ca3ad
lea rdx, str.Proxy_CONNECT_aborted
mov rcx, rdi
mov dword [rsp + 0xf0], 1
call fcn.1400b9ac0
jmp 0x1400ca3ad
add qword [rsp + 0x40], r12
cmp r15d, 1
jle 0x1400ca169
xor eax, eax
mov qword [rsp + 0x40], rax
lea rax, [rdi + 0x880]
mov rsi, rax
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x58]
test rax, rax
je 0x1400ca0fc
sub rax, r12
mov qword [rsp + 0x58], rax
test rax, rax
jg 0x1400ca3ad
xor r15d, r15d
mov dword [rsp + 0xf8], r15d
mov r12d, r15d
jmp 0x1400ca3b2
lea r9, [rsp + 0x90]
mov r8, r12
mov rdx, rsi
mov rcx, r13
mov qword [rsp + 0x90], 0
call fcn.1400d1770
mov rcx, rdi
cmp eax, 0xffffffff
jne 0x1400ca150
lea rdx, [0x140268840]
call fcn.1400b99e0
xor r15d, r15d
mov dword [r13 + 0x7d0], 2
mov dword [rsp + 0xf8], r15d
mov r12d, r15d
jmp 0x1400ca3b2
mov r8, qword [rsp + 0x90]
lea rdx, [0x140268858]
call fcn.1400b99e0
jmp 0x1400ca3ad
xor r15d, r15d
test r12, r12
jle 0x1400ca3a5
nop word [rax + rax]
inc ebp
inc r14
cmp byte [rsi], 0xa
jne 0x1400ca38e
cmp dword [rdi + 0x4f4], 0
je 0x1400ca1af
movsxd r9, ebp
mov r8, rbx
mov edx, 1
mov rcx, rdi
mov qword [rsp + 0x20], r13
call fcn.1400ba170
cmp dword [rdi + 0x4d8], 0
mov edx, 2
mov eax, 3
movsxd r9, ebp
mov r8, rbx
mov rcx, r13
cmovne edx, eax
call fcn.1400b9dc0
add dword [rdi + 0x8b64], ebp
add dword [rdi + 0xc0], ebp
test eax, eax
jne 0x1400ca7cf
movzx eax, byte [rbx]
cmp al, 0xd
je 0x1400ca419
cmp al, 0xa
je 0x1400ca419
add r14, rbx
lea rcx, str.WWW_Authenticate:
mov r8d, setsockopt
movzx ebp, byte [r14]
mov rdx, rbx
mov byte [r14], 0
call fcn.1400c97a0
test eax, eax
je 0x1400ca229
mov eax, dword [rdi + 0x128]
cmp eax, 0x191
je 0x1400ca24f
lea rcx, str.Proxy_authenticate:
mov r8d, reloc.WS2_32.dll_send
mov rdx, rbx
call fcn.1400c97a0
test eax, eax
je 0x1400ca295
mov eax, dword [rdi + 0x128]
cmp eax, 0x197
jne 0x1400ca295
xor esi, esi
cmp eax, 0x197
mov rcx, rbx
sete sil
call fcn.1400c24c0
mov rbx, rax
test rax, rax
je 0x1400ca657
mov r8, rax
mov edx, esi
mov rcx, r13
call fcn.1400c2dc0
mov rcx, rbx
mov esi, eax
call qword [sub.MSVCR120.dll_free]
test esi, esi
je 0x1400ca37d
mov eax, esi
jmp 0x1400ca7cf
lea rcx, str.Content_Length:
mov r8d, reloc.WS2_32.dll_ntohs
mov rdx, rbx
call fcn.1400c97a0
test eax, eax
je 0x1400ca2c8
xor edx, edx
lea rcx, [rbx + 0xf]
lea r8d, [rdx + 0xa]
call qword [sym.imp.MSVCR120.dll__strtoi64]
mov qword [rsp + 0x58], rax
jmp 0x1400ca382
lea r8, [0x140266bdc]
lea rdx, str.Connection:
mov rcx, rbx
call fcn.1400c3530
test eax, eax
je 0x1400ca2ef
mov dword [rsp + 0x48], 1
jmp 0x1400ca382
lea r8, str.chunked
lea rdx, str.Transfer_Encoding:
mov rcx, rbx
call fcn.1400c3530
test eax, eax
je 0x1400ca32c
lea rdx, str.CONNECT_responded_chunked_n
mov rcx, rdi
call fcn.1400b99e0
xor eax, eax
mov dword [rsp + 0x60], 1
mov qword [r13 + 0x1c], rax
mov qword [r13 + 0x30], rax
jmp 0x1400ca382
lea r8, str.close
lea rdx, str.Proxy_Connection:
mov rcx, rbx
call fcn.1400c3530
test eax, eax
je 0x1400ca350
mov dword [rsp + 0x48], 1
jmp 0x1400ca382
lea r9, [rdi + 0x128]
lea r8, [rsp + 0x78]
lea rdx, str.HTTP_1._d__d
mov rcx, rbx
call qword [sym.imp.MSVCR120.dll_sscanf]
cmp eax, 2
jne 0x1400ca37d
mov eax, dword [rdi + 0x128]
mov dword [rdi + 0x8b54], eax
mov rsi, qword [rsp + 0x50]
mov byte [r14], bpl
xor ebp, ebp
lea rbx, [rsi + 1]
xor r14d, r14d
inc r15d
inc rsi
movsxd rax, r15d
mov qword [rsp + 0x50], rsi
cmp rax, r12
jl 0x1400ca180
mov r15d, dword [rsp + 0xf8]
mov r12, qword [rsp + 0x40]
mov rcx, r13
call fcn.1400c6b40
test eax, eax
jne 0x1400ca687
mov esi, dword [rsp + 0xf0]
cmp r12, 0x4000
jb 0x1400c9f00
test esi, esi
jne 0x1400ca7ca
cmp dword [rdi + 0x8b54], 0xc8
je 0x1400ca5d2
mov rcx, r13
call fcn.1400c28f0
test eax, eax
jne 0x1400ca7cf
cmp dword [r13 + 0x2a8], eax
je 0x1400ca5d2
mov ebx, 1
mov dword [rsp + 0x48], ebx
jmp 0x1400ca5da
xor eax, eax
cmp dword [rdi + 0x128], 0x197
mov qword [rsp + 0x40], rax
lea rax, [rdi + 0x880]
mov qword [rsp + 0x50], rax
jne 0x1400ca555
cmp dword [rdi + 0x8a70], 0
jne 0x1400ca555
mov rsi, qword [rsp + 0x58]
mov dword [rsp + 0xf8], 2
test rsi, rsi
je 0x1400ca4a2
lea rdx, str.Ignore__lld_bytes_of_response_body_n
mov r8, rsi
mov rcx, rdi
call fcn.1400b99e0
movsxd rax, r15d
sub rax, r12
add rsi, rax
mov qword [rsp + 0x58], rsi
test rsi, rsi
jg 0x1400ca53d
xor r15d, r15d
mov dword [r13 + 0x7d0], 2
mov dword [rsp + 0xf8], r15d
jmp 0x1400ca3ad
mov eax, dword [rsp + 0x60]
test eax, eax
je 0x1400ca487
movsxd rax, r15d
mov r8, r12
lea rdx, str._zd_bytes_of_chunk_left_n
mov rcx, rdi
sub r8, rax
mov dword [rdi + 0x1d0], 1
call fcn.1400b99e0
cmp byte [rbx + 1], 0xa
jne 0x1400ca4d8
inc rbx
inc r15d
movsxd rax, r15d
lea rdx, [rbx + 1]
lea r9, [rsp + 0x70]
sub r12, rax
mov rcx, r13
mov r8, r12
call fcn.1400d1770
mov rcx, rdi
cmp eax, 0xffffffff
jne 0x1400ca52c
lea rdx, str.chunk_reading_DONE_n
call fcn.1400b99e0
xor r15d, r15d
mov dword [r13 + 0x7d0], 2
mov dword [rsp + 0xf8], r15d
mov dword [r13 + 0x7d0], 2
jmp 0x1400ca3ad
mov r8, qword [rsp + 0x70]
lea rdx, str.Read__zd_bytes_of_chunk__continue_n
call fcn.1400b99e0
mov r15d, dword [rsp + 0xf8]
mov dword [r13 + 0x7d0], 2
jmp 0x1400ca3ad
xor eax, eax
cmp dword [rdi + 0x8b54], 0xc8
mov dword [rsp + 0xf8], eax
jne 0x1400ca5a0
lea eax, [r15 + 1]
movsxd rcx, eax
sub r12, rcx
je 0x1400ca53d
lea rdx, str.Proxy_CONNECT_followed_by__zd_bytes_of_opaque_data._Data_ignored__known_bug_39_
mov r8, r12
mov rcx, rdi
call fcn.1400b9ac0
mov r15d, dword [rsp + 0xf8]
mov dword [r13 + 0x7d0], 2
jmp 0x1400ca3ad
mov r15d, eax
mov dword [r13 + 0x7d0], 2
jmp 0x1400ca3ad
lea rdx, str.Proxy_CONNECT_aborted_due_to_select_poll_error
mov rcx, rdi
mov dword [rsp + 0xf0], 1
call fcn.1400b9ac0
jmp 0x1400ca3b2
mov ebx, dword [rsp + 0x48]
test ebx, ebx
je 0x1400ca5e8
cmp qword [rdi + 0x1e0], 0
jne 0x1400ca69d
cmp qword [rdi + 0x1e0], 0
je 0x1400ca6b7
cmp dword [r13 + 0x7d0], 2
jne 0x1400ca61d
lea rdx, str.TUNNEL_STATE_switched_to:__d_n
xor r8d, r8d
mov rcx, rdi
mov dword [r13 + 0x7d0], 0
call fcn.1400b99e0
cmp qword [rdi + 0x1e0], 0
je 0x1400ca6b7
mov rbp, qword [rsp + 0x68]
mov r14d, dword [rsp + 0x108]
mov r15, qword [rsp + 0x100]
jmp 0x1400c9b98
mov rcx, r14
call qword [sub.MSVCR120.dll_free]
mov rcx, rsi
call qword [sub.MSVCR120.dll_free]
mov eax, 0x1b
jmp 0x1400ca7cf
lea rdx, str.Failed_sending_CONNECT_to_proxy
mov rcx, rdi
call fcn.1400b9ac0
mov eax, ebx
jmp 0x1400ca7cf
mov rcx, rsi
call qword [sub.MSVCR120.dll_free]
mov eax, ebx
jmp 0x1400ca7cf
mov eax, 0x2a
jmp 0x1400ca7cf
lea rdx, str.Proxy_CONNECT_aborted_due_to_timeout
jmp 0x1400ca7c2
mov rdx, qword [r13 + 0x1a8]
mov rcx, r13
call fcn.1400b7e90
mov qword [r13 + 0x1a8], 0xffffffffffffffff
cmp dword [rdi + 0x128], 0xc8
je 0x1400ca760
test ebx, ebx
je 0x1400ca6f1
cmp qword [rdi + 0x1e0], 0
je 0x1400ca6f1
lea rdx, str.Connect_me_again_please_n
mov rcx, rdi
mov dword [r13 + 0x300], 1
call fcn.1400b99e0
jmp 0x1400ca733
mov rcx, qword [rdi + 0x1e0]
test rcx, rcx
je 0x1400ca70e
call qword [sub.MSVCR120.dll_free]
mov qword [rdi + 0x1e0], 0
mov dword [r13 + 0x2a8], 1
mov rdx, qword [r13 + 0x1a8]
mov rcx, r13
call fcn.1400b7e90
mov qword [r13 + 0x1a8], 0xffffffffffffffff
mov dword [r13 + 0x7d0], 0
cmp dword [r13 + 0x300], 0
jne 0x1400ca7b7
mov r8d, dword [rdi + 0x128]
lea rdx, str.Received_HTTP_code__d_from_proxy_after_CONNECT
mov rcx, rdi
call fcn.1400b9ac0
jmp 0x1400ca7ca
mov dword [r13 + 0x7d0], 2
mov rcx, qword [r13 + 0x348]
test rcx, rcx
je 0x1400ca788
call qword [sub.MSVCR120.dll_free]
xor ebx, ebx
mov qword [r13 + 0x348], rbx
jmp 0x1400ca78a
xor ebx, ebx
mov qword [r13 + 0x348], rbx
lea rdx, str.Proxy_replied_OK_to_CONNECT_request_n
mov rcx, rdi
mov dword [rdi + 0x8a64], 1
call fcn.1400b99e0
mov dword [rdi + 0x1d0], ebx
mov dword [r13 + 0x2e4], ebx
xor eax, eax
jmp 0x1400ca7cf
lea rdx, [0x140268788]
mov rcx, rdi
call fcn.1400b9ac0
mov eax, 0x38
mov r12, qword [rsp + 0xa8]
add rsp, 0xb0
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret