Intel ABI is simply a call agreement established by Intel.
In general, how parameters are transferred and which registers are saved or deactivated during a function call is determined by the function call agreement:
http://en.wikipedia.org/wiki/Calling_convention
In particular, for __cdecl, __stdcall and __fastcall you should expect that EAX, ECX and EDX will be broken, and your function should save other registers and return to EAX (or EDX: EAX for 64-bit returns).
If you do not know which calling convention you should use, you should not write in the assembly, since entering the calling convention may lead to errors in your application.
In C, the standard calling convention is usually __cdecl, and for exported Windows APIs, usually __stdcall.
Securitymatt
source share