private void Swap() { //Get the values from both addresses byte[] bufA = mProcess.GetBytes((int)mAddressA, mCount); byte[] bufB = mProcess.GetBytes((int)mAddressB, mCount); //Write them back but swapped mProcess.WriteBytes((int)mAddressA, bufB); mProcess.WriteBytes((int)mAddressB, bufA); }
public void Activate() { //Backup the old values mOldValues = mProcess.GetBytes((int)mAddress, mNewValues.Length); //Write the new values mProcess.WriteBytes((int)mAddress, mNewValues); }
public void Activate() { //Backup the old code mOldCode = mProcess.GetBytes((int)mAddress, mReplacedInstructionSize); //Write the new code mProcess.WriteBytes((int)mAddress, mNewCode); //Write any additional NOPs Hack.WriteNOPs(mProcess, mAddress + (uint)mNewCode.Length, mReplacedInstructionSize - mNewCode.Length); }
public static void CopyInstructions(AppProcess process, uint srcAddress, uint destAddress, int size) { byte[] instructions = process.GetBytes((int)srcAddress, size); process.WriteBytes((int)destAddress, instructions); }