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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
sub rsp, 0x20
mov bpl, dl
mov rdi, rcx
mov rdx, rcx
mov esi, 0x1770
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
xor r12d, r12d
cmp eax, r12d
jbe 0x140006691
mov r8b, 1
mov rcx, rdi
mov dl, r8b
call fcn.1400062bc
cmp al, r12b
jne 0x140006929
lea rcx, str.USERPROFILE
mov r8d, esi
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, r12d
jbe 0x1400066db
lea rdx, str.AppDataLocalTemp
mov rcx, rdi
call fcn.1400165f0
cmp rax, r12
je 0x1400066db
mov r8b, 1
xor edx, edx
mov rcx, rdi
call fcn.1400062bc
cmp al, r12b
jne 0x140006929
lea rcx, str.HOMEDRIVE
mov r8d, esi
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, r12d
jbe 0x14000673e
mov rcx, rdi
call fcn.140015e86
mov ebx, esi
mov rcx, rdi
sub ebx, eax
call fcn.140015e86
lea rcx, str.HOMEPATH
lea rdx, [rdi + rax*2]
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, r12d
jbe 0x14000673e
mov r8b, 1
xor edx, edx
mov rcx, rdi
call fcn.1400062bc
cmp al, r12b
jne 0x140006929
mov edx, esi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
cmp eax, r12d
jbe 0x140006780
lea rdx, [0x14003d650]
mov rcx, rdi
call fcn.1400165f0
cmp rax, r12
je 0x140006780
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.1400062bc
cmp al, r12b
jne 0x140006929
lea rdx, str.c:_temp
mov rcx, rdi
call fcn.140016628
cmp rax, r12
je 0x1400067ae
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.1400062bc
cmp al, r12b
jne 0x140006929
lea rdx, str.c:_tmp
mov rcx, rdi
call fcn.140016628
cmp rax, r12
je 0x1400067dc
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.1400062bc
cmp al, r12b
jne 0x140006929
mov edx, esi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
cmp eax, r12d
jbe 0x140006806
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.1400062bc
cmp al, r12b
jne 0x140006929
lea rdx, str.c:_tmp
mov rcx, rdi
call fcn.140016628
cmp rax, r12
je 0x140006834
xor r8d, r8d
mov dl, 1
mov rcx, rdi
call fcn.1400062bc
cmp al, r12b
jne 0x140006929
mov rdx, rdi
mov ecx, esi
mov byte [0x140134ed2], 1
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp eax, r12d
jbe 0x140006865
xor r8d, r8d
mov dl, 1
mov rcx, rdi
call fcn.1400062bc
cmp al, r12b
jne 0x140006929
lea rcx, str.USERPROFILE
mov r8d, esi
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, r12d
jbe 0x1400068af
lea rdx, str.AppDataLocalTemp
mov rcx, rdi
call fcn.1400165f0
cmp rax, r12
je 0x1400068af
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.1400062bc
cmp al, r12b
jne 0x140006929
lea rcx, str.HOMEDRIVE
mov r8d, esi
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, r12d
jbe 0x140006910
mov rcx, rdi
call fcn.140015e86
mov rcx, rdi
sub esi, eax
call fcn.140015e86
lea rcx, str.HOMEPATH
lea rdx, [rdi + rax*2]
mov r8d, esi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, r12d
jbe 0x140006910
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.1400062bc
cmp al, r12b
jne 0x140006929
mov word [rdi], r12w
cmp bpl, r12b
je 0x140006929
xor edx, edx
mov ecx, 0x3f7
call fcn.140005384
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r12
ret