Helping me to get beyond x255 multiplier with mul

Anything Cheat Engine related, bugs, suggestions, helping others, etc..
User avatar
SunBeam
Administration
Administration
Posts: 4932
Joined: Sun Feb 04, 2018 7:16 pm
Reputation: 4629

Re: Helping me to get beyond x255 multiplier with mul

Post by SunBeam »

This topic would be so much shorter if you used SSE/SSE2...

Code: Select all

code:
  movss xmm0,[rbx+6C]
  mulss xmm0,[animamult]
  addss [rbx+6C],xmm0
  mov ecx,[rbx+70]
  jmp return

animamult:
  dd (float)2.0

Algester
Expert Cheater
Expert Cheater
Posts: 291
Joined: Sun Mar 04, 2018 9:48 am
Reputation: 63

Re: Helping me to get beyond x255 multiplier with mul

Post by Algester »

@SunBeam I tried your approach but the game doesnt like to "transform" a 4byte integer into a float value or at least what we know that esi is required down the line (I'm not sure how it works on souls games) though since this game uses anima as a stand in for souls unless in souls the value is a float?

User avatar
SunBeam
Administration
Administration
Posts: 4932
Joined: Sun Feb 04, 2018 7:16 pm
Reputation: 4629

Re: Helping me to get beyond x255 multiplier with mul

Post by SunBeam »

My reply is using strictly your initial code. I don't know what the value of rbx+6C is stored as. So you'll have to transform the type to float, then back to integer.

See [Link]. CVTSI2SD instruction.

You have examples on CE Wiki:
[Link]

Like so:

Code: Select all

code:
  cvtsi2sd xmm0,[rbx+6C]
  mulss xmm0,[animamult]
  cvtsd2si eax,xmm0
  add [rbx+6C],eax
  mov ecx,[rbx+70]
  jmp return

animamult:
  dd (float)2.0
Make sure to utilize a register that's not in use at that hook spot or below the hook spot, else you'll overwrite it. I used eax in the example above, so make sure to use another one if needed.

Algester
Expert Cheater
Expert Cheater
Posts: 291
Joined: Sun Mar 04, 2018 9:48 am
Reputation: 63

Re: Helping me to get beyond x255 multiplier with mul

Post by Algester »

@SunBeam yep so I lack the cvtsi2sd knowledge huh... also I found out that the base multiplier is x100 so 2000 becomes x2.0 interesting

Post Reply

Who is online

Users browsing this forum: No registered users