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

Disassembly:
sub esp, 0x3c
mov ecx, dword [0x45089c]
mov eax, dword [esp + 0x40]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
push esi
push edi
mov dword [ecx + 0x48], eax
call ebp
mov ecx, dword [0x4508dc]
mov edx, eax
sub edx, ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [0x4508dc], eax
fild qword [esp + 0xc]
fmul qword [0x447608]
fadd dword [0x4508e4]
fstp dword [0x4508e4]
fild dword [0x4508cc]
fcomp dword [0x4508e4]
fnstsw ax
test ah, 5
jp 0x4022c5
mov eax, dword [0x4508cc]
mov esi, 2
add eax, 0xfffffffe
cmp eax, esi
jle 0x4022a7
push esi
call fcn.00402070
mov ecx, dword [0x4508cc]
add esp, 4
inc esi
add ecx, 0xfffffffe
cmp esi, ecx
jl 0x402290
fild dword [0x4508cc]
mov dword [0x44a024], 0
fsubr dword [0x4508e4]
fstp dword [0x4508e4]
jmp 0x4022ce
mov eax, dword [0x44a024]
test eax, eax
jne 0x402319
fld dword [0x4508e4]
fcomp qword [0x447600]
fnstsw ax
and eax, 0x4100
jne 0x402319
push 0
mov dword [0x44a024], 1
call fcn.00402070
push 1
call fcn.00402070
mov edx, dword [0x4508cc]
add edx, 0xfffffffe
push edx
call fcn.00402070
mov eax, dword [0x4508cc]
dec eax
push eax
call fcn.00402070
add esp, 0x10
mov edx, dword [0x4508e4]
lea ecx, [esp + 0x14]
push ecx
push edx
push 0x4508c4
call fcn.0043958b
add esp, 0xc
mov eax, 0x4509ac
mov ecx, dword [eax - 4]
mov edx, dword [eax]
add eax, 0xfffffffc
mov ecx, dword [ecx + 0x60]
cmp eax, 0x450990
mov dword [edx + 0x60], ecx
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov edx, dword [edx + 0x64]
mov dword [ecx + 0x64], edx
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov ecx, dword [ecx + 0x68]
mov dword [edx + 0x68], ecx
jg 0x402337
fld dword [esp + 0x20]
fmul dword [0x4475f8]
mov eax, dword [0x450990]
push 0x437a0000
fadd dword [eax + 0x60]
fstp dword [eax + 0x60]
fld dword [esp + 0x28]
fmul dword [0x4475f8]
mov eax, dword [0x450990]
fadd dword [eax + 0x64]
fstp dword [eax + 0x64]
fld dword [esp + 0x28]
fmul dword [esp + 0x24]
mov eax, dword [0x450990]
fmul dword [0x4475f8]
fsubr dword [eax + 0x68]
fstp dword [eax + 0x68]
fld dword [esp + 0x18]
mov edx, dword [0x45089c]
fstp dword [edx + 0x30]
fld dword [esp + 0x1c]
mov eax, dword [0x45089c]
fstp dword [eax + 0x34]
fld dword [esp + 0x20]
mov ecx, dword [0x45089c]
fstp dword [ecx + 0x38]
fld dword [0x4508e4]
fmul qword [0x4475f0]
mov edx, dword [0x4508c0]
fsin
fmul qword [0x447548]
fstp dword [edx + 0x54]
fld dword [0x4508e4]
fmul qword [0x4475f0]
mov eax, dword [0x4508c0]
fcos
fmul qword [0x4475e8]
fadd qword [0x4475e0]
fstp dword [eax + 0x58]
fld dword [0x4508e4]
fmul qword [0x4475d8]
mov ecx, dword [0x4508c0]
push ecx
fcos
fmul qword [0x447548]
fstp dword [ecx + 0x5c]
mov eax, dword [0x4508c0]
fld dword [eax + 0x64]
fadd qword [0x4475d0]
fstp dword [eax + 0x64]
fld dword [0x44a07c]
fmul dword [0x4475c8]
mov eax, dword [0x4508c0]
fadd qword [0x4475c0]
mov edx, dword [eax + 0x5c]
mov ecx, dword [eax + 0x58]
fstp dword [esp]
push edx
mov edx, dword [eax + 0x54]
mov eax, dword [0x45098c]
push ecx
push edx
push 6
push eax
call fcn.00402fc0
mov eax, dword [0x4508c0]
add esp, 0x10
mov ecx, dword [0x45089c]
fld dword [eax + 0x5c]
fmul dword [0x4475b8]
fstp dword [esp + 8]
fld dword [eax + 0x58]
fmul dword [0x4475b8]
fadd qword [0x4475b0]
fstp dword [esp + 4]
fld dword [eax + 0x54]
fmul dword [0x4475b8]
fstp dword [esp]
push ecx
call fcn.00401010
mov edx, dword [0x45089c]
mov dword [edx + 0xc], 0x44bb8000
mov eax, dword [0x45089c]
push eax
call fcn.00405610
mov ecx, dword [0x45098c]
push ecx
call fcn.004056d0
mov edx, dword [0x4508a0]
push edx
call fcn.004057c0
call fcn.00406260
mov eax, dword [0x45089c]
push eax
call fcn.00405610
mov ecx, dword [0x45098c]
push ecx
call fcn.004056d0
mov edx, dword [0x4508c0]
mov dword [0x44a07c], 0x3f4ccccd
push edx
call fcn.004057c0
mov eax, dword [0x45acb8]
add esp, 0x28
test eax, eax
je 0x40261b
mov ecx, dword [0x45289c]
test ecx, ecx
je 0x40261b
push eax
call fcn.00419bc0
push eax
call fcn.00434040
add esp, 8
test eax, eax
je 0x40263a
cmp dword [0x45acb8], 2
jne 0x402554
add eax, 0x4b
lea edi, [eax + 0x17]
lea ebp, [eax + 0x15]
xor ecx, ecx
xor edx, edx
xor eax, eax
mov dl, byte [edi - 1]
mov al, byte [ebp]
mov esi, edx
xor edx, edx
mov dl, byte [edi]
cmp esi, eax
mov dword [esp + 0x4c], eax
jle 0x40257a
mov eax, esi
mov dword [esp + 0x4c], eax
cmp edx, eax
jle 0x402584
mov eax, edx
mov dword [esp + 0x4c], eax
cmp dword [0x45acb8], 2
jne 0x40259d
add eax, 0xffffff80
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [esp + 0x4c], eax
fild dword [esp + 0x4c]
mov eax, dword [ecx + 0x450990]
fmul qword [0x4475a8]
mov edx, dword [eax + 0x10]
fcom dword [edx + 0x58]
fnstsw ax
and eax, 0x4100
je 0x4025c7
fstp st(0)
fld dword [edx + 0x58]
fmul qword [0x4475a0]
fstp dword [edx + 0x58]
test ecx, ecx
je 0x402601
mov eax, dword [0x450990]
mov edx, dword [ecx + 0x450990]
mov eax, dword [eax + 0x60]
mov dword [edx + 0x60], eax
mov eax, dword [0x450990]
mov edx, dword [ecx + 0x450990]
mov eax, dword [eax + 0x64]
mov dword [edx + 0x64], eax
mov eax, dword [0x450990]
mov edx, dword [ecx + 0x450990]
mov eax, dword [eax + 0x68]
mov dword [edx + 0x68], eax
add ecx, 4
sub ebp, 3
sub edi, 3
cmp ecx, 0x20
jb 0x40255c
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
jmp 0x40263a
xor eax, eax
mov ecx, dword [eax + 0x450990]
add eax, 4
cmp eax, 0x20
mov ecx, dword [ecx + 0x10]
fld dword [ecx + 0x58]
fmul qword [0x4475a0]
fstp dword [ecx + 0x58]
jb 0x40261d
xor esi, esi
mov edx, dword [esi + 0x450990]
push edx
call fcn.004057c0
add esi, 4
add esp, 4
cmp esi, 0x20
jb 0x40263c
call fcn.00406260
mov eax, dword [0x44a020]
test eax, eax
je 0x402779
call ebp
mov edx, dword [0x450988]
mov ecx, eax
sub ecx, edx
mov eax, 0x3e0f83e1
mul ecx
mov eax, edx
xor edx, edx
shr eax, 3
div dword [0x44a078]
mov esi, edx
mov eax, esi
mov ecx, esi
cdq
and edx, 0x7f
and ecx, 0x7f
add eax, edx
mov edx, dword [0x4509b0]
sar eax, 7
cmp eax, edx
mov edi, dword [eax*4 + 0x44a028]
je 0x40272e
cmp esi, 0x80
mov dword [0x4509b0], eax
jge 0x4026ca
mov dword [0x4508a4], 0
call ebp
mov dword [0x450898], eax
push edi
call fcn.004027f0
cdq
mov esi, dword [sym.imp.MSVCRT.dll_rand]
sub eax, edx
mov edx, dword [0x45089c]
sar eax, 1
mov ebp, dword [edx + 0x24]
shr ebp, 1
sub ebp, eax
call esi
xor edx, edx
push edi
div ebp
mov eax, dword [0x45089c]
mov ecx, dword [eax + 0x24]
shr ecx, 2
add edx, ecx
mov dword [0x4509b8], edx
call fcn.00402820
mov edx, dword [0x45089c]
add esp, 8
mov edi, dword [edx + 0x1c]
sub edi, eax
sub edi, 0x14
call esi
cdq
idiv edi
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
add edx, 0xa
mov dword [0x4508a8], edx
jmp 0x402779
cmp ecx, 0x70
jl 0x40273c
mov eax, 0x7f
sub eax, ecx
jmp 0x402750
cmp ecx, 0x20
jl 0x402748
mov eax, 0xf
jmp 0x402754
cmp ecx, 0x10
jl 0x402779
lea eax, [ecx - 0x10]
test eax, eax
je 0x402779
cmp byte [edi], 0
je 0x402779
mov ecx, dword [0x4508a8]
mov edx, dword [0x45089c]
push eax
mov eax, dword [0x4509b8]
push edi
push 0
push eax
push ecx
push edx
call fcn.004066a0
add esp, 0x18
call ebp
mov edx, dword [0x450898]
mov ecx, eax
sub ecx, edx
mov eax, 0x10624dd3
mul ecx
mov ecx, edx
pop edi
pop esi
pop ebp
shr ecx, 6
je 0x4027a0
mov eax, dword [0x4508a4]
cdq
idiv ecx
jmp 0x4027a2
xor eax, eax
push eax
lea edx, [esp + 0x20]
push str._dfps
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x1c]
push 4
push eax
push 0
push ecx
call fcn.004027f0
mov edx, eax
mov eax, dword [0x45089c]
add esp, 4
mov ecx, dword [eax + 0x24]
sub ecx, edx
inc ecx
push ecx
push 3
push eax
call fcn.004066a0
inc dword [0x4508a4]
add esp, 0x54
ret