Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void inject()
- {
- long BWrite = 0;
- uint iThread = 0;
- string OverwatchPath = "C:\\Program Files (x86)\\Overwatch\\Overwatch.exe";
- if (File.Exists("Overwatch.exe"))
- {
- OverwatchPath = "Overwatch.exe";
- }
- Process[] Proc = Process.GetProcessesByName("Overwatch");
- if(Proc.Count() > 0)
- {
- Console.WriteLine("[" + DateTime.Now.ToString("HH:mm:ss.fffff") + "] Killing Overwatch First");
- OverwatchPath = Proc[0].MainModule.FileName;
- foreach(var p in Proc)
- {
- p.Kill();
- }
- }
- else
- {
- Console.WriteLine("[" + DateTime.Now.ToString("HH:mm:ss.fffff") + "] Overwatch not found running, try again nigger");
- return;
- }
- if (OverwatchPath == "")
- {
- Console.WriteLine("[" + DateTime.Now.ToString("HH:mm:ss.fffff") + "] Error, Overwatch not found!");
- Console.ReadLine();
- return;
- }
- if(DllPath == "")
- {
- Console.WriteLine("[" + DateTime.Now.ToString("HH:mm:ss.fffff") + "] Error, Injecting failed, Are you premium?");
- Console.ReadLine();
- return;
- }
- ProcessStartInfo startInfo = new ProcessStartInfo();
- startInfo.FileName = OverwatchPath;
- Console.WriteLine("[" + DateTime.Now.ToString("HH:mm:ss.fffff") + "] Starting Overwatch..");
- Process target = Process.Start(startInfo);
- Thread.Sleep(2500);
- //IntPtr hThread = OpenThread(ThreadAccess.SUSPEND_RESUME, false, (uint)target.Threads[0].Id);
- //SuspendThread(hThread);
- //Do Inject Stuff
- this.DllPath = Environment.CurrentDirectory + "\\out.dll";
- IntPtr rHandle = OpenProcess(2035711, false, target.Id);
- byte[] AsmCave = { 0x90, 0x54, 0x48, 0x8B, 0xEC, 0x48, 0xB9, 0xEF, 0xBE, 0xAD, 0xDE, 0xDE, 0xC0, 0xAD, 0xDE, 0x6A, 0x00, 0x6A, 0x00, 0xFF, 0x15, 0x02, 0x00, 0x00, 0x00, 0xEB, 0x08, 0xEF, 0xBE, 0xAD, 0xDE, 0xDE, 0xC0, 0xAD, 0xDE, 0x58, 0x58, 0x48, 0x8B, 0xE5, 0x5D, 0xC3 };
- uint size = (uint)(AsmCave.Length + DllPath.Length);
- byte[] TotalAsmCave = new byte[size];
- long pLoadLibraryExA = (long)GetProcAddress(GetModuleHandle("KERNEL32.dll"), "LoadLibraryA");
- for (int i = 0x1B; i < 0x1B + 0x08; i++)
- {
- AsmCave[i] = BitConverter.GetBytes(pLoadLibraryExA)[i - 0x1B];
- }
- long AllocM = (long)VirtualAllocEx(rHandle, 0, size, AllocationType.Commit, MemoryProtection.ExecuteReadWrite);
- Console.WriteLine("[" + DateTime.Now.ToString("HH:mm:ss.fffff") + "] Calling 0x" + AllocM.ToString("X"));
- for (int i = 0x07; i < 0x07 + 0x08; i++)
- {
- AsmCave[i] = BitConverter.GetBytes(AllocM + AsmCave.Length)[i - 0x07];
- }
- for (int i = 0; i < DllPath.Length; i++)
- {
- TotalAsmCave[i + AsmCave.Length] = (byte)DllPath[i];
- }
- for (int i = 0; i < AsmCave.Length; i++)
- {
- TotalAsmCave[i] = AsmCave[i];
- }
- WriteProcessMemory(rHandle, AllocM, TotalAsmCave, TotalAsmCave.Length, out BWrite);
- this.DllPath = Environment.CurrentDirectory + "\\out.dll";
- if(File.Exists(this.DllPath))
- File.Delete(this.DllPath);
- File.WriteAllBytes(this.DllPath, this.DllBuffer);
- //ResumeThread(hThread);
- //CloseHandle(hThread);
- BypasAntiCheat01(target.Id, true, rHandle);
- CreateRemoteThread(rHandle, IntPtr.Zero, 0, (IntPtr)AllocM, IntPtr.Zero, 0, out iThread);
- if (iThread == 0)
- Console.WriteLine("[" + DateTime.Now.ToString("HH:mm:ss.fffff") + "] CRT failed");
- Thread.Sleep(150);
- BypasAntiCheat01(target.Id, false, rHandle);
- CloseHandle(rHandle);
- this.DllPath = "";
- Console.WriteLine("[" + DateTime.Now.ToString("HH:mm:ss.fffff") + "] Done!");
- Thread.Sleep(5000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement