//定义虚拟机保护的宏
#define VMProtectBegin /
__asm _emit 0xEB /
__asm _emit 0x10 /
__asm _emit 0x56 /
__asm _emit 0x4D /
__asm _emit 0x50 /
__asm _emit 0x72 /
__asm _emit 0x6F /
__asm _emit 0x74 /
__asm _emit 0x65 /
__asm _emit 0x63 /
__asm _emit 0x74 /
__asm _emit 0x20 /
__asm _emit 0x62 /
__asm _emit 0x65 /
__asm _emit 0x67 /
__asm _emit 0x69 /
__asm _emit 0x6E /
__asm _emit 0x00
#define VMProtectEnd /
__asm _emit 0xEB /
__asm _emit 0x0E /
__asm _emit 0x56 /
__asm _emit 0x4D /
__asm _emit 0x50 /
__asm _emit 0x72 /
__asm _emit 0x6F /
__asm _emit 0x74 /
__asm _emit 0x65 /
__asm _emit 0x63 /
__asm _emit 0x74 /
__asm _emit 0x20 /
__asm _emit 0x65 /
__asm _emit 0x6E /
__asm _emit 0x64 /
__asm _emit 0x00

本文介绍了一种通过宏定义实现的虚拟机保护方法。通过特定的宏定义(VMProtectBegin和VMProtectEnd),可以在编译期间插入特定的指令来保护代码免受逆向工程攻击。这些宏使用了内联汇编指令进行定义。

114

被折叠的 条评论
为什么被折叠?



