Function at 0x140012620
Capabilities:
Get common file path

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x20], r9
mov qword [rax + 0x18], r8
push rbp
push rsi
push rdi
push r12
push r14
sub rsp, 0x40
and qword [rax + 0x20], 0
lea rcx, [rax + 0x20]
mov edi, 0x104
xor esi, esi
mov edx, edi
mov qword [rax + 0x18], rsi
or rbp, 0xffffffffffffffff
call fcn.1400118c0
mov ebx, eax
test eax, eax
js 0x140012872
mov rdx, qword [rsp + 0x88]
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
xor edi, edi
lea r12d, [rbp + 2]
mov r14d, 0x80000000
cmp rbp, 0xffffffffffffffff
jne 0x140012736
mov r8, qword [rsp + 0x88]
lea rax, [0x1400383d8]
mov qword [rsp + 0x28], rax
lea r9, [0x140038120]
lea rdx, str._s_S_05d._S
mov dword [rsp + 0x20], edi
lea rcx, [rsp + 0x80]
call fcn.140011a18
mov rsi, qword [rsp + 0x80]
mov ebx, eax
test eax, eax
js 0x140012865
and qword [rsp + 0x30], 0
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
mov r8d, r12d
mov edx, 0x40000000
mov dword [rsp + 0x20], r12d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbp, rax
cmp rax, 0xffffffffffffffff
jne 0x140012727
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
lea eax, [rbx + r14]
test r14d, eax
jne 0x140012727
cmp ebx, 0x80070050
jne 0x140012865
add edi, r12d
cmp edi, 0x3e8
jl 0x14001267f
mov r14, qword [0x14003fcc0]
xor ebx, ebx
xor edi, edi
test r14, r14
je 0x140012770
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapSize]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x14001276d
mov ebx, 0x80070057
jmp 0x14001284b
shr rdi, 1
and dword [rsp + 0x28], ebx
or r9d, 0xffffffff
and qword [rsp + 0x20], rbx
mov r8, rsi
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
sub eax, r12d
movsxd r14, eax
jne 0x1400127b1
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x14001284b
lea rax, [r14 + 1]
cmp rdi, rax
jae 0x14001280f
mov rdi, rax
cmp rax, 0x7fffffff
jae 0x1400127ff
mov r14, qword [0x14003fcc0]
lea r12, [rax + rax]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov rcx, rax
test r14, r14
je 0x1400127f1
mov r9, r12
mov r8, r14
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
jmp 0x1400127fa
mov r8, r12
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
jne 0x140012806
mov ebx, 0x8007000e
jmp 0x14001284b
mov qword [0x14003fcc0], rax
jmp 0x140012816
mov rax, qword [0x14003fcc0]
mov dword [rsp + 0x28], edi
or r9d, 0xffffffff
mov r8, rsi
mov qword [rsp + 0x20], rax
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x14001284b
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov qword [0x14003e9d8], rbp
test ebx, ebx
jns 0x140012865
cmp rbp, 0xffffffffffffffff
je 0x140012865
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rsi, rsi
je 0x140012872
mov rcx, rsi
call fcn.1400152f4
cmp qword [rsp + 0x88], 0
je 0x14001288a
mov rcx, qword [rsp + 0x88]
call fcn.1400152f4
mov eax, ebx
mov rbx, qword [rsp + 0x70]
add rsp, 0x40
pop r14
pop r12
pop rdi
pop rsi
pop rbp
ret