Function at 0x164c982f0
Capabilities:
Check for time delay via queryperformancecounter
Resume thread
Suspend thread

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], rbx
mov qword [rax + 0x18], r8
mov dword [rax + 0x10], edx
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
movaps xmmword [rax - 0x48], xmm6
movaps xmmword [rax - 0x58], xmm7
mov rax, qword [0x164cf5010]
xor rax, rsp
mov qword [rbp - 9], rax
mov rsi, qword [rbp + 0x67]
xor r14d, r14d
mov r12d, dword [rbp + 0x6f]
test rsi, rsi
je 0x164c98616
test r12d, r12d
je 0x164c98616
lea rcx, [rbp - 0x19]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x164c98616
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rcx, rax
lea edx, [r14 + 1]
call qword [sym.imp.KERNEL32.dll_SetThreadAffinityMask]
mov r13, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [rbp - 0x49], eax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rcx, rax
lea edx, [r14 + 0xf]
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
lea rcx, [rbp - 0x31]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea rax, [rbp - 0x29]
mov rcx, rsi
lea r9, [rbp - 0x21]
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x41]
lea rdx, [rbp - 0x11]
call qword [sym.imp.KERNEL32.dll_GetThreadTimes]
lea rcx, [rbp - 0x39]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rbp - 0x39]
lea r9, [rbp - 0x21]
sub rax, qword [rbp - 0x31]
lea r8, [rbp - 0x41]
imul rax, rax, 0x989680
xor edx, edx
mov qword [rbp - 0x41], r14
div qword [rbp - 0x19]
lea rdx, [rbp - 0x11]
mov rcx, rsi
mov r15, rax
lea rax, [rbp - 0x29]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_GetThreadTimes]
cmp qword [rbp - 0x41], r14
jne 0x164c985eb
mov rbx, qword [rbp + 0x77]
movsd xmm6, qword [0x164ce2ae0]
movsd xmm7, qword [0x164ce2af0]
test rbx, rbx
je 0x164c98431
mov eax, dword [rbx]
test eax, eax
jne 0x164c985eb
mov rdi, qword [rbp - 0x21]
lea rcx, [rbp - 0x31]
add rdi, qword [rbp - 0x29]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov ecx, 0x3c
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [rbp - 0x39]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea rax, [rbp - 0x29]
mov rcx, rsi
lea r9, [rbp - 0x21]
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x41]
lea rdx, [rbp - 0x11]
call qword [sym.imp.KERNEL32.dll_GetThreadTimes]
cmp qword [rbp - 0x41], 0
jne 0x164c98616
test rbx, rbx
je 0x164c98490
mov eax, dword [rbx]
test eax, eax
jne 0x164c98616
mov rax, qword [rbp - 0x39]
xor edx, edx
sub rax, qword [rbp - 0x31]
xorps xmm2, xmm2
mov r8, qword [rbp - 0x21]
imul rax, rax, 0x989680
sub r8, rdi
div qword [rbp - 0x19]
add r8, qword [rbp - 0x29]
mov rcx, rax
test rax, rax
js 0x164c984c2
cvtsi2sd xmm2, rax
jmp 0x164c984d4
shr rax, 1
and ecx, 1
or rax, rcx
cvtsi2sd xmm2, rax
addsd xmm2, xmm2
mov rcx, r8
xorps xmm0, xmm0
sub rcx, r15
cmp r8, r15
cmovbe rcx, r8
test rcx, rcx
js 0x164c984f0
cvtsi2sd xmm0, rcx
jmp 0x164c98505
mov rax, rcx
and ecx, 1
shr rax, 1
or rax, rcx
cvtsi2sd xmm0, rax
addsd xmm0, xmm0
divsd xmm0, xmm2
movaps xmm1, xmm6
minsd xmm1, xmm0
xorps xmm0, xmm0
cvtsi2sd xmm0, r12
mulsd xmm1, xmm7
divsd xmm1, xmm0
comisd xmm1, xmm6
jbe 0x164c98535
subsd xmm1, xmm6
mulsd xmm1, xmm2
cvttsd2si rax, xmm1
jmp 0x164c98537
xor eax, eax
xor ecx, ecx
add eax, r14d
cmovns ecx, eax
mov eax, 0xd1b71759
mul ecx
mov eax, 0xcccccccd
mov ecx, edx
shr ecx, 0xd
mul ecx
shr edx, 3
lea eax, [rdx + rdx*4]
add eax, eax
cmp ecx, eax
lea edi, [rax + 0xa]
cmove edi, ecx
test edi, edi
je 0x164c985b7
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SuspendThread]
lea rcx, [rbp - 0x31]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [rbp - 0x39]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rax, qword [rbp - 0x39]
xor edx, edx
sub rax, qword [rbp - 0x31]
imul rax, rax, 0x989680
div qword [rbp - 0x19]
imul edx, edi, 0x2710
mov r14, rax
sub r14, rdx
jmp 0x164c985ba
xor r14d, r14d
lea rax, [rbp - 0x29]
mov qword [rbp - 0x41], 0
lea r9, [rbp - 0x21]
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x41]
mov rcx, rsi
lea rdx, [rbp - 0x11]
call qword [sym.imp.KERNEL32.dll_GetThreadTimes]
cmp qword [rbp - 0x41], 0
je 0x164c98422
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rcx, rax
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_SetThreadAffinityMask]
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov edx, dword [rbp - 0x49]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov eax, 1
jmp 0x164c98618
xor eax, eax
mov rcx, qword [rbp - 9]
xor rcx, rsp
call fcn.164cd6f70
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x58]
movaps xmm6, xmmword [r11 - 0x10]
movaps xmm7, xmmword [r11 - 0x20]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret