You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
645 B

3 years ago
#ifndef __VIRTUALIZER_H
#define __VIRTUALIZER_H
#include "Code.h"
#include "VmCode.h"
#include "NativeCode.h"
3 years ago
#include "VMDefs.h"
3 years ago
/*
3 years ago
* Structure:
*
3 years ago
* Instructions:
* - Two byte opcode
* -
*
3 years ago
* Replace the code of the original code with random bytes and somewhere within it put the entry into the vm
* Put the address of the virtual function code into rax, then jmp to vmenter.
*/
3 years ago
typedef struct _VIRTUALIZER
{
UCHAR DefaultInstructions[VM_ICLASS_COUNT];
PNATIVE_CODE_BLOCK Block;
}VIRTUALIZER, *PVIRTUALIZER;
3 years ago
3 years ago
BOOL ViCanHandleInst(PNATIVE_CODE_LINK Link);
3 years ago
BOOL ViValidateNativeCodeBlock(PVIRTUALIZER Vm, PNATIVE_CODE_BLOCK Block);
3 years ago
3 years ago
#endif