定位signature

LONG e_lfanew; 
LONG signature;
DWORD d;
CreateFile();
//跳过dos头部
SetFilePointer(hFile,0x3c,NULL,FILE_BEGIN);
ReadFile(hFile,&e_lfanew,4,&d,NULL);
//e_lfanew存放的偏移地址
SetFilePointer(hFile,o_lfanew,NULL,FILE_BEGIN);
ReadFile(hFile,&signature,4,&d,NULL);

printf("%04x \n",signature);

 

posted @ 2013-06-06 13:41  herizai  阅读(119)  评论(0编辑  收藏  举报