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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r15
sub rsp, 0x330
mov rbp, r8
mov rsi, rdx
lea rcx, [rsp + 0x122]
xor edx, edx
mov r8d, 0x208
mov word [rsp + 0x120], 0
call sub.msvcrt.dll_memset
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rsi
repne scasw ax, word [rdi]
not rcx
add rcx, 0xb
cmp rcx, 0x104
jae 0x1400a0f7a
lea rdx, [rsp + 0x120]
mov rcx, rsi
sub rdx, rsi
movzx eax, word [rcx]
add rcx, 2
test ax, ax
mov word [rdx + rcx - 2], ax
jne 0x1400a0ef1
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rsp + 0x120]
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
test ecx, ecx
jle 0x1400a0f46
movsxd rax, ecx
cmp word [rsp + rax*2 + 0x11e], 0x5c
je 0x1400a0f46
xor eax, eax
lea rdi, [rsp + 0x120]
or rcx, 0xffffffffffffffff
repne scasw ax, word [rdi]
mov eax, dword [0x1400a9734]
mov dword [rdi - 2], eax
xor eax, eax
lea rdi, [rsp + 0x120]
or rcx, 0xffffffffffffffff
repne scasw ax, word [rdi]
mov rax, qword [str.Local_State]
mov qword [rdi - 2], rax
mov rax, qword [0x1400a8ab8]
mov qword [rdi + 6], rax
mov rax, qword [0x1400a8ac0]
mov qword [rdi + 0xe], rax
jmp 0x1400a0f82
mov word [rsp + 0x120], ax
xor r15d, r15d
lea rcx, [rsp + 0x120]
xor r9d, r9d
mov qword [rsp + 0x30], r15
lea r8d, [r15 + 3]
mov edx, 0x80000000
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x360], r12
mov dword [rsp + 0xd0], 0x400
mov dword [rsp + 0xd4], 0x100
mov dword [rsp + 0xb0], r15d
mov dword [rsp + 0xb4], r15d
mov qword [rsp + 0xc0], r15
mov qword [rsp + 0xc8], r15
mov dword [rsp + 0xd8], r15d
mov dword [rsp + 0xb8], r15d
mov dword [rsp + 0xf0], r15d
mov qword [rsp + 0xe0], r15
mov dword [rsp + 0xe8], r15d
mov dword [rsp + 0xf4], 0x100
mov dword [rsp + 0xec], r15d
mov dword [rsp + 0x10c], 0x20
mov qword [rsp + 0x100], r15
mov dword [rsp + 0x110], r15d
mov dword [rsp + 0x108], r15d
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
mov rbx, rax
je 0x1400a1249
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea ecx, [rdi + 5]
movsxd rcx, ecx
call sub.msvcrt.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
lea r9, [rsp + 0x378]
mov r8d, edi
mov rcx, rbx
mov rdx, rax
mov dword [rsp + 0x378], r15d
mov r12, rax
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [rdi + 1]
mov byte [rdi + r12], r15b
mov r9d, 0xfde9
mov byte [rcx + r12], r15b
lea ecx, [rdi + 2]
or r8d, 0xffffffff
mov byte [rcx + r12], r15b
lea rcx, [rsp + 0xe0]
mov rdx, r12
mov dword [rsp + 0xf8], r15d
call fcn.140091be0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r12, r12
je 0x1400a10e3
mov rcx, r12
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
lea rcx, [rsp + 0xb0]
mov dword [rsp + 0x60], 0x400
mov dword [rsp + 0x64], 0x100
mov dword [rsp + 0x40], r15d
mov dword [rsp + 0x44], r15d
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x58], r15
mov dword [rsp + 0x68], r15d
mov dword [rsp + 0x48], r15d
mov dword [rsp + 0x80], r15d
mov qword [rsp + 0x70], r15
mov dword [rsp + 0x78], r15d
mov dword [rsp + 0x84], 0x100
mov dword [rsp + 0x7c], r15d
mov dword [rsp + 0x9c], 0x20
mov qword [rsp + 0x90], r15
mov dword [rsp + 0xa0], r15d
mov dword [rsp + 0x98], r15d
mov dword [rsp + 0xf8], r15d
call fcn.1400a7550
mov eax, dword [rsp + 0x110]
test eax, eax
mov ebx, r15d
jle 0x1400a11ed
nop
nop
test ebx, ebx
js 0x1400a1199
cmp ebx, eax
jge 0x1400a1199
movsxd rdi, ebx
shl rdi, 4
add rdi, qword [rsp + 0x100]
jmp 0x1400a119c
mov rdi, r15
movsxd rax, dword [rdi]
mov r8, qword [rdi + 8]
test eax, eax
js 0x1400a11c4
cmp eax, dword [r8 + 0x28]
jge 0x1400a11c4
mov rcx, rax
mov rax, qword [r8 + 0x10]
mov edx, dword [rax + rcx*4]
mov rax, qword [r8 + 0x18]
lea rcx, [rax + rdx*2]
test rcx, rcx
jne 0x1400a11cb
lea rcx, [0x1400a89b8]
lea rdx, str.profile
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x1400a12df
mov eax, dword [rsp + 0x110]
add ebx, 1
cmp ebx, eax
jl 0x1400a1180
mov rcx, qword [rsp + 0x90]
test rcx, rcx
je 0x1400a11ff
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x70]
mov qword [rsp + 0x90], r15
mov dword [rsp + 0xa0], r15d
test rcx, rcx
mov dword [rsp + 0x98], r15d
je 0x1400a122b
call sub.msvcrt.dll_free
mov qword [rsp + 0x70], r15
mov rcx, qword [rsp + 0x58]
mov dword [rsp + 0x78], r15d
mov dword [rsp + 0x7c], r15d
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x50]
call sub.msvcrt.dll_free
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rsi
repne scasw ax, word [rdi]
not rcx
add rcx, 7
cmp rcx, 0x104
jae 0x1400a1535
mov rcx, rbp
sub rcx, rsi
nop
movzx eax, word [rsi]
add rsi, 2
test ax, ax
mov word [rsi + rcx - 2], ax
jne 0x1400a1270
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rbp
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
test ecx, ecx
jle 0x1400a12b8
movsxd rax, ecx
cmp word [rbp + rax*2 - 2], 0x5c
je 0x1400a12b8
xor eax, eax
mov rdi, rbp
or rcx, 0xffffffffffffffff
repne scasw ax, word [rdi]
mov eax, dword [0x1400a9734]
mov dword [rdi - 2], eax
xor eax, eax
mov rdi, rbp
or rcx, 0xffffffffffffffff
repne scasw ax, word [rdi]
mov rax, qword [0x1400a8cc0]
mov qword [rdi - 2], rax
mov rax, qword [0x1400a8cc8]
mov qword [rdi + 6], rax
jmp 0x1400a1539
movsxd rax, dword [rdi + 4]
mov rdi, qword [rdi + 8]
test eax, eax
js 0x1400a1307
cmp eax, dword [rdi + 0x28]
jge 0x1400a1307
mov rcx, rax
mov rax, qword [rdi + 0x10]
mov edx, dword [rax + rcx*4]
mov rax, qword [rdi + 0x18]
lea rbx, [rax + rdx*2]
test rbx, rbx
jne 0x1400a130e
lea rbx, [0x1400a89b8]
test rbx, rbx
mov dword [rsp + 0x88], r15d
je 0x1400a13f9
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rbx
repne scasw ax, word [rdi]
mov qword [rsp + 0x370], r14
not rcx
lea rdi, [rcx - 1]
mov rcx, qword [rsp + 0x70]
cmp edi, 0xffffffff
mov r14, rcx
jne 0x1400a1353
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x70]
jmp 0x1400a13bb
mov eax, dword [rsp + 0x78]
cmp edi, eax
jl 0x1400a13bb
mov qword [rsp + 0x368], r13
mov r12, rcx
mov ecx, dword [rsp + 0x84]
mov r13d, eax
add eax, ecx
cmp edi, eax
jge 0x1400a1370
mov dword [rsp + 0x78], eax
add eax, eax
movsxd rcx, eax
call sub.msvcrt.dll_malloc
test r13d, r13d
mov rcx, rax
mov qword [rsp + 0x70], rax
jle 0x1400a13b3
test rax, rax
je 0x1400a13a6
lea eax, [r13 + r13]
mov rdx, r12
movsxd r8, eax
call sub.msvcrt.dll_memcpy
mov rcx, r12
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x70]
mov r13, qword [rsp + 0x368]
test r14, r14
mov r14, qword [rsp + 0x370]
jne 0x1400a13d6
test rcx, rcx
je 0x1400a13d6
mov word [rcx], r15w
mov rcx, qword [rsp + 0x70]
test edi, edi
jle 0x1400a13ed
movsxd r8, edi
mov rdx, rbx
add r8, r8
call sub.msvcrt.dll_memcpy
mov rcx, qword [rsp + 0x70]
movsxd rax, edi
mov word [rcx + rax*2], r15w
mov dword [rsp + 0x7c], edi
lea rcx, [rsp + 0x40]
call fcn.1400a7550
test eax, eax
je 0x1400a11ed
mov eax, dword [rsp + 0xa0]
mov ebx, r15d
test eax, eax
jle 0x1400a11ed
nop
test ebx, ebx
js 0x1400a1439
cmp ebx, eax
jge 0x1400a1439
movsxd rdi, ebx
shl rdi, 4
add rdi, qword [rsp + 0x90]
jmp 0x1400a143c
mov rdi, r15
movsxd rax, dword [rdi]
mov r8, qword [rdi + 8]
test eax, eax
js 0x1400a1464
cmp eax, dword [r8 + 0x28]
jge 0x1400a1464
mov rcx, rax
mov rax, qword [r8 + 0x10]
mov edx, dword [rax + rcx*4]
mov rax, qword [r8 + 0x18]
lea rcx, [rax + rdx*2]
test rcx, rcx
jne 0x1400a146b
lea rcx, [0x1400a89b8]
lea rdx, str.last_used
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x1400a148e
mov eax, dword [rsp + 0xa0]
add ebx, 1
cmp ebx, eax
jl 0x1400a1420
jmp 0x1400a11ed
movsxd rax, dword [rdi + 4]
mov rdi, qword [rdi + 8]
test eax, eax
js 0x1400a11ed
cmp eax, dword [rdi + 0x28]
jge 0x1400a11ed
mov rcx, rax
mov rax, qword [rdi + 0x10]
mov edx, dword [rax + rcx*4]
mov rax, qword [rdi + 0x18]
lea rdx, [rax + rdx*2]
test rdx, rdx
je 0x1400a11ed
cmp word [rdx], r15w
je 0x1400a11ed
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rdx
repne scasw ax, word [rdi]
mov rdi, rsi
not rcx
lea r8, [rcx - 1]
or rcx, 0xffffffffffffffff
repne scasw ax, word [rdi]
not rcx
lea rax, [r8 + rcx]
cmp rax, 0x104
jae 0x1400a1505
mov r8, rbp
mov rcx, rsi
call fcn.1400944f0
jmp 0x1400a150a
mov word [rbp], r15w
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400a11ed
lea rcx, [rsp + 0x40]
call fcn.1400a7470
lea rcx, [rsp + 0xb0]
call fcn.1400a7470
jmp 0x1400a15a7
mov word [rbp], ax
mov rcx, qword [rsp + 0x100]
test rcx, rcx
je 0x1400a154b
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0xe0]
mov qword [rsp + 0x100], r15
mov dword [rsp + 0x110], r15d
test rcx, rcx
mov dword [rsp + 0x108], r15d
je 0x1400a157d
call sub.msvcrt.dll_free
mov qword [rsp + 0xe0], r15
mov rcx, qword [rsp + 0xc8]
mov dword [rsp + 0xe8], r15d
mov dword [rsp + 0xec], r15d
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0xc0]
call sub.msvcrt.dll_free
mov r12, qword [rsp + 0x360]
add rsp, 0x330
pop r15
pop rdi
pop rsi
pop rbp
pop rbx
ret