Function at 0x140006358
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 0x1400063a6
mov r8b, 1
mov rcx, rdi
mov dl, r8b
call fcn.140006030
cmp al, r12b
jne 0x1400065f6
lea rcx, str.USERPROFILE
mov r8d, esi
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, r12d
jbe 0x1400063e8
lea rdx, str.AppDataLocalTemp
mov rcx, rdi
call fcn.140015740
cmp rax, r12
je 0x1400063e8
mov r8b, 1
xor edx, edx
mov rcx, rdi
call fcn.140006030
cmp al, r12b
jne 0x1400065f6
lea rcx, str.HOMEDRIVE
mov r8d, esi
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, r12d
jbe 0x140006443
mov rcx, rdi
call fcn.140015088
mov ebx, esi
mov rcx, rdi
sub ebx, eax
call fcn.140015088
lea rcx, str.HOMEPATH
lea rdx, [rdi + rax*2]
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, r12d
jbe 0x140006443
mov r8b, 1
xor edx, edx
mov rcx, rdi
call fcn.140006030
cmp al, r12b
jne 0x1400065f6
mov edx, esi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
cmp eax, r12d
jbe 0x14000647d
lea rdx, [0x140030830]
mov rcx, rdi
call fcn.140015740
cmp rax, r12
je 0x14000647d
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.140006030
cmp al, r12b
jne 0x1400065f6
lea rdx, str.c:_temp
mov rcx, rdi
call fcn.14001576c
cmp rax, r12
je 0x1400064a7
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.140006030
cmp al, r12b
jne 0x1400065f6
lea rdx, str.c:_tmp
mov rcx, rdi
call fcn.14001576c
cmp rax, r12
je 0x1400064d1
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.140006030
cmp al, r12b
jne 0x1400065f6
mov edx, esi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
cmp eax, r12d
jbe 0x1400064f7
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.140006030
cmp al, r12b
jne 0x1400065f6
lea rdx, str.c:_tmp
mov rcx, rdi
call fcn.14001576c
cmp rax, r12
je 0x140006521
xor r8d, r8d
mov dl, 1
mov rcx, rdi
call fcn.140006030
cmp al, r12b
jne 0x1400065f6
mov rdx, rdi
mov ecx, esi
mov byte [0x140047762], 1
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp eax, r12d
jbe 0x14000654e
xor r8d, r8d
mov dl, 1
mov rcx, rdi
call fcn.140006030
cmp al, r12b
jne 0x1400065f6
lea rcx, str.USERPROFILE
mov r8d, esi
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, r12d
jbe 0x14000658c
lea rdx, str.AppDataLocalTemp
mov rcx, rdi
call fcn.140015740
cmp rax, r12
je 0x14000658c
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.140006030
cmp al, r12b
jne 0x1400065f6
lea rcx, str.HOMEDRIVE
mov r8d, esi
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, r12d
jbe 0x1400065e1
mov rcx, rdi
call fcn.140015088
mov rcx, rdi
sub esi, eax
call fcn.140015088
lea rcx, str.HOMEPATH
lea rdx, [rdi + rax*2]
mov r8d, esi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, r12d
jbe 0x1400065e1
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.140006030
cmp al, r12b
jne 0x1400065f6
mov word [rdi], r12w
cmp bpl, r12b
je 0x1400065f6
xor edx, edx
mov ecx, 0x3f7
call fcn.140004f50
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