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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57ae6c
mov eax, dword fs:[0]
push eax
sub esp, 0x508
mov eax, dword [0x5d52e0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push ebx
lea eax, [ebp - 0x508]
push eax
call fcn.0055faa0
mov dword [ebp - 4], 0
mov ecx, dword [ebx + 0x110]
mov dword [ebp - 0x3f8], ecx
lea ecx, [ebp - 0x508]
mov dword [ebp - 0xb4], 0x1faf
call fcn.00558ee0
lea ecx, [ebp - 0x508]
mov esi, eax
mov dword [ebp - 4], 0xffffffff
call fcn.0055f8c0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x514], eax
cmp esi, 1
je 0x52146f
mov edx, dword [0x5dda04]
shr edx, 8
cmp dl, 0xb
je 0x5215f5
lea esp, [esp]
mov esi, dword [ebx + 0x1e0]
mov ecx, dword [esi + 8]
xor edx, edx
test ecx, ecx
jle 0x52145e
mov eax, dword [esi + 4]
add eax, 0x20
cmp dword [eax], 0
je 0x52144b
inc edx
add eax, 0x90
dec ecx
jne 0x521445
test edx, edx
jle 0x52145e
call fcn.0051c490
jmp 0x521430
mov eax, dword [ebx]
mov edx, dword [eax + 0x180]
mov ecx, ebx
call edx
jmp 0x5215fb
mov ecx, dword [0x5dd9c4]
mov edi, dword [0x5dd9c0]
mov esi, ecx
sub esi, edi
mov eax, 0x92492493
imul esi
add edx, esi
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
jne 0x5214da
mov esi, dword [ebx + 0x1e0]
mov ecx, dword [esi + 8]
xor edx, edx
test ecx, ecx
jle 0x5214c9
mov eax, dword [esi + 4]
add eax, 0x20
lea esp, [esp]
cmp dword [eax], 0
je 0x5214b6
inc edx
add eax, 0x90
dec ecx
jne 0x5214b0
test edx, edx
jle 0x5214c9
call fcn.0051c490
jmp 0x521494
mov edx, dword [ebx]
mov eax, dword [edx + 0x180]
mov ecx, ebx
call eax
jmp 0x5215fb
or esi, 0xffffffff
cmp edi, ecx
je 0x521567
call fcn.0040da38
mov ecx, dword [eax + 4]
call fcn.0040ebc2
mov dword [ebp - 4], 1
fld1
mov eax, dword [ebx + 0x110]
mov ecx, dword [edi]
push eax
mov eax, dword [ebx + 0x1e0]
push ecx
fstp dword [esp]
push ecx
call fcn.0051d1c0
mov dword [ebp - 0x510], eax
test eax, eax
js 0x521549
push eax
mov ecx, edi
mov esi, ebx
call fcn.005210f0
lea ecx, [ebp - 0x509]
mov dword [ebp - 4], 0xffffffff
call fcn.0040a970
mov ecx, dword [0x5dd9c4]
add edi, 0x1c
cmp edi, ecx
jne 0x5214e5
jmp 0x521561
lea ecx, [ebp - 0x509]
mov dword [ebp - 4], 0xffffffff
call fcn.0040a970
mov ecx, dword [0x5dd9c4]
mov esi, dword [ebp - 0x510]
push ecx
mov ecx, dword [0x5dd9c0]
push ecx
lea edx, [ebp - 0x510]
push edx
push 0x5dd9c0
call fcn.00403890
push 0x80
mov ecx, 0x5dd9c0
call fcn.00403220
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x514]
cmp eax, 0x64
jae 0x5215ae
mov ecx, 0x64
sub ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
test esi, esi
jns 0x5215bc
push ebx
call fcn.0051fd70
xor eax, eax
jmp 0x521600
mov ecx, dword [ebx + 0x1e0]
mov eax, esi
call fcn.0051bca0
mov edx, dword [ebx + 0x1d4]
push 0
push eax
mov eax, dword [edx + 0x20]
push 0x186
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [ebx + 0x1d0]
mov edx, dword [ecx + 0x20]
push 0
push 0
push edx
call dword [sym.imp.USER32.dll_InvalidateRect]
push ebx
call fcn.0051fd70
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004ff57c
mov esp, ebp
pop ebp
ret