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

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x100
mov rax, qword [0x140113970]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov r13, rdx
cmp qword [rcx + 0x18], 8
jb 0x140028e5f
mov rcx, qword [rcx]
xor esi, esi
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [rsi + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
nop dword [rax + rax]
mov rbx, rax
mov qword [rsp + 0x40], rax
inc rax
test rax, 0xfffffffffffffffe
je 0x140029079
lea rax, [rbx + 1]
test rax, 0xfffffffffffffffe
je 0x1400290b9
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
nop dword [rax + rax]
mov r15d, eax
cmp eax, 0xffffffff
je 0x1400290e8
mov ecx, r15d
call fcn.1400a5d68
mov r14, rax
mov rdi, rax
mov qword [rsp + 0x50], rax
lea rcx, [rbx + 1]
test rcx, 0xfffffffffffffffe
je 0x140029128
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x48]
mov r8d, r15d
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
nop dword [rax + rax]
test eax, eax
je 0x140029038
lea rax, [rbx - 1]
or r12, 0xffffffffffffffff
cmp rax, 0xfffffffffffffffd
ja 0x140028f38
mov rcx, rbx
call fcn.1400080c0
mov qword [rsp + 0x40], r12
cmp byte [r14], 0xef
jne 0x140028f54
cmp byte [r14 + 1], 0xbb
jne 0x140028f54
cmp byte [r14 + 2], 0xbf
jne 0x140028f54
add r14, 3
add r15d, 0xfffffffd
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rsi
mov r9d, r15d
mov r8, r14
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
nop dword [rax + rax]
movsxd r12, eax
test eax, eax
jle 0x140028fe3
mov eax, 2
mul r12
mov rdx, 0xffffffffffffffff
cmovo rax, rdx
mov rcx, rax
call fcn.1400a5d68
mov rbx, rax
mov qword [rsp + 0x58], rax
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], rax
mov r9d, r15d
mov r8, r14
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
nop dword [rax + rax]
mov r8, r12
mov rdx, rbx
mov rcx, r13
call fcn.14000643c
nop
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_]
nop dword [rax + rax]
jmp 0x140028ff6
xor r8d, r8d
lea rdx, [0x1400dd700]
mov rcx, r13
call fcn.14000643c
nop
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_]
nop dword [rax + rax]
nop
lea rcx, [rsp + 0x40]
call fcn.14000baec
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.1400c4a70
mov rbx, qword [rsp + 0x150]
add rsp, 0x100
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
nop
mov ebx, eax
lea rdx, str.File_read_error
lea rcx, [rbp - 0x79]
call fcn.14000621c
nop
mov r8d, ebx
lea rdx, [rbp - 0x79]
lea rcx, [rbp - 0x59]
call fcn.140005940
lea rdx, [0x1401095f0]
lea rcx, [rbp - 0x59]
call sub.msvcrt.dll__CxxThrowException
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
lea rdx, str.File_open_error
lea rcx, [rbp - 0x79]
call fcn.14000621c
nop
mov r8d, ebx
lea rdx, [rbp - 0x79]
lea rcx, [rbp - 0x59]
call fcn.140005940
lea rdx, [0x1401095f0]
lea rcx, [rbp - 0x59]
call sub.msvcrt.dll__CxxThrowException
nop
lea rdx, str.Attempting_to_use_an_invalid_handle.
lea rcx, [rbp - 0x79]
call fcn.14000621c
nop
lea rdx, [rbp - 0x79]
lea rcx, [rbp - 0x59]
call fcn.140005ab4
lea rdx, [0x1401096d0]
lea rcx, [rbp - 0x59]
call sub.msvcrt.dll__CxxThrowException
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
lea rdx, str.Unable_to_get_file_size
lea rcx, [rbp - 0x79]
call fcn.14000621c
nop
mov r8d, ebx
lea rdx, [rbp - 0x79]
lea rcx, [rbp - 0x59]
call fcn.140005940
lea rdx, [0x1401095f0]
lea rcx, [rbp - 0x59]
call sub.msvcrt.dll__CxxThrowException
nop
lea rdx, str.Attempting_to_use_an_invalid_handle.
lea rcx, [rbp - 0x79]
call fcn.14000621c
nop
lea rdx, [rbp - 0x79]
lea rcx, [rbp - 0x59]
call fcn.140005ab4
lea rdx, [0x1401096d0]
lea rcx, [rbp - 0x59]
call sub.msvcrt.dll__CxxThrowException
int3