public void OpenGame() { string[] Multiple = new string[2] { "ForzaHorizon4", "Microsoft.SunriseBaseGame_1.467.173.2_x64__8wekyb3d8bbwe" }; for (int i = 0; i < Multiple.Length; i++) { pID = LibMem.GetProcIdFromName(Multiple[i]); if (pID > 0) { break; } } if (pID > 0) { if (!StartPID) { StartPID = true; Thread.Sleep(2500); } openProc = LibMem.OpenProcess(pID); if (openProc && !RangePID) { minRange = (long)LibMem.theProc.MainModule.BaseAddress; maxRange = (long)LibMem.theProc.MainModule.BaseAddress + LibMem.theProc.MainModule.ModuleMemorySize; ProcName = LibMem.theProc.ProcessName + ".exe - UWP"; if (minRange > 0 && maxRange > 0) { RangePID = true; } foreach (var mod in LibMem.modules) { if (mod.Key == "steam_api64.dll") { UWP = false; ProcName = LibMem.theProc.ProcessName + ".exe - STEAM"; } } } } else { for (int i = 0; i < AoBScan.Length; i++) // Check and reset AobScan { if (AoBScan[i] != 0) { AoBScan[i] = 0; } } for (int i = 0; i < CodeCave.Length; i++) // Check and reset CodeCave { if (CodeCave[i] != 0) { CodeCave[i] = 0; } } pID = 0; openProc = false; StartPID = false; RangePID = false; ProcName = null; minRange = 0; maxRange = 0; TimerChange = 0; UWP = true; } }