BearParser
Portable Executable parsing library (from PE-bear)
Loading...
Searching...
No Matches
ExeNodeWrapper Class Referenceabstract

#include <ExeNodeWrapper.h>

Collaboration diagram for ExeNodeWrapper:

Public Member Functions

 ExeNodeWrapper (Executable *pe, ExeNodeWrapper *parent=NULL)
 
 ExeNodeWrapper (Executable *pe, ExeNodeWrapper *parent, size_t entryNumber)
 
virtual ~ExeNodeWrapper ()
 
virtual bool wrap ()
 
virtual void reloadMapping ()
 
virtual ExeNodeWrappergetEntryAt (size_t fieldId)
 
virtual size_t getEntriesCount ()
 
virtual size_t getEntriesNum ()
 
virtual size_t getSubFieldsCount ()
 
virtual ExeNodeWrappergetParentNode ()
 
size_t getEntryId ()
 
virtual void * getSubfieldPtr (size_t fieldId, size_t subField)
 
virtual bufsize_t getSubfieldSize (size_t fieldId, size_t subField)
 
virtual QString getSubfieldName (size_t fieldId, size_t subField)
 
virtual QString getFieldName (size_t fieldId)=0
 
virtual bool canAddEntry ()
 
virtual ExeNodeWrapperaddEntry (ExeNodeWrapper *entry)
 
ExeNodeWrappergetLastEntry ()
 
virtual offset_t getNextEntryOffset ()
 
virtual bufsize_t geEntrySize ()
 
virtual bool isValid ()
 
- Public Member Functions inherited from ExeElementWrapper
 ExeElementWrapper (Executable *exe)
 
virtual ~ExeElementWrapper ()
 
virtual bufsize_t getContentSize ()
 
virtual BYTE * getContent ()
 
virtual void * getPtr ()=0
 
virtual bufsize_t getSize ()=0
 
virtual QString getName ()=0
 
virtual size_t getFieldsCount ()=0
 
virtual offset_t getOffset ()
 
virtual offset_t getOffset (void *ptr, bool allowExceptions=false)
 
virtual void * getFieldPtr (size_t fieldId, size_t subField)=0
 
void * getFieldPtr (size_t fieldId)
 
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 QString translateFieldContent (size_t fieldId)
 
virtual bool hasSubfieldWrapper (size_t parentType)
 
virtual WrappedValue getWrappedValue (size_t fieldId, size_t subField)
 
virtual WrappedValue getWrappedValue (size_t fieldId)
 
virtual Executable::addr_type containsAddrType (size_t fieldId, size_t subField=FIELD_NONE)
 
virtual WrappedValue::data_type containsDataType (size_t fieldId, size_t subField=FIELD_NONE)
 
virtual uint64_t getNumValue (size_t fieldId, size_t subField, bool *isOk)
 
uint64_t getNumValue (size_t fieldId, bool *isOk)
 
virtual bool setNumValue (size_t fieldId, size_t subField, uint64_t val)
 
bool setNumValue (size_t fieldId, uint64_t val)
 
ExecutablegetExe ()
 
bool isBit64 ()
 
bool isBit32 ()
 
- Public Member Functions inherited from AbstractByteBuffer
 AbstractByteBuffer ()
 
virtual ~AbstractByteBuffer ()
 
virtual bool isTruncated ()
 
virtual bool isResized ()
 
BYTE operator[] (size_t idx)
 
virtual BYTE * getContentAt (offset_t offset, bufsize_t size, bool allowExceptions=false)
 
virtual BYTE * getContentAtPtr (BYTE *ptr, bufsize_t size, bool allowExceptions=false)
 
virtual bool setBufferedValue (BYTE *dstPtr, BYTE *srcPtr, bufsize_t srcSize, bufsize_t paddingSize, bool allowExceptions=false)
 
bool setStringValue (offset_t rawOffset, QString newText)
 
QString getStringValue (offset_t rawOffset, bufsize_t len=BUFSIZE_MAX, bool acceptNonTerminated=false)
 
QString getWStringValue (offset_t rawOffset, bufsize_t len)
 
QString getWAsciiStringValue (offset_t rawOffset, bufsize_t len, bool acceptNonTerminated=false)
 
bufsize_t getMaxSizeFromOffset (offset_t startOffset)
 
bufsize_t getMaxSizeFromPtr (BYTE *ptr)
 
bool isAreaEmpty (offset_t rawOffset, bufsize_t size)
 
bool fillContent (BYTE filling)
 
bool pasteBuffer (offset_t rawOffset, AbstractByteBuffer *buf, bool allowTrunc)
 
bool containsBlock (offset_t rawOffset, bufsize_t size)
 
bool intersectsBlock (offset_t rawOffset, bufsize_t size)
 
uint64_t getNumValue (offset_t offset, bufsize_t size, bool *isOk)
 
bool setNumValue (offset_t offset, bufsize_t size, uint64_t newVal)
 
bool setTextValue (char *textPtr, std::string newText, size_t fieldLimitLen=0)
 
virtual bool resize (bufsize_t newSize)
 
offset_t substFragmentByFile (offset_t offset, bufsize_t contentSize, QFile &fIn)
 

Protected Member Functions

size_t getEntriesCount (std::vector< ExeNodeWrapper * > &_entries)
 
ExeNodeWrappergetEntryAt (std::vector< ExeNodeWrapper * > &_entries, size_t fieldId)
 
virtual void clear ()
 
virtual void addMapping (ExeNodeWrapper *entry)
 
virtual bool loadNextEntry (size_t entryNum)
 
virtual ExeNodeWrapperaddEntryAt (ExeNodeWrapper *entry, offset_t nextOffset)
 
virtual bool isMyEntryType (ExeNodeWrapper *entry)
 
- Protected Member Functions inherited from ExeElementWrapper
virtual bool canCopyToOffset (offset_t rawOffset)
 
bool copyToOffset (offset_t rawOffset)
 

Protected Attributes

ExeNodeWrapperparentNode
 
size_t entryNum
 
std::vector< ExeNodeWrapper * > entries
 
- Protected Attributes inherited from ExeElementWrapper
Executablem_Exe
 

Additional Inherited Members

- Static Public Member Functions inherited from AbstractByteBuffer
static bool isValid (AbstractByteBuffer *buf)
 

Detailed Description

Definition at line 8 of file ExeNodeWrapper.h.

Constructor & Destructor Documentation

◆ ExeNodeWrapper() [1/2]

ExeNodeWrapper::ExeNodeWrapper ( Executable * pe,
ExeNodeWrapper * parent = NULL )

Definition at line 3 of file ExeNodeWrapper.cpp.

Here is the call graph for this function:

◆ ExeNodeWrapper() [2/2]

ExeNodeWrapper::ExeNodeWrapper ( Executable * pe,
ExeNodeWrapper * parent,
size_t entryNumber )

Definition at line 9 of file ExeNodeWrapper.cpp.

Here is the call graph for this function:

◆ ~ExeNodeWrapper()

virtual ExeNodeWrapper::~ExeNodeWrapper ( )
inlinevirtual

Definition at line 14 of file ExeNodeWrapper.h.

Here is the call graph for this function:

Member Function Documentation

◆ addEntry()

ExeNodeWrapper * ExeNodeWrapper::addEntry ( ExeNodeWrapper * entry)
virtual

Reimplemented in SectHdrsWrapper.

Definition at line 140 of file ExeNodeWrapper.cpp.

Here is the call graph for this function:

◆ addEntryAt()

ExeNodeWrapper * ExeNodeWrapper::addEntryAt ( ExeNodeWrapper * entry,
offset_t nextOffset )
protectedvirtual

Definition at line 114 of file ExeNodeWrapper.cpp.

Here is the call graph for this function:

◆ addMapping()

virtual void ExeNodeWrapper::addMapping ( ExeNodeWrapper * entry)
inlineprotectedvirtual

Reimplemented in ImportBaseDirWrapper, and ImportBaseEntryWrapper.

Definition at line 47 of file ExeNodeWrapper.h.

◆ canAddEntry()

bool ExeNodeWrapper::canAddEntry ( )
virtual

Reimplemented in SectHdrsWrapper.

Definition at line 63 of file ExeNodeWrapper.cpp.

Here is the call graph for this function:

◆ clear()

void ExeNodeWrapper::clear ( )
protectedvirtual

Reimplemented in ExportDirWrapper, LdConfigDirWrapper, and ResourceEntryWrapper.

Definition at line 30 of file ExeNodeWrapper.cpp.

Here is the call graph for this function:

◆ geEntrySize()

bufsize_t ExeNodeWrapper::geEntrySize ( )
virtual

Reimplemented in ImportEntryWrapper.

Definition at line 105 of file ExeNodeWrapper.cpp.

Here is the call graph for this function:

◆ getEntriesCount() [1/2]

virtual size_t ExeNodeWrapper::getEntriesCount ( )
inlinevirtual

Definition at line 20 of file ExeNodeWrapper.h.

Here is the call graph for this function:

◆ getEntriesCount() [2/2]

size_t ExeNodeWrapper::getEntriesCount ( std::vector< ExeNodeWrapper * > & _entries)
protected

Definition at line 25 of file ExeNodeWrapper.cpp.

◆ getEntriesNum()

virtual size_t ExeNodeWrapper::getEntriesNum ( )
inlinevirtual

Definition at line 21 of file ExeNodeWrapper.h.

Here is the call graph for this function:

◆ getEntryAt() [1/2]

ExeNodeWrapper * ExeNodeWrapper::getEntryAt ( size_t fieldId)
virtual

Definition at line 15 of file ExeNodeWrapper.cpp.

Here is the call graph for this function:

◆ getEntryAt() [2/2]

ExeNodeWrapper * ExeNodeWrapper::getEntryAt ( std::vector< ExeNodeWrapper * > & _entries,
size_t fieldId )
protected

Definition at line 20 of file ExeNodeWrapper.cpp.

◆ getEntryId()

size_t ExeNodeWrapper::getEntryId ( )
inline

Definition at line 25 of file ExeNodeWrapper.h.

◆ getFieldName()

◆ getLastEntry()

ExeNodeWrapper * ExeNodeWrapper::getLastEntry ( )

Definition at line 86 of file ExeNodeWrapper.cpp.

Here is the call graph for this function:

◆ getNextEntryOffset()

offset_t ExeNodeWrapper::getNextEntryOffset ( )
virtual

Reimplemented in ImportEntryWrapper.

Definition at line 92 of file ExeNodeWrapper.cpp.

Here is the call graph for this function:

◆ getParentNode()

virtual ExeNodeWrapper * ExeNodeWrapper::getParentNode ( )
inlinevirtual

Reimplemented in PENodeWrapper.

Definition at line 24 of file ExeNodeWrapper.h.

◆ getSubfieldName()

QString ExeNodeWrapper::getSubfieldName ( size_t fieldId,
size_t subField )
virtual

Definition at line 55 of file ExeNodeWrapper.cpp.

Here is the call graph for this function:

◆ getSubfieldPtr()

void * ExeNodeWrapper::getSubfieldPtr ( size_t fieldId,
size_t subField )
virtual

Definition at line 39 of file ExeNodeWrapper.cpp.

Here is the call graph for this function:

◆ getSubFieldsCount()

◆ getSubfieldSize()

bufsize_t ExeNodeWrapper::getSubfieldSize ( size_t fieldId,
size_t subField )
virtual

Definition at line 47 of file ExeNodeWrapper.cpp.

Here is the call graph for this function:

◆ isMyEntryType()

bool ExeNodeWrapper::isMyEntryType ( ExeNodeWrapper * entry)
protectedvirtual

Definition at line 80 of file ExeNodeWrapper.cpp.

◆ isValid()

virtual bool ExeNodeWrapper::isValid ( )
inlinevirtual

◆ loadNextEntry()

virtual bool ExeNodeWrapper::loadNextEntry ( size_t entryNum)
inlineprotectedvirtual

◆ reloadMapping()

virtual void ExeNodeWrapper::reloadMapping ( )
inlinevirtual

Reimplemented in ImportBaseDirWrapper, and SectHdrsWrapper.

Definition at line 17 of file ExeNodeWrapper.h.

◆ wrap()

Member Data Documentation

◆ entries

std::vector<ExeNodeWrapper*> ExeNodeWrapper::entries
protected

Definition at line 56 of file ExeNodeWrapper.h.

◆ entryNum

size_t ExeNodeWrapper::entryNum
protected

Definition at line 54 of file ExeNodeWrapper.h.

◆ parentNode

ExeNodeWrapper* ExeNodeWrapper::parentNode
protected

Definition at line 53 of file ExeNodeWrapper.h.


The documentation for this class was generated from the following files: