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 


Making Auto Assembler Code Permanent

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

Joined: 29 Jan 2023
Posts: 2

PostPosted: Sun Jan 29, 2023 5:10 am    Post subject: Making Auto Assembler Code Permanent Reply with quote

I want to make my code permanent by modifying the assembly code with cheat engine. To change the value of xmm register, it must come from another address and i don't know how to create a new address and assign a value to it. I just simply want have fixed value(500) of XMM12 register.
My plan is to find a code cave jump there, set 500 to [x], set xmm12 to [x] and jump back.
Thank you.


Code:

[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048,"a.exe"+2EA6B)
label(returnhere)
label(originalcode)
label(exit)
alloc(hr,4,"a.exe"+2EA65)
x:
dd (float)500

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

originalcode:
addss xmm12,[x]

exit:
jmp returnhere

"a.exe"+2EA6B:
jmp newmem
returnhere:

[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
dealloc(x)
"a.exe"+2EA6B:
addss xmm12,xmm8
//Alt: db F3 45 0F 58 E0
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Sun Jan 29, 2023 7:05 am    Post subject: Reply with quote

do the code injection with your codecave (so get rid of alloc)

and then tools patchscan

select all changes and rightclick. there is a option somewhere to save the changes to file

_________________
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
hju
How do I cheat?
Reputation: 0

Joined: 29 Jan 2023
Posts: 2

PostPosted: Mon Jan 30, 2023 5:04 am    Post subject: Reply with quote

Thank you. Couldn't make it work but i managed to do it by assigning value to the register.
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