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 


Set double dereferenced pointer with offset in Auto Assembly

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
gir489
Grandmaster Cheater
Reputation: 14

Joined: 03 Jan 2012
Posts: 835
Location: Maryland, United States

PostPosted: Tue May 16, 2023 8:22 pm    Post subject: Set double dereferenced pointer with offset in Auto Assembly Reply with quote

I am reading a dynamic part of memory to grab a pointer from some assembly that's created upon instantiation.

Code:
devmodePointer:
readmem(aob_devmodePointer+A, 8)


That's the easy part. The hard part is, I need to dereference it twice and then read +5F0 from it, and then write either 1 for enable or 0 for disable.

Originally, I was going to have Cheat Engine just invert the value, set the pointer to 1 if it's 0 and vice versa, but there doesn't seem to be a way to do that. I have to do this in auto assembly.

What I tried was this:

Code:
[[devmodePointer+0]+5F0]:
db 1


But that gives me an error that devmodePointer is an invalid address.

This is how I have the pointer correctly working and reading as an address:

Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Tue May 16, 2023 8:52 pm    Post subject: Reply with quote

The thing before the `:` is an address, not a value. Remove the outside square brackets. The way it is now, it's like there's a third offset of 0.
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
gir489
Grandmaster Cheater
Reputation: 14

Joined: 03 Jan 2012
Posts: 835
Location: Maryland, United States

PostPosted: Tue May 16, 2023 9:10 pm    Post subject: Reply with quote

ParkourPenguin wrote:
The thing before the `:` is an address, not a value. Remove the outside square brackets. The way it is now, it's like there's a third offset of 0.

I have no idea what you're talking about, you're being too generic. What thing, which line, there's two lines that have a colon at the end.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Tue May 16, 2023 10:06 pm    Post subject: Reply with quote

gir489 wrote:
ParkourPenguin wrote:
The thing before the `:` is an address, not a value. Remove the outside square brackets. The way it is now, it's like there's a third offset of 0.

I have no idea what you're talking about, you're being too generic. What thing, which line, there's two lines that have a colon at the end.

"Remove the outside square brackets" is pretty specific in the context of your first post. There's only one line that has square brackets in it...

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Wed May 17, 2023 12:35 am    Post subject: Reply with quote

[[devmodePointer]+0]+5F0
_________________
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
gir489
Grandmaster Cheater
Reputation: 14

Joined: 03 Jan 2012
Posts: 835
Location: Maryland, United States

PostPosted: Wed May 17, 2023 7:23 am    Post subject: Reply with quote

Dark Byte wrote:
[[devmodePointer]+0]+5F0

Error in line 11, This address specifier is not valid. It keeps saying devmodePointer resolves to FFFFFFFFFFFFFFFF, but when I view it, it has the valid pointer address in it.

EDIT: It works in [DISABLE], I just can't get it to work in [ENABLE].
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Wed May 17, 2023 9:31 am    Post subject: Reply with quote

don't put
Code:

devmodePointer:
readmem(aob_devmodePointer+A, 8)

in the same script

first execute this code, then the other
or use
[[aob_devmodePointer+A]+0]+5f0

_________________
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
gir489
Grandmaster Cheater
Reputation: 14

Joined: 03 Jan 2012
Posts: 835
Location: Maryland, United States

PostPosted: Thu May 18, 2023 5:11 pm    Post subject: Reply with quote

Dark Byte wrote:
don't put
Code:

devmodePointer:
readmem(aob_devmodePointer+A, 8)

in the same script

first execute this code, then the other
or use
[[aob_devmodePointer+A]+0]+5f0

Yeah see that requires activating a 2nd script with another key which I had before with the pointer. I also noticed every update the offset changes and I don't feel like updating it every time they push a change, so I instead rewrote the entire script to just hijack every conditional jump where the boolean is read. It's red over 12 times and it's a lot of signatures, but I tested it on as many builds of the game I could get my hands on from torrent sites, and it works on every build. Thanks for the help anyway though.
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