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 


Stopping an Address from being written to

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

Joined: 09 Mar 2022
Posts: 19

PostPosted: Sun Jan 14, 2024 7:35 pm    Post subject: Stopping an Address from being written to Reply with quote

How would you stop an instruction from writing to one address out of many listed under the "Find out what addresses this instruction accesses" menu?

For further clarity: This instruction (movdqu [rcx],xmm0) is constantly writing to hundreds of addresses, so I want it to stop writing to one out of those hundreds.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Sun Jan 14, 2024 7:57 pm    Post subject: Reply with quote

check if rcx is the specific address (cmp rcx,[addressthatholdstheaddresstoskip] ) and if so skip the write (je after)
_________________
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
bismult
Newbie cheater
Reputation: 0

Joined: 09 Mar 2022
Posts: 19

PostPosted: Sun Jan 14, 2024 8:41 pm    Post subject: Reply with quote

Dark Byte wrote:
check if rcx is the specific address (cmp rcx,[addressthatholdstheaddresstoskip] ) and if so skip the write (je after)


Doesn't seem to be working for me. Is the original code still being executed despite the je?

Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048,7FF8D1645C49)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
cmp rcx,[7FF8D4014700]
je returnhere

originalcode:
mov [rcx+r9*2],ax

exit:
jmp returnhere

7FF8D1645C49:
jmp newmem
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
7FF8D1645C49:
mov [rcx+r9*2],ax
//Alt: db 66 42 89 04 49
[/code]
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4289

PostPosted: Mon Jan 15, 2024 1:51 am    Post subject: Reply with quote

Edit: removing the square brackets won't work- I forgot there is no `cmp r/m64,imm64` instruction
If 7FF8D4014700 is the actual address you're checking and not a pointer to the address to check, remove the square brackets.
Such a script probably won't work the next time you launch the game- memory is randomly allocated.

And I'd use `je exit` instead of `je returnhere`, but either works.

_________________
I don't know where I'm going, but I'll figure it out when I get there.


Last edited by ParkourPenguin on Mon Jan 15, 2024 12:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Mon Jan 15, 2024 2:11 am    Post subject: Reply with quote

cmp reg,imm64 doesn't exist he has to alloc some memory first

so
Code:

alloc(addresstoskip,8)
addresstoskip:
dq 7FF8D4014700
...

cmp rcx,[addresstoskip]
je exit

also je has a limited range. Best to use je exit

_________________
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
bismult
Newbie cheater
Reputation: 0

Joined: 09 Mar 2022
Posts: 19

PostPosted: Mon Jan 15, 2024 7:15 pm    Post subject: Reply with quote

Dark Byte wrote:
cmp reg,imm64 doesn't exist he has to alloc some memory first

so
Code:

alloc(addresstoskip,8)
addresstoskip:
dq 7FF8D4014700
...

cmp rcx,[addresstoskip]
je exit

also je has a limited range. Best to use je exit


This worked perfectly!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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