2022-01-23 02:32:46 +00:00
; crinkle the linkers load order
; a.obj < (anything else).obj
; A/B/C:\... < ntstc_msvcrt's d:\os\obj\...
PUBLIC _CxxThrowException
2022-01-23 02:39:33 +00:00
EXTERN _SEHReport : proc
EXTERN gGxxThrowRefDll : qword
2022-01-23 02:32:46 +00:00
.code
_CxxThrowException PROC
MOV R8 , [ RSP ]
push RCX
push RDX
SUB RSP , 24 ; yo wtf, we have [0, -8], [-8, -8], [-16, -8] writes in our stack?! stdcall compiler optimizer conflicting with the reality that stdcall does not exist under x64?
2022-01-23 02:39:33 +00:00
MOV RAX , [ _SEHReport ]
2022-01-23 02:32:46 +00:00
CALL RAX
2022-01-23 02:39:33 +00:00
ADD RSP , 24
POP RDX
POP RCX
2022-01-23 02:32:46 +00:00
2022-01-23 02:39:33 +00:00
XOR RAX , RAX
2022-01-23 02:32:46 +00:00
2022-01-23 02:39:33 +00:00
JMP gGxxThrowRefDll
2022-01-23 02:32:46 +00:00
_CxxThrowException ENDP
END