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

Disassembly:
mov dword [rsp + 0x18], r8d
push rbx
push rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x60
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 0x14001272d
mov eax, edx
and eax, 9
cmp al, 9
jne 0x140012742
mov eax, 0xffffffff
add rsp, 0x60
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
test r8d, r8d
jne 0x1400127ef
mov ebx, 0x80000000
mov eax, r14d
mov qword [rsp + 0x30], rsi
mov edx, ebx
mov dword [rsp + 0x28], 0x80
lea r9, [rsp + 0x48]
mov r8d, r14d
mov rcx, r15
cmp edi, 0x10a
je 0x140012817
mov dword [rsp + 0x20], eax
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
nop dword [rax + rax]
mov rbp, rax
cmp rax, 0xffffffffffffffff
je 0x14001e2a0
mov edx, 8
mov rcx, rbp
call qword [sym.imp.msvcrt.dll__open_osfhandle]
nop dword [rax + rax]
mov ebx, eax
test dil, 8
jne 0x140012863
lea eax, [rbx - 3]
mov edx, ebx
cmp eax, 0x5b
ja 0x1400127dd
cmp ebx, 0x1f
jg 0x14001e370
mov eax, esi
lea rcx, [0x140045bb0]
lea rcx, [rcx + rax*4]
mov eax, dword [rcx]
bts eax, edx
mov dword [rcx], eax
mov eax, ebx
add rsp, 0x60
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
lea rdx, [0x140034410]
mov ebx, 0x40000000
call qword [sym.imp.msvcrt.dll__wcsicmp]
nop dword [rax + rax]
test eax, eax
mov eax, 2
cmovne r14d, r12d
jmp 0x140012753
bts edx, 0x1f
mov dword [rsp + 0x20], 3
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
nop dword [rax + rax]
mov rbp, rax
cmp rax, 0xffffffffffffffff
jne 0x140012796
mov qword [rsp + 0x30], rsi
lea r9, [rsp + 0x48]
mov dword [rsp + 0x28], 0x80
mov r8d, r14d
mov dword [rsp + 0x20], 4
mov edx, ebx
mov rcx, r15
jmp 0x14001277d
mov ecx, ebx
call fcn.1400101b8
test eax, eax
jne 0x1400127b6
lea rdx, [rsp + 0x44]
mov rcx, rbp
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileSize]
nop dword [rax + rax]
mov dword [rsp + 0x40], eax
cmp qword [rsp + 0x40], rsi
je 0x1400127b6
mov r9d, 2
mov word [rsp + 0xb0], si
lea r8, [rsp + 0xa8]
mov dword [rsp + 0xa8], 0xffffffff
mov rcx, rbp
lea edx, [r9 - 3]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
nop dword [rax + rax]
cmp eax, 0xffffffff
je 0x14001e2ca
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_1_0.dll_ReadFile]
nop dword [rax + rax]
test eax, eax
je 0x14001e312
cmp word [rsp + 0xb0], 0x1a
jne 0x1400127b6
jmp 0x14001e33e
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov dword [0x140045ba8], eax
cmp eax, 0x6e
jne 0x14001272d
mov dword [0x140045ba8], 2
jmp 0x14001272d
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov dword [0x140045ba8], eax
test eax, eax
je 0x1400128d2
cmp ebx, 0xffffffff
je 0x14001e2fd
mov ecx, ebx
call qword [sym.imp.msvcrt.dll__close]
nop dword [rax + rax]
nop
jmp 0x14001272d
mov rcx, rbp
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
nop
jmp 0x14001272d
mov r9d, 2
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_1_0.dll_SetFilePointer]
nop dword [rax + rax]
nop
jmp 0x140012901
mov r9d, 2
mov dword [rsp + 0xa8], 0xffffffff
lea r8, [rsp + 0xa8]
mov rcx, rbp
lea edx, [r9 - 3]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
nop dword [rax + rax]
nop
jmp 0x1400127b6
lea ecx, [rbx - 0x20]
shr ecx, 5
lea eax, [rcx + 1]
shl eax, 5
lea esi, [rcx + 1]
sub edx, eax
jmp 0x1400127c9