Function at 0x140018040
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x130]
sub rsp, 0x230
mov rax, qword [0x14016e028]
xor rax, rsp
mov qword [rbp + 0x120], rax
mov r15, rcx
mov dword [rbp - 0x74], 0x80
mov rax, rdx
mov dword [rbp + 0x1c], 0x80
lea rcx, [rbp - 0x70]
mov rdi, r8
mov qword [rbp - 0x80], rcx
lea r8, [rbp - 0x80]
lea rcx, [rbp + 0x20]
xor r13d, r13d
mov qword [rbp + 0x10], rcx
lea rdx, [rsp + 0x40]
mov rcx, rax
mov dword [rbp - 0x78], r13d
mov dword [rbp + 0x18], r13d
call fcn.140013d20
mov rsi, qword [rsp + 0x48]
mov r12, qword [rsp + 0x40]
cmp rsi, 4
jb 0x1400180f6
mov ecx, r13d
lea rdx, str.._
nop dword [rax]
movzx eax, byte [r12 + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x1400180e9
cmp rcx, 4
jne 0x1400180d0
mov eax, r13d
jmp 0x1400180ee
sbb eax, eax
or eax, 1
test eax, eax
je 0x14001817f
mov r14, r13
lea rax, [0x140149630]
mov r11, qword [r14 + rax]
test r11, r11
je 0x14001811b
mov rax, 0xffffffffffffffff
inc rax
cmp byte [r11 + rax], r13b
jne 0x140018110
jmp 0x14001811e
mov rax, r13
cmp rsi, rax
jne 0x1400181b4
test rsi, rsi
je 0x14001817f
mov rbx, r12
mov r10, r11
sub rbx, r11
nop word [rax + rax]
movzx edx, byte [rbx + r10]
movzx r9d, byte [r10]
lea ecx, [rdx - 0x41]
cmp cl, 0x19
lea eax, [rdx + 0x20]
movzx r8d, al
lea eax, [r9 + 0x20]
cmova r8d, edx
movzx ecx, al
lea edx, [r9 - 0x41]
cmp dl, 0x19
cmova ecx, r9d
cmp r8b, cl
jne 0x1400181b4
inc r10
mov rax, r10
sub rax, r11
cmp rax, rsi
jb 0x140018140
mov qword [rdi], r13
lea rax, [0x14016e048]
mov qword [rdi + 8], r13
mov qword [rdi + 0x10], r13
mov dword [rdi + 0x18], 6
mov qword [rdi + 0x1c], 0xffff
mov qword [rdi + 0x24], r13
mov dword [rdi + 0x2c], r13d
mov dword [r15], r13d
mov qword [r15 + 8], rax
jmp 0x1400182e1
add r14, 8
cmp r14, 0xb0
jb 0x1400180f9
lea rax, [rsp + 0x40]
mov word [rsp + 0x70], 0x105
lea r8, [rbp + 0x10]
mov qword [rsp + 0x60], rax
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x50]
call fcn.140016a70
mov rcx, qword [rbp + 0x10]
cmp dword [rsp + 0x50], r13d
je 0x140018202
movups xmm0, xmmword [rsp + 0x50]
movups xmmword [r15], xmm0
jmp 0x1400182e5
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x14001826b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rdi], r13
mov qword [rdi + 8], r13
mov qword [rdi + 0x10], r13
lea ecx, [rax - 2]
cmp ecx, 1
jbe 0x14001823a
cmp eax, 0x20
jne 0x140018234
mov dword [rdi + 0x18], 9
jmp 0x140018241
mov dword [rdi + 0x18], r13d
jmp 0x140018241
mov dword [rdi + 0x18], 1
mov qword [rdi + 0x1c], 0xffff
mov edx, eax
mov qword [rdi + 0x24], r13
mov rcx, r15
mov dword [rdi + 0x2c], r13d
call fcn.14001c470
mov rcx, qword [rbp + 0x10]
lea rdx, [rbp + 0x20]
cmp rcx, rdx
jmp 0x1400182ec
mov rcx, qword [rbp + 0x10]
xor r9d, r9d
mov qword [rsp + 0x30], r13
xor edx, edx
mov dword [rsp + 0x28], 0x2000000
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 7]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x1400182ca
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rdi], r13
mov qword [rdi + 8], r13
mov qword [rdi + 0x10], r13
lea ecx, [rax - 2]
cmp ecx, 1
jbe 0x14001823a
cmp eax, 0x20
jne 0x140018234
mov dword [rdi + 0x18], 9
jmp 0x140018241
mov r8, rdi
mov rdx, rbx
mov rcx, r15
call fcn.140017e10
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x10]
lea rax, [rbp + 0x20]
cmp rcx, rax
je 0x1400182f4
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp - 0x80]
lea rax, [rbp - 0x70]
cmp rcx, rax
je 0x140018307
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, r15
mov rcx, qword [rbp + 0x120]
xor rcx, rsp
call fcn.14013e7c0
mov rbx, qword [rsp + 0x288]
add rsp, 0x230
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret