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

#include <MappedExe.h>

Collaboration diagram for MappedExe:

Public Member Functions

virtual bool canResize (bufsize_t newSize)
 
virtual bool resize (bufsize_t newSize)
 
virtual void wrap ()=0
 
- Public Member Functions inherited from Executable
bool isBit64 ()
 
bool isBit32 ()
 
virtual ~Executable (void)
 
virtual exe_bits getBitMode ()
 
virtual exe_arch getArch ()=0
 
virtual bufsize_t getContentSize ()
 
virtual BYTE * getContent ()
 
virtual offset_t getRawSize () const
 
BYTE * getContentAtPtr (BYTE *ptr, bufsize_t size, bool allowExceptions=false)
 
BYTE * getContentAt (offset_t offset, bufsize_t size, bool allowExceptions=false)
 
virtual BYTE * getContentAt (offset_t offset, Executable::addr_type aType, bufsize_t size, bool allowExceptions=false)
 
virtual bufsize_t getMappedSize (Executable::addr_type aType)=0
 
virtual bufsize_t getAlignment (Executable::addr_type aType) const =0
 
virtual offset_t getImageBase (bool recalculate=false)=0
 
virtual offset_t getEntryPoint (Executable::addr_type aType=Executable::RVA)=0
 
virtual bufsize_t getImageSize ()
 
virtual size_t getAllEntryPoints (QMap< offset_t, QString > &entrypoints, Executable::addr_type aType=Executable::RVA)
 
virtual bool isValidAddr (offset_t addr, addr_type addrType)
 
virtual bool isValidVA (offset_t va)
 
virtual offset_t convertAddr (offset_t inAddr, Executable::addr_type inType, Executable::addr_type outType)
 
virtual offset_t toRaw (offset_t offset, addr_type addrType, bool allowExceptions=false)
 
Executable::addr_type detectAddrType (offset_t addr, Executable::addr_type hintType)
 
virtual offset_t rawToRva (offset_t raw)=0
 
virtual offset_t rvaToRaw (offset_t rva)=0
 
virtual offset_t VaToRva (offset_t va, bool autodetect=false)
 
virtual offset_t rvaToVa (offset_t rva)
 
virtual offset_t vaToRaw (offset_t va)
 
QString getFileName ()
 
virtual bool isResized ()
 
virtual bool isTruncated ()
 
AbstractByteBuffergetFileBuffer () const
 
bufsize_t getFileSize () const
 
virtual bool dumpFragment (offset_t offset, bufsize_t size, QString fileName)
 
- Public Member Functions inherited from AbstractByteBuffer
 AbstractByteBuffer ()
 
virtual ~AbstractByteBuffer ()
 
BYTE operator[] (size_t idx)
 
virtual offset_t getOffset (void *ptr, 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)
 
offset_t substFragmentByFile (offset_t offset, bufsize_t contentSize, QFile &fIn)
 
- Public Member Functions inherited from ExeWrappersContainer
 ExeWrappersContainer ()
 
virtual ~ExeWrappersContainer (void)
 
virtual ExeElementWrappergetWrapper (size_t wrapperId)
 
size_t wrappersCount ()
 
QString getWrapperName (size_t id)
 

Protected Member Functions

 MappedExe (AbstractByteBuffer *v_buf, exe_bits v_bitMode)
 
virtual ~MappedExe (void)
 
- Protected Member Functions inherited from Executable
 Executable (AbstractByteBuffer *v_buf, exe_bits v_bitMode)
 
- Protected Member Functions inherited from ExeWrappersContainer
void clearWrappers ()
 

Additional Inherited Members

- Public Types inherited from Executable
enum  exe_bits { UNKNOWN = 0 , BITS_16 = 16 , BITS_32 = 32 , BITS_64 = 64 }
 
enum  exe_arch { ARCH_UNKNOWN = 0 , ARCH_INTEL = 1 , ARCH_ARM = 2 }
 
enum  addr_type { NOT_ADDR = 0 , RAW = 1 , RVA = 2 , VA = 3 }
 
- Public Types inherited from ExeWrappersContainer
enum  WRAPPERS { WR_NONE = size_t(-1) , COUNT_WRAPPERS = 0 }
 
- Static Public Member Functions inherited from Executable
static bool isBit64 (Executable *exe)
 
static bool isBit32 (Executable *exe)
 
- Static Public Member Functions inherited from AbstractByteBuffer
static bool isValid (AbstractByteBuffer *buf)
 
- Protected Attributes inherited from Executable
exe_bits bitMode
 
AbstractByteBufferbuf
 
- Protected Attributes inherited from ExeWrappersContainer
std::map< size_t, ExeElementWrapper * > wrappers
 

Detailed Description

Definition at line 30 of file MappedExe.h.

Constructor & Destructor Documentation

◆ MappedExe()

MappedExe::MappedExe ( AbstractByteBuffer * v_buf,
exe_bits v_bitMode )
inlineprotected

Definition at line 52 of file MappedExe.h.

◆ ~MappedExe()

virtual MappedExe::~MappedExe ( void )
inlineprotectedvirtual

Definition at line 55 of file MappedExe.h.

Member Function Documentation

◆ canResize()

virtual bool MappedExe::canResize ( bufsize_t newSize)
inlinevirtual

Reimplemented in PEFile.

Definition at line 32 of file MappedExe.h.

◆ resize()

virtual bool MappedExe::resize ( bufsize_t newSize)
inlinevirtual

Reimplemented from Executable.

Definition at line 38 of file MappedExe.h.

Here is the call graph for this function:

◆ wrap()

virtual void MappedExe::wrap ( )
pure virtual

Implements ExeWrappersContainer.

Implemented in DOSExe, and PEFile.


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