The easy route beats the both of you.
PHP Code:VM_START
EnterCriticalSection(&m_CriticalSection);
m_pMemoryCheckList.push_back(new MemoryCheck((DWORD)GetProcAddress(hKernel32, "QueryPerformanceCounter"), true, "QueryPerformanceCounter")); //Underclocking
m_pMemoryCheckList.push_back(new MemoryCheck((DWORD)GetProcAddress(hKernel32, "GetTickCount"), true, "GetTickCount")); //Underclocking
m_pMemoryCheckList.push_back(new MemoryCheck((DWORD)GetProcAddress(GetModuleHandleA("winmm.dll"), "timeGetTime"), true, "timeGetTime")); //Underclocking
LeaveCriticalSection(&m_CriticalSection);
VM_END
PHP Code:/* Memory checks */
EnterCriticalSection(&m_CriticalSection);
for (std::list<class MemoryCheck *>::iterator pMemoryCheckListIt = m_pMemoryCheckList.begin(); pMemoryCheckListIt != m_pMemoryCheckList.end(); *pMemoryCheckListIt++) {
MemoryCheck *pMemoryCheck = (*pMemoryCheckListIt);
if (memcmp(pMemoryCheck->m_byChecksum, (void *)pMemoryCheck->m_dwAddress, pMemoryCheck->m_nSize) != 0) {
VM_START
hackDetected(HACK_CHECKSUM, (int)pMemoryCheck->m_dwAddress, 0, 0, pMemoryCheck->m_szFunctionName);
VM_END
}
}
LeaveCriticalSection(&m_CriticalSection);

