Function at 0x1401fa590
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x38
mov ebx, ecx
mov rax, qword [0x1404fe040]
xor rax, rsp
mov qword [rsp + 0x30], rax
mov eax, dword [0x140512ad8]
mov ecx, dword [0x14050f5f0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1401fa786
mov rsi, qword [0x140512ad0]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x1401fa7d3
movzx ebx, bl
dec ebx
or ebx, 1
test byte [0x140512a80], 1
mov eax, 1
mov ecx, 8
cmovne ecx, eax
xor ebp, ebp
add ebx, dword [0x140512a84]
mov dword [0x140512a84], ebx
cmovne ebp, ecx
mov eax, dword [0x140512a88]
cmp ebp, eax
je 0x1401fa75b
test eax, eax
je 0x1401fa6ec
mov rax, qword [0x140500948]
lea rcx, [0x1401fa8c0]
lea rdi, [rsp + 0x28]
cmp rax, rcx
jne 0x1401fa7f1
mov qword [rdi], 0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rcx, qword [rdi]
movabs rax, 0x8637bd05af7
cmp rcx, rax
jge 0x1401fa84e
imul rax, rcx, 0xf4240
cqo
idiv qword [0x140512af0]
mov qword [rsp + 0x28], rax
mov rcx, qword [0x140512ae0]
xor edx, edx
cmp rax, rcx
setns dl
movabs r8, 0x7fffffffffffffff
add r8, rdx
sub rax, rcx
cmovo rax, r8
movabs rdx, 0x8000000000000001
lea r8, [rax + rdx]
mov rcx, qword [0x140512a90]
cmp r8, 2
jb 0x1401fa802
lea rdx, [rcx + rax]
sar rdx, 0x3f
btc rdx, 0x3f
add rcx, rax
cmovo rcx, rdx
mov rax, rcx
mov qword [0x140512a90], rax
mov ecx, dword [0x140512a88]
call qword [sym.imp.WINMM.dll_timeEndPeriod]
mov dword [0x140512a88], ebp
test ebx, ebx
je 0x1401fa75b
mov rax, qword [0x140500948]
lea rcx, [0x1401fa8c0]
lea rdi, [rsp + 0x28]
cmp rax, rcx
jne 0x1401fa7e0
mov qword [rdi], 0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rcx, qword [rdi]
movabs rax, 0x8637bd05af7
cmp rcx, rax
jge 0x1401fa81d
imul rax, rcx, 0xf4240
cqo
idiv qword [0x140512af0]
mov qword [0x140512ae0], rax
mov ecx, dword [0x140512a88]
call qword [sym.imp.WINMM.dll_timeBeginPeriod]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
cmp rcx, qword [0x1404fe040]
je 0x1401fa77b
call fcn.140297b50
int3
mov al, 1
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
ret
lea rcx, [0x140512ad8]
call fcn.14029664c
cmp dword [0x140512ad8], 0xffffffff
jne 0x1401fa5ce
mov ecx, 8
call fcn.1402965cc
mov rsi, rax
mov qword [rax], 0
mov rcx, rax
call fcn.1401fae80
mov qword [0x140512ad0], rsi
lea rcx, [0x140512ad8]
call fcn.140296700
jmp 0x1401fa5ce
mov rcx, rsi
call sub.KERNEL32.dll_AcquireSRWLockExclusive
jmp 0x1401fa5e6
mov rcx, rdi
call qword [case.0x1403053b8.0]
mov rax, qword [rdi]
jmp 0x1401fa748
mov rcx, rdi
call qword [case.0x1403053b8.0]
mov rax, qword [rdi]
jmp 0x1401fa680
add rdx, rcx
cmp rdx, 2
setae dl
cmp rcx, rax
sete cl
or cl, dl
jne 0x1401fa6d9
int3
mov r8, qword [0x140512af0]
mov rax, rcx
cqo
idiv r8
imul r9, rax, 0xf4240
imul rax, r8
sub rcx, rax
imul rax, rcx, 0xf4240
cqo
idiv r8
add rax, r9
jmp 0x1401fa748
mov r8, qword [0x140512af0]
mov rax, rcx
cqo
idiv r8
imul r9, rax, 0xf4240
imul rax, r8
sub rcx, rax
imul rax, rcx, 0xf4240
cqo
idiv r8
add rax, r9
jmp 0x1401fa67b