Function at 0x1400c508c
Capabilities:
Check if file exists

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x40
mov r14, rdx
mov rsi, rcx
mov rcx, qword [0x14017d3a8]
lea rax, [0x14017d3a8]
cmp rcx, rax
je 0x1400c50db
test byte [rcx + 0x1c], 2
je 0x1400c50db
cmp byte [rcx + 0x19], 4
jb 0x1400c50db
mov rcx, qword [rcx + 0x10]
lea r8, [0x14000bbb0]
mov edx, 0x27
call fcn.14001dd24
test rsi, rsi
jne 0x1400c50f8
lea r8, [0x140009ec0]
lea rcx, [0x14000b1d0]
mov edx, 0x43d
call fcn.1400a8be8
and qword [rbp + 0x28], 0
xor edi, edi
lea rdx, [rbp + 0x28]
and dword [r14], edi
mov rcx, rsi
mov qword [rbp + 0x20], rdi
call fcn.1400a97c0
mov ebx, eax
test eax, eax
js 0x1400c53cf
mov rcx, qword [rbp + 0x28]
lea r8, [rbp + 0x20]
lea rdx, [0x140001808]
call fcn.1400a9ab8
mov ebx, eax
test eax, eax
js 0x1400c53cb
and qword [rsp + 0x30], rdi
mov rdi, qword [rbp + 0x20]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov rcx, rdi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
jne 0x1400c521b
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x1400c51c1
mov rcx, qword [0x14017d3a8]
lea rsi, [0x14017d3a8]
cmp rcx, rsi
je 0x1400c53dd
test byte [rcx + 0x1c], al
je 0x1400c53dd
cmp byte [rcx + 0x19], 4
jb 0x1400c53dd
mov rcx, qword [rcx + 0x10]
lea edx, [rax + 0x26]
lea r8, [0x14000bbb0]
mov r9, rdi
call fcn.14001ec40
jmp 0x1400c53d6
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov rcx, qword [0x14017d3a8]
lea rsi, [0x14017d3a8]
cmp rcx, rsi
je 0x1400c53dd
test byte [rcx + 0x1c], 2
je 0x1400c53dd
cmp byte [rcx + 0x19], 2
jb 0x1400c53dd
mov rcx, qword [rcx + 0x10]
lea r8, [0x14000bbb0]
mov edx, 0x29
mov r9, rdi
mov dword [rsp + 0x20], ebx
call fcn.14001ecbc
jmp 0x1400c53d6
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or qword [rbp + 0x20], 0xffffffffffffffff
lea r8, [rbp + 0x20]
lea rdx, [0x140001808]
mov rcx, rsi
call fcn.1400c6f60
mov ebx, eax
test eax, eax
jns 0x1400c53aa
cmp eax, 0x80070002
je 0x1400c52a4
cmp eax, 0x80070003
je 0x1400c52a4
mov rcx, qword [0x14017d3a8]
lea rsi, [0x14017d3a8]
cmp rcx, rsi
je 0x1400c53b8
test byte [rcx + 0x1c], 2
je 0x1400c53b8
cmp byte [rcx + 0x19], 2
jb 0x1400c53b8
mov edx, 0x2b
lea r9, [0x140001808]
mov rcx, qword [rcx + 0x10]
lea r8, [0x14000bbb0]
mov dword [rsp + 0x20], eax
call fcn.14001ecbc
jmp 0x1400c53b1
mov rcx, qword [0x14017d3a8]
lea rax, [0x14017d3a8]
cmp rcx, rax
je 0x1400c52e7
test byte [rcx + 0x1c], 1
je 0x1400c52e7
cmp byte [rcx + 0x19], 3
jb 0x1400c52e7
mov rcx, qword [rcx + 0x10]
lea rax, [0x140001808]
lea r8, [0x14000bbb0]
mov edx, 0x2a
mov r9d, ebx
mov qword [rsp + 0x20], rax
call fcn.14006beb4
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or qword [rbp + 0x20], 0xffffffffffffffff
lea r8, [rbp + 0x20]
lea rdx, [0x140001828]
mov rcx, rsi
call fcn.1400c6f60
mov ebx, eax
test eax, eax
jns 0x1400c53aa
cmp eax, 0x80070002
je 0x1400c5355
cmp eax, 0x80070003
je 0x1400c5355
mov rcx, qword [0x14017d3a8]
lea rsi, [0x14017d3a8]
cmp rcx, rsi
je 0x1400c53b8
test byte [rcx + 0x1c], 2
je 0x1400c53b8
cmp byte [rcx + 0x19], 2
jb 0x1400c53b8
mov edx, 0x2d
lea r9, [0x140001828]
jmp 0x1400c528b
mov rcx, qword [0x14017d3a8]
lea rsi, [0x14017d3a8]
cmp rcx, rsi
je 0x1400c539f
test byte [rcx + 0x1c], 1
je 0x1400c539f
cmp byte [rcx + 0x19], 3
jb 0x1400c539f
mov rcx, qword [rcx + 0x10]
lea rax, [0x140001828]
lea r8, [0x14000bbb0]
mov edx, 0x2c
mov r9d, ebx
mov qword [rsp + 0x20], rax
call fcn.14006beb4
mov rcx, qword [0x14017d3a8]
mov dword [r14], 1
xor ebx, ebx
jmp 0x1400c53b8
lea rsi, [0x14017d3a8]
mov rcx, qword [0x14017d3a8]
cmp qword [rbp + 0x20], 0xffffffffffffffff
je 0x1400c53dd
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400c53d6
mov rdi, qword [rbp + 0x20]
lea rsi, [0x14017d3a8]
mov rcx, qword [0x14017d3a8]
cmp qword [rbp + 0x28], 0
je 0x1400c53f5
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rcx, qword [0x14017d3a8]
test rdi, rdi
je 0x1400c540a
mov rcx, rdi
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rcx, qword [0x14017d3a8]
cmp rcx, rsi
je 0x1400c5430
test byte [rcx + 0x1c], 2
je 0x1400c5430
cmp byte [rcx + 0x19], 4
jb 0x1400c5430
mov rcx, qword [rcx + 0x10]
lea r8, [0x14000bbb0]
mov edx, 0x2e
call fcn.14001dd24
mov rsi, qword [rsp + 0x78]
mov eax, ebx
mov rbx, qword [rsp + 0x70]
add rsp, 0x40
pop r14
pop rdi
pop rbp
ret