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 copy an integer to and FPU stack register?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Thunder_Bird
Cheater
Reputation: 0

Joined: 27 Apr 2018
Posts: 33
Location: pakistan

PostPosted: Tue Jan 12, 2021 11:52 am    Post subject: how to copy an integer to and FPU stack register? Reply with quote

the original instruction is: fild dword ptr [game.exe+5B48EC], according to my knowledge this instruction pushs a value "60"(pointed by [game.exe+5B48EC]) to an FPU stack register "st0"

what I want to do is push 30 instead in that register. I dont wanna use code cave, will be better if I somehow modify original instruction, but I have to use codecave(newmem in cheatengine ASM script) then its fine, will work too


any help will be appreciated
thanks
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4722

PostPosted: Tue Jan 12, 2021 12:23 pm    Post subject: Reply with quote

Add the address game.exe+5B48EC to the address list as a float and change it to 30.

Alternatively, find some unused space in the exe (near the end of a writable region is probably fine), write the float 30 to it, and change the instruction to use that address instead.

_________________
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