Solved Coding a simple memory hack

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

KneeGrow

Newbie
Oct 19, 2014
3
102
0
Update:
I eventually got it to work, with the help of a friend who provided me with the correct parameters for some of the functions, as well as making some methods to save time.
The problem is the value I have does not have any effect once changed.
So the only way I know how to change the value I want is modifying the assembly code.
The register writes to the value I tried to change.

Is there a way I can read and write to registers using C++?

Updated Code
https://pastebin.com/SVSrkvuY
 
Last edited:

Solaire

Respected Hacker
Dank Tier VIP
Dec 15, 2013
1,051
16,353
62
FindWindow, GetWindowThreadProcessId, and OpenProcess are the first functions on MSDN you want to look up. They will allow you to grab a handle to that process using these directions:
1) Grab a handle to the window using FindWindow
2) Use that handle to get the process identifier through GetWindowThreadProcessId
3) Get a handle to the process and grant PROCESS_ALL_ACCESS rights through OpenProcess

After that, you can input the handle into WriteProcessMemory for memory writing to the other process.

WriteProcessMemory has simple parameters.

The first is the handle to the process you want to modify memory in.
The second is the address you want to write to.
The third is the value you want to write to that address.
The fourth is the number of bytes you want to write.
The fifth is the number of bytes written. The value is stored in this variable. You can leave this at NULL.

It's really not that hard, just be sure to read up on the functions through MSDN. They explain everything very clearly.

One last note. If you don't know enough C++ for this, please learn more C++ before trying to write it. Otherwise you will run in to a whole grand amount of problems when something you don't know in C++ yet pops up.

If you have any questions regarding this, I am happy to answer :)


Happy hacking,
Solaire
 
Last edited:

GAFO666

Hacker
Meme Tier VIP
Aug 19, 2012
520
3,188
23
yeh or just make it internal and then

C++:
...
int* attackState = 0x123456; //or getmodulehandle together with a cast or after each other if its inside of an module ..
...
*attackState  = 666;
...
 

KneeGrow

Newbie
Oct 19, 2014
3
102
0
For some reason I can't see my thread description 0.0
owell

A friend helped me with the code, which functions normally, only I had the wrong address.
The one I have does not change the animation for it is overwritten by something else.

I know where that is but the only way I know how to access it is through assembly code registers.
I also have the correct address for that as well.

Is there a way to read/write to registers in C++?
 

Liduen

Hacker
Dank Tier VIP
May 19, 2013
702
8,478
33
For some reason I can't see my thread description 0.0
owell

A friend helped me with the code, which functions normally, only I had the wrong address.
The one I have does not change the animation for it is overwritten by something else.

I know where that is but the only way I know how to access it is through assembly code registers.
I also have the correct address for that as well.

Is there a way to read/write to registers in C++?
Inline assembly:
C++:
// in your hook 
DWORD a;
_asm add eax, 3; // whatever
_asm mov a, eax; // and vice versa
 
Last edited:
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.

Similar threads

Community Mods