//指针实现找出OEP如口点 PE文件
//PE 在debug版本下从地址0x00400000 往下找第4行 最后4位地址存放的数据就是偏移量 加上0x00400000
// 再往下数2行半 之后开始的4个字节存储的值就是OPE的入口点偏移值
//.exe文件用WinHex打开 地址是00000000开始 查找方式和debug版本下一样 看如下截图
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv[])
{
int nAddrPE=0x00400000;
//nAddrPE=nAddrPE + 0X30 + 0xc;
int *pPE=NULL;
pPE=(int *)(nAddrPE + 0X30 + 0xc);
int nAddrOEP=nAddrPE + *pPE;
int *pOEP=NULL;
pOEP=(int *)(nAddrOEP + 0X20 + 0x8);
printf("PE:%x , OEP:%x /r/n",*pPE + 0x00400000, *pOEP + 0x00400000);
system("pause");
return 0;
}