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 


calling conventions

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

Joined: 23 Jun 2020
Posts: 3

PostPosted: Tue Jun 23, 2020 2:22 pm    Post subject: calling conventions Reply with quote

can anyone make please some tutorials about calling conventions WITH cheat engine ? Smile
cdecl, thiscall, stdcall etc..

i want to learn how people understand so fast the type of calling conv and how they read parameters of functions and are required to be stored in registers Smile

this example of tutorial is awesome, and to bad there are not so many , he is creating emulated version of a function at min 9:00

youtu.be/T5sXoEEPFBQ?t=541
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 160

Joined: 25 Jan 2006
Posts: 8160
Location: 127.0.0.1

PostPosted: Tue Jun 23, 2020 10:27 pm    Post subject: Reply with quote

32bit conventions:
- https://en.wikipedia.org/wiki/X86_calling_conventions
- https://en.wikibooks.org/wiki/X86_Disassembly/Calling_Conventions
- https://levelup.gitconnected.com/x86-calling-conventions-a34812afe097

64bit conventions:
- https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention?view=vs-2019
- https://aaronbloomfield.github.io/pdr/book/x86-64bit-ccc-chapter.pdf

Conventions across different compilers / OS's:
- https://www.agner.org/optimize/calling_conventions.pdf

A site to test compiling code to assembly and see the output easily:
- https://godbolt.org/

Keep in mind, calling conventions are not all the same across compilers and operating systems. The main few (__cdecl, __stdcall, __fastcall, __thiscall) are generally implemented the same across the board, but not always. (For example, __thiscall can be implemented differently depending on the compiler, but will generally be done in a very similar manner as storing the 'this' object in a register and so on.)

Some compilers also implement their own conventions and setups for things.

The best recommendation would be to use a site like godbolt or a local compiler and mess around with your own program/code with different conventions and such to see how the output looks to get used to things.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Elodia-Bitcoin
How do I cheat?
Reputation: 0

Joined: 23 Jun 2020
Posts: 3

PostPosted: Wed Jun 24, 2020 5:52 pm    Post subject: Reply with quote

thank you atom0s Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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