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

Disassembly:
mov dword [rsp + 0x18], r8d
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x70
xor esi, esi
mov dword [rsp + 0x48], 0x18
mov r14d, 3
mov qword [rsp + 0x50], rsi
mov r8d, edx
mov r12d, 1
and r8d, r14d
mov dword [rsp + 0x58], r12d
mov edi, edx
mov r15, rcx
cmp r8d, 2
ja 0x14001462b
mov eax, edx
and eax, 9
cmp al, 9
jne 0x14001463b
or eax, 0xffffffff
add rsp, 0x70
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
mov qword [rsp + 0xa0], rbx
mov qword [rsp + 0x60], r13
mov r13d, 2
test r8d, r8d
jne 0x1400146fc
mov ebx, 0x80000000
mov eax, r14d
mov qword [rsp + 0x30], rsi
mov edx, ebx
mov dword [rsp + 0x28], 0x80
lea r9, [rsp + 0x48]
mov qword [rsp + 0x68], rbp
mov r8d, r14d
mov rcx, r15
cmp edi, 0x10a
je 0x14001471c
mov dword [rsp + 0x20], eax
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_CreateFileW]
mov rbp, rax
cmp rax, 0xffffffffffffffff
je 0x140014811
mov edx, 8
mov rcx, rbp
call qword [sym.imp.msvcrt.dll__open_osfhandle]
mov ebx, eax
test dil, 8
jne 0x140014775
lea eax, [rbx - 3]
mov edx, ebx
cmp eax, 0x5b
ja 0x1400146e3
cmp ebx, 0x1f
jg 0x14001eaa7
movsxd rax, esi
lea rcx, [0x1400303a0]
lea rcx, [rcx + rax*4]
mov eax, dword [rcx]
bts eax, edx
mov dword [rcx], eax
mov eax, ebx
mov rbp, qword [rsp + 0x68]
mov rbx, qword [rsp + 0xa0]
mov r13, qword [rsp + 0x60]
jmp 0x14001462e
lea rdx, [0x140028bc0]
mov ebx, 0x40000000
call qword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
mov eax, r13d
cmovne r14d, r12d
jmp 0x14001465f
bts edx, 0x1f
mov dword [rsp + 0x20], 3
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_CreateFileW]
mov rbp, rax
cmp rax, 0xffffffffffffffff
jne 0x1400146a1
mov qword [rsp + 0x30], rsi
lea r9, [rsp + 0x48]
mov dword [rsp + 0x28], 0x80
mov r8d, r14d
mov edx, ebx
mov dword [rsp + 0x20], 4
mov rcx, r15
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_CreateFileW]
mov rbp, rax
cmp rax, 0xffffffffffffffff
jne 0x1400146a1
jmp 0x14001ea0e
mov ecx, eax
call fcn.14000b708
test eax, eax
jne 0x1400146bb
lea rdx, [rsp + 0x44]
mov rcx, rbp
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_GetFileSize]
mov dword [rsp + 0x40], eax
cmp qword [rsp + 0x40], rsi
je 0x1400146bb
mov r9d, r13d
mov word [rsp + 0xb0], si
lea r8, [rsp + 0xa8]
mov dword [rsp + 0xa8], 0xffffffff
or edx, 0xffffffff
mov rcx, rbp
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x14001ea26
lea r9, [rsp + 0xb8]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0xb0]
mov rcx, rbp
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_ReadFile]
test eax, eax
je 0x14001ea5c
cmp word [rsp + 0xb0], 0x1a
jne 0x1400146bb
jmp 0x14001ea7f
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov dword [0x140046d88], eax
cmp eax, 0x6e
je 0x14001482a
or eax, 0xffffffff
jmp 0x1400146e5
mov dword [0x140046d88], r13d
jmp 0x140014822
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
cmp eax, 0x6e
cmove eax, r13d
mov dword [0x140046d88], eax
jmp 0x140014822
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov dword [0x140046d88], eax
test eax, eax
je 0x1400147d4
cmp ebx, 0xffffffff
je 0x14001ea4d
mov ecx, ebx
call qword [sym.imp.msvcrt.dll__close]
nop
jmp 0x140014822
mov rcx, rbp
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop
jmp 0x140014822
mov r9d, r13d
mov dword [rsp + 0xa8], esi
lea r8, [rsp + 0xa8]
xor edx, edx
mov rcx, rbp
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_SetFilePointer]
nop
jmp 0x1400147fd
mov r9d, r13d
mov dword [rsp + 0xa8], 0xffffffff
lea r8, [rsp + 0xa8]
or edx, 0xffffffff
mov rcx, rbp
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_SetFilePointer]
nop
jmp 0x1400146bb
lea eax, [rbx - 0x20]
shr eax, 5
inc eax
mov esi, eax
shl eax, 5
sub edx, eax
jmp 0x1400146ce