namespace Gametrainer
{
public partial class Form1 : Form
{
[DllImport("kernel32.dll")]
public static extern Int32 CloseHandle(IntPtr hObject);
[DllImport("kernel32.dll")]
public static extern IntPtr OpenProcess(UInt32 dwDesiredAccess, Int32 bInheritHandle, UInt32 dwProcessId);
[DllImport("kernel32.dll")]
public static extern Int32 WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, uint[] lpBuffer, UInt32 nSize, IntPtr lpNumberOfBytesWritten);
IntPtr pHandle;
Process[] CA;
public Form1()
{
InitializeComponent();
}
private void OpenProcess()
{
IntPtr pHandle;
// to write
IntPtr Address = (IntPtr)0x0000000;
uint[] Write = new uint[] { 0xFF };// memory to write
// open
Process[] CA = Process.GetProcessesByName("Process Name");
/*
Ex:
Engine.exe (Combat Arms)
iw4mp.exe (ModernWarfare 2)
warrock.exe (Warrock)
*/
pHandle = OpenProcess(0xFFFFFF, 0, (UInt32)CA[0].Id);
WriteProcessMemory(pHandle, Address, Write, 4, (IntPtr)0);
CloseHandle(pHandle);
}
private void button1_Click(object sender, EventArgs e)
{
// start timer
}
private void waitfor_Tick(object sender, EventArgs e)
{
CA = Process.GetProcessesByName("Engine");
if (CA != null)
{
pHandle = OpenProcess(0xFFFFFF, 0, (UInt32)CA[0].Id);
waitfor.Enabled = false;
//.....
button1.Enabled = true;
}
}
private void hackone_Tick(object sender, EventArgs e)
{
//16D2A57
// to write
IntPtr Address = (IntPtr)0x16D2A57; //Old addy
uint[] Write = new uint[] { 0xFF };// memory to write *New addy*
}
}
}


using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Runtime.InteropServices; using System.Diagnostics;