Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
 }