Function at 0x180017000
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
mov rax, rsp
push rdi
sub rsp, 0x4b0
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [0x18008c590]
xor rax, rsp
mov qword [rsp + 0x4a0], rax
mov rbx, rdx
mov rsi, rcx
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
lea rcx, [rsi + 0x20]
call fcn.180006ce0
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1800170b4
mov rcx, qword [rsi + 0x10]
cmp rcx, 0xffffffffffffffff
je 0x180017075
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 0x10], 0xffffffffffffffff
xor edi, edi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsi + 0x10], rax
cmp rax, 0xffffffffffffffff
jne 0x1800170ad
call fcn.180007a70
mov edi, eax
mov eax, edi
jmp 0x180017261
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1800170d1
and eax, 0x10
je 0x1800170d1
mov eax, 0x80004005
jmp 0x180017261
xor edi, edi
mov word [rsp + 0x80], di
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x82]
call fcn.18005c9d0
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
je 0x180017149
lea rdx, [rsp + 0x80]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x18001711e
call fcn.180007a70
jmp 0x180017261
lea rcx, [rsp + 0x80]
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov r8, rbx
mov edx, 0x104
lea rcx, [rsp + 0x80]
call fcn.180058a10
lea rbx, [rsp + 0x80]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov qword [rsp + 0x70], 7
mov qword [rsp + 0x68], rdi
mov word [rsp + 0x58], di
sub rax, rbx
sar rax, 1
mov r8, rax
mov rdx, rbx
lea rcx, [rsp + 0x50]
call fcn.180006ce0
nop
mov word [rsp + 0x290], di
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x292]
call fcn.18005c9d0
lea rcx, [rsp + 0x58]
cmp qword [rsp + 0x70], 8
cmovae rcx, qword [rsp + 0x58]
lea r9, [rsp + 0x290]
xor r8d, r8d
lea rdx, [0x18007e150]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x1800171e3
call fcn.180007a70
mov edi, eax
cmp qword [rsp + 0x70], 8
jb 0x1800171df
mov rcx, qword [rsp + 0x58]
call fcn.180057d7c
mov eax, edi
jmp 0x180017261
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x290]
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
lea rdx, [rsp + 0x290]
lea rcx, [rsi + 0x48]
call fcn.180006ce0
cmp qword [rsi + 0x60], 0
jne 0x18001722c
cmp qword [rsp + 0x70], 8
jb 0x180017225
mov rcx, qword [rsp + 0x58]
call fcn.180057d7c
mov eax, 0x80004005
jmp 0x180017261
cmp qword [rsi + 0x68], 8
jb 0x180017239
mov rdx, qword [rsi + 0x50]
jmp 0x18001723d
lea rdx, [rsi + 0x50]
mov r8d, 1
mov rcx, rsi
call fcn.180016ea0
mov edi, eax
cmp qword [rsp + 0x70], 8
jb 0x18001725f
mov rcx, qword [rsp + 0x58]
call fcn.180057d7c
mov eax, edi
mov rcx, qword [rsp + 0x4a0]
xor rcx, rsp
call fcn.180057da0
lea r11, [rsp + 0x4b0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret