Function at 0x1401d6a40
Capabilities:
Check if file exists
Query environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xc0
mov rax, qword [0x1403f04b0]
xor rax, rsp
mov qword [rbp + 0x27], rax
cmp qword [rdx + 0x18], 8
mov rsi, rcx
mov rcx, rdx
mov rbx, rdx
jb 0x1401d6a79
mov rcx, qword [rdx]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_ExpandEnvironmentStringsW]
xor r15d, r15d
mov r14d, eax
test eax, eax
jne 0x1401d6b47
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov dword [rbp - 0x59], eax
call fcn.140048a14
mov rdi, qword [rax + 8]
cmp dword [rdi], 2
jbe 0x1401d6b32
cmp qword [rbx + 0x18], 8
lea rax, [rbp - 0x59]
mov qword [rbp - 9], rax
lea rax, str.Failed_to_expand_environment_strings_in_path
mov qword [rbp + 7], rax
mov qword [rbp - 1], 4
mov qword [rbp + 0xf], 0x2d
jb 0x1401d6ada
mov rbx, qword [rbx]
lea rcx, [0x1402cb810]
mov rax, r15
test rbx, rbx
je 0x1401d6afa
mov rcx, rbx
or rax, 0xffffffffffffffff
inc rax
cmp word [rbx + rax*2], r15w
jne 0x1401d6af0
lea eax, [rax*2 + 2]
mov qword [rbp + 0x17], rcx
mov dword [rbp + 0x1f], eax
mov dword [rbp + 0x23], r15d
lea rax, [rbp - 0x29]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rdx, [0x14034e956]
xor r8d, r8d
mov dword [rsp + 0x20], 5
mov rcx, rdi
call fcn.140001078
mov qword [rsi + 0x10], r15
mov qword [rsi + 0x18], 7
mov word [rsi], r15w
jmp 0x1401d6c94
movdqa xmm0, xmmword [0x140307960]
dec eax
mov edx, eax
mov word [rbp - 0x51], r15w
movdqu xmmword [rbp - 0x41], xmm0
cmp rdx, 7
ja 0x1401d6b80
mov qword [rbp - 0x41], rdx
test eax, eax
je 0x1401d6b78
movzx eax, r15w
lea rdi, [rbp - 0x51]
mov ecx, edx
rep stosw word [rdi], ax
mov word [rbp + rdx*2 - 0x51], r15w
jmp 0x1401d6b8c
xor r9d, r9d
lea rcx, [rbp - 0x51]
call fcn.140068f9c
cmp qword [rbp - 0x39], 8
lea rdx, [rbp - 0x51]
mov rcx, rbx
cmovae rdx, qword [rbp - 0x51]
cmp qword [rbx + 0x18], 8
jb 0x1401d6ba7
mov rcx, qword [rbx]
mov r8d, r14d
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x1401d6c6a
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov dword [rbp - 0x59], eax
call fcn.140048a14
mov rdi, qword [rax + 8]
cmp dword [rdi], 2
jbe 0x1401d6c58
cmp qword [rbx + 0x18], 8
lea rax, [rbp - 0x59]
mov qword [rbp - 9], rax
lea rax, str.Failed_to_expand_environment_strings_in_path_after_increasing_buffer_size
mov qword [rbp + 7], rax
mov qword [rbp - 1], 4
mov qword [rbp + 0xf], VarR8FromUI1
jb 0x1401d6c00
mov rbx, qword [rbx]
lea rcx, [0x1402cb810]
mov rax, r15
test rbx, rbx
je 0x1401d6c20
mov rcx, rbx
or rax, 0xffffffffffffffff
inc rax
cmp word [rbx + rax*2], r15w
jne 0x1401d6c16
lea eax, [rax*2 + 2]
mov qword [rbp + 0x17], rcx
mov dword [rbp + 0x1f], eax
mov dword [rbp + 0x23], r15d
lea rax, [rbp - 0x29]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rdx, [0x14034e956]
xor r8d, r8d
mov dword [rsp + 0x20], 5
mov rcx, rdi
call fcn.140001078
mov qword [rsi + 0x10], r15
mov qword [rsi + 0x18], 7
mov word [rsi], r15w
jmp 0x1401d6c8b
movups xmm0, xmmword [rbp - 0x51]
mov word [rbp - 0x51], r15w
movups xmm1, xmmword [rbp - 0x41]
movups xmmword [rsi], xmm0
movdqa xmm0, xmmword [0x140307960]
movdqu xmmword [rbp - 0x41], xmm0
movups xmmword [rsi + 0x10], xmm1
lea rcx, [rbp - 0x51]
call fcn.1400492c0
mov rax, rsi
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.14027a710
mov rbx, qword [rsp + 0x100]
add rsp, 0xc0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret