Function at 0x18016a490
Capabilities:
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 r12
push r13
push r14
push r15
sub rsp, 0x98
mov r13, qword [rcx + 0x18]
mov rbp, r8
mov dword [rsp + 0x40], 0
mov rbx, rcx
movsxd rax, edx
mov qword [rsp + 0x48], r13
mov r15, qword [r13 + 0x7f8]
lea rax, [rax*8 + 0x1e8]
add rax, r13
mov qword [rsp + 0x80], rax
mov rsi, qword [rax]
mov rax, qword [rcx + 0x1b0]
mov qword [rsp + 0x30], rsi
test r15, r15
je 0x18016b007
lea r12, [r15 + 0x288]
cmp dword [r12], 2
jge 0x18016b007
add rax, 0x200
mov byte [r13 + 0x3d0], 0
mov qword [rsp + 0x68], rax
lea r14, [rcx + 0x198]
mov rdi, rax
nop dword [rax]
cmp dword [r12], 0
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x58], rdi
jne 0x18016a7be
mov r8, rbp
lea rdx, str.Establish_HTTP_proxy_tunnel_to__s:_d
mov rcx, rbx
lea rsi, [r15 + 0x250]
call fcn.180161f70
mov rcx, qword [r14]
lea r8, str.C:Dev_vcpkg_buildtreescurl_srcurl_7_81_0_459d17a9d2.cleanlibhttp_proxy.c
mov edx, 0x12a
call fcn.180167220
mov edx, 0x100000
mov qword [r14], 0
mov rcx, rsi
call fcn.180156240
movzx eax, byte [r13 + 0x3d8]
xor r14d, r14d
cmp rbp, qword [r13 + 0xa0]
je 0x18016a5ac
lea edx, [r14 + 0x3a]
mov rcx, rbp
call sub.VCRUNTIME140.dll_strchr
test rax, rax
setne al
test al, al
lea rcx, [0x1801f8fc4]
lea rax, [0x1801f8fc8]
mov r8, rbp
lea r9, [0x1801eee46]
cmovne r9, rcx
lea rdx, [0x1801eee46]
cmovne rdx, rax
lea rcx, str._s_s_s:_d
mov eax, dword [rsp + 0xf8]
mov dword [rsp + 0x20], eax
call fcn.180168ed0
mov rbp, rax
test rax, rax
je 0x18016ae52
lea r8, str.Host
mov rdx, r13
mov rcx, rbx
call fcn.180170c10
test rax, rax
jne 0x18016a62a
mov rdx, rbp
lea rcx, str.Host:__s_r_n
call fcn.180168ed0
mov r14, rax
test rax, rax
je 0x18016ae3e
mov byte [rsp + 0x28], 1
lea r8, str.CONNECT
xor r9d, r9d
mov qword [rsp + 0x20], rbp
mov rdx, r13
mov rcx, rbx
call fcn.180173180
mov edi, eax
test eax, eax
jne 0x18016a777
cmp dword [r13 + 0x13c], 1
lea rax, [0x1801c3a08]
lea r9, [0x1801c3a0c]
mov r8, rbp
cmove r9, rax
lea rcx, [0x1801eee46]
mov rax, qword [rbx + 0x1278]
lea rdx, str.CONNECT__s_HTTP__s_r_n_s_s
test rax, rax
cmovne rcx, rax
test r14, r14
mov qword [rsp + 0x28], rcx
lea rax, [0x1801eee46]
cmovne rax, r14
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.1801561d0
mov edi, eax
test eax, eax
jne 0x18016a768
lea r8, str.User_Agent
mov rdx, r13
mov rcx, rbx
call fcn.180170c10
test rax, rax
jne 0x18016a6ee
mov r8, qword [rbx + 0x8c8]
test r8, r8
je 0x18016a6ee
lea rdx, str.User_Agent:__s_r_n
mov rcx, rsi
call fcn.1801561d0
mov edi, eax
test eax, eax
jne 0x18016a768
lea r8, str.Proxy_Connection
mov rdx, r13
mov rcx, rbx
call fcn.180170c10
test rax, rax
jne 0x18016a71a
lea rdx, str.Proxy_Connection:_Keep_Alive_r_n
mov rcx, rsi
call fcn.1801561b0
mov edi, eax
test eax, eax
jne 0x18016a768
mov r8, rsi
mov dl, 1
mov rcx, rbx
call fcn.180170470
mov edi, eax
test eax, eax
jne 0x18016a768
lea rdx, [0x1801ef314]
mov rcx, rsi
call fcn.1801561b0
mov edi, eax
test eax, eax
jne 0x18016a768
mov eax, dword [rsp + 0xe8]
lea r8, [rbx + 0x1370]
xor r9d, r9d
mov dword [rsp + 0x20], eax
mov rdx, rbx
mov rcx, rsi
call fcn.180170940
mov edi, eax
test eax, eax
je 0x18016a777
lea rdx, str.Failed_sending_CONNECT_to_proxy
mov rcx, rbx
call fcn.180161e00
lea r8, str.C:Dev_vcpkg_buildtreescurl_srcurl_7_81_0_459d17a9d2.cleanlibhttp_proxy.c
mov edx, 0x15e
mov rcx, r14
call fcn.180167220
lea r8, str.C:Dev_vcpkg_buildtreescurl_srcurl_7_81_0_459d17a9d2.cleanlibhttp_proxy.c
mov edx, 0x15f
mov rcx, rbp
call fcn.180167220
test edi, edi
jne 0x18016ae5c
mov rdi, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x30]
mov qword [rsp + 0x58], rdi
mov dword [r12], 1
mov r8b, 1
xor edx, edx
mov rcx, rbx
call fcn.1801637a0
test rax, rax
jle 0x18016b024
mov edx, dword [rsp + 0xe8]
mov rcx, r13
call fcn.1801628d0
test al, al
jne 0x18016a7f0
cmp dword [rdi], 0
je 0x18016b007
cmp dword [rdi], 1
jne 0x18016a849
mov r9, qword [r15 + 0x270]
test r9, r9
jne 0x18016ae63
mov rax, qword [rbx + 0xd40]
lea r8, [rsp + 0x70]
mov qword [rbx + 0x1a8], rax
mov rcx, rbx
mov edx, dword [rbx + 0x738]
call fcn.18016b550
test eax, eax
jne 0x18016b009
mov r9, qword [rsp + 0x70]
mov qword [r15 + 0x270], r9
test r9, r9
jne 0x18016ae63
xor ebp, ebp
mov dword [rdi], ebp
jmp 0x18016a84b
xor ebp, ebp
cmp dword [r15 + 0x278], 0
mov r13d, ebp
je 0x18016ad2b
nop dword [rax]
lea rax, [rsp + 0x50]
mov r9d, 1
lea r8, [rsp + 0xe0]
mov qword [rsp + 0x20], rax
mov rdx, rsi
mov rcx, rbx
call fcn.180162010
mov edi, eax
cmp eax, 0x51
je 0x18016b007
mov rcx, rbx
call fcn.180175490
test eax, eax
jne 0x18016b01d
test edi, edi
jne 0x18016ad24
cmp qword [rsp + 0x50], 0
jle 0x18016acd6
cmp dword [r15 + 0x278], 2
jne 0x18016a942
mov rax, qword [r15 + 0x280]
test rax, rax
je 0x18016a8ec
dec rax
mov qword [r15 + 0x280], rax
test rax, rax
jg 0x18016abcf
mov dword [r12], 2
jmp 0x18016ad24
lea rax, [rsp + 0x60]
mov qword [rsp + 0x78], rbp
lea r9, [rsp + 0x78]
mov qword [rsp + 0x20], rax
mov r8d, 1
lea rdx, [rsp + 0xe0]
mov rcx, rbx
call fcn.180194980
cmp eax, 0xffffffff
jne 0x18016abcf
lea rdx, str.chunk_reading_DONE
mov rcx, rbx
call fcn.180161f70
mov dword [r15 + 0x278], ebp
mov dword [r12], 2
jmp 0x18016abcf
mov r8d, 1
lea rdx, [rsp + 0xe0]
lea rcx, [r15 + 0x230]
call fcn.180156200
test eax, eax
jne 0x18016aec5
cmp byte [rsp + 0xe0], 0xa
jne 0x18016abcf
lea rcx, [r15 + 0x230]
call fcn.180156270
lea rcx, [r15 + 0x230]
mov rdi, rax
call fcn.180156260
mov r9, rax
mov r8, rdi
mov edx, 1
mov rcx, rbx
mov rsi, rax
call fcn.180161d30
cmp byte [rbx + 0xb4a], 0
jne 0x18016a9d1
cmp byte [rbx + 0xb31], 0
mov edx, ebp
mov r9, rsi
mov r8, rdi
setne dl
mov rcx, rbx
add edx, 2
call fcn.180161d20
test eax, eax
jne 0x18016b009
movsxd rax, esi
add qword [rbx + 0x1368], rax
movzx eax, byte [rdi]
cmp al, 0xd
je 0x18016abe2
cmp al, 0xa
je 0x18016abe2
mov r8d, reloc.WS2_32.dll_recvfrom
lea rcx, str.WWW_Authenticate:
mov rdx, rdi
call fcn.180167bc0
lea rsi, [rbx + 0x158]
test eax, eax
je 0x18016aa18
mov ebp, dword [rsi]
cmp ebp, 0x191
je 0x18016aa3b
mov r8d, reloc.WS2_32.dll_send
lea rcx, str.Proxy_authenticate:
mov rdx, rdi
call fcn.180167bc0
test eax, eax
je 0x18016aa88
mov ebp, dword [rsi]
cmp ebp, 0x197
jne 0x18016aa88
mov rcx, rdi
call fcn.180170da0
mov rdi, rax
test rax, rax
je 0x18016ae52
cmp ebp, 0x197
mov r8, rax
mov rcx, rbx
sete dl
call fcn.180172d90
lea r8, str.C:Dev_vcpkg_buildtreescurl_srcurl_7_81_0_459d17a9d2.cleanlibhttp_proxy.c
mov edx, 0x245
mov rcx, rdi
mov esi, eax
call fcn.180167220
test esi, esi
je 0x18016abbc
mov eax, esi
jmp 0x18016b009
mov r8d, reloc.WS2_32.dll_ntohs
lea rcx, str.Content_Length:
mov rdx, rdi
call fcn.180167bc0
test eax, eax
je 0x18016aadf
mov r8d, dword [rsi]
lea eax, [r8 - 0xc8]
cmp eax, 0x64
jae 0x18016aac4
lea rdx, str.Ignoring_Content_Length_in_CONNECT__03d_response
mov rcx, rbx
call fcn.180161f70
jmp 0x18016abbc
xor edx, edx
lea r9, [r15 + 0x280]
lea rcx, [rdi + 0xf]
lea r8d, [rdx + 0xa]
call fcn.180177460
jmp 0x18016abbc
lea r8, str.close
mov rcx, rdi
lea rdx, str.Connection:
call fcn.180170cb0
test al, al
jne 0x18016abb4
mov r8d, reloc.WS2_32.dll_select
lea rcx, str.Transfer_Encoding:
mov rdx, rdi
call fcn.180167bc0
test eax, eax
je 0x18016ab74
mov r8d, dword [rsi]
lea eax, [r8 - 0xc8]
cmp eax, 0x64
jae 0x18016ab39
lea rdx, str.Ignoring_Transfer_Encoding_in_CONNECT__03d_response
mov rcx, rbx
call fcn.180161f70
jmp 0x18016abbc
lea r8, str.chunked
mov rcx, rdi
lea rdx, str.Transfer_Encoding:
call fcn.180170cb0
test al, al
je 0x18016abbc
lea rdx, str.CONNECT_responded_chunked
mov rcx, rbx
call fcn.180161f70
mov rcx, rbx
mov byte [r15 + 0x28c], 1
call fcn.180194960
jmp 0x18016abbc
lea r8, str.close
mov rcx, rdi
lea rdx, str.Proxy_Connection:
call fcn.180170cb0
test al, al
jne 0x18016abb4
mov r9, rsi
lea r8, [rsp + 0x40]
lea rdx, str.HTTP_1._d__d
mov rcx, rdi
call fcn.180016680
cmp eax, 2
jne 0x18016abbc
mov eax, dword [rsi]
mov dword [rbx + 0x1354], eax
jmp 0x18016abbc
mov byte [r15 + 0x28d], 1
lea rcx, [r15 + 0x230]
call fcn.180156280
xor ebp, ebp
mov rsi, qword [rsp + 0x30]
cmp dword [r15 + 0x278], 0
jne 0x18016a860
jmp 0x18016ad2b
cmp dword [rbx + 0x158], 0x197
jne 0x18016acac
cmp byte [rbx + 0x12ee], 0
jne 0x18016acac
lea rsi, [r15 + 0x280]
mov dword [r15 + 0x278], 2
mov r8, qword [rsi]
test r8, r8
je 0x18016ac31
lea rdx, str.Ignore__I64d_bytes_of_response_body
mov rcx, rbx
call fcn.180161f70
mov eax, dword [r15 + 0x278]
jmp 0x18016aca2
cmp byte [r15 + 0x28c], 0
je 0x18016ac99
lea rdx, str.Ignore_chunked_response_body
mov rcx, rbx
call fcn.180161f70
lea rax, [rdi + 1]
mov byte [rbx + 0x1c3], 1
cmp byte [rax], 0xa
lea r9, [rsp + 0x50]
mov r8d, 1
mov rcx, rbx
cmove rdi, rax
lea rax, [rsp + 0x64]
mov qword [rsp + 0x20], rax
lea rdx, [rdi + 1]
call fcn.180194980
cmp eax, 0xffffffff
jne 0x18016ac28
lea rdx, str.chunk_reading_DONE
mov rcx, rbx
call fcn.180161f70
mov dword [r12], 2
mov eax, ebp
mov dword [r15 + 0x278], ebp
test eax, eax
jne 0x18016abca
jmp 0x18016acba
mov dword [r15 + 0x278], ebp
lea rsi, [r15 + 0x280]
cmp qword [rsi], 0
mov rsi, qword [rsp + 0x30]
jne 0x18016abcf
mov dword [r12], 2
jmp 0x18016abcf
cmp dword [rbx + 0x218], 0
je 0x18016ad0f
cmp dword [rbx + 0xe68], 0
je 0x18016ad0f
cmp qword [rbx + 0x1278], 0
je 0x18016ad0f
mov rax, qword [rsp + 0x48]
lea rdx, str.Proxy_CONNECT_connection_closed
mov rcx, rbx
mov byte [rax + 0x3d0], 1
call fcn.180161f70
jmp 0x18016ad24
lea rdx, str.Proxy_CONNECT_aborted
mov rcx, rbx
mov r13d, 1
call fcn.180161e00
mov dword [r15 + 0x278], ebp
mov rcx, rbx
call fcn.180175490
test eax, eax
jne 0x18016b01d
test r13d, r13d
jne 0x18016aed4
mov eax, dword [rbx + 0x1354]
sub eax, 0xc8
cmp eax, 0x64
jb 0x18016ad7c
mov rcx, rbx
call fcn.180170eb0
test eax, eax
jne 0x18016b009
mov r13, qword [rsp + 0x48]
cmp byte [r13 + 0x3d1], al
je 0x18016ad81
mov byte [r15 + 0x28d], 1
jmp 0x18016ad81
mov r13, qword [rsp + 0x48]
cmp byte [r15 + 0x28d], 0
je 0x18016ad9f
mov r14, qword [rsp + 0x38]
cmp qword [r14], 0
jne 0x18016aede
mov rsi, r14
jmp 0x18016ae15
mov rsi, qword [rsp + 0x38]
mov r14, rsi
cmp qword [rsi], 0
je 0x18016aefd
cmp dword [r12], 2
jne 0x18016ae15
mov rdi, qword [rbx + 0x18]
mov r8, qword [rdi + 0x418]
test dword [r8 + 0x8c], 0x4000
je 0x18016ade4
mov r8, qword [r8]
lea rdx, str._s_cannot_be_done_over_CONNECT
mov rcx, rbx
call fcn.180161e00
jmp 0x18016ae15
mov rdi, qword [rdi + 0x7f8]
lea rcx, [rdi + 0x230]
call fcn.180156280
mov dword [rdi + 0x288], ebp
mov dword [rdi + 0x278], 1
mov qword [rdi + 0x280], rbp
mov byte [rdi + 0x28d], 0
cmp qword [rsi], 0
je 0x18016aefd
mov rdi, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x30]
mov rbp, qword [rsp + 0xf0]
mov r9d, dword [rsp + 0xf8]
jmp 0x18016a530
lea r8, str.C:Dev_vcpkg_buildtreescurl_srcurl_7_81_0_459d17a9d2.cleanlibhttp_proxy.c
mov edx, 0xfb
mov rcx, rbp
call fcn.180167220
mov eax, 0x1b
jmp 0x18016b009
mov eax, edi
jmp 0x18016b009
mov r8, qword [rbx + 0x1a8]
lea rax, [rsp + 0xe0]
mov rdx, qword [r13 + 0x440]
mov rcx, rbx
mov qword [rsp + 0x20], rax
call fcn.180162480
mov ecx, eax
test eax, eax
jne 0x18016aea8
mov r9, qword [rsp + 0xe0]
lea edx, [rax + 2]
mov r8, qword [rbx + 0x1a8]
mov rcx, rbx
call fcn.180161d30
mov ecx, eax
mov rax, qword [rsp + 0xe0]
sub qword [r15 + 0x270], rax
add qword [rbx + 0x1a8], rax
mov eax, ecx
jmp 0x18016b009
lea rdx, str.CONNECT_response_too_large_
mov rcx, rbx
call fcn.180161e00
mov eax, gethostname
jmp 0x18016b009
mov rdi, qword [rsp + 0x80]
mov rdx, r13
mov rcx, rbx
mov r8, qword [rdi]
call fcn.180162820
mov qword [rdi], 0xffffffffffffffff
jmp 0x18016af02
mov r14, qword [rsp + 0x38]
mov eax, dword [rbx + 0x1354]
sub eax, 0xc8
cmp eax, 0x64
jb 0x18016afa6
cmp byte [r15 + 0x28d], 0
je 0x18016af47
cmp qword [r14], 0
je 0x18016af47
lea rdx, str.Connect_me_again_please
mov byte [r13 + 0x3d0], 1
mov rcx, rbx
call fcn.180161f70
mov rcx, rbx
call fcn.18016b060
jmp 0x18016af6b
mov rcx, qword [r14]
lea r8, str.C:Dev_vcpkg_buildtreescurl_srcurl_7_81_0_459d17a9d2.cleanlibhttp_proxy.c
mov edx, 0x2a1
call fcn.180167220
mov edx, 2
mov qword [r14], rbp
mov rcx, r13
call fcn.1801629b0
mov dword [r12], ebp
cmp byte [r13 + 0x3d0], 0
jne 0x18016b007
lea rcx, [r15 + 0x230]
call fcn.180156210
mov r8d, dword [rbx + 0x158]
lea rdx, str.Received_HTTP_code__d_from_proxy_after_CONNECT
mov rcx, rbx
call fcn.180161e00
mov eax, gethostname
jmp 0x18016b009
mov dword [r12], 2
lea r8, str.C:Dev_vcpkg_buildtreescurl_srcurl_7_81_0_459d17a9d2.cleanlibhttp_proxy.c
mov rcx, qword [rbx + 0x1278]
mov edx, 0x2b8
call fcn.180167220
mov qword [rbx + 0x1278], rbp
lea rdx, str.Proxy_replied__d_to_CONNECT_request
mov r8d, dword [rbx + 0x1354]
mov rcx, rbx
mov word [rbx + 0xe6c], 1
call fcn.180161f70
mov byte [rbx + 0x1c3], 0
lea rcx, [r15 + 0x230]
mov byte [r13 + 0x3de], 0
call fcn.180156210
xor eax, eax
add rsp, 0x98
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov eax, 0x2a
jmp 0x18016b009
lea rdx, str.Proxy_CONNECT_aborted_due_to_timeout
mov rcx, rbx
call fcn.180161e00
mov eax, 0x1c
jmp 0x18016b009