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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov word [ebp - 6], dx
mov dword [ebp - 4], eax
mov byte [ebp - 7], 0
mov eax, dword [0x5865d0]
mov eax, dword [eax]
call fcn.0050cf54
cmp ax, word [ebp - 6]
jne 0x57852a
mov eax, dword [0x586a98]
mov eax, dword [eax]
cmp dword [eax + 0x334], 0
jl 0x578496
mov eax, dword [0x586a98]
mov eax, dword [eax]
movzx edx, byte [eax + 0x334]
mov eax, dword [0x5865d0]
mov eax, dword [eax]
call fcn.0050b750
test al, al
je 0x578496
push ebp
mov eax, dword [0x586a98]
mov eax, dword [eax]
movzx eax, word [eax + 0x334]
call fcn.00577f20
pop ecx
test al, al
je 0x578496
push ebp
mov eax, dword [0x586a98]
mov eax, dword [eax]
movzx eax, word [eax + 0x334]
call fcn.00578244
pop ecx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14c]
call fcn.0041e26c
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x578512
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0xc]
mov esi, dword [eax + 8]
dec esi
test esi, esi
jl 0x5784f6
inc esi
xor edi, edi
mov edx, edi
mov eax, dword [ebp - 0xc]
call fcn.0041dea4
mov ebx, eax
cmp dword [ebx + 8], 0
jbe 0x5784f2
xor eax, eax
mov dword [ebx + 8], eax
mov eax, dword [0x586a98]
mov eax, dword [eax]
cmp dword [eax + 0x334], 0
jge 0x5784f2
call fcn.004b9988
mov dword [ebx + 0xc], eax
inc edi
dec esi
jne 0x5784c3
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x578519
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14c]
call fcn.0041e2d0
ret
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14c]
call fcn.0041e26c
mov dword [ebp - 0x10], eax
xor edx, edx
push ebp
push 0x5786a8
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x144]
mov edx, dword [ebp - 0x10]
cmp eax, dword [edx + 8]
jl 0x578565
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x144], edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x144]
mov edi, eax
mov edx, dword [ebp - 0x10]
mov esi, dword [edx + 8]
add esi, eax
dec esi
sub esi, edi
jl 0x578683
inc esi
mov eax, dword [ebp - 0x10]
push dword [eax + 8]
mov eax, edi
pop edx
mov ecx, edx
cdq
idiv ecx
mov eax, dword [ebp - 0x10]
call fcn.0041dea4
mov ebx, eax
movzx edx, byte [ebx]
mov eax, dword [0x5865d0]
mov eax, dword [eax]
call fcn.0050b750
test al, al
je 0x57867b
push ebp
movzx eax, word [ebx]
call fcn.00577f20
pop ecx
test al, al
je 0x57867b
mov eax, dword [0x5865d0]
mov eax, dword [eax]
call fcn.0050cf54
cmp ax, word [ebp - 6]
jne 0x578638
movzx edx, byte [ebx]
mov eax, dword [ebp - 4]
call fcn.005748e0
test al, al
je 0x578608
cmp dword [ebx + 0xc], 0
jne 0x5785f7
call fcn.004b9988
mov dword [ebx + 0xc], eax
jmp 0x57867b
call fcn.004b9988
sub eax, dword [ebx + 0xc]
cmp eax, 0x493e0
jb 0x57867b
jmp 0x57861d
cmp dword [ebx + 0xc], 0
jbe 0x57861d
call fcn.004b9988
sub eax, dword [ebx + 0xc]
cmp eax, 0x7530
jb 0x57867b
movzx eax, word [ebx]
mov edx, dword [0x586a98]
mov edx, dword [edx]
mov dword [edx + 0x334], eax
call fcn.004b9988
mov dword [ebx + 8], eax
jmp 0x57866b
movzx eax, word [ebx]
sub ax, 0x48
je 0x57867b
sub ax, 5
je 0x57867b
sub ax, 3
je 0x57867b
sub ax, 2
je 0x57867b
push ebp
movzx eax, word [ebx]
call fcn.005782f4
pop ecx
test al, al
je 0x57867b
push ebp
movzx eax, word [ebx]
call fcn.00578368
pop ecx
push ebp
movzx eax, word [ebx]
call fcn.005781e8
pop ecx
mov byte [ebp - 7], 1
jmp 0x578683
inc edi
dec esi
jne 0x578582
mov eax, dword [ebp - 4]
inc dword [eax + 0x144]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5786af
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14c]
call fcn.0041e2d0
ret