Function at 0x140006580
Capabilities:
Check if file exists

Disassembly:
mov rax, rsp
push rsi
push rdi
push r14
sub rsp, 0x250
mov qword [rsp + 0x28], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov rax, qword [0x14006c038]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov r14, r8
xor esi, esi
mov qword [r8], rsi
mov ebx, 0x104
mov r9d, ebx
lea rdx, [rsp + 0x30]
lea rax, [rsp + 0x30]
sub rcx, rax
nop
lea rax, [r9 + 0x7ffffefa]
test rax, rax
je 0x1400065f2
movzx eax, word [rdx + rcx]
test ax, ax
je 0x1400065f2
mov word [rdx], ax
add rdx, 2
sub r9, 1
jne 0x1400065d0
lea rax, [rdx - 2]
test r9, r9
cmovne rax, rdx
mov word [rax], si
mov rcx, rbx
lea rax, [rsp + 0x30]
cmp word [rax], si
je 0x140006617
add rax, 2
sub rcx, 1
jne 0x140006608
mov rax, rbx
sub rax, rcx
mov r8, rsi
test rcx, rcx
cmovne r8, rax
je 0x14000667f
mov rdx, rbx
sub rdx, r8
lea rcx, [rsp + 0x30]
lea rcx, [rcx + r8*2]
je 0x140006671
lea rax, [rdx + 0x7ffffefa]
add rax, r8
lea r9, [0x14005b528]
sub r9, rcx
nop
test rax, rax
je 0x140006671
movzx r8d, word [rcx + r9]
test r8w, r8w
je 0x140006671
mov word [rcx], r8w
add rcx, 2
dec rax
sub rdx, 1
jne 0x140006650
lea rax, [rcx - 2]
test rdx, rdx
cmovne rax, rcx
mov word [rax], si
lea r8, [rsp + 0x30]
xor edx, edx
mov ecx, 0x1f0003
call qword [sym.imp.KERNEL32.dll_OpenSemaphoreW]
mov rdi, rax
test rax, rax
jne 0x1400066c1
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x140006809
mov rcx, qword [rsp + 0x268]
mov edx, 0xc9
call fcn.140006000
mov esi, eax
jmp 0x140006809
mov dword [rsp + 0x24], esi
mov dword [rsp + 0x20], esi
lea rdx, [rsp + 0x24]
mov rcx, rdi
call fcn.1400063f0
mov ebp, eax
test eax, eax
jns 0x1400066ff
mov rcx, qword [rsp + 0x268]
mov r9d, eax
lea r8, [0x14005b45c]
mov edx, 0xcf
call fcn.140005fe0
mov esi, ebp
jmp 0x140006809
mov rcx, rbx
lea rax, [rsp + 0x30]
cmp word [rax], si
je 0x140006716
add rax, 2
sub rcx, 1
jne 0x140006707
mov rax, rbx
sub rax, rcx
mov r8, rsi
test rcx, rcx
cmovne r8, rax
je 0x14000677d
sub rbx, r8
lea rdx, [rsp + 0x30]
lea rdx, [rdx + r8*2]
je 0x14000676f
lea rax, [r8 + 0x7ffffefa]
add rax, rbx
lea r8, [0x14005b530]
sub r8, rdx
nop word [rax + rax]
test rax, rax
je 0x14000676f
movzx ecx, word [rdx + r8]
test cx, cx
je 0x14000676f
mov word [rdx], cx
add rdx, 2
dec rax
sub rbx, 1
jne 0x140006750
lea rax, [rdx - 2]
test rbx, rbx
cmovne rax, rdx
mov word [rax], si
lea r8, [rsp + 0x30]
xor edx, edx
mov ecx, 0x1f0003
call qword [sym.imp.KERNEL32.dll_OpenSemaphoreW]
mov rbx, rax
test rax, rax
jne 0x1400067af
mov rcx, qword [rsp + 0x268]
mov edx, 0xd5
call fcn.140006000
mov ebp, eax
mov esi, eax
jmp 0x140006809
lea rdx, [rsp + 0x20]
mov rcx, rbx
call fcn.1400063f0
mov ebp, eax
test eax, eax
jns 0x1400067ec
mov rcx, qword [rsp + 0x268]
mov r9d, eax
lea r8, [0x14005b45c]
mov edx, 0xd7
call fcn.140005fe0
nop
mov rcx, rbx
call fcn.140006070
nop
mov esi, ebp
jmp 0x140006809
mov rcx, rbx
call fcn.140006070
nop
movsxd rcx, dword [rsp + 0x20]
shl rcx, 0x1f
movsxd rax, dword [rsp + 0x24]
or rax, rcx
mov qword [r14], rax
test rdi, rdi
je 0x140006817
mov rcx, rdi
call fcn.140006070
nop
mov eax, esi
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.140019840
lea r11, [rsp + 0x250]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret