Function at 0x140027700
Capabilities:
Check if file exists

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov rsi, rcx
mov qword [rax - 0x30], rcx
xor ebp, ebp
mov dword [rax - 0x48], ebp
mov qword [rax - 0x58], rbp
mov dword [rax - 0x60], 0x8000000
mov dword [rax - 0x68], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140027760
lea rdi, [rbp - 1]
jmp 0x140027a10
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x1400277a0
mov rdx, qword [rsi]
sub rdx, 0x18
mov rdi, 0xffffffffffffffff
mov ecx, edi
lock xadd dword [rdx + 0x10], ecx
sub ecx, 1
jg 0x140027798
mov r8, qword [rdx]
mov rcx, qword [r8]
mov rax, qword [rcx + 8]
mov rcx, r8
call qword [case.0x140038ca6.0]
mov rax, rdi
jmp 0x140027a34
mov rdi, 0xffffffffffffffff
cmp eax, 3
jne 0x140027969
mov qword [rsp + 0x48], rbp
mov rax, qword [rsi]
mov rcx, qword [rax - 0x18]
test rcx, rcx
je 0x1400277d6
mov rax, qword [rcx]
mov rax, qword [rax + 0x20]
call qword [case.0x140038ca6.0]
mov rcx, rax
test rax, rax
jne 0x1400277fa
call fcn.140019590
mov rdx, rax
mov rcx, qword [rax]
mov rax, qword [rcx + 0x20]
mov rcx, rdx
call qword [case.0x140038ca6.0]
mov rcx, rax
test rax, rax
je 0x140027a52
mov rax, qword [rcx]
mov rax, qword [rax + 0x18]
call qword [case.0x140038ca6.0]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x48], rbx
mov r12d, 1
mov dword [rsp + 0x40], r12d
mov r13, qword [rsi]
mov ecx, dword [r13 - 0x10]
mov dword [rsp + 0x50], ecx
lea rdx, [0x14026b1d8]
mov rbp, rdi
inc rbp
cmp word [rdx + rbp*2], 0
jne 0x140027830
lea r14d, [rcx + rbp]
test r14d, r14d
js 0x140027a5d
mov ecx, r12d
sub ecx, dword [rax + 0x10]
mov eax, dword [rax + 0xc]
sub eax, r14d
or eax, ecx
jge 0x140027870
mov edx, r14d
lea rcx, [rsp + 0x48]
call fcn.140018ea0
mov rbx, qword [rsp + 0x48]
lea rdx, [0x14026b1d8]
movsxd rax, ebp
lea r15, [rax + rax]
test r15, r15
je 0x14002789e
test rbx, rbx
jne 0x140027893
call fcn.1401fed34
mov dword [rax], 0x16
call fcn.1401feb94
jmp 0x14002789e
mov r8, r15
mov rcx, rbx
call fcn.14022e460
movsxd r8, dword [rsp + 0x50]
add r8, r8
lea rcx, [r15 + rbx]
je 0x1400278d7
test rcx, rcx
je 0x1400278c7
test r13, r13
je 0x1400278c0
mov rdx, r13
call fcn.14022e460
jmp 0x1400278d7
xor edx, edx
call fcn.14022eb00
call fcn.1401fed34
mov dword [rax], 0x16
call fcn.1401feb94
cmp r14d, dword [rbx - 0xc]
jg 0x140027a5d
mov dword [rbx - 0x10], r14d
movsxd rax, r14d
xor ebp, ebp
mov word [rbx + rax*2], bp
lea rdx, [rsp + 0x48]
mov rcx, rsi
call fcn.140017b80
and r12d, 0xfffffffe
mov dword [rsp + 0x40], r12d
lea rdx, [rbx - 0x18]
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140027924
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x140038ca6.0]
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], 0x8000000
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140027963
mov rcx, rsi
call fcn.1400192b0
jmp 0x140027a31
call qword [sym.imp.KERNEL32.dll_GetLastError]
add eax, 0xffffffe0
cmp eax, 1
ja 0x140027a10
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], ebp
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x140027a10
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], 0x8000000
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [rax + 4]
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp rbx, 0xffffffffffffffff
jne 0x140027a10
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], 0x8000000
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [rbx + 8]
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov rdx, qword [rsi]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], edi
sub edi, 1
jg 0x140027a31
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x140038ca6.0]
mov rax, rbx
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
mov ecx, 0x80004005
call fcn.140019300
int3
mov ecx, 0x80070057
call fcn.140019300
int3