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

Disassembly:
sub esp, 0x10
push esi
mov esi, ecx
cmp dword [esi + 0x2a384], 0
jne 0x452320
call fcn.00452000
test eax, eax
jns 0x452320
push 1
push 0x8200000c
mov ecx, esi
call fcn.004534c0
mov eax, 0x80004005
pop esi
add esp, 0x10
ret
push esi
push 0x452580
push dword [esi + 0x2a3cc]
push 0x90
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.USER32.dll_DialogBoxParamA]
cmp eax, 1
jne 0x452575
imul eax, dword [esi + 0x2a380], 0x438c
imul ecx, dword [eax + esi + 0x438c], 0xca8
add ecx, eax
mov eax, dword [ecx + esi + 0x10e4]
mov ecx, esi
mov dword [esi + 0x2a384], eax
mov eax, dword [esi]
call dword [eax + 0x1c]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x20]
mov eax, dword [esi + 0x2a3d8]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov ecx, esi
test eax, eax
je 0x45239e
push 1
push 0x8200000a
call fcn.004534c0
pop esi
add esp, 0x10
ret
call fcn.00451a40
test eax, eax
jns 0x4523b6
push 1
push eax
mov ecx, esi
call fcn.004534c0
pop esi
add esp, 0x10
ret
cmp dword [esi + 0x2a390], 0
jne 0x452575
cmp dword [0x5938c8], 0
mov dword [esi + 0x2a394], 1
jne 0x45240a
lea eax, [esp + 8]
mov dword [0x5938c8], 1
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov dword [0x5938d8], eax
test eax, eax
je 0x45245b
mov ecx, dword [esp + 8]
mov dword [0x5938a0], ecx
mov ecx, dword [esp + 0xc]
mov dword [0x5938a4], ecx
jmp 0x45240f
mov eax, dword [0x5938d8]
test eax, eax
je 0x45245b
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov esi, dword [esp + 8]
xorps xmm0, xmm0
mov edx, dword [esp + 0xc]
mov ecx, esi
sub ecx, dword [0x5938b8]
mov eax, edx
mov dword [0x5938d0], esi
sbb eax, dword [0x5938bc]
add dword [0x5938b0], ecx
movlpd qword [0x5938b8], xmm0
adc dword [0x5938b4], eax
mov dword [0x5938d4], edx
jmp 0x4524ab
call dword [sym.imp.WINMM.dll_timeGetTime]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x56af70]
mulsd xmm1, qword [0x56ab18]
movaps xmm0, xmm1
movsd qword [0x5938a8], xmm1
subsd xmm0, qword [0x5938e0]
addsd xmm0, qword [0x5938c0]
movsd qword [0x5938c0], xmm0
xorps xmm0, xmm0
movsd qword [0x5938e0], xmm0
cmp dword [0x5938c8], 0
jne 0x4524e8
lea eax, [esp + 8]
mov dword [0x5938c8], 1
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov dword [0x5938d8], eax
test eax, eax
je 0x452535
mov ecx, dword [esp + 8]
mov dword [0x5938a0], ecx
mov ecx, dword [esp + 0xc]
mov dword [0x5938a4], ecx
jmp 0x4524ed
mov eax, dword [0x5938d8]
test eax, eax
je 0x452535
mov ecx, dword [0x5938b8]
mov eax, ecx
mov edx, dword [0x5938bc]
or eax, edx
jne 0x452516
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov dword [0x5938b8], ecx
xor eax, eax
mov dword [0x5938bc], edx
mov dword [0x5938d0], ecx
mov dword [0x5938d4], edx
pop esi
add esp, 0x10
ret
movsd xmm0, qword [0x5938e0]
ucomisd xmm0, qword [0x56aa40]
lahf
test ah, 0x44
jp 0x45256d
call dword [sym.imp.WINMM.dll_timeGetTime]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x56af70]
mulsd xmm0, qword [0x56ab18]
movsd qword [0x5938e0], xmm0
xor eax, eax
pop esi
add esp, 0x10
ret