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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push ebx
push esi
xor ebx, ebx
mov esi, ecx
mov eax, dword [esi]
push ebx
push 1
call dword [eax + 4]
test eax, eax
je 0x409364
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea ecx, [esi + 0x2468]
mov edx, dword [ecx]
mov dword [esi + 0x26ac], eax
cmp edx, 0xa
jb 0x409022
push 0xa
pop edx
mov dword [esi + 0x26d8], eax
mov dword [ebp - 8], eax
lea eax, [esi + 0x62cd8]
push eax
mov dword [ecx], edx
call fcn.00414d5a
pop ecx
push ebx
mov ecx, esi
call fcn.00408039
test eax, eax
je 0x409364
push edi
cmp dword [esi + 0x5d118], 7
je 0x409072
lea edi, [esi + 0x26a8]
cmp dword [edi], ebx
je 0x409072
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esi + 0x26ac]
cmp eax, dword [edi]
ja 0x409371
push 0xa
pop ecx
xor eax, eax
mov dword [ebp - 0x58], ebx
lea edi, [ebp - 0x54]
rep stosd dword es:[edi], eax
push 0xb
lea eax, [ebp - 0x58]
push eax
mov ecx, esi
call fcn.00403f9c
cmp eax, 1
jbe 0x409333
mov edi, 0x1f4
push edi
push ebx
lea ecx, [ebp - 0x58]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov dword [ebp - 0x10], ecx
sub ecx, dword [ebp - 8]
cmp ecx, edi
jb 0x40919f
xor eax, eax
lea edi, [ebp - 0x18]
stosd dword es:[edi], eax
mov eax, dword [esi + 0x26cc]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x18], ecx
lea edi, [esi + 0x26b4]
push eax
mov ecx, edi
call fcn.0040743a
mov eax, dword [edi + 0x10]
sub eax, dword [edi + 0xc]
sar eax, 3
cmp eax, 6
jbe 0x40910e
push edi
push dword [edi + 0xc]
lea ecx, [ebp - 0x24]
call fcn.004053dd
push dword [ebp - 0x20]
lea eax, [ebp - 0xc]
push dword [ebp - 0x24]
mov ecx, edi
push eax
call fcn.00405968
mov eax, dword [edi + 0x10]
sub eax, dword [edi + 0xc]
and eax, 0xfffffff8
cmp eax, 0x30
jne 0x409193
mov eax, dword [edi + 0x10]
sub eax, dword [edi + 0xc]
and dword [ebp - 8], 0
and dword [ebp - 4], 0
sar eax, 3
test eax, eax
jbe 0x40915e
push dword [ebp - 4]
mov ecx, edi
call fcn.00403732
push dword [ebp - 4]
add ebx, dword [eax + 4]
mov ecx, edi
call fcn.00403732
mov eax, dword [eax]
add dword [ebp - 8], eax
mov eax, dword [edi + 0x10]
sub eax, dword [edi + 0xc]
inc dword [ebp - 4]
sar eax, 3
cmp dword [ebp - 4], eax
jb 0x409131
mov eax, dword [ebp - 8]
fild dword [ebp - 8]
test eax, eax
jge 0x40916e
fadd qword [0x42f160]
mov dword [ebp - 8], ebx
fild dword [ebp - 8]
test ebx, ebx
jge 0x40917e
fadd qword [0x42f160]
fdivp st(1)
fmul qword [0x42f500]
call fcn.00418616
mov dword [esi + 0x26b0], eax
xor ebx, ebx
mov eax, dword [ebp - 0x10]
mov dword [ebp - 8], eax
mov dword [esi + 0x26cc], ebx
lea eax, [ebp - 0x2c]
push eax
call fcn.00414d5a
mov edx, dword [ebp - 0x28]
pop ecx
mov ecx, dword [ebp - 0x2c]
lea eax, [esi + 0x62cd8]
sub ecx, dword [eax]
sbb edx, dword [eax + 4]
mov dword [esi + 0x62ce0], ecx
mov dword [esi + 0x62ce4], edx
mov edx, dword [esi + 0x26b0]
cmp edx, ebx
je 0x409208
mov eax, dword [esi + 0x5d120]
mov ecx, dword [esi + 0x5d124]
mov edi, eax
and edi, ecx
cmp edi, 0xffffffff
je 0x409208
sub eax, dword [esi + 0x5d130]
push ebx
sbb ecx, dword [esi + 0x5d134]
push edx
push ecx
push eax
call fcn.00417d60
mov dword [esi + 0x62ce8], eax
mov dword [esi + 0x62cec], edx
jmp 0x409214
mov dword [esi + 0x62ce8], ebx
mov dword [esi + 0x62cec], ebx
mov eax, dword [ebp - 0x14]
cmp eax, 0xffffffff
je 0x409359
cmp eax, 0x102
jne 0x409269
cmp dword [esi + 0x246c], 6
jne 0x40904b
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea ecx, [esi + 0x26a4]
mov edx, eax
sub edx, dword [ecx]
cmp edx, 0x3e8
jbe 0x40904b
mov dword [ecx], eax
mov eax, dword [esi]
push ebx
push 6
mov ecx, esi
call dword [eax + 4]
test eax, eax
jne 0x40904b
jmp 0x409363
cmp eax, ebx
je 0x409368
lea ebx, [eax - 1]
push ebx
lea ecx, [esi + 0x26e4]
call fcn.0040375a
mov edi, dword [eax]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0x26d0], eax
mov eax, dword [edi + 0x10]
test eax, eax
je 0x4092a9
push eax
call dword [sym.imp.KERNEL32.dll_CancelWaitableTimer]
push dword [edi + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [edi + 0x10], 0
mov edi, dword [edi + 0x28]
cmp edi, 0xa
ja case.default.0x4092b1
jmp dword [edi*4 + 0x40937e]
push ebx
mov ecx, esi
call fcn.00406229
jmp 0x409328
push ebx
mov ecx, esi
call fcn.00408650
jmp 0x409328
push ebx
mov ecx, esi
call fcn.004062a7
jmp 0x409328
push ebx
mov ecx, esi
call fcn.004086f6
jmp 0x409328
push ebx
mov ecx, esi
call fcn.004063a6
jmp 0x409328
push ebx
mov ecx, esi
call fcn.00408be1
jmp 0x409328
push ebx
mov ecx, esi
call fcn.0040642c
jmp 0x409328
push ebx
mov ecx, esi
call fcn.00408c93
jmp 0x409328
push ebx
mov ecx, esi
call fcn.0040652b
jmp 0x409328
push ebx
mov ecx, esi
call fcn.00408e7a
jmp 0x409328
push ebx
mov ecx, esi
call fcn.00408101
jmp 0x409328
xor eax, eax
test eax, eax
je 0x409359
xor ebx, ebx
jmp 0x40904b
cmp dword [esi + 0x2714], ebx
je 0x409363
mov eax, dword [esi + 0x5d134]
cmp eax, dword [esi + 0x5d124]
ja 0x409363
jb 0x409359
mov eax, dword [esi + 0x5d130]
cmp eax, dword [esi + 0x5d120]
jae 0x409363
mov dword [esi + 0x5d118], 8
pop edi
pop esi
pop ebx
leave
ret
cmp dword [esi + 0x5d118], 7
je 0x409363
mov dword [esi + 0x5d118], 9
jmp 0x409363