Function at 0x1400014f0
Capabilities:
Get file size
Read file on windows

Disassembly:
mov rax, rsp
push rbx
push rdi
push r12
push r14
push r15
sub rsp, 0x40
xor r12d, r12d
mov r14, r8
mov qword [rax - 0x38], r12
mov r15, rdx
mov dword [rax - 0x40], 0x80
xor r9d, r9d
mov edx, 0x80000000
mov dword [rax - 0x48], 3
mov r8d, 1
mov dword [rax + 0x20], r12d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400015c1
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov r8d, 0x208
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x1400015b2
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.____Failed_to_open_file._Error:__lu_n
mov rcx, rdi
mov r8d, eax
call qword [sym.imp.USER32.dll_wsprintfA]
mov ecx, 0xfffffff5
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
xor r9d, r9d
mov qword [rsp + 0x20], r12
mov rcx, rax
mov r8d, ebx
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_WriteConsoleA]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
add rsp, 0x40
pop r15
pop r14
pop r12
pop rdi
pop rbx
ret
mov qword [rsp + 0x70], rbp
xor edx, edx
mov rcx, rdi
mov qword [rsp + 0x78], rsi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp eax, 0xffffffff
jne 0x14000161e
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov r8d, 0x208
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rsi, rax
test rax, rax
je 0x140001793
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.____Failed_to_get_file_size._Error:__lu_n
mov rcx, rsi
mov r8d, eax
call qword [sym.imp.USER32.dll_wsprintfA]
jmp 0x140001673
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rsi, rax
test rax, rax
jne 0x14000169c
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov r8d, 0x208
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rsi, rax
test rax, rax
je 0x140001793
lea rdx, str.____Memory_allocation_failed._n
mov rcx, rax
call qword [sym.imp.USER32.dll_wsprintfA]
mov ecx, 0xfffffff5
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
xor r9d, r9d
mov qword [rsp + 0x20], r12
mov rcx, rax
mov r8d, ebx
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_WriteConsoleA]
jmp 0x14000177f
lea r9, [rsp + 0x88]
mov qword [rsp + 0x20], r12
mov r8d, ebx
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400016fd
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov r8d, 0x208
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x14000177f
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.____Failed_to_read_file._Error:__lu_n
mov rcx, rbp
mov r8d, eax
call qword [sym.imp.USER32.dll_wsprintfA]
jmp 0x140001747
cmp dword [rsp + 0x88], ebx
je 0x1400017a0
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov r8d, 0x208
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x14000177f
mov r9d, dword [rsp + 0x88]
lea rdx, str.____Read_size_mismatch._Expected:__lu__Actual:__lu_n
mov r8d, ebx
mov rcx, rax
call qword [sym.imp.USER32.dll_wsprintfA]
mov ecx, 0xfffffff5
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
xor r9d, r9d
mov qword [rsp + 0x20], r12
mov rcx, rax
mov r8d, ebx
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_WriteConsoleA]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbp
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
xor edx, edx
mov r8, rsi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1400017b4
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [r15], rsi
mov eax, 1
mov qword [r14], rbx
mov rbp, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x40
pop r15
pop r14
pop r12
pop rdi
pop rbx
ret