Function at 0x18005af20
Capabilities:
Check if file exists
Get file size

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x510
mov qword [rsp + 0xb0], 0xfffffffffffffffe
mov qword [rsp + 0x568], rbx
mov rax, qword [0x18010f050]
xor rax, rsp
mov qword [rsp + 0x500], rax
mov r13, r8
mov rsi, rdx
mov rbp, rcx
test rdx, rdx
je 0x18005b3e3
cmp word [rdx], 0
je 0x18005b3e3
mov edx, 0xc0000000
mov r15d, 0x80000000
cmp dword [rcx + 0x24], 0
cmovne edx, r15d
xor r14d, r14d
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x20000000
mov dword [rsp + 0x20], 3
xor r9d, r9d
lea r8d, [r14 + 1]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
mov qword [rsp + 0x70], rax
cmp rax, 0xffffffffffffffff
jne 0x18005b032
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x18005aff0
cmp eax, 0x20
je 0x18005aff0
cmp eax, 0xa7
je 0x18005aff0
cmp eax, 0x21
je 0x18005aff0
cmp eax, 0x13
je 0x18005aff0
test eax, eax
jle 0x18005afeb
movzx eax, ax
or eax, 0x80070000
jmp 0x18005b3e8
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 3
xor r9d, r9d
lea r8d, [r9 + 1]
mov edx, r15d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x18005b029
call fcn.180003220
nop
jmp 0x18005b3e8
mov dword [rbp + 0x24], 1
jmp 0x18005b057
cmp dword [rbp + 0x24], 0
jne 0x18005b057
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rsi
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
lea rcx, [rbp + 0x70]
mov rdx, rsi
call fcn.180002890
xor edx, edx
lea r8d, [rdx + 0x5c]
mov rcx, rsi
call qword [sym.imp.SHLWAPI.dll_StrRChrW]
mov rdi, rax
test rax, rax
jne 0x18005b081
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x80004005
jmp 0x18005b3e8
mov word [rsp + 0x2f0], r14w
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x2f2]
call fcn.1800795c0
sub rdi, rsi
sar rdi, 1
lea r8d, [rdi + 2]
mov rdx, rsi
lea rcx, [rsp + 0x2f0]
call qword [sym.imp.SHLWAPI.dll_StrCpyNW]
xor edx, edx
mov qword [rsp + 0xb8], rdx
mov qword [rsp + 0xc0], rdx
mov qword [rsp + 0xc8], rdx
mov qword [rsp + 0xd0], rdx
mov word [rsp + 0xe0], r14w
mov r8d, 0x206
lea rcx, [rsp + 0xe2]
call fcn.1800795c0
xor edx, edx
mov qword [rsp + 0x80], rdx
mov qword [rsp + 0x88], rdx
mov qword [rsp + 0x90], rdx
mov qword [rsp + 0x98], rdx
mov qword [rsp + 0xa0], rdx
mov qword [rsp + 0xa8], rdx
lea r9, [rsp + 0xb8]
lea r8, [rsp + 0x80]
mov rdx, rbx
mov rcx, rbp
call fcn.18005b420
mov edi, eax
test eax, eax
js 0x18005b3d0
nop
cmp edi, 1
je 0x18005b3d0
mov qword [rsp + 0x78], r14
lea rdx, [rsp + 0x78]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x18005b3b6
mov rax, qword [rsp + 0x78]
cqo
and edx, 0x1ff
add rax, rdx
and eax, 0x1ff
cmp rax, rdx
jne 0x18005b3a0
mov qword [rsp + 0x70], 0xffffffffffffffff
mov qword [rsp + 0x80], rbx
lea rcx, [rbp + 0xa8]
lea rdx, [rsp + 0x80]
call fcn.18005cea0
mov r9, qword [rsp + 0xc0]
mov r12, qword [rsp + 0xb8]
test r12, r12
jne 0x18005b1d5
test r9, r9
je 0x18005b384
movzx eax, byte [rsp + 0xc7]
movzx ecx, byte [rsp + 0xc6]
movzx edx, byte [rsp + 0xc5]
movzx edi, byte [rsp + 0xc4]
movzx r8d, byte [rsp + 0xc3]
movzx r10d, byte [rsp + 0xc2]
movzx r11d, byte [rsp + 0xc1]
movzx r9d, r9b
movzx ebx, word [rsp + 0xbe]
movzx esi, word [rsp + 0xbc]
mov dword [rsp + 0x68], eax
mov dword [rsp + 0x60], ecx
mov dword [rsp + 0x58], edx
mov dword [rsp + 0x50], edi
mov dword [rsp + 0x48], r8d
mov dword [rsp + 0x40], r10d
mov dword [rsp + 0x38], r11d
mov dword [rsp + 0x30], r9d
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], esi
mov r9d, r12d
lea r8, [rsp + 0x2f0]
lea rdx, str._s_08x__04x__04x__02x_02x__02x_02x_02x_02x_02x_02x.vdi
lea rcx, [rsp + 0xe0]
call qword [sym.imp.USER32.dll_wsprintfW]
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 3
xor r9d, r9d
lea r8d, [r9 + 1]
mov edx, r15d
lea rcx, [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
mov qword [rsp + 0x70], rax
cmp rax, 0xffffffffffffffff
jne 0x18005b32c
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x18005b392
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0xe0]
call fcn.1800795c0
mov rax, qword [r13]
mov r8d, 0x104
lea rdx, [rsp + 0xe0]
mov rcx, r13
call qword [rax + 0x30]
test eax, eax
js 0x18005b390
cmp eax, 1
je 0x18005b390
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 3
xor r9d, r9d
lea r8d, [rbx + 2]
mov edx, r15d
lea rcx, [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x18005b388
xor eax, eax
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x88], rax
mov qword [rsp + 0x90], rax
mov qword [rsp + 0x98], rax
mov qword [rsp + 0xa0], rax
mov qword [rsp + 0xa8], rax
lea r9, [rsp + 0xb8]
lea r8, [rsp + 0x80]
mov rdx, rbx
mov rcx, rbp
call fcn.18005b420
mov edi, eax
test eax, eax
js 0x18005b3d0
jmp 0x18005b150
xor eax, eax
jmp 0x18005b3e8
call fcn.180003220
nop
jmp 0x18005b3e8
jmp 0x18005b3e8
test eax, eax
jle 0x18005b39e
movzx eax, ax
or eax, 0x80070000
jmp 0x18005b3e8
cmp rbx, 0xffffffffffffffff
je 0x18005b3af
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xe0034004
jmp 0x18005b3e8
call fcn.180003220
mov edi, eax
cmp rbx, 0xffffffffffffffff
je 0x18005b3cc
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
jmp 0x18005b3e8
cmp rbx, 0xffffffffffffffff
je 0x18005b3df
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
jmp 0x18005b3e8
mov eax, 0x80070057
mov rcx, qword [rsp + 0x500]
xor rcx, rsp
call fcn.180076a70
mov rbx, qword [rsp + 0x568]
add rsp, 0x510
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret