Function at 0x140141ad0
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 [0x14028a238]
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.14013fbe0
mov rcx, rax
lea rdx, [rbp - 0x21]
call fcn.14013fc60
cmp qword [rdi + 0x18], 8
jb 0x140141b5f
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 0x140141f61
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp eax, 0xffffffff
je 0x140141f56
lea ecx, [rax + 2]
call fcn.1401b2e80
mov rdi, rax
test rax, rax
je 0x140141f56
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 0x140141f4e
mov eax, dword [rbp - 0x39]
cmp eax, esi
jne 0x140141f4e
mov byte [rax + rdi], 0
mov eax, dword [rbp - 0x39]
mov byte [rax + rdi + 1], 0
mov eax, dword [r15]
test eax, eax
je 0x140141da9
cmp eax, 2
jne 0x140141c84
cmp word [rdi], 0
jne 0x140141c14
xor esi, esi
mov r8d, esi
jmp 0x140141c2d
mov r8, rbx
nop word [rax + rax]
inc r8
cmp word [rdi + r8*2], 0
jne 0x140141c20
xor esi, esi
mov rdx, rdi
mov rcx, r14
call fcn.1400c3720
test r12b, r12b
je 0x140141f4c
mov r9, rbx
mov r8d, 1
lea rdx, [rbp - 1]
mov rcx, r14
call fcn.1400ce3f0
mov rdx, rax
mov rcx, r14
call fcn.1400c9840
mov r8, qword [rbp + 0x17]
cmp r8, 8
jb 0x140141f4c
inc r8
mov rdx, qword [rbp - 1]
lea rcx, [rbp - 1]
call fcn.1400c3a10
jmp 0x140141f4c
cmp eax, 1
jne 0x140141d16
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 0x140141cb0
mov ebx, esi
jmp 0x140141cb9
inc rbx
cmp byte [rdx + rbx], sil
jne 0x140141cb0
mov r8, rbx
lea rcx, [rbp - 1]
call fcn.1400d1eb0
nop
lea rdx, [rbp - 1]
lea rcx, [rbp - 0x21]
call fcn.140147020
mov rdx, rax
mov rcx, r14
call fcn.1400c9840
mov r8, qword [rbp - 9]
cmp r8, 8
jb 0x140141cf8
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.1400d0c70
jmp 0x140141f4c
cmp eax, 3
jne 0x140141f4e
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 0x140141d40
mov ebx, esi
jmp 0x140141d49
inc rbx
cmp byte [rdi + rbx], sil
jne 0x140141d40
mov r8, rbx
mov rdx, rdi
lea rcx, [rbp - 1]
call fcn.1400d1eb0
nop
lea rdx, [rbp - 1]
lea rcx, [rbp - 0x21]
call fcn.140147020
mov rdx, rax
mov rcx, r14
call fcn.1400c9840
mov r8, qword [rbp - 9]
cmp r8, 8
jb 0x140141d8b
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.1400d0c70
jmp 0x140141f4c
movzx eax, byte [rdi]
cmp al, 0xff
jne 0x140141e29
cmp byte [rdi + 1], 0xfe
jne 0x140141e29
cmp word [rdi], 0
jne 0x140141dc3
xor esi, esi
mov r8d, esi
jmp 0x140141ddb
mov r8, rbx
nop word [rax + rax]
inc r8
cmp word [rdi + r8*2], 0
jne 0x140141dd0
mov rdx, rdi
mov rcx, r14
call fcn.1400c3720
mov r9, rbx
mov r8d, 1
lea rdx, [rbp - 1]
mov rcx, r14
call fcn.1400ce3f0
mov rdx, rax
mov rcx, r14
call fcn.1400c9840
mov r8, qword [rbp + 0x17]
cmp r8, 8
jb 0x140141f4a
inc r8
mov rdx, qword [rbp - 1]
lea rcx, [rbp - 1]
call fcn.1400c3a10
jmp 0x140141f4a
cmp al, 0xef
jne 0x140141eca
cmp byte [rdi + 1], 0xbb
jne 0x140141eca
cmp byte [rdi + 2], 0xbf
jne 0x140141eca
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 0x140141e64
mov ebx, esi
jmp 0x140141e6d
inc rbx
cmp byte [rdx + rbx], sil
jne 0x140141e64
mov r8, rbx
lea rcx, [rbp - 1]
call fcn.1400d1eb0
nop
lea rdx, [rbp - 1]
lea rcx, [rbp - 0x21]
call fcn.140147020
mov rdx, rax
mov rcx, r14
call fcn.1400c9840
mov r8, qword [rbp - 9]
cmp r8, 8
jb 0x140141eac
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.1400d0c70
jmp 0x140141f4c
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 0x140141ee4
mov ebx, esi
jmp 0x140141eed
inc rbx
cmp byte [rdi + rbx], sil
jne 0x140141ee4
mov r8, rbx
mov rdx, rdi
lea rcx, [rbp - 1]
call fcn.1400d1eb0
nop
lea rdx, [rbp - 1]
lea rcx, [rbp - 0x21]
call fcn.140147020
mov rdx, rax
mov rcx, r14
call fcn.1400c9840
mov r8, qword [rbp - 9]
cmp r8, 8
jb 0x140141f2f
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.1400d0c70
jmp 0x140141f4c
xor esi, esi
mov ebx, esi
mov rcx, rdi
call fcn.1401b29d0
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140141f84
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jb 0x140141f84
cmp eax, 3
jbe 0x140141f7d
cmp eax, 5
jne 0x140141f84
mov eax, 0xffffffea
jmp 0x140141f86
mov eax, 0xffffffe4
jmp 0x140141f86
mov eax, ebx
mov rcx, qword [rbp + 0x1f]
xor rcx, rsp
call fcn.14016ce60
mov rbx, qword [rsp + 0xe8]
add rsp, 0xa0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret