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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x30
mov eax, dword [0x7a9040]
xor eax, ebp
mov dword [esp + 0x28], eax
mov eax, dword [0x7b252c]
mov ecx, dword [0x7ad2c4]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x5cfbb7
movzx ebx, byte [ebp + 8]
mov edi, dword [0x7b2528]
push edi
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x5cfc02
movzx esi, bl
dec esi
or esi, 1
add esi, dword [0x7b24dc]
mov dword [0x7b24dc], esi
mov ebx, 1
test byte [0x7b24d8], 1
je 0x5cfbad
test esi, esi
cmove ebx, esi
mov eax, dword [0x7b24e0]
cmp ebx, eax
je 0x5cfb7a
test eax, eax
je 0x5cfaf5
mov dword [esp + 0x10], edi
mov ecx, dword [0x7ab7ec]
cmp ecx, 0x5d0040
mov dword [esp + 0x14], ebx
je 0x5cfa1d
call dword [0x7a29f4]
lea edi, [esp + 0x20]
push edi
call ecx
add esp, 4
mov eax, dword [edi]
mov edx, dword [edi + 4]
jmp 0x5cfa71
xor eax, eax
lea edi, [esp + 0x20]
mov dword [edi + 4], eax
mov dword [edi], eax
push edi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [edi]
mov edi, dword [edi + 4]
cmp eax, 0x7bd05af7
mov ecx, edi
sbb ecx, 0x863
jge 0x5cfcde
mov ecx, 0xf4240
mul ecx
imul ecx, edi, 0xf4240
add ecx, edx
push dword [0x7b2544]
push dword [0x7b2540]
push ecx
push eax
call fcn.00678090
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
sub eax, dword [0x7b2530]
sbb edx, dword [0x7b2534]
seto bl
mov ecx, edx
sar ecx, 0x1f
test bl, bl
cmovne eax, ecx
add ecx, 0x80000000
test bl, bl
cmove ecx, edx
mov edx, eax
add edx, 1
mov edi, ecx
adc edi, 0x80000000
cmp edx, 2
sbb edi, 0
mov edx, dword [0x7b24ec]
mov edi, dword [0x7b24e8]
jb 0x5cfc0e
add edi, eax
adc edx, ecx
seto bl
mov eax, edx
sar eax, 0x1f
lea ecx, [eax - 0x80000000]
test bl, bl
cmove eax, edi
test bl, bl
cmove ecx, edx
mov dword [0x7b24e8], eax
mov dword [0x7b24ec], ecx
push dword [0x7b24e0]
call dword [sym.imp.WINMM.dll_timeEndPeriod]
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
mov dword [0x7b24e0], ebx
test esi, esi
je 0x5cfb7a
mov ecx, dword [0x7ab7ec]
cmp ecx, 0x5d0040
jne 0x5cfb96
mov ebx, edi
xor eax, eax
lea esi, [esp + 0x20]
mov dword [esi + 4], eax
mov dword [esi], eax
push esi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edi, dword [esi]
mov esi, dword [esi + 4]
cmp edi, 0x7bd05af7
mov eax, esi
sbb eax, 0x863
jge 0x5cfc51
mov ecx, 0xf4240
mov eax, edi
mul ecx
imul ecx, esi, 0xf4240
add ecx, edx
push dword [0x7b2544]
push dword [0x7b2540]
push ecx
push eax
call fcn.00678090
mov edi, ebx
mov dword [0x7b2530], eax
mov dword [0x7b2534], edx
push dword [0x7b24e0]
call dword [sym.imp.WINMM.dll_timeBeginPeriod]
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov ecx, dword [esp + 0x28]
xor ecx, ebp
call fcn.00650d60
mov al, 1
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
call dword [0x7a29f4]
lea esi, [esp + 0x20]
push esi
call ecx
add esp, 4
mov eax, dword [esi]
mov edx, dword [esi + 4]
jmp 0x5cfb63
mov ebx, 8
jmp 0x5cf9d6
push 0x7b252c
call fcn.00650831
add esp, 4
cmp dword [0x7b252c], 0xffffffff
jne 0x5cf998
push 4
call fcn.006507be
add esp, 4
mov esi, eax
mov dword [eax], 0
mov ecx, eax
call fcn.005d0780
mov dword [0x7b2528], esi
push 0x7b252c
call fcn.006508ab
add esp, 4
jmp 0x5cf998
mov ecx, edi
call fcn.005d0790
jmp 0x5cf9b1
mov dword [esp + 4], edi
xor ebx, ebx
inc ebx
add dword [esp + 4], ebx
mov ebx, edx
adc ebx, 0x80000000
mov dword [esp], ebx
mov dword [esp + 8], 0
xor ebx, ebx
inc ebx
cmp ebx, dword [esp + 4]
mov ebx, dword [esp + 8]
sbb ebx, dword [esp]
setb bl
xor edi, eax
xor edx, ecx
or edx, edi
sete dl
or dl, bl
jne 0x5cfad6
int3
mov eax, dword [0x7b2540]
mov dword [esp + 0x10], eax
mov ecx, dword [0x7b2544]
mov dword [esp + 0x14], ecx
push ecx
push eax
push esi
push edi
call fcn.00678090
mov dword [esp + 4], eax
mov dword [esp + 0xc], edx
mul dword [esp + 0x10]
mov dword [esp + 8], eax
mov ecx, dword [esp + 4]
imul ecx, dword [esp + 0x14]
add edx, ecx
mov eax, dword [esp + 0xc]
imul ecx, eax, 0xf4240
mov dword [esp], ecx
imul eax, dword [esp + 0x10]
add eax, edx
sub edi, dword [esp + 8]
sbb esi, eax
mov ecx, 0xf4240
mov eax, dword [esp + 4]
mul ecx
mov dword [esp + 4], eax
add edx, dword [esp]
mov dword [esp], edx
mov eax, edi
mul ecx
imul ecx, esi, 0xf4240
add edx, ecx
push dword [esp + 0x14]
push dword [esp + 0x14]
push edx
push eax
call fcn.00678090
add eax, dword [esp + 4]
adc edx, dword [esp]
jmp 0x5cfb61
mov ecx, dword [0x7b2540]
mov dword [esp + 4], ecx
mov edx, dword [0x7b2544]
mov dword [esp + 8], edx
push edx
push ecx
push edi
push eax
mov dword [esp + 0x1c], eax
call fcn.00678090
mov dword [esp], eax
mov ecx, edx
mov eax, dword [esp]
mul dword [esp + 4]
mov dword [esp + 0x18], eax
mov eax, edi
mov edi, dword [esp]
imul edi, dword [esp + 8]
add edx, edi
imul edi, ecx, 0xf4240
mov dword [esp + 0x1c], edi
imul ecx, dword [esp + 4]
add ecx, edx
mov edi, dword [esp + 0xc]
sub edi, dword [esp + 0x18]
sbb eax, ecx
mov ecx, eax
mov edx, 0xf4240
mov eax, dword [esp]
mul edx
mov dword [esp], eax
add edx, dword [esp + 0x1c]
mov dword [esp + 0xc], edx
mov eax, edi
mov edx, 0xf4240
mul edx
imul ecx, ecx, 0xf4240
add edx, ecx
push dword [esp + 8]
push dword [esp + 8]
push edx
push eax
call fcn.00678090
add eax, dword [esp]
adc edx, dword [esp + 0xc]
jmp 0x5cfa69