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

#include <RichHdrWrapper.h>

Collaboration diagram for RichHdrWrapper:

Public Types

enum  FieldID {
  NONE = -1 , DANS_ID = 0 , CPAD0 , CPAD1 ,
  CPAD2 , COMP_ID_1 , RICH_ID , CHECKSUM ,
  FIELD_COUNTER
}
 

Public Member Functions

 RichHdrWrapper (PEFile *pe)
 
size_t compIdCount ()
 
virtual bool wrap ()
 
virtual void * getPtr ()
 
virtual bufsize_t getSize ()
 
virtual QString getName ()
 
virtual size_t getFieldsCount ()
 
virtual void * getFieldPtr (size_t fieldId, size_t subField=FIELD_NONE)
 
virtual bufsize_t getFieldSize (size_t fieldId, size_t subField=FIELD_NONE)
 
virtual QString translateFieldContent (size_t fieldId)
 
virtual QString getFieldName (size_t fieldId)
 
virtual Executable::addr_type containsAddrType (uint32_t fieldId, uint32_t subField=FIELD_NONE)
 
pe::RICH_COMP_ID getCompId (size_t fieldId)
 
DWORD calcChecksum ()
 
- Public Member Functions inherited from PEElementWrapper
 PEElementWrapper (PEFile *pe)
 
virtual ~PEElementWrapper ()
 
PEFilegetPE ()
 
- Public Member Functions inherited from ExeElementWrapper
 ExeElementWrapper (Executable *exe)
 
virtual ~ExeElementWrapper ()
 
virtual bufsize_t getContentSize ()
 
virtual BYTE * getContent ()
 
virtual size_t getSubFieldsCount ()
 
virtual offset_t getOffset ()
 
virtual offset_t getOffset (void *ptr, bool allowExceptions=false)
 
void * getFieldPtr (size_t fieldId)
 
virtual offset_t getFieldOffset (size_t fieldId, size_t subField=FIELD_NONE)
 
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 Attributes

pe::RICH_SIGNATURE * richSign
 
pe::RICH_DANS_HEADER * dansHdr
 
size_t compIdCounter
 
- Protected Attributes inherited from PEElementWrapper
PEFilem_PE
 
- Protected Attributes inherited from ExeElementWrapper
Executablem_Exe
 

Additional Inherited Members

- Static Public Member Functions inherited from AbstractByteBuffer
static bool isValid (AbstractByteBuffer *buf)
 
- Protected Member Functions inherited from ExeElementWrapper
virtual bool canCopyToOffset (offset_t rawOffset)
 
bool copyToOffset (offset_t rawOffset)
 

Detailed Description

Definition at line 9 of file RichHdrWrapper.h.

Member Enumeration Documentation

◆ FieldID

Enumerator
NONE 
DANS_ID 
CPAD0 
CPAD1 
CPAD2 
COMP_ID_1 
RICH_ID 
CHECKSUM 
FIELD_COUNTER 

Definition at line 13 of file RichHdrWrapper.h.

Constructor & Destructor Documentation

◆ RichHdrWrapper()

RichHdrWrapper::RichHdrWrapper ( PEFile * pe)
inline

Definition at line 25 of file RichHdrWrapper.h.

Here is the call graph for this function:

Member Function Documentation

◆ calcChecksum()

DWORD RichHdrWrapper::calcChecksum ( )

Definition at line 158 of file RichHdrWrapper.cpp.

Here is the call graph for this function:

◆ compIdCount()

size_t RichHdrWrapper::compIdCount ( )

Definition at line 26 of file RichHdrWrapper.cpp.

◆ containsAddrType()

Executable::addr_type RichHdrWrapper::containsAddrType ( uint32_t fieldId,
uint32_t subField = FIELD_NONE )
virtual

Definition at line 186 of file RichHdrWrapper.cpp.

◆ getCompId()

pe::RICH_COMP_ID RichHdrWrapper::getCompId ( size_t fieldId)

Definition at line 129 of file RichHdrWrapper.cpp.

Here is the call graph for this function:

◆ getFieldName()

QString RichHdrWrapper::getFieldName ( size_t fieldId)
virtual

Implements ExeElementWrapper.

Definition at line 109 of file RichHdrWrapper.cpp.

◆ getFieldPtr()

void * RichHdrWrapper::getFieldPtr ( size_t fieldId,
size_t subField = FIELD_NONE )
virtual

Implements ExeElementWrapper.

Definition at line 57 of file RichHdrWrapper.cpp.

◆ getFieldsCount()

size_t RichHdrWrapper::getFieldsCount ( )
virtual

Implements ExeElementWrapper.

Definition at line 51 of file RichHdrWrapper.cpp.

Here is the call graph for this function:

◆ getFieldSize()

bufsize_t RichHdrWrapper::getFieldSize ( size_t fieldId,
size_t subField = FIELD_NONE )
virtual

Reimplemented from ExeElementWrapper.

Definition at line 83 of file RichHdrWrapper.cpp.

◆ getName()

virtual QString RichHdrWrapper::getName ( )
inlinevirtual

Implements ExeElementWrapper.

Definition at line 34 of file RichHdrWrapper.h.

◆ getPtr()

void * RichHdrWrapper::getPtr ( )
virtual

Implements ExeElementWrapper.

Definition at line 18 of file RichHdrWrapper.cpp.

Here is the call graph for this function:

◆ getSize()

bufsize_t RichHdrWrapper::getSize ( )
virtual

Implements ExeElementWrapper.

Definition at line 37 of file RichHdrWrapper.cpp.

Here is the call graph for this function:

◆ translateFieldContent()

QString RichHdrWrapper::translateFieldContent ( size_t fieldId)
virtual

Reimplemented from ExeElementWrapper.

Definition at line 191 of file RichHdrWrapper.cpp.

Here is the call graph for this function:

◆ wrap()

bool RichHdrWrapper::wrap ( )
virtual

Reimplemented from ExeElementWrapper.

Definition at line 6 of file RichHdrWrapper.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ compIdCounter

size_t RichHdrWrapper::compIdCounter
protected

Definition at line 51 of file RichHdrWrapper.h.

◆ dansHdr

pe::RICH_DANS_HEADER* RichHdrWrapper::dansHdr
protected

Definition at line 50 of file RichHdrWrapper.h.

◆ richSign

pe::RICH_SIGNATURE* RichHdrWrapper::richSign
protected

Definition at line 49 of file RichHdrWrapper.h.


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