Here he create a pointer to the function:
Code:
BYTE* byte_pos = (BYTE*)::timeGetTime;
BYTE* byte_pos2 = (BYTE*)::GetTickCount;
Then he creates a pointer to the D3DDevice but he skips some bytes of the object (offset 0xA8)
Code:
int* ppp = (int*)(*(int*)m_pd3dDevice + 0xA8);// EndScene method offset A8)
BYTE* byte_pos3 = (BYTE*)(*ppp);
At the end you can see the if clause, which checks the instructions. Like the comment says it checks if the poiners point to a 0xE9 or 0xFF.
0xE9 and 0xFF are Opcode and stands for 'jmp' in asm! (

)
Code:
if (*byte_pos == 0xE9 || *byte_pos2 == 0xE9 || *byte_pos3 == 0xE9 || *byte_pos == 0xFF || *byte_pos2 == 0xFF ) // E9 / FF52 jmp instruction
{
//结束进程
ExitProcess(-1);
return;
}
However it seems like one or more of the functions/objects have changed since win7.
I tested the Timefunctions:
- timeGetTime => 0xFF
- GetTickCount => 0x51
It seems like timeGetTime has changed at win8+. The functions does a 'jmp', which is normal and no hack!
Just check them by yourself and take a look at the

!
Try to check the windows version first and then only check for the 'jmp' instruction if the function does normally not start with a 'jmp'.