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

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov esi, ecx
push 1
xor edi, edi
pop ebp
mov ebx, dword [esi + 8]
mov dword [esi + 0x10], edi
mov dword [esi + 0x68], ebp
mov dword [esi + 0x70], ebp
cmp dword [esi + 0x18], edi
mov dword [esp + 0x14], edi
je 0x4089b4
cmp dword [ebx + 0x14], edi
mov dword [esp + 0x10], ebp
jne 0x4089b8
mov dword [esp + 0x10], edi
cmp dword [esi + 0x74], edi
mov dword [esi + 0x18], edi
je 0x4089ca
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x14], eax
or dword [esi + 0x2c], 0xffffffff
cmp dword [ebx + 0x18], edi
jne 0x4089fa
mov ecx, esi
mov dword [esi + 0x40], ebp
call fcn.004087ec
test eax, eax
je 0x4089ed
mov dword [esi + 0x68], 0x132
jmp 0x408b5f
cmp dword [esi + 0xc], edi
je 0x4089fa
mov dword [esi + 0x68], edi
jmp 0x408b5f
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [ebx + 0x20]
mov dword [esp + 0x18], eax
jne 0x408a17
mov eax, dword [ebx + 0x24]
mov dword [esi + 0x1c], eax
inc dword [ebx + 0x24]
mov dword [esi + 0xc], ebp
jmp 0x4089f2
cmp dword [0x41cbb8], edi
je 0x408a34
cmp dword [esp + 0x10], edi
je 0x408a34
cmp dword [esi + 0x14], edi
jne 0x408a34
cmp dword [esi + 0x74], edi
je 0x408a34
mov dword [esi + 0x28], ebp
jmp 0x408a3a
mov dword [esi + 0x28], edi
mov edi, dword [esi + 0x74]
mov eax, dword [esi + 0x14]
test eax, eax
je 0x408a46
mov dword [esi + 0x7c], eax
jmp 0x408a67
mov eax, dword [ebx + 0x20]
push 0
mov dword [esi + 0x24], eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
push edi
push dword [ebx + 0x18]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [esi + 0x7c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x6c], eax
mov eax, dword [esi + 0x7c]
cmp eax, 0xffffffff
je 0x408b25
xor ecx, ecx
cmp eax, ecx
je 0x408b3a
cmp eax, 0x80
je 0x408b37
cmp eax, 0x102
jne 0x408b2e
neg edi
sbb edi, edi
and edi, 3
add edi, 0x138
mov dword [esi + 0x68], edi
cmp dword [esi + 0x24], ecx
mov dword [esi + 0x78], ebp
mov eax, dword [ebx + 0x20]
jne 0x408ab8
cmp eax, ecx
je 0x408ab8
mov dword [esi + 0x24], eax
cmp dword [esi + 0x74], ecx
je 0x408aca
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x14]
mov dword [esi + 0x2c], eax
cmp dword [0x41cbb8], 0
je 0x408b5d
cmp dword [esp + 0x10], 0
je 0x408b6f
cmp dword [esi + 0x74], 0
je 0x408b5d
cmp dword [esi + 0x14], 0
jne 0x408b5d
mov ecx, esi
call fcn.00408b7a
mov edi, dword [esi + 0x74]
and dword [esi + 0x28], 0
cmp edi, 0xffffffff
je 0x408b12
mov eax, dword [esi + 0x2c]
cmp eax, edi
jae 0x408b5d
sub edi, eax
cmp edi, 0x309
jbe 0x408b1a
mov dword [esi + 0x28], ebp
mov edi, 0x309
mov dword [esi + 0x68], ebp
mov dword [esi + 0x70], ebp
jmp 0x408a3a
mov dword [esi + 0x68], 0x12d
jmp 0x408b5d
mov dword [esi + 0x68], 0x13c
jmp 0x408b5d
mov dword [esi + 0x10], ebp
mov eax, dword [esp + 0x18]
mov dword [ebx + 0x24], ebp
mov dword [ebx + 0x20], eax
cmp dword [esi + 0x74], ecx
mov dword [esi + 0xc], ebp
je 0x408b59
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x14]
mov dword [esi + 0x2c], eax
and dword [esi + 0x68], 0
xor edi, edi
cmp dword [esp + 0x10], edi
je 0x408b6f
mov ecx, esi
call fcn.00408b7a
mov dword [esi + 0x18], ebp
mov eax, dword [esi + 0x68]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret