I don't have much experience with assembly and I am trying to change a step value that changes a final value, these are the opcodes that I am working with and this is how they are set:

movss xmm0,[eax+30]  
addss xmm0,[esi+00000094]
movss [eax+30],xmm0
movss xmm0,[esi+00000098]
addss xmm0,[eax+34]    
movss [eax+34],xmm0
movss xmm0,[esi+0000009C]
addss xmm0,[eax+38] 
movss [eax+38],xmm0 

Now so far I think the addss lines are the ones responsible for increasing or decreasing the xmm0 float value in:

movss [eax+30],xmm0
movss [eax+34],xmm0
movss [eax+38],xmm0

What I am trying to achieve is to multiply the step value that is being added to xmm0 in the addss lines:

addss xmm0,[esi+00000094]
addss xmm0,[eax+34]
addss xmm0,[eax+38]

Which I assume to be the [esi+00000094] [eax+34] [eax+38].

I tried multiplying them by (float)2.00 (and other multiplying factors such as 1.50 and 0.20) like this

addss xmm0,[esi+00000094]*(float)2.00
addss xmm0,[eax+34]*(float)2.00
addss xmm0,[eax+38]*(float)2.00

But of course my ignorance proved that this isn't the way to do it and since I have practically 0 knowledge in this field I decided to ask for help.

A better explanation of what I think is going on here and what I am trying to do goes like this:

addss xmm0,[esi+00000094] == addss 31.00,[0.43]      <- 31 being the current/old
                                                        value and 0.43 being the
                                                        increment value that 
                                                        will add to 31

movss [eax+30],xmm0       == movss [XXXXXXXXX],31.43 <- XXX being the address
                                                        that holds the new value
                                                        and xmm0 the one that
                                                        will copy the new value
                                                        to the target

---what I am trying to do if I am correct---

addss 31.00,[0.43*n]    <- n being a float point set by me (2.00 or 1.50 or 0.03)

movss [XXXXXXXXX],31.86 <- final value is copied to the target address with the
                           intended increment/decrement (in case of 0.### float
                           values) effectively set by me

Can anyone tell me the correct way to to this? I don't even know if the addss lines are the correct ones where I can modify the step value (the one that increases or decreases the last xmm0 value in movss [eax+30],xmm0 | movss [eax+34],xmm0 | movss [eax+38],xmm0).

I am using [CE's] auto assembler tool to achieve this, modifying memory values.


one way of achieving the end result could be by performing a trampoline and modifying the sequence of instructions similar to the logic shown below and reverting back to the original flow

get instruction set manual from intel a ready made reference (first google hit)

CPU Disasm
Command                                  Comments
MOVSS   XMM0, DWORD PTR DS:[EAX+30]      ; FLOAT 31.00000  orginal float 
MOVSS   XMM1, DWORD PTR DS:[ESI+94]      ; FLOAT 0.4300000 original flaot
MOVSS   XMM2, DWORD PTR DS:[ESI+9C]      ; FLOAT 2.000000   mov multiplier from location you chose to spare register
MULSS   XMM1, XMM2                       ; FLOAT 0.0, 0.0, 0.0, 2.000000 multiply original float by multiplier
ADDSS   XMM0, XMM1                       ; FLOAT 0.0, 0.0, 0.0, 0.8600000 add modified result to original float
MOVSS   DWORD PTR DS:[EAX+30], XMM0      ; FLOAT 0.0, 0.0, 0.0, 31.86000 return to flow
  • I don't get it, is this for auto assembler as I mentioned? So I just copy that and paste there? – Shadow Jul 18 '13 at 14:36
  • a blunt answer could be sorry i dont know and i dont spoonfeed any cheat engine worth its salt will have a few templates to inject code read your cheat engines manual see how to inject code alloc memory if there is no memory ask your cheat engine template to provide trampolining boiler plate code add the logic you want to implement a sample of which i gave as an answer execute the modified instruction to achieve the result should be simple enough if you spare few minutes getting to know your tool else infinte amount of copy paste wont help you – blabb Jul 18 '13 at 20:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.