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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc4
push ebx
push esi
push edi
mov esi, dword [0x52b69c]
xor edx, edx
push ebp
push 0x516ce3
push dword fs:[edx]
mov dword fs:[edx], esp
call fcn.00516570
mov ebx, dword [esi + 0x4b]
call sub.KERNEL32.DLL_GetTickCount
sub eax, 0x7d0
xor edx, edx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
call sub.KERNEL32.DLL_GetTickCount
xor edx, edx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
call sub.KERNEL32.DLL_GetTickCount
xor edx, edx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
mov eax, dword [0x52baf0]
cmp byte [eax], 0
jne 0x516aa4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x516ced
test ebx, ebx
jne 0x516ab5
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x516ced
mov eax, ebx
call fcn.00515f48
test al, al
je 0x516ac5
cmp ebx, dword [esi + 0x4b]
je 0x516aec
push 0
call fcn.0051f850
mov dl, 1
xor eax, eax
call fcn.00516870
xor eax, eax
mov dword [esi + 0x4b], eax
xor eax, eax
mov dword [esi + 0x4f], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x516ced
mov eax, dword [esi + 0x4b]
mov edx, dword [0x52b970]
add eax, dword [edx + 0x74]
lea edx, [ebp - 0x30]
mov ecx, 0xc
call fcn.0051b2b4
fstp st(0)
mov eax, dword [0x52b6cc]
cmp dword [eax + 0x22], 1
jne 0x516b4b
fld dword [esi + 0x2b]
call fcn.00402c0c
push eax
fld dword [esi + 0x23]
call fcn.00402c0c
pop edx
call fcn.00517208
test al, al
jne 0x516b84
push 0
call fcn.0051f850
mov eax, dword [esi + 0x4f]
xor edx, edx
call fcn.00516870
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x516ced
fld dword [ebp - 0x28]
call fcn.00402c0c
push eax
fld dword [ebp - 0x30]
call fcn.00402c0c
pop edx
call fcn.00517208
test al, al
jne 0x516b84
push 0
call fcn.0051f850
mov eax, dword [esi + 0x4f]
xor edx, edx
call fcn.00516870
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x516ced
lea edx, [esi + 0x23]
lea eax, [ebp - 0x30]
call fcn.00517178
cmp eax, 4
jbe 0x516bbb
mov edx, 3
mov eax, ebx
call fcn.00516488
test al, al
jne 0x516bbb
mov eax, dword [esi + 0x4f]
xor edx, edx
call fcn.00516870
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x516ced
mov eax, dword [0x52b970]
mov eax, dword [eax + 0x7c]
add eax, ebx
call fcn.0051b1c4
mov edi, eax
cmp edi, dword [ebp - 0x24]
jne 0x516c0f
fld dword [esi + 0x23]
call fcn.00402c0c
push edx
push eax
fld dword [ebp - 0x3c]
call fcn.00402c0c
cmp edx, dword [esp + 4]
jne 0x516bec
cmp eax, dword [esp]
pop edx
pop eax
jne 0x516c0f
fld dword [esi + 0x2b]
call fcn.00402c0c
push edx
push eax
fld dword [ebp - 0x34]
call fcn.00402c0c
cmp edx, dword [esp + 4]
jne 0x516c0b
cmp eax, dword [esp]
pop edx
pop eax
je 0x516c33
call sub.KERNEL32.DLL_GetTickCount
xor edx, edx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x24], edi
mov eax, dword [esi + 0x23]
mov dword [ebp - 0x3c], eax
mov eax, dword [esi + 0x27]
mov dword [ebp - 0x38], eax
mov eax, dword [esi + 0x2b]
mov dword [ebp - 0x34], eax
jmp 0x516c67
call sub.KERNEL32.DLL_GetTickCount
xor edx, edx
sub eax, dword [ebp - 0x10]
sbb edx, dword [ebp - 0xc]
cmp edx, 0
jne 0x516c4e
cmp eax, 0x1388
jbe 0x516c67
jmp 0x516c50
jle 0x516c67
mov eax, dword [esi + 0x4f]
xor edx, edx
call fcn.00516870
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x516ced
call sub.KERNEL32.DLL_GetTickCount
xor edx, edx
sub eax, dword [ebp - 0x20]
sbb edx, dword [ebp - 0x1c]
cmp edx, 0
jne 0x516c82
cmp eax, 0x493e0
jbe 0x516c98
jmp 0x516c84
jle 0x516c98
mov eax, dword [esi + 0x4f]
xor edx, edx
call fcn.00516870
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x516ced
call sub.KERNEL32.DLL_GetTickCount
xor edx, edx
sub eax, dword [ebp - 0x18]
sbb edx, dword [ebp - 0x14]
cmp edx, 0
jne 0x516cb3
cmp eax, 0x7d0
jbe 0x516ccf
jmp 0x516cb5
jle 0x516ccf
call sub.KERNEL32.DLL_GetTickCount
xor edx, edx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
mov eax, dword [esi + 0x58]
push eax
mov eax, dword [esi + 0x4f]
push eax
call fcn.0051f034
push 0x64
call sub.KERNEL32.DLL_Sleep
jmp 0x516a8d
mov al, byte [ebp - 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret