Question regarding replacing assembler instructions

Memory scanning, code injection, debugger internals and other gamemodding related discussion
Post Reply
nakte
What is cheating?
What is cheating?
Posts: 4
Joined: Sun Feb 17, 2019 11:22 am
Reputation: 0

Question regarding replacing assembler instructions

Post by nakte »

Hello, I haven't used CE before so I don't know if this is the right place to ask and or if what im trying to achieve is possible:
Image
I want to prevent the game from updating the Target Z float, which controls the Z-coordinate that the camera is looking at. So It turns out that the movaps instruction on the left is writing to it so I tried setting it to NOP. But it also seems to write to Target X, Y and some other address since movaps apparently writes to 128 bits(or 4 floats i assume). Is there any way to only prevent the game from writing to Target Z by somehow splitting up the movaps instruction to 3 or 4 other instructions that only write to 1 float each, and then setting ONLY the instruction writing to Target Z to NOP?

Any help is appreciated, thanks.

Eric
Hall of Famer
Hall of Famer
Posts: 174
Joined: Thu Mar 02, 2017 11:01 pm
Reputation: 90

Re: Question regarding replacing assembler instructions

Post by Eric »

Do a code injection:
Before executing that code store the old Z, then execute, and then restore Target Z with the old value

nakte
What is cheating?
What is cheating?
Posts: 4
Joined: Sun Feb 17, 2019 11:22 am
Reputation: 0

Re: Question regarding replacing assembler instructions

Post by nakte »

thanks, sorry for late response, I tried this but it caused the game to crash. The value might be used in some other computation that resulted in this but ye I gave up. thanks though : )

GreenHouse
Expert Cheater
Expert Cheater
Posts: 857
Joined: Fri Oct 12, 2018 10:25 pm
Reputation: 889

Re: Question regarding replacing assembler instructions

Post by GreenHouse »

Can't you make a cmp? I mean, the Z offset will always be the same, so you have already a difference there to begin with. Make a cmp, and do nop If it's the Z axis.

Post Reply

Who is online

Users browsing this forum: No registered users