Function at 0x466174
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 0x466789
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.00474020
jmp 0x466752
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.004740b4
test al, al
je 0x46675e
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 0x466263
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 0x4663fb
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x10]
jae 0x4663fb
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x10]
jbe 0x4662be
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
jmp 0x4662c4
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 0x466340
mov eax, dword [ebp - 0x1c]
dec eax
test eax, eax
jb 0x4663fb
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 0x4662ea
jmp 0x4663fb
mov eax, dword [ebp - 0x1c]
dec eax
test eax, eax
jb 0x4663fb
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 0x466357
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 0x466587
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x24]
sub edx, dword [ebp - 0x14]
cmp eax, edx
jbe 0x466587
mov eax, dword [ebp - 0x24]
sub eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x20]
jbe 0x466444
mov eax, dword [ebp - 0x24]
sub eax, dword [ebp - 0x14]
sub eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
jmp 0x466449
xor eax, eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
cmp dword [eax + 0x358], 1
jne 0x4664c7
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
dec edx
sub edx, eax
jb 0x466587
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 0x46646e
jmp 0x466587
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
dec edx
sub edx, eax
jb 0x466587
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 0x4664dd
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 [0x466798]
call fcn.0040299c
mov edx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax + 0x2f0]
call fcn.00456414
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 0x466630
cmp eax, 0x3e8
jb 0x466746
jmp 0x466636
jl 0x466746
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.00406154
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 0x4667a4
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.0040619a
lea edx, [ebp - 0x44]
call fcn.004655f4
push dword [ebp - 0x44]
push 0x4667b4
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.0040619a
lea edx, [ebp - 0x48]
call fcn.004655f4
push dword [ebp - 0x48]
lea eax, [ebp - 0x40]
mov edx, 4
call fcn.00403e84
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax + 0x2ec]
call fcn.0042f97c
mov eax, dword [0x47ba38]
mov eax, dword [eax]
call fcn.0044da6c
mov eax, dword [ebp - 8]
cmp dword [eax], 0
ja 0x466205
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
add eax, 0x350
call fcn.00474110
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x466790
lea eax, [ebp - 0x48]
mov edx, 3
call fcn.00403b68
ret