Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Negative Hex Offset

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
justicar
How do I cheat?
Reputation: 0

Joined: 22 Mar 2012
Posts: 2

PostPosted: Thu Mar 22, 2012 4:22 am    Post subject: Negative Hex Offset Reply with quote

I've followed several tutorials showing how to find a pointer to a memory location that will persist after restarting the target app. However, when manually adding a pointer/offset, the offset I find is negative like this:

Code:
012D14EE - 8B 45 F8  - mov eax,[ebp-08]
012D14F1 - 83 C0 01 - add eax,01
012D14F4 - 89 45 F8  - mov [ebp-08],eax <<
012D14F7 - 8B F4  - mov esi,esp
012D14F9 - A1 34A32D01 - mov eax,[_imp_?endlstdYAAAV?$basic_ostreamDU?$char_traitsDstd]

EAX=0000303E
EBX=7EFDE000
ECX=26FAF52D
EDX=5151F498
ESI=001FF758
EDI=001FF754
ESP=001FF758
EBP=001FF83C
EIP=012D14F7


I am on Win7 x64, trying CE against a tiny cpp program I wrote. How can I enter this offset value into the textbox?

The program source follows:


Code:
#include <iostream>

using namespace std;

int main()
{
   int zz = 12345;
   int test;

   while (true) {
      zz++;
      cout << "The value is " << zz << endl;
      cin >> test;
   }

   return 1;
}
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25831
Location: The netherlands

PostPosted: Thu Mar 22, 2012 4:41 am    Post subject: Reply with quote

fffffff8 is -8
Anyhow, this is not a pointer but a local stack value (temporary value that will be destroyed as soon as the function returns)

Try this code instead:
Code:

#include <iostream>

using namespace std;
int zz = 12345;
int test;

int main()
{

   while (true) {
      zz++;
      cout << "The value is " << zz << endl;
      cin >> test;
   }

   return 1;
}

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
justicar
How do I cheat?
Reputation: 0

Joined: 22 Mar 2012
Posts: 2

PostPosted: Thu Mar 22, 2012 4:51 am    Post subject: Reply with quote

Comes up green, thank you!

P.S. If the code were written as the original, is there a way to manufacture a pointer that can be used in future invocations of the program?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25831
Location: The netherlands

PostPosted: Thu Mar 22, 2012 9:53 am    Post subject: Reply with quote

no, not unless another piece of code stores that address, or a relative address in a static address
There has to be a link to the address. (e.g direct3d might keep a static pointer to your variable, or a physics engine, etc...)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites