retdec
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
retdec::unpacker::UnpackingStub Class Referenceabstract

#include <unpacking_stub.h>

Inheritance diagram for retdec::unpacker::UnpackingStub:
Inheritance graph
[legend]
Collaboration diagram for retdec::unpacker::UnpackingStub:
Collaboration graph
[legend]

Public Member Functions

 UnpackingStub (loader::Image *file)
 
virtual ~UnpackingStub ()=default
 
virtual void unpack (const std::string &outputFile)=0
 
virtual void cleanup ()=0
 
loader::ImagegetFile ()
 

Protected Member Functions

void setFile (loader::Image *file)
 

Protected Attributes

loader::Image_file
 

Detailed Description

Base class for unpacking stubs that can be subclassed in unpacker plugins that work on unpacking stub simulation basis.

Constructor & Destructor Documentation

◆ UnpackingStub()

retdec::unpacker::UnpackingStub::UnpackingStub ( loader::Image file)
inline

Constructs the unpacking stub object operating on provided file.

Parameters
fileFile to operate on.

◆ ~UnpackingStub()

virtual retdec::unpacker::UnpackingStub::~UnpackingStub ( )
virtualdefault

Destructor.

Member Function Documentation

◆ cleanup()

virtual void retdec::unpacker::UnpackingStub::cleanup ( )
pure virtual

◆ getFile()

loader::Image* retdec::unpacker::UnpackingStub::getFile ( )
inline

Returns the file the unpacking stub is operating on.

Returns
The input file.

◆ setFile()

void retdec::unpacker::UnpackingStub::setFile ( loader::Image file)
inlineprotected

◆ unpack()

virtual void retdec::unpacker::UnpackingStub::unpack ( const std::string &  outputFile)
pure virtual

Pure virtual method that should implement unpacking process in its subclasses.

Parameters
outputFilePath to the output unpacked file.

Implemented in retdec::unpackertool::upx::MachOUpxStub< bits >, retdec::unpackertool::upx::ElfUpxStub< bits >, and retdec::unpackertool::upx::PeUpxStub< bits >.

Member Data Documentation

◆ _file

loader::Image* retdec::unpacker::UnpackingStub::_file
protected

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