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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x10]
mov esi, dword [esi*4 + 0x20a514c]
cmp word [esi + 0x78], 1
jne 0x508a8a
movzx eax, word [edi + 6]
push eax
push esi
mov ebx, eax
call fcn.00508760
test al, al
je 0x508d77
cmp ebx, 0x29
jne 0x508a8a
mov eax, dword [esi + 0x390]
movzx eax, word [eax + 4]
mov ecx, eax
test ax, ax
js 0x508d77
mov eax, 0x2000
cmp cx, ax
jge 0x508d77
cmp dword [0xbdccbc], 1
mov byte [ebp + 0x10], 0
je 0x508aa3
mov al, byte [esi + 0x5a8]
and al, 0xc0
cmp al, 0x80
jne 0x508aec
movzx eax, word [edi + 6]
lea ecx, [esi + 0xc0]
push eax
lea ebx, [edi + 6]
call fcn.00434330
test al, al
je 0x508aef
cmp dword [0xbda898], 0
mov eax, dword [sym.imp.KERNEL32.dll_GetTickCount]
je 0x508ae0
lea ebx, [edi + 6]
call eax
sub eax, dword [esi + 0x714]
cmp eax, dword [0xbda89c]
jbe 0x508aef
mov eax, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov byte [ebp + 0x10], 1
call eax
mov dword [esi + 0x714], eax
lea ebx, [edi + 6]
cmp byte [esi + 0x5e1], 0
je 0x508b31
cmp word [ebx], 0x28
je 0x508b31
mov eax, dword [esi + 0x324]
xor ecx, ecx
add eax, 6
mov dword [ebp - 4], 0xffff
movzx edx, word [eax + 2]
lea ebx, [eax - 6]
cmp dx, word [ebp - 4]
je 0x508b28
cmp edx, 0x28
je 0x508b83
cmp word [eax], 0x28
je 0x508b83
inc ecx
add eax, 0x14
cmp ecx, 0x3c
jl 0x508b10
movzx eax, word [edi + 6]
mov ebx, dword [ebp + 0xc]
cmp eax, 0x28
jne 0x508bea
cmp ebx, 0x3a
je 0x508c2e
cmp ebx, 0x18b
je 0x508c2e
push dword [ebp + 0x10]
movzx eax, byte [esi + 0x146]
mov ecx, 0xbf0bd0
push 0
push eax
movzx eax, byte [esi + 0x144]
push eax
push edi
push ebx
push dword [ebp + 8]
call fcn.005090b0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
test ebx, ebx
je 0x508b31
mov al, byte [esi + 0x144]
xor ecx, ecx
mov bl, byte [esi + 0x146]
mov edi, 0xffff
mov dword [ebp + 0xc], eax
mov eax, dword [esi + 0x324]
add eax, 6
movzx edx, word [eax + 2]
lea esi, [eax - 6]
cmp dx, di
je 0x508bbd
cmp edx, 0x28
je 0x508bc8
cmp word [eax], 0x28
je 0x508bc8
inc ecx
add eax, 0x14
cmp ecx, 0x3c
jl 0x508ba6
xor esi, esi
push dword [ebp + 0x10]
mov ecx, 0xbf0bd0
push 0
push ebx
push dword [ebp + 0xc]
push esi
push 0
push dword [ebp + 8]
call fcn.005090b0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, 0x105
cmp ax, cx
je 0x508c08
mov ecx, 0x106
cmp ax, cx
je 0x508c08
mov ecx, 0x107
cmp ax, cx
jne 0x508c2e
mov ax, word [esi + 0x32c]
cmp ax, word [edi + 8]
jne 0x508c2e
movzx ecx, word [esi + 0x32e]
test cx, cx
lea eax, [ecx + 1]
mov word [esi + 0x32e], ax
jmp 0x508b50
cmp word [esi + 0x78], 1
jne 0x508c5b
movzx eax, word [edi + 8]
push eax
push esi
call fcn.00507eb0
test al, al
je 0x508d77
movzx eax, word [edi + 8]
push eax
push esi
call fcn.00507f40
test al, al
je 0x508d77
push dword [ebp + 0x10]
movzx eax, byte [esi + 0x146]
mov ecx, 0xbf0bd0
push 0
push eax
movzx eax, byte [esi + 0x144]
push eax
push edi
push ebx
mov ebx, dword [ebp + 8]
push ebx
call fcn.005090b0
test al, al
je 0x508d77
cmp word [esi + 0x78], 1
jne 0x508d77
movzx eax, word [edi + 8]
mov ecx, 0xbf0bd4
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.00405650
mov eax, dword [ebp - 8]
mov ecx, dword [0xbf0bd4]
cmp byte [eax + 0xd], 0
jne 0x508cc4
movzx edx, word [edi + 8]
cmp edx, dword [eax + 0x10]
jge 0x508cc6
mov eax, ecx
cmp eax, ecx
jne 0x508ccf
or eax, 0xffffffff
jmp 0x508cd2
mov eax, dword [eax + 0x3c]
mov ecx, dword [esi + 0x90c]
imul ecx, eax
mov eax, 0x51eb851f
movss xmm1, dword [esi + 0x108]
imul ecx
mov ecx, 0xbf0bd4
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
movd xmm0, eax
lea eax, [ebp + 8]
cvtdq2ps xmm0, xmm0
push eax
lea eax, [ebp - 0x10]
push eax
subss xmm1, xmm0
movss dword [esi + 0x108], xmm1
movzx edi, word [edi + 8]
mov dword [ebp + 8], edi
call fcn.00405650
mov eax, dword [ebp - 8]
mov ecx, dword [0xbf0bd4]
cmp byte [eax + 0xd], 0
jne 0x508d34
cmp edi, dword [eax + 0x10]
jge 0x508d36
mov eax, ecx
cmp eax, ecx
jne 0x508d3f
or eax, 0xffffffff
jmp 0x508d42
mov eax, dword [eax + 0x40]
mov ecx, dword [esi + 0x910]
imul ecx, eax
mov eax, 0xae147ae1
imul ecx
mov ecx, ebx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
add dword [esi + 0x128], eax
push dword [esi + 0x128]
cvttss2si eax, xmm1
push eax
call fcn.004e9750
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc