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 


Address accessed by instruction will not show.

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

Joined: 21 Jan 2020
Posts: 2

PostPosted: Tue Jan 04, 2022 2:15 pm    Post subject: Address accessed by instruction will not show. Reply with quote

Using "find out what writes to this address", I find the same instruction writes to two separate addresses, the X coordinate and the Y coordinate. Using "find out which addresses this instruction accesses", it shows X, but not Y. The instruction enables movement on the X and Y axis, and executes constantly. To further test this I made a code injection comparing the contents of r14, the instruction's register, to the address of Y. Again, they never match.

My aim is to disable movement on the Y axis only.



CodeInjection.PNG
 Description:
 Filesize:  45.52 KB
 Viewed:  1069 Time(s)

CodeInjection.PNG



Accessed.PNG
 Description:
 Filesize:  10.77 KB
 Viewed:  1069 Time(s)

Accessed.PNG



write2.PNG
 Description:
 Filesize:  4.21 KB
 Viewed:  1069 Time(s)

write2.PNG



write1.PNG
 Description:
 Filesize:  4.23 KB
 Viewed:  1069 Time(s)

write1.PNG


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

Joined: 06 Jul 2014
Posts: 4697

PostPosted: Tue Jan 04, 2022 3:00 pm    Post subject: Reply with quote

movups means "move unaligned packed singles". Basically, it moves all 4 floats in xmm0 into the specified address at the same time.


You can effectively disable movement on the y-coordinate at that injection point by copying the relevant value in memory into the register before writing the register to memory.
I'm assuming the y-coordinate is the second element in the vector register.

If you have SSE4.1, this is easy with insertps:
Code:
insertps  xmm0,[r14+1F4],10
movups  [r14+1F0],xmm0

If you don't, it gets more complicated:
Code:
movss   xmm2, [r14+1F4]
movaps  xmm1, xmm0
unpcklps  xmm1, xmm0
movss   xmm1, xmm2
shufps  xmm1, xmm0, E1
movups  [r14+1F0], xmm1
(make sure xmm1 and xmm2 are free, use different xmm registers that are free, or back them up before using them)
_________________
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
phckr
How do I cheat?
Reputation: 0

Joined: 21 Jan 2020
Posts: 2

PostPosted: Tue Jan 04, 2022 8:26 pm    Post subject: Reply with quote

xmm0 contained two doubles, so insertps didn't work properly.
Why then is movups being used with two doubles?
this got it to work:
Code:

movsd [r14+000001F0],xmm0
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4697

PostPosted: Tue Jan 04, 2022 9:32 pm    Post subject: Reply with quote

The only logical reason I can think of is that movups was introduced in SSE while movupd was introduced in SSE2. Maybe the compiler was targeting SSE only.
Might also just be a weird compiler oddity.

I'm glad you got it to work.

_________________
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
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