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

Disassembly:
push rsi
push rdi
push r13
push r14
sub rsp, 0x38
mov r14, rcx
xor r13d, r13d
xor ecx, ecx
mov esi, r13d
call qword [sym.imp.KERNEL32.dll_SetLastError]
test r14, r14
je 0x180020be7
mov rdi, 0xffffffffffffffff
mov edx, r13d
mov rax, rdi
inc rax
cmp word [r14 + rax*2], dx
jne 0x1800205d2
test rax, rax
je 0x180020614
mov rcx, r13
nop dword [rax]
nop dword [rax + rax]
movzx r8d, word [r14 + rcx*2]
cmp r8w, 0x5c
je 0x180020be7
cmp r8w, 0x2f
je 0x180020be7
inc edx
mov ecx, edx
cmp rcx, rax
jb 0x1800205f0
mov qword [rsp + 0x60], rbx
mov rcx, r14
mov qword [rsp + 0x68], rbp
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x30], r15
call fcn.18001f0b0
mov r15, rax
test rax, rax
je 0x1800208e6
call fcn.180020c20
mov r12, rax
test rax, rax
je 0x180020bce
mov r8d, r13d
mov rcx, rdi
inc rcx
cmp word [r15 + rcx*2], si
jne 0x180020653
test rcx, rcx
je 0x180020694
mov rax, r13
nop word [rax + rax]
movzx edx, word [r15 + rax*2]
cmp dx, 0x5c
je 0x180020754
cmp dx, 0x2f
je 0x180020754
inc r8d
mov eax, r8d
cmp rax, rcx
jb 0x180020670
mov rcx, rdi
nop word [rax + rax]
inc rcx
cmp word [r12 + rcx*2], si
jne 0x1800206a0
nop word [rax + rax]
inc rdi
cmp word [r15 + rdi*2], si
jne 0x1800206b0
test rcx, rcx
je 0x1800206d9
cmp word [r12 + rcx*2 - 2], 0x5c
je 0x1800206d9
test rdi, rdi
je 0x1800206d9
cmp word [r15], 0x5c
mov ebx, 1
jne 0x1800206dc
mov ebx, r13d
mov eax, ebx
add rax, rdi
add rax, rcx
mov ecx, 0x40
lea rdi, [rax*2 + 2]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x18002074c
mov r8, r12
mov rdx, rdi
mov rcx, rax
call fcn.18001e0d0
test eax, eax
js 0x180020740
test ebx, ebx
je 0x18002072e
lea r8, [0x1800c9b20]
mov rdx, rdi
mov rcx, rsi
call fcn.18001e010
test eax, eax
js 0x180020740
mov r8, r15
mov rdx, rdi
mov rcx, rsi
call fcn.18001e010
test eax, eax
jns 0x18002074c
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rsi, r13
mov rcx, r12
jmp 0x180020bc8
lea rax, [0x1800c9fd0]
mov qword [rsp + 0x20], rax
lea r14, [rsp + 0x20]
lea rax, [0x1800c9f60]
mov qword [rsp + 0x28], rax
mov rdx, qword [r14]
mov rbx, rdi
inc rbx
cmp word [rdx + rbx*2], si
jne 0x180020777
mov r8, rbx
mov rcx, r15
call fcn.18009edc8
test eax, eax
je 0x1800207a2
add r14, 8
lea rax, [rsp + 0x30]
cmp r14, rax
jb 0x180020771
jmp 0x18002088c
lea rbp, [r15 + rbx*2]
mov rcx, rdi
nop dword [rax]
inc rcx
cmp word [r12 + rcx*2], si
jne 0x1800207b0
test rbp, rbp
jne 0x1800207f0
lea rbx, [rcx + 1]
lea rdx, [rbx + rbx]
lea ecx, [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x180020889
mov r8, r12
mov rdx, rbx
mov rcx, rax
call fcn.18001e290
jmp 0x18002087c
inc rdi
cmp word [rbp + rdi*2], si
jne 0x1800207f0
test rcx, rcx
je 0x180020819
cmp word [r12 + rcx*2 - 2], 0x5c
je 0x180020819
test rdi, rdi
je 0x180020819
cmp word [rbp], 0x5c
mov ebx, 1
jne 0x18002081c
mov ebx, r13d
mov eax, ebx
add rax, rdi
add rax, rcx
mov ecx, 0x40
lea rdi, [rax*2 + 2]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x18002088c
mov r8, r12
mov rdx, rdi
mov rcx, rax
call fcn.18001e0d0
test eax, eax
js 0x180020880
test ebx, ebx
je 0x18002086e
lea r8, [0x1800c9b20]
mov rdx, rdi
mov rcx, rsi
call fcn.18001e010
test eax, eax
js 0x180020880
mov r8, rbp
mov rdx, rdi
mov rcx, rsi
call fcn.18001e010
test eax, eax
jns 0x18002088c
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rsi, r13
lea rax, [rsp + 0x30]
cmp r14, rax
jne 0x18002074c
movzx eax, word [r15]
cmp eax, 0x5c
je 0x1800208d8
cmp eax, 0x2f
je 0x1800208d8
mov ecx, eax
call fcn.18009e2c0
test eax, eax
je 0x18002074c
cmp word [r15 + 2], 0x3a
jne 0x18002074c
movzx eax, word [r15 + 4]
cmp ax, 0x5c
je 0x1800208d8
cmp ax, 0x2f
jne 0x18002074c
mov rsi, r15
mov rcx, r12
mov r15, r13
jmp 0x180020bc8
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7e
jne 0x180020a79
lea rbp, [0x1800c9d80]
mov rbx, rdi
nop
cmp word [rbp + rbx*2 + 2], si
lea rbx, [rbx + 1]
jne 0x180020900
mov r11, rdi
nop
cmp word [r14 + r11*2 + 2], si
lea r11, [r11 + 1]
jne 0x180020910
mov rcx, r14
call fcn.18001b5a0
mov rcx, rdi
inc rcx
cmp word [rax + rcx*2], si
jne 0x180020927
test rcx, rcx
je 0x180020a2a
cmp rcx, 1
je 0x180020985
mov rbx, rdi
inc rbx
cmp word [r14 + rbx*2], si
jne 0x180020942
inc rbx
mov ecx, 0x40
lea rdx, [rbx + rbx]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r15, rax
test rax, rax
je 0x180020a79
mov r8, r14
mov rdx, rbx
mov rcx, rax
call fcn.18001e290
test eax, eax
jns 0x180020abe
jmp 0x180020ab2
lea r12, [r11 - 1]
test r12, r12
js 0x180020abb
mov rbx, rdi
inc rbx
cmp word [r14 + rbx*2], si
jne 0x180020995
cmp r12, rbx
mov ecx, 0x40
cmovb rbx, r12
inc rbx
lea rdx, [rbx + rbx]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r15, rax
test rax, rax
je 0x180020a79
test rbx, rbx
je 0x180020ab2
cmp rbx, 0x7fffffff
ja 0x180020aae
cmp r12, 0x7ffffffe
ja 0x180020aae
sub r12, rbx
mov rcx, rax
sub r14, rax
lea rax, [r12 + rbx]
test rax, rax
je 0x180020a10
movzx eax, word [r14 + rcx]
test ax, ax
je 0x180020a10
mov word [rcx], ax
add rcx, 2
sub rbx, 1
jne 0x1800209f0
test rbx, rbx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], r13w
jne 0x180020abe
jmp 0x180020ab2
lea rax, [r11 + rbx]
mov ecx, 0x40
lea rbx, [rax*2 + 2]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r15, rax
test rax, rax
je 0x180020abe
mov r8, r14
mov rdx, rbx
mov rcx, rax
call fcn.18001e0d0
mov rcx, r15
test eax, eax
js 0x180020a73
mov r8, rbp
mov rdx, rbx
call fcn.18001e010
test eax, eax
jns 0x180020ac3
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LocalFree]
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x180020a8c
lea ecx, [rax + 0x7e]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r15, qword [rsp + 0x30]
mov rax, rsi
mov r12, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x68]
mov rbx, qword [rsp + 0x60]
add rsp, 0x38
pop r14
pop r13
pop rdi
pop rsi
ret
mov word [rax], r13w
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r15, r13
test r15, r15
je 0x180020a79
mov ecx, 0x37e4
call fcn.18001d720
test eax, eax
je 0x180020ada
xor ecx, ecx
call fcn.18001fa00
jmp 0x180020adf
call fcn.180020c20
mov rbp, rax
test rax, rax
je 0x180020bce
mov rcx, rdi
nop
inc rcx
cmp word [rbp + rcx*2], si
jne 0x180020af0
nop word [rax + rax]
inc rdi
cmp word [r15 + rdi*2], si
jne 0x180020b00
test rcx, rcx
je 0x180020b28
cmp word [rbp + rcx*2 - 2], 0x5c
je 0x180020b28
test rdi, rdi
je 0x180020b28
cmp word [r15], 0x5c
mov ebx, 1
jne 0x180020b2b
mov ebx, r13d
mov eax, ebx
add rax, rdi
add rax, rcx
mov ecx, 0x40
lea rdi, [rax*2 + 2]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x180020b8f
mov r8, rbp
mov rdx, rdi
mov rcx, rax
call fcn.18001e0d0
test eax, eax
js 0x180020bb9
test ebx, ebx
je 0x180020b7d
lea r8, [0x1800c9b20]
mov rdx, rdi
mov rcx, rsi
call fcn.18001e010
test eax, eax
js 0x180020bb9
mov r8, r15
mov rdx, rdi
mov rcx, rsi
call fcn.18001e010
test eax, eax
js 0x180020bb9
test rsi, rsi
je 0x180020bc5
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x180020ba6
test al, 0x50
je 0x180020bc5
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x180020bb9
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rsi, r13
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LocalFree]
test rsi, rsi
je 0x180020a79
xor ecx, ecx
jmp 0x180020a86
mov ecx, 0xa0
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
add rsp, 0x38
pop r14
pop r13
pop rdi
pop rsi
ret