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

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffd4
mov ebx, eax
call fcn.004090d8
mov esi, eax
sub esi, dword [ebx + 0x48]
cmp esi, dword [0x525898]
jb 0x4af9e4
mov ebp, dword [ebx + 0x50]
sub ebp, dword [ebx + 0x4c]
mov dword [esp + 0x10], ebp
xor eax, eax
mov dword [esp + 0x14], eax
fild qword [esp + 0x10]
mov dword [esp + 0x18], esi
xor eax, eax
mov dword [esp + 0x1c], eax
fild qword [esp + 0x18]
fdivp st(1)
fmul dword [0x4afbe4]
call fcn.00403590
mov edi, eax
mov eax, dword [ebx + 0x40]
mov dword [eax + 0x30], edi
test edi, edi
jbe 0x4af9c8
mov eax, dword [ebx + 0x40]
cmp edi, dword [eax + 0x68]
jae 0x4af9c8
mov eax, dword [ebx + 0x40]
mov dword [eax + 0x68], edi
mov eax, dword [ebx + 0x40]
mov edx, dword [eax + 0x30]
cmp edx, dword [eax + 0x64]
jbe 0x4af9d6
mov dword [eax + 0x64], edx
call fcn.004090d8
mov dword [ebx + 0x48], eax
mov eax, dword [ebx + 0x50]
mov dword [ebx + 0x4c], eax
call fcn.004090d8
mov esi, eax
mov edi, dword [ebx + 0x40]
sub esi, dword [edi + 0x4c]
test esi, esi
jbe 0x4afa24
mov eax, dword [ebx + 0x50]
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0x14], eax
fild qword [esp + 0x10]
mov dword [esp + 0x18], esi
xor eax, eax
mov dword [esp + 0x1c], eax
fild qword [esp + 0x18]
fdivp st(1)
fmul dword [0x4afbe4]
call fcn.00403590
mov dword [edi + 0x60], eax
mov eax, dword [ebx + 0x40]
mov esi, dword [eax + 0x48]
test esi, esi
jbe 0x4afa5f
mov eax, dword [ebx + 0x50]
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0x14], eax
fild qword [esp + 0x10]
mov dword [esp + 0x18], esi
xor eax, eax
mov dword [esp + 0x1c], eax
fild qword [esp + 0x18]
fdivp st(1)
fmul dword [0x4afbe8]
call fcn.00403590
jmp 0x4afaf3
mov eax, dword [ebx + 0x40]
mov edx, dword [eax + 0x1c]
test edx, edx
jbe 0x4afaf1
cmp dword [eax + 0x2c], 0
jbe 0x4afaf1
mov ecx, dword [eax + 0x18]
mov dword [esp + 0x10], ecx
xor ecx, ecx
mov dword [esp + 0x14], ecx
fild qword [esp + 0x10]
mov dword [esp + 0x18], edx
xor edx, edx
mov dword [esp + 0x1c], edx
fild qword [esp + 0x18]
fdivp st(1)
fmul dword [0x4afbe8]
fstp qword [esp]
wait
mov edx, dword [eax + 0x28]
mov dword [esp + 0x10], edx
xor edx, edx
mov dword [esp + 0x14], edx
fild qword [esp + 0x10]
mov eax, dword [eax + 0x2c]
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x1c], eax
fild qword [esp + 0x18]
fdivp st(1)
fmul dword [0x4afbe8]
mov eax, dword [ebx + 0x40]
mov eax, dword [eax + 0x1c]
mov dword [esp + 0x20], eax
xor eax, eax
mov dword [esp + 0x24], eax
fild qword [esp + 0x20]
fdivp st(1)
fstp qword [esp + 8]
wait
fld qword [esp]
fadd qword [esp + 8]
call fcn.00403590
jmp 0x4afaf3
xor eax, eax
mov edx, dword [ebx + 0x40]
cmp al, byte [edx + 0x3c]
jbe 0x4afafe
mov byte [edx + 0x3c], al
mov eax, dword [ebx + 0x40]
cmp byte [eax + 0x3c], 0x64
jbe 0x4afb0b
mov byte [eax + 0x3c], 0x64
call fcn.004090d8
mov esi, dword [ebx + 0x40]
sub eax, dword [esi + 0x4c]
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0x14], eax
fild qword [esp + 0x10]
fdiv dword [0x4afbe4]
call fcn.0040359c
mov dword [esi + 0x34], eax
mov dword [esi + 0x6c], eax
mov eax, dword [esi + 0x48]
test eax, eax
jbe 0x4afb98
mov edi, eax
sub edi, dword [ebx + 0x50]
mov eax, dword [esi + 0x30]
add eax, dword [esi + 0x60]
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0x14], eax
fild qword [esp + 0x10]
fdiv dword [0x4afbec]
call fcn.00403590
mov esi, eax
test esi, esi
jbe 0x4afbd9
mov dword [esp + 0x10], edi
xor eax, eax
mov dword [esp + 0x14], eax
fild qword [esp + 0x10]
mov dword [esp + 0x18], esi
xor eax, eax
mov dword [esp + 0x1c], eax
fild qword [esp + 0x18]
fdivp st(1)
add esp, 0xfffffff4
fstp xword [esp]
wait
call fcn.0040aa94
mov edx, dword [ebx + 0x40]
mov dword [edx + 0x38], eax
jmp 0x4afbd9
movzx eax, byte [esi + 0x3c]
test al, al
jbe 0x4afbd9
mov edx, dword [esi + 0x34]
mov dword [esp + 0x10], edx
xor edx, edx
mov dword [esp + 0x14], edx
fild qword [esp + 0x10]
movzx eax, al
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
fdivp st(1)
fmul dword [0x4afbe8]
add esp, 0xfffffff4
fstp xword [esp]
wait
call fcn.0040aa94
mov edx, dword [ebx + 0x40]
sub eax, dword [edx + 0x34]
mov dword [edx + 0x38], eax
add esp, 0x2c
pop ebp
pop edi
pop esi
pop ebx
ret