BearParser
Portable Executable parsing library (from PE-bear)
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
AbstractByteBuffer Class Referenceabstract

#include <AbstractByteBuffer.h>

Public Member Functions

 AbstractByteBuffer ()
 
virtual ~AbstractByteBuffer ()
 
virtual bufsize_t getContentSize ()=0
 
virtual BYTE * getContent ()=0
 
virtual bool isTruncated ()
 
virtual bool isResized ()
 
BYTE operator[] (size_t idx)
 
virtual offset_t getOffset (void *ptr, bool allowExceptions=false)
 
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)
 
QString getWStringValue (offset_t rawOffset, bufsize_t len)
 
QString getWAsciiStringValue (offset_t rawOffset, bufsize_t len)
 
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)
 

Static Public Member Functions

static bool isValid (AbstractByteBuffer *buf)
 

Detailed Description

Definition at line 31 of file AbstractByteBuffer.h.

Constructor & Destructor Documentation

◆ AbstractByteBuffer()

AbstractByteBuffer::AbstractByteBuffer ( )
inline

Definition at line 36 of file AbstractByteBuffer.h.

◆ ~AbstractByteBuffer()

virtual AbstractByteBuffer::~AbstractByteBuffer ( )
inlinevirtual

Definition at line 37 of file AbstractByteBuffer.h.

Member Function Documentation

◆ containsBlock()

bool AbstractByteBuffer::containsBlock ( offset_t  rawOffset,
bufsize_t  size 
)

Definition at line 237 of file AbstractByteBuffer.cpp.

Here is the call graph for this function:

◆ fillContent()

bool AbstractByteBuffer::fillContent ( BYTE  filling)

Definition at line 199 of file AbstractByteBuffer.cpp.

Here is the call graph for this function:

◆ getContent()

virtual BYTE * AbstractByteBuffer::getContent ( )
pure virtual

◆ getContentAt()

BYTE * AbstractByteBuffer::getContentAt ( offset_t  offset,
bufsize_t  size,
bool  allowExceptions = false 
)
virtual

Reimplemented in Executable.

Definition at line 57 of file AbstractByteBuffer.cpp.

Here is the call graph for this function:

◆ getContentAtPtr()

BYTE * AbstractByteBuffer::getContentAtPtr ( BYTE *  ptr,
bufsize_t  size,
bool  allowExceptions = false 
)
virtual

Reimplemented in Executable.

Definition at line 99 of file AbstractByteBuffer.cpp.

Here is the call graph for this function:

◆ getContentSize()

virtual bufsize_t AbstractByteBuffer::getContentSize ( )
pure virtual

◆ getMaxSizeFromOffset()

bufsize_t AbstractByteBuffer::getMaxSizeFromOffset ( offset_t  startOffset)

Definition at line 87 of file AbstractByteBuffer.cpp.

Here is the call graph for this function:

◆ getMaxSizeFromPtr()

bufsize_t AbstractByteBuffer::getMaxSizeFromPtr ( BYTE *  ptr)
inline

Definition at line 58 of file AbstractByteBuffer.h.

Here is the call graph for this function:

◆ getNumValue()

uint64_t AbstractByteBuffer::getNumValue ( offset_t  offset,
bufsize_t  size,
bool *  isOk 
)

Definition at line 297 of file AbstractByteBuffer.cpp.

Here is the call graph for this function:

◆ getOffset()

offset_t AbstractByteBuffer::getOffset ( void *  ptr,
bool  allowExceptions = false 
)
virtual

Reimplemented in ExeElementWrapper.

Definition at line 35 of file AbstractByteBuffer.cpp.

Here is the call graph for this function:

◆ getStringValue()

QString AbstractByteBuffer::getStringValue ( offset_t  rawOffset,
bufsize_t  len = BUFSIZE_MAX 
)

Definition at line 150 of file AbstractByteBuffer.cpp.

Here is the call graph for this function:

◆ getWAsciiStringValue()

QString AbstractByteBuffer::getWAsciiStringValue ( offset_t  rawOffset,
bufsize_t  len 
)

Definition at line 174 of file AbstractByteBuffer.cpp.

Here is the call graph for this function:

◆ getWStringValue()

QString AbstractByteBuffer::getWStringValue ( offset_t  rawOffset,
bufsize_t  len 
)

Definition at line 162 of file AbstractByteBuffer.cpp.

Here is the call graph for this function:

◆ intersectsBlock()

bool AbstractByteBuffer::intersectsBlock ( offset_t  rawOffset,
bufsize_t  size 
)

Definition at line 257 of file AbstractByteBuffer.cpp.

Here is the call graph for this function:

◆ isAreaEmpty()

bool AbstractByteBuffer::isAreaEmpty ( offset_t  rawOffset,
bufsize_t  size 
)

Definition at line 188 of file AbstractByteBuffer.cpp.

Here is the call graph for this function:

◆ isResized()

virtual bool AbstractByteBuffer::isResized ( )
inlinevirtual

Reimplemented in ByteBuffer, Executable, and FileBuffer.

Definition at line 42 of file AbstractByteBuffer.h.

◆ isTruncated()

virtual bool AbstractByteBuffer::isTruncated ( )
inlinevirtual

Reimplemented in Executable, FileView, and FileBuffer.

Definition at line 41 of file AbstractByteBuffer.h.

◆ isValid()

bool AbstractByteBuffer::isValid ( AbstractByteBuffer buf)
static

Definition at line 16 of file AbstractByteBuffer.cpp.

Here is the call graph for this function:

◆ operator[]()

BYTE AbstractByteBuffer::operator[] ( size_t  idx)

Definition at line 26 of file AbstractByteBuffer.cpp.

Here is the call graph for this function:

◆ pasteBuffer()

bool AbstractByteBuffer::pasteBuffer ( offset_t  rawOffset,
AbstractByteBuffer buf,
bool  allowTrunc 
)

Definition at line 210 of file AbstractByteBuffer.cpp.

Here is the call graph for this function:

◆ resize()

virtual bool AbstractByteBuffer::resize ( bufsize_t  newSize)
inlinevirtual

Reimplemented in ByteBuffer, Executable, FileBuffer, and MappedExe.

Definition at line 72 of file AbstractByteBuffer.h.

◆ setBufferedValue()

bool AbstractByteBuffer::setBufferedValue ( BYTE *  dstPtr,
BYTE *  srcPtr,
bufsize_t  srcSize,
bufsize_t  paddingSize,
bool  allowExceptions = false 
)
virtual

Definition at line 107 of file AbstractByteBuffer.cpp.

Here is the call graph for this function:

◆ setNumValue()

bool AbstractByteBuffer::setNumValue ( offset_t  offset,
bufsize_t  size,
uint64_t  newVal 
)

Definition at line 327 of file AbstractByteBuffer.cpp.

Here is the call graph for this function:

◆ setStringValue()

bool AbstractByteBuffer::setStringValue ( offset_t  rawOffset,
QString  newText 
)

Definition at line 135 of file AbstractByteBuffer.cpp.

Here is the call graph for this function:

◆ setTextValue()

bool AbstractByteBuffer::setTextValue ( char *  textPtr,
std::string  newText,
size_t  fieldLimitLen = 0 
)

Definition at line 362 of file AbstractByteBuffer.cpp.

Here is the call graph for this function:

◆ substFragmentByFile()

offset_t AbstractByteBuffer::substFragmentByFile ( offset_t  offset,
bufsize_t  contentSize,
QFile &  fIn 
)

Definition at line 395 of file AbstractByteBuffer.cpp.

Here is the call graph for this function:

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