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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, 1
test eax, eax
je 0x4226ce
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0xec], 9
jne 0x422471
mov edx, dword [ebp + 8]
mov dword [edx + 0xec], 0
jmp 0x4226ce
push 1
push 0
push 0
push 0
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x4224b0
cmp dword [ebp - 0x30], 0x12
jne 0x4224a2
mov dword [ebp - 0xc], 0
push 0x466400
lea ecx, [ebp - 0xc]
push ecx
call fcn.004367dc
lea edx, [ebp - 0x34]
push edx
call fcn.004222c0
add esp, 4
jmp 0x422446
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xec]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
sub edx, 1
mov dword [ebp - 8], edx
cmp dword [ebp - 8], 7
ja case.0x4224d2.3
mov eax, dword [ebp - 8]
jmp dword [eax*4 + 0x4226d4]
mov ecx, 1
test ecx, ecx
je 0x422529
push 0
push 0
push 0
lea edx, [ebp - 0x34]
push edx
call dword [sym.imp.USER32.dll_GetMessageW]
cmp dword [ebp - 0x30], 0x12
jne 0x42250d
mov dword [ebp - 0x10], 0
push 0x466400
lea eax, [ebp - 0x10]
push eax
call fcn.004367dc
lea ecx, [ebp - 0x34]
push ecx
call fcn.004222c0
add esp, 4
mov edx, dword [ebp + 8]
cmp dword [edx + 0xec], 3
je 0x422527
jmp 0x422529
jmp case.0x4224d2.2
push 0x4ff
push 0x3e8
push 0
push 0
push 0
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
jmp 0x4226c9
cmp dword [0x4690b8], 0xffffffff
jne 0x422558
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 4], eax
jmp 0x422561
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
push eax
call fcn.00404350
add esp, 4
mov ecx, dword [ebp + 8]
mov dword [ecx + 0xec], eax
cmp dword [0x4690b8], 0xffffffff
jne 0x4225e6
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
push edx
call fcn.004043a0
add esp, 4
test eax, eax
je 0x4225b8
push 0x4ff
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xf8]
sub ecx, dword [ebp - 4]
push ecx
push 0
push 0
push 0
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
jmp 0x4225e1
mov edx, dword [0x46b194]
mov eax, dword [edx + 0x30c]
and eax, 2
je 0x4225e1
cmp dword [0x46b1a8], 0
je 0x4225e1
mov ecx, dword [0x46b1a8]
sub ecx, 1
mov dword [0x46b1a8], ecx
jmp 0x42268c
call dword [sym.imp.WINMM.dll_timeGetTime]
add eax, 5
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
push edx
call fcn.004043a0
add esp, 4
test eax, eax
je 0x422622
push 0x4ff
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xf8]
sub ecx, dword [ebp - 4]
push ecx
push 0
push 0
push 0
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
jmp 0x42268c
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [ebp - 4], eax
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
cmp eax, dword [edx + 0xf8]
jge 0x42264c
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [ebp - 4], eax
jmp 0x42262b
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 4]
mov dword [ecx + 0xfc], edx
mov eax, dword [ebp + 8]
mov dword [eax + 0xec], 0
mov ecx, dword [0x46b194]
mov edx, dword [ecx + 0x30c]
and edx, 2
je 0x42268c
cmp dword [0x46b1a8], 0
je 0x42268c
mov eax, dword [0x46b1a8]
sub eax, 1
mov dword [0x46b1a8], eax
jmp 0x4226c9
mov dword [ebp - 0x14], 0xa
push 0x466400
lea ecx, [ebp - 0x14]
push ecx
call fcn.004367dc
mov dword [ebp - 0x18], 0x2b
push 0x466400
lea edx, [ebp - 0x18]
push edx
call fcn.004367dc
mov eax, dword [ebp + 8]
mov dword [eax + 0xec], 3
jmp 0x4226c9
jmp 0x4226ce
jmp 0x422446
mov esp, ebp
pop ebp
ret