public bool disable() { PatternScanner patternscanner = new PatternScanner(hProcess); patternscanner.SelectModule(module); long timetookms; ulong offset = patternscanner.FindPattern("48 63 05 F5 78 C5 01 E9 ? ? ? ? 90 C3 CC", out timetookms) + 0x7; // The pattern scanner works good and finds correct place if (offset > 0) { if (!mem.WriteByteArray((IntPtr)offset, new byte[] { 0xF3, 0x0F, 0x11, 0x4C, 0x81, 0x30 })) { return(false); } } else { return(false); } bool output = Win32.VirtualFreeEx(hProcess, address, 0, AllocationType.Release); if (output == true) { address = IntPtr.Zero; } enabled = false; return(output); }
public bool disable() { PatternScanner patternscanner = new PatternScanner(hProcess); patternscanner.SelectModule(module); long timetookms; ulong offset = patternscanner.FindPattern("5B C3 90 90 90 90 90 90 90 74 0F", out timetookms) + 0x2; // The pattern scanner works good and finds correct place if (offset > 0 && offset == (ulong)address) { if (!mem.WriteByteArray((IntPtr)offset, new byte[] { 0x80, 0xBB, 0xE2, 0x01, 0x00, 0x00, 0x00 })) { return(false); } } else { return(false); } address = IntPtr.Zero; enabled = false; return(true); }