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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
mov eax, dword [0x5c2460]
xor eax, esp
mov dword [esp + 0x50], eax
push ebx
push esi
mov esi, ecx
push edi
push 0
push 1
mov eax, dword [esi]
call dword [eax + 4]
test eax, eax
je 0x40db2c
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esi + 0x2468]
mov dword [esp + 0x10], eax
mov dword [esi + 0x26ac], eax
cmp ecx, 0xa
jl 0x40d76a
push 0xa
pop ecx
mov dword [esi + 0x26cc], eax
lea eax, [esi + 0x62cb8]
push eax
mov dword [esi + 0x2468], ecx
call fcn.00504a7f
pop ecx
push 0
mov ecx, esi
call fcn.0040d656
test eax, eax
je 0x40db2c
lea ebx, [esi + 0x26b4]
cmp dword [esi + 0x5d0f8], 7
je 0x40d7c4
cmp dword [esi + 0x26a8], 0
je 0x40d7c4
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esi + 0x26ac]
cmp eax, dword [esi + 0x26a8]
ja 0x40daef
and dword [esp + 0x30], 0
lea edi, [esp + 0x34]
push 0xa
xor eax, eax
pop ecx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x30]
xor ecx, ecx
test eax, eax
je 0x40d822
mov edx, dword [esi + 0x26dc]
sub edx, dword [esi + 0x26d8]
mov eax, dword [esi + 0x2464]
mov dword [esp + 0x30], eax
sar edx, 2
cmp edx, 0xb
jge 0x40d800
mov eax, edx
jmp 0x40d803
push 0xb
pop eax
cmp ecx, eax
jge 0x40d821
mov eax, dword [esi + 0x26d8]
mov edi, dword [eax + ecx*4]
mov eax, dword [edi + 0x10]
test eax, eax
jne 0x40d81a
mov eax, dword [edi + 0xc]
mov dword [esp + ecx*4 + 0x34], eax
inc ecx
jmp 0x40d7f7
inc ecx
cmp ecx, 1
jbe 0x40dafb
mov edi, 0x1f4
lea eax, [esp + 0x30]
push edi
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, eax
mov dword [esp + 0x24], eax
sub edx, dword [esp + 0x10]
cmp edx, edi
jb 0x40d94e
mov ecx, dword [esi + 0x26c0]
lea eax, [esp + 0x1c]
and dword [esp + 0x20], 0
mov dword [esp + 0x1c], ecx
mov ecx, ebx
push eax
mov dword [esp + 0x24], edx
call fcn.004106f3
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 3
cmp eax, 6
jbe 0x40d8ae
mov ecx, dword [ebx]
mov edi, dword [ebx + 4]
add ecx, 8
cmp ecx, edi
je 0x40d8aa
lea edx, [ecx - 8]
mov eax, dword [ecx]
mov dword [edx], eax
lea edx, [edx + 8]
mov eax, dword [ecx + 4]
add ecx, 8
mov dword [edx - 4], eax
cmp ecx, edi
jne 0x40d896
add dword [ebx + 4], 0xfffffff8
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
and eax, 0xfffffff8
cmp eax, 0x30
jne 0x40d93f
lea edx, [esi + 0x26b4]
xor edi, edi
mov eax, dword [edx + 4]
xor ebx, ebx
sub eax, dword [edx]
xor ecx, ecx
sar eax, 3
test eax, eax
je 0x40d8f4
mov eax, dword [esi + 0x26b8]
sub eax, dword [esi + 0x26b4]
mov edx, dword [edx]
sar eax, 3
add edi, dword [edx + ecx*8 + 4]
add ebx, dword [edx + ecx*8]
inc ecx
cmp ecx, eax
jb 0x40d8e8
mov dword [esp + 0x10], ebx
fild dword [esp + 0x10]
test ebx, ebx
jns 0x40d906
fadd qword [0x597408]
fstp qword [esp + 0x10]
fld qword [esp + 0x10]
mov dword [esp + 0x10], edi
fild dword [esp + 0x10]
test edi, edi
jns 0x40d920
fadd qword [0x597408]
fstp qword [esp + 0x10]
fdiv qword [esp + 0x10]
fmul qword [0x5973e0]
call fcn.0052a876
mov dword [esi + 0x26b0], eax
lea ebx, [esi + 0x26b4]
mov eax, dword [esp + 0x24]
and dword [esi + 0x26c0], 0
mov dword [esp + 0x10], eax
lea eax, [esp + 0x28]
push eax
call fcn.00504a7f
mov eax, dword [esp + 0x30]
lea edx, [esi + 0x62cb8]
mov edi, dword [esi + 0x26b0]
pop ecx
mov ecx, dword [esp + 0x28]
sub ecx, dword [edx]
mov dword [esi + 0x62cc0], ecx
sbb eax, dword [edx + 4]
mov dword [esi + 0x62cc4], eax
test edi, edi
je 0x40d9bb
mov ecx, dword [esi + 0x5d100]
mov eax, ecx
mov edx, dword [esi + 0x5d104]
and eax, edx
cmp eax, 0xffffffff
je 0x40d9bb
sub ecx, dword [esi + 0x5d110]
push 0
sbb edx, dword [esi + 0x5d114]
push edi
push edx
push ecx
call fcn.00510b20
mov dword [esi + 0x62cc8], eax
mov dword [esi + 0x62ccc], edx
jmp 0x40d9c9
and dword [esi + 0x62cc8], 0
and dword [esi + 0x62ccc], 0
mov eax, dword [esp + 0x18]
cmp eax, 0xffffffff
je 0x40db22
cmp eax, 0x102
jne 0x40da22
cmp dword [esi + 0x246c], 6
jne 0x40d79a
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
sub ecx, dword [esi + 0x26a4]
cmp ecx, 0x3e8
jbe 0x40d79a
mov dword [esi + 0x26a4], eax
mov ecx, esi
mov eax, dword [esi]
push 0
push 6
call dword [eax + 4]
test eax, eax
jne 0x40d79a
jmp 0x40db2c
test eax, eax
je 0x40dae6
lea edi, [eax - 1]
mov eax, dword [esi + 0x26d8]
mov ebx, dword [eax + edi*4]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0x26c4], eax
cmp dword [ebx + 0x10], 0
je 0x40da5e
push dword [ebx + 0x10]
call dword [sym.imp.KERNEL32.dll_CancelWaitableTimer]
push dword [ebx + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [ebx + 0x10], 0
mov eax, dword [ebx + 0x28]
cmp eax, 0xa
ja case.default.0x40da66
jmp dword [eax*4 + 0x40db3e]
push edi
mov ecx, esi
call fcn.0040db6a
jmp 0x40dadd
push edi
mov ecx, esi
call fcn.0040dbe5
jmp 0x40dadd
push edi
mov ecx, esi
call fcn.0040dc85
jmp 0x40dadd
push edi
mov ecx, esi
call fcn.0040dd8b
jmp 0x40dadd
push edi
mov ecx, esi
call fcn.0040e2f2
jmp 0x40dadd
push edi
mov ecx, esi
call fcn.0040e372
jmp 0x40dadd
push edi
mov ecx, esi
call fcn.0040e41c
jmp 0x40dadd
push edi
mov ecx, esi
call fcn.0040e522
jmp 0x40dadd
push edi
mov ecx, esi
call fcn.0040e6f0
jmp 0x40dadd
push edi
mov ecx, esi
call fcn.0040e7fe
jmp 0x40dadd
push edi
mov ecx, esi
call fcn.0040e972
jmp 0x40dadd
xor eax, eax
test eax, eax
je 0x40db22
jmp 0x40d794
cmp dword [esi + 0x5d0f8], 7
je 0x40db2c
mov dword [esi + 0x5d0f8], 9
jmp 0x40db2c
cmp dword [esi + 0x26f0], 0
je 0x40db2c
mov eax, dword [esi + 0x5d114]
cmp eax, dword [esi + 0x5d104]
ja 0x40db2c
jb 0x40db22
mov eax, dword [esi + 0x5d110]
cmp eax, dword [esi + 0x5d100]
jae 0x40db2c
mov dword [esi + 0x5d0f8], 8
mov ecx, dword [esp + 0x5c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00501d03
mov esp, ebp
pop ebp
ret