38 this->invalidEntries = 0;
55 if (
entry->isValid()) {
60 this->invalidEntries++;
88 this->invalidEntries = 0;
91 if (!reloc)
return false;
95 size_t maxSize = reloc->SizeOfBlock;
102 if (!
entry->getPtr()) {
106 if (
entry->isValid()) {
111 this->invalidEntries++;
115 if (!
entry->isEmpty()) {
120 this->invalidEntries++;
124 this->parsedSize +=
sizeof(pe::BASE_RELOCATION_ENTRY);
125 this->
entries.push_back(entry);
132 if (this->invalidEntries > 0)
return false;
134 if (!parentDir)
return false;
136 if (!m_PE)
return false;
140 if (!
isOk)
return false;
148 if (this->parentDir ==
NULL)
return NULL;
150 if (!reloc)
return NULL;
175 this->cachedRaw =
raw;
191 if (!ptr)
return NULL;
197 this->cachedRaw =
raw;
203 if (this->parentDir ==
NULL)
return 0;
205 if (!reloc)
return 0;
207 if (reloc->SizeOfBlock > 0)
return reloc->SizeOfBlock;
215 if (!reloc)
return NULL;
218 case PAGE_VA:
return (
void*) &reloc->VirtualAddress;
219 case BLOCK_SIZE :
return (
void*) &reloc->SizeOfBlock;
233 case PAGE_VA:
return "Page RVA";
271 if (this->cachedMaxNum > 0)
return this->cachedMaxNum;
274 if (!reloc)
return 0;
296 if (!
getPtr())
return false;
300 if (!
isOk)
return false;
311 if (!
getPtr())
return true;
315 if (!
isOk)
return true;
317 if (
val == 0)
return true;
328 if (this->parentDir ==
NULL)
return NULL;
342 if (this->parentDir ==
NULL)
return 0;
355 return entry->Offset;
361 case 0 :
return "Padding (skipped)";
362 case 1 :
return "High WORD of 32-bit field";
363 case 2 :
return "Low WORD of 32-bit field";
364 case 3 :
return "32 bit field";
365 case 4 :
return "HighAdj";
366 case 5 :
return "MIPS JumpAddr";
367 case 6 :
case 7 :
return "Reserved";
368 case 9 :
return "MIPS16 JumpAddr";
369 case 10 :
return "64 bit field";
INT_TYPE _getNumValue(void *ptr)
const offset_t INVALID_ADDR
bufsize_t getDirEntrySize(bool trimToExeSize=false)
offset_t getDirEntryAddress()
virtual bufsize_t getFieldSize(size_t fieldId, size_t subField=FIELD_NONE)
virtual offset_t getFieldOffset(size_t fieldId, size_t subField=FIELD_NONE)
virtual offset_t getOffset()
virtual uint64_t getNumValue(size_t fieldId, size_t subField, bool *isOk)
virtual ExeNodeWrapper * getEntryAt(size_t fieldId)
std::vector< ExeNodeWrapper * > entries
BYTE * getContentAt(offset_t offset, bufsize_t size, bool allowExceptions=false)
virtual offset_t getRawSize() const
virtual bufsize_t getImageSize()
virtual QString getFieldName(size_t fieldId)
virtual WrappedValue::data_type containsDataType(size_t fieldId, size_t subField)
virtual void * getFieldPtr(size_t fieldId, size_t subField=FIELD_NONE)
virtual QString getName()
virtual bufsize_t getSize()
size_t maxEntriesNumInBlock()
virtual Executable::addr_type containsAddrType(size_t fieldId, size_t subField)
IMAGE_BASE_RELOCATION * myReloc()
friend class RelocBlockWrapper
IMAGE_BASE_RELOCATION * reloc()
offset_t deltaToRVA(WORD delta)
static QString translateType(WORD type)
virtual bufsize_t getSize()
static WORD getDelta(WORD relocEntryVal)
static WORD getType(WORD relocEntryVal)