public override void setBackupBytes(Process process, ulong address, byte[] bytesToWrite) { IntPtr bytesRead = IntPtr.Zero; backupBytes = new byte[bytesToWrite.Length]; MemoryScanner.ReadProcessMemory(process.Handle, (IntPtr)address, backupBytes, bytesToWrite.Length, out bytesRead); }
public override ulong FindPattern() { IntPtr bytesRead; byte[] localModulebytes = new byte[localModule.ModuleMemorySize]; byte[] convertedByteArray = ConvertPattern(lpattern); MemoryScanner.ReadProcessMemory(handleProcess, localModule.BaseAddress, localModulebytes, localModule.ModuleMemorySize, out bytesRead); return(scanLogic(localModulebytes, convertedByteArray)); }
public override bool writeBytes(Process process, ulong address, byte[] bytesToWrite) { IntPtr bytesWritten = IntPtr.Zero; setBackupBytes(process, address, bytesToWrite); MemoryScanner.WriteProcessMemory(process.Handle, (IntPtr)address, bytesToWrite, bytesToWrite.Length, out bytesWritten); if (bytesWritten == IntPtr.Zero) { return(false); } else { return(true); } }