private void button1_Click(object sender, EventArgs e) { //this.Text = Guid.NewGuid().ToString().Replace("-", ""); //// SET UP SIGSCANNER //Helpers.QQScan SigScan = new Helpers.QQScan(G.hProcess); //// GET BASE ADDRESS OF GAME PROCESS //IntPtr[] hMods = new IntPtr[1024]; //var pModules = GCHandle.Alloc(hMods, GCHandleType.Pinned); //uint size = (uint)IntPtr.Size * 1024; //uint cbNeeded; //if (Win32.EnumProcessModules(G.hProcess, pModules.AddrOfPinnedObject(), size, out cbNeeded)) //{ // //G.Memory = new QQMM(G.hProcess, hMods[0]); // INITIALISE MEMORY CLASS // int cb = Marshal.SizeOf(typeof(Win32._MODULEINFO)); // Win32._MODULEINFO modinfo; // Win32.GetModuleInformation(G.hProcess, hMods[0], out modinfo, cb); // //Console.WriteLine("GET OFFSETS"); // // GET OFFSETS // if (SigScan.SelectModule(hMods[0]/*MAIN MODULE*/, modinfo.SizeOfImage)) // { // long lTime = 0; // var GWorldAddress = (IntPtr)SigScan.FindPattern("48 8B 1D ? ? ? ? 74 40", out lTime); // Console.WriteLine(GWorldAddress.ToString("x2")); // var GWorldOffset = M.Read<uint>(GWorldAddress + 3) + 7; // Console.WriteLine(GWorldOffset.ToString("x2")); // var ppUWorld = (IntPtr)((ulong)GWorldAddress + GWorldOffset); // G.pUWorld = M.Read<IntPtr>(ppUWorld); // } // else // { // MessageBox.Show("GET OFFSETS Failed"); // //Application.Exit(); // } //} GNames namearray = M.Read <GNames>((IntPtr)G.GNamesAddress); G.Names = namearray.GetStaticArray().DumpNames(); G.pUWorld = M.Read <IntPtr>(G.ppUWorld); //Thread.Sleep(2000); Console.WriteLine("get G.pUWorld done"); var tempworld = M.Read <UWorld>(G.pUWorld); var tempOwningGameInstance = M.Read <UGameInstance>(tempworld.pOwningGameInstance); // END FIX G.UWorld = M.Read <UWorld>(/*G.pUWorld*/ tempOwningGameInstance.LocalPlayer.ViewportClient.pUWorld); G.ULevel = M.Read <ULevel>(G.UWorld.pPersistentLevel); G.OwningGameInstance = M.Read <UGameInstance>(G.UWorld.pOwningGameInstance); QQctor.g_pLocalPlayer = G.OwningGameInstance.LocalPlayer.PlayerController.pLocalPlayer; //this.TEntityLoop.Resume(); //this.TQQloop.Resume(); MessageBox.Show("done"); }
private void QQChatForm_Load(object sender, EventArgs e) { this.Size = new Size(this.Size.Width + fucs.randint(), this.Size.Height + Wininit.fucs.randint()); this.label1.Text = Const.MemberNo.ToString(); //this.Text = Guid.NewGuid().ToString().Replace("-", "") + ""; // SET UP SIGSCANNER Helpers.QQScan SigScan = new Helpers.QQScan(G.hProcess); // GET BASE ADDRESS OF GAME PROCESS IntPtr[] hMods = new IntPtr[1024]; var pModules = GCHandle.Alloc(hMods, GCHandleType.Pinned); uint size = (uint)IntPtr.Size * 1024; uint cbNeeded; if (Win32.EnumProcessModules(G.hProcess, pModules.AddrOfPinnedObject(), size, out cbNeeded)) { G.Memory = new QQMM(G.hProcess, hMods[0]); // INITIALISE MEMORY CLASS int cb = Marshal.SizeOf(typeof(Win32._MODULEINFO)); Win32._MODULEINFO modinfo; Win32.GetModuleInformation(G.hProcess, hMods[0], out modinfo, cb); //Console.WriteLine("GET OFFSETS"); // GET OFFSETS if (SigScan.SelectModule(hMods[0] /*MAIN MODULE*/, modinfo.SizeOfImage)) { long lTime = 0; var GWorldAddress = (IntPtr)SigScan.FindPattern("48 8B 1D ? ? ? ? 74 40", out lTime); Console.WriteLine(GWorldAddress.ToString("x2")); var GWorldOffset = M.Read <uint>(GWorldAddress + 3) + 7; Console.WriteLine(GWorldOffset.ToString("x2")); G.ppUWorld = (IntPtr)((ulong)GWorldAddress + GWorldOffset); Console.WriteLine($"ppUWorld = {G.ppUWorld.ToString("x2")}"); G.pUWorld = M.Read <IntPtr>(G.ppUWorld); Console.WriteLine($"G.pUWorld = {G.pUWorld.ToString("x2")}"); Console.WriteLine($"F o u n d U W or l d at 0x{((ulong)G.ppUWorld - (ulong)hMods[0]).ToString("x2")} - {lTime}ms"); G.GNamesAddress = SigScan.FindPattern("48 89 1D ? ? ? ? 48 8B 5C 24 ? 48 83 C4 28 C3 48 8B 5C 24 ? 48 89 05 ? ? ? ? 48 83 C4 28 C3", out lTime); var GNamesOffset = M.Read <uint>((IntPtr)G.GNamesAddress + 3); G.GNamesAddress += GNamesOffset + 7; Console.WriteLine($"Fo u n d GN a mes at 0x{(G.GNamesAddress - (ulong)hMods[0]).ToString("x2")} - {lTime}ms"); GNames namearray = M.Read <GNames>((IntPtr)G.GNamesAddress); //Thread.Sleep(1000000); Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); G.Names = namearray.GetStaticArray().DumpNames(); stopwatch.Stop(); Console.WriteLine($"D u mp G Na m es - {stopwatch.ElapsedMilliseconds}ms"); } else { MessageBox.Show("GET OFFSETS Failed"); Application.Exit(); } } else { MessageBox.Show("SelectModule Failed"); Application.Exit(); } // NO NASTY MEMORY LEAKS HERE pModules.Free(); this.TEntityLoop = new Thread(QQChat.EntityLoop); this.TQQloop = new Thread(QQChat.QQloop); this.TEntityLoop.Start(); this.TQQloop.Start(); //new Thread(QQChat.EntityLoop).Start(); //new Thread(QQChat.QQloop).Start(); // SHOW OVERLAY this.QQForm = new QQForm(); this.QQForm.Show(); //MessageBox.Show("Form comes"); }