The specified 8 registers can only be used for parameters 1 through 4. Windows uses a four-register fastcall calling convention by default. A function calling this needs to have at least 32 bytes of stack to store the parameters and align the stack upon call.
x86 calling conventions - Wikipedia When a function in a Windows x64 binary is called, the stack frame is used in the following manner: First four integer arguments are passed to RCX, RDX, R8 and R9 registers accordingly (green) Arguments 5, 6, and further are pushed on to the stack (blue) In MASM, the ALIGN directive does not align local (or stack) variables, i.e. Microsoft x64; 1.2. While for the other operating systems, the first six arguments are usually passed to the . Thus, after we pushed the function's arguments, at least two additional registers are pushed on the .
PDF The 64 bit x86 C Calling Convention - GitHub Pages but i'm noob and as i said i'm not familiar with 64 bits. This is dramatically different from the typical convention where you push arguments unto the stack in reverse order prior to calling or a method. Return value. The x64 calling convention is also referred to as the x64 ABI (Application Binary Interface). In x86, argument values are pushed to the stack in reverse order. The following is the calling convention for using floats as arguments to functions.
Calling Conventions - OSDev Wiki Currently using this 64-bit MASM code to call a C runtime function such as memcmp().I recall this convention was from a GoAsm article on optimizations.. memcmp PROTO;:QWORD,:QWORD,:QWORD PUSH RSP PUSH QWORD PTR [RSP] AND SPL, 0F 0h MOV R8,R11 MOV RDX,R10 MOV RCX,RAX SUB RSP, 32 CALL memcmp LEA RSP,[RSP+ 40] POP RSP Divergences from the Generic Procedure Call Standard. It is meant to be used to make debugging x64 easier. Fastcall is the calling convention for x64 Windows. an example of the fact that the X64 call stack can be walked without symbols. The "Stdcall" convention is used throughout by the 32-bit Windows API (which consists of DLL's).
Shellcode: Dual mode PIC for x86 (Reverse and Bind Shells for Windows)