Function at 0x140040370
Capabilities:
Check if file exists

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x148
movaps xmmword [rsp + 0x130], xmm6
mov rsi, rcx
mov rax, qword [0x14020b038]
xor rax, rsp
mov qword [rsp + 0x128], rax
cmp r8, 0x38
jne 0x1400403db
cmp qword [rsp + 0x1b0], 1
jne 0x1400403db
cmp qword [rsp + 0x1c0], 1
jne 0x1400403db
mov rdi, rdx
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x1400403db
mov ecx, dword [rdi + 8]
test ecx, ecx
je 0x1400403db
cmp eax, ecx
jb 0x1400403db
cmp dword [rdi + 0x18], eax
jae 0x1400403db
cmp dword [rdi + 0x1c], eax
jbe 0x140040416
call fcn.1400b16e0
mov qword [rsi], 0
mov rcx, qword [rsp + 0x128]
xor rcx, rsp
call fcn.140113000
mov rax, rsi
movaps xmm6, xmmword [rsp + 0x130]
add rsp, 0x148
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov r14, r9
call fcn.14005d0a0
mov rcx, rax
call fcn.14005bc30
mov rbx, rax
movabs rbp, 0xaaaaaaaaaaaaaaaa
lea r15, [rsp + 0x60]
mov qword [r15 + 0x10], rbp
movaps xmm6, xmmword [0x1401dfd10]
movaps xmmword [r15], xmm6
mov rcx, r15
call fcn.140070570
mov rcx, qword [rbx + 0x20]
mov rdx, r14
mov r8, r15
call fcn.140109680
test eax, eax
je 0x140040473
call fcn.1400b16e0
mov qword [rsi], 0
jmp 0x140040760
mov r14, qword [rsp + 0x1b8]
lea r12, [rsp + 0x58]
mov qword [r12], rbp
lea r15, [rsp + 0x48]
mov rcx, r15
call fcn.140086630
lea r13, [rsp + 0x38]
mov rcx, r13
mov rdx, r14
call fcn.140086642
mov rcx, r12
mov rdx, r13
mov r8, r15
call fcn.140061820
mov qword [rsp + 0x120], rbp
movaps xmmword [rsp + 0x110], xmm6
movaps xmmword [rsp + 0x100], xmm6
mov rdx, qword [rdi + 0x21]
mov r8, qword [rdi + 0x29]
lea r15, [rsp + 0xd0]
mov rcx, r15
call fcn.14006f6b0
mov r14d, dword [rdi + 0xc]
xor eax, eax
mov qword [rsp + 0x30], rax
mov r13, qword [r12]
mov qword [r12], rax
cmp r13, 0xffffffffffffffff
je 0x140040502
test r13, r13
je 0x14004052c
call fcn.1400713d0
mov r12, rbp
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
lea rax, [r13 + 1]
cmp rax, 2
jb 0x140040521
mov qword [rsp + 0x30], r13
call fcn.1400713d0
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rbp, r12
mov qword [rsp + 0x20], r15
lea r15, [rsp + 0x100]
lea rdx, [rsp + 0x30]
mov rcx, r15
mov r8d, 2
mov r9, r14
call fcn.14010d420
lea r14, [rsp + 0xd0]
mov qword [r14 + 0x20], rbp
movaps xmmword [r14 + 0x10], xmm6
movaps xmmword [r14], xmm6
lea r12, [rsp + 0xa8]
mov rcx, r12
mov rdx, r15
call fcn.140072bd0
mov rcx, r14
mov rdx, r12
call fcn.140073400
mov rcx, r14
call fcn.140073580
test al, al
je 0x14004071d
mov ecx, 0x108
call fcn.1401119e0
mov r14, rax
mov r15, qword [rdi + 0x10]
lea rcx, [rsp + 0x80]
lea rdx, [rsp + 0xd0]
call fcn.1400734a0
mov rcx, r14
call fcn.14005d080
lea rax, [0x1401e2848]
mov qword [r14], rax
movups xmm0, xmmword [rdi]
movups xmmword [r14 + 0x10], xmm0
mov rcx, rbx
btr rcx, 0x3f
mov rax, qword [0x14020e7a0]
and rax, rcx
cmp rax, qword [0x14020e788]
jne 0x1400405f2
call fcn.140109560
mov qword [r14 + 0x20], rbx
lea rcx, [r14 + 0x28]
lea rdx, [rsp + 0x60]
call fcn.140109910
mov qword [r14 + 0x40], r15
lea rbx, [r14 + 0x48]
mov rcx, rbx
call fcn.14005ce90
lea rcx, [r14 + 0x50]
mov rdx, r14
call fcn.140064fd0
lea rcx, [r14 + 0x88]
lea r15, [rsp + 0x80]
mov rdx, r15
call fcn.1400734a0
lea rcx, [r14 + 0xb0]
call fcn.140073080
xor eax, eax
mov byte [r14 + 0xe8], al
mov qword [r14 + 0xec], rax
mov byte [r14 + 0xf4], al
mov qword [r14 + 0xf8], rax
mov byte [r14 + 0x100], al
mov rcx, r15
call fcn.140073480
test r14, r14
je 0x14004068b
mov eax, 1
lock xadd dword [r14 + 8], eax
cmp eax, 0x7fffffff
je 0x140040792
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x140040785
mov eax, dword [rdi + 0x18]
mov dword [r14 + 0xf8], eax
mov eax, dword [rdi + 0x1c]
mov dword [r14 + 0xfc], eax
test eax, eax
setne byte [r14 + 0x100]
mov al, byte [rdi + 0x20]
and al, 1
mov byte [r14 + 0xf2], al
mov rcx, r14
call fcn.14005bee0
test al, al
je 0x1400406e2
mov eax, dword [rdi + 0xc]
cmp qword [r14 + 0xb8], rax
jae 0x14004076f
call fcn.1400b16e0
mov qword [rsi], 0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
test r14, r14
je 0x140040729
lock dec dword [r14 + 8]
jne 0x140040729
mov rax, qword [r14]
mov rax, qword [rax + 0xe0]
mov rcx, r14
mov edx, 1
call qword [case.0x140173f30.0]
jmp 0x140040729
call fcn.1400b16e0
mov qword [rsi], 0
lea rcx, [rsp + 0xd0]
call fcn.140073480
lea rcx, [rsp + 0x100]
call fcn.140072d00
mov rax, qword [rsp + 0x58]
inc rax
cmp rax, 2
jb 0x140040760
call fcn.1400713d0
mov rcx, qword [rsp + 0x58]
call fcn.140081d40
lea rcx, [rsp + 0x60]
call fcn.140095920
jmp 0x1400403e7
mov rcx, r14
call fcn.14005c260
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov qword [rsi], r14
jmp 0x140040729
mov rcx, rbx
call fcn.140081a40
jmp 0x14004069c
int3