Function at 0x14000f380
Capabilities:
Get common file path
Query environment variable
Set environment variable

Disassembly:
mov r11, rsp
push rbp
sub rsp, 0x260
mov rax, qword [0x140020010]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov qword [r11 + 0x18], rdi
lea rcx, [0x140014f70]
mov qword [r11 - 0x10], r14
call qword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
mov ecx, 0xfffe
call qword [sym.imp.mfc140u.dll_operator_1]
mov ecx, 0xfffe
mov rdi, rax
call qword [sym.imp.mfc140u.dll_operator_1]
xor r14d, r14d
mov rbp, rax
test rdi, rdi
je 0x14000f423
xor edx, edx
mov r8d, 0xfffe
mov rcx, rdi
call sub.VCRUNTIME140.dll_memset
mov r8d, 0x7fff
lea rcx, str.PATH
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
dec eax
cmp eax, 0x7ffe
jbe 0x14000f520
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
jne 0x14000f520
mov rcx, rdi
call qword [sym.imp.mfc140u.dll_operator]
mov ecx, 0x820
call qword [sym.imp.mfc140u.dll_operator_1]
xor edx, edx
mov r8d, 0x820
mov rcx, rax
mov rdi, rax
call sub.VCRUNTIME140.dll_memset
cmp r14w, word [rdi]
jne 0x14000f4d0
xor edx, edx
lea rcx, [rsp + 0x30]
mov r8d, 0x208
call sub.VCRUNTIME140.dll_memset
mov edx, 0x104
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
dec eax
cmp eax, 0x103
ja 0x14000f489
lea r8, [rsp + 0x30]
mov edx, 0x410
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
mov edx, 0x104
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
dec eax
cmp eax, 0x103
ja 0x14000f4d0
cmp r14w, word [rdi]
je 0x14000f4bd
lea r8, [0x14001740c]
mov edx, 0x410
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
lea r8, [rsp + 0x30]
mov edx, 0x410
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
mov rdx, rdi
lea rcx, str.PATH
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, rdi
call qword [sym.imp.mfc140u.dll_operator]
mov r14, qword [rsp + 0x258]
mov rdi, qword [rsp + 0x280]
test rbp, rbp
je 0x14000f507
mov rcx, rbp
call qword [sym.imp.mfc140u.dll_operator]
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.14000fbd0
add rsp, 0x260
pop rbp
ret
mov qword [rsp + 0x270], rbx
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x20]
mov edx, 0x2000e
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov rbx, qword [rsp + 0x20]
test eax, eax
cmove rbx, r14
mov qword [rsp + 0x20], rbx
test rbp, rbp
je 0x14000f5bc
xor edx, edx
mov r8d, 0xfffe
mov rcx, rbp
call sub.VCRUNTIME140.dll_memset
test rbx, rbx
je 0x14000f58b
mov r9d, 0x7fff
mov r8, rbp
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.USERENV.dll_ExpandEnvironmentStringsForUserW]
test eax, eax
jne 0x14000f5b7
jmp 0x14000f5a6
mov r8d, 0x7fff
mov rdx, rbp
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
dec eax
cmp eax, 0x7ffe
jbe 0x14000f5b7
mov r8, rdi
mov edx, 0x7fff
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
mov rbx, qword [rsp + 0x20]
test rbx, rbx
je 0x14000f5cf
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x20], r14
xor edx, edx
mov r8d, 0xfffe
mov rcx, rdi
call sub.VCRUNTIME140.dll_memset
mov rbx, rbp
cmp r14w, word [rbp]
je 0x14000f6a5
mov qword [rsp + 0x278], rsi
mov qword [rsp + 0x250], r15
mov r15d, 0x3b
mov edx, r15d
mov rcx, rbx
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
mov rsi, rax
test rax, rax
je 0x14000f61b
mov word [rax], r14w
cmp r14w, word [rbx]
je 0x14000f67e
mov edx, 0x25
mov rcx, rbx
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
test rax, rax
jne 0x14000f67e
movzx ecx, word [rbx]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isalpha]
test eax, eax
je 0x14000f67e
cmp word [rbx + 2], 0x3a
jne 0x14000f67e
movzx eax, word [rbx + 4]
cmp ax, 0x2f
je 0x14000f658
cmp ax, 0x5c
jne 0x14000f67e
mov r8, rbx
mov edx, 0x7fff
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
lea r8, [0x14001740c]
mov edx, 0x7fff
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
test rsi, rsi
je 0x14000f695
lea rbx, [rsi + 2]
mov word [rsi], r15w
cmp r14w, word [rbx]
jne 0x14000f603
mov rsi, qword [rsp + 0x278]
mov r15, qword [rsp + 0x250]
mov rbx, qword [rsp + 0x270]
cmp r14w, word [rdi]
je 0x14000f44b
mov rax, rdi
nop word [rax + rax]
cmp word [rax + 2], r14w
lea rax, [rax + 2]
jne 0x14000f6c0
cmp word [rax - 2], 0x3b
jne 0x14000f6d7
mov word [rax - 2], r14w
cmp r14w, word [rdi]
jne 0x14000f4d0
jmp 0x14000f441