Function at 0x14000604c
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 0x14000609a
mov r8b, 1
mov rcx, rdi
mov dl, r8b
call fcn.140005d24
cmp al, r12b
jne 0x1400062ea
lea rcx, str.USERPROFILE
mov r8d, esi
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, r12d
jbe 0x1400060dc
lea rdx, str.AppDataLocalTemp
mov rcx, rdi
call fcn.140014cf0
cmp rax, r12
je 0x1400060dc
mov r8b, 1
xor edx, edx
mov rcx, rdi
call fcn.140005d24
cmp al, r12b
jne 0x1400062ea
lea rcx, str.HOMEDRIVE
mov r8d, esi
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, r12d
jbe 0x140006137
mov rcx, rdi
call fcn.140014638
mov ebx, esi
mov rcx, rdi
sub ebx, eax
call fcn.140014638
lea rcx, str.HOMEPATH
lea rdx, [rdi + rax*2]
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, r12d
jbe 0x140006137
mov r8b, 1
xor edx, edx
mov rcx, rdi
call fcn.140005d24
cmp al, r12b
jne 0x1400062ea
mov edx, esi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
cmp eax, r12d
jbe 0x140006171
lea rdx, [0x1400305f0]
mov rcx, rdi
call fcn.140014cf0
cmp rax, r12
je 0x140006171
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.140005d24
cmp al, r12b
jne 0x1400062ea
lea rdx, str.c:_temp
mov rcx, rdi
call fcn.140014d1c
cmp rax, r12
je 0x14000619b
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.140005d24
cmp al, r12b
jne 0x1400062ea
lea rdx, str.c:_tmp
mov rcx, rdi
call fcn.140014d1c
cmp rax, r12
je 0x1400061c5
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.140005d24
cmp al, r12b
jne 0x1400062ea
mov edx, esi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
cmp eax, r12d
jbe 0x1400061eb
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.140005d24
cmp al, r12b
jne 0x1400062ea
lea rdx, str.c:_tmp
mov rcx, rdi
call fcn.140014d1c
cmp rax, r12
je 0x140006215
xor r8d, r8d
mov dl, 1
mov rcx, rdi
call fcn.140005d24
cmp al, r12b
jne 0x1400062ea
mov rdx, rdi
mov ecx, esi
mov byte [0x140048ed2], 1
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp eax, r12d
jbe 0x140006242
xor r8d, r8d
mov dl, 1
mov rcx, rdi
call fcn.140005d24
cmp al, r12b
jne 0x1400062ea
lea rcx, str.USERPROFILE
mov r8d, esi
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, r12d
jbe 0x140006280
lea rdx, str.AppDataLocalTemp
mov rcx, rdi
call fcn.140014cf0
cmp rax, r12
je 0x140006280
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.140005d24
cmp al, r12b
jne 0x1400062ea
lea rcx, str.HOMEDRIVE
mov r8d, esi
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, r12d
jbe 0x1400062d5
mov rcx, rdi
call fcn.140014638
mov rcx, rdi
sub esi, eax
call fcn.140014638
lea rcx, str.HOMEPATH
lea rdx, [rdi + rax*2]
mov r8d, esi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, r12d
jbe 0x1400062d5
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.140005d24
cmp al, r12b
jne 0x1400062ea
mov word [rdi], r12w
cmp bpl, r12b
je 0x1400062ea
xor edx, edx
mov ecx, 0x3f7
call fcn.140004efc
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