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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42c2c8
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x444034]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x34], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x30], eax
test eax, eax
jne 0x40887f
mov dword [esi + 0x34], 0xf0000001
jmp 0x408b1b
mov ebx, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push eax
call ebx
cmp dword [ebp - 0x34], 0
jne 0x408895
mov dword [edi + 0x20], 0
lea ecx, [esi + 0x10]
call fcn.00402f10
cmp eax, 0x25
jae 0x4088ae
mov dword [esi + 0x34], 0xf0000005
jmp 0x408b1b
cmp dword [ebp + 0x10], 0
je 0x4088c8
lea ecx, [esi + 0x10]
call fcn.00402f10
mov edx, edi
mov ecx, dword [edx + 0x20]
add ecx, 0x24
cmp ecx, eax
ja 0x4088a2
push dword [esi + 0x2c]
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x20], 0
call fcn.00401100
push str._MUTEX
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], 0
call fcn.00401880
push dword [ebp - 0x20]
push 0
push 0x1f0001
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], 0xffffffff
call fcn.00401490
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
jne 0x408923
mov dword [esi + 0x34], 0xf0000002
jmp 0x408b1b
mov eax, dword [esi + 0x28]
xorps xmm0, xmm0
movq qword [ebp - 0x18], xmm0
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ecx, ecx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x24], ecx
push dword [ebp + 0x14]
mov ecx, dword [esi + 8]
lea eax, [ebp - 0x1c]
push 0
push eax
push 3
mov dword [ebp - 0x14], ecx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 2
jne 0x408ad9
push dword [ebp + 0x14]
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x1c]
push 0
push eax
push 3
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 2
jne 0x408aa0
lea ecx, [esi + 0x10]
call fcn.00402f30
cmp dword [ebp + 0x10], 0
je 0x408a4e
mov edx, dword [ebp - 0x28]
mov ecx, dword [edx + 0x20]
add ecx, 0x24
cmp ecx, eax
ja 0x408a57
push dword [ebp - 0x2c]
call ebx
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esi + 0x10]
call fcn.00402f30
mov edx, dword [ebp - 0x28]
mov ecx, dword [edx + 0x20]
add ecx, 0x24
cmp ecx, eax
jbe 0x4089d9
lea ecx, [esi + 0x10]
call fcn.00402f30
mov ecx, dword [ebp - 0x28]
sub eax, 0x24
mov dword [ecx + 0x20], eax
push 0x24
push dword [ebp - 0x28]
lea ecx, [esi + 0x10]
call fcn.00402e40
mov ecx, eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x24], ecx
mov eax, dword [eax + 0x20]
test eax, eax
je 0x408a09
push eax
push dword [ebp - 0x34]
lea ecx, [esi + 0x10]
call fcn.00402e40
mov ecx, dword [ebp - 0x24]
add ecx, eax
mov dword [ebp - 0x24], ecx
test ecx, ecx
jle 0x408a1b
mov eax, dword [esi + 4]
test eax, eax
je 0x408a1b
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
lea ecx, [esi + 0x10]
call fcn.00402f30
test eax, eax
jne 0x408a35
mov eax, dword [esi + 8]
test eax, eax
je 0x408a35
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push dword [ebp - 0x30]
call ebx
xor eax, eax
mov dword [esi + 0x34], 0
cmp dword [ebp - 0x24], eax
setg al
jmp 0x408b1d
cmp eax, 0x25
jae 0x4089a5
push dword [ebp - 0x30]
call ebx
mov eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x24], eax
cmp eax, 2
jle 0x408a75
xor ecx, ecx
push 5
mov dword [ebp - 0x24], ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x38]
cmp eax, dword [ebp + 0x14]
jbe 0x408942
mov dword [esi + 0x34], 0xf0000003
mov esi, dword [ebp - 0x2c]
push esi
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x408b1b
cmp eax, 1
jne 0x408aae
mov dword [esi + 0x34], 0xf0000002
jmp 0x408ac5
cmp eax, 0x102
jne 0x408abe
mov dword [esi + 0x34], 0xf0000003
jmp 0x408ac5
mov dword [esi + 0x34], 0xf0000001
mov edi, dword [ebp - 0x2c]
push edi
call ebx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x30]
call ebx
jmp 0x408b0b
cmp eax, 1
jne 0x408ae7
mov dword [esi + 0x34], 0xf0000002
jmp 0x408afe
cmp eax, 0x102
jne 0x408af7
mov dword [esi + 0x34], 0xf0000003
jmp 0x408afe
mov dword [esi + 0x34], 0xf0000001
mov edi, dword [ebp - 0x2c]
push edi
call ebx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esi + 0x34], 0xf0000003
je 0x408b1b
mov ecx, esi
call fcn.004084d0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041446e
mov esp, ebp
pop ebp
ret 0x10