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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
xor eax, eax
mov dword [ebp - 8], 0
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 4], 0
mov dword [ebp - 0x14], eax
push edi
mov edi, dword [ebp + 0x18]
mov dword [ebp - 0x10], edi
cmp esi, 0xffffffff
je 0x4c077d
test esi, esi
je 0x4c077d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 4], eax
xor ebx, ebx
lea eax, [ebp - 0x14]
test edi, edi
push 0
setne bl
push 0
inc ebx
mov ecx, ebx
mov dword [ebp + 8], ebx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov ecx, ebx
cmp eax, ecx
jb 0x4c091d
mov edi, dword [ebp + 0x14]
xor edx, edx
cmp dword [ebp + 0x10], edx
setne dl
lea edx, [edx*8 + 0x40]
mov dword [ebp + 0xc], edx
push edx
cmp esi, 0xa
mov eax, esi
mov ebx, 0xa
cmova eax, ebx
push eax
mov dword [ebp + 0x18], eax
lea eax, [ebp - 0x14]
push 0
push eax
push ecx
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
mov ebx, eax
cmp ebx, dword [ebp + 8]
je 0x4c07f3
cmp ebx, 0x102
jne 0x4c08ab
cmp dword [ebp + 0x18], esi
je 0x4c08ab
mov eax, dword [ebp + 0x10]
mov ebx, dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x4c082b
push 1
push edi
push edi
push eax
lea eax, [ebp - 0x30]
push eax
call ebx
test eax, eax
je 0x4c082b
nop
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
push edi
push edi
push dword [ebp + 0x10]
lea eax, [ebp - 0x30]
push eax
call ebx
test eax, eax
jne 0x4c0810
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x30]
push eax
call ebx
cmp esi, 0xffffffff
je 0x4c085a
test esi, esi
je 0x4c085a
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
sub ecx, dword [ebp - 4]
cmp ecx, esi
jbe 0x4c0855
xor esi, esi
jmp 0x4c0857
sub esi, ecx
mov dword [ebp - 4], eax
cmp dword [ebp - 8], 0
jne 0x4c0889
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentThread]
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [ebp - 0xc], eax
cmp eax, 2
jae 0x4c0882
push 2
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov dword [ebp - 8], 1
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x14]
push 0
push 0
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov ecx, dword [ebp + 8]
mov ebx, eax
mov edx, dword [ebp + 0xc]
cmp ebx, ecx
jae 0x4c07b8
cmp dword [ebp - 8], 0
je 0x4c091b
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push 8
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 8
je 0x4c091b
mov eax, dword [0x51e1fc]
test eax, eax
jne 0x4c08ee
push 0x4f3c0c
call dword [sym.imp.USER32.dll_RegisterWindowMessageA]
mov dword [0x51e1fc], eax
test eax, eax
je 0x4c0909
mov esi, dword [sym.imp.USER32.dll_PeekMessageA]
push 1
push eax
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x30]
push eax
call esi
test eax, eax
mov eax, dword [0x51e1fc]
jne 0x4c08f4
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_PostThreadMessageA]
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14