Function at 0x1401430f0
Capabilities:
Check if file exists
Get file size
Read file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xa0
mov qword [rbp - 0x31], 0xfffffffffffffffe
mov qword [rsp + 0xe8], rbx
mov rax, qword [0x14028c238]
xor rax, rsp
mov qword [rbp + 0x1f], rax
mov r14, r9
movzx r12d, r8b
mov r15, rdx
mov rdi, rcx
lea rax, [rbp - 0x21]
mov qword [rbp - 0x29], rax
mov qword [rbp - 9], 7
xor esi, esi
mov qword [rbp - 0x11], rsi
mov word [rbp - 0x21], si
or rbx, 0xffffffffffffffff
mov r9, rbx
xor r8d, r8d
mov rdx, rcx
lea rcx, [rbp - 0x21]
call fcn.1400c3ac0
nop
call fcn.140141200
mov rcx, rax
lea rdx, [rbp - 0x21]
call fcn.140141280
cmp qword [rdi + 0x18], 8
jb 0x14014317f
mov rdi, qword [rdi]
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], 3
xor r9d, r9d
lea edx, [r9 + 1]
lea r8d, [r9 + 7]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x140143581
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp eax, 0xffffffff
je 0x140143576
lea ecx, [rax + 2]
call fcn.1401b4590
mov rdi, rax
test rax, rax
je 0x140143576
xor eax, eax
mov dword [rbp - 0x39], eax
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x39]
mov r8d, esi
mov rdx, rdi
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14014356e
mov eax, dword [rbp - 0x39]
cmp eax, esi
jne 0x14014356e
mov byte [rax + rdi], 0
mov eax, dword [rbp - 0x39]
mov byte [rax + rdi + 1], 0
mov eax, dword [r15]
test eax, eax
je 0x1401433c9
cmp eax, 2
jne 0x1401432a4
cmp word [rdi], 0
jne 0x140143234
xor esi, esi
mov r8d, esi
jmp 0x14014324d
mov r8, rbx
nop word [rax + rax]
inc r8
cmp word [rdi + r8*2], 0
jne 0x140143240
xor esi, esi
mov rdx, rdi
mov rcx, r14
call fcn.1400c3720
test r12b, r12b
je 0x14014356c
mov r9, rbx
mov r8d, 1
lea rdx, [rbp - 1]
mov rcx, r14
call fcn.1400ced30
mov rdx, rax
mov rcx, r14
call fcn.1400ca180
mov r8, qword [rbp + 0x17]
cmp r8, 8
jb 0x14014356c
inc r8
mov rdx, qword [rbp - 1]
lea rcx, [rbp - 1]
call fcn.1400c3a10
jmp 0x14014356c
cmp eax, 1
jne 0x140143336
lea rdx, [rdi + 3]
mov qword [rbp + 0x17], reloc.OLEAUT32.dll_SafeArrayDestroy
xor esi, esi
mov qword [rbp + 0xf], rsi
mov byte [rbp - 1], sil
cmp byte [rdx], sil
jne 0x1401432d0
mov ebx, esi
jmp 0x1401432d9
inc rbx
cmp byte [rdx + rbx], sil
jne 0x1401432d0
mov r8, rbx
lea rcx, [rbp - 1]
call fcn.1400d2ee0
nop
lea rdx, [rbp - 1]
lea rcx, [rbp - 0x21]
call fcn.140148640
mov rdx, rax
mov rcx, r14
call fcn.1400ca180
mov r8, qword [rbp - 9]
cmp r8, 8
jb 0x140143318
inc r8
mov rdx, qword [rbp - 0x21]
lea rcx, [rbp - 0x21]
call fcn.1400c3a10
mov qword [rbp - 9], 7
mov qword [rbp - 0x11], rsi
mov word [rbp - 0x21], si
lea rcx, [rbp - 1]
call fcn.1400d1b40
jmp 0x14014356c
cmp eax, 3
jne 0x14014356e
mov qword [rbp + 0x17], reloc.OLEAUT32.dll_SafeArrayDestroy
xor esi, esi
mov qword [rbp + 0xf], rsi
mov byte [rbp - 1], sil
cmp byte [rdi], sil
jne 0x140143360
mov ebx, esi
jmp 0x140143369
inc rbx
cmp byte [rdi + rbx], sil
jne 0x140143360
mov r8, rbx
mov rdx, rdi
lea rcx, [rbp - 1]
call fcn.1400d2ee0
nop
lea rdx, [rbp - 1]
lea rcx, [rbp - 0x21]
call fcn.140148640
mov rdx, rax
mov rcx, r14
call fcn.1400ca180
mov r8, qword [rbp - 9]
cmp r8, 8
jb 0x1401433ab
inc r8
mov rdx, qword [rbp - 0x21]
lea rcx, [rbp - 0x21]
call fcn.1400c3a10
mov qword [rbp - 9], 7
mov qword [rbp - 0x11], rsi
mov word [rbp - 0x21], si
lea rcx, [rbp - 1]
call fcn.1400d1b40
jmp 0x14014356c
movzx eax, byte [rdi]
cmp al, 0xff
jne 0x140143449
cmp byte [rdi + 1], 0xfe
jne 0x140143449
cmp word [rdi], 0
jne 0x1401433e3
xor esi, esi
mov r8d, esi
jmp 0x1401433fb
mov r8, rbx
nop word [rax + rax]
inc r8
cmp word [rdi + r8*2], 0
jne 0x1401433f0
mov rdx, rdi
mov rcx, r14
call fcn.1400c3720
mov r9, rbx
mov r8d, 1
lea rdx, [rbp - 1]
mov rcx, r14
call fcn.1400ced30
mov rdx, rax
mov rcx, r14
call fcn.1400ca180
mov r8, qword [rbp + 0x17]
cmp r8, 8
jb 0x14014356a
inc r8
mov rdx, qword [rbp - 1]
lea rcx, [rbp - 1]
call fcn.1400c3a10
jmp 0x14014356a
cmp al, 0xef
jne 0x1401434ea
cmp byte [rdi + 1], 0xbb
jne 0x1401434ea
cmp byte [rdi + 2], 0xbf
jne 0x1401434ea
lea rdx, [rdi + 3]
mov qword [rbp + 0x17], reloc.OLEAUT32.dll_SafeArrayDestroy
xor esi, esi
mov qword [rbp + 0xf], rsi
mov byte [rbp - 1], sil
cmp byte [rdx], sil
jne 0x140143484
mov ebx, esi
jmp 0x14014348d
inc rbx
cmp byte [rdx + rbx], sil
jne 0x140143484
mov r8, rbx
lea rcx, [rbp - 1]
call fcn.1400d2ee0
nop
lea rdx, [rbp - 1]
lea rcx, [rbp - 0x21]
call fcn.140148640
mov rdx, rax
mov rcx, r14
call fcn.1400ca180
mov r8, qword [rbp - 9]
cmp r8, 8
jb 0x1401434cc
inc r8
mov rdx, qword [rbp - 0x21]
lea rcx, [rbp - 0x21]
call fcn.1400c3a10
mov qword [rbp - 9], 7
mov qword [rbp - 0x11], rsi
mov word [rbp - 0x21], si
lea rcx, [rbp - 1]
call fcn.1400d1b40
jmp 0x14014356c
mov qword [rbp + 0x17], reloc.OLEAUT32.dll_SafeArrayDestroy
xor esi, esi
mov qword [rbp + 0xf], rsi
mov byte [rbp - 1], sil
test al, al
jne 0x140143504
mov ebx, esi
jmp 0x14014350d
inc rbx
cmp byte [rdi + rbx], sil
jne 0x140143504
mov r8, rbx
mov rdx, rdi
lea rcx, [rbp - 1]
call fcn.1400d2ee0
nop
lea rdx, [rbp - 1]
lea rcx, [rbp - 0x21]
call fcn.140148640
mov rdx, rax
mov rcx, r14
call fcn.1400ca180
mov r8, qword [rbp - 9]
cmp r8, 8
jb 0x14014354f
inc r8
mov rdx, qword [rbp - 0x21]
lea rcx, [rbp - 0x21]
call fcn.1400c3a10
mov qword [rbp - 9], 7
mov qword [rbp - 0x11], rsi
mov word [rbp - 0x21], si
lea rcx, [rbp - 1]
call fcn.1400d1b40
jmp 0x14014356c
xor esi, esi
mov ebx, esi
mov rcx, rdi
call fcn.1401b40e0
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1401435a4
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jb 0x1401435a4
cmp eax, 3
jbe 0x14014359d
cmp eax, 5
jne 0x1401435a4
mov eax, 0xffffffea
jmp 0x1401435a6
mov eax, 0xffffffe4
jmp 0x1401435a6
mov eax, ebx
mov rcx, qword [rbp + 0x1f]
xor rcx, rsp
call fcn.14016e480
mov rbx, qword [rsp + 0xe8]
add rsp, 0xa0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret