public IntPtr FindPattern(String pattern, IntPtr start, Int32 length) { //var skip = pattern.ToLower().Contains("cc") ? 0xcc : pattern.ToLower().Contains("aa") ? 0xaa : 0; var sigScan = new SigScan(Process, start, length); var arrayOfBytes = pattern.Split(' ').Select(b => b.Contains("?") ? (Byte)0 : (Byte)Convert.ToInt32(b, 16)).ToArray(); var strMask = String.Join("", pattern.Split(' ').Select(b => b.Contains("?") ? '?' : 'x')); return(sigScan.FindPattern(arrayOfBytes, strMask, 0)); }
public IntPtr ScanSignature(Process process) { SigScan sigScan = new SigScan(process, new IntPtr(StartAddress), SearchRange); return(sigScan.FindPattern(WantedBytes, Mask, AddressOffset)); }