View previous topic :: View next topic |
Author |
Message |
Iceworthy How do I cheat?
Reputation: 0
Joined: 12 Oct 2015 Posts: 1
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Mon Oct 12, 2015 12:21 pm Post subject: |
|
|
GetThreadContext
SetThreadContext
_________________
- Retired. |
|
Back to top |
|
 |
STN I post too much
Reputation: 43
Joined: 09 Nov 2005 Posts: 2676
|
Posted: Mon Oct 12, 2015 1:10 pm Post subject: |
|
|
Whats the obsession with debugging from C++ lol
Write an AA script that will change eax, its as simple as
mov eax, #99999
get the bytes for that instruction, call WriteProcessMemory with those bytes and address. DONE
If you don't understand this, read code injection tutorials and get my c++ trainer template (very basic and newb friendly)
http://deviatedhacking.com/topic/832-c-trainer-templates/
_________________
|
|
Back to top |
|
 |
ThereIsNoSpoon How do I cheat?
Reputation: 0
Joined: 27 Oct 2015 Posts: 8 Location: DWORD PTR
|
Posted: Sun Nov 01, 2015 3:25 pm Post subject: |
|
|
This is not an obsession, its all about the beauty of hacking and reverse engeenering craft
|
|
Back to top |
|
 |
n0psl3d How do I cheat?
Reputation: 0
Joined: 30 Sep 2015 Posts: 6 Location: Twin Cities, MN
|
Posted: Mon Nov 09, 2015 4:45 pm Post subject: Re: [C++] How do I change the EAX in C++? |
|
|
Iceworthy wrote: | Hey, trying to make a hack, but I need to change the EAX of an address. How do I accomplish that? I'm pretty new to C++ so I have no idea how.  |
My understanding is that what you are actually asking doesn't make sense, and atm0s just gave you the correct answer to the question you should've been asking.
I'll give you a small Operating Systems lesson for funsies.
EAX is a register that is held by the context of each thread (process) your OS is running. While threads are suspended you can get the current context of that thread via the WINAPI function that atm0s stated above. Then you can modify the EAX value in the Context datastructure it returns then shove it back in with the modified value. The documentation I looked at specified that the thread must be suspended, and regardless I would have told you to suspend the thread beforehand anyways. If the thread was running between your context get/set (which I'm not sure how that would even be retrieved anyways) then potentially other values such as your instruction pointer would be changed back when you set the context which would completely futz with the threads intended behavior.
|
|
Back to top |
|
 |
|