#ifndef __VIRTUAL_MACHINE_H #define __VIRTUAL_MACHINE_H #include "Windas.h" #include "XedWrap.h" #include "VMDefs.h" typedef struct _VM_DATA { PVOID RegisterFile[32]; }VM_DATA, *PVM_DATA; typedef struct _VM_EMITTER { }VM_EMITTER, *PVM_EMITTER; /* * VmEnter: * Move all x86 8 byte registers into storage inside of VM_DATA structure. * Move address of VM_DATA structure into rcx * Move virtual instruction pointer into rdx */ PUCHAR VmEmitVmEnter(PULONG Size); PUCHAR VmEmitVmExit(PULONG Size); PUCHAR VmEmitMove(); PUCHAR VmEmitSignExtend(PVM_EMITTER Emitter, UCHAR StartSize, UCHAR FinalSize, PULONG Size); PUCHAR VmEmitZeroExtend(PVM_EMITTER Emitter, UCHAR StartSize, UCHAR FinalSize, PULONG Size); #endif