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

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x48]
sub rsp, 0x110
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov rax, qword [0x140121c90]
xor rax, rsp
mov qword [rbp], rax
mov r12, rdx
cmp qword [rcx + 0x18], 8
jb 0x140028965
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 0x140028b49
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
nop dword [rax + rax]
mov r15d, eax
cmp eax, 0xffffffff
je 0x140028b89
mov ecx, r15d
call fcn.1400a1bc0
mov r14, rax
mov rdi, rax
mov qword [rsp + 0x58], rax
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 0x140028b09
mov rcx, rbx
call fcn.140007dac
or rbx, 0xffffffffffffffff
mov qword [rsp + 0x40], rbx
cmp byte [rdi], 0xef
jne 0x140028a2c
cmp byte [rdi + 1], 0xbb
jne 0x140028a2c
cmp byte [rdi + 2], 0xbf
jne 0x140028a2c
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 r13, eax
test eax, eax
jle 0x140028ab4
mov eax, 2
mul r13
cmovo rax, rbx
mov rcx, rax
call fcn.1400a1bc0
mov rbx, rax
mov qword [rsp + 0x60], rax
mov dword [rsp + 0x28], r13d
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, r13
mov rdx, rbx
mov rcx, r12
call fcn.1400064dc
nop
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_]
nop dword [rax + rax]
jmp 0x140028ac7
xor r8d, r8d
lea rdx, [0x1400d8060]
mov rcx, r12
call fcn.1400064dc
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.14000b1e8
mov rcx, qword [rbp]
xor rcx, rsp
call fcn.1400be5a0
mov rbx, qword [rsp + 0x160]
add rsp, 0x110
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea rdx, str.File_read_error
lea rcx, [rsp + 0x68]
call fcn.1400062e8
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov r8d, eax
lea rdx, [rsp + 0x68]
lea rcx, [rbp - 0x70]
call fcn.140005990
lea rdx, [0x140117c90]
lea rcx, [rbp - 0x70]
call sub.msvcrt.dll__CxxThrowException
nop
lea rdx, str.File_open_error
lea rcx, [rsp + 0x68]
call fcn.1400062e8
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov r8d, eax
lea rdx, [rsp + 0x68]
lea rcx, [rbp - 0x70]
call fcn.140005990
lea rdx, [0x140117c90]
lea rcx, [rbp - 0x70]
call sub.msvcrt.dll__CxxThrowException
nop
lea rdx, str.Unable_to_get_file_size
lea rcx, [rsp + 0x68]
call fcn.1400062e8
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov r8d, eax
lea rdx, [rsp + 0x68]
lea rcx, [rbp - 0x70]
call fcn.140005990
lea rdx, [0x140117c90]
lea rcx, [rbp - 0x70]
call sub.msvcrt.dll__CxxThrowException
int3