예제 #1
0
        /// <summary>
        ///     A patch can be used to change byte(s) starting at the defined address.
        /// </summary>
        /// <param name="addressToPatch">The address of the byte where we want our patch to start.</param>
        public MemoryPatch(MemoryPointer addressToPatch, byte[] newBytes)
        {
            PatchAddress  = addressToPatch ?? throw new ArgumentNullException(nameof(addressToPatch));
            NewBytes      = newBytes ?? throw new ArgumentNullException(nameof(newBytes));
            OriginalBytes = PatchAddress.Read(NewBytes.Length);

            MemoryPatches.Add(this);
        }
예제 #2
0
파일: PEB.cs 프로젝트: oathgg/GameSharp
        public PEB(IProcess process)
        {
            _pebPointer = process.GetPebAddress();

            if (process.Is64Bit)
            {
                _pebOffsets = new PebOffsets64();
            }
            else
            {
                _pebOffsets = new PebOffsets32();
            }
        }
예제 #3
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="MemoryScanner" /> class.
 /// </summary>
 /// <param name="module"><see cref="ProcessModule"/> which we are going to scan.</param>
 public MemoryScanner(ModulePointer module)
 {
     ModuleBase = module.MemoryPointer;
     Bytes      = ModuleBase.Read(module.Size);
 }