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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
cmp dword [rdx + 0x128], 0x3b9aca00
je 0x1800e5cd6
mov ebp, r8d
mov rdi, rdx
mov rbx, rcx
lea rsi, [rdx + 0xc8]
mov rcx, rsi
call qword [sym.imp.kernel32.dll_AcquireSRWLockExclusive]
mov rax, qword [0x18016cbb8]
shl rax, 1
test rax, rax
jne 0x1800e5cb4
xor r14d, r14d
movzx eax, byte [rdi + 0xd0]
movzx eax, byte [rdi + 0x118]
test al, al
jne 0x1800e5cd6
lea rdx, [rdi + 0xd8]
lea rcx, [rsp + 0x28]
call fcn.1800e6520
mov r15, qword [rsp + 0x28]
mov r13, qword [rsp + 0x40]
test r13, r13
mov eax, 1
cmovne rax, r13
test r15, r15
cmove rax, r15
mov qword [rdi + 0x110], rax
test r14b, r14b
jne 0x1800e58ea
movabs rax, 0x7fffffffffffffff
mov rcx, qword [0x18016cbb8]
test rcx, rax
jne 0x1800e5cda
mov rcx, rsi
call qword [sym.imp.kernel32.dll_ReleaseSRWLockExclusive]
movabs r12, 0x44b82fa09b5a53
test r15, r15
je 0x1800e5988
mov r14, qword [rdi + 0x120]
mov r15d, dword [rdi + 0x128]
mov qword [rsp + 0x28], 0
lea rcx, [rsp + 0x28]
call qword [sym.imp.kernel32.dll_QueryPerformanceCounter]
test eax, eax
je 0x1800e5cf3
mov r12, qword [rsp + 0x28]
mov rcx, qword [0x18016cb98]
test rcx, rcx
jne 0x1800e5972
mov qword [rsp + 0x28], 0
lea rcx, [rsp + 0x28]
call qword [sym.imp.kernel32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x1800e5cf3
mov rcx, qword [rsp + 0x28]
mov qword [0x18016cb98], rcx
test rcx, rcx
je 0x1800e5cd6
mov rax, r12
or rax, rcx
shr rax, 0x20
je 0x1800e59b2
mov rax, r12
xor edx, edx
div rcx
jmp 0x1800e59b9
cmp ebp, 0x3b9aca00
jne 0x1800e5b0c
cmp byte [rbx + 0x1f9], 2
jne 0x1800e5b4b
mov rcx, qword [rbx]
add rcx, 0x10
call fcn.1800e5130
jmp 0x1800e5b77
mov eax, r12d
xor edx, edx
div ecx
imul r8, rax, 0x3b9aca00
imul rax, rdx, 0x3b9aca00
mov rdx, rax
or rdx, rcx
shr rdx, 0x20
movabs r12, 0x44b82fa09b5a53
je 0x1800e59e7
xor edx, edx
div rcx
mov rcx, rax
jmp 0x1800e59ed
xor edx, edx
div ecx
mov ecx, eax
add rcx, r8
mov rax, rcx
shr rax, 9
mul r12
shr rdx, 0xb
imul eax, edx, 0x3b9aca00
sub ecx, eax
mov qword [rsp + 0x28], rdx
mov dword [rsp + 0x30], ecx
lea rcx, [rsp + 0x28]
mov rdx, r14
mov r8d, r15d
call fcn.1800d6740
mov ecx, edx
mov edx, edx
imul r8, rdx, 0x431bde83
shr r8, 0x32
mov edx, 0x3e8
mul rdx
xor r9d, r9d
cmp ecx, 0x3b9aca00
cmove r8d, r9d
cmove rdx, r9
cmove rax, r9
add r8, rax
adc rdx, 0
neg rdx
mov eax, 0
sbb rax, rax
or rax, r8
sub r13, rax
cmovb r13, r9
mov rcx, r13
shr rcx, 3
movabs r8, 0x20c49ba5e353f7cf
mov rax, rcx
mul r8
shr rdx, 4
imul edx, edx, 0x3e8
mov eax, r13d
sub eax, edx
cmp r13, 0x3e7
ja 0x1800e5abc
test eax, eax
jne 0x1800e5abc
cmp byte [rbx + 0x1f9], 2
jne 0x1800e5b28
mov rcx, qword [rbx]
xor edx, edx
mov eax, 2
lock cmpxchg qword [rcx + 0x20], rdx
jmp 0x1800e5b77
imul r9d, eax, 0xf4240
mov rax, rcx
mul r8
mov rax, rdx
shr rax, 4
cmp r9d, ebp
mov r8d, ebp
cmovb r8d, r9d
cmp r13, 0x3e8
cmovae r8d, ebp
xor edx, edx
cmp ebp, 0x3b9aca00
cmove rdx, rax
cmove r8d, r9d
cmp byte [rbx + 0x1f9], 2
jne 0x1800e5b3c
mov rcx, qword [rbx]
add rcx, 0x10
call fcn.1800e6800
jmp 0x1800e5b77
cmp byte [rbx + 0x1f9], 2
jne 0x1800e5b60
mov rcx, qword [rbx]
add rcx, 0x10
xor edx, edx
mov r8d, ebp
call fcn.1800e6800
jmp 0x1800e5b77
cmp qword [rdi], 0
je 0x1800e5cd6
mov rcx, rbx
xor edx, edx
xor r8d, r8d
jmp 0x1800e5b72
cmp qword [rdi], 0
je 0x1800e5cd6
mov rcx, rbx
jmp 0x1800e5b72
cmp qword [rdi], 0
je 0x1800e5cd6
mov rcx, rbx
mov r8d, 0x3b9aca00
jmp 0x1800e5b72
cmp qword [rdi], 0
je 0x1800e5cd6
mov rcx, rbx
xor edx, edx
mov r8d, ebp
call fcn.1800e5d00
mov rbx, qword [rdi + 0x120]
mov edi, dword [rdi + 0x128]
mov qword [rsp + 0x28], 0
lea rcx, [rsp + 0x28]
call qword [sym.imp.kernel32.dll_QueryPerformanceCounter]
test eax, eax
je 0x1800e5cf3
mov r14, qword [rsp + 0x28]
mov rcx, qword [0x18016cb98]
test rcx, rcx
jne 0x1800e5be2
mov qword [rsp + 0x28], 0
lea rcx, [rsp + 0x28]
call qword [sym.imp.kernel32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x1800e5cf3
mov rcx, qword [rsp + 0x28]
mov qword [0x18016cb98], rcx
test rcx, rcx
je 0x1800e5cd6
mov rax, r14
or rax, rcx
shr rax, 0x20
je 0x1800e5bf8
mov rax, r14
xor edx, edx
div rcx
jmp 0x1800e5bff
mov eax, r14d
xor edx, edx
div ecx
imul r8, rax, 0x3b9aca00
imul rax, rdx, 0x3b9aca00
mov rdx, rax
or rdx, rcx
shr rdx, 0x20
je 0x1800e5c23
xor edx, edx
div rcx
mov rcx, rax
jmp 0x1800e5c29
xor edx, edx
div ecx
mov ecx, eax
add rcx, r8
mov rax, rcx
shr rax, 9
mul r12
shr rdx, 0xb
imul eax, edx, 0x3b9aca00
sub ecx, eax
mov qword [rsp + 0x28], rdx
mov dword [rsp + 0x30], ecx
lea rcx, [rsp + 0x28]
mov rdx, rbx
mov r8d, edi
call fcn.1800d6740
mov ecx, edx
mov edx, edx
imul r9, rdx, 0x431bde83
shr r9, 0x32
mov edx, 0x3e8
mul rdx
xor r8d, r8d
cmp ecx, 0x3b9aca00
cmove r9d, r8d
cmove rdx, r8
cmove rax, r8
add r9, rax
adc rdx, 0
neg rdx
sbb r8, r8
or r8, r9
mov rcx, rsi
mov rdx, r8
call fcn.1800e6950
nop
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
call fcn.18010ce00
mov r14d, eax
xor r14b, 1
movzx eax, byte [rdi + 0xd0]
movzx eax, byte [rdi + 0x118]
test al, al
je 0x1800e5896
ud2
call fcn.18010ce00
test al, al
jne 0x1800e58ea
mov byte [rdi + 0xd0], 1
jmp 0x1800e58ea
call sub.kernel32.dll_GetLastError
ud2