예제 #1
0
        private IntPtr FindWardenSignature(UIntPtr startAddress, UInt32 searchSpan, byte[] signature)
        {
            long endOffset = startAddress.ToUInt32() + searchSpan - signature.Length;

            for (UIntPtr address = startAddress; address.ToUInt32() < endOffset; address += 1)
            {
                byte[] readBytes = memory.Read(address.GetIntPtr(), signature.Length);
                if (readBytes.SequenceEqual(signature))
                {
                    return(address.GetIntPtr());
                }
            }

            return(IntPtr.Zero);
        }