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

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, dword [ecx]
push edi
mov eax, dword [esi]
mov ecx, dword [eax + 4]
and ecx, 0x30000
cmp ecx, 0x30000
jne 0x5ec9d1
mov edx, dword [eax + 0xa8]
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov ecx, esi
call fcn.005ecddc
mov ecx, esi
call fcn.005eff62
test eax, eax
jne 0x5ecc67
mov eax, dword [esi]
push 2
mov dword [eax + 0x98], 0
mov ecx, dword [esi]
add ecx, 0x9c
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [esi + 0x618], eax
mov edx, dword [esi]
push 3
add edx, 0x9c
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov edi, eax
mov eax, dword [esi + 0x37c]
cdq
mov ecx, 0x18
idiv ecx
shl edx, 4
cmp edi, 4
lea ebx, [edx + esi + 0x1e8]
jne 0x5eca81
mov edx, dword [esi]
push edi
add edx, 0x9c
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 0x14
call ebp
mov eax, dword [esi]
add eax, 0x9c
push 4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov edi, eax
cmp edi, 4
je 0x5eca56
mov ecx, dword [esi]
push edi
add ecx, 0x9c
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
cmp edi, 5
je 0x5ecc54
cmp edi, 3
jne 0x5eca16
xor edi, edi
push edi
call ebp
mov ecx, esi
call fcn.005ecc8e
cmp dword [esi + 0x368], edi
jne 0x5ecaba
mov edx, dword [esi]
cmp dword [edx + 0x84], edi
je 0x5ecaba
mov ecx, esi
call fcn.005f0170
mov dword [esi + 0x394], edi
cmp dword [ebx], edi
je 0x5ecb44
mov eax, dword [esi]
cmp dword [eax + 0x98], 2
jg 0x5ecadf
mov edx, ebx
mov ecx, esi
call fcn.005ee441
mov ecx, esi
call fcn.005eceb2
jmp 0x5ecaff
mov eax, dword [ebx + 0xc]
cmp eax, 2
je 0x5ecaf6
cmp eax, 1
je 0x5ecaf6
cmp eax, 6
je 0x5ecaf6
cmp eax, 5
jne 0x5ecaff
mov edx, ebx
mov ecx, esi
call fcn.005ee441
mov eax, dword [esi]
test dword [eax + 4], 0x40000
je 0x5ecb1e
mov eax, dword [eax + 0xb0]
cmp eax, edi
je 0x5ecb1e
call eax
test eax, eax
jne 0x5ecc54
lea eax, [esi + 0x37c]
mov dword [ebx], edi
push eax
mov dword [ebx + 4], edi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
lea ecx, [esi + 0x384]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov ecx, esi
call fcn.005ed427
mov edx, dword [esi]
add edx, 0x94
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
cmp dword [esi + 0x384], edi
jne 0x5ecbb4
mov eax, dword [esi]
cmp dword [eax + 0x84], edi
je 0x5ecc54
test dword [eax + 4], 0x800000
je 0x5ecc54
cmp dword [esi + 0x388], edi
jne 0x5ecbb4
mov eax, dword [eax + 0x5c]
cmp eax, edi
je 0x5ecc54
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
push eax
call dword [ecx + 0x24]
test byte [esp + 0x18], 4
je 0x5ecba9
mov eax, dword [esi]
push edi
push edi
push edi
mov eax, dword [eax + 0x5c]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x30]
test byte [esp + 0x18], 1
je 0x5ecc54
mov eax, dword [esi]
cmp dword [eax + 0x84], edi
je 0x5eca16
mov edx, dword [esi + 0x3a4]
mov ecx, dword [esi + 0x394]
sub ecx, edx
xor edi, edi
mov dword [esp + 0x10], ecx
mov edx, dword [eax + 0x94]
mov dword [esp + 0x14], edx
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
sub ecx, eax
cmp ecx, 1
jl 0x5ecc23
push 0
call ebp
push 2
call ebp
mov edx, dword [esi + 0x3a4]
mov eax, dword [esi + 0x394]
sub eax, edx
mov ecx, edi
inc edi
cmp ecx, 0x96
mov dword [esp + 0x10], eax
jg 0x5ecc23
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
sub eax, edx
cmp eax, 1
jge 0x5ecbef
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov eax, dword [esi]
sub ecx, edx
mov dword [eax + 0x98], ecx
mov eax, dword [esi]
mov ecx, dword [eax + 0x98]
test ecx, ecx
jge 0x5eca16
mov dword [eax + 0x98], 0
jmp 0x5eca16
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, esi
mov dword [esi + 0x61c], eax
call fcn.005effa2
mov ecx, esi
call fcn.005f0360
mov ecx, esi
call fcn.005ecddc
mov ecx, dword [esi]
add ecx, 0x9c
push 6
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret