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

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x70
mov rax, qword [0x1400b8080]
xor rax, rsp
mov qword [rsp + 0x68], rax
mov rbp, rdx
mov rsi, rcx
xor r15d, r15d
mov rcx, qword [rcx]
test rcx, rcx
je 0x140051b45
call fcn.140069a8c
mov rcx, qword [rsi + 8]
test rcx, rcx
je 0x140051b53
call fcn.140069a8c
mov qword [rsi], r15
mov qword [rsi + 8], r15
lea rdx, [0x1400b8cd8]
lea rcx, [rsp + 0x48]
call fcn.140002800
nop
mov rcx, rbp
call qword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
je 0x140051b88
mov rdx, rbp
lea rcx, [rsp + 0x48]
call fcn.140007e60
jmp 0x140051bdf
mov rdx, 0xffffffffffffffff
nop
inc rdx
cmp word [rbp + rdx*2], 0
jne 0x140051b90
mov rax, qword [rsp + 0x60]
cmp rdx, rax
ja 0x140051bd2
lea rdi, [rsp + 0x48]
cmp rax, 7
cmova rdi, qword [rsp + 0x48]
mov qword [rsp + 0x58], rdx
lea rbx, [rdx + rdx]
mov r8, rbx
mov rdx, rbp
mov rcx, rdi
call fcn.140087290
mov word [rbx + rdi], r15w
jmp 0x140051bdf
mov r9, rbp
lea rcx, [rsp + 0x48]
call fcn.140002c40
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 7
cmova rcx, qword [rsp + 0x48]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x140051c29
lea rdx, str.Error_opening_file
jmp 0x140051c41
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test eax, eax
jne 0x140051c5a
lea rdx, str.File_is_empty
mov ecx, 0x18
mov eax, 0xe0
mov r9, rsi
lea rbp, [rsi + rax]
add rcx, rsi
jmp 0x140051cdf
cmp edi, 0x400000
jbe 0x140051c6b
lea rdx, str.File_too_large
jmp 0x140051cd4
mov dword [rsp + 0x40], r15d
mov rcx, rdi
call fcn.140061a7c
mov rbp, rax
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x40]
mov r8d, edi
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x40], edi
je 0x140051d09
mov rcx, rbp
call fcn.140061530
mov rcx, qword [rsi]
test rcx, rcx
je 0x140051cb8
call fcn.140069a8c
mov rcx, qword [rsi + 8]
test rcx, rcx
je 0x140051cc6
call fcn.140069a8c
mov qword [rsi], r15
mov qword [rsi + 8], r15
lea rdx, str.Could_not_read_file
lea rcx, [rsi + 0x18]
lea rbp, [rsi + 0xe0]
lea rbx, [0x140097bb8]
mov edi, 0x31
lea r8d, [rdi + 0x32]
call fcn.14006a740
mov r8d, edi
mov rdx, rbx
mov rcx, rbp
call fcn.14006a740
xor bl, bl
jmp 0x140051db5
mov r14, rbp
cmp edi, 3
jb 0x140051d2a
cmp byte [rbp], 0xef
jne 0x140051d2a
cmp byte [rbp + 1], 0xbb
jne 0x140051d2a
cmp byte [rbp + 2], 0xbf
jne 0x140051d2a
lea r14, [rbp + 3]
add edi, 0xfffffffd
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], r15
mov r9d, edi
mov r8, r14
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ebx, eax
lea ecx, [rbx + 1]
add rcx, rcx
call fcn.14006a788
mov qword [rsi], rax
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rax
mov r9d, edi
mov r8, r14
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov rax, qword [rsi]
mov word [rax + rbx*2], r15w
mov rcx, rsi
call fcn.140051e20
movzx ebx, al
test al, al
jne 0x140051dac
mov rcx, qword [rsi]
test rcx, rcx
je 0x140051d97
call fcn.140069a8c
mov rcx, qword [rsi + 8]
test rcx, rcx
je 0x140051da5
call fcn.140069a8c
mov qword [rsi], r15
mov qword [rsi + 8], r15
mov rcx, rbp
call fcn.140061530
nop
mov rdx, qword [rsp + 0x60]
cmp rdx, 7
jbe 0x140051df3
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140051dee
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140051e17
call fcn.140061530
movzx eax, bl
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.140061510
mov rbx, qword [rsp + 0xb0]
add rsp, 0x70
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
call fcn.14006a6c0
int3