Function at 0x1400292e4
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 [0x140123d60]
xor rax, rsp
mov qword [rbp], rax
mov r12, rdx
cmp qword [rcx + 0x18], 8
jb 0x140029325
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 0x140029509
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
nop dword [rax + rax]
mov r15d, eax
cmp eax, 0xffffffff
je 0x140029549
mov ecx, r15d
call fcn.1400a2e80
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 0x1400294c9
mov rcx, rbx
call fcn.14000878c
or rbx, 0xffffffffffffffff
mov qword [rsp + 0x40], rbx
cmp byte [rdi], 0xef
jne 0x1400293ec
cmp byte [rdi + 1], 0xbb
jne 0x1400293ec
cmp byte [rdi + 2], 0xbf
jne 0x1400293ec
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 0x140029474
mov eax, 2
mul r13
cmovo rax, rbx
mov rcx, rax
call fcn.1400a2e80
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.140006ebc
nop
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_]
nop dword [rax + rax]
jmp 0x140029487
xor r8d, r8d
lea rdx, [0x1400d90f0]
mov rcx, r12
call fcn.140006ebc
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.14000bbc8
mov rcx, qword [rbp]
xor rcx, rsp
call fcn.1400bf860
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.140006cc8
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.140006370
lea rdx, [0x140119420]
lea rcx, [rbp - 0x70]
call sub.msvcrt.dll__CxxThrowException
nop
lea rdx, str.File_open_error
lea rcx, [rsp + 0x68]
call fcn.140006cc8
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.140006370
lea rdx, [0x140119420]
lea rcx, [rbp - 0x70]
call sub.msvcrt.dll__CxxThrowException
nop
lea rdx, str.Unable_to_get_file_size
lea rcx, [rsp + 0x68]
call fcn.140006cc8
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.140006370
lea rdx, [0x140119420]
lea rcx, [rbp - 0x70]
call sub.msvcrt.dll__CxxThrowException
int3