Function at 0x180065a60
Capabilities:
Check if file exists
Get file attributes
Read file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
lea rbp, [rsp - 0x27]
sub rsp, 0x100
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov rax, qword [0x1800d1eb0]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov r13, r8
mov r12, rdx
mov rdi, rcx
xor r14d, r14d
mov dword [rsp + 0x40], r14d
mov r8, qword [rcx + 0x10]
test r8, r8
je 0x180065c29
mov qword [rbp - 0x49], 7
mov qword [rbp - 0x51], r14
mov word [rbp - 0x61], r14w
add r8, 0xfffffffffffffffd
or r9, 0xffffffffffffffff
lea rdx, [rbp - 0x39]
call fcn.18000b940
mov rbx, rax
lea rax, [rbp - 0x61]
cmp rax, rbx
je 0x180065b3c
cmp qword [rbp - 0x49], 8
jb 0x180065aea
mov rcx, qword [rbp - 0x61]
call fcn.18007a7a4
mov qword [rbp - 0x49], 7
mov qword [rbp - 0x51], r14
mov word [rbp - 0x61], r14w
cmp qword [rbx + 0x18], 8
jae 0x180065b1a
mov r8, qword [rbx + 0x10]
inc r8
add r8, r8
mov rdx, rbx
lea rcx, [rbp - 0x61]
call fcn.18007abc0
jmp 0x180065b24
mov rax, qword [rbx]
mov qword [rbp - 0x61], rax
mov qword [rbx], r14
mov rax, qword [rbx + 0x10]
mov qword [rbp - 0x51], rax
mov rax, qword [rbx + 0x18]
mov qword [rbp - 0x49], rax
mov qword [rbx + 0x10], r14
mov qword [rbx + 0x18], r14
cmp qword [rbp - 0x21], 8
jb 0x180065b4c
mov rcx, qword [rbp - 0x39]
call fcn.18007a7a4
mov qword [rbp - 0x21], 7
mov qword [rbp - 0x29], r14
mov word [rbp - 0x39], r14w
mov r8d, 3
lea rdx, [0x1800afbc0]
lea rcx, [rbp - 0x39]
call fcn.180004cc0
nop
mov ebx, 1
mov dword [rsp + 0x40], ebx
lea rdx, [rbp - 0x39]
lea rcx, [rbp - 0x61]
call fcn.180029050
test al, al
jne 0x180065bd3
mov qword [rbp + 7], 7
mov qword [rbp - 1], r14
mov word [rbp - 0x11], r14w
lea r8d, [rbx + 2]
lea rdx, [0x1800afbc8]
lea rcx, [rbp - 0x11]
call fcn.180004cc0
nop
mov ebx, 3
mov dword [rsp + 0x40], ebx
lea rdx, [rbp - 0x11]
lea rcx, [rbp - 0x61]
call fcn.180029050
test al, al
jne 0x180065bd3
mov sil, 1
jmp 0x180065bd6
xor sil, sil
test bl, 2
je 0x180065bff
and ebx, 0xfffffffd
cmp qword [rbp + 7], 8
jb 0x180065bee
mov rcx, qword [rbp - 0x11]
call fcn.18007a7a4
mov qword [rbp + 7], 7
mov qword [rbp - 1], r14
mov word [rbp - 0x11], r14w
test bl, 1
je 0x180065c14
cmp qword [rbp - 0x21], 8
jb 0x180065c14
mov rcx, qword [rbp - 0x39]
call fcn.18007a7a4
test sil, sil
je 0x180065c30
cmp qword [rbp - 0x49], 8
jb 0x180065c29
mov rcx, qword [rbp - 0x61]
call fcn.18007a7a4
xor eax, eax
jmp 0x180065edc
mov qword [rbp - 0x71], 7
mov qword [rbp - 0x79], r14
mov word [rsp + 0x50], r14w
cmp qword [rdi + 0x18], 8
jb 0x180065c4e
mov rcx, qword [rdi]
jmp 0x180065c51
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x180065c6a
shr eax, 4
not eax
and eax, 1
jne 0x180065d8a
lea rcx, [rbp - 0x39]
call fcn.180027d50
mov rbx, rax
lea rax, [rsp + 0x50]
cmp rax, rbx
je 0x180065ce6
cmp qword [rbp - 0x71], 8
jb 0x180065c91
mov rcx, qword [rsp + 0x50]
call fcn.18007a7a4
mov qword [rbp - 0x71], 7
mov qword [rbp - 0x79], r14
mov word [rsp + 0x50], r14w
cmp qword [rbx + 0x18], 8
jae 0x180065cc3
mov r8, qword [rbx + 0x10]
inc r8
add r8, r8
mov rdx, rbx
lea rcx, [rsp + 0x50]
call fcn.18007abc0
jmp 0x180065cce
mov rax, qword [rbx]
mov qword [rsp + 0x50], rax
mov qword [rbx], r14
mov rax, qword [rbx + 0x10]
mov qword [rbp - 0x79], rax
mov rax, qword [rbx + 0x18]
mov qword [rbp - 0x71], rax
mov qword [rbx + 0x10], r14
mov qword [rbx + 0x18], r14
cmp qword [rbp - 0x21], 8
jb 0x180065cf6
mov rcx, qword [rbp - 0x39]
call fcn.18007a7a4
mov r8, rdi
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x39]
call fcn.180027780
mov rbx, rax
lea rax, [rsp + 0x50]
cmp rax, rbx
je 0x180065d7a
cmp qword [rbp - 0x71], 8
jb 0x180065d25
mov rcx, qword [rsp + 0x50]
call fcn.18007a7a4
mov qword [rbp - 0x71], 7
mov qword [rbp - 0x79], r14
mov word [rsp + 0x50], r14w
cmp qword [rbx + 0x18], 8
jae 0x180065d57
mov r8, qword [rbx + 0x10]
inc r8
add r8, r8
mov rdx, rbx
lea rcx, [rsp + 0x50]
call fcn.18007abc0
jmp 0x180065d62
mov rax, qword [rbx]
mov qword [rsp + 0x50], rax
mov qword [rbx], r14
mov rax, qword [rbx + 0x10]
mov qword [rbp - 0x79], rax
mov rax, qword [rbx + 0x18]
mov qword [rbp - 0x71], rax
mov qword [rbx + 0x10], r14
mov qword [rbx + 0x18], r14
cmp qword [rbp - 0x21], 8
jb 0x180065d8a
mov rcx, qword [rbp - 0x39]
call fcn.18007a7a4
lea rcx, [rsp + 0x50]
cmp qword [rbp - 0x71], 8
cmovae rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x180065dc1
shr eax, 4
not eax
and eax, 1
je 0x180065dc1
lea rcx, [rsp + 0x50]
cmp qword [rbp - 0x71], 8
cmovae rcx, qword [rsp + 0x50]
jmp 0x180065dce
cmp qword [rdi + 0x18], 8
jb 0x180065dcb
mov rdi, qword [rdi]
mov rcx, rdi
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
lea r8d, [r9 + 7]
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x180065e2d
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop
cmp qword [rbp - 0x71], 8
jb 0x180065e16
mov rcx, qword [rsp + 0x50]
call fcn.18007a7a4
mov qword [rbp - 0x71], 7
mov qword [rbp - 0x79], r14
mov word [rsp + 0x50], r14w
jmp 0x180065c19
mov ecx, 0x200
call fcn.180078408
mov rbx, rax
mov dword [rsp + 0x44], r14d
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x44]
mov r8d, 0x200
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movsxd r11, dword [rbx + 0x3c]
movzx ecx, word [r11 + rbx + 0x5c]
movzx eax, word [r11 + rbx + 0x14]
mov edx, 0xe0
cmp ax, dx
jne 0x180065e88
mov dword [r12], 1
jmp 0x180065e96
mov edx, 0xf0
cmp ax, dx
jne 0x180065e96
mov dword [r12], r14d
mov eax, r14d
cmp cx, 2
sete al
mov dword [r13], eax
cmp qword [rbp - 0x71], 8
jb 0x180065eb5
mov rcx, qword [rsp + 0x50]
call fcn.18007a7a4
mov qword [rbp - 0x71], 7
mov qword [rbp - 0x79], r14
mov word [rsp + 0x50], r14w
cmp qword [rbp - 0x49], 8
jb 0x180065ed7
mov rcx, qword [rbp - 0x61]
call fcn.18007a7a4
mov eax, 1
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.18007a7c0
add rsp, 0x100
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret