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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa4
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], eax
lea edi, [ebp - 4]
xor eax, eax
push ebp
push 0x521d6b
push dword fs:[eax]
mov dword fs:[eax], esp
call sub.kernel32.dll_GetTickCount_1
xor edx, edx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edx
xor edx, edx
push ebp
push 0x521d3e
push dword fs:[edx]
mov dword fs:[edx], esp
mov dword [ebp - 8], 0xffffffff
mov eax, dword [edi]
mov ebx, dword [eax + 0x142]
mov eax, dword [edi]
mov eax, dword [eax + 0x146]
mov dword [ebp - 0x18], eax
test ebx, ebx
je 0x521a8f
cmp dword [ebp - 0x18], 0
je 0x521a8f
mov eax, dword [edi]
mov dword [eax + 0x31d50], 0
mov dword [eax + 0x31d54], 0
mov eax, dword [edi]
mov eax, dword [eax + 0x11e]
call fcn.004060d8
dec eax
jge 0x521982
mov eax, dword [edi]
mov dword [eax + 0x31d80], 0
mov dword [eax + 0x31d84], 0
mov eax, dword [edi]
call fcn.00533540
mov eax, dword [edi]
mov eax, dword [eax + 0x11e]
mov dword [eax + 0x34], 0
mov dword [eax + 0x38], 0
call sub.kernel32.dll_GetTickCount_1
xor edx, edx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edx
call sub.kernel32.dll_GetTickCount_1
add eax, 0x2710
xor edx, edx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
mov eax, dword [edi]
mov eax, dword [eax + 0x602]
call fcn.004060d8
dec eax
test eax, eax
jl 0x5219f2
inc eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0xc]
lea eax, [eax + eax*2]
lea eax, [eax + eax*8]
mov edx, dword [edi]
mov edx, dword [edx + 0x602]
mov byte [edx + eax*2 + 2], 0
inc dword [ebp - 0xc]
dec dword [ebp - 0x44]
jne 0x5219d4
push 0xa
call sub.kernel32.dll_Sleep_1
mov eax, dword [edi]
cmp byte [eax + 0x6c], 0
jne 0x521a16
mov eax, dword [edi]
cmp byte [eax + 0x6d], 0
je 0x521a16
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x521d48
test ebx, ebx
jne 0x521a27
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x521d48
xor eax, eax
mov dword [ebp - 0x14], eax
mov eax, dword [edi]
mov eax, dword [eax + 0x602]
call fcn.004060d8
dec eax
test eax, eax
jl 0x521c55
inc eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0xc], 0
mov eax, dword [edi]
cmp byte [eax + 0x6c], 0
jne 0x521a6a
mov eax, dword [edi]
cmp byte [eax + 0x6d], 0
je 0x521a6a
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x521d48
mov eax, dword [edi]
cmp dword [eax + 0x146], 0
je 0x521a8f
mov edx, ebx
mov eax, dword [edi]
call fcn.0051ffac
test al, al
je 0x521a8f
mov eax, dword [edi]
mov eax, dword [eax + 0x146]
cmp eax, dword [ebp - 0x18]
je 0x521ad5
mov eax, dword [edi]
push eax
call fcn.00540b10
mov cl, 1
xor edx, edx
mov eax, dword [edi]
call fcn.0052f488
mov eax, dword [edi]
xor edx, edx
mov dword [eax + 0x142], edx
mov eax, dword [edi]
xor edx, edx
mov dword [eax + 0x146], edx
xor eax, eax
mov dword [ebp - 8], eax
call sub.kernel32.dll_GetTickCount_1
mov eax, dword [edi]
inc dword [eax + 0x31de4]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x521d48
mov eax, dword [ebp - 0xc]
lea eax, [eax + eax*2]
lea eax, [eax + eax*8]
mov edx, dword [edi]
mov edx, dword [edx + 0x602]
lea eax, [edx + eax*2]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x48]
cmp byte [eax], 0
je 0x521c49
mov eax, dword [ebp - 0x48]
cmp byte [eax + 1], 0
jne 0x521b0e
mov eax, dword [ebp - 0x48]
cmp byte [eax + 2], 0
jne 0x521c49
lea eax, [ebp - 0x58]
mov edx, dword [ebp - 0x48]
add edx, 3
mov ecx, 0x33
call fcn.0040504c
mov eax, dword [ebp - 0x58]
lea edx, [ebp - 0x1c]
call fcn.004096d8
push ebx
push 0
push 1
mov eax, dword [edi]
mov eax, dword [eax + 0x146]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [edi]
push eax
call fcn.00532848
mov esi, eax
cmp esi, 3
je 0x521b52
cmp esi, 4
jne 0x521b59
mov dword [ebp - 0x14], 1
test esi, esi
jne 0x521c49
mov eax, dword [0x55d330]
mov edx, dword [eax + 0xec]
add edx, ebx
mov eax, dword [edi]
call fcn.00541a04
mov esi, eax
lea ecx, [ebp - 0x54]
mov eax, dword [0x55d330]
mov edx, dword [eax + 0x144]
add edx, esi
mov eax, dword [edi]
call fcn.0053e0cc
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [edi]
push eax
call fcn.00520050
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x270f
je 0x521c49
mov eax, dword [ebp - 0x10]
mov edx, eax
shl eax, 4
add eax, edx
mov edx, dword [edi]
mov edx, dword [edx + 0x11e]
fld dword [edx + eax*4 + 0x1c]
fcomp dword [0x521d7c]
fnstsw ax
sahf
jbe 0x521bf7
mov eax, dword [ebp - 0x10]
mov edx, eax
shl eax, 4
add eax, edx
mov edx, dword [edi]
mov edx, dword [edx + 0x11e]
push dword [edx + eax*4 + 0x1c]
mov eax, dword [edi]
mov cl, byte [eax + 0x25d]
xor cl, 1
mov edx, ebx
mov eax, dword [edi]
call fcn.00521024
test al, al
mov dword [ebp - 0x14], 1
push ebx
push 0
push 0
mov eax, dword [edi]
mov eax, dword [eax + 0x146]
push eax
lea edx, [ebp - 0x5c]
mov eax, dword [ebp - 0x1c]
call fcn.004096d8
mov eax, dword [ebp - 0x5c]
push eax
mov eax, dword [edi]
push eax
call fcn.00532848
mov eax, dword [ebp - 0xc]
lea eax, [eax + eax*2]
lea eax, [eax + eax*8]
mov edx, dword [edi]
mov edx, dword [edx + 0x602]
mov byte [edx + eax*2 + 2], 1
push ebp
mov eax, ebx
call fcn.00521864
pop ecx
push 0x64
call sub.kernel32.dll_Sleep_1
inc dword [ebp - 0xc]
dec dword [ebp - 0x44]
jne 0x521a4d
cmp dword [ebp - 0x14], 0
jne 0x521c74
mov dword [ebp - 8], 1
call sub.kernel32.dll_GetTickCount_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x521d48
mov eax, dword [0x55d330]
mov edx, dword [eax + 0xdc]
add edx, ebx
add edx, 0xcc
mov eax, dword [edi]
call fcn.0053e9e4
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
cmp eax, dword [ebp - 0x3c]
je 0x521cb1
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x3c], eax
call sub.kernel32.dll_GetTickCount_1
add eax, 0x2710
xor edx, edx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
call sub.kernel32.dll_GetTickCount_1
xor edx, edx
cmp edx, dword [ebp - 0x34]
jne 0x521cc4
cmp eax, dword [ebp - 0x38]
jbe 0x521ce9
jmp 0x521cc6
jle 0x521ce9
mov eax, dword [edi]
push eax
call fcn.00540b10
mov eax, dword [edi]
mov edx, dword [eax + 0x146]
xor ecx, ecx
mov eax, dword [edi]
call fcn.0052f488
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x521d48
call sub.kernel32.dll_GetTickCount_1
xor edx, edx
sub eax, dword [ebp - 0x30]
sbb edx, dword [ebp - 0x2c]
cmp edx, 0
jne 0x521d08
cmp eax, 0xea60
jbe 0x5219f2
jmp 0x521d0e
jle 0x5219f2
mov eax, dword [edi]
push eax
call fcn.00540b10
mov eax, dword [edi]
mov edx, dword [eax + 0x146]
xor ecx, ecx
mov eax, dword [edi]
call fcn.0052f488
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x521d48
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x521d72
lea eax, [ebp - 0x5c]
mov edx, 2
call fcn.00404e00
lea eax, [ebp - 0x1c]
call fcn.00404ddc
ret