Function at 0x4598d1
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 0x459aa3
mov edi, 0x3e8
jmp 0x4598f8
xor ebx, ebx
cmp dword [esi + 0x64], 0x2710
jbe 0x459915
cmp dword [esi + 0x5c], ebx
je 0x459915
mov ecx, esi
call fcn.00459024
imul eax, eax, 0xf
mov dword [ebp - 4], eax
jmp 0x45991f
mov dword [ebp - 4], 0x5dc
mov eax, dword [ebp - 4]
cmp eax, ebx
jne 0x45992a
mov dword [ebp - 4], 1
cmp byte [esi + 0x98], 0
je 0x45993f
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
jmp 0x45994b
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 0x45996e
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.00459333
add esp, 0x10
test eax, eax
jne 0x45999d
mov eax, dword [esi]
push 0
push ebx
push dword [esi + 0x2c]
mov ecx, esi
call dword [eax + 8]
test al, al
je 0x459aac
cmp byte [esi + 0x98], 0
je 0x4599b8
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
jmp 0x4599c6
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 0x459aa3
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 0x4599f4
and dword [ebp - 0x28], eax
push 5
pop ebx
push 0
push edi
push dword [ebp - 0x28]
push ebx
call fcn.004675c0
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 0x459a42
jg 0x459a1d
cmp eax, edx
jb 0x459a42
push ecx
push edx
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call fcn.0046c5e0
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.00467600
mov ebx, eax
mov dword [ebp - 0x28], edx
push 0
push 0xf4240
push dword [ebp - 0x28]
push ebx
call fcn.004675c0
push dword [esi + 0x94]
push dword [esi + 0x90]
push edx
push eax
call fcn.00467600
add dword [esi + 0x60], eax
mov ecx, dword [esi + 0x60]
add dword [esi + 0x6c], eax
mov ebx, dword [esi + 0x6c]
cmp ecx, edi
jbe 0x459a83
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 0x459a95
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 0x4598f6
mov al, 1
pop edi
pop esi
pop ebx
leave
ret 0xc
xor al, al
jmp 0x459aa5