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 


Can't find a pointer to this address?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Kahenraz
Newbie cheater
Reputation: 0

Joined: 29 Jun 2015
Posts: 16

PostPosted: Mon Jun 29, 2015 6:20 am    Post subject: Can't find a pointer to this address? Reply with quote

I have a static code address of: "program.exe"+EDF1C which always modifies a single address which I want a pointer to. The address is easy to find by seeing what this code writes to but it changes every time the program is run.

Despite this code being static and that it always modifies the same (dynamic) address, I'm unable to find a static pointer to it and therefore have to lookup this address from the code list every time I start the game.

Can someone explain why I can't find a static pointer despite already having static code which always writes to the address that I want?
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Mon Jun 29, 2015 6:41 am    Post subject: Reply with quote

There's a difference between static code and static addresses.
This should help you find a static pointer to the address.
http://forum.cheatengine.org/viewtopic.php?t=572465

Another option is to inject some code at that location to pull the dynamic address for you each time.
Select the instruction, then click Tools > Auto Assemble
In Auto assemble, click Template > AOB Injection
Paste that code here in [code][/code] tags
Back to top
View user's profile Send private message
Kahenraz
Newbie cheater
Reputation: 0

Joined: 29 Jun 2015
Posts: 16

PostPosted: Mon Jun 29, 2015 6:56 am    Post subject: Reply with quote

Thank you for your help. I've never used AOB Injection in CE before.

Code:
[ENABLE]

aobscanmodule(INJECT,program.exe,0C 01 70 04 5F 5E) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:

code:
  add [eax+04],esi
  pop edi
  pop esi
  jmp return

INJECT+01:
  jmp code
return:
registersymbol(INJECT)

[DISABLE]

INJECT+01:
  db 01 70 04 5F 5E

unregistersymbol(INJECT)
dealloc(newmem)
Back to top
View user's profile Send private message
Daijobu
Master Cheater
Reputation: 13

Joined: 05 Feb 2013
Posts: 301
Location: the Netherlands

PostPosted: Mon Jun 29, 2015 7:18 am    Post subject: Reply with quote

I'm assuming the following:

Under [ENABLE] add:
Code:
label(myPointer) //create a label
registersymbol(myPointer) //create a symbol for approach in table

newmem+128: //high up for a clear spot in the cave
myPointer: //this is your pointer location at newmem+128

newmem:
push ebx //I have no idea what's available but will just use ebx here
lea ebx,[eax+04] //load effective address eax+04 into ebx
mov [myPointer],ebx //move ebx into myPointer
pop ebx //restore ebx


Under [DISABLE] add:
Code:
unregistersymbol(myPointer)


Enable your script and add myPointer as a pointer to your table with "Add Address Manually".

_________________
Scripts/tables from scratch. Relation to other scripts is coincidental. Use of posted code is credited properly.
Euro Truck Simulator 2 Backwards Compatible Cheat
American Truck Simulator Backwards Compatible Cheat
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Mon Jun 29, 2015 7:51 am    Post subject: Reply with quote

Code:
[ENABLE]
aobscanmodule(INJECT,program.exe,0C 01 70 04 5F 5E)
alloc(newmem,$1000)
alloc(myvar,4)

label(code)
label(return)

newmem:
code:
  mov edi,eax
  add edi,4
  mov [myvar],edi
  add [eax+04],esi
  pop edi
  pop esi
  jmp return

INJECT+01:
  jmp code
return:
registersymbol(INJECT)
registersymbol(myvar)

[DISABLE]
INJECT+01:
  db 01 70 04 5F 5E
unregistersymbol(INJECT)
unregistersymbol(myvar)
dealloc(newmem)
dealloc(myvar)
Add the address "myvar" to your table.
Back to top
View user's profile Send private message
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