static void Main(string[] args) { /* * ProcessStream m = new ProcessStream(Process.GetProcessesByName("mouserate").First()); * long offset = 0; * MEMORY_BASIC_INFORMATION i = new MEMORY_BASIC_INFORMATION(); * long maxAddress = 0x7fffffff; * while ((long)m.Process.MainModule.BaseAddress + offset <= maxAddress) { * int dw = VirtualQueryEx(m.Handle, (IntPtr)((long)m.Process.MainModule.BaseAddress + offset), out i, (uint)Marshal.SizeOf(i)); * offset += (long)i.RegionSize; * AllocationProtect p = (AllocationProtect)i.AllocationProtect; * Console.WriteLine(i.RegionSize + " : " + p); * } */ ProcessStream s = new ProcessStream(Process.GetProcessesByName("MEmuHeadless").First()); HexPattern p = new HexPattern("14 ?? ?? ED"); long pointerMatrix = s.PatternScan(p, 0x40000000, 4096 * 3, 0x400000000); string ms = "11 11 11 11 11"; Console.WriteLine(System.Convert.ToString(pointerMatrix, 16)); s.WriteMemory(pointerMatrix, strToToHexByte(ms), 139); Console.WriteLine("Done"); Console.ReadLine(); }
static void Main(string[] args) { /* * ProcessStream m = new ProcessStream(Process.GetProcessesByName("mouserate").First()); * long offset = 0; * MEMORY_BASIC_INFORMATION i = new MEMORY_BASIC_INFORMATION(); * long maxAddress = 0x7fffffff; * while ((long)m.Process.MainModule.BaseAddress + offset <= maxAddress) { * int dw = VirtualQueryEx(m.Handle, (IntPtr)((long)m.Process.MainModule.BaseAddress + offset), out i, (uint)Marshal.SizeOf(i)); * offset += (long)i.RegionSize; * AllocationProtect p = (AllocationProtect)i.AllocationProtect; * Console.WriteLine(i.RegionSize + " : " + p); * } */ ProcessStream s = new ProcessStream(Process.GetProcessesByName("spotify").First()); HexPattern p = new HexPattern("?? ?? 0x32 ?? 0x43"); long address = s.PatternScan(p); Console.WriteLine(address); Console.WriteLine("Done"); Console.ReadLine(); }