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

Disassembly:
sub esp, 0x2c
mov eax, dword [esp + 0x30]
push ebx
mov ebx, dword [esp + 0x38]
cmp ebx, 0xffffffff
push esi
mov esi, dword [esp + 0x48]
mov dword [esp + 8], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], esi
je 0x3013fb94
test ebx, ebx
je 0x3013fb94
call dword [sym.imp.kernel32.dll_GetTickCount]
mov dword [esp + 0x38], eax
xor ecx, ecx
test esi, esi
setne cl
push 0
push 0
lea edx, [esp + 0x18]
push edx
inc ecx
mov esi, ecx
push esi
mov dword [esp + 0x1c], esi
call dword [sym.imp.kernel32.dll_WaitForMultipleObjects]
cmp eax, esi
jb 0x3013fd60
mov ecx, dword [esp + 0x40]
xor eax, eax
test ecx, ecx
setne al
push ebp
mov ebp, dword [esp + 0x48]
push edi
lea eax, [eax*8 + 0x40]
mov dword [esp + 0x50], eax
jmp 0x3013fbe0
mov ebx, dword [esp + 0x44]
lea esp, [esp]
cmp ebx, 0xa
jbe 0x3013fbea
mov ebx, 0xa
mov ecx, dword [esp + 0x50]
push ecx
push ebx
push 0
lea edx, [esp + 0x24]
push edx
push esi
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
mov edi, eax
cmp edi, esi
je 0x3013fc1e
cmp edi, 0x102
jne 0x3013fcea
mov esi, dword [esp + 0x44]
cmp ebx, esi
je 0x3013fcea
jmp 0x3013fc22
mov esi, dword [esp + 0x44]
mov ebx, dword [esp + 0x48]
test ebx, ebx
mov edi, dword [sym.imp.USER32.dll_PeekMessageA]
je 0x3013fc5b
push 1
push ebp
push ebp
push ebx
lea eax, [esp + 0x30]
push eax
call edi
test eax, eax
je 0x3013fc5b
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
push ebp
push ebp
push ebx
lea edx, [esp + 0x30]
push edx
call edi
test eax, eax
jne 0x3013fc40
push 0
push 0
push 0
push 0
lea eax, [esp + 0x30]
push eax
call edi
cmp esi, 0xffffffff
je 0x3013fc99
test esi, esi
je 0x3013fc99
call dword [sym.imp.kernel32.dll_GetTickCount]
mov edi, dword [esp + 0x40]
mov ecx, eax
sub ecx, edi
cmp ecx, esi
jbe 0x3013fc8f
mov dword [esp + 0x44], 0
jmp 0x3013fc95
sub esi, ecx
mov dword [esp + 0x44], esi
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x3013fccc
mov edi, dword [sym.imp.kernel32.dll_GetCurrentThread]
call edi
push eax
call dword [sym.imp.kernel32.dll_GetThreadPriority]
cmp eax, 2
mov dword [esp + 0x4c], eax
jae 0x3013fcc4
push 2
call edi
push eax
call dword [sym.imp.kernel32.dll_SetThreadPriority]
mov dword [esp + 0x10], 1
mov esi, dword [esp + 0x14]
push 0
push 0
lea ecx, [esp + 0x20]
push ecx
push esi
call dword [sym.imp.kernel32.dll_WaitForMultipleObjects]
mov edi, eax
cmp edi, esi
jae 0x3013fbd8
mov eax, dword [esp + 0x10]
test eax, eax
je 0x3013fd5c
mov edx, dword [esp + 0x4c]
push edx
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 0x3013fd5c
mov eax, dword [0x302a8b5c]
test eax, eax
jne 0x3013fd30
push str.AMUnblock
call dword [sym.imp.USER32.dll_RegisterWindowMessageA]
test eax, eax
mov dword [0x302a8b5c], eax
je 0x3013fd4a
push 1
push eax
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
mov eax, dword [0x302a8b5c]
jne 0x3013fd30
push 0
push 0
push eax
call dword [sym.imp.kernel32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_PostThreadMessageA]
mov eax, edi
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x2c
ret 0x14