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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe4
push esi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
cmp dword [eax + 0x1b4], 0xb
je 0x50a17f
mov eax, dword [ebp - 4]
cmp dword [eax + 0x1b4], 9
je 0x50a17f
mov eax, dword [ebp - 4]
cmp dword [eax + 0x1b4], 0xd
je 0x50a17f
mov eax, dword [ebp - 4]
cmp dword [eax + 0x1b4], 6
je 0x50a17f
mov eax, dword [ebp - 4]
cmp dword [eax + 0x1b4], 7
je 0x50a17f
mov eax, dword [ebp - 4]
mov byte [eax + 0x258], 0
mov eax, dword [0x5328dc]
mov eax, dword [eax]
cmp eax, dword [ebp - 4]
je 0x509d61
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x294]
cmp dword [eax + 8], 2
jl 0x509d61
mov eax, dword [ebp - 4]
mov byte [eax + 0x258], 1
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x220]
mov eax, dword [ebp - 4]
sub edx, dword [eax + 0x218]
mov eax, dword [ebp - 4]
mov si, 0xfff8
call fcn.00403b30
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x220]
mov eax, dword [ebp - 4]
sub edx, dword [eax + 0x218]
mov eax, dword [ebp - 4]
mov si, 0xfff7
call fcn.00403b30
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x220]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
cmp dword [eax + 0x1b4], 0
je 0x50a0eb
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x220]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x218]
jl 0x509de1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x220]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x21c]
jle 0x509df3
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x218]
mov edx, dword [ebp - 4]
mov dword [edx + 0x220], eax
mov eax, dword [0x5328dc]
mov eax, dword [eax]
cmp eax, dword [ebp - 4]
je 0x509e31
mov eax, dword [ebp - 4]
cmp byte [eax + 0x154], 0
je 0x509e31
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x244]
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [ebp - 0x18], eax
fild qword [ebp - 0x1c]
fld xword [0x50a184]
fdivp st(1)
call fcn.00402bf8
mov dword [ebp - 0xc], eax
jmp 0x509e6f
mov eax, dword [ebp - 4]
cmp byte [eax + 0x258], 0
je 0x509e63
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x244]
add eax, eax
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [ebp - 0x18], eax
fild qword [ebp - 0x1c]
fdiv dword [0x50a190]
call fcn.00402bf8
mov dword [ebp - 0xc], eax
jmp 0x509e6f
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x244]
mov dword [ebp - 0xc], eax
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 4]
sub eax, dword [edx + 0x248]
cmp eax, dword [ebp - 0xc]
jbe 0x50a0ae
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x220]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x21c]
jge 0x509f70
mov eax, dword [ebp - 4]
cmp byte [eax + 0x154], 0
je 0x509f4e
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x16c]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x174]
sub edx, 2
cmp eax, edx
je 0x509ed2
push ebp
call fcn.00509c74
pop ecx
test al, al
je 0x509f12
mov eax, dword [ebp - 4]
cmp dword [eax + 0x178], 0
jge 0x509eed
push ebp
call fcn.00509c74
pop ecx
test al, al
je 0x509fe0
mov eax, dword [ebp - 4]
inc dword [eax + 0x220]
mov eax, dword [ebp - 4]
inc dword [eax + 0x16c]
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 4]
mov dword [edx + 0x248], eax
jmp 0x509fe0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x220]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x21c]
dec edx
cmp eax, edx
jge 0x509f32
mov eax, dword [ebp - 4]
inc dword [eax + 0x220]
mov eax, dword [ebp - 4]
inc dword [eax + 0x16c]
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 4]
mov dword [edx + 0x248], eax
jmp 0x509fe0
mov eax, dword [ebp - 4]
inc dword [eax + 0x220]
mov eax, dword [ebp - 4]
inc dword [eax + 0x170]
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 4]
mov dword [edx + 0x248], eax
jmp 0x509fe0
mov eax, dword [ebp - 4]
cmp byte [eax + 0x3a], 0
je 0x509f80
mov eax, dword [ebp - 4]
mov byte [eax + 0x39], 1
mov eax, dword [0x5328dc]
mov eax, dword [eax]
cmp eax, dword [ebp - 4]
jne 0x509fbf
mov eax, dword [0x532d5c]
mov eax, dword [eax]
call fcn.004b7a94
test al, al
je 0x509fe0
mov eax, dword [ebp - 4]
mov si, 0xfff6
call fcn.00403b30
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x1b4], edx
mov eax, dword [ebp - 4]
mov byte [eax + 0x154], 0
jmp 0x509fe0
mov eax, dword [ebp - 4]
mov si, 0xfff6
call fcn.00403b30
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x1b4], edx
mov eax, dword [ebp - 4]
mov byte [eax + 0x154], 0
mov eax, dword [ebp - 4]
cmp byte [eax + 0x154], 0
je 0x50a0ae
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x16c]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x174]
dec edx
cmp eax, edx
jne 0x50a0ae
mov eax, dword [ebp - 4]
cmp dword [eax + 0x178], 0
jle 0x50a0a3
mov eax, dword [ebp - 4]
add eax, 0x178
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x10]
push eax
mov eax, dword [ebp - 4]
movzx eax, word [eax + 8]
push eax
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0xa]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x14]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x18]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 8]
push eax
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 0xc]
push eax
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 0x1c]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x20]
push eax
lea eax, [ebp - 0xd]
push eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
mov eax, dword [0x5327bc]
mov eax, dword [eax]
mov edx, dword [ebp - 4]
call fcn.004c8b4c
cmp byte [ebp - 0xd], 0
je 0x50a095
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x210]
call fcn.005057c8
jmp 0x50a0a3
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x214]
call fcn.005057c8
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x178], edx
mov eax, dword [ebp - 4]
mov ax, word [eax + 0x18]
sub ax, 2
jb 0x50a0c1
sub ax, 0x29
jne 0x50a0d0
mov eax, dword [ebp - 4]
mov dword [eax + 0x260], 0xfffffff6
jmp 0x50a0db
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x260], edx
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 4]
mov dword [edx + 0x264], eax
jmp 0x50a157
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 4]
sub eax, dword [edx + 0x270]
cmp eax, 0xc8
jbe 0x50a157
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 4]
sub eax, dword [edx + 0x264]
cmp eax, 0x1f4
jbe 0x50a14b
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 4]
mov dword [edx + 0x264], eax
mov eax, dword [ebp - 4]
inc dword [eax + 0x260]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x268]
jl 0x50a14b
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x260], edx
mov eax, dword [ebp - 4]
mov si, 0xfffe
call fcn.00403b30
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x220]
cmp eax, dword [ebp - 8]
je 0x50a17f
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 4]
mov dword [edx + 0x278], eax
mov eax, dword [ebp - 4]
mov si, 0xfff3
call fcn.00403b30
pop esi
mov esp, ebp
pop ebp
ret