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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
sub esp, 0x2c
push ebx
push esi
xor ebx, ebx
mov esi, ecx
mov dword [esi + 0x28], ebx
push edi
mov dword [eax], ebx
cmp dword [ebp + 0xc], ebx
jbe 0x459ab2
mov edi, 0x3e8
jmp 0x459907
xor ebx, ebx
cmp dword [esi + 0x64], 0x2710
jbe 0x459924
cmp dword [esi + 0x5c], ebx
je 0x459924
mov ecx, esi
call fcn.00459033
imul eax, eax, 0xf
mov dword [ebp - 4], eax
jmp 0x45992e
mov dword [ebp - 4], 0x5dc
mov eax, dword [ebp - 4]
cmp eax, ebx
jne 0x459939
mov dword [ebp - 4], 1
cmp byte [esi + 0x98], 0
je 0x45994e
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
jmp 0x45995a
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], ebx
lea ebx, [esi + 0xc]
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0xc]
mov dword [esi + 0x28], eax
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
sub ecx, eax
cmp ecx, dword [ebp - 4]
jb 0x45997d
mov ecx, dword [ebp - 4]
lea edx, [ebp - 0xc]
push edx
push ecx
mov ecx, dword [ebp + 8]
add eax, ecx
push eax
push dword [esi + 4]
call fcn.00459342
add esp, 0x10
test eax, eax
jne 0x4599ac
mov eax, dword [esi]
push 0
push ebx
push dword [esi + 0x2c]
mov ecx, esi
call dword [eax + 8]
test al, al
je 0x459abb
cmp byte [esi + 0x98], 0
je 0x4599c7
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
jmp 0x4599d5
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], edx
mov ecx, dword [ebp - 0xc]
test ecx, ecx
je 0x459ab2
mov ebx, dword [ebp + 0x10]
add dword [ebx], ecx
add dword [esi + 0x54], ecx
add dword [esi + 0x5c], ecx
add dword [esi + 0x68], ecx
sub eax, dword [ebp - 0x24]
sbb edx, dword [ebp - 0x20]
mov ebx, eax
or eax, edx
mov dword [ebp - 0x28], edx
jne 0x459a03
and dword [ebp - 0x28], eax
push 5
pop ebx
push 0
push edi
push dword [ebp - 0x28]
push ebx
call fcn.004675d0
mov ecx, dword [esi + 0x94]
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x10], ecx
mov edx, dword [esi + 0x90]
mov dword [ebp - 0x14], eax
jl 0x459a51
jg 0x459a2c
cmp eax, edx
jb 0x459a51
push ecx
push edx
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call fcn.0046c5f0
add dword [esi + 0x64], eax
add dword [esi + 0x70], eax
push 0
push edi
push ebx
push ecx
mov dword [ebp - 4], edx
call fcn.00467610
mov ebx, eax
mov dword [ebp - 0x28], edx
push 0
push 0xf4240
push dword [ebp - 0x28]
push ebx
call fcn.004675d0
push dword [esi + 0x94]
push dword [esi + 0x90]
push edx
push eax
call fcn.00467610
add dword [esi + 0x60], eax
mov ecx, dword [esi + 0x60]
add dword [esi + 0x6c], eax
mov ebx, dword [esi + 0x6c]
cmp ecx, edi
jbe 0x459a92
mov eax, ecx
xor edx, edx
mov ecx, edi
div ecx
add dword [esi + 0x64], eax
mov dword [esi + 0x60], edx
cmp ebx, edi
jbe 0x459aa4
xor edx, edx
mov eax, ebx
mov ecx, edi
div ecx
add dword [esi + 0x70], eax
mov dword [esi + 0x6c], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
cmp dword [ecx], eax
jb 0x459905
mov al, 1
pop edi
pop esi
pop ebx
leave
ret 0xc
xor al, al
jmp 0x459ab4