Function at 0x180165270
Capabilities:
Check http status code
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x40
cmp byte [rcx + 0x1c4], 0
mov rsi, r8
mov r14, rdx
mov rbx, rcx
jne 0x18016535b
cmp byte [rcx + 0xb3c], 0
jne 0x18016535b
mov r8d, reloc.WS2_32.dll_ntohs
lea rcx, str.Content_Length:
mov rdx, rsi
call fcn.18015c490
test eax, eax
je 0x18016535b
xor edx, edx
lea rcx, [rsi + 0xf]
lea r9, [rsp + 0x60]
lea r8d, [rdx + 0xa]
call fcn.18016cfa0
test eax, eax
jne 0x1801652ef
mov rax, qword [rsp + 0x60]
mov qword [rbx + 0xe8], rax
mov qword [rbx + 0xf0], rax
jmp 0x180165330
cmp eax, 1
jne 0x180165345
cmp qword [rbx + 0x758], 0
je 0x180165314
lea rdx, str.Maximum_file_size_exceeded
mov rcx, rbx
call fcn.1801566d0
mov eax, 0x3f
jmp 0x180165332
mov edx, 2
mov rcx, r14
call fcn.180157280
lea rdx, str.Overflow_Content_Length:_value_
mov rcx, rbx
call fcn.180156840
xor eax, eax
mov rbx, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x70]
add rsp, 0x40
pop r14
pop rdi
pop rsi
ret
lea rdx, str.Invalid_Content_Length:_value
mov rcx, rbx
call fcn.1801566d0
mov eax, 8
jmp 0x180165332
mov r8d, reloc.WS2_32.dll_listen
lea rcx, str.Content_Type:
mov rdx, rsi
call fcn.18015c490
test eax, eax
je 0x1801653c0
mov rcx, rsi
call fcn.180164000
mov rdi, rax
test rax, rax
je 0x180165c21
cmp byte [rax], 0
lea r8, str.C:Dev_vcpkg_buildtreescurl_srcurl_7_81_0_459d17a9d2.cleanlibhttp.c
jne 0x1801653a3
mov edx, 0xd66
mov rcx, rax
call fcn.18015baf0
jmp 0x180165330
mov rcx, qword [rbx + 0x1388]
mov edx, 0xd68
call fcn.18015baf0
mov qword [rbx + 0x1388], rdi
jmp 0x180165330
cmp byte [r14 + 0x1b0], 0xa
jne 0x180165489
cmp byte [r14 + 0x3cc], 0
je 0x180165489
mov r8d, reloc.WS2_32.dll_recvfrom
lea rdx, str.Proxy_Connection:
mov rcx, rsi
call fcn.18015c370
test eax, eax
je 0x180165489
movzx eax, byte [rsi + 0x11]
lea rdi, [rsi + 0x11]
test al, al
je 0x18016541c
movzx ecx, al
call fcn.180187640
test eax, eax
je 0x18016541c
movzx eax, byte [rdi + 1]
inc rdi
test al, al
jne 0x180165405
mov edx, reloc.WS2_32.dll_listen
mov rcx, rdi
call sub.VCRUNTIME140.dll_strchr
mov rbp, rax
test rax, rax
jne 0x180165451
lea edx, [rax + 0xa]
mov rcx, rdi
call sub.VCRUNTIME140.dll_strchr
mov rbp, rax
test rax, rax
jne 0x180165451
xor edx, edx
mov rcx, rdi
call sub.VCRUNTIME140.dll_strchr
mov rbp, rax
sub rbp, rdi
cmp rbp, 0xa
jb 0x180165489
nop word [rax + rax]
mov r8d, 0xa
lea rdx, str.keep_alive
mov rcx, rdi
call fcn.18015c370
test eax, eax
jne 0x180165730
dec rbp
inc rdi
cmp rbp, 0xa
jae 0x180165460
cmp byte [r14 + 0x1b0], 0xb
jne 0x180165559
cmp byte [r14 + 0x3cc], 0
je 0x180165559
mov r8d, reloc.WS2_32.dll_recvfrom
lea rdx, str.Proxy_Connection:
mov rcx, rsi
call fcn.18015c370
test eax, eax
je 0x180165559
movzx eax, byte [rsi + 0x11]
lea rdi, [rsi + 0x11]
test al, al
je 0x1801654e7
nop
movzx ecx, al
call fcn.180187640
test eax, eax
je 0x1801654e7
movzx eax, byte [rdi + 1]
inc rdi
test al, al
jne 0x1801654d0
mov edx, reloc.WS2_32.dll_listen
mov rcx, rdi
call sub.VCRUNTIME140.dll_strchr
mov rbp, rax
test rax, rax
jne 0x18016551c
lea edx, [rax + 0xa]
mov rcx, rdi
call sub.VCRUNTIME140.dll_strchr
mov rbp, rax
test rax, rax
jne 0x18016551c
xor edx, edx
mov rcx, rdi
call sub.VCRUNTIME140.dll_strchr
mov rbp, rax
sub rbp, rdi
cmp rbp, 5
jb 0x180165559
nop word [rax + rax]
mov r8d, 5
lea rdx, str.close
mov rcx, rdi
call fcn.18015c370
test eax, eax
jne 0x180165746
dec rbp
inc rdi
cmp rbp, 5
jae 0x180165530
cmp byte [r14 + 0x1b0], 0xa
jne 0x180165619
mov r8d, ntohs
lea rdx, str.Connection:
mov rcx, rsi
call fcn.18015c370
test eax, eax
je 0x180165619
movzx eax, byte [rsi + 0xb]
lea rdi, [rsi + 0xb]
test al, al
je 0x1801655a7
movzx ecx, al
call fcn.180187640
test eax, eax
je 0x1801655a7
movzx eax, byte [rdi + 1]
inc rdi
test al, al
jne 0x180165590
mov edx, reloc.WS2_32.dll_listen
mov rcx, rdi
call sub.VCRUNTIME140.dll_strchr
mov rbp, rax
test rax, rax
jne 0x1801655dc
lea edx, [rax + 0xa]
mov rcx, rdi
call sub.VCRUNTIME140.dll_strchr
mov rbp, rax
test rax, rax
jne 0x1801655dc
xor edx, edx
mov rcx, rdi
call sub.VCRUNTIME140.dll_strchr
mov rbp, rax
sub rbp, rdi
cmp rbp, 0xa
jb 0x180165619
nop word [rax + rax]
mov r8d, 0xa
lea rdx, str.keep_alive
mov rcx, rdi
call fcn.18015c370
test eax, eax
jne 0x18016575f
dec rbp
inc rdi
cmp rbp, 0xa
jae 0x1801655f0
mov r8d, ntohs
lea rdx, str.Connection:
mov rcx, rsi
call fcn.18015c370
test eax, eax
je 0x1801656c9
movzx eax, byte [rsi + 0xb]
lea rdi, [rsi + 0xb]
test al, al
je 0x180165659
movzx ecx, al
call fcn.180187640
test eax, eax
je 0x180165659
movzx eax, byte [rdi + 1]
inc rdi
test al, al
jne 0x180165642
mov edx, reloc.WS2_32.dll_listen
mov rcx, rdi
call sub.VCRUNTIME140.dll_strchr
mov rbp, rax
test rax, rax
jne 0x18016568e
lea edx, [rax + 0xa]
mov rcx, rdi
call sub.VCRUNTIME140.dll_strchr
mov rbp, rax
test rax, rax
jne 0x18016568e
xor edx, edx
mov rcx, rdi
call sub.VCRUNTIME140.dll_strchr
mov rbp, rax
sub rbp, rdi
cmp rbp, 5
jb 0x1801656c9
nop word [rax + rax]
mov r8d, 5
lea rdx, str.close
mov rcx, rdi
call fcn.18015c370
test eax, eax
jne 0x180165775
dec rbp
inc rdi
cmp rbp, 5
jae 0x1801656a0
cmp byte [rbx + 0x1c4], 0
jne 0x1801657cf
mov r8d, reloc.WS2_32.dll_select
lea rcx, str.Transfer_Encoding:
mov rdx, rsi
call fcn.18015c490
test eax, eax
je 0x180165787
lea rdx, [rsi + 0x12]
mov r8d, 1
mov rcx, rbx
call fcn.18015ce20
test eax, eax
jne 0x180165332
cmp byte [rbx + 0x1c5], al
jne 0x180165330
lea edx, [rax + 1]
mov rcx, r14
call fcn.180157280
mov byte [rbx + 0x1c6], 1
jmp 0x180165330
xor edx, edx
mov rcx, r14
call fcn.180157280
lea rdx, str.HTTP_1.0_proxy_connection_set_to_keep_alive_
jmp 0x180165328
mov edx, 1
mov rcx, r14
call fcn.180157280
lea rdx, str.HTTP_1.1_proxy_connection_set_close_
jmp 0x180165328
xor edx, edx
mov rcx, r14
call fcn.180157280
lea rdx, str.HTTP_1.0_connection_set_to_keep_alive_
jmp 0x180165328
mov edx, 2
mov rcx, r14
call fcn.180157280
jmp 0x180165330
cmp byte [rbx + 0x1c4], 0
jne 0x1801657cf
mov r8d, reloc.WS2_32.dll_recvfrom
lea rcx, str.Content_Encoding:
mov rdx, rsi
call fcn.18015c490
test eax, eax
je 0x1801657cf
cmp qword [rbx + 0x7e0], 0
je 0x1801657cf
lea rdx, [rsi + 0x11]
xor r8d, r8d
mov rcx, rbx
call fcn.18015ce20
test eax, eax
je 0x180165330
jmp 0x180165332
mov r8d, ntohs
lea rcx, str.Retry_After:
mov rdx, rsi
call fcn.18015c490
test eax, eax
je 0x18016583c
xor ecx, ecx
mov qword [rsp + 0x60], rcx
lea rcx, [rsi + 0xc]
call fcn.18016d100
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x180165826
lea r9, [rsp + 0x60]
xor edx, edx
lea r8d, [rax + 0xb]
lea rcx, [rsi + 0xc]
call fcn.18016cfa0
mov rdi, qword [rsp + 0x60]
mov qword [rbx + 0x1398], rdi
jmp 0x180165330
xor ecx, ecx
call sub.api_ms_win_crt_time_l1_1_0.dll__time64
sub rdi, rax
mov qword [rbx + 0x1398], rdi
jmp 0x180165330
cmp byte [rbx + 0x1c4], 0
jne 0x1801658e5
mov r8d, reloc.WS2_32.dll_ntohl
lea rcx, str.Content_Range:
mov rdx, rsi
call fcn.18015c490
test eax, eax
je 0x1801658e5
movzx eax, byte [rsi + 0xe]
lea rdi, [rsi + 0xe]
test al, al
je 0x18016588e
movzx ecx, al
call fcn.1801875c0
test eax, eax
jne 0x18016588e
cmp byte [rdi], 0x2a
je 0x18016588e
movzx eax, byte [rdi + 1]
inc rdi
test al, al
jne 0x180165872
movzx ecx, byte [rdi]
call fcn.1801875c0
test eax, eax
je 0x1801658d7
xor edx, edx
lea r9, [rbx + 0x150]
mov rcx, rdi
lea r8d, [rdx + 0xa]
call fcn.18016cfa0
test eax, eax
jne 0x180165330
mov rax, qword [rbx + 0x150]
cmp qword [rbx + 0x1190], rax
jne 0x180165330
mov byte [rbx + 0x1c1], 1
jmp 0x180165330
xor ecx, ecx
mov qword [rbx + 0x1190], rcx
jmp 0x180165330
cmp qword [rbx + 0xb58], 0
je 0x1801659e1
cmp byte [rbx + 0x12f8], 0
je 0x1801659e1
mov r8d, ntohs
lea rcx, str.Set_Cookie:
mov rdx, rsi
call fcn.18015c490
test eax, eax
je 0x1801659e1
mov rdi, qword [rbx + 0x12b0]
test rdi, rdi
jne 0x180165930
mov rdi, qword [r14 + 0xa0]
mov rax, qword [r14 + 0x418]
test byte [rax + 0x84], 2
jne 0x180165983
mov rdx, rdi
lea rcx, str.localhost
call fcn.18015c2e0
test eax, eax
jne 0x180165983
lea rdx, str.127.0.0.1
mov rcx, rdi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
je 0x180165983
xor ecx, ecx
lea rdx, str._::1_
nop
movzx eax, byte [rdi + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x1801659dc
cmp rcx, 6
jne 0x180165970
mov bpl, 1
mov edx, 2
mov rcx, rbx
mov r8d, edx
call fcn.18015d670
mov rax, qword [rbx + 0x1210]
lea rcx, [rsi + 0xb]
mov rdx, qword [rbx + 0xb58]
xor r9d, r9d
mov byte [rsp + 0x38], bpl
mov r8b, 1
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rcx
mov rcx, rbx
call fcn.1801477e0
mov edx, 2
mov rcx, rbx
call fcn.18015d6b0
jmp 0x180165330
xor bpl, bpl
jmp 0x180165986
cmp byte [rbx + 0x1c4], 0
jne 0x180165a3e
mov r8d, reloc.WS2_32.dll_ntohl
lea rcx, str.Last_Modified:
mov rdx, rsi
call fcn.18015c490
test eax, eax
je 0x180165a3e
cmp dword [rbx + 0x580], 0
jne 0x180165a15
cmp byte [rbx + 0xb21], 0
je 0x180165a3e
lea rcx, [rsi + 0xe]
call fcn.18016d100
mov qword [rbx + 0x180], rax
cmp byte [rbx + 0xb21], 0
je 0x180165330
mov qword [rbx + 0x1360], rax
jmp 0x180165330
mov r8d, reloc.WS2_32.dll_recvfrom
lea rcx, str.WWW_Authenticate:
mov rdx, rsi
call fcn.18015c490
test eax, eax
je 0x180165a65
mov edi, dword [rbx + 0x158]
cmp edi, 0x191
je 0x180165a8c
mov r8d, reloc.WS2_32.dll_send
lea rcx, str.Proxy_authenticate:
mov rdx, rsi
call fcn.18015c490
test eax, eax
je 0x180165ad9
mov edi, dword [rbx + 0x158]
cmp edi, 0x197
jne 0x180165ad9
mov rcx, rsi
call fcn.180164000
mov rsi, rax
test rax, rax
je 0x180165c21
cmp edi, 0x197
mov r8, rax
mov rcx, rbx
sete dl
call fcn.180165ff0
lea r8, str.C:Dev_vcpkg_buildtreescurl_srcurl_7_81_0_459d17a9d2.cleanlibhttp.c
mov edx, 0xe11
mov rcx, rsi
mov ebx, eax
call fcn.18015baf0
test ebx, ebx
je 0x180165330
mov eax, ebx
jmp 0x180165332
mov ebp, reloc.WS2_32.dll_recv
lea rcx, str.Persistent_Auth:
mov r8d, ebp
mov rdx, rsi
call fcn.18015c490
test eax, eax
je 0x180165b6b
cmp dword [rbx + 0xe54], 4
jne 0x180165330
mov rcx, rsi
call fcn.180164000
mov rdi, rax
test rax, rax
je 0x180165c21
lea r8d, [rbp - 0xb]
mov rdx, rax
lea rcx, str.false
call fcn.18015c490
test eax, eax
mov byte [r14 + 0x659], 1
mov r9, rdi
lea rdx, str.Negotiate:_noauthpersist_____d__header_part:__s
setne cl
mov byte [r14 + 0x658], cl
movzx r8d, cl
mov rcx, rbx
call fcn.180156840
lea r8, str.C:Dev_vcpkg_buildtreescurl_srcurl_7_81_0_459d17a9d2.cleanlibhttp.c
mov edx, 0xe23
mov rcx, rdi
call fcn.18015baf0
jmp 0x180165330
mov eax, dword [rbx + 0x158]
sub eax, 0x12c
cmp eax, 0x63
ja 0x180165c2b
mov r8d, 9
lea rcx, str.Location:
mov rdx, rsi
call fcn.18015c490
test eax, eax
je 0x180165c2b
cmp qword [rbx + 0x190], 0
jne 0x180165c2b
mov rcx, rsi
call fcn.180164000
test rax, rax
je 0x180165c21
cmp byte [rax], 0
jne 0x180165bd5
lea r8, str.C:Dev_vcpkg_buildtreescurl_srcurl_7_81_0_459d17a9d2.cleanlibhttp.c
mov edx, 0xe30
mov rcx, rax
call fcn.18015baf0
jmp 0x180165330
cmp byte [rbx + 0xb2e], 0
mov qword [rbx + 0x190], rax
je 0x180165330
lea r8, str.C:Dev_vcpkg_buildtreescurl_srcurl_7_81_0_459d17a9d2.cleanlibhttp.c
mov edx, 0xe36
mov rcx, rax
call fcn.18015c190
mov qword [rbx + 0x198], rax
test rax, rax
je 0x180165c21
mov rdx, r14
mov rcx, rbx
call fcn.180167860
test eax, eax
je 0x180165330
jmp 0x180165332
mov eax, 0x1b
jmp 0x180165332
cmp qword [rbx + 0xb60], 0
je 0x180165c89
mov r8d, 0x1a
lea rcx, str.Strict_Transport_Security:
mov rdx, rsi
call fcn.18015c490
test eax, eax
je 0x180165c89
mov rax, qword [r14 + 0x418]
test byte [rax + 0x8c], 1
je 0x180165c89
mov rdx, qword [rbx + 0x11e8]
lea r8, [rsi + 0x1a]
mov rcx, qword [rbx + 0xb60]
call fcn.18015aee0
test eax, eax
je 0x180165330
lea rdx, str.Illegal_STS_header_skipped
jmp 0x180165328
cmp qword [rbx + 0xb68], 0
je 0x180165d1e
mov edi, 8
lea rcx, str.Alt_Svc:
mov r8d, edi
mov rdx, rsi
call fcn.18015c490
test eax, eax
je 0x180165d1e
mov rax, qword [r14 + 0x418]
test byte [rax + 0x8c], 1
jne 0x180165cd3
lea rcx, str.CURL_ALTSVC_HTTP
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
test rax, rax
je 0x180165d1e
cmp byte [r14 + 0x1b0], 0x14
mov ecx, dword [r14 + 0x154]
cmove edi, ebp
call fcn.180159350
mov rdx, qword [rbx + 0xb68]
lea r8, [rsi + 8]
mov word [rsp + 0x28], ax
mov r9d, edi
mov rax, qword [r14 + 0xa0]
mov rcx, rbx
mov qword [rsp + 0x20], rax
call fcn.180159d60
test eax, eax
je 0x180165330
jmp 0x180165332
mov rax, qword [r14 + 0x418]
test dword [rax + 0x84], 0x40000
je 0x180165330
mov rdx, rsi
mov rcx, rbx
call fcn.180182490
jmp 0x180165332