how is the value of 28h
(decimal 40) that is subtracted from rsp
calculated in the following:
option casemap:none
includel
I had stumbled upon the same case. Tried lurker answer and was fine. Later added some code(by the way, i'm using my own compiler) and got problems.
The problem was that the shadow space address was ending with 8 on the stack. When the shadow space address was ending with 0 ("Stack aligned on 16 bytes"), the call was OK. Adding 8 bytes will crash the app in my last case.