PIMAGE_SECTION_HEADER GetLastSectionInfo(void * pBase)
{
IMAGE_DOS_HEADER * dos_head;
PIMAGE_SECTION_HEADER section_header;
IMAGE_NT_HEADERS32 * pPeHeader;
PIMAGE_SECTION_HEADER pLastSectionInfo;
dos_head = ( IMAGE_DOS_HEADER *)pBase ;
pPeHeader = ( IMAGE_NT_HEADERS32 *)((char *)dos_head + dos_head->e_lfanew);//得到PE文件头的位置
section_header = ( PIMAGE_SECTION_HEADER)((char *)pPeHeader + sizeof( DWORD)
+ sizeof(IMAGE_FILE_HEADER )
+ pPeHeader->FileHeader.SizeOfOptionalHeader);
//m_pLastSectionInfo指向节表最后一节的信息
pLastSectionInfo = §ion_header[pPeHeader->FileHeader.NumberOfSections - 1];
return pLastSectionInfo;
}