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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x40
xor r14d, r14d
mov rbx, r8
and qword [rax - 0x28], r14
mov r15, rdx
and dword [rax - 0x30], r14d
xor r9d, r9d
mov edx, 0x80000000
mov dword [rax - 0x38], 3
lea r8d, [r14 + 1]
mov rdi, rcx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
nop dword [rax + rax]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400053dc
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
add eax, 0xfffffffe
cmp eax, 1
jbe 0x1400053c3
cmp ebx, 5
je 0x14000539f
lea eax, [rbx - 0x20]
cmp eax, 1
ja 0x1400053a7
mov rcx, rdi
call fcn.140005634
mov r9d, ebx
lea rdx, str.Failed_to_open_file__s_for_read__Error_code___x
mov r8, rdi
mov ecx, 4
call fcn.14000f424
jmp 0x140005534
mov r8, rdi
lea rdx, str.Unable_to_open_file__s_for_read_because_the_file_or_path_does_not_exist
mov ecx, 2
call fcn.14000f424
jmp 0x140005534
lea rdx, [rsp + 0x78]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
nop dword [rax + rax]
test eax, eax
jne 0x140005433
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
cmp eax, 5
je 0x14000540f
add eax, 0xffffffe0
cmp eax, 1
ja 0x140005417
mov rcx, rdi
call fcn.140005634
lea rdx, str.Failed_to_get_file_size_for__s__Error_code___x
mov r8, rdi
mov r9d, ebx
mov ecx, 4
call fcn.14000f424
jmp 0x140005525
cmp dword [rsp + 0x7c], r14d
je 0x140005456
mov ebx, 0x57
lea rdx, str.File__s_is_too_large_
mov r8, rdi
lea ecx, [rbx - 0x53]
call fcn.14000f424
jmp 0x140005525
mov eax, dword [rsp + 0x78]
xor r9d, r9d
and qword [rsp + 0x28], r14
xor edx, edx
mov rcx, rsi
mov dword [rsp + 0x20], eax
lea r8d, [r9 + 2]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
nop dword [rax + rax]
mov rbp, rax
test rax, rax
jne 0x1400054b2
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
cmp eax, 5
je 0x14000549e
add eax, 0xffffffe0
cmp eax, 1
ja 0x1400054a6
mov rcx, rdi
call fcn.140005634
lea rdx, str.CreateFileMapping__s__failed__Error_code___x
jmp 0x14000541e
mov eax, dword [rsp + 0x78]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rcx, rbp
lea edx, [r9 + 4]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
nop dword [rax + rax]
mov r14, rax
test rax, rax
jne 0x140005544
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
cmp eax, 5
je 0x1400054f7
lea ecx, [rax - 0x20]
cmp ecx, 1
ja 0x1400054ff
mov rcx, rdi
call fcn.140005634
mov r9d, ebx
lea rdx, str.MapViewOfFile__s__failed__Error_code___x
mov r8, rdi
mov ecx, 4
call fcn.14000f424
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
jmp 0x140005556
mov eax, dword [rsp + 0x78]
mov dword [r15], eax
mov qword [rbx], rsi
mov qword [rbx + 8], rbp
mov qword [rbx + 0x10], r14
mov rbx, qword [rsp + 0x60]
mov rax, r14
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x40
pop r15
pop r14
pop rdi
ret