Solved RPM in C#

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

PwndDepot

I has a status
Dank Tier VIP
Trump Tier Donator
Dank Tier Donator
Nov 5, 2014
239
7,748
19
So I thought that going from (very little) c++ knowledge to C# would be easier when it comes to RPM and WPM, but I am so freakin lost with all of this. Perhaps it's not a good idea to learn 2 languages at onces?

Anyways i'm trying to read a multi level pointer, and yes this code is really really xxxxty but i'm trying to get the hang of this crap in C#, all of this casting and conversion stuff is really confusing me.
This is what I have so far
C++:
                    UIntPtr bytesWritten;
                    IntPtr pointerAddress = (IntPtr) HexToDec("0x01A72580");
                    myMemory.ReadProcess = myProcess[0];
                    myMemory.Open();
                    Process process = Process.GetProcessesByName("DyingLightGame")[0];
                    IntPtr processHandle = OpenProcess(PROCESS_WM_READ, false, process.Id);
                    IntPtr MyAddress = IntPtr.Add(BaseAddress, 0x01A72580);

                    byte[] buffer = new byte[8];
                    ReadProcessMemory(processHandle, MyAddress, buffer, 8, out bytesWritten);

                    // Convert byte to IntPtr
                    GCHandle pinned = GCHandle.Alloc(buffer, GCHandleType.Pinned);
                    IntPtr newaddy = pinned.AddrOfPinnedObject();
                    MyAddress = IntPtr.Add(newaddy, healthOffset[0]);

                    buffer = new byte[8];
                    ReadProcessMemory(processHandle, MyAddress, buffer, 8, out bytesWritten);
                    MessageBox.Show(Convert.ToString(BitConverter.ToInt64(buffer, 0)));
The first RPM works just fine, getting me to the address D2DCADE0, but the second one is returning 0. Would really appreciate some help :D
 

till0sch

Respected Hacker
Dank Tier VIP
Dank Tier Donator
Oct 14, 2012
1,104
12,593
51
So I thought that going from (very little) c++ knowledge to C# would be easier when it comes to RPM and WPM, but I am so freakin lost with all of this. Perhaps it's not a good idea to learn 2 languages at onces?

Anyways i'm trying to read a multi level pointer, and yes this code is really really xxxxty but i'm trying to get the hang of this crap in C#, all of this casting and conversion stuff is really confusing me.
This is what I have so far
C++:
                    UIntPtr bytesWritten;
                    IntPtr pointerAddress = (IntPtr) HexToDec("0x01A72580");
                    myMemory.ReadProcess = myProcess[0];
                    myMemory.Open();
                    Process process = Process.GetProcessesByName("DyingLightGame")[0];
                    IntPtr processHandle = OpenProcess(PROCESS_WM_READ, false, process.Id);
                    IntPtr MyAddress = IntPtr.Add(BaseAddress, 0x01A72580);

                    byte[] buffer = new byte[8];
                    ReadProcessMemory(processHandle, MyAddress, buffer, 8, out bytesWritten);

                    // Convert byte to IntPtr
                    GCHandle pinned = GCHandle.Alloc(buffer, GCHandleType.Pinned);
                    IntPtr newaddy = pinned.AddrOfPinnedObject();
                    MyAddress = IntPtr.Add(newaddy, healthOffset[0]);

                    buffer = new byte[8];
                    ReadProcessMemory(processHandle, MyAddress, buffer, 8, out bytesWritten);
                    MessageBox.Show(Convert.ToString(BitConverter.ToInt64(buffer, 0)));
The first RPM works just fine, getting me to the address D2DCADE0, but the second one is returning 0. Would really appreciate some help :D
Try that "Convert byte to IntPtr" by using a BitConverter. Having read your address into buffer, you should use a BitConverter and use the converted 64 bit integer as address (use cast).
 

PwndDepot

I has a status
Dank Tier VIP
Trump Tier Donator
Dank Tier Donator
Nov 5, 2014
239
7,748
19
Try that "Convert byte to IntPtr" by using a BitConverter. Having read your address into buffer, you should use a BitConverter and use the converted 64 bit integer as address (use cast).
Thank you!!!!!!!!!!! Works perfectly :cool:

Why use C# anyway
Because i'm a noob and i'm only making a simple memory hack and it's easier for me to make GUIs in C# :smile:
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods