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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push esi
mov esi, ecx
mov eax, dword [esi]
mov edx, dword [eax + 4]
push 0
push 1
call edx
test eax, eax
je 0x408ab9
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esi + 0x2468]
mov dword [esi + 0x26ac], eax
cmp ecx, 0xa
jb 0x408718
mov ecx, 0xa
mov dword [esi + 0x26d8], eax
mov dword [ebp - 8], eax
lea eax, [esi + 0x62ad0]
push eax
mov dword [esi + 0x2468], ecx
call fcn.004122f2
add esp, 4
push 0
mov ecx, esi
call fcn.00406e00
test eax, eax
je 0x408ab9
push ebx
push edi
lea esp, [esp]
cmp dword [esi + 0x5d118], 7
je 0x40877a
cmp dword [esi + 0x26a8], 0
je 0x40877a
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esi + 0x26ac]
cmp eax, dword [esi + 0x26a8]
ja 0x408aff
xor eax, eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
push 0xb
lea eax, [ebp - 0x58]
push eax
mov ecx, esi
mov dword [ebp - 0x58], 0
call fcn.00402520
cmp eax, 1
jbe 0x408abe
push 0x1f4
push 0
lea ecx, [ebp - 0x58]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov edi, eax
mov dword [ebp - 0x14], edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, eax
sub eax, dword [ebp - 8]
mov dword [ebp - 0x10], ebx
cmp eax, 0x1f4
jb 0x408906
mov edx, dword [esi + 0x26cc]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x1c]
lea edi, [esi + 0x26b4]
push eax
mov ecx, edi
mov dword [ebp - 0x1c], edx
call fcn.00405db0
mov ecx, dword [edi + 0x10]
sub ecx, dword [edi + 0xc]
sar ecx, 3
cmp ecx, 6
jbe 0x40883b
mov eax, dword [edi + 0xc]
mov dword [ebp - 8], eax
cmp eax, dword [edi + 0x10]
jbe 0x40882c
call fcn.004127f9
mov eax, dword [ebp - 8]
mov ecx, dword [edi]
push eax
push ecx
lea edx, [ebp - 0x2c]
push edx
mov ecx, edi
call fcn.00403e90
mov eax, dword [edi + 0x10]
sub eax, dword [edi + 0xc]
and eax, 0xfffffff8
cmp eax, 0x30
jne 0x4088f6
mov ecx, dword [edi + 0x10]
sub ecx, dword [edi + 0xc]
xor eax, eax
sar ecx, 3
xor ebx, ebx
mov dword [ebp - 4], eax
mov dword [ebp - 8], eax
test ecx, ecx
jbe 0x4088aa
mov edx, dword [edi + 0x10]
sub edx, dword [edi + 0xc]
sar edx, 3
cmp ebx, edx
jb 0x408876
call fcn.004127f9
mov eax, dword [edi + 0xc]
mov edx, dword [edi + 0x10]
mov ecx, dword [eax + ebx*8 + 4]
add dword [ebp - 4], ecx
sub edx, eax
sar edx, 3
cmp ebx, edx
jb 0x408891
call fcn.004127f9
mov ecx, dword [edi + 0xc]
mov eax, dword [ebp - 8]
mov edx, dword [edi + 0x10]
add eax, dword [ecx + ebx*8]
sub edx, ecx
inc ebx
sar edx, 3
mov dword [ebp - 8], eax
cmp ebx, edx
jb 0x408864
mov dword [ebp - 8], eax
fild dword [ebp - 8]
test eax, eax
jge 0x4088ba
fadd qword [0x422840]
mov eax, dword [ebp - 4]
fild dword [ebp - 4]
test eax, eax
jge 0x4088ca
fadd qword [0x422840]
fdivp st(1)
mov ebx, dword [ebp - 0x10]
fmul qword [0x422838]
fnstcw word [ebp - 2]
movzx eax, word [ebp - 2]
or eax, 0xc00
mov dword [ebp - 8], eax
fldcw word [ebp - 8]
fistp qword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0x26b0], ecx
fldcw word [ebp - 2]
mov edi, dword [ebp - 0x14]
mov dword [ebp - 8], ebx
mov dword [esi + 0x26cc], 0
lea edx, [ebp - 0x24]
push edx
call fcn.004122f2
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
mov edx, dword [esi + 0x26b0]
add esp, 4
sub eax, dword [esi + 0x62ad0]
sbb ecx, dword [esi + 0x62ad4]
mov dword [esi + 0x62ad8], eax
mov dword [esi + 0x62adc], ecx
test edx, edx
je 0x40896d
mov eax, dword [esi + 0x5d120]
mov ecx, dword [esi + 0x5d124]
mov ebx, eax
and ebx, ecx
cmp ebx, 0xffffffff
je 0x40896d
sub eax, dword [esi + 0x5d130]
push 0
sbb ecx, dword [esi + 0x5d134]
push edx
push ecx
push eax
call fcn.00413650
mov dword [esi + 0x62ae4], edx
jmp 0x408975
xor eax, eax
mov dword [esi + 0x62ae4], eax
mov dword [esi + 0x62ae0], eax
cmp edi, 0xffffffff
je case.default.0x408a32
cmp edi, 0x102
jne 0x4089d5
cmp dword [esi + 0x246c], 6
jne 0x408750
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, eax
sub edx, dword [esi + 0x26a4]
cmp edx, 0x3e8
jbe 0x408750
mov dword [esi + 0x26a4], eax
mov eax, dword [esi]
mov edx, dword [eax + 4]
push 0
push 6
mov ecx, esi
call edx
test eax, eax
jne 0x408750
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x408af6
mov eax, dword [esi + 0x26f4]
sub eax, dword [esi + 0x26f0]
dec edi
sar eax, 2
cmp edi, eax
jb 0x4089f6
call fcn.004127f9
mov ecx, dword [esi + 0x26f0]
mov ebx, dword [ecx + edi*4]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0x26d0], eax
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x408a2a
push eax
call dword [sym.imp.KERNEL32.dll_CancelWaitableTimer]
mov edx, dword [ebx + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 0x10], 0
mov ebx, dword [ebx + 0x28]
cmp ebx, 0xa
ja case.default.0x408a32
jmp dword [ebx*4 + 0x408b10]
push edi
mov ecx, esi
call fcn.00404650
jmp 0x408aa5
push edi
mov ecx, esi
call fcn.004077f0
jmp 0x408aa5
push edi
mov ecx, esi
call fcn.004046f0
jmp 0x408aa5
push edi
mov ecx, esi
call fcn.004078d0
jmp 0x408aa5
push edi
mov ecx, esi
call fcn.00404820
jmp 0x408aa5
push edi
mov ecx, esi
call fcn.00408230
jmp 0x408aa5
push edi
mov ecx, esi
call fcn.004048d0
jmp 0x408aa5
push edi
mov ecx, esi
call fcn.00408320
jmp 0x408aa5
push edi
mov ecx, esi
call fcn.00404a00
jmp 0x408aa5
push edi
mov ecx, esi
call fcn.00408530
jmp 0x408aa5
push edi
mov ecx, esi
call fcn.00407180
test eax, eax
jne 0x408750
mov dword [esi + 0x5d118], 8
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x2714], 0
je 0x408ab7
mov eax, dword [esi + 0x5d134]
cmp eax, dword [esi + 0x5d124]
ja 0x408ab7
jb case.default.0x408a32
mov ecx, dword [esi + 0x5d130]
cmp ecx, dword [esi + 0x5d120]
jae 0x408ab7
pop edi
pop ebx
mov dword [esi + 0x5d118], 8
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x5d118], 7
je 0x408ab7
pop edi
pop ebx
mov dword [esi + 0x5d118], 9
pop esi
mov esp, ebp
pop ebp
ret