public static void StartSkipFERace() { int v1; // eax int v2; // ecx //MWDBG.writeMem((IntPtr)0x904FC4 = LODWORD(SkipFEDifficulty); MWDBG.writeMem <int>((IntPtr)0x904FD8, MWDBG.readMem <int>(Info.SkipFE.NumLaps)); MWDBG.writeMem <int>((IntPtr)0x904FB8, MWDBG.readMem <int>(Info.SkipFE.TrackNumber)); MWDBG.writeMem <int>((IntPtr)0x905008, MWDBG.readMem <int>(Info.SkipFE.MaxCops)); MWDBG.writeMem <int>((IntPtr)0x904FCC, 1);//RaceType MWDBG.writeMem <int>((IntPtr)0x904FDC, MWDBG.readMem <int>(Info.SkipFE.NumPlayerCars)); MWDBG.writeMem <int>((IntPtr)0x904FE0, MWDBG.readMem <int>(Info.SkipFE.NumAICars)); MWDBG.writeMem <byte>((IntPtr)0x904FED, (byte)(MWDBG.readMem <int>(Info.SkipFE.NumAICars) + 2)); MWDBG.writeMem <byte>((IntPtr)0x904FEC, (byte)(MWDBG.readMem <int>(Info.SkipFE.NumAICars) + 1)); MWDBG.writeMem <int>((IntPtr)0x90501C, 1065353216); MWDBG.writeMem <int>((IntPtr)0x905020, 1065353216); MWDBG.writeMem <int>((IntPtr)0x905030, 0); MWDBG.m[(IntPtr)0x56C5B0 - 0x400000].Execute(); /*dword_ = SkipFEMaxCops; * dword_904FBC = SkipFETrackDirection; * dword_ = SkipFERaceType; * dword_904FD0 = dword_92609C; * dword_905014 = SkipFEDifficulty_0; * dword_90500C = SkipFEDifficulty_0; * dword_ = SkipFENumPlayerCars; * dword_ = SkipFENumAICars; * byte_ = SkipFENumAICars + 2; * byte_904FEE = dword_8F86D0 != 0; * byte_[0] = SkipFENumAICars + 1;*/ }
public static int SetPlayerCar(string carName) { int ecx = MWDBG.readMem <int>((IntPtr)0x9B08F8); int result = MWDBG.m[(IntPtr)0x755340, false].Execute <int>(CallingConventions.Thiscall, ecx, carName); return(result); }
private void SaveSettingsButton_Click(object sender, RoutedEventArgs e) { Funcs.ProgCfg.Settings["gamePath"] = GameFolderBox.Text; try { Funcs.ProgCfg.Settings["gameDir"] = MWDBG.GetWD(GameFolderBox.Text); } catch { ErrorWnd("UNABLE TO SAVE", "Something wrong with game path!", false, GridSettings); return; } Funcs.ProgCfg.Settings["skipfePlayerCar"] = SettingsSkipFECarBox.SelectedItem.ToString(); if ((bool)StartGameWithMWD.IsChecked) { Funcs.ProgCfg.Settings["startGame"] = "1"; } else { Funcs.ProgCfg.Settings["startGame"] = "0"; } if ((bool)AfterStartingSkipFE.IsChecked) { Funcs.ProgCfg.Settings["skipfe"] = "1"; } else { Funcs.ProgCfg.Settings["skipfe"] = "0"; } if ((bool)AnimationsCheckbox.IsChecked) { Funcs.ProgCfg.Settings["animations"] = "1"; } else { Funcs.ProgCfg.Settings["animations"] = "0"; } Funcs.ProgCfg.Settings["splashFNG"] = SplashFNGBox.Text; //if (Funcs.ProgCfg.Settings["loading"] != loading.SelectedIndex.ToString()) MessageBox.Show("To change loading screens restart game", "MW Debug"); //Funcs.ProgCfg.Settings["loading"] = loading.SelectedIndex.ToString(); MWDBG.workMin = (bool)WorkMinimizedCheckbox.IsChecked; try { Replays.Double = int.Parse(ReplaySpeedBox.Text); } catch { ErrorWnd("UNABLE TO SAVE", "Something wrong with replay speed!", false, GridSettings); return; } Funcs.ProgCfg.Save(); InfoWnd("SETTINGS SAVED", "Thanks for cooperation xd", GridSettings); UpdateSettingsGrid(); }
public static IntPtr Allocate(Vector3 vec) { var vMem = MWDBG.m.Memory.Allocate(12); vMem.MustBeDisposed = false; //bytes[] v3bytes //return MWDBG.WriteMemoryArray((uint)vMem.BaseAddress, ); MWDBG.WriteStruct <Vector3>((uint)vMem.BaseAddress, vec); return(vMem.BaseAddress); }
public MainWindow() { InitializeComponent(); DC.Init(); Funcs.ProgCfg.Handle(); DC.InitFng(); Funcs.FuncList.Init(); DC.HookKbd(); pVehicleInfo.Init(); foreach (var i in Info.pVehicle) { SettingsSkipFECarBox.Items.Add(i.name); SkipFeCarBox.Items.Add(i.name); } ErrorChangable.Add(GridWelcome); ErrorChangable.Add(GridError); ErrorChangable.Add(GridSettings); ErrorChangable.Add(GridInfo); ErrorChangable.Add(GridLog); ErrorChangable.Add(GridList); SetActiveGrid(null); ToggleButtons(false); SetStatus("Starting up..."); // TopBorder.Background = new LinearGradientBrush(Color.FromArgb(255, 48, 48, 48), Color.FromArgb(0, 0, 0, 0), 90.0); OpacityAnim(MainGrid); LogBox.Text = "- - - - - - - -"; DragBorder.Visibility = System.Windows.Visibility.Visible; Process[] bdcam = Process.GetProcessesByName("bdcam"); if (bdcam.Length >= 1) { MessageBox.Show("MW Debug is not compatible with bandicam\n\nBut you can use Bandicam, just start him after MW Debug & game", "MW Debug Compatibility Error"); } if (Funcs.ProgCfg.Settings["firstRun"] == "1") { Funcs.ProgCfg.Settings["firstRun"] = "0"; Funcs.ProgCfg.Save(); Process.Start("https://www.youtube.com/playlist?list=PLldQ4sw27DSkxgmoznGHu0kbp0QHh6FAX"); Process.Start("https://www.instagram.com/_dz3n_kurwa_"); } MWDBG.StartTrainer(this); t.Elapsed += t_Elapsed; t.Start(); }
public static IntPtr AllocateVehicleParams(uint CarHash, IntPtr Vector3Position, IntPtr Vector3Rotation, uint driverClass = 3, uint customization = 0, uint AIRelated = 0, uint importanceRelated = 2) { var allocatedMemory = MWDBG.m.Memory.Allocate(48); allocatedMemory.MustBeDisposed = false; uint[] array = { 0x9FB193F0, 0x0A6B47FAC, (uint)allocatedMemory.BaseAddress, 0, driverClass, CarHash, (uint)Vector3Position, (uint)Vector3Rotation, customization, AIRelated, 0, importanceRelated }; byte[] vars = array.SelectMany(BitConverter.GetBytes).ToArray(); MWDBG.WriteMemoryArray((uint)allocatedMemory.BaseAddress, vars); return(allocatedMemory.BaseAddress); }
public static GameCord GetCurrentCords(int offset) { GameCord c = new GameCord(); c.x = MWDBG.readMem <float>(Info.Object.X + MWDBG.GetOffsetId(offset)); c.y = MWDBG.readMem <float>(Info.Object.Y + MWDBG.GetOffsetId(offset)); c.z = MWDBG.readMem <float>(Info.Object.Z + MWDBG.GetOffsetId(offset)); c.r1 = MWDBG.readMem <float>(Info.Object.RotX + MWDBG.GetOffsetId(offset)); c.r2 = MWDBG.readMem <float>(Info.Object.RotY + MWDBG.GetOffsetId(offset)); c.r3 = MWDBG.readMem <float>(Info.Object.RotZ + MWDBG.GetOffsetId(offset)); c.r4 = MWDBG.readMem <float>(Info.Object.RotW + MWDBG.GetOffsetId(offset)); return(c); }
public static void SkipFE_Load() { if (MWDBG.readMem <int>(Info.GameState) != 3) { MWDBG.m[(IntPtr)0x6052B0 - 0x400000].Execute(); while (MWDBG.readMem <int>(Info.GameState) != 3) { Thread.Sleep(20); } } MWDBG.writeMem <int>(Info.SkipFE.Enabled, 1); MWDBG.m[(IntPtr)0x56C5B0 - 0x400000].Execute(); }
private void SkipFeOk_Click(object sender, RoutedEventArgs e) { MWDBG.m.Windows.MainWindow.Activate(); string name = (string)SkipFeCarBox.SelectedItem; var MemModel = MWDBG.m.Memory.Allocate(name.Length); MemModel.WriteString(name); MemModel.MustBeDisposed = false; MWDBG.writeMem <int>(Info.SkipFE.PlayerCar, MemModel.BaseAddress.ToInt32()); MWD.SkipFE_Load(); }
private void CallFEBtn_Click(object sender, RoutedEventArgs e) { if ((bool)fngCallActivate.IsChecked) { MWDBG.m.Windows.MainWindow.Activate(); } MWDBG.m.Assembly.Inject("nop", (IntPtr)0x005C50B1); MWDBG.m.Assembly.Inject("nop", (IntPtr)0x005C50B2); MWDBG.m.Assembly.Inject("nop", (IntPtr)0x005C50B3); //MWDBG.m.Assembly.Inject("xor al, al", (IntPtr)0x0057DBB0); //MWDBG.m.Assembly.Inject("ret", (IntPtr)0x0057DBB1); CallFngResult.Text = ""; Int32 cfeng = MWDBG.readMem <Int32>((IntPtr)0x91CADC); if ((bool)asMessage.IsChecked) { Int32 callResult = MWDBG.m[(IntPtr)0x516BE0, false].Execute <Int32>(Binarysharp.MemoryManagement.Assembly.CallingConvention.CallingConventions.Thiscall, cfeng, 0, FngNameBox.Text, -4, 255); CallFngResult.Text += "FNG Msg: " + callResult; } else { if ((bool)switchPackage.IsChecked) { Int32 callResult = MWDBG.m[(IntPtr)0x525940, false].Execute <Int32>(Binarysharp.MemoryManagement.Assembly.CallingConvention.CallingConventions.Thiscall, cfeng, FngNameBox.Text, (Int32)0, (uint)0, 0); CallFngResult.Text += "FNG Call 1: " + callResult; } else if ((bool)noControlP.IsChecked) { Int32 callResult = MWDBG.m[(IntPtr)0x516990, false].Execute <Int32>(Binarysharp.MemoryManagement.Assembly.CallingConvention.CallingConventions.Thiscall, cfeng, FngNameBox.Text, 0x64); CallFngResult.Text += "FNG Call 2: " + callResult; } else if ((bool)unkFnk.IsChecked) { Int32 callResult = MWDBG.m[(IntPtr)0x5257F0, false].Execute <Int32>(Binarysharp.MemoryManagement.Assembly.CallingConvention.CallingConventions.Thiscall, cfeng, FngNameBox.Text, 0, 0, 0); CallFngResult.Text += "FNG Call 3: " + callResult; } } }
public static void SpawnCar(uint CarHash, Vector3 position, Vector3 rotation, uint driverClass = 3, uint customization = 0, uint AIRelated = 0, uint importanceRelated = 2) { //0x06465EB2 - hash IntPtr posV = Vector3c.Allocate(position); IntPtr rotV = Vector3c.Allocate(rotation); IntPtr vehParams = AllocateVehicleParams(CarHash, posV, rotV, driverClass, customization, AIRelated, importanceRelated); MWDBG.mWnd.AppendLog("Position = 0x" + posV.ToString("X4")); MWDBG.mWnd.AppendLog("Rotation = 0x" + rotV.ToString("X4")); MWDBG.mWnd.AppendLog("vehParams = 0x" + vehParams.ToString("X4")); MWDBG.mWnd.AppendLog(" "); MWDBG.mWnd.AppendLog("rot[0] from mem: " + MWDBG.readMem <float>(rotV)); MWDBG.mWnd.AppendLog("rot[1] from mem: " + MWDBG.readMem <float>(rotV + 4)); MWDBG.mWnd.AppendLog("rot[2] from mem: " + MWDBG.readMem <float>(rotV + 4 + 4)); MWDBG.mWnd.AppendLog(" "); MWDBG.mWnd.AppendLog("mem vehP[0]: 0x" + MWDBG.readMem <uint>(vehParams).ToString("X4")); MWDBG.mWnd.AppendLog("mem vehP[1]: 0x" + MWDBG.readMem <uint>(vehParams + 4).ToString("X4")); MWDBG.mWnd.AppendLog("mem vehP[2]: 0x" + MWDBG.readMem <uint>(vehParams + 4 + 4).ToString("X4")); MWDBG.mWnd.AppendLog("mem vehP[3]: 0x" + MWDBG.readMem <uint>(vehParams + 4 + 4 + 4).ToString("X4")); MWDBG.mWnd.AppendLog("mem vehP[4]: 0x" + MWDBG.readMem <uint>(vehParams + 4 + 4 + 4 + 4).ToString("X4")); //MWDBG.m[(IntPtr)0x689820, false].Execute(Binarysharp.MemoryManagement.Assembly.CallingConvention.CallingConventions.Cdecl, vehParams, 0x0A6B47FAC); }
public static void StartHoo() { MWDBG.SetLog("Launching hoo script"); MWDBG.m[Info.BooBoo.PreCullerFunc - 0x400000].Execute(); MWDBG.SetLog("Done"); }
private void SetPlayersCarOk_Click(object sender, RoutedEventArgs e) { MWDBG.m.Windows.MainWindow.Activate(); MWDBG.SetLog("Result: " + MWD.SetPlayerCar(NewCar.Text)); }
public static void Set(MemorySharp m, float value) { MWDBG.writeMem <float>(Info.GameSpeed, value); }
public static void Increase(MemorySharp m) { MWDBG.writeMem <float>(Info.GameSpeed, Get(m) + 0.1f); }
public static float Get(MemorySharp m) { return(MWDBG.readMem <float>(Info.GameSpeed)); }