Function at 0x451179
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
mov eax, dword [ebp + 0xc]
sub esp, 0x28
push esi
push edi
mov edi, ecx
cmp eax, 0x111
ja 0x45139d
je 0x451139
add eax, 0xfffffffb
cmp eax, 0x7f
ja case.default.0x45114d
movzx eax, byte [eax + 0x451764]
jmp dword [eax*4 + 0x451744]
mov ecx, dword [edi + 0x2a3d8]
test ecx, ecx
je case.default.0x45114d
cmp dword [edi + 0x2a38c], 0
jne case.default.0x45114d
cmp dword [edi + 0x2a384], 0
je case.default.0x45114d
mov eax, dword [ecx]
push 0
push 0
push 0
push 0
push ecx
call dword [eax + 0x3c]
jmp case.default.0x45114d
mov eax, dword [ebp + 0x14]
mov dword [eax + 0x18], 0x64
mov dword [eax + 0x1c], 0x64
jmp case.default.0x45114d
mov eax, dword [ebp + 0x10]
cmp eax, 4
je 0x451049
cmp eax, 1
je 0x451049
mov ecx, 1
mov dword [edi + 0x2a388], ecx
jmp 0x4513cb
xor ecx, ecx
mov dword [edi + 0x2a388], ecx
jmp 0x4513cb
cmp dword [edi + 0x2a388], 0
je case.default.0x45114d
cmp dword [edi + 0x2a38c], 0
je case.default.0x45114d
cmp dword [edi + 0x2a384], 0
jne case.default.0x45114d
push 0
call dword [sym.imp.USER32.dll_SetCursor]
cmp dword [edi + 0x2a5a0], 0
je 0x45109c
mov eax, dword [edi + 0x2a3d8]
push 1
push eax
mov ecx, dword [eax]
call dword [ecx + 0x30]
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
cmp dword [edi + 0x2a384], 0
mov esi, dword [ebp + 0x14]
je 0x4510e3
push 0
push dword [ebp + 8]
mov eax, esi
shr eax, 0x10
push eax
movzx eax, si
push eax
push 0x40
push 0
push 0x8e
push 0
call dword [sym.imp.USER32.dll_LoadMenuA]
push eax
call dword [sym.imp.USER32.dll_GetSubMenu]
push eax
call dword [sym.imp.USER32.dll_TrackPopupMenuEx]
mov eax, dword [ebp + 0x10]
push esi
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_DefWindowProcA]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
cmp dword [edi + 0x2a384], 0
je 0x45109c
jmp case.default.0x45114d
call fcn.004531a0
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call dword [sym.imp.USER32.dll_DestroyMenu]
push esi
call dword [sym.imp.USER32.dll_DestroyWindow]
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp + 0x10]
movzx eax, ax
add eax, 0xffff63be
cmp eax, 4
ja case.default.0x45114d
jmp dword [eax*4 + 0x4517e4]
mov edx, dword [edi + 0x2a390]
xor eax, eax
test edx, edx
sete al
xor ecx, ecx
test edx, edx
mov dword [edi + 0x2a390], eax
setne cl
inc ecx
call fcn.00459410
jmp case.default.0x45114d
cmp dword [edi + 0x2a390], 0
jne 0x451246
cmp dword [0x5aa968], 0
jne 0x4511c3
lea eax, [esp + 0x10]
mov dword [0x5aa968], 1
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov dword [0x5aa978], eax
test eax, eax
je 0x451215
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov dword [0x5aa940], ecx
mov dword [0x5aa944], edx
jmp 0x4511c8
mov eax, dword [0x5aa978]
test eax, eax
je 0x451215
mov esi, dword [0x5aa958]
mov eax, esi
or eax, dword [0x5aa95c]
jne 0x4511ed
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov esi, dword [0x5aa958]
push 0
push 0xa
push dword [0x5aa944]
push dword [0x5aa940]
call fcn.00553e60
add esi, eax
mov dword [0x5aa958], esi
adc dword [0x5aa95c], edx
jmp 0x45130b
movsd xmm0, qword [0x5aa980]
ucomisd xmm0, qword [0x581228]
lahf
test ah, 0x44
jp 0x451239
call dword [sym.imp.WINMM.dll_timeGetTime]
movsd xmm0, qword [0x5aa980]
addsd xmm0, qword [0x581358]
jmp 0x451303
cmp dword [0x5aa968], 0
jne 0x451283
lea eax, [esp + 0x10]
mov dword [0x5aa968], 1
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov dword [0x5aa978], eax
test eax, eax
je 0x4512cb
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov dword [0x5aa940], ecx
mov dword [0x5aa944], edx
jmp 0x451288
mov eax, dword [0x5aa978]
test eax, eax
je 0x4512cb
mov ecx, dword [0x5aa958]
mov eax, ecx
mov edx, dword [0x5aa95c]
or eax, edx
jne 0x4512b1
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov dword [0x5aa958], ecx
mov dword [0x5aa95c], edx
mov dword [0x5aa970], ecx
mov dword [0x5aa974], edx
jmp 0x45130b
movsd xmm0, qword [0x5aa980]
ucomisd xmm0, qword [0x581228]
lahf
test ah, 0x44
jp 0x451303
call dword [sym.imp.WINMM.dll_timeGetTime]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x581790]
mulsd xmm0, qword [0x581300]
movsd qword [0x5aa980], xmm0
mov dword [edi + 0x2a390], 0
mov dword [edi + 0x2a394], 1
jmp case.default.0x45114d
cmp dword [edi + 0x2a388], 0
je 0x45137a
cmp dword [edi + 0x2a38c], 0
je 0x45137a
mov eax, dword [edi]
push 1
call dword [eax + 0x34]
mov ecx, edi
call fcn.00452050
test eax, eax
js 0x45137a
mov eax, dword [edi]
mov ecx, edi
push 0
call dword [eax + 0x34]
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
cmp dword [edi + 0x2a388], 0
je 0x45137a
cmp dword [edi + 0x2a38c], 0
je 0x45137a
call fcn.00451da0
test eax, eax
js 0x451627
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
push 0
push 0
push 0x10
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SendMessageA]
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
cmp eax, 0x212
ja 0x451464
je 0x45145b
sub eax, 0x112
je 0x45141d
sub eax, 0xee
je 0x4513e4
sub eax, 0x11
jne case.default.0x45114d
mov eax, dword [edi]
push 1
call dword [eax + 0x34]
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 0x14]
push esi
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_DefWindowProcA]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
cmp dword [edi + 0x2a388], 0
je case.default.0x45114d
cmp dword [edi + 0x2a38c], 0
je case.default.0x45114d
cmp dword [edi + 0x2a3d8], 0
je case.default.0x45114d
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
lea eax, [esp + 0x10]
push eax
push dword [edi + 0x2a3cc]
call dword [sym.imp.USER32.dll_ScreenToClient]
jmp case.default.0x45114d
mov eax, dword [ebp + 0x10]
cmp eax, 0xf030
ja 0x45143a
je 0x451449
mov ecx, eax
sub ecx, 0xf000
je 0x451449
sub ecx, 0x10
je 0x451449
jmp 0x4513cb
mov ecx, eax
sub ecx, 0xf100
je 0x451449
sub ecx, 0x70
jne 0x4513cb
cmp dword [edi + 0x2a384], 0
je 0x45109c
jmp 0x4513cb
mov eax, dword [edi]
push 0
jmp 0x4513c5
sub eax, 0x218
je 0x451728
sub eax, 0x19
je 0x45164e
sub eax, 1
jne case.default.0x45114d
cmp dword [edi + 0x2a390], eax
je 0x45156a
cmp dword [0x5aa968], eax
jne 0x4514c9
lea eax, [esp + 0x10]
mov dword [0x5aa968], 1
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov dword [0x5aa978], eax
test eax, eax
je 0x45151a
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov dword [0x5aa940], ecx
mov dword [0x5aa944], edx
jmp 0x4514ce
mov eax, dword [0x5aa978]
test eax, eax
je 0x45151a
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov esi, dword [esp + 0x10]
xorps xmm0, xmm0
mov edx, dword [esp + 0x14]
mov ecx, esi
sub ecx, dword [0x5aa958]
mov eax, edx
mov dword [0x5aa970], esi
sbb eax, dword [0x5aa95c]
add dword [0x5aa950], ecx
movlpd qword [0x5aa958], xmm0
adc dword [0x5aa954], eax
mov dword [0x5aa974], edx
jmp 0x45156a
call dword [sym.imp.WINMM.dll_timeGetTime]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x581790]
mulsd xmm1, qword [0x581300]
movaps xmm0, xmm1
movsd qword [0x5aa948], xmm1
subsd xmm0, qword [0x5aa980]
addsd xmm0, qword [0x5aa960]
movsd qword [0x5aa960], xmm0
xorps xmm0, xmm0
movsd qword [0x5aa980], xmm0
cmp dword [edi + 0x2a388], 0
je case.default.0x45114d
cmp dword [edi + 0x2a384], 0
je case.default.0x45114d
movups xmm0, xmmword [edi + 0x2a4e8]
lea eax, [edi + 0x2a4d8]
lea esi, [edi + 0x2a4e8]
push eax
push dword [edi + 0x2a3cc]
movaps xmmword [esp + 0x28], xmm0
movaps xmmword [esp + 0x18], xmm0
call dword [sym.imp.USER32.dll_GetWindowRect]
push esi
push dword [edi + 0x2a3cc]
call dword [sym.imp.USER32.dll_GetClientRect]
movaps xmm1, xmmword [esp + 0x20]
mov edx, dword [edi + 0x2a4f0]
movaps xmm0, xmm1
sub edx, dword [esi]
psrldq xmm0, 8
movd ecx, xmm0
movd eax, xmm1
sub ecx, eax
cmp ecx, edx
jne 0x4515fa
mov ecx, dword [esp + 0x1c]
mov eax, dword [edi + 0x2a4f4]
sub ecx, dword [esp + 0x14]
sub eax, dword [edi + 0x2a4ec]
cmp ecx, eax
je case.default.0x45114d
mov eax, dword [edi + 0x2a4f4]
mov ecx, edi
sub eax, dword [edi + 0x2a4ec]
mov dword [edi + 0x2a38c], 0
mov dword [edi + 0x2a398], edx
mov dword [edi + 0x2a39c], eax
call fcn.00451b30
test eax, eax
jns 0x45163f
push 1
push 0x8200000c
mov ecx, edi
call fcn.00453200
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0x10
mov dword [edi + 0x2a38c], 1
jmp case.default.0x45114d
cmp dword [edi + 0x2a390], 0
je case.default.0x45114d
cmp dword [0x5aa968], 0
jne 0x451698
lea eax, [esp + 0x10]
mov dword [0x5aa968], 1
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov dword [0x5aa978], eax
test eax, eax
je 0x4516e3
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov dword [0x5aa940], ecx
mov dword [0x5aa944], edx
jmp 0x45169d
mov eax, dword [0x5aa978]
test eax, eax
je 0x4516e3
mov ecx, dword [0x5aa958]
mov eax, ecx
mov edx, dword [0x5aa95c]
or eax, edx
jne 0x4516c6
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov dword [0x5aa958], ecx
mov dword [0x5aa95c], edx
mov dword [0x5aa970], ecx
mov dword [0x5aa974], edx
jmp case.default.0x45114d
movsd xmm0, qword [0x5aa980]
ucomisd xmm0, qword [0x581228]
lahf
test ah, 0x44
jp 0x45171b
call dword [sym.imp.WINMM.dll_timeGetTime]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x581790]
mulsd xmm0, qword [0x581300]
movsd qword [0x5aa980], xmm0
jmp case.default.0x45114d
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x45109c
cmp eax, 7
je 0x45109c
jmp 0x4513cb