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

#include <ResourceStringsWrapper.h>

Collaboration diagram for ResourceStringsWrapper:

Public Types

enum  ResourceFID { NONE = FIELD_NONE , STR_LEN , WSTRING , FIELD_COUNTER }
 

Public Member Functions

virtual QString getFieldName (size_t fieldId)
 
virtual void * getFieldPtr (size_t fieldId, size_t subField)
 
virtual bufsize_t getFieldSize (size_t fieldId, size_t subField=FIELD_NONE)
 
virtual size_t getFieldsCount ()
 
ResStringgetResStringAt (size_t index)
 
QString getQStringAt (size_t index)
 
size_t getResStringsCount ()
 
virtual WrappedValue::data_type containsDataType (size_t fieldId, size_t subField)
 
- Public Member Functions inherited from ResourceContentWrapper
virtual ~ResourceContentWrapper ()
 
void * getResContentPtr ()
 
bufsize_t getResContentSize ()
 
offset_t getContentRaw ()
 
pe::resource_type getType ()
 
virtual void * getPtr ()
 
virtual bufsize_t getSize ()
 
virtual QString getName ()
 
virtual size_t getSubFieldsCount ()
 
- Public Member Functions inherited from ExeNodeWrapper
 ExeNodeWrapper (Executable *pe, ExeNodeWrapper *parent=NULL)
 
 ExeNodeWrapper (Executable *pe, ExeNodeWrapper *parent, size_t entryNumber)
 
virtual ~ExeNodeWrapper ()
 
virtual void reloadMapping ()
 
virtual ExeNodeWrappergetEntryAt (size_t fieldId)
 
virtual size_t getEntriesCount ()
 
virtual size_t getEntriesNum ()
 
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 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 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 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 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

 ResourceStringsWrapper (Executable *pe, ResourceLeafWrapper *v_leaf)
 
bool wrap ()
 
- Protected Member Functions inherited from ResourceContentWrapper
 ResourceContentWrapper (Executable *pe, ResourceLeafWrapper *v_leaf, pe::resource_type v_typeId)
 
BYTE * getContentAt (offset_t dataAddr, Executable::addr_type aT, bufsize_t dataSize)
 
- Protected Member Functions inherited from ExeNodeWrapper
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

size_t parsedSize
 
- Protected Attributes inherited from ResourceContentWrapper
ResourceLeafWrappermyLeaf
 
pe::resource_type typeId
 
- Protected Attributes inherited from ExeNodeWrapper
ExeNodeWrapperparentNode
 
size_t entryNum
 
std::vector< ExeNodeWrapper * > entries
 
- Protected Attributes inherited from ExeElementWrapper
Executablem_Exe
 

Friends

class ResourceContentFactory
 
class ResourcesAlbum
 

Additional Inherited Members

- Static Public Member Functions inherited from ResourceContentWrapper
static QString translateType (pe::resource_type type)
 
- Static Public Member Functions inherited from AbstractByteBuffer
static bool isValid (AbstractByteBuffer *buf)
 

Detailed Description

Definition at line 55 of file ResourceStringsWrapper.h.

Member Enumeration Documentation

◆ ResourceFID

Enumerator
NONE 
STR_LEN 
WSTRING 
FIELD_COUNTER 

Definition at line 58 of file ResourceStringsWrapper.h.

Constructor & Destructor Documentation

◆ ResourceStringsWrapper()

ResourceStringsWrapper::ResourceStringsWrapper ( Executable * pe,
ResourceLeafWrapper * v_leaf )
inlineprotected

Definition at line 96 of file ResourceStringsWrapper.h.

Here is the call graph for this function:

Member Function Documentation

◆ containsDataType()

virtual WrappedValue::data_type ResourceStringsWrapper::containsDataType ( size_t fieldId,
size_t subField )
inlinevirtual

Reimplemented from ResourceContentWrapper.

Definition at line 87 of file ResourceStringsWrapper.h.

◆ getFieldName()

QString ResourceStringsWrapper::getFieldName ( size_t fieldId)
virtual

Reimplemented from ResourceContentWrapper.

Definition at line 101 of file ResourceStringsWrapper.cpp.

◆ getFieldPtr()

void * ResourceStringsWrapper::getFieldPtr ( size_t fieldId,
size_t subField )
virtual

Reimplemented from ResourceContentWrapper.

Definition at line 106 of file ResourceStringsWrapper.cpp.

◆ getFieldsCount()

virtual size_t ResourceStringsWrapper::getFieldsCount ( )
inlinevirtual

Reimplemented from ResourceContentWrapper.

Definition at line 70 of file ResourceStringsWrapper.h.

◆ getFieldSize()

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

Reimplemented from ExeElementWrapper.

Definition at line 112 of file ResourceStringsWrapper.cpp.

◆ getQStringAt()

QString ResourceStringsWrapper::getQStringAt ( size_t index)
inline

Definition at line 79 of file ResourceStringsWrapper.h.

Here is the call graph for this function:

◆ getResStringAt()

ResString * ResourceStringsWrapper::getResStringAt ( size_t index)
inline

Definition at line 72 of file ResourceStringsWrapper.h.

◆ getResStringsCount()

size_t ResourceStringsWrapper::getResStringsCount ( )
inline

Definition at line 85 of file ResourceStringsWrapper.h.

◆ wrap()

bool ResourceStringsWrapper::wrap ( )
protectedvirtual

Reimplemented from ExeNodeWrapper.

Definition at line 58 of file ResourceStringsWrapper.cpp.

Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ ResourceContentFactory

friend class ResourceContentFactory
friend

Definition at line 103 of file ResourceStringsWrapper.h.

◆ ResourcesAlbum

friend class ResourcesAlbum
friend

Definition at line 104 of file ResourceStringsWrapper.h.

Member Data Documentation

◆ parsedSize

size_t ResourceStringsWrapper::parsedSize
protected

Definition at line 101 of file ResourceStringsWrapper.h.


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