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

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffd4
mov ebx, eax
call fcn.00409830
mov esi, eax
sub esi, dword [ebx + 0x48]
cmp esi, dword [0x585d0c]
jb 0x4f7a14
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 [0x4f7c14]
call fcn.00403608
mov edi, eax
mov eax, dword [ebx + 0x40]
mov dword [eax + 0x30], edi
test edi, edi
jbe 0x4f79f8
mov eax, dword [ebx + 0x40]
cmp edi, dword [eax + 0x68]
jae 0x4f79f8
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 0x4f7a06
mov dword [eax + 0x64], edx
call fcn.00409830
mov dword [ebx + 0x48], eax
mov eax, dword [ebx + 0x50]
mov dword [ebx + 0x4c], eax
call fcn.00409830
mov esi, eax
mov edi, dword [ebx + 0x40]
sub esi, dword [edi + 0x4c]
test esi, esi
jbe 0x4f7a54
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 [0x4f7c14]
call fcn.00403608
mov dword [edi + 0x60], eax
mov eax, dword [ebx + 0x40]
mov esi, dword [eax + 0x48]
test esi, esi
jbe 0x4f7a8f
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 [0x4f7c18]
call fcn.00403608
jmp 0x4f7b23
mov eax, dword [ebx + 0x40]
mov edx, dword [eax + 0x1c]
test edx, edx
jbe 0x4f7b21
cmp dword [eax + 0x2c], 0
jbe 0x4f7b21
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 [0x4f7c18]
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 [0x4f7c18]
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.00403608
jmp 0x4f7b23
xor eax, eax
mov edx, dword [ebx + 0x40]
cmp al, byte [edx + 0x3c]
jbe 0x4f7b2e
mov byte [edx + 0x3c], al
mov eax, dword [ebx + 0x40]
cmp byte [eax + 0x3c], 0x64
jbe 0x4f7b3b
mov byte [eax + 0x3c], 0x64
call fcn.00409830
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 [0x4f7c14]
call fcn.00403614
mov dword [esi + 0x34], eax
mov dword [esi + 0x6c], eax
mov eax, dword [esi + 0x48]
test eax, eax
jbe 0x4f7bc8
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 [0x4f7c1c]
call fcn.00403608
mov esi, eax
test esi, esi
jbe 0x4f7c09
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.0045ac70
mov edx, dword [ebx + 0x40]
mov dword [edx + 0x38], eax
jmp 0x4f7c09
movzx eax, byte [esi + 0x3c]
test al, al
jbe 0x4f7c09
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 [0x4f7c18]
add esp, 0xfffffff4
fstp xword [esp]
wait
call fcn.0045ac70
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