Function at 0x18008f000
Capabilities:
Check if file exists
Delete file
Read file via mapping

Disassembly:
mov r11, rsp
push rbp
push rsi
push r14
sub rsp, 0x290
mov rax, qword [0x180146748]
xor rax, rsp
mov qword [rsp + 0x260], rax
cmp dword [rcx + 0x20], 0
mov rbp, r8
mov r9, rdx
mov qword [rsp + 0x40], rdx
mov rsi, rcx
jne 0x18008f27d
test r8, r8
je 0x18008f27d
mov r8, qword [rcx + 0x30]
movabs rax, 0xa3d70a3d70a3d70b
mov rcx, qword [rcx + 0x38]
sub rcx, r8
imul rcx
add rdx, rcx
sar rdx, 9
mov rax, rdx
shr rax, 0x3f
add rax, rdx
cdqe
cmp r9, rax
jae 0x18008f27d
imul r14, r9, 0x320
mov rax, qword [r14 + r8]
test byte [rax + 0x26], 0x10
jne 0x18008f27d
mov qword [r11 + 0x20], rbx
xor ebx, ebx
test byte [rax + 8], 1
mov qword [r11 - 0x20], rdi
jne 0x18008f260
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x208
call fcn.1800bbd80
mov r8, rbp
lea rcx, [rsp + 0x50]
mov edx, 0x104
call fcn.1800c2638
lea rcx, [rsp + 0x50]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea rcx, [rsp + 0x50]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x18008f0e9
lea rdx, [rsp + 0x50]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHCreateDirectory]
mov qword [rsp + 0x30], rbx
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
xor r8d, r8d
mov edx, 0xc0000000
mov dword [rsp + 0x20], 2
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x18008f260
mov rcx, qword [rsi + 0x30]
mov qword [rsp + 0x280], r12
mov rdx, qword [rcx + r14]
mov r12d, dword [rdx + 0x18]
test r12d, r12d
jne 0x18008f142
lea ebx, [r12 + 1]
jmp 0x18008f24b
xor r9d, r9d
xor r8d, r8d
mov edx, r12d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x18008f24b
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x18008f24b
xor r9d, r9d
mov qword [rsp + 0x28], rbx
xor edx, edx
mov qword [rsp + 0x270], r15
mov rcx, rdi
mov dword [rsp + 0x20], ebx
lea r8d, [r9 + 4]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov r15, rax
test rax, rax
je 0x18008f243
xor r9d, r9d
mov qword [rsp + 0x278], r13
xor r8d, r8d
mov qword [rsp + 0x20], rbx
mov rcx, rax
lea edx, [r9 + 6]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov r13, rax
test rax, rax
je 0x18008f232
mov rdx, qword [rsp + 0x40]
mov r9d, r12d
mov r8, rax
mov rcx, rsi
call fcn.18008f2a0
test eax, eax
je 0x18008f229
mov rcx, qword [rsi + 0x30]
lea r8, [rsp + 0x48]
mov r9, qword [r14 + rcx]
movzx edx, word [r9 + 0xc]
movzx ecx, word [r9 + 0xe]
call qword [sym.imp.KERNEL32.dll_DosDateTimeToFileTime]
test eax, eax
je 0x18008f224
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
test eax, eax
je 0x18008f224
lea r9, [rsp + 0x40]
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFileTime]
mov ebx, 1
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r13, qword [rsp + 0x278]
mov r15, qword [rsp + 0x270]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r12, qword [rsp + 0x280]
test ebx, ebx
jne 0x18008f269
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rdi, qword [rsp + 0x288]
mov eax, ebx
mov rbx, qword [rsp + 0x2c8]
jmp 0x18008f27f
xor eax, eax
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.18008c720
add rsp, 0x290
pop r14
pop rsi
pop rbp
ret