5 : buf(v_buf), bitMode(v_bitMode)
7 if (!v_buf)
throw ExeException(
"Cannot make an Exe from NULL buffer");
27 return (addr >= mappedFrom && addr < mappedTo) ? true :
false;
40 if (va < mappedFrom)
return va;
54 if (inType == outType)
return inAddr;
61 inAddr = inAddr - imgBase;
77 return inAddr - imgBase;
80 return inAddr + imgBase;
100 offset =
VaToRva(offset,
false);
107 convertedOffset = this->
rvaToRaw(offset);
109 if (allowExceptions)
throw;
115 "Address out of bounds: offset = %llX addrType = %u",
116 static_cast<unsigned long long>(offset),
117 static_cast<unsigned int>(aT)
122 return convertedOffset;
128 if (this->
isValidAddr(offset, hintType) ==
false) {
130 }
else return hintType;
136 if (this->
isValidAddr(offset, hintType) ==
false) {
143 if (this->
isValidAddr(offset, hintType) ==
false) {
172 if (!view)
return false;
177 return dumpedSize ? true :
false;
const offset_t INVALID_ADDR
virtual bufsize_t getContentSize()=0
virtual BYTE * getContentAt(offset_t offset, bufsize_t size, bool allowExceptions=false)
static bufsize_t dump(const QString &fileName, AbstractByteBuffer &buf, bool allowExceptions=false)
bufsize_t getFileSize() const
virtual offset_t toRaw(offset_t offset, addr_type addrType, bool allowExceptions=false)
virtual bool isValidAddr(offset_t addr, addr_type addrType)
BYTE * getContentAt(offset_t offset, bufsize_t size, bool allowExceptions=false)
virtual offset_t getImageBase(bool recalculate=false)=0
Executable(AbstractByteBuffer *v_buf, exe_bits v_bitMode)
virtual offset_t getRawSize() const
virtual bufsize_t getMappedSize(Executable::addr_type aType)=0
virtual offset_t rawToRva(offset_t raw)=0
virtual offset_t rvaToRaw(offset_t rva)=0
virtual offset_t convertAddr(offset_t inAddr, Executable::addr_type inType, Executable::addr_type outType)
Executable::addr_type detectAddrType(offset_t addr, Executable::addr_type hintType)
virtual bool dumpFragment(offset_t offset, bufsize_t size, QString fileName)
virtual offset_t VaToRva(offset_t va, bool autodetect=false)
bool append(dbg_level lvl, const char *format,...)