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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x512637
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebx + 4], 0
je 0x51261b
call sub.kernel32.dll_GetTickCount_1
sub eax, dword [0x56a27c]
cmp eax, 0xbb8
jbe 0x512476
mov edx, dword [0x56b274]
mov edx, dword [edx]
mov eax, dword [0x56b260]
mov eax, dword [eax]
call fcn.00550800
mov al, byte [eax + 0x3ff]
add al, 0xfc
sub al, 2
jb 0x51246c
mov eax, ebx
call fcn.00512754
call sub.kernel32.dll_GetTickCount_1
mov dword [0x56a27c], eax
cmp dword [ebx + 0xc], 0
setne byte [ebp - 5]
mov al, byte [ebp - 5]
dec al
jne 0x512497
mov edx, dword [ebx + 0xc]
mov eax, dword [ebx + 0x10]
mov esi, dword [edx + eax*8]
mov edx, dword [ebx + 0xc]
mov edi, dword [edx + eax*8 + 4]
jmp 0x5124a7
mov edx, dword [ebx + 4]
mov eax, dword [ebx + 8]
mov esi, dword [edx + eax*8]
mov edx, dword [ebx + 4]
mov edi, dword [edx + eax*8 + 4]
mov eax, dword [0x56b868]
mov eax, dword [eax]
mov ecx, edi
mov edx, esi
call fcn.00552254
test al, al
je 0x5124f3
mov eax, dword [0x56b868]
mov eax, dword [eax]
push dword [eax + 0x38438]
mov eax, esi
pop edx
sub eax, edx
cdq
xor eax, edx
sub eax, edx
dec eax
jg 0x5124f3
mov eax, dword [0x56b868]
mov eax, dword [eax]
push dword [eax + 0x3843c]
mov eax, edi
pop edx
sub eax, edx
cdq
xor eax, edx
sub eax, edx
dec eax
jle 0x512585
mov eax, dword [ebx + 4]
call fcn.00485ea4
mov esi, eax
mov edi, dword [ebx + 8]
sub esi, edi
dec esi
cmp esi, 0xd
jle 0x51250d
mov esi, 0xd
add esi, edi
mov eax, dword [ebx + 4]
mov eax, dword [eax + esi*8]
push eax
mov eax, dword [ebx + 4]
mov eax, dword [eax + esi*8 + 4]
push eax
push 1
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
movsx ecx, word [eax + 0x66]
mov eax, dword [ebp - 4]
movsx edx, word [eax + 0x62]
mov eax, dword [0x56b868]
mov eax, dword [eax]
call fcn.00552508
mov edx, dword [ebp - 0xc]
lea eax, [ebx + 0xc]
mov ecx, dword [0x551eb8]
call fcn.004860c0
cmp dword [ebx + 0xc], 0
jne 0x51256d
mov eax, ebx
call fcn.00512204
mov edx, 0x512650
mov eax, ebx
call fcn.005121dc
jmp 0x51261b
mov dword [ebx + 8], esi
mov eax, 1
mov dword [ebx + 0x10], eax
mov edx, dword [ebx + 0xc]
mov esi, dword [edx + eax*8]
mov edx, dword [ebx + 0xc]
mov edi, dword [edx + eax*8 + 4]
push edi
mov eax, dword [ebp - 4]
mov dx, word [eax + 0x66]
mov eax, dword [ebp - 4]
mov ax, word [eax + 0x62]
mov ecx, esi
call fcn.0050717c
movzx eax, ax
mov esi, eax
cmp esi, 8
je 0x51261b
mov eax, dword [ebp - 4]
cmp esi, dword [eax + 0x434]
je 0x5125be
mov ecx, esi
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.00512718
jmp 0x51261b
mov ecx, esi
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.00512698
test al, al
je 0x51261b
mov al, byte [ebp - 5]
sub al, 1
jb 0x5125f7
jne 0x51261b
inc dword [ebx + 0x10]
mov eax, dword [ebx + 0xc]
call fcn.00485ea4
cmp eax, dword [ebx + 0x10]
jge 0x51261b
lea eax, [ebx + 0xc]
mov edx, dword [0x551eb8]
call fcn.00486084
jmp 0x51261b
inc dword [ebx + 8]
mov eax, dword [ebx + 4]
call fcn.00485ea4
sub eax, dword [ebx + 8]
dec eax
jg 0x51261b
mov eax, ebx
call fcn.00512204
mov edx, 0x512678
mov eax, ebx
call fcn.005121dc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51263e
lea eax, [ebp - 0xc]
mov edx, dword [0x551eb8]
call fcn.00486084
ret