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

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rsi
push r13
push r15
sub rsp, 0x58
mov r13, qword [0x14008f4f0]
mov rsi, rdx
xor r9d, r9d
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov edx, 0x80000000
mov rcx, rsi
mov dword [rsp + 0x20], 3
xor bpl, bpl
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
cmp rax, 0xffffffffffffffff
jne 0x1400066df
cmp qword [0x14008f4e8], 0
je 0x1400068da
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x14008f4e8]
lea rdx, str.Unable_to_open_file__s.__Error_code___d_.
mov r9d, eax
mov r8, rsi
call fcn.1400333e0
movzx eax, bpl
add rsp, 0x58
pop r15
pop r13
pop rsi
pop rbp
ret
xor edx, edx
mov qword [rsp + 0x88], rbx
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
test eax, eax
jne 0x14000671c
mov rcx, qword [0x14008f4e8]
test rcx, rcx
je 0x1400068c9
mov r8, rsi
lea rdx, str.The_file__s_appears_to_be_an_empty_file_
call fcn.1400333e0
jmp 0x1400068c9
mov rcx, rbx
mov qword [rsp + 0x50], r14
call fcn.14003a944
mov r14, rax
test rax, rax
jne 0x140006755
mov rcx, qword [0x14008f4e8]
test rcx, rcx
je 0x1400068bc
mov r8, rsi
lea rdx, str.Unable_to_allocate_memory_to_load_file__s.
call fcn.1400333e0
jmp 0x1400068bc
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], 0
mov r8d, ebx
mov rdx, r14
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400067a0
cmp qword [0x14008f4e8], 0
je 0x1400068bc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x14008f4e8]
lea rdx, str.Unable_to_read_file__s.__Error_code___d_.
jmp 0x1400068b1
mov eax, dword [r14]
cmp eax, dword [str.EAIN]
mov qword [rsp + 0x90], rdi
mov rdi, r14
jne 0x1400067e2
mov rcx, qword [0x14008f4e8]
lea rdi, [r14 + 4]
add ebx, 0xfffffffc
test rcx, rcx
je 0x1400067d8
mov r8, rsi
lea rdx, str.Processing_EAIN_file__s.
call fcn.1400333e0
mov edx, ebx
mov rcx, rdi
call fcn.1400568d0
cmp ebx, 3
jbe 0x140006817
cmp byte [rdi], 0xef
jne 0x140006817
cmp byte [rdi + 1], 0xbb
jne 0x140006817
cmp byte [rdi + 2], 0xbf
jne 0x140006817
mov rcx, qword [0x14008f4e8]
add rdi, 3
add ebx, 0xfffffffd
test rcx, rcx
je 0x140006817
lea rdx, str.Processing_..._n
call fcn.1400333e0
mov r8d, ebx
lea r9, str.InstData
mov rdx, rdi
mov rcx, r13
call fcn.140011700
mov rdi, qword [rsp + 0x90]
test eax, eax
jne 0x14000689e
mov r9, qword [r13 + 0x10]
lea r8, [rsp + 0x40]
sub r9, 0x10
mov dword [rsp + 0x48], 0xffffffff
mov qword [rsp + 0x40], r9
lea rdx, [0x14000f8c0]
sub r9, qword [r13 + 0x40]
mov rcx, r13
mov qword [rsp + 0x20], 0
call fcn.140019dc0
mov rcx, qword [r13 + 0x28]
mov rdx, qword [r13 + 0x10]
cmp rdx, qword [rcx + 0x10]
jb 0x140006880
mov qword [rcx + 0x10], rdx
test eax, eax
jne 0x140006889
mov bpl, 1
jmp 0x1400068bc
mov rcx, qword [0x14008f4e8]
test rcx, rcx
je 0x1400068bc
lea rdx, str.Failed_to_process_data_file__s.____d_
jmp 0x1400068b1
mov rcx, qword [0x14008f4e8]
test rcx, rcx
je 0x1400068bc
lea rdx, str.Unable_to_initialize_from_data_file__s.____d_
mov r9d, eax
mov r8, rsi
call fcn.1400333e0
mov rcx, r14
call fcn.14003a6d4
mov r14, qword [rsp + 0x50]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x88]
movzx eax, bpl
add rsp, 0x58
pop r15
pop r13
pop rsi
pop rbp
ret