Bitdefender Hypervisor Memory Introspection
patsig.c File Reference
#include "patsig.h"

Go to the source code of this file.

Functions

DWORD IntPatternMatch (const BYTE *Buffer, DWORD SigCount, const PATTERN_SIGNATURE *Sigs)
 Matches one of the given signatures on the given buffer. More...
 
DWORD IntPatternMatchAllOffsets (const BYTE *Buffer, const DWORD BufferSize, DWORD SigCount, const PATTERN_SIGNATURE *Sigs)
 Matches one of the given signatures on the given buffer at any offset inside the given buffer. More...
 

Function Documentation

◆ IntPatternMatch()

DWORD IntPatternMatch ( const BYTE Buffer,
DWORD  SigCount,
const PATTERN_SIGNATURE Sigs 
)

Matches one of the given signatures on the given buffer.

Parameters
[in]BufferThe buffer to be checked. The caller must ensure that the buffer is large enough to properly check all the signatures.
[in]SigCountThe number of entries in the Sigs array.
[in]SigsThe array of signatures to check.
Returns
The index in the Sigs array of the first matching signature, or SIG_NOT_FOUND if no signature is matched or the Buffer or Sigs pointers are NULL.

Definition at line 9 of file patsig.c.

Referenced by IntLixGuestFindKernelBase(), and IntPatternMatchAllOffsets().

◆ IntPatternMatchAllOffsets()

DWORD IntPatternMatchAllOffsets ( const BYTE Buffer,
const DWORD  BufferSize,
DWORD  SigCount,
const PATTERN_SIGNATURE Sigs 
)

Matches one of the given signatures on the given buffer at any offset inside the given buffer.

Parameters
[in]BufferThe buffer to be checked.
[in]BufferSizeThe size of the buffer.
[in]SigCountThe number of entries in the Sigs array.
[in]SigsThe array of signatures to check.
Returns
The index in the Sigs array of the first matching signature, or SIG_NOT_FOUND if no signature is matched or the Buffer or Sigs pointers are NULL.

Definition at line 56 of file patsig.c.