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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x38
mov eax, dword [0x64a040]
xor eax, ebp
mov dword [esp + 0x30], eax
mov eax, dword [0x64f68c]
mov ecx, dword [0x64d82c]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x571046
movzx ebx, byte [ebp + 8]
mov esi, dword [0x64f688]
push esi
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x571087
movzx edi, bl
dec edi
or edi, 1
add edi, dword [0x64f63c]
mov dword [0x64f63c], edi
cmp byte [0x64f638], 0
je 0x57103c
mov ebx, 1
test edi, edi
cmove ebx, edi
mov eax, dword [0x64f640]
cmp ebx, eax
je 0x570fef
test eax, eax
mov dword [esp + 0x1c], esi
je 0x570f6a
mov ecx, dword [0x64c080]
cmp ecx, 0x56aca0
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], edi
jne 0x571022
xor eax, eax
lea esi, [esp + 0x28]
mov dword [esi + 4], eax
mov dword [esi], eax
push esi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [esi]
mov esi, dword [esi + 4]
cmp eax, 0x7bd05af7
mov ecx, esi
sbb ecx, 0x863
jge 0x571143
mov ecx, 0xf4240
mul ecx
imul ecx, esi, 0xf4240
add ecx, edx
push dword [0x64f6a4]
push dword [0x64f6a0]
push ecx
push eax
call fcn.005a13d0
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
sub eax, dword [0x64f690]
sbb edx, dword [0x64f694]
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 esi, ecx
adc esi, 0x80000000
cmp edx, 2
sbb esi, 0
mov edi, dword [0x64f64c]
mov esi, dword [0x64f648]
jb 0x571093
add esi, eax
adc edi, ecx
seto bl
mov eax, edi
sar eax, 0x1f
lea ecx, [eax - 0x80000000]
test bl, bl
cmove eax, esi
test bl, bl
cmove ecx, edi
mov dword [0x64f648], eax
mov dword [0x64f64c], ecx
push dword [0x64f640]
call dword [sym.imp.WINMM.dll_timeEndPeriod]
mov esi, dword [esp + 0x1c]
mov ebx, dword [esp + 0xc]
mov edi, dword [esp + 0x10]
mov dword [0x64f640], ebx
test edi, edi
je 0x570fef
mov ecx, dword [0x64c080]
cmp ecx, 0x56aca0
jne 0x57100b
xor eax, eax
lea edi, [esp + 0x28]
mov dword [edi + 4], eax
mov dword [edi], eax
push edi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov esi, dword [edi]
mov ebx, dword [edi + 4]
cmp esi, 0x7bd05af7
mov eax, ebx
sbb eax, 0x863
jge 0x5710c4
mov ecx, 0xf4240
mov eax, esi
mul ecx
imul ecx, ebx, 0xf4240
add ecx, edx
push dword [0x64f6a4]
push dword [0x64f6a0]
push ecx
push eax
call fcn.005a13d0
mov dword [0x64f690], eax
mov dword [0x64f694], edx
push dword [0x64f640]
call dword [sym.imp.WINMM.dll_timeBeginPeriod]
mov esi, dword [esp + 0x1c]
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov ecx, dword [esp + 0x30]
xor ecx, ebp
call fcn.005810d5
mov al, 1
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
call dword [0x6445dc]
lea esi, [esp + 0x28]
push esi
call ecx
add esp, 4
mov eax, dword [esi]
mov edx, dword [esi + 4]
jmp 0x570fd4
call dword [0x6445dc]
lea esi, [esp + 0x28]
push esi
call ecx
add esp, 4
mov eax, dword [esi]
mov edx, dword [esi + 4]
jmp 0x570ee2
mov ebx, 8
jmp 0x570e56
push 0x64f68c
call fcn.0057dc73
add esp, 4
cmp dword [0x64f68c], 0xffffffff
jne 0x570e18
push 4
call fcn.0057dc30
add esp, 4
mov dword [eax], 0
mov dword [0x64f688], eax
push 0x64f68c
call fcn.0057dcc2
add esp, 4
jmp 0x570e18
push esi
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
jmp 0x570e31
mov ebx, esi
add ebx, 1
mov edx, edi
adc edx, 0x80000000
mov dword [esp + 4], edx
xor esi, eax
xor edi, ecx
or edi, esi
je 0x570f47
xor edx, edx
xor esi, esi
inc esi
cmp esi, ebx
sbb edx, dword [esp + 4]
jb 0x570f47
int3
mov eax, dword [0x64f6a0]
mov dword [esp + 0xc], eax
mov ecx, dword [0x64f6a4]
mov dword [esp + 0x10], ecx
push ecx
push eax
push ebx
push esi
call fcn.005a13d0
mov edi, edx
mov ecx, eax
mul dword [esp + 0xc]
mov dword [esp + 4], eax
mov eax, ecx
imul ecx, dword [esp + 0x10]
add edx, ecx
imul ecx, edi, 0xf4240
mov dword [esp + 8], ecx
imul edi, dword [esp + 0xc]
add edi, edx
sub esi, dword [esp + 4]
sbb ebx, edi
mov ecx, 0xf4240
mul ecx
mov dword [esp + 4], eax
mov edi, edx
add edi, dword [esp + 8]
mov eax, esi
mul ecx
imul ecx, ebx, 0xf4240
add edx, ecx
push dword [esp + 0x10]
push dword [esp + 0x10]
push edx
push eax
call fcn.005a13d0
add eax, dword [esp + 4]
adc edx, edi
jmp 0x570fd4
mov ecx, dword [0x64f6a0]
mov dword [esp + 4], ecx
mov edx, dword [0x64f6a4]
mov dword [esp + 0x18], edx
push edx
push ecx
push esi
push eax
mov dword [esp + 0x24], eax
call fcn.005a13d0
mov dword [esp + 8], eax
mov ecx, edx
mov eax, dword [esp + 8]
mul dword [esp + 4]
mov dword [esp + 0x20], eax
mov eax, esi
mov esi, dword [esp + 8]
imul esi, dword [esp + 0x18]
add edx, esi
imul esi, ecx, 0xf4240
mov dword [esp + 0x24], esi
imul ecx, dword [esp + 4]
add ecx, edx
mov esi, dword [esp + 0x14]
sub esi, dword [esp + 0x20]
sbb eax, ecx
mov ecx, eax
mov edx, 0xf4240
mov eax, dword [esp + 8]
mul edx
mov dword [esp + 8], eax
add edx, dword [esp + 0x24]
mov dword [esp + 0x14], edx
mov eax, esi
mov edx, 0xf4240
mul edx
imul ecx, ecx, 0xf4240
add edx, ecx
push dword [esp + 0x18]
push dword [esp + 8]
push edx
push eax
call fcn.005a13d0
add eax, dword [esp + 8]
adc edx, dword [esp + 0x14]
jmp 0x570eda