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;
99 offset =
VaToRva(offset,
false);
104 convertedOffset = this->
rvaToRaw(offset);
106 if (allowExceptions)
throw e;
112 "Address out of bounds: offset = %llX addrType = %u",
113 static_cast<unsigned long long>(offset),
114 static_cast<unsigned int>(aT)
119 return convertedOffset;
125 if (this->
isValidAddr(offset, hintType) ==
false) {
127 }
else return hintType;
133 if (this->
isValidAddr(offset, hintType) ==
false) {
140 if (this->
isValidAddr(offset, hintType) ==
false) {
169 if (!view)
return false;
174 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)
Executable(AbstractByteBuffer *v_buf, exe_bits v_bitMode)
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 getImageBase()=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,...)