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 


Call some assembly in CE

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

Joined: 25 Jul 2021
Posts: 2

PostPosted: Sun Jul 25, 2021 6:32 am    Post subject: Call some assembly in CE Reply with quote

Hello everyone, today i was searching a function in cheat engine for a program named ResourceEditor
My main goal is to save the 3d scene like calling the function only in CE (File->Save Scene)

In fact i used Code Filter to find out when the memory is saving the files
And i finally with a long research find a call assembly which actually saves the file (I also nop and then it does not save)

I use auto assemble and i need to call this assembly line


disclaimer i'm a newbie )) Very Happy
Thanks for any replys![/img]



img.png
 Description:
 Filesize:  94.93 KB
 Viewed:  365 Time(s)

img.png


Back to top
View user's profile Send private message
LeFiXER
Master Cheater
Reputation: 0

Joined: 02 Sep 2011
Posts: 270
Location: 0x90

PostPosted: Sun Jul 25, 2021 9:53 am    Post subject: Reply with quote

You located the address responsible for calling the save function, but prior to the program executing said function it will have pushed parameters onto the stack, dealt with those parameters before returning back to the location that pointed to that location.

It's not as simple as just saying "call [address]". I would recommend you study what the program is doing, line-by-line as it saves something. Analyse it and understand what is happening.
Back to top
View user's profile Send private message
NoNickssWoTB
How do I cheat?
Reputation: 0

Joined: 25 Jul 2021
Posts: 2

PostPosted: Sun Jul 25, 2021 10:43 am    Post subject: Reply with quote

LeFiXER wrote:
You located the address responsible for calling the save function, but prior to the program executing said function it will have pushed parameters onto the stack, dealt with those parameters before returning back to the location that pointed to that location.

It's not as simple as just saying "call [address]". I would recommend you study what the program is doing, line-by-line as it saves something. Analyse it and understand what is happening.

Thanks for replying
Yes, it's difficult for me to understand the majority since i'm french baguette.. I don't see a lot of tutorials in french so..

In fact i have the piece of code about this saving function
Even i didn't understood eveything about stack and registers but it seems like it's assembly variables ?
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 179

Joined: 25 Jan 2006
Posts: 8284
Location: 127.0.0.1

PostPosted: Sun Jul 25, 2021 10:43 pm    Post subject: Reply with quote

Your target is 64bit, so you need to follow the 64bit calling convention:

https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-160

You need to handle the arguments the call expects properly based on what is being passed to it. Check the page I linked to understand what registers are used for what types and when the stack is used after registers etc.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions 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