3#define DEFAULT_IMGBASE 0x10000
23 if (!
dos)
throw ExeException(
"Could not wrap PECore: invalid DOS Header!");
25 offset =
dos->e_lfanew +
sizeof(
DWORD);
46 throw ExeException(
"Could not wrap PECore: invalid OptionalHeader");
102 return offset + size;
109 return opt32->SectionAlignment;
113 return opt64->SectionAlignment;
122 imgSize =
opt32->SizeOfImage;
125 imgSize =
opt64->SizeOfImage;
134 hdrsSize =
opt32->SizeOfHeaders;
137 hdrsSize =
opt64->SizeOfHeaders;
146 imgBase =
opt32->ImageBase;
149 imgBase =
opt64->ImageBase;
INT_TYPE _getNumValue(void *ptr)
const offset_t INVALID_ADDR
virtual BYTE * getContentAt(offset_t offset, bufsize_t size, bool allowExceptions=false)
virtual bufsize_t getAlignment(Executable::addr_type aType) const
bufsize_t hdrsSize() const
offset_t peOptHdrOffset() const
IMAGE_OPTIONAL_HEADER32 * opt32
bool wrap(AbstractByteBuffer *v_buf)
virtual offset_t getImageBase(bool recalculate=false)
offset_t peFileHdrOffset() const
virtual bufsize_t getImageSize()
offset_t peSignatureOffset() const
bufsize_t peNtHeadersSize() const
offset_t secHdrsOffset() const
IMAGE_OPTIONAL_HEADER64 * opt64
Executable::exe_bits getHdrBitMode() const