2023-05-30 10:33:52 +00:00
|
|
|
#pragma once
|
|
|
|
|
2023-11-05 11:22:18 +00:00
|
|
|
#include <Zydis/Zydis.h>
|
2023-11-05 11:41:10 +00:00
|
|
|
#include "common/types.h"
|
2023-05-30 10:33:52 +00:00
|
|
|
|
2023-11-05 14:56:28 +00:00
|
|
|
namespace Common {
|
|
|
|
|
|
|
|
class Disassembler {
|
2023-05-30 10:33:52 +00:00
|
|
|
public:
|
2024-02-23 20:57:57 +00:00
|
|
|
Disassembler();
|
|
|
|
~Disassembler();
|
2023-11-05 14:56:28 +00:00
|
|
|
|
|
|
|
void printInst(ZydisDecodedInstruction& inst, ZydisDecodedOperand* operands, u64 address);
|
|
|
|
void printInstruction(void* code, u64 address);
|
2023-05-30 10:33:52 +00:00
|
|
|
|
|
|
|
private:
|
2023-11-05 14:56:28 +00:00
|
|
|
ZydisDecoder m_decoder;
|
2024-02-23 20:57:57 +00:00
|
|
|
ZydisFormatter m_formatter;
|
2023-06-23 01:48:55 +00:00
|
|
|
};
|
2023-11-05 14:56:28 +00:00
|
|
|
|
|
|
|
} // namespace Common
|