Function at 0x508d80
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 0x508de4
movzx eax, word [edi + 6]
push eax
push esi
mov ebx, eax
call fcn.00508760
test al, al
je 0x509095
cmp ebx, 0x29
jne 0x508de4
mov eax, dword [esi + 0x390]
movzx eax, word [eax + 4]
mov ecx, eax
test ax, ax
js 0x509095
mov eax, 0x2000
cmp cx, ax
jge 0x509095
movzx ecx, word [edi + 6]
mov byte [ebp + 0x10], 0
jmp 0x508df5
movzx ecx, word [edi + 6]
mov byte [ebp + 0x10], 0
cmp ecx, 5
je 0x508e9d
cmp cx, 8
je 0x508e9d
cmp cx, 9
je 0x508e9d
cmp cx, 0xa
je 0x508e9d
cmp cx, 0xc
je 0x508e9d
cmp cx, 0xd
je 0x508e9d
cmp cx, 0xe
je 0x508e9d
cmp cx, 0x18
je 0x508e9d
cmp cx, 0x2f
je 0x508e9d
cmp cx, 0x32
je 0x508e9d
cmp cx, 0x34
je 0x508e9d
cmp cx, 0x37
je 0x508e9d
cmp cx, 0x4e
je 0x508e9d
cmp dword [0xbdccbc], 1
je 0x508e62
mov al, byte [esi + 0x5a8]
and al, 0xc0
cmp al, 0x80
jne 0x508e9d
push ecx
lea ecx, [esi + 0xc0]
call fcn.00434330
test al, al
je 0x508e9d
cmp dword [0xbda898], 0
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
je 0x508e91
call ebx
sub eax, dword [esi + 0x714]
cmp eax, dword [0xbda89c]
jbe 0x508e9d
mov byte [ebp + 0x10], 1
call ebx
mov dword [esi + 0x714], eax
cmp byte [esi + 0x5e1], 0
je 0x508ee9
cmp word [edi + 6], 0x28
je 0x508ee9
mov eax, dword [esi + 0x324]
xor ecx, ecx
add eax, 6
mov dword [ebp - 4], 0xffff
nop
movzx edx, word [eax + 2]
lea ebx, [eax - 6]
cmp dx, word [ebp - 4]
je 0x508ee0
cmp edx, 0x28
je 0x508f8e
cmp word [eax], 0x28
je 0x508f8e
inc ecx
add eax, 0x14
cmp ecx, 0x3c
jl 0x508ec0
push dword [ebp + 0x1c]
movzx eax, word [edi + 8]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push eax
push esi
call fcn.00517510
cmp word [esi + 0x78], 1
jne 0x508f26
movzx ebx, word [edi + 8]
push ebx
push esi
call fcn.00507eb0
test al, al
je 0x509095
push ebx
push esi
call fcn.00507f40
test al, al
je 0x509095
push dword [ebp + 0x10]
mov ecx, 0xbf0bd0
push dword [ebp + 0x20]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.005090b0
test al, al
je 0x509095
cmp word [esi + 0x78], 1
jne 0x509095
movzx ebx, word [edi + 8]
lea eax, [ebp + 0x18]
push eax
lea eax, [ebp - 0x10]
mov dword [ebp + 0x18], ebx
push eax
mov ecx, 0xbf0bd4
call fcn.00405650
mov eax, dword [ebp - 8]
mov ecx, dword [0xbf0bd4]
cmp byte [eax + 0xd], 0
jne 0x508f83
cmp ebx, dword [eax + 0x10]
jge 0x508f85
mov eax, ecx
cmp eax, ecx
jne 0x508fec
or eax, 0xffffffff
jmp 0x508fef
test ebx, ebx
je 0x508ee9
mov eax, dword [esi + 0x324]
xor ecx, ecx
add eax, 6
mov ebx, 0xffff
movzx edx, word [eax + 2]
lea esi, [eax - 6]
cmp dx, bx
je 0x508fbd
cmp edx, 0x28
je 0x508fc8
cmp word [eax], 0x28
je 0x508fc8
inc ecx
add eax, 0x14
cmp ecx, 0x3c
jl 0x508fa6
xor esi, esi
push dword [ebp + 0x10]
mov ecx, 0xbf0bd0
push 0
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push esi
push 0
push dword [ebp + 8]
call fcn.005090b0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
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 + 0x18]
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 + 0x18], edi
call fcn.00405650
mov eax, dword [ebp - 8]
mov ecx, dword [0xbf0bd4]
cmp byte [eax + 0xd], 0
jne 0x509051
cmp edi, dword [eax + 0x10]
jge 0x509053
mov eax, ecx
cmp eax, ecx
jne 0x50905c
or eax, 0xffffffff
jmp 0x50905f
mov eax, dword [eax + 0x40]
mov ecx, dword [esi + 0x910]
imul ecx, eax
mov eax, 0xae147ae1
imul ecx
mov ecx, dword [ebp + 8]
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 0x1c