public bool OpenGameProcess(int procID) { bool flag = procID != 0; bool result; if (flag) { this.procs = Process.GetProcessById(procID); bool flag2 = !this.procs.Responding; if (flag2) { result = false; } else { Mem.pHandle = Mem.OpenProcess(2035711u, 1, procID); this.mainModule = this.procs.MainModule; this.getModules(); result = true; } } else { result = false; } return(result); }
private void setButton_Click(object sender, EventArgs e) { string address = addressTextBox.Text; string value = valueTextBox.Text; string valuetype = typeTextBox.Text; string processname = processNameTextBox.Text; memory.OpenProcess(Process.GetProcessesByName(processname).FirstOrDefault().Id); memory.WriteMemory(address, valuetype, value); }