Function at 0x140003fa0
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 [0x14001d010]
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 0x140004012
movzx eax, word [rdx + rcx]
test ax, ax
je 0x140004012
mov word [rdx], ax
add rdx, 2
sub r9, 1
jne 0x140003ff0
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 0x140004037
add rax, 2
sub rcx, 1
jne 0x140004028
mov rax, rbx
sub rax, rcx
mov r8, rsi
test rcx, rcx
cmovne r8, rax
je 0x14000409f
mov rdx, rbx
sub rdx, r8
lea rcx, [rsp + 0x30]
lea rcx, [rcx + r8*2]
je 0x140004091
lea rax, [rdx + 0x7ffffefa]
add rax, r8
lea r9, [0x140013df0]
sub r9, rcx
nop
test rax, rax
je 0x140004091
movzx r8d, word [rcx + r9]
test r8w, r8w
je 0x140004091
mov word [rcx], r8w
add rcx, 2
dec rax
sub rdx, 1
jne 0x140004070
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 0x1400040e1
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x140004215
mov rcx, qword [rsp + 0x268]
mov edx, 0xc9
call fcn.140003a40
mov esi, eax
jmp 0x140004215
mov dword [rsp + 0x24], esi
mov dword [rsp + 0x20], esi
lea rdx, [rsp + 0x24]
mov rcx, rdi
call fcn.140003e20
mov ebp, eax
test eax, eax
jns 0x140004118
mov rcx, qword [rsp + 0x268]
mov r9d, eax
mov edx, 0xcf
call fcn.140003a20
mov esi, ebp
jmp 0x140004215
mov rcx, rbx
lea rax, [rsp + 0x30]
cmp word [rax], si
je 0x14000412f
add rax, 2
sub rcx, 1
jne 0x140004120
mov rax, rbx
sub rax, rcx
mov r8, rsi
test rcx, rcx
cmovne r8, rax
je 0x140004190
sub rbx, r8
lea rdx, [rsp + 0x30]
lea rdx, [rdx + r8*2]
je 0x140004182
lea rax, [r8 + 0x7ffffefa]
add rax, rbx
lea r8, [0x140013df8]
sub r8, rdx
test rax, rax
je 0x140004182
movzx ecx, word [rdx + r8]
test cx, cx
je 0x140004182
mov word [rdx], cx
add rdx, 2
dec rax
sub rbx, 1
jne 0x140004163
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 0x1400041c2
mov rcx, qword [rsp + 0x268]
mov edx, 0xd5
call fcn.140003a40
mov ebp, eax
mov esi, eax
jmp 0x140004215
lea rdx, [rsp + 0x20]
mov rcx, rbx
call fcn.140003e20
mov ebp, eax
test eax, eax
jns 0x1400041f8
mov rcx, qword [rsp + 0x268]
mov r9d, eax
mov edx, 0xd7
call fcn.140003a20
nop
mov rcx, rbx
call fcn.140003ab0
nop
mov esi, ebp
jmp 0x140004215
mov rcx, rbx
call fcn.140003ab0
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 0x140004223
mov rcx, rdi
call fcn.140003ab0
nop
mov eax, esi
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.140010890
lea r11, [rsp + 0x250]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret