-
Notifications
You must be signed in to change notification settings - Fork 22
/
AsmCoder.hpp
36 lines (25 loc) · 1.03 KB
/
AsmCoder.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once
#include "Coder.hpp"
namespace Decompiler {
/**
* @brief Write a PEX file as an ASM file.
*/
class AsmCoder :
public Coder
{
public:
AsmCoder(OutputWriter* writer);
~AsmCoder();
virtual void code(const Pex::Binary& pex);
protected:
void writeInfo(const Pex::Binary& pex);
void writeUserFlagsRef(const Pex::Binary& pex);
void writeObjectTable(const Pex::Binary& pex);
void writeVariableTable(int i, const Pex::Object& object, const Pex::Binary& pex);
void writePropertyTable(int i, const Pex::Object& object, const Pex::Binary& pex);
void writeStateTable(int i, const Pex::Object& object, const Pex::Binary& pex);
void writeFunction(int i, const Pex::Function& function, const Pex::Binary& pex, const Pex::DebugInfo::FunctionInfo* info, const std::string& name="");
void writeCode(int i, const Pex::Instructions& instructions, const Pex::DebugInfo::FunctionInfo *info);
void writeUserFlags(std::ostream&& stream, const Pex::UserFlagged& flagged, const Pex::Binary& pex);
};
}