Function at 0x140016504
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
mov r15, rdx
mov r12, r9
xor edx, edx
mov r14, r8
mov r13d, ecx
test r8, r8
je 0x140016a13
mov r8d, dword [0x1400b505c]
lea r9d, [rdx + 1]
test r8d, r8d
jne 0x140016558
mov dword [0x1400b6028], r9d
mov r8d, r9d
mov dword [0x1400b505c], r9d
mov ecx, dword [0x1400b5098]
cmp ecx, 0xffffffff
je 0x14001656b
cmp dword [0x1400b6028], edx
je 0x140016593
lea rcx, str.POSIXLY_CORRECT
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov r8d, dword [0x1400b505c]
xor edx, edx
mov ecx, edx
test rax, rax
setne cl
mov dword [0x1400b5098], ecx
lea r9d, [rdx + 1]
mov al, byte [r14]
cmp al, 0x2d
jne 0x1400165a6
mov ebp, dword [rsp + 0x88]
or ebp, 2
jmp 0x1400165c5
test ecx, ecx
jne 0x1400165b7
cmp al, 0x2b
je 0x1400165b7
mov ebp, dword [rsp + 0x88]
jmp 0x1400165c8
mov ebp, dword [rsp + 0x88]
and ebp, 0xfffffffe
cmp al, 0x2b
jne 0x1400165c8
add r14, r9
cmp dword [0x1400b6028], edx
mov qword [0x1400b6030], rdx
je 0x1400165ea
or esi, 0xffffffff
or edi, esi
mov dword [0x1400b5070], esi
mov dword [0x1400b5064], edi
jmp 0x1400165f6
mov edi, dword [0x1400b5064]
mov esi, dword [0x1400b5070]
mov rbx, qword [0x1400b5068]
lea rcx, [0x14009dfe0]
cmp dword [0x1400b6028], edx
jne 0x140016614
cmp byte [rbx], dl
jne 0x14001673f
mov dword [0x1400b6028], edx
cmp r8d, r13d
jge 0x1400169d8
movsxd rax, r8d
mov rbx, qword [r15 + rax*8]
mov qword [0x1400b5068], rbx
cmp byte [rbx], 0x2d
jne 0x14001666d
cmp byte [rbx + 1], dl
jne 0x1400166f2
mov edx, 0x2d
mov rcx, r14
call sub.VCRUNTIME140.dll_strchr
mov r8d, dword [0x1400b505c]
lea rcx, [0x14009dfe0]
mov edi, dword [0x1400b5064]
xor edx, edx
mov esi, dword [0x1400b5070]
test rax, rax
jne 0x1400166eb
mov qword [0x1400b5068], rcx
mov rbx, rcx
test bpl, 2
jne 0x1400169b7
mov r9d, 1
test r9b, bpl
je 0x140016a13
cmp edi, 0xffffffff
jne 0x1400166a1
mov edi, r8d
mov dword [0x1400b5064], r8d
jmp 0x1400166da
cmp esi, 0xffffffff
je 0x1400166da
mov r9, r15
mov edx, esi
mov ecx, edi
call fcn.140016d44
mov r8d, dword [0x1400b505c]
lea rcx, [0x14009dfe0]
mov eax, r8d
sub eax, esi
add edi, eax
or esi, 0xffffffff
mov dword [0x1400b5064], edi
mov dword [0x1400b5070], esi
lea r9d, [rsi + 2]
add r8d, r9d
mov dword [0x1400b505c], r8d
xor edx, edx
jmp 0x140016604
mov rbx, qword [0x1400b5068]
cmp edi, 0xffffffff
je 0x140016704
cmp esi, 0xffffffff
cmove esi, r8d
mov dword [0x1400b5070], esi
lea rax, [rbx + 1]
cmp byte [rax], dl
je 0x14001673f
cmp byte [rax], 0x2d
mov rbx, rax
mov qword [0x1400b5068], rax
jne 0x14001673f
cmp byte [rax + 1], dl
jne 0x14001673f
inc r8d
mov qword [0x1400b5068], rcx
mov dword [0x1400b505c], r8d
cmp esi, 0xffffffff
je 0x140016a05
jmp 0x1400169e4
mov esi, 0x3a
test r12, r12
je 0x1400167e3
movsxd rax, r8d
cmp rbx, qword [r15 + rax*8]
je 0x1400167e3
movsx eax, byte [rbx]
cmp al, 0x2d
je 0x140016767
test bpl, 4
je 0x1400167e3
mov edi, edx
cmp al, 0x2d
jne 0x14001677e
mov ebp, 1
add rbx, rbp
mov qword [0x1400b5068], rbx
jmp 0x14001679f
cmp al, sil
je 0x14001679a
mov edx, eax
mov rcx, r14
call sub.VCRUNTIME140.dll_strchr
test rax, rax
mov ebp, 1
cmovne edi, ebp
jmp 0x14001679f
mov ebp, 1
mov r9, qword [rsp + 0x80]
mov r8, r12
mov rdx, r14
mov dword [rsp + 0x20], edi
mov rcx, r15
call fcn.140016a54
cmp eax, 0xffffffff
je 0x1400167d1
lea rcx, [0x14009dfe0]
mov qword [0x1400b5068], rcx
jmp 0x140016a16
mov r8d, dword [0x1400b505c]
xor edx, edx
mov rbx, qword [0x1400b5068]
jmp 0x1400167e8
mov ebp, 1
movsx edi, byte [rbx]
add rbx, rbp
mov qword [0x1400b5068], rbx
cmp edi, esi
je 0x140016973
cmp edi, 0x2d
jne 0x14001680a
cmp byte [rbx], dl
jne 0x14001698f
mov edx, edi
mov rcx, r14
call sub.VCRUNTIME140.dll_strchr
xor edx, edx
test rax, rax
je 0x140016965
test r12, r12
je 0x1400168c6
lea ebx, [rdx + 0x57]
cmp edi, ebx
jne 0x1400168c6
cmp byte [rax + 1], 0x3b
jne 0x1400168c6
mov rax, qword [0x1400b5068]
cmp byte [rax], dl
jne 0x1400168a7
mov eax, dword [0x1400b505c]
inc eax
mov dword [0x1400b505c], eax
cmp eax, r13d
jl 0x14001689a
cmp dword [0x1400b5058], edx
lea rcx, [0x14009dfe0]
mov qword [0x1400b5068], rcx
je 0x140016884
cmp byte [r14], sil
je 0x140016884
mov edx, ebx
lea rcx, str.option_requires_an_argument_____c
call fcn.140016e28
mov dword [0x1400b5060], ebx
cmp byte [r14], sil
mov eax, 0x3f
cmove eax, esi
jmp 0x140016a16
cdqe
mov rcx, qword [r15 + rax*8]
mov qword [0x1400b5068], rcx
mov r9, qword [rsp + 0x80]
mov r8, r12
mov dword [rsp + 0x20], edx
mov rcx, r15
mov rdx, r14
call fcn.140016a54
jmp 0x1400167be
cmp byte [rax + rbp], sil
je 0x1400168dd
mov rax, qword [0x1400b5068]
cmp byte [rax], dl
jne 0x14001695e
jmp 0x140016958
mov rcx, qword [0x1400b5068]
mov qword [0x1400b6030], rdx
cmp byte [rcx], dl
jne 0x140016943
cmp byte [rax + rbp + 1], sil
je 0x14001694a
mov eax, dword [0x1400b505c]
inc eax
mov dword [0x1400b505c], eax
cmp eax, r13d
jl 0x14001693d
cmp dword [0x1400b5058], edx
lea rcx, [0x14009dfe0]
mov qword [0x1400b5068], rcx
je 0x140016932
cmp byte [r14], sil
je 0x140016932
mov edx, edi
lea rcx, str.option_requires_an_argument_____c
call fcn.140016e28
mov dword [0x1400b5060], edi
jmp 0x14001688a
cdqe
mov rcx, qword [r15 + rax*8]
mov qword [0x1400b6030], rcx
lea rcx, [0x14009dfe0]
mov qword [0x1400b5068], rcx
add dword [0x1400b505c], ebp
mov eax, edi
jmp 0x140016a16
mov r8d, dword [0x1400b505c]
mov rbx, qword [0x1400b5068]
cmp edi, 0x2d
jne 0x140016981
cmp byte [rbx], dl
jne 0x14001698f
jmp 0x140016a13
cmp byte [rbx], dl
jne 0x14001698f
add r8d, ebp
mov dword [0x1400b505c], r8d
cmp dword [0x1400b5058], edx
je 0x1400169aa
cmp byte [r14], sil
je 0x1400169aa
mov edx, edi
lea rcx, str.unknown_option_____c
call fcn.140016e28
mov dword [0x1400b5060], edi
mov eax, 0x3f
jmp 0x140016a16
movsxd rax, r8d
mov ebp, 1
add r8d, ebp
mov rcx, qword [r15 + rax*8]
mov eax, ebp
mov qword [0x1400b6030], rcx
mov dword [0x1400b505c], r8d
jmp 0x140016a16
mov qword [0x1400b5068], rcx
cmp esi, 0xffffffff
je 0x1400169fa
mov r9, r15
mov edx, esi
mov ecx, edi
call fcn.140016d44
sub edi, esi
add dword [0x1400b505c], edi
jmp 0x140016a05
cmp edi, 0xffffffff
je 0x140016a05
mov dword [0x1400b505c], edi
or dword [0x1400b5070], 0xffffffff
or dword [0x1400b5064], 0xffffffff
or eax, 0xffffffff
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
ret