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