示例#1
0
        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);
        }
示例#2
0
        public void Activate()
        {
            //Backup the old values
            mOldValues = mProcess.GetBytes((int)mAddress, mNewValues.Length);

            //Write the new values
            mProcess.WriteBytes((int)mAddress, mNewValues);
        }
示例#3
0
        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);
        }
示例#4
0
 public static void CopyInstructions(AppProcess process, uint srcAddress, uint destAddress, int size)
 {
     byte[] instructions = process.GetBytes((int)srcAddress, size);
     process.WriteBytes((int)destAddress, instructions);
 }