Function at 0x180007000
Capabilities:
Get common file path

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
lea rbp, [rsp - 0x360]
sub rsp, 0x460
mov rax, qword [0x180080920]
xor rax, rsp
mov qword [rbp + 0x350], rax
mov rdi, r8
mov rbx, rdx
mov rsi, rcx
xor edx, edx
mov r8d, 0x400
lea rcx, [rsp + 0x50]
call fcn.18004c900
xor r14d, r14d
test rdi, rdi
je 0x1800070fe
mov rdx, rdi
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
movsxd rcx, eax
cmp word [rsp + rcx*2 + 0x4e], 0x5c
je 0x18000708a
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
movsxd rcx, eax
mov eax, 0x5c
mov word [rsp + rcx*2 + 0x50], ax
mov rdx, rsi
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
xor r9d, r9d
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], pe_nt_image_headers64
lea rcx, [rsp + 0x50]
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x1800070fe
lea rdx, [rsp + 0x40]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x1800072c0
test byte [rsp + 0x40], 2
jne 0x1800072c0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x1800072c6
test rsi, rsi
je 0x1800072c4
xor r9d, r9d
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], pe_nt_image_headers64
mov edx, 0x80000000
mov rcx, rsi
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x1800070cd
mov edx, 0x200
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x1800071ae
lea rdx, [0x18006cd1c]
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
mov rdx, rsi
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
mov qword [rsp + 0x30], r14
lea r8d, [rdi + 2]
mov dword [rsp + 0x28], pe_nt_image_headers64
lea rcx, [rsp + 0x50]
xor r9d, r9d
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, rdi
je 0x1800071ae
mov rcx, rax
call fcn.18000d5c0
mov al, 1
jmp 0x1800072c6
mov edx, 0x200
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x180007214
lea rdx, [0x18006cd4c]
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
mov rdx, rsi
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
xor r9d, r9d
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], pe_nt_image_headers64
lea rcx, [rsp + 0x50]
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
jne 0x18000719f
test rbx, rbx
je 0x1800072c4
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
movsxd rcx, eax
test eax, eax
jle 0x180007241
nop dword [rax]
cmp word [rbx + rcx*2], 0x5c
je 0x180007241
dec eax
dec rcx
test rcx, rcx
jg 0x180007230
movsxd r8, eax
test eax, eax
js 0x18000725b
inc r8
lea rcx, [rsp + 0x50]
add r8, r8
mov rdx, rbx
call fcn.18004c130
mov rdx, rsi
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
xor r9d, r9d
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], pe_nt_image_headers64
lea rcx, [rsp + 0x50]
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1800072c4
lea rdx, [rsp + 0x40]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x1800072c0
test byte [rsp + 0x40], 2
jne 0x1800072c0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x1800072c6
xor al, al
mov rcx, qword [rbp + 0x350]
xor rcx, rsp
call fcn.180049ad0
add rsp, 0x460
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret