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");
101 return offset + size;
108 return opt32->SectionAlignment;
112 return opt64->SectionAlignment;
121 imgSize =
opt32->SizeOfImage;
124 imgSize =
opt64->SizeOfImage;
133 hdrsSize =
opt32->SizeOfHeaders;
136 hdrsSize =
opt64->SizeOfHeaders;
145 imgBase =
opt32->ImageBase;
148 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