| View previous topic :: View next topic |
| Author |
Message |
rlzgh How do I cheat?
Reputation: 0
Joined: 25 Aug 2014 Posts: 3
|
Posted: Mon Aug 25, 2014 7:33 am Post subject: C++ Console Trainer help. |
|
|
Hey guys,
| Code: | DWORD pointed;
WORD movSpeedOffset = 0x80;
int currMovSpeed = 0;
int movSpeedVal;
ReadProcessMemory(hProc, (LPCVOID)(movSpeedptr), &pointed, sizeof(pointed), NULL);
ReadProcessMemory(hProc, (LPCVOID)(pointed + movSpeedOffset), &currMovSpeed, sizeof(currMovSpeed), NULL);
cout << "\nYour current movSpeed = " << currMovSpeed << endl << endl;
cout << "Enter new movSpeed: " << endl;
cin >> movSpeedVal;
WriteProcessMemory(hProc, (LPVOID)(pointed + movSpeedOffset), &movSpeedVal, sizeof(movSpeedVal), NULL); |
this is my main code.
it works well but to to get movSpeed to work properly i have to NOP it and not only changing its value because it resets if i dont NOP it.
so my question is how do i NOP it in c++?
thx in advance =)
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Mon Aug 25, 2014 1:05 pm Post subject: |
|
|
NOP in byte value 0x90, so just write 0x90 to the address that you need to nop. Be sure to write the proper amount of nops to completely overwrite the instruction or else you will land up crashing due to an invalid instruction.
_________________
- Retired. |
|
| Back to top |
|
 |
rlzgh How do I cheat?
Reputation: 0
Joined: 25 Aug 2014 Posts: 3
|
Posted: Mon Aug 25, 2014 7:10 pm Post subject: |
|
|
thanks for your answer mate.
not sure if i understood correctly but shouldnt this work?
| Code: |
DWORD pointed;
BYTE timeNop = 0x90;
ReadProcessMemory(hProc, (LPCVOID)(timePtr), &pointed, sizeof(pointed), NULL);
WriteProcessMemory(hProc, (LPVOID)(pointed + timeOff), &timeNop, sizeof(timeNop), NULL);
|
cheers!
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Mon Aug 25, 2014 10:45 pm Post subject: |
|
|
That will only write 1 nop, if the instruction you are trying to nop is longer, then you need to write more than one.
_________________
- Retired. |
|
| Back to top |
|
 |
rlzgh How do I cheat?
Reputation: 0
Joined: 25 Aug 2014 Posts: 3
|
Posted: Tue Aug 26, 2014 3:29 am Post subject: |
|
|
yes i just saw i need to nop 4 bytes. but it gives me a ridiculous amount of time value when i do this -_-.
could it be because the time value isnt just 50, 49, 48.. instead it looks like this. 645482XX, where XX is the actual time value?
thx for your answers mate!
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Tue Aug 26, 2014 2:44 pm Post subject: |
|
|
Are you sure the time isn't stored in seconds or milliseconds?
_________________
- Retired. |
|
| Back to top |
|
 |
|