24 #define DEC_EFLAG_CF 0x00000001 27 #define DEC_GET_FLAG(eflags, flag) ((eflags) >> (((flag) - 1) % 64)) 30 #define DEC_OPT_NO_CACHE 0x00000001 33 #define DEC_INVALID_GPA 0xFFFFFFFFFFFFFFFF 36 #define QWORD_HIGH_PART_MASK 0xFFFFFFFF00000000 54 BYTE ByteValues[ND_MAX_REGISTER_SIZE];
55 WORD WordValues[ND_MAX_REGISTER_SIZE / 2];
56 DWORD DwordValues[ND_MAX_REGISTER_SIZE / 4];
57 QWORD QwordValues[ND_MAX_REGISTER_SIZE / 8];
77 _In_ size_t BufferSize,
87 _Out_ INSTRUX *Instrux
95 _Out_ PINSTRUX Instrux,
103 _In_ PINSTRUX Instrux,
112 _In_ PINSTRUX Instrux,
121 _In_ PINSTRUX Instrux
129 #define PW_FLAGS_SET_A BIT(0) 130 #define PW_FLAGS_SET_D BIT(1) 141 _In_ PINSTRUX Instrux,
147 _In_ PINSTRUX Instrux,
173 _In_ PINSTRUX Instrux,
179 _In_ PINSTRUX Instrux,
180 _In_ PND_OPERAND Operand,
187 _In_ PINSTRUX Instrux,
194 _In_ PINSTRUX Instrux,
201 _Out_ ND_OPERAND_SIZE *Maxvl
204 #endif // _DECODER_H_
INTSTATUS IntDecGetAccessedMem(PINSTRUX Instrux, PIG_ARCH_REGS Registers, PIG_XSAVE_AREA XsaveArea, MEMADDR *Gla, DWORD *Count)
Decode each accessed address by an instruction.
INTSTATUS IntDecEmulateRead(PINSTRUX Instrux, BYTE *SrcValueBuffer)
Emulate a read access.
Describes an XSAVE area format.
Describes a memory address, as used in an instruction.
INTSTATUS IntDecGetSseRegValue(PIG_XSAVE_AREA XsaveArea, DWORD Reg, DWORD Size, OPERAND_VALUE *Value)
Get the value of a vector register. Wrapper over IntDecGetSetSseRegValue.
Holds segment register state.
INTSTATUS IntDecDecodeInstructionAtRip(DWORD CpuNumber, IG_ARCH_REGS *Registers, IG_SEG_REGS *Segments, INSTRUX *Instrux)
Decode an instruction at current RIP on the provided VCPU.
int INTSTATUS
The status data type.
INTSTATUS IntDecComputeLinearAddress(PINSTRUX Instrux, PND_OPERAND Operand, PIG_ARCH_REGS Registers, QWORD *LinearAddress)
Given an instruction and a memory operand, it will compute the guest linear address encoded by that o...
BYTE Access
Access (read, write, or a combination).
struct _MEMADDR * PMEMADDR
#define _Out_writes_(expr)
IG_CS_TYPE
The type of the code segment.
INTSTATUS IntDecEmulatePageWalk(QWORD Gla, QWORD Cr3, DWORD Flags)
QWORD Gla
The guest linear address.
Describes an operand value.
struct _OPERAND_VALUE OPERAND_VALUE
Describes an operand value.
INTSTATUS IntDecGetAccessedMemCount(PINSTRUX Instrux, DWORD *Count)
Decode the number of memory locations accessed by an instruction.
INTSTATUS IntDecSetSseRegValue(PIG_XSAVE_AREA XsaveArea, DWORD Reg, DWORD Size, OPERAND_VALUE *Value, BOOLEAN Commit)
Sets the value of a vector register. Wrapper over IntDecGetSetSseRegValue.
INTSTATUS IntDecDecodeInstructionFromBuffer(PBYTE Buffer, size_t BufferSize, IG_CS_TYPE CsType, void *Instrux)
Decode an instruction from the provided buffer.
DWORD Size
The operand size.
INTSTATUS IntDecEmulatePTWrite(QWORD *NewValue)
Emulate a page-table write.
#define _In_reads_bytes_(expr)
INTSTATUS IntDecDecodeSourceLinearAddressFromInstruction(PINSTRUX Instrux, PIG_ARCH_REGS Registers, QWORD *LinearAddress)
Decode the source memory linear address.
struct _OPERAND_VALUE * POPERAND_VALUE
INTSTATUS IntDecDecodeAccessSize(PINSTRUX Instrux, PIG_ARCH_REGS Registers, QWORD Gla, BYTE AccessType, DWORD *AccessSize)
Decode the memory access size of a given instruction.
INTSTATUS IntDecDecodeDestinationLinearAddressFromInstruction(PINSTRUX Instrux, PIG_ARCH_REGS Registers, QWORD *LinearAddress)
Decode the destination memory linear address.
INTSTATUS IntDecGetMaxvl(ND_OPERAND_SIZE *Maxvl)
Computes the maximum vector length, given the enabled states inside the XCR0 register.
INTSTATUS IntDecGetWrittenValueFromInstruction(PINSTRUX Instrux, PIG_ARCH_REGS Registers, PBYTE MemoryValue, OPERAND_VALUE *WrittenValue)
Decode a written value from a memory write instruction.
INTSTATUS IntDecDecodeInstructionAtRipWithCache(void *Cache, DWORD CpuNumber, PIG_ARCH_REGS Registers, PINSTRUX Instrux, DWORD Options, BOOLEAN *CacheHit, BOOLEAN *Added)
Decode an instruction using the cache.
struct _MEMADDR MEMADDR
Describes a memory address, as used in an instruction.
INTSTATUS IntDecEmulateInstruction(DWORD CpuNumber, PINSTRUX Instrux)
Emulate a MOV or a PUSH instruction.
INTSTATUS IntDecDecodeInstruction(IG_CS_TYPE CsType, QWORD Gva, void *Instrux)
Decode an instruction from the provided guest linear address.