43 #define CODE_BLOCK_CHUNKS_COUNT 8 131 #endif // _CODEBLOCKS_H_
A mov using a segment:offset.
INTSTATUS IntFragExtractCodePattern(PBYTE Buffer, DWORD StartOffset, DWORD MaxBufferSize, IG_CS_TYPE CsType, CB_EXTRACT_LEVEL ExtractLevel, DWORD PatternSize, CODE_BLOCK_PATTERN *Pattern, DWORD *TotalExtracted)
Extract a pattern of code-blocks from the given code buffer.
struct _CODE_BLOCK_PATTERN CODE_BLOCK_PATTERN
Non-conditional jump, of any kind.
DWORD OffsetStart
The start of the extracted codeblock (not actually relevant)
INTSTATUS IntFragExtractCodeBlocks(BYTE *Buffer, DWORD MaxBufferSize, IG_CS_TYPE CsType, CB_EXTRACT_LEVEL ExtractLevel, DWORD *HashesCount, DWORD *Hashes)
Extract a block of code-block hashes from the given code buffer.
WORD Size
Code block size, in patterns.
DWORD Offset
The offset of the instruction in the page.
#define CODE_BLOCK_CHUNKS_COUNT
Number of chunks (CODE_INS) per codeblock.
A mov using immediate value.
int INTSTATUS
The status data type.
__pure INTSTATUS IntFragMatchSignature(const DWORD *Hashes, DWORD CodeBlocksCount, const SIG_CODEBLOCKS *ExceptionSignature)
Match a block of code-block hashes against a list of code-block exception signatures.
#define _Out_writes_(expr)
Exchange instruction, including xchg, xadd, cmpxchg, cmpxchg8b/16b.
Bit manipulation instruction - bt, bts, btr, btc.
BYTE Chunks[CODE_BLOCK_CHUNKS_COUNT]
The actual CODE_INS values representing the instruction pattern.
INTSTATUS IntFragDumpBlocks(PBYTE Buffer, QWORD StartAddress, DWORD MaxBufferSize, IG_CS_TYPE CsType, CB_EXTRACT_LEVEL ExtractLevel, QWORD Rip, BOOLEAN ReturnRip)
Dumps code-blocks that can then be used to generate an exception signature.
IG_CS_TYPE
The type of the code segment.
Conditional jump, of any kind, including loop.
This includes instructions until codeInsBt.
Not really used, only to signal an error.
BYTE Value
The CODE_INS value describing the instruction type.
DWORD Hash
The hash will be computed on Chunks array.
This includes instructions until codeInsFlags.
Some sort of string instruction - lods, stos, scas, movs.
INTSTATUS IntFragExtractPattern(BYTE *Buffer, DWORD MaxBufferSize, IG_CS_TYPE CsType, CB_EXTRACT_LEVEL ExtractLevel, DWORD PatternSize, BYTE *Pattern, DWORD *TotalExtracted, DWORD *TotalParsed)
Extract a pattern of code-blocks from the given code buffer.
struct _CODE_BLOCK CODE_BLOCK
struct _CODE_BLOCK * PCODE_BLOCK
A mov involving only registers.
#define _Out_writes_to_(expr, expr2)
A mov involving memory (either as the destination or as the source).
Describes a codeblocks signature.
struct _CODE_BLOCK_PATTERN * PCODE_BLOCK_PATTERN