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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x537910
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x57c54c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], edx
mov ebx, ecx
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x18], esi
sub eax, 0x113
je 0x46e8b9
sub eax, 0x6d6
je 0x46e78f
sub eax, 1
jne 0x46e892
test esi, esi
je 0x46e9b7
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
sub eax, 0x6a94b199
cmp dword [ebp + 0xc], eax
jne 0x46e9b7
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x46e782
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, dword [esi]
mov ecx, esi
push 1
call dword [edx]
jmp 0x46e9b7
lea edi, [ebx + 0x28]
mov dword [ebp - 0x2c], edi
push edi
mov dword [ebp - 0x28], 1
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 1
mov eax, dword [ebx + 0x20]
mov ecx, dword [ebx + 0x1c]
mov dword [ebp - 0x24], eax
sub eax, ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x20], eax
cmp eax, 4
jae 0x46e7d3
push edi
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x46e892
push dword [ebp - 0x10]
call fcn.004610c0
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 0x1c], al
mov eax, dword [ebp - 0x20]
push dword [ebp - 0x1c]
sar eax, 2
push eax
call fcn.0046ea60
mov eax, dword [ebx + 0x1c]
add esp, 0xc
mov eax, dword [eax]
mov esi, dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, esi
jb 0x46e845
mov eax, dword [ebx + 0x1c]
mov eax, dword [eax]
mov esi, dword [eax + 8]
mov edi, dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, esi
cmp eax, edi
ja 0x46e845
mov eax, dword [ebx + 0x1c]
mov eax, dword [eax]
mov edi, dword [eax + 4]
mov esi, dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0
lea ecx, [esi + edi]
sub ecx, eax
push ecx
push 0x64
push dword [ebx + 0xc]
call dword [sym.imp.USER32.dll_SetTimer]
jmp 0x46e87e
mov eax, dword [ebx + 0x1c]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
sub eax, 0x6a94b199
push eax
push 0x7ea
push dword [ebx + 0xc]
call dword [sym.imp.USER32.dll_PostMessageW]
mov edx, dword [ebx + 0x1c]
mov ecx, dword [ebx + 0x20]
lea eax, [edx + 4]
sub ecx, eax
push ecx
push eax
push edx
call fcn.00504000
add esp, 0xc
add dword [ebx + 0x20], 0xfffffffc
lea eax, [ebx + 0x28]
mov dword [ebp - 4], 0xffffffff
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [ebp - 0x18]
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 0x10]
push dword [ebx + 0x10]
call dword [sym.imp.USER32.dll_CallWindowProcW]
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 [ebp + 0xc], 0x64
jne 0x46e9ad
lea esi, [ebx + 0x28]
mov dword [ebp - 0x2c], esi
push esi
mov dword [ebp - 0x28], 1
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
mov ecx, dword [ebx + 0x20]
mov edi, ecx
mov eax, dword [ebx + 0x1c]
sub edi, eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], eax
cmp edi, 4
jae 0x46e8f9
push esi
jmp 0x46e9a0
push dword [ebp - 0x10]
call fcn.004610c0
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 0x10], al
push dword [ebp - 0x10]
sar edi, 2
push edi
call fcn.0046ea60
mov eax, dword [ebx + 0x1c]
add esp, 0xc
mov eax, dword [eax]
mov esi, dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, esi
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
jb 0x46e94e
mov eax, dword [ebx + 0x1c]
mov eax, dword [eax]
mov esi, dword [eax + 8]
mov edi, dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, esi
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
cmp eax, edi
jbe 0x46e983
mov eax, dword [ebx + 0x1c]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
sub eax, 0x6a94b199
push eax
push 0x7ea
push dword [ebx + 0xc]
call esi
mov edx, dword [ebx + 0x1c]
mov ecx, dword [ebx + 0x20]
lea eax, [edx + 4]
sub ecx, eax
push ecx
push eax
push edx
call fcn.00504000
add esp, 0xc
add dword [ebx + 0x20], 0xfffffffc
mov eax, dword [ebx + 0x20]
sub eax, dword [ebx + 0x1c]
cmp eax, 4
jb 0x46e99c
push 0
push 0
push 0x7e9
push dword [ebx + 0xc]
call esi
lea eax, [ebx + 0x28]
push eax
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebx]
mov ecx, ebx
push dword [ebp + 0xc]
call dword [eax + 8]
xor eax, eax
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