This shows how to build a working DLL in 64 bit MASM. The example shows manually how to set the stack space and load the registers into the first 4 arguments of a high level procedure. It also has a low level procedure that does not use the stack at all which has lower overhead than a stack frame based proc.