Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void RefreshPlayerList(byte[] Pattern, string PatternMask)
- {
- // List<uint> RetList = new List<uint>();
- int SigSize = PatternMask.Length;
- MemoryRegion = new List<MEMORY_BASIC_INFORMATION>();
- MemInfo(RPM.GetHandle());
- for (int i = 0; i < MemoryRegion.Count; i++)
- {
- byffy = new byte[MemoryRegion[i].RegionSize];
- NativeMethods.ReadProcessMemory(RPM.GetHandle(), (uint)MemoryRegion[i].BaseAddress, byffy, MemoryRegion[i].RegionSize, out IntPtr BytesRead);
- //var result = byffy.AsParallel().Where(x => x == 1).ToList();
- Parallel.For(0, byffy.Length - SigSize, new ParallelOptions { MaxDegreeOfParallelism = 4 }, (x, state) =>
- {
- if (MaskCheck(x, Pattern, PatternMask))
- {
- uint UPlayer = (uint)(MemoryRegion[i].BaseAddress.ToInt32() + x) - 0xAFB; //Player
- bool isInList = playlist.IndexOf((uint)UPlayer) != -1;
- if (!isInList)
- {
- playlist.Add(UPlayer);
- listBox1.Items.Add("Added : PlayerIndex" + playlist.IndexOf(UPlayer) + " | Balance : " + playlist.Count);
- }
- }
- // Thread.Sleep(1);
- //Task.Delay(1);
- });
- // System.Threading.Thread.Sleep(1);
- }
- //return RetList;
- }
- gameManager.RefreshPlayerList(new byte[] { 0x50, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00 }, "xx??xxxx?");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement