Function at 0x14020ef30
Capabilities:
Check for time delay via queryperformancecounter
Get thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xe8
movapd xmmword [rsp + 0xd0], xmm6
mov rbx, rcx
mov rax, qword [0x14033f038]
xor rax, rsp
mov qword [rsp + 0xc8], rax
test rdx, rdx
jle 0x14020f5c4
mov r14, rdx
movapd xmm0, xmmword [0x140301d60]
movapd xmmword [rsp + 0x60], xmm0
movapd xmmword [rsp + 0x70], xmm0
movapd xmmword [rsp + 0x80], xmm0
movapd xmmword [rsp + 0x90], xmm0
movapd xmmword [rsp + 0xa0], xmm0
movapd xmmword [rsp + 0xb0], xmm0
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0xc0], rax
mov byte [rsp + 0x60], 0
xorpd xmm0, xmm0
movupd xmmword [rsp + 0x68], xmm0
movupd xmmword [rsp + 0x78], xmm0
movupd xmmword [rsp + 0x88], xmm0
movupd xmmword [rsp + 0x98], xmm0
movupd xmmword [rsp + 0xa8], xmm0
mov qword [rsp + 0xb8], 0
mov al, byte [rbx + 8]
mov byte [rsp + 0x2b], al
test al, al
jne 0x14020f1f7
xor esi, esi
mov dword [rsp + 0x2c], 0
mov qword [rsp + 0x30], rsi
movabs r8, 0x7fffffffffffffff
cmp r14, r8
jne 0x14020f028
mov r15, r8
jmp 0x14020f0ba
mov rsi, r8
mov rax, qword [0x1403411f8]
lea rcx, [0x14003b7a0]
cmp rax, rcx
jne 0x14020f58a
lea r15, [rsp + 0x38]
mov qword [r15], 0
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [r15]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jge 0x14020f07e
imul rax, rax, 0xf4240
cqo
idiv qword [0x140354790]
mov r15, rax
jmp 0x14020f0a3
mov rcx, qword [0x140354790]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
mov r15, rax
add r15, r8
mov r8, rsi
lea rax, [r15 + r14]
sar rax, 0x3f
btc rax, 0x3f
add r15, r14
cmovo r15, rax
mov rsi, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea r13, [0x14003b7a0]
lea r12, [rsp + 0x38]
mov rdi, qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, 0xffffffff
mov rbp, r8
cmp r14, r8
je 0x14020f11d
mov rax, r14
shr rax, 3
movabs rcx, 0x20c49ba5e353f7cf
mul rcx
mov rax, rdx
shr rax, 4
imul rcx, rax, 0x3e8
cmp rcx, r14
adc rax, 0
mov rcx, rax
shr rcx, 0x20
neg rcx
mov edx, 0
sbb edx, edx
or edx, eax
mov rcx, qword [rbx]
call rsi
test eax, eax
je 0x14020f41a
mov rax, qword [0x1403411f8]
cmp rax, r13
jne 0x14020f519
mov qword [rsp + 0x38], 0
mov rcx, r12
call rdi
mov rax, qword [rsp + 0x38]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jge 0x14020f16e
imul rax, rax, 0xf4240
cqo
idiv qword [0x140354790]
jmp 0x14020f190
mov rcx, qword [0x140354790]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
mov r8, rbp
xor ecx, ecx
cmp r15, rax
setns cl
add rcx, rbp
mov r14, r15
sub r14, rax
cmovo r14, rcx
test r14, r14
jg 0x14020f0d4
xor ebx, ebx
cmp byte [rsp + 0x60], 0
jne 0x14020f285
cmp byte [rsp + 0x2b], 0
jne 0x14020f3e6
mov rcx, qword [rsp + 0xc8]
xor rcx, rsp
call fcn.140171860
mov eax, ebx
movaps xmm6, xmmword [rsp + 0xd0]
add rsp, 0xe8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
call fcn.1400412c0
mov r15, rax
mov qword [rsp + 0x38], rbx
mov rcx, qword [0x140352ad8]
test rcx, rcx
jne 0x14020f5f7
xor eax, eax
mov rcx, qword [0x1403428e0]
and rcx, rax
cmp rcx, qword [0x1403428c8]
mov rsi, rax
je 0x14020f601
lea r12, [rsp + 0x68]
mov dword [rsp + 0x2c], 0
test rax, rax
jne 0x14020f611
lea rdx, str.TimedWait
lea r8, str....._base_synchronizationwaitable_event.cc
lea r15, [rsp + 0x38]
mov rcx, r15
mov r9d, 0x26
call fcn.14004f270
mov rcx, r12
mov rdx, r15
xor r8d, r8d
mov r9d, 1
call fcn.1400cd8e0
mov byte [rsp + 0x60], 1
jmp 0x14020f00c
call fcn.14016ed94
mov r12d, dword [rax]
call fcn.14016ed94
mov dword [rax], 0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r14, qword [0x14035aab0]
cmp r14, 1
jbe 0x14020f53c
mov rsi, qword [rsp + 0x70]
mov ecx, dword [0x1403411e0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x14020f5a0
mov rcx, qword [r14]
shl rcx, 4
mov qword [rax + rcx], rsi
mov ecx, dword [r14 + 8]
mov rdx, qword [r14]
shl rdx, 4
mov dword [rax + rdx + 8], ecx
mov rsi, qword [rsp + 0x68]
test rsi, rsi
je 0x14020f304
cmp qword [rsp + 0x70], 0
je 0x14020f421
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.14016ed94
mov dword [rax], r12d
cmp byte [rsp + 0xa0], 0
je 0x14020f337
mov r14, qword [rsp + 0xb0]
test r14, r14
jne 0x14020f484
mov byte [rsp + 0xa0], 0
mov rax, qword [rsp + 0x80]
test rax, rax
jne 0x14020f635
mov r14, qword [rsp + 0x90]
mov qword [rsp + 0x90], 0
test r14, r14
jne 0x14020f6a0
mov rax, qword [rsp + 0x80]
test rax, rax
jne 0x14020f6b5
xor ecx, ecx
mov rax, qword [0x1403428e0]
and rax, rcx
cmp rax, qword [0x1403428c8]
je 0x14020f6d2
mov qword [rsp + 0x80], 0
mov rcx, qword [rsp + 0x70]
mov rax, qword [0x1403428e0]
and rax, rcx
cmp rax, qword [0x1403428c8]
je 0x14020f6dc
mov qword [rsp + 0x70], 0
mov rcx, qword [rsp + 0x68]
mov rax, qword [0x1403428e0]
and rax, rcx
cmp rax, qword [0x1403428c8]
jne 0x14020f1be
call fcn.1401571d0
jmp 0x14020f1be
mov rcx, qword [rsp + 0x30]
test rcx, rcx
jne 0x14020f6e6
mov rax, qword [0x1403428e0]
and rax, rcx
cmp rax, qword [0x1403428c8]
jne 0x14020f1c9
mov rcx, qword [rsp + 0x30]
call fcn.1401571d0
jmp 0x14020f1c9
mov bl, 1
jmp 0x14020f1b3
mov r14, qword [rsi + 0x28]
add r14, 0x28
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x14020f52f
mov qword [rsi + 0x20], 0
cmp byte [rsi + 0x3a], 0
jne 0x14020f470
cmp byte [rsi + 0x38], 0
mov rcx, qword [rsi + 0x28]
jne 0x14020f5b3
dec dword [rcx + 0x120]
cmp byte [rsi + 0x18], 0
je 0x14020f725
cmp byte [rsi + 0x19], 0
je 0x14020f500
mov word [rsi + 0x38], 0
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x14020f304
mov rax, qword [fcn.14007a620]
lea r15, [rsp + 0x58]
mov rcx, r15
call qword [case.0x140211850.0]
mov rdi, qword [rsp + 0xa8]
mov rdx, qword [r15]
xor eax, eax
cmp rdx, rdi
setns al
movabs r12, 0x7fffffffffffffff
add rax, r12
mov rsi, rdx
sub rsi, rdi
cmovo rsi, rax
cmp rsi, 0xf4240
jge 0x14020f727
mov r14, qword [rsp + 0xb0]
test r14, r14
je 0x14020f32f
lock dec dword [r14]
jne 0x14020f32f
mov rcx, r14
call fcn.14011feb0
mov rcx, r14
call fcn.14016eccc
jmp 0x14020f32f
cmp byte [rsi + 0x39], 0
mov rcx, qword [rsi + 0x28]
jne 0x14020f876
dec dword [rcx + 0x124]
jmp 0x14020f470
lea r14, [rsp + 0x38]
mov rcx, r14
call qword [case.0x140211850.0]
mov rax, qword [r14]
jmp 0x14020f190
mov rcx, r14
call fcn.140047ff0
jmp 0x14020f43a
lea rcx, [0x14035aab0]
call fcn.14006d330
test al, al
je 0x14020f8c5
xorpd xmm0, xmm0
movupd xmmword [0x14035aab8], xmm0
lea r15, [0x14035aab0]
lea r14, [0x14035aab8]
mov rcx, r14
xor edx, edx
call fcn.140041af0
mov rcx, r15
mov rdx, r14
xor r8d, r8d
mov r9, r15
call fcn.14006d410
jmp 0x14020f2b9
lea r15, [rsp + 0x58]
mov rcx, r15
call qword [case.0x140211850.0]
mov r15, qword [r15]
jmp 0x14020f0a3
test rsi, rsi
je 0x14020f2ee
call fcn.140001120
jmp 0x14020f2d4
dec qword [rcx + 0x100]
call fcn.140131b40
jmp 0x14020f45c
mov rcx, qword [rsp + 0xc8]
xor rcx, rsp
call fcn.140171860
mov rcx, rbx
movaps xmm6, xmmword [rsp + 0xd0]
add rsp, 0xe8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.1400a5e70
call fcn.1402097d0
jmp 0x14020f216
mov rcx, rsi
call fcn.140156f20
mov rax, rsi
jmp 0x14020f230
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov rcx, rsi
mov rdx, r15
xor r8d, r8d
mov r9b, 0x30
call fcn.140207de0
mov dword [rsp + 0x2c], eax
jmp 0x14020f246
mov ecx, dword [rsp + 0x88]
cmp dword [rax + 0x18], ecx
jbe 0x14020f348
mov rax, qword [rax + 0x10]
shl rcx, 7
cmp dword [rax + rcx + 0x68], 0
je 0x14020f348
mov r15, qword [0x140352ad8]
lea r14, [r15 + 0xc8]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x14020f8d1
mov rcx, qword [rsp + 0x80]
sub r15, 0xffffffffffffff80
mov edx, dword [rsp + 0x88]
mov r8, r15
call fcn.1402081c0
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x14020f348
mov rcx, r14
call fcn.1402077d0
mov rcx, r14
call fcn.14016eccc
jmp 0x14020f365
mov rcx, qword [rax + 8]
lock dec dword [rcx + 0x38]
mov rax, qword [rax + 8]
lock inc dword [rax + 0x3c]
mov rcx, qword [rsp + 0x80]
jmp 0x14020f378
call fcn.1401571d0
jmp 0x14020f38f
call fcn.1401571d0
jmp 0x14020f3b7
mov eax, dword [rsp + 0x2c]
cmp dword [rcx + 0x18], eax
jbe 0x14020f70b
mov rax, qword [rsp + 0x30]
mov rax, qword [rax + 0x10]
mov ecx, dword [rsp + 0x2c]
shl rcx, 7
cmp dword [rax + rcx + 0x68], 0
jne 0x14020f887
mov rcx, qword [rsp + 0x30]
mov rax, qword [rcx + 8]
lock dec dword [rax + 0x38]
mov rax, qword [rcx + 8]
lock inc dword [rax + 0x3c]
jmp 0x14020f3f4
ud2
mov rax, qword [r14 + 0x1f0]
mov ecx, 0x3938700
lea r8, [rcx + rax]
sar r8, 0x3f
btc r8, 0x3f
add rcx, rax
cmovo rcx, r8
cmp rcx, rdx
jg 0x14020f777
lea r15, [rsp + 0x38]
mov rcx, r15
call fcn.140131030
mov r15, qword [r15]
test r15, r15
je 0x14020f777
lock dec dword [r15]
jne 0x14020f777
mov rcx, r15
call fcn.14011feb0
mov rcx, r15
call fcn.14016eccc
mov rax, qword [r14 + 0x1f0]
xor ecx, ecx
cmp rdi, rax
setns cl
add rcx, r12
sub rdi, rax
cmovo rdi, rcx
lea rax, [rdi + rbp]
add rax, 2
cmp rax, 2
jae 0x14020f7b0
shr rdi, 0x3f
lea rax, [0x140308b10]
movsd xmm0, qword [rax + rdi*8]
jmp 0x14020f7b5
cvtsi2sd xmm0, rdi
divsd xmm0, qword [0x140308b20]
call fcn.1401ae0e0
movsd xmm6, qword [0x1402eea60]
ucomisd xmm6, xmm0
jae 0x14020f7e4
xor eax, eax
ucomisd xmm0, qword [0x1402eea78]
mov edi, 0x7fffffff
cmovb edi, eax
jmp 0x14020f7f0
maxsd xmm0, qword [0x1402eea78]
cvttsd2si edi, xmm0
lea rax, [rsi + rbp]
add rax, 2
cmp rax, 2
jb 0x14020f810
xorps xmm0, xmm0
cvtsi2sd xmm0, rsi
divsd xmm0, qword [0x140308b20]
jmp 0x14020f818
movsd xmm0, qword [0x140308b28]
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
jae 0x14020f831
addsd xmm0, qword [0x1402eea68]
call fcn.1401adce4
jmp 0x14020f83e
addsd xmm0, qword [0x1402ee600]
call fcn.1401ae0e0
ucomisd xmm6, xmm0
jae 0x14020f85a
xor eax, eax
ucomisd xmm0, qword [0x1402eea78]
mov r8d, 0x7fffffff
cmovb r8d, eax
jmp 0x14020f867
maxsd xmm0, qword [0x1402eea78]
cvttsd2si r8d, xmm0
mov rcx, r14
mov edx, edi
call fcn.140225e50
jmp 0x14020f4d0
dec qword [rcx + 0x108]
call fcn.140131b40
jmp 0x14020f470
mov r15, qword [0x140352ad8]
lea r14, [r15 + 0xc8]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x14020f8de
sub r15, 0xffffffffffffff80
mov rcx, qword [rsp + 0x30]
mov edx, dword [rsp + 0x2c]
mov r8, r15
call fcn.1402081c0
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x14020f70b
mov r14, qword [0x14035aab0]
jmp 0x14020f2b9
mov rcx, r14
call fcn.140047ff0
jmp 0x14020f677
mov rcx, r14
call fcn.140047ff0
jmp 0x14020f8a2