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.

27 lines
477 B

#include "Nop.h"
PNATIVE_CODE_LINK NcEmitNop()
{
UCHAR RawData[] = { 0x90 };
PNATIVE_CODE_LINK Link = new NATIVE_CODE_LINK(CODE_FLAG_IS_INST, RawData, 1);
3 years ago
XedDecode(&Link->XedInstruction, Link->RawData, 1);
return Link;
}
PNATIVE_CODE_BLOCK NcEmitNopGroup(ULONG Count)
{
if (Count < 1)
return NULL;
PNATIVE_CODE_BLOCK Block = new NATIVE_CODE_BLOCK;
if (!Block)
return NULL;
while (Count)
{
NcAppendToBlock(Block, NcEmitNop());
Count--;
}
return Block;
}