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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5eaa95
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x68
mov eax, dword [0x689140]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, dword [ebx + 8]
mov ecx, dword [ebx + 0xc]
cmp edx, 0xffffffff
jne 0x565fa6
cmp ecx, 0x7fffffff
jne 0x565fa6
or esi, 0xffffffff
jmp 0x565fc3
mov eax, edx
or eax, ecx
je 0x565fc1
push 0
push 0x3e8
push ecx
push edx
call fcn.005ca680
mov esi, eax
mov dword [ebp - 0x24], edx
jmp 0x565fc3
xor esi, esi
mov dword [ebp - 0x64], esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, esi
or edi, 0xffffffff
mov dword [ebp - 0x70], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [0x6eebf4]
xorps xmm0, xmm0
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x2c], 0
movups xmmword [ebp - 0x3c], xmm0
test esi, esi
jne 0x56601c
push 0x6294e0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x566036
push 0x6294c4
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
mov dword [0x6eebf4], esi
test esi, esi
je 0x566036
mov ecx, esi
call dword [0x5f2510]
call esi
test al, al
je 0x566036
xorps xmm0, xmm0
movups xmmword [ebp - 0x38], xmm0
jmp 0x566102
xorps xmm0, xmm0
lea ecx, [ebp - 0x5c]
movups xmmword [ebp - 0x5c], xmm0
movups xmmword [ebp - 0x4c], xmm0
call fcn.00566c10
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x6c], eax
mov esi, dword [eax]
cmp esi, eax
je 0x5660ea
lea eax, [ebp - 0x1c]
xorps xmm0, xmm0
lea ecx, [esi + 0xc]
movlpd qword [ebp - 0x1c], xmm0
push eax
call fcn.00567fa0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x566094
mov eax, dword [eax]
mov edi, dword [eax + 8]
mov ecx, edi
call dword [0x5f2510]
mov ecx, dword [ebp - 0x1c]
call edi
or edi, 0xffffffff
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x5660dd
mov eax, edi
lock xadd dword [ecx + 4], eax
jne 0x5660dd
mov eax, dword [ecx]
mov edi, dword [eax]
mov ecx, edi
call dword [0x5f2510]
mov ecx, dword [ebp - 0x18]
call edi
mov ecx, dword [ebp - 0x18]
or edi, 0xffffffff
mov eax, edi
lock xadd dword [ecx + 8], eax
jne 0x5660dd
mov eax, dword [ecx]
mov edi, dword [eax + 4]
mov ecx, edi
call dword [0x5f2510]
mov ecx, dword [ebp - 0x18]
call edi
or edi, 0xffffffff
mov eax, dword [esi]
mov esi, eax
cmp eax, dword [ebp - 0x6c]
jne 0x566060
lea ecx, [ebp - 0x3c]
call fcn.00565bd0
lea ecx, [ebp - 0x50]
call fcn.0047a0b0
lea ecx, [ebp - 0x58]
call fcn.005686e0
mov dword [ebp - 4], 2
cmp dword [ebp - 0x30], 0
je 0x5661dd
mov ecx, dword [ebx + 8]
mov eax, dword [ebx + 0xc]
cmp ecx, 0xffffffff
jne 0x566125
cmp eax, 0x7fffffff
je 0x566150
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp - 0x68]
cmp eax, dword [ebp - 0x64]
ja 0x5661d7
mov dword [ebp - 0x78], eax
lea ecx, [ebp - 0x28]
lea eax, [ebp - 0x78]
mov dword [ebp - 0x74], 0
push eax
call fcn.004d62c0
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
push eax
push ecx
lea ecx, [ebp - 0x3c]
call fcn.00567f30
test al, al
je 0x5661d7
mov dword [ebp - 4], 0xffffffff
mov edi, dword [ebp - 0x2c]
test edi, edi
je 0x5661a1
or eax, 0xffffffff
lock xadd dword [edi + 4], eax
jne 0x5661a1
mov eax, dword [edi]
mov esi, dword [eax]
mov ecx, esi
call dword [0x5f2510]
mov ecx, edi
call esi
or eax, 0xffffffff
lock xadd dword [edi + 8], eax
jne 0x5661a1
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x5f2510]
mov ecx, edi
call esi
mov ecx, dword [ebp - 0x34]
mov edi, 0xffffffff
test ecx, ecx
je 0x565fd4
or edi, edi
mov eax, edi
lock xadd dword [ecx + 8], eax
jne 0x565fd4
mov eax, dword [ecx]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x5f2510]
mov ecx, dword [ebp - 0x34]
call esi
jmp 0x565fd4
mov byte [ebp - 0x5d], 0
jmp 0x566241
lea ecx, [ebp - 0x28]
call fcn.004e19a0
mov edx, eax
lea ecx, [ebx + 8]
call fcn.00567ee0
test al, al
jne 0x56623d
xorps xmm0, xmm0
movlpd qword [ebp - 0x28], xmm0
call fcn.00566d10
mov ecx, eax
call fcn.004520d0
mov edi, eax
push edi
mov dword [ebp - 0x28], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 0x24], 1
mov byte [ebp - 4], 3
call fcn.00566d10
mov ecx, eax
call fcn.004520d0
push edi
mov esi, dword [eax + 0x20]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
je 0x56623d
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov byte [ebp - 0x5d], 1
mov ecx, dword [ebp - 0x2c]
or edi, 0xffffffff
test ecx, ecx
je 0x566283
mov eax, edi
lock xadd dword [ecx + 4], eax
jne 0x566283
mov eax, dword [ecx]
mov esi, dword [eax]
mov ecx, esi
call dword [0x5f2510]
mov ecx, dword [ebp - 0x2c]
call esi
mov ecx, dword [ebp - 0x2c]
mov eax, edi
lock xadd dword [ecx + 8], eax
jne 0x566283
mov eax, dword [ecx]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x5f2510]
mov ecx, dword [ebp - 0x2c]
call esi
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x5662a4
lock xadd dword [eax + 8], edi
dec edi
jne 0x5662a4
mov edx, dword [eax]
mov esi, dword [edx + 4]
mov ecx, esi
call dword [0x5f2510]
mov ecx, dword [ebp - 0x34]
call esi
mov al, byte [ebp - 0x5d]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0059860b
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret