Patch() public static method

Inline classes marked as [Patch], copying fields and replacing method implementations. As you can probably guess from the code, this is wholly incomplete and will certainly break and have to be extended in the future.
public static Patch ( string modModulePath ) : void
modModulePath string
return void
示例#1
0
        static void Main(string[] args)
        {
            //4032F680BFEE01
            byte[] originalPattern = { 0x40, 0x32, 0xF6, 0x80, 0xBF, 0xEE, 0x01 };
            // 90909080BFEE01
            byte[] patchPattern = { 0x90, 0x90, 0x90, 0x80, 0xBF, 0xEE, 0x01 };

            var patcher = new Patcher(@"Bin64\StarCitizen.exe", originalPattern, patchPattern);

            var result = patcher.Find();

            var patched = patcher.Patch(result);

            Console.WriteLine(patched ? "Patched" : "Original");
        }