Function at 0x14009a890
Capabilities:
Query environment variable

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x98
lea rbp, [rsp + 0x90]
test rdx, rdx
mov r12, rdx
mov rbx, rcx
mov rdi, r8
sete al
test r8, r8
mov r13d, r9d
sete dl
or al, dl
jne 0x14009aa40
test rcx, rcx
je 0x14009aa40
call fcn.14009a030
cmp rbx, rax
je 0x14009ac50
mov qword [rbp - 0x58], 0
mov rcx, rbx
test r13d, r13d
jne 0x14009aa08
call fcn.14000f590
mov rbx, rax
test rbx, rbx
je 0x14009aa19
mov rcx, rbx
lea rdx, [rbp - 0x48]
call fcn.1400a5590
mov rcx, rbx
mov rsi, rax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
test rsi, rsi
je 0x14009aa19
lea rdx, [rbp - 0x44]
mov rcx, r12
call fcn.1400a5590
mov rbx, rax
test rax, rax
je 0x14009add8
mov eax, dword [rbp - 0x48]
movsxd r14, dword [rbp - 0x44]
lea r13d, [rax - 1]
mov dword [rbp - 0x48], r13d
cmp r13d, r14d
jne 0x14009a99e
test r13d, r13d
jle 0x14009ae35
movsxd r12, r13d
xor r15d, r15d
jmp 0x14009a978
lea rax, [r15 + 1]
cmp rax, r12
je 0x14009adc8
mov r15, rax
mov rdx, qword [rbx + r15*8]
mov rcx, qword [rsi + r15*8]
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
je 0x14009a968
mov r8d, r15d
cmp r14d, r8d
je 0x14009aa48
test r13d, r13d
jle 0x14009aa48
mov rcx, rdi
lea rdx, [rbp - 0x40]
call fcn.1400a5590
mov rdi, rax
test rax, rax
je 0x14009aa48
mov eax, dword [rbp - 0x40]
cmp r14d, eax
movsxd r12, eax
mov dword [rbp - 0x68], eax
cmovle r12, r14
test r12d, r12d
jle 0x14009a9fe
xor r15d, r15d
jmp 0x14009a9e0
lea rax, [r15 + 1]
cmp rax, r12
je 0x14009aae8
mov r15, rax
mov rdx, qword [rdi + r15*8]
mov rcx, qword [rbx + r15*8]
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
je 0x14009a9d0
mov dword [rbp - 0x64], r15d
test r15d, r15d
jne 0x14009aaef
xor r12d, r12d
jmp 0x14009aa4d
call fcn.14009a5c0
mov rbx, rax
test rbx, rbx
jne 0x14009a907
xor r13d, r13d
mov rcx, qword [rbp - 0x58]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rax, r13
lea rsp, [rbp + 8]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
xor r13d, r13d
jmp 0x14009aa25
xor r12d, r12d
xor edi, edi
mov r13, qword [rsi]
test r13, r13
je 0x14009ae00
lea r14, [rsi + 8]
nop dword [rax]
mov rcx, r13
add r14, 8
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov r13, qword [r14 - 8]
test r13, r13
jne 0x14009aa60
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
test rbx, rbx
je 0x14009aaa9
mov rcx, qword [rbx]
lea rsi, [rbx + 8]
test rcx, rcx
je 0x14009aaa1
nop
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rcx, qword [rsi]
add rsi, 8
test rcx, rcx
jne 0x14009aa90
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
test rdi, rdi
je 0x14009aad9
mov rcx, qword [rdi]
lea rbx, [rdi + 8]
test rcx, rcx
je 0x14009aad1
nop word [rax + rax]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rcx, qword [rbx]
add rbx, 8
test rcx, rcx
jne 0x14009aac0
mov rcx, rdi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov r13, r12
jmp 0x14009aa1c
lea eax, [r15 + 1]
mov dword [rbp - 0x64], eax
test r13d, r13d
jle 0x14009ae2e
mov eax, r13d
mov r15, rsi
xor r12d, r12d
lea rax, [rsi + rax*8]
mov qword [rbp - 0x60], rax
nop dword [rax]
mov rcx, qword [r15]
add r15, 8
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov rdx, qword [rbp - 0x60]
add eax, r12d
mov r12d, eax
cmp r15, rdx
jne 0x14009ab10
mov edx, dword [rbp - 0x64]
mov ecx, r14d
mov r11d, dword [rbp - 0x68]
sub ecx, edx
lea r12d, [rcx + rcx*2]
mov dword [rbp - 0x6c], ecx
add r12d, eax
cmp r11d, edx
jle 0x14009ab75
mov eax, r11d
movsxd rcx, edx
sub eax, edx
lea r15, [rdi + rcx*8]
add rax, rcx
lea rax, [rdi + rax*8]
mov qword [rbp - 0x60], rax
nop dword [rax]
mov rcx, qword [r15]
add r15, 8
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add r12d, eax
cmp qword [rbp - 0x60], r15
jne 0x14009ab60
lea ecx, [r12 + 1]
movsxd rcx, ecx
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov r12, rax
test rax, rax
je 0x14009a9fe
mov byte [rax], 0
test r13d, r13d
jle 0x14009abb4
mov r13d, r13d
mov r15, rsi
lea r13, [rsi + r13*8]
mov rdx, qword [r15]
mov rcx, r12
add r15, 8
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat
cmp r13, r15
jne 0x14009aba0
mov rcx, r12
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
lea rcx, [r12 + rax]
mov eax, dword [rbp - 0x64]
cmp r14d, eax
jle 0x14009ac06
mov eax, dword [rbp - 0x6c]
lea rdx, [rax + rax*2]
mov rax, rcx
add rdx, rcx
nop dword [rax]
mov r8d, 0x2e2e
mov byte [rax + 2], 0
add rax, 3
mov word [rax - 3], r8w
mov byte [rax - 1], 0x2f
cmp rax, rdx
jne 0x14009abd8
mov eax, dword [rbp - 0x64]
sub r14d, 1
sub r14d, eax
lea rax, [r14 + r14*2 + 3]
add rcx, rax
mov byte [rcx], 0
mov r11d, dword [rbp - 0x68]
mov ecx, dword [rbp - 0x64]
cmp r11d, ecx
jle 0x14009aa4d
mov eax, r11d
movsxd rdx, ecx
sub eax, ecx
lea r13, [rdi + rdx*8]
add rax, rdx
lea r14, [rdi + rax*8]
nop dword [rax]
mov rdx, qword [r13]
mov rcx, r12
add r13, 8
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat
cmp r14, r13
jne 0x14009ac30
jmp 0x14009aa4d
lea rcx, str.PATH
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
test rax, rax
je 0x14009a8e2
mov rcx, rax
mov qword [rbp - 0x58], rax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov rcx, rbx
test rax, rax
lea rsi, [rax + 1]
mov eax, 2
cmove rsi, rax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov r10, qword [rbp - 0x58]
add rax, rsi
lea rcx, [rax + 5]
cmp rcx, 0xfbf
ja 0x14009ae0d
add rax, 0x14
and rax, 0xfffffffffffffff0
call fcn.1400024d0
mov qword [rbp - 0x58], 0
sub rsp, rax
lea rsi, [rsp + 0x20]
mov r15, r10
jmp 0x14009accb
mov r15, rdx
movzx eax, byte [r15]
cmp al, 0x3b
je 0x14009acdb
lea rdx, [r15 + 1]
test al, al
jne 0x14009acc8
cmp r10, r15
je 0x14009ada0
mov r14, r15
mov rdx, r10
mov rcx, rsi
sub r14, r10
mov r8, r14
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
movzx eax, byte [r15 - 1]
lea r8, [rsi + r14]
cmp al, 0x2f
je 0x14009adb8
cmp al, 0x5c
je 0x14009adb8
movzx eax, word [0x1400cd1f8]
mov word [r8], ax
mov rdx, rbx
mov rcx, rsi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat
mov edx, 1
mov rcx, rsi
call fcn.140002e10
test eax, eax
je 0x14009ad5e
mov rcx, rsi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov edx, 1
mov rcx, rsi
add rax, rsi
mov dword [rax], 0x6578652e
mov byte [rax + 4], 0
call fcn.140002e10
test eax, eax
jne 0x14009ad81
lea rdx, [rbp - 0x40]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64]
test eax, eax
js 0x14009ad81
movzx eax, word [rbp - 0x3a]
and ax, 0xf000
cmp ax, 0x8000
je 0x14009ae26
cmp byte [r15], 0
je 0x14009a8ea
lea rdx, [r15 + 1]
mov r10, rdx
jmp 0x14009acc8
movzx eax, word [0x1400cd1f6]
mov byte [rsi + 2], 0
mov word [rsi], ax
jmp 0x14009ad1c
mov byte [r8], 0
jmp 0x14009ad1c
lea r8d, [r15 + 1]
jmp 0x14009a98c
mov r13, qword [rsi]
xor r12d, r12d
xor edi, edi
test r13, r13
jne 0x14009aa59
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
jmp 0x14009aa1c
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
jmp 0x14009aa82
mov qword [rbp - 0x60], r10
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov r10, qword [rbp - 0x60]
mov qword [rbp - 0x58], rax
mov rsi, rax
jmp 0x14009acbe
mov rbx, rsi
jmp 0x14009a8ea
xor eax, eax
jmp 0x14009ab2b
xor r8d, r8d
jmp 0x14009a98c