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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push ebx
xor ebx, ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x456c95
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax + 0x334]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0xc]
imul dword [edx + 0x354]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax + 0x338]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0xc]
imul dword [edx + 0x354]
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
lea edx, [eax + 0x350]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax + 0x384]
mov ecx, dword [ebp - 4]
call fcn.0045ca10
jmp 0x456c5e
mov eax, dword [ebp + 8]
lea ecx, [eax - 8]
mov eax, dword [ebp + 8]
lea edx, [eax - 4]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
add eax, 0x350
call fcn.0045caa4
test al, al
je 0x456c6a
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0xc]
mov edx, dword [edx + 0x358]
add edx, edx
mov ecx, edx
xor edx, edx
div ecx
mov edx, dword [ebp - 8]
cmp eax, dword [edx]
jbe 0x45676f
mov eax, dword [ebp - 8]
mov eax, dword [eax]
add eax, eax
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0xc]
imul dword [edx + 0x358]
mov edx, dword [ebp + 8]
mov dword [edx - 8], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0xc]
mov edx, dword [edx + 0x358]
add edx, edx
mov ecx, edx
xor edx, edx
div ecx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax + 0x2fc]
mov edx, dword [eax]
call dword [edx + 0xb4]
test al, al
je 0x456907
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x10]
jae 0x456907
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x10]
jbe 0x4567ca
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
jmp 0x4567d0
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
cmp dword [eax + 0x358], 1
jne 0x45684c
mov eax, dword [ebp - 0x1c]
dec eax
test eax, eax
jb 0x456907
inc eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], 0
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x28]
mov dword [ebp - 0x34], eax
xor eax, eax
mov dword [ebp - 0x30], eax
fild qword [ebp - 0x34]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x3c], eax
xor eax, eax
mov dword [ebp - 0x38], eax
fild qword [ebp - 0x3c]
fdivp st(1)
mov eax, dword [ebp - 0x28]
add eax, eax
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
lea eax, [edx + eax]
fild word [eax]
fmulp st(1)
call fcn.0040299c
mov edx, dword [ebp - 0x28]
add edx, edx
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 4]
lea edx, [ecx + edx]
mov word [edx], ax
inc dword [ebp - 0x28]
dec dword [ebp - 0x2c]
jne 0x4567f6
jmp 0x456907
mov eax, dword [ebp - 0x1c]
dec eax
test eax, eax
jb 0x456907
inc eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], 0
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x28]
mov dword [ebp - 0x34], eax
xor eax, eax
mov dword [ebp - 0x30], eax
fild qword [ebp - 0x34]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x3c], eax
xor eax, eax
mov dword [ebp - 0x38], eax
fild qword [ebp - 0x3c]
fdivp st(1)
mov eax, dword [ebp - 0x28]
shl eax, 2
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
lea eax, [edx + eax]
fild word [eax]
fmulp st(1)
call fcn.0040299c
mov edx, dword [ebp - 0x28]
shl edx, 2
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 4]
lea edx, [ecx + edx]
mov word [edx], ax
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x28]
mov dword [ebp - 0x34], eax
xor eax, eax
mov dword [ebp - 0x30], eax
fild qword [ebp - 0x34]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x3c], eax
xor eax, eax
mov dword [ebp - 0x38], eax
fild qword [ebp - 0x3c]
fdivp st(1)
mov eax, dword [ebp - 0x28]
shl eax, 2
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
lea eax, [edx + eax + 2]
fild word [eax]
fmulp st(1)
call fcn.0040299c
mov edx, dword [ebp - 0x28]
shl edx, 2
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 4]
lea edx, [ecx + edx + 2]
mov word [edx], ax
inc dword [ebp - 0x28]
dec dword [ebp - 0x2c]
jne 0x456863
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax + 0x304]
mov edx, dword [eax]
call dword [edx + 0xb4]
test al, al
je 0x456a93
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x24]
sub edx, dword [ebp - 0x14]
cmp eax, edx
jbe 0x456a93
mov eax, dword [ebp - 0x24]
sub eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x20]
jbe 0x456950
mov eax, dword [ebp - 0x24]
sub eax, dword [ebp - 0x14]
sub eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
jmp 0x456955
xor eax, eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
cmp dword [eax + 0x358], 1
jne 0x4569d3
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
dec edx
sub edx, eax
jb 0x456a93
inc edx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x24]
sub eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x28]
mov dword [ebp - 0x34], eax
xor eax, eax
mov dword [ebp - 0x30], eax
fild qword [ebp - 0x34]
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x3c], eax
xor eax, eax
mov dword [ebp - 0x38], eax
fild qword [ebp - 0x3c]
fdivp st(1)
mov eax, dword [ebp - 0x28]
add eax, eax
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
lea eax, [edx + eax]
fild word [eax]
fmulp st(1)
call fcn.0040299c
mov edx, dword [ebp - 0x28]
add edx, edx
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 4]
lea edx, [ecx + edx]
mov word [edx], ax
inc dword [ebp - 0x28]
dec dword [ebp - 0x2c]
jne 0x45697a
jmp 0x456a93
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
dec edx
sub edx, eax
jb 0x456a93
inc edx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x24]
sub eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x28]
mov dword [ebp - 0x34], eax
xor eax, eax
mov dword [ebp - 0x30], eax
fild qword [ebp - 0x34]
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x3c], eax
xor eax, eax
mov dword [ebp - 0x38], eax
fild qword [ebp - 0x3c]
fdivp st(1)
mov eax, dword [ebp - 0x28]
shl eax, 2
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
lea eax, [edx + eax]
fild word [eax]
fmulp st(1)
call fcn.0040299c
mov edx, dword [ebp - 0x28]
shl edx, 2
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 4]
lea edx, [ecx + edx]
mov word [edx], ax
mov eax, dword [ebp - 0x24]
sub eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x28]
mov dword [ebp - 0x34], eax
xor eax, eax
mov dword [ebp - 0x30], eax
fild qword [ebp - 0x34]
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x3c], eax
xor eax, eax
mov dword [ebp - 0x38], eax
fild qword [ebp - 0x3c]
fdivp st(1)
mov eax, dword [ebp - 0x28]
shl eax, 2
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
lea eax, [edx + eax + 2]
fild word [eax]
fmulp st(1)
call fcn.0040299c
mov edx, dword [ebp - 0x28]
shl edx, 2
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 4]
lea edx, [ecx + edx + 2]
mov word [edx], ax
inc dword [ebp - 0x28]
dec dword [ebp - 0x2c]
jne 0x4569e9
mov eax, dword [ebp - 0x18]
add dword [ebp - 0x20], eax
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x18]
sub dword [eax], edx
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0x10]
push eax
call sub.winmm.dll_mmioWrite
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0x14]
mov edx, dword [ebp - 8]
sub eax, dword [edx]
sub eax, dword [ebp - 0xc]
mov dword [ebp - 0x34], eax
xor eax, eax
mov dword [ebp - 0x30], eax
fild qword [ebp - 0x34]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0x14]
mov dword [ebp - 0x3c], eax
xor eax, eax
mov dword [ebp - 0x38], eax
fild qword [ebp - 0x3c]
fdivp st(1)
fmul dword [0x456ca4]
call fcn.0040299c
mov edx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax + 0x2f0]
call fcn.0044f0ec
call sub.KERNEL32.DLL_GetTickCount
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0xc]
sub eax, dword [edx + 0x330]
xor edx, edx
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 0xc]
sub eax, dword [ecx + 0x340]
sbb edx, dword [ecx + 0x344]
cmp edx, 0
jne 0x456b3c
cmp eax, 0x3e8
jb 0x456c52
jmp 0x456b42
jl 0x456c52
call sub.KERNEL32.DLL_GetTickCount
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0xc]
sub eax, dword [edx + 0x330]
xor edx, edx
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 0xc]
mov dword [ecx + 0x340], eax
mov dword [ecx + 0x344], edx
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0x14]
xor edx, edx
push edx
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov edx, dword [eax + 0x344]
mov eax, dword [eax + 0x340]
call fcn.00405d10
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], edx
fild qword [ebp - 0x34]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0x14]
mov edx, dword [ebp - 8]
sub eax, dword [edx]
sub eax, dword [ebp - 0xc]
mov dword [ebp - 0x3c], eax
xor eax, eax
mov dword [ebp - 0x38], eax
fild qword [ebp - 0x3c]
fdivp st(1)
call fcn.0040299c
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 0xc]
mov dword [ecx + 0x348], eax
mov dword [ecx + 0x34c], edx
push 0x456cb0
push 0
push 0x3e8
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov edx, dword [eax + 0x344]
mov eax, dword [eax + 0x340]
call fcn.00405d56
lea edx, [ebp - 0x44]
call fcn.00455b00
push dword [ebp - 0x44]
push 0x456cc0
push 0
push 0x3e8
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov edx, dword [eax + 0x34c]
mov eax, dword [eax + 0x348]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 0xc]
sub eax, dword [ecx + 0x340]
sbb edx, dword [ecx + 0x344]
call fcn.00405d56
lea edx, [ebp - 0x48]
call fcn.00455b00
push dword [ebp - 0x48]
lea eax, [ebp - 0x40]
mov edx, 4
call fcn.00403e44
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax + 0x2ec]
call fcn.0042c1ec
mov eax, dword [0x464830]
mov eax, dword [eax]
call fcn.00449f30
mov eax, dword [ebp - 8]
cmp dword [eax], 0
ja 0x456711
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
add eax, 0x350
call fcn.0045cb00
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x456c9c
lea eax, [ebp - 0x48]
mov edx, 3
call fcn.00403b28
ret