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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x568608
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x5d4050]
xor eax, esp
mov dword [esp + 0x48], eax
push ebx
push esi
push edi
mov eax, dword [0x5d4050]
xor eax, esp
push eax
lea eax, [esp + 0x60]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x54], 0xf
mov dword [esp + 0x50], 0
mov byte [esp + 0x40], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], 0
mov byte [esp + 0x28], 0
mov byte [esp + 0x68], 1
mov eax, dword [ebx + 0x28]
mov ecx, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x14], 0
mov eax, dword [eax + 0x320]
mov dword [esp + 0x1c], eax
test eax, eax
je 0x407095
mov edi, dword [ebx + 0x28]
call ecx
imul ecx, dword [edi + 0x42c], 0x3e8
sub eax, dword [ebx + 8]
cmp eax, ecx
jae 0x40708f
mov esi, dword [edi + 0x31c]
mov esi, dword [esi]
cmp esi, dword [edi + 0x31c]
je 0x407076
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebx + 0x28]
sub eax, dword [ebx + 8]
imul ecx, dword [ecx + 0x42c], 0x3e8
cmp eax, ecx
jae 0x407076
lea eax, [esi + 0x10]
lea ecx, [esp + 0x40]
cmp ecx, eax
je 0x406ef8
push 0xffffffffffffffff
push 0
push eax
call fcn.00402ac0
lea eax, [esi + 0x28]
lea ecx, [esp + 0x28]
cmp ecx, eax
je 0x406f10
push 0xffffffffffffffff
push 0
push eax
call fcn.00402ac0
lea ecx, [ecx]
cmp dword [esp + 0x3c], 0x10
lea edx, [esp + 0x28]
cmovae edx, dword [esp + 0x28]
sub esp, 0x18
mov edi, esp
mov dword [esp + 0x38], esp
mov dword [edi + 0x14], 0xf
mov dword [edi + 0x10], 0
mov byte [edi], 0
cmp byte [edx], 0
jne 0x406f41
xor eax, eax
jmp 0x406f53
mov eax, edx
lea ebx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406f46
sub eax, ebx
mov ebx, dword [esp + 0x30]
push eax
push edx
mov ecx, edi
call fcn.00402bf0
mov byte [esp + 0x80], 2
lea edx, [esp + 0x58]
cmp dword [esp + 0x6c], 0x10
cmovae edx, dword [esp + 0x58]
sub esp, 0x18
mov edi, esp
mov dword [edi + 0x14], 0xf
mov dword [edi + 0x10], 0
mov byte [edi], 0
cmp byte [edx], 0
jne 0x406f91
xor ecx, ecx
jmp 0x406fa3
mov ecx, edx
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406f96
sub ecx, ebx
mov ebx, dword [esp + 0x48]
push ecx
push edx
mov ecx, edi
call fcn.00402bf0
mov byte [esp + 0x98], 1
call fcn.00407130
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebx + 0x28]
sub eax, dword [ebx + 8]
imul ecx, dword [ecx + 0x42c], 0x3e8
cmp eax, ecx
jae 0x406fe8
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
test edi, edi
je 0x406f10
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebx + 0x28]
sub eax, dword [ebx + 8]
imul ecx, dword [ecx + 0x42c], 0x3e8
cmp eax, ecx
jae 0x40701d
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x406fe8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [esi + 0xd], 0
jne 0x407067
mov eax, dword [esi + 8]
cmp byte [eax + 0xd], 0
jne 0x40704c
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0xd], 0
jne 0x407067
lea ecx, [ecx]
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0xd], 0
je 0x407040
jmp 0x407067
mov eax, dword [esi + 4]
cmp byte [eax + 0xd], 0
jne 0x407065
cmp esi, dword [eax + 8]
jne 0x407065
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x407055
mov esi, eax
mov eax, dword [ebx + 0x28]
cmp esi, dword [eax + 0x31c]
jne 0x406ec5
mov esi, dword [esp + 0x14]
mov ecx, dword [sym.imp.KERNEL32.dll_GetTickCount]
inc esi
mov dword [esp + 0x14], esi
cmp esi, dword [esp + 0x1c]
jb 0x406e97
mov ecx, dword [sym.imp.KERNEL32.dll_GetTickCount]
or edi, 0xffffffff
mov esi, dword [ebx + 0x28]
call ecx
imul ecx, dword [esi + 0x42c], 0x3e8
sub eax, dword [ebx + 8]
cmp eax, ecx
jae 0x4070cb
push 0x3e8
push dword [esi + 0x534]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
test edi, edi
jne 0x407098
cmp edi, 0xffffffff
setne bl
cmp dword [esp + 0x3c], 0x10
jb 0x4070e4
push dword [esp + 0x28]
call fcn.00421c08
add esp, 4
cmp dword [esp + 0x54], 0x10
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], 0
mov byte [esp + 0x28], 0
jb 0x40710c
push dword [esp + 0x40]
call fcn.00421c08
add esp, 4
mov al, bl
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.00549fe1
mov esp, ebp
pop ebp
ret