C# Class trainer.SigScan

Exibir arquivo Open project: apeape/trainer Class Usage Examples

Public Methods

Method Description
FindPattern ( byte btPattern, int nOffset ) : IntPtr

FindPattern Attempts to locate the given pattern inside the dumped memory region compared against the given mask. If the pattern is found, the offset is added to the located address and returned to the user.

FindPattern ( string pattern, int nOffset ) : uint
ResetRegion ( ) : void

ResetRegion Resets the memory dump array to nothing to allow the class to redump the memory.

SigScan ( ) : System

SigScan Main class constructor that uses no params. Simply initializes the class properties and expects the user to set them later.

SigScan ( Process proc, IntPtr addr, int size ) : System

SigScan Overloaded class constructor that sets the class properties during construction.

Private Methods

Method Description
DumpMemory ( ) : bool

DumpMemory Internal memory dump function that uses the set class properties to dump a memory region.

MaskCheck ( int nOffset, byte btPattern ) : bool

MaskCheck Compares the current pattern byte to the current memory dump byte to check for a match. Uses wildcards to skip bytes that are deemed unneeded in the compares.

ReadProcessMemory ( IntPtr hProcess, IntPtr lpBaseAddress, [ lpBuffer, int dwSize, int &lpNumberOfBytesRead ) : bool
SigToByte ( string Signature, byte wildcard ) : byte[]

Convert a hex string to a binary array while preserving any wildcard characters.

Method Details

FindPattern() public method

FindPattern Attempts to locate the given pattern inside the dumped memory region compared against the given mask. If the pattern is found, the offset is added to the located address and returned to the user.
public FindPattern ( byte btPattern, int nOffset ) : IntPtr
btPattern byte Byte pattern to look for in the dumped region.
nOffset int The offset added to the result address.
return System.IntPtr

FindPattern() public method

public FindPattern ( string pattern, int nOffset ) : uint
pattern string
nOffset int
return uint

ResetRegion() public method

ResetRegion Resets the memory dump array to nothing to allow the class to redump the memory.
public ResetRegion ( ) : void
return void

SigScan() public method

SigScan Main class constructor that uses no params. Simply initializes the class properties and expects the user to set them later.
public SigScan ( ) : System
return System

SigScan() public method

SigScan Overloaded class constructor that sets the class properties during construction.
public SigScan ( Process proc, IntPtr addr, int size ) : System
proc System.Diagnostics.Process The process to dump the memory from.
addr System.IntPtr The started address to begin the dump.
size int The size of the dump.
return System