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

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor ebp, ebp
mov ebx, dword [esi + 8]
mov edi, 1
mov dword [esi + 0x10], ebp
mov dword [esi + 0x68], edi
mov dword [esi + 0x70], edi
mov eax, dword [esi + 0x18]
cmp eax, ebp
mov dword [esp + 0x14], ebp
je 0x40c6a2
mov eax, dword [ebx + 0x14]
mov dword [esp + 0x10], edi
cmp eax, ebp
jne 0x40c6a6
mov dword [esp + 0x10], ebp
mov eax, dword [esi + 0x74]
mov dword [esi + 0x18], ebp
cmp eax, ebp
je 0x40c6ba
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x14], eax
mov dword [esi + 0x2c], 0xffffffff
mov eax, dword [ebx + 0x18]
cmp eax, ebp
jne 0x40c6ef
mov ecx, esi
mov dword [esi + 0x40], edi
call fcn.0040c490
test eax, eax
je 0x40c6e2
mov dword [esi + 0x68], 0x132
jmp 0x40c880
cmp dword [esi + 0xc], ebp
je 0x40c6ef
mov dword [esi + 0x68], ebp
jmp 0x40c880
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [ebx + 0x20]
mov dword [esp + 0x18], eax
cmp eax, ecx
jne 0x40c718
mov eax, dword [ebx + 0x24]
mov dword [esi + 0x1c], eax
mov eax, dword [ebx + 0x24]
inc eax
mov dword [ebx + 0x24], eax
mov dword [esi + 0xc], edi
mov dword [esi + 0x68], ebp
jmp 0x40c880
cmp dword [0x44b40c], ebp
je 0x40c737
cmp dword [esp + 0x10], ebp
je 0x40c737
cmp dword [esi + 0x14], ebp
jne 0x40c737
cmp dword [esi + 0x74], ebp
je 0x40c737
mov dword [esi + 0x28], edi
xor edi, edi
jmp 0x40c73d
mov edi, dword [esi + 0x74]
mov dword [esi + 0x28], ebp
mov eax, dword [esi + 0x14]
cmp eax, ebp
je 0x40c749
mov dword [esi + 0x7c], eax
jmp 0x40c76a
mov ecx, dword [ebx + 0x20]
push ebp
mov dword [esi + 0x24], ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [ebx + 0x18]
push edi
push edx
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 0x40c838
cmp eax, ebp
je 0x40c854
cmp eax, 0x80
je 0x40c84a
cmp eax, 0x102
jne 0x40c841
neg edi
sbb edi, edi
and edi, 3
add edi, 0x138
mov dword [esi + 0x68], edi
mov ecx, dword [esi + 0x24]
mov dword [esi + 0x78], 1
mov eax, dword [ebx + 0x20]
cmp ecx, ebp
jne 0x40c7bf
cmp eax, ebp
je 0x40c7bf
mov dword [esi + 0x24], eax
cmp dword [esi + 0x74], ebp
je 0x40c7d1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x14]
mov dword [esi + 0x2c], eax
cmp dword [0x44b40c], ebp
je 0x40c87b
cmp dword [esp + 0x10], ebp
je 0x40c890
cmp dword [esi + 0x74], ebp
je 0x40c87b
cmp dword [esi + 0x14], ebp
jne 0x40c87b
mov ecx, esi
call fcn.0040c8a0
mov edi, dword [esi + 0x74]
mov dword [esi + 0x28], ebp
cmp edi, 0xffffffff
je 0x40c81c
mov eax, dword [esi + 0x2c]
cmp eax, edi
jae 0x40c87b
sub edi, eax
cmp edi, 0x309
jbe 0x40c828
mov dword [esi + 0x28], 1
mov edi, 0x309
mov eax, 1
mov dword [esi + 0x68], eax
mov dword [esi + 0x70], eax
jmp 0x40c73d
mov dword [esi + 0x68], 0x12d
jmp 0x40c87b
mov dword [esi + 0x68], 0x13c
jmp 0x40c87b
mov eax, 1
mov dword [esi + 0x10], eax
jmp 0x40c859
mov eax, 1
mov ecx, dword [esp + 0x18]
mov dword [ebx + 0x24], eax
mov dword [ebx + 0x20], ecx
mov dword [esi + 0xc], eax
cmp dword [esi + 0x74], ebp
je 0x40c878
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x14]
mov dword [esi + 0x2c], eax
mov dword [esi + 0x68], ebp
mov edi, 1
cmp dword [esp + 0x10], ebp
je 0x40c890
mov ecx, esi
call fcn.0040c8a0
mov dword [esi + 0x18], edi
mov eax, dword [esi + 0x68]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret