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 


how to deal with movss?

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

Joined: 29 Nov 2017
Posts: 2

PostPosted: Fri Jun 08, 2018 8:27 am    Post subject: how to deal with movss? Reply with quote

Hello i have a script that has movss in it and i want to edit it so it can add a value (specifically 100). I know that i can use (Int)100 (or float or double instead of Int) but with movss it doesn't work.

Example of normal mov script that works
Code:
code:
  mov [rdi+28],eax
  mov [rdi+28],(Int)999
  mov rcx,rdi
  jmp return


This is what i want to edit
Code:
code:
  movss [rsi+0000032C],xmm5
  jmp return


Is there a way to do it with AOB? I know about the 90 90 but all it does is prevent the mechanic from executing (preventing health from dropping, etc) but What I want is to add values.

I tried
Code:
code:
  movss [rsi+0000032C],xmm5
  add [rsi+0000032C],(Int)100
  jmp return

but it doesn't work.
Inc gives an error and addss gives an error too.
removing xmm5 glitches the game so i can't remove it
Please help! Thanks so much in advance.
Back to top
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Fri Jun 08, 2018 9:47 am    Post subject: Reply with quote

movss
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote:
i am a sweetheart.
Back to top
View user's profile Send private message Visit poster's website
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Fri Jun 08, 2018 1:44 pm    Post subject: Reply with quote

movss works with floats, add works with ints, they're completely different formats. Use addss with the address of a float (set to what you want), one way would be something like

Code:
// save rax (we'll overwrite it later)
push rax
// push value to add to stack
push (float)100
// load and add from stack
addss xmm5, dword ptr [rsp]
// remove from stack
pop rax
// restore rax
pop rax
// write value to memory
movss [rsi+0000032C],xmm5


You can do it without changing eax by using add esp,4 but iirc x64 will always push 8 bytes so you'd need add rsp,8 in x64. The above will work for both without changes (thanks to CE doing the right thing instead of throwing pedantic errors).

_________________
https://github.com/FreeER/ has a few CE related repos
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