Function at 0x40ea8c
Capabilities:
Check for time delay via gettickcount
Check for time delay via queryperformancecounter

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, ecx
xor eax, eax
push edi
cmp dword [ebp + 0xc], eax
mov dword [esi + 0x28], eax
mov dword [ebx], eax
jbe 0x40eca8
mov edi, 0x3e8
jmp 0x40eab4
mov ebx, dword [ebp + 0x10]
cmp dword [esi + 0xe4], 0x2710
jbe 0x40ead8
cmp dword [esi + 0xdc], 0
je 0x40ead8
mov ecx, esi
call fcn.0040ecb5
imul eax, eax, 0xf
mov dword [ebp - 4], eax
jmp 0x40eae2
mov dword [ebp - 4], 0x5dc
mov eax, dword [ebp - 4]
test eax, eax
jne 0x40eaed
mov dword [ebp - 4], 1
cmp byte [esi + 0x118], 0
je 0x40eb02
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
jmp 0x40eb0f
call dword [sym.imp.KERNEL32.dll_GetTickCount]
and dword [ebp - 0x24], 0
mov dword [ebp - 0x28], eax
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 8]
mov dword [esi + 0x28], eax
mov eax, dword [ebx]
sub ecx, eax
cmp ecx, dword [ebp - 4]
jb 0x40eb2d
mov ecx, dword [ebp - 4]
lea edx, [ebp - 8]
push edx
push ecx
mov ecx, dword [ebp + 8]
add eax, ecx
push eax
push dword [esi + 4]
call fcn.0040d265
add esp, 0x10
test eax, eax
jne 0x40eb5b
mov eax, dword [esi]
push 0x15f90
mov ecx, esi
call dword [eax + 8]
test al, al
je 0x40ecb1
cmp byte [esi + 0x118], 0
je 0x40eb76
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
jmp 0x40eb84
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
mov ecx, dword [ebp - 8]
test ecx, ecx
je 0x40eca8
add dword [ebx], ecx
add dword [esi + 0xd4], ecx
add dword [esi + 0xdc], ecx
add dword [esi + 0xe8], ecx
sub eax, dword [ebp - 0x28]
sbb edx, dword [ebp - 0x24]
mov dword [ebp - 0x10], eax
or eax, edx
mov dword [ebp - 0xc], edx
jne 0x40ebbe
and dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 5
push 0
push edi
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call fcn.00410ca0
mov ebx, dword [esi + 0x114]
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 0x110]
cmp edx, ebx
mov dword [ebp - 0x14], edx
jl 0x40ec22
jg 0x40ebe9
cmp dword [ebp - 0x18], eax
jb 0x40ec22
push ebx
push eax
push edx
push dword [ebp - 0x18]
call fcn.00410f50
push ebx
add dword [esi + 0xe4], eax
push dword [esi + 0x110]
add dword [esi + 0xf0], eax
push dword [ebp - 0x14]
push dword [ebp - 0x18]
call fcn.00410e90
push 0
push edi
push edx
push eax
call fcn.00410f50
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
push 0
push 0xf4240
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call fcn.00410ca0
push ebx
push dword [esi + 0x110]
push edx
push eax
call fcn.00410f50
add dword [esi + 0xe0], eax
mov ecx, dword [esi + 0xe0]
add dword [esi + 0xec], eax
cmp ecx, edi
jbe 0x40ec74
mov eax, ecx
xor edx, edx
mov ebx, edi
div ebx
xor edx, edx
add dword [esi + 0xe4], eax
mov eax, ecx
mov ecx, edi
div ecx
mov dword [esi + 0xe0], edx
mov ecx, dword [esi + 0xec]
cmp ecx, edi
jbe 0x40ec9a
mov eax, ecx
xor edx, edx
mov ebx, edi
div ebx
xor edx, edx
add dword [esi + 0xf0], eax
mov eax, ecx
mov ecx, edi
div ecx
mov dword [esi + 0xec], edx
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
cmp dword [ecx], eax
jb 0x40eab1
mov al, 1
pop edi
pop esi
pop ebx
leave
ret 0xc
xor al, al
jmp 0x40ecaa