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 access third and 4th xmm register value in Assembly

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

Joined: 23 Jan 2023
Posts: 11

PostPosted: Mon Jan 23, 2023 3:11 pm    Post subject: How to access third and 4th xmm register value in Assembly Reply with quote

Like the user in this forum post:
*can't post link yet as i'm a new user so: bypassing by removing the dots.
www cheatengine org/forum/viewtopic.php?t=617336&sid=95e947aa9bdde5adbe2d2dc1eb4b31e5

I was able to get my X value.
With the help of link above i was able to get the Y

But now i am basically facing the same brick wall.

Here's my current code:

[...]
newmem:

cmp [rdx+10],(int)1
jne originalcode
movaps xmm13,xmm0
movaps xmm14,xmm0
movaps xmm15,xmm0
movss [rdx-1000],xmm0 //X
shufps xmm13,xmm13,85
movss [rdx-FFC],xmm13 //Y
shufps xmm14,xmm14, // what number or hex do i put here to get the 3rd column? <-------
movss [rdx-FF8],xmm14 //Z
shufps xmm15,xmm15, // what number or hex do i put here to get the 4th column? <-------
movss [rdx-FF8],xmm15 //Facing Value
jmp originalcode

originalcode:
movups [rdx+60],xmm0
sub rdx,-80
[...]
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4719

PostPosted: Mon Jan 23, 2023 3:54 pm    Post subject: Reply with quote

TwinShards wrote:
...
movss [rdx-FF8],xmm14 //Z
shufps xmm15,xmm15, // what number or hex do i put here to get the 4th column? <-------
movss [rdx-FF8],xmm15
...
I'm guessing the last offset should be `-FF4` instead of `-FF8`

You don't need to do anything with shufps. All 4 floats are stored in memory in the same order as they appear in the register, so simply use movups to move all of them at once.
Code:
newmem:
  cmp [rdx+10],1
  jne originalcode
  movups [rdx-1000],xmm0  // stores X at [rdx-1000], Y at [rdx-FFC], Z at [rdx-FF8], and F at [rdx-FF4]
originalcode:
  ...

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

Joined: 23 Jan 2023
Posts: 11

PostPosted: Mon Jan 23, 2023 4:29 pm    Post subject: Reply with quote

ParkourPenguin wrote:
I'm guessing the last offset should be `-FF4` instead of `-FF8`

You don't need to do anything with shufps. All 4 floats are stored in memory in the same order as they appear in the register, so simply use movups to move all of them at once.
Code:
newmem:
  cmp [rdx+10],1
  jne originalcode
  movups [rdx-1000],xmm0  // stores X at [rdx-1000], Y at [rdx-FFC], Z at [rdx-FF8], and F at [rdx-FF4]
originalcode:
  ...


"I'm guessing the last offset should be `-FF4` instead of `-FF8`" yes i just made a small mistake while writing this post.

Thanks for the help! I'm dumb. I don't know why i was trying to use "ss" instead of "ups" like the original code.

Have a nice day!
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