由于时代的发展,现在的电脑游戏很多都是多人在线联网的游戏;个别用户可能会无视本软件禁止与多人联网游戏一同运行的使用协议,将本软件与网络游戏厂商开发的网络游戏一同使用,因部分网络游戏厂商开发准备不严谨并未装载校验系统运行频率的措施,所以个别人可能达到作弊目的,因此我们提供软件运行原理和如何屏蔽此类软件的方案!
//检查改变系统运行频率的函数如果返回结果为TRUE则频率已经被修改;
本函数为C语言Windows驱动代码,其适用Windows xp至Windows11的全部Windows系统;
BOOLEAN IsTimeFunctionHooked()
{
PUCHAR pfnKeQueryPerformanceCounter = (PUCHAR)GetNtosFunctionAddress(L"KeQueryPerformanceCounter");
PUCHAR pfnKeUpdateSystemTime = (PUCHAR)GetNtosFunctionAddress(L"KeUpdateSystemTime");
if(pfnKeQueryPerformanceCounter && MmIsAddressValid(pfnKeQueryPerformanceCounter))
{
#ifdef AMD64
if(*pfnKeQueryPerformanceCounter==0xFF && *(pfnKeQueryPerformanceCounter+1)==0x25)
{
return TRUE;
}
#else
if(*pfnKeQueryPerformanceCounter==0xE9)
{
return TRUE;
}
#endif
}
if(pfnKeUpdateSystemTime && MmIsAddressValid(pfnKeUpdateSystemTime))
{
#ifdef AMD64
if(*pfnKeUpdateSystemTime==0xFF && *(pfnKeUpdateSystemTime+1)==0x25)
{
return TRUE;
}
#else
if(*pfnKeUpdateSystemTime==0xE9)
{
return TRUE;
}
#endif
}
return FALSE;
}
本文网址:http://www.yxbsq.com/gongsixinwen/167.html