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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
call fcn.0040bc80
mov edi, eax
test edi, edi
mov dword [esp + 0x10], edi
je 0x40fa3a
push 0x469578
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
jne 0x40f68e
mov eax, dword [0x466b78]
push 0x10
push eax
jmp 0x40fa25
mov eax, dword [0x4664ec]
test eax, eax
jne 0x40f6a8
push 0x7f8a
push eax
call dword [sym.imp.USER32.dll_LoadCursorA]
mov dword [0x4664ec], eax
push eax
call dword [sym.imp.USER32.dll_SetCursor]
mov eax, dword [0x4506dc]
mov ecx, dword [0x4664ec]
mov edx, eax
and edx, 0x8000000f
mov dword [0x466ba8], ecx
jns 0x40f6cf
dec edx
or edx, 0xfffffff0
inc edx
sub eax, edx
push eax
call fcn.0041db4b
mov esi, eax
add esp, 4
test esi, esi
mov dword [esp + 0x14], esi
jne 0x40f6fb
call fcn.0040e3e0
mov eax, dword [0x466b78]
push 0x10
push eax
push str.ERR_MEM_ALLOC
jmp 0x40fa2a
mov eax, dword [0x4506dc]
mov ecx, eax
and ecx, 0x8000000f
jns 0x40f70f
dec ecx
or ecx, 0xfffffff0
inc ecx
sub eax, ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualLock]
mov dword [0x466bac], 0
call fcn.0040bab0
test eax, eax
mov dword [edi], eax
je 0x40f928
mov edx, dword [edi]
push edx
call fcn.0040bae0
add esp, 4
cmp eax, 1
jne 0x40f913
mov edx, dword [edi]
lea eax, [edi + 0x28]
push eax
lea ecx, [edi + 0x2d00]
push ecx
push edx
call fcn.0040c330
push edi
mov dword [edi + 4], 1
call fcn.0040c410
add esp, 0x10
test eax, eax
je 0x40f928
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x40f9c4
mov eax, dword [0x4506dc]
cdq
push edi
push edx
push eax
push esi
call fcn.0040d340
add esp, 0x10
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x40f9c4
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
sub edx, eax
mov eax, dword [esp + 0x1c]
sbb eax, ecx
mov ecx, dword [0x466bac]
shl ecx, 7
mov dword [ecx + 0x4695e8], edx
lea edx, [esp + 0x20]
push edx
mov dword [ecx + 0x4695ec], eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x40f9c4
mov eax, dword [0x4506dc]
cdq
push edi
push edx
push eax
push esi
call fcn.0040d790
add esp, 0x10
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x40f9c4
mov esi, dword [0x466bac]
fild dword [0x4506dc]
mov edx, dword [esp + 0x20]
fild qword [0x469578]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x24]
shl esi, 7
sub ecx, edx
mov edx, dword [esp + 0x1c]
sbb edx, eax
mov dword [esi + 0x4695f0], ecx
mov dword [esi + 0x4695f4], edx
mov eax, dword [edi]
mov dword [esi + 0x469580], eax
mov ecx, dword [esi + 0x4695e8]
mov eax, dword [esi + 0x4695ec]
mov dword [esp + 0x28], ecx
mov ecx, eax
and eax, 0x7fffffff
and ecx, 0x80000000
mov dword [esp + 0x2c], eax
fild qword [esp + 0x28]
xor edi, edi
mov dword [esp + 0x34], ecx
mov dword [esp + 0x30], edi
fild qword [esp + 0x30]
fchs
faddp st(1)
fdiv st(1)
fdivr st(2)
call fcn.0041e5d0
mov ebx, eax
mov eax, edx
mov edx, dword [esi + 0x4695f0]
mov dword [esp + 0xc], eax
mov eax, dword [esi + 0x4695f4]
mov ecx, eax
and eax, 0x7fffffff
and ecx, 0x80000000
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], eax
fild qword [esp + 0x38]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x40], edi
fild qword [esp + 0x40]
fchs
faddp st(1)
fdiv st(1)
fdivr st(2)
call fcn.0041e5d0
fstp st(0)
mov edi, dword [esp + 0x10]
fstp st(0)
add ebx, eax
mov eax, dword [esp + 0xc]
adc eax, edx
shrd ebx, eax, 1
shr eax, 1
mov dword [esi + 0x4695f8], ebx
mov dword [esi + 0x4695fc], eax
mov eax, dword [edi]
push eax
lea ecx, [esi + 0x469584]
push ecx
call fcn.0040c470
mov eax, dword [0x466bac]
mov ebx, dword [ebp + 8]
mov esi, dword [esp + 0x1c]
add esp, 8
inc eax
mov dword [0x466bac], eax
mov edx, dword [edi]
push edx
call fcn.0040bac0
add esp, 4
test eax, eax
mov dword [edi], eax
jne 0x40f732
push edi
call fcn.0040bd00
mov eax, dword [0x4506dc]
mov ecx, eax
add esp, 4
and ecx, 0x8000000f
jns 0x40f945
dec ecx
or ecx, 0xfffffff0
inc ecx
sub eax, ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualUnlock]
push esi
call fcn.0041d905
mov edx, dword [0x4506dc]
push ebx
mov dword [0x4506e0], edx
call fcn.0040f330
mov esi, dword [sym.imp.USER32.dll_GetDlgItem]
add esp, 8
push 1
push 0x13a7
push ebx
call esi
mov edi, dword [sym.imp.USER32.dll_EnableWindow]
push eax
call edi
push 1
push 8
push ebx
call esi
push eax
call edi
mov eax, dword [0x4664e8]
test eax, eax
jne 0x40f9a7
push 0x7f00
push eax
call dword [sym.imp.USER32.dll_LoadCursorA]
mov dword [0x4664e8], eax
push eax
call dword [sym.imp.USER32.dll_SetCursor]
mov dword [0x466ba8], 0
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call fcn.0040bd00
mov eax, dword [0x4506dc]
mov ecx, eax
add esp, 4
and ecx, 0x8000000f
jns 0x40f9e1
dec ecx
or ecx, 0xfffffff0
inc ecx
sub eax, ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualUnlock]
push esi
call fcn.0041d905
add esp, 4
call fcn.0040e3e0
mov esi, dword [sym.imp.USER32.dll_GetDlgItem]
push 1
push 0x13a7
push ebx
call esi
mov edi, dword [sym.imp.USER32.dll_EnableWindow]
push eax
call edi
push 1
push 8
push ebx
call esi
push eax
call edi
mov edx, dword [0x466b78]
push 0x10
push edx
push str.ERR_PERF_COUNTER
call fcn.00417ce0
add esp, 4
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret