Function at 0x572690
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc8
mov dword [ebp - 0xbc], ecx
mov eax, dword [ebp - 0xbc]
add eax, 0x24
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebp + 8], 0
je 0x57278b
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x24]
and eax, 0xfffffffe
jne 0x5726cf
jmp 0x5729c1
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0xbc]
cmp dword [ecx + 4], 0
jne 0x5726ee
mov dword [ebp - 0xc0], 0
jmp 0x572709
mov edx, dword [ebp - 0xbc]
mov eax, dword [ebp - 0xbc]
mov ecx, dword [edx + 8]
sub ecx, dword [eax + 4]
sar ecx, 3
mov dword [ebp - 0xc0], ecx
xor edx, edx
cmp dword [ebp - 0xc0], 0
sete dl
movzx eax, dl
test eax, eax
jne 0x572786
mov ecx, dword [ebp - 0xbc]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx]
mov eax, dword [ecx + 4]
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp + 0xc]
jbe 0x572746
jmp 0x572786
mov ecx, dword [ebp - 0xbc]
call fcn.00578950
mov edx, dword [ebp - 0xbc]
add edx, 0x24
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
call dword [eax + 4]
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0xbc]
add ecx, 0x24
push ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
jmp 0x5726d6
jmp 0x572849
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, 0x1e
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0xbc]
cmp dword [edx + 4], 0
jne 0x5727af
mov dword [ebp - 0xc4], 0
jmp 0x5727ca
mov eax, dword [ebp - 0xbc]
mov ecx, dword [ebp - 0xbc]
mov edx, dword [eax + 8]
sub edx, dword [ecx + 4]
sar edx, 3
mov dword [ebp - 0xc4], edx
xor eax, eax
cmp dword [ebp - 0xc4], 0
sete al
movzx ecx, al
test ecx, ecx
jne 0x572849
mov edx, dword [ebp - 0xbc]
mov eax, dword [edx + 4]
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 0x50]
mov dword [ebp - 0x4c], ecx
mov edx, dword [ebp - 0x4c]
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 0xbc]
call fcn.00578950
mov edx, dword [ebp - 0xbc]
add edx, 0x24
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x18]
call dword [eax + 4]
mov ecx, dword [ebp - 0xbc]
add ecx, 0x24
push ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebp - 0x1c], 0
jbe 0x572844
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x14]
js 0x572844
jmp 0x572849
jmp 0x572797
mov edx, dword [ebp - 0xbc]
add edx, 0x10
mov dword [ebp - 0x70], edx
mov eax, dword [ebp - 0x70]
cmp dword [eax + 4], 0
jne 0x57286a
mov dword [ebp - 0xc8], 0
jmp 0x57287f
mov ecx, dword [ebp - 0x70]
mov edx, dword [ebp - 0x70]
mov eax, dword [ecx + 8]
sub eax, dword [edx + 4]
sar eax, 3
mov dword [ebp - 0xc8], eax
xor ecx, ecx
cmp dword [ebp - 0xc8], 0
sete cl
movzx edx, cl
test edx, edx
je 0x57289e
mov dword [ebp - 8], 0xffffffff
jmp 0x572932
mov eax, dword [ebp - 0xbc]
mov ecx, dword [eax + 0x14]
mov dword [ebp - 0x78], ecx
mov edx, dword [ebp - 0x78]
mov dword [ebp - 0x74], edx
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x7c], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebp - 0x7c]
mov edx, dword [ecx]
sub edx, eax
mov dword [ebp - 8], edx
cmp dword [ebp - 8], 0
jle 0x5728ce
jmp 0x572932
mov eax, dword [ebp - 0xbc]
mov ecx, dword [eax + 0x14]
mov dword [ebp - 0x84], ecx
mov edx, dword [ebp - 0x84]
mov dword [ebp - 0x80], edx
mov eax, dword [ebp - 0x80]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0xbc]
add ecx, 0x10
call fcn.00578950
mov edx, dword [ebp - 0xbc]
add edx, 0x24
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x20]
call dword [eax + 4]
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0xbc]
add ecx, 0x24
push ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
jmp 0x572849
cmp dword [ebp + 8], 0
jne 0x57293d
jmp 0x5729c1
cmp dword [ebp - 4], 0
jne 0x5729bc
mov edx, dword [ebp - 0xbc]
mov eax, dword [ebp + 8]
mov dword [edx + 0x3c], eax
mov ecx, dword [ebp + 0xc]
add ecx, 1
mov edx, dword [ebp - 0xbc]
mov dword [edx + 0x40], ecx
mov eax, dword [ebp - 0xbc]
mov ecx, dword [eax + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov edx, dword [ebp - 0xbc]
add edx, 0x24
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0xbc]
mov edx, dword [ecx + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0xbc]
add eax, 0x24
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp - 0xbc]
mov dword [ecx + 0x3c], 0
mov edx, dword [ebp - 0xbc]
mov dword [edx + 0x40], 0
jmp 0x5726af
mov eax, dword [ebp - 0xbc]
add eax, 0x24
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esp, ebp
pop ebp
ret 8