Merge branch 'develop' of github.com:flobernd/verteron-disassembler-engine into develop

This commit is contained in:
athre0z 2015-05-16 05:25:22 +02:00
commit 5400ff3772
1 changed files with 5 additions and 7 deletions

View File

@ -26,21 +26,19 @@ The following example program uses Zydis to disassemble a given memory buffer an
#include <stdint.h>
#include "Zydis.hpp"
using namespace Zydis;
int _tmain(int argc, _TCHAR* argv[])
{
uint8_t data[] =
{
0x90, 0xE9, 0x00, 0x00, 0x00, 0x00, 0xC3
};
MemoryInput input(&data[0], sizeof(data));
InstructionInfo info;
InstructionDecoder decoder;
decoder.setDisassemblerMode(ZydisMode::M32BIT);
Zydis::MemoryInput input(&data[0], sizeof(data));
Zydis::InstructionInfo info;
Zydis::InstructionDecoder decoder;
decoder.setDisassemblerMode(Zydis::ZydisMode::M32BIT);
decoder.setDataSource(&input);
decoder.setInstructionPointer(0);
IntelInstructionFormatter formatter;
Zydis::IntelInstructionFormatter formatter;
while (decoder.decodeInstruction(info))
{
std::cout << formatter.formatInstruction(info) << std::endl;