mirror of https://github.com/x64dbg/zydis
				
				
				
			Merge branch 'develop' of github.com:flobernd/verteron-disassembler-engine into develop
This commit is contained in:
		
						commit
						5400ff3772
					
				
							
								
								
									
										12
									
								
								README.md
								
								
								
								
							
							
						
						
									
										12
									
								
								README.md
								
								
								
								
							| 
						 | 
					@ -26,21 +26,19 @@ The following example program uses Zydis to disassemble a given memory buffer an
 | 
				
			||||||
#include <stdint.h>
 | 
					#include <stdint.h>
 | 
				
			||||||
#include "Zydis.hpp"
 | 
					#include "Zydis.hpp"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using namespace Zydis;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
int _tmain(int argc, _TCHAR* argv[])
 | 
					int _tmain(int argc, _TCHAR* argv[])
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    uint8_t data[] =
 | 
					    uint8_t data[] =
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        0x90, 0xE9, 0x00, 0x00, 0x00, 0x00, 0xC3
 | 
					        0x90, 0xE9, 0x00, 0x00, 0x00, 0x00, 0xC3
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    MemoryInput input(&data[0], sizeof(data));
 | 
					    Zydis::MemoryInput input(&data[0], sizeof(data));
 | 
				
			||||||
    InstructionInfo info;
 | 
					    Zydis::InstructionInfo info;
 | 
				
			||||||
    InstructionDecoder decoder;
 | 
					    Zydis::InstructionDecoder decoder;
 | 
				
			||||||
    decoder.setDisassemblerMode(ZydisMode::M32BIT);
 | 
					    decoder.setDisassemblerMode(Zydis::ZydisMode::M32BIT);
 | 
				
			||||||
    decoder.setDataSource(&input);
 | 
					    decoder.setDataSource(&input);
 | 
				
			||||||
    decoder.setInstructionPointer(0);
 | 
					    decoder.setInstructionPointer(0);
 | 
				
			||||||
    IntelInstructionFormatter formatter;
 | 
					    Zydis::IntelInstructionFormatter formatter;
 | 
				
			||||||
    while (decoder.decodeInstruction(info))
 | 
					    while (decoder.decodeInstruction(info))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        std::cout << formatter.formatInstruction(info) << std::endl;
 | 
					        std::cout << formatter.formatInstruction(info) << std::endl;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue