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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x64625d
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x6a6040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov dword [eax], 0
or eax, 0xffffffff
test ecx, ecx
je 0x5e8d79
lock xadd dword [ecx], eax
dec eax
jne 0x5e8d79
push ecx
call fcn.005a47b0
mov ecx, dword [esi + 0x71]
cmp ecx, 0xffffffff
jne 0x5e8fba
mov ebx, dword [ebp + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
and ebx, 0x7fffffff
mov dword [ebp + 0xc], ebx
call edi
mov dword [ebp - 0x14], eax
mov byte [ebp - 0xd], 1
call edi
sub eax, dword [ebp - 0x14]
cmp eax, ebx
jbe 0x5e8db3
cmp byte [ebp - 0xd], 0
je 0x5e8e67
mov byte [ebp - 0xd], 0
call edi
mov ecx, dword [ebp - 0x14]
add ecx, ebx
sub ecx, eax
mov eax, 0
cmovns eax, ecx
mov ecx, esi
push eax
call fcn.005e1130
mov dword [ebp - 4], 0xffffffff
mov edi, dword [0x6b0dcc]
push 0xffffffffffffffff
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x80
jne 0x5e8df7
mov dword [edi + 8], 0
jmp 0x5e8dfb
test eax, eax
jne 0x5e8e04
inc dword [edi + 0xc]
inc dword [edi + 8]
inc dword [edi + 4]
mov ebx, dword [esi + 0x32]
test ebx, 0x1000
jne 0x5e8eb5
mov eax, ebx
and al, 0x5c
cmp al, 4
je 0x5e8eb5
mov eax, ebx
and eax, 0x58
test bl, 4
jne 0x5e8e80
cmp dword [esi + 0x3e], 0
jne 0x5e8e35
cmp dword [esi + 0x42], 0
je 0x5e8e80
test eax, eax
jne 0x5e8e80
cmp byte [esi + 0x10], al
je 0x5e8e47
push dword [esi + 0x11]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [0x6b0dcc]
call fcn.005e0810
mov ebx, dword [ebp + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
jmp 0x5e8da0
mov eax, 0xffffff9c
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push dword [ebp + 0x10]
mov ecx, esi
mov dword [esi + 0x71], 0xffffff9c
call fcn.005e9860
mov ecx, dword [0x6b0dcc]
call fcn.005e0810
mov eax, 0xfffffff6
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [esi + 0x36], 0
lea edi, [esi + 0x36]
jne 0x5e8ec5
add dword [0x6b0e34], 3
mov eax, ebx
and eax, 3
cmp al, 3
mov eax, ebx
jne 0x5e8ed7
and eax, 0xfffffefe
jmp 0x5e8edc
and eax, 0xffffeefe
mov dword [esi + 0x32], eax
test eax, eax
jne 0x5e8ef4
cmp byte [esi + 0x10], al
je 0x5e8ef4
push dword [esi + 0x11]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea edi, [esi + 0x36]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [0x6b0dcc]
call fcn.005e0810
mov edi, dword [edi]
xor eax, eax
test edi, edi
cmovs edi, eax
mov eax, dword [esi + 0x6d]
test eax, eax
je 0x5e8f1e
mov eax, dword [eax + 0xc]
mov dword [ebp + 0xc], eax
jmp 0x5e8f25
mov dword [ebp + 0xc], 0x651f68
call fcn.005a45d0
mov dword [ebp + 0x10], eax
mov dword [ebp - 4], 2
test eax, eax
je 0x5e8f57
push 0
push edi
push dword [ebp + 0xc]
mov ecx, eax
call fcn.005a57f0
test eax, eax
je 0x5e8f59
cmp dword [eax + 0xc], 0
jne 0x5e8f59
push ecx
mov ecx, eax
call fcn.005a47b0
xor eax, eax
mov edx, dword [ebp + 8]
or edi, 0xffffffff
mov ecx, dword [edx]
cmp ecx, eax
je 0x5e8f77
mov dword [edx], eax
test ecx, ecx
je 0x5e8f8c
mov eax, edi
lock xadd dword [ecx], eax
dec eax
jne 0x5e8f8c
push ecx
jmp 0x5e8f87
test eax, eax
je 0x5e8f8c
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
jne 0x5e8f8c
push ecx
mov ecx, eax
call fcn.005a47b0
mov eax, dword [esi + 0x36]
test ebx, 0x100
mov dword [esi + 0x36], 0
mov dword [esi + 0x71], 0xffffff9c
cmovne eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
xor eax, eax
cmp ecx, 0xffffff9c
sete al
lea eax, [eax*8 - 0xa]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc