Function at 0x516b70
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 [0x52a720]
xor edx, edx
push ebp
push 0x516e02
push dword fs:[edx]
mov dword fs:[edx], esp
call fcn.005167b4
mov ebx, dword [esi + 0x49]
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 [0x52ab68]
cmp byte [eax], 0
jne 0x516bd8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x516e0c
test ebx, ebx
jne 0x516be9
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x516e0c
mov eax, ebx
call fcn.00516180
test al, al
je 0x516bf9
cmp ebx, dword [esi + 0x49]
je 0x516c19
mov dl, 1
xor eax, eax
call fcn.00516ab4
xor eax, eax
mov dword [esi + 0x49], eax
xor eax, eax
mov dword [esi + 0x4d], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x516e0c
mov eax, dword [esi + 0x49]
mov edx, dword [0x52a9f0]
add eax, dword [edx + 0x74]
lea edx, [ebp - 0x30]
mov ecx, 0xc
call fcn.0051a370
fstp st(0)
mov eax, dword [0x52a750]
cmp dword [eax + 0x22], 1
jne 0x516c71
fld dword [esi + 0x29]
call fcn.00402c0c
push eax
fld dword [esi + 0x21]
call fcn.00402c0c
pop edx
call fcn.00517344
test al, al
jne 0x516ca3
mov eax, dword [esi + 0x4d]
xor edx, edx
call fcn.00516ab4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x516e0c
fld dword [ebp - 0x28]
call fcn.00402c0c
push eax
fld dword [ebp - 0x30]
call fcn.00402c0c
pop edx
call fcn.00517344
test al, al
jne 0x516ca3
mov eax, dword [esi + 0x4d]
xor edx, edx
call fcn.00516ab4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x516e0c
lea edx, [esi + 0x21]
lea eax, [ebp - 0x30]
call fcn.005172b4
cmp eax, 4
jbe 0x516cda
mov edx, 3
mov eax, ebx
call fcn.005166cc
test al, al
jne 0x516cda
mov eax, dword [esi + 0x4d]
xor edx, edx
call fcn.00516ab4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x516e0c
mov eax, dword [0x52a9f0]
mov eax, dword [eax + 0x7c]
add eax, ebx
call fcn.0051a254
mov edi, eax
cmp edi, dword [ebp - 0x24]
jne 0x516d2e
fld dword [esi + 0x21]
call fcn.00402c0c
push edx
push eax
fld dword [ebp - 0x3c]
call fcn.00402c0c
cmp edx, dword [esp + 4]
jne 0x516d0b
cmp eax, dword [esp]
pop edx
pop eax
jne 0x516d2e
fld dword [esi + 0x29]
call fcn.00402c0c
push edx
push eax
fld dword [ebp - 0x34]
call fcn.00402c0c
cmp edx, dword [esp + 4]
jne 0x516d2a
cmp eax, dword [esp]
pop edx
pop eax
je 0x516d52
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 + 0x21]
mov dword [ebp - 0x3c], eax
mov eax, dword [esi + 0x25]
mov dword [ebp - 0x38], eax
mov eax, dword [esi + 0x29]
mov dword [ebp - 0x34], eax
jmp 0x516d86
call sub.KERNEL32.DLL_GetTickCount
xor edx, edx
sub eax, dword [ebp - 0x10]
sbb edx, dword [ebp - 0xc]
cmp edx, 0
jne 0x516d6d
cmp eax, 0x1388
jbe 0x516d86
jmp 0x516d6f
jle 0x516d86
mov eax, dword [esi + 0x4d]
xor edx, edx
call fcn.00516ab4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x516e0c
call sub.KERNEL32.DLL_GetTickCount
xor edx, edx
sub eax, dword [ebp - 0x20]
sbb edx, dword [ebp - 0x1c]
cmp edx, 0
jne 0x516da1
cmp eax, 0x493e0
jbe 0x516db7
jmp 0x516da3
jle 0x516db7
mov eax, dword [esi + 0x4d]
xor edx, edx
call fcn.00516ab4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x516e0c
call sub.KERNEL32.DLL_GetTickCount
xor edx, edx
sub eax, dword [ebp - 0x18]
sbb edx, dword [ebp - 0x14]
cmp edx, 0
jne 0x516dd2
cmp eax, 0x7d0
jbe 0x516dee
jmp 0x516dd4
jle 0x516dee
call sub.KERNEL32.DLL_GetTickCount
xor edx, edx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
mov eax, dword [esi + 0x56]
push eax
mov eax, dword [esi + 0x4d]
push eax
call fcn.0051ecbc
push 0x64
call sub.KERNEL32.DLL_Sleep
jmp 0x516bc1
mov al, byte [ebp - 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret