James 2 years ago
parent 28a54b454c
commit ff37bc98d5

@ -187,12 +187,13 @@ UCHAR IsEvenCode[]{
int main()
{
XedTablesInit();
XedGlobalInit();
srand(time(NULL));
UCHAR TestCode[] = { 0x48, 0x8B, 0x84, 0xD1, 0xF0, 0x06, 0x00, 0x00 }; // { 0x48, 0x89, 0xC8 };
XED_DECODED_INST DecodedInst;
XedDecodedInstZero(&DecodedInst);
XedDecodedInstSetMode(&DecodedInst, XED_MACHINE_MODE_LONG_64, XED_ADDRESS_WIDTH_64b);
XedDecodedInstZeroSetMode(&DecodedInst, &XedGlobalMachineState);
//XedDecodedInstZero(&DecodedInst);
//XedDecodedInstSetMode(&DecodedInst, XED_MACHINE_MODE_LONG_64, XED_ADDRESS_WIDTH_64b);
XED_ERROR_ENUM Err = XedDecode(&DecodedInst, TestCode, sizeof(TestCode));
if (Err != XED_ERROR_NONE)
{

@ -1,2 +1,9 @@
#include "XedWrap.h"
VOID XedInit()
{
XedTablesInit();
XedGlobalMachineState;
XedGlobalMachineState.mmode = XED_MACHINE_MODE_LONG_64;
XedGlobalMachineState.stack_addr_width = XED_ADDRESS_WIDTH_64b;
}

@ -90,4 +90,8 @@ extern "C"
#define XedReg xed_reg
#define XedDisp xed_disp
inline XED_STATE XedGlobalMachineState;
VOID XedInit();
#endif
Loading…
Cancel
Save