Function at 0x1800507f0
Capabilities:
Get file size
Read file via mapping

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1a0]
sub rsp, 0x2a0
mov qword [rbp - 0x70], 0xfffffffffffffffe
mov qword [rsp + 0x2e0], rbx
mov rdi, rdx
mov rbx, rcx
lea rdx, [rsp + 0x78]
call fcn.180052d30
nop
xor r15d, r15d
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x8000000
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r15 + 5]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x40], rax
mov rdx, qword [rsp + 0x78]
add rdx, 0xffffffffffffffe8
or ecx, 0xffffffff
lock xadd dword [rdx + 0x10], ecx
sub ecx, 1
jg 0x180050885
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
cmp r14, 0xffffffffffffffff
je 0x180050d12
lea rdx, [rsp + 0x50]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x180050d18
mov r8, rdi
lea rdx, [rbp - 0x80]
mov rcx, rbx
call fcn.180052a40
nop
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x8000000
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 5]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
mov qword [rbp + 0x1f8], rax
mov rdx, qword [rbp - 0x80]
add rdx, 0xffffffffffffffe8
or ecx, 0xffffffff
lock xadd dword [rdx + 0x10], ecx
sub ecx, 1
jg 0x180050907
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
cmp r12, 0xffffffffffffffff
je 0x180050d1e
lea rdx, [rbp - 0x78]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x180050d24
mov rax, qword [rsp + 0x50]
cmp rax, qword [rbp - 0x78]
je 0x18005098f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x180050d2a
mov qword [rbp + 0x1f8], 0xffffffffffffffff
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x180050d82
mov qword [rsp + 0x40], 0xffffffffffffffff
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x180050cf7
test rax, rax
jne 0x1800509df
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x180050dda
mov qword [rbp + 0x1f8], 0xffffffffffffffff
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x180050e32
jmp 0x180050ce4
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor edx, edx
lea r8d, [r9 + 2]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov rsi, rax
mov qword [rbp + 0x1f0], rax
lea rcx, [rax + 1]
test rcx, 0xfffffffffffffffe
je 0x180050e8a
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor edx, edx
lea r8d, [r9 + 2]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov r15, rax
mov qword [rsp + 0x48], rax
lea rcx, [rax + 1]
test rcx, 0xfffffffffffffffe
je 0x180050e90
mov r13, qword [rsp + 0x50]
xor r14d, r14d
mov ebx, r14d
mov ecx, 0xffffffff
mov qword [rsp + 0x58], rbx
mov rax, r13
sub rax, rbx
mov edi, 0x100000
cmp rax, rdi
cmovb rdi, rax
cmp rbx, r13
jae 0x180050c4c
cmp rdi, rcx
ja 0x18005117a
mov r8, rbx
shr r8, 0x20
mov qword [rsp + 0x20], rdi
mov r9d, ebx
mov edx, 4
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov r14, rax
mov qword [rsp + 0x68], rax
test rax, rax
je 0x180051174
mov qword [rsp + 0x20], rdi
mov r9d, ebx
mov r8d, dword [rsp + 0x5c]
mov edx, 4
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rsi, rax
mov qword [rsp + 0x60], rax
test rax, rax
je 0x18005116e
mov r8, rdi
mov rdx, rax
mov rcx, r14
call fcn.1800b23d0
nop
test eax, eax
jne 0x180050b5b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r15d, eax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
je 0x180050eee
mov qword [rsp + 0x60], 0
mov ecx, r15d
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
je 0x180050e96
xor r14d, r14d
mov qword [rsp + 0x68], r14
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_SetLastError]
add rbx, rdi
mov r15, qword [rsp + 0x48]
mov rsi, qword [rbp + 0x1f0]
jmp 0x180050a56
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
je 0x180050f46
xor edi, edi
mov qword [rsp + 0x60], rdi
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
je 0x180050f9e
mov qword [rsp + 0x68], rdi
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x180050ff6
mov qword [rsp + 0x48], rdi
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rbp + 0x1f0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x180051054
mov qword [rbp + 0x1f0], rdi
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x1800510b2
mov qword [rbp + 0x1f8], 0xffffffffffffffff
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x180051110
jmp 0x180050977
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x180051195
mov qword [rsp + 0x48], r14
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x1800511f3
mov qword [rbp + 0x1f0], r14
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x180051251
mov qword [rbp + 0x1f8], 0xffffffffffffffff
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x1800512af
mov qword [rsp + 0x40], 0xffffffffffffffff
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov al, 1
mov rbx, qword [rsp + 0x2e0]
add rsp, 0x2a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.180039260
nop
call fcn.180039260
nop
call fcn.180039260
int3
call fcn.180039260
nop
call fcn.1800391e0
mov ecx, eax
lea r9, str.WinAPI
mov r8d, 0x29
lea rdx, [0x18011ae00]
call fcn.1800391c0
lea rax, str.WinAPI_FALSE___NO_ERROR
mov qword [rsp + 0x20], rax
mov r9d, 0x29
lea r8, [0x18011ae00]
mov edx, 0x80004005
lea rcx, [rbp - 0x68]
call fcn.18003a640
lea rdx, [0x18015e3c8]
lea rcx, [rbp - 0x68]
call fcn.1800b2060
nop
call fcn.1800391e0
mov ecx, eax
lea r9, str.WinAPI
mov r8d, 0x29
lea rdx, [0x18011ae00]
call fcn.1800391c0
lea rax, str.WinAPI_FALSE___NO_ERROR
mov qword [rsp + 0x20], rax
mov r9d, 0x29
lea r8, [0x18011ae00]
mov edx, 0x80004005
lea rcx, [rbp - 0x48]
call fcn.18003a640
lea rdx, [0x18015e3c8]
lea rcx, [rbp - 0x48]
call fcn.1800b2060
nop
call fcn.1800391e0
mov ecx, eax
lea r9, str.WinAPI
mov r8d, 0x29
lea rdx, [0x18011ae00]
call fcn.1800391c0
lea rax, str.WinAPI_FALSE___NO_ERROR
mov qword [rsp + 0x20], rax
mov r9d, 0x29
lea r8, [0x18011ae00]
mov edx, 0x80004005
lea rcx, [rbp - 0x28]
call fcn.18003a640
lea rdx, [0x18015e3c8]
lea rcx, [rbp - 0x28]
call fcn.1800b2060
nop
call fcn.1800391e0
mov ecx, eax
lea r9, str.WinAPI
mov r8d, 0x29
lea rdx, [0x18011ae00]
call fcn.1800391c0
lea rax, str.WinAPI_FALSE___NO_ERROR
mov qword [rsp + 0x20], rax
mov r9d, 0x29
lea r8, [0x18011ae00]
mov edx, 0x80004005
lea rcx, [rbp - 8]
call fcn.18003a640
lea rdx, [0x18015e3c8]
lea rcx, [rbp - 8]
call fcn.1800b2060
nop
call fcn.180039260
nop
call fcn.180039260
int3
call fcn.1800391e0
mov ecx, eax
lea r9, str.WinAPI
mov r8d, 0xd3
lea rdx, [0x18011ae00]
call fcn.1800391c0
lea rax, str.WinAPI_FALSE___NO_ERROR
mov qword [rsp + 0x20], rax
mov r9d, 0xd3
lea r8, [0x18011ae00]
mov edx, 0x80004005
lea rcx, [rbp + 0x18]
call fcn.18003a640
lea rdx, [0x18015e3c8]
lea rcx, [rbp + 0x18]
call fcn.1800b2060
nop
call fcn.1800391e0
mov ecx, eax
lea r9, str.WinAPI
mov r8d, 0xd3
lea rdx, [0x18011ae00]
call fcn.1800391c0
lea rax, str.WinAPI_FALSE___NO_ERROR
mov qword [rsp + 0x20], rax
mov r9d, 0xd3
lea r8, [0x18011ae00]
mov edx, 0x80004005
lea rcx, [rbp + 0x38]
call fcn.18003a640
lea rdx, [0x18015e3c8]
lea rcx, [rbp + 0x38]
call fcn.1800b2060
int3
call fcn.1800391e0
mov ecx, eax
lea r9, str.WinAPI
mov r8d, 0xd3
lea rdx, [0x18011ae00]
call fcn.1800391c0
lea rax, str.WinAPI_FALSE___NO_ERROR
mov qword [rsp + 0x20], rax
mov r9d, 0xd3
lea r8, [0x18011ae00]
mov edx, 0x80004005
lea rcx, [rbp + 0x58]
call fcn.18003a640
lea rdx, [0x18015e3c8]
lea rcx, [rbp + 0x58]
call fcn.1800b2060
nop
call fcn.1800391e0
mov ecx, eax
lea r9, str.WinAPI
mov r8d, 0xd3
lea rdx, [0x18011ae00]
call fcn.1800391c0
lea rax, str.WinAPI_FALSE___NO_ERROR
mov qword [rsp + 0x20], rax
mov r9d, 0xd3
lea r8, [0x18011ae00]
mov edx, 0x80004005
lea rcx, [rbp + 0x78]
call fcn.18003a640
lea rdx, [0x18015e3c8]
lea rcx, [rbp + 0x78]
call fcn.1800b2060
nop
call fcn.1800391e0
mov ecx, eax
lea r9, str.WinAPI
mov r8d, 0x47
lea rdx, [0x18011ae00]
call fcn.1800391c0
lea rax, str.WinAPI_FALSE___NO_ERROR
mov qword [rsp + 0x20], rax
mov r9d, 0x47
lea r8, [0x18011ae00]
mov edx, 0x80004005
lea rcx, [rbp + 0x98]
call fcn.18003a640
lea rdx, [0x18015e3c8]
lea rcx, [rbp + 0x98]
call fcn.1800b2060
nop
call fcn.1800391e0
mov ecx, eax
lea r9, str.WinAPI
mov r8d, 0x47
lea rdx, [0x18011ae00]
call fcn.1800391c0
lea rax, str.WinAPI_FALSE___NO_ERROR
mov qword [rsp + 0x20], rax
mov r9d, 0x47
lea r8, [0x18011ae00]
mov edx, 0x80004005
lea rcx, [rbp + 0xb8]
call fcn.18003a640
lea rdx, [0x18015e3c8]
lea rcx, [rbp + 0xb8]
call fcn.1800b2060
nop
call fcn.1800391e0
mov ecx, eax
lea r9, str.WinAPI
mov r8d, 0x29
lea rdx, [0x18011ae00]
call fcn.1800391c0
lea rax, str.WinAPI_FALSE___NO_ERROR
mov qword [rsp + 0x20], rax
mov r9d, 0x29
lea r8, [0x18011ae00]
mov edx, 0x80004005
lea rcx, [rbp + 0xd8]
call fcn.18003a640
lea rdx, [0x18015e3c8]
lea rcx, [rbp + 0xd8]
call fcn.1800b2060
nop
call fcn.1800391e0
mov ecx, eax
lea r9, str.WinAPI
mov r8d, 0x29
lea rdx, [0x18011ae00]
call fcn.1800391c0
lea rax, str.WinAPI_FALSE___NO_ERROR
mov qword [rsp + 0x20], rax
mov r9d, 0x29
lea r8, [0x18011ae00]
mov edx, 0x80004005
lea rcx, [rbp + 0xf8]
call fcn.18003a640
lea rdx, [0x18015e3c8]
lea rcx, [rbp + 0xf8]
call fcn.1800b2060
nop
call fcn.180039260
nop
call fcn.180039260
nop
xor r9d, r9d
mov r8d, 0x312
lea rdx, str.FilePath.cpp
mov ecx, 0xe0e00000
call fcn.18003abe0
nop
call fcn.1800391e0
mov ecx, eax
lea r9, str.WinAPI
mov r8d, 0x47
lea rdx, [0x18011ae00]
call fcn.1800391c0
lea rax, str.WinAPI_FALSE___NO_ERROR
mov qword [rsp + 0x20], rax
mov r9d, 0x47
lea r8, [0x18011ae00]
mov edx, 0x80004005
lea rcx, [rbp + 0x118]
call fcn.18003a640
lea rdx, [0x18015e3c8]
lea rcx, [rbp + 0x118]
call fcn.1800b2060
nop
call fcn.1800391e0
mov ecx, eax
lea r9, str.WinAPI
mov r8d, 0x47
lea rdx, [0x18011ae00]
call fcn.1800391c0
lea rax, str.WinAPI_FALSE___NO_ERROR
mov qword [rsp + 0x20], rax
mov r9d, 0x47
lea r8, [0x18011ae00]
mov edx, 0x80004005
lea rcx, [rbp + 0x138]
call fcn.18003a640
lea rdx, [0x18015e3c8]
lea rcx, [rbp + 0x138]
call fcn.1800b2060
nop
call fcn.1800391e0
mov ecx, eax
lea r9, str.WinAPI
mov r8d, 0x29
lea rdx, [0x18011ae00]
call fcn.1800391c0
lea rax, str.WinAPI_FALSE___NO_ERROR
mov qword [rsp + 0x20], rax
mov r9d, 0x29
lea r8, [0x18011ae00]
mov edx, 0x80004005
lea rcx, [rbp + 0x158]
call fcn.18003a640
lea rdx, [0x18015e3c8]
lea rcx, [rbp + 0x158]
call fcn.1800b2060
nop
call fcn.1800391e0
mov ecx, eax
lea r9, str.WinAPI
mov r8d, 0x29
lea rdx, [0x18011ae00]
call fcn.1800391c0
lea rax, str.WinAPI_FALSE___NO_ERROR
mov qword [rsp + 0x20], rax
mov r9d, 0x29
lea r8, [0x18011ae00]
mov edx, 0x80004005
lea rcx, [rbp + 0x178]
call fcn.18003a640
lea rdx, [0x18015e3c8]
lea rcx, [rbp + 0x178]
call fcn.1800b2060
int3