So Windows has exposed a number of different options to mitigate security vulnerabilities.
I’ve found the paper that looks at one of these which is called Control Flow Guard.
TL;DR its a general term for computer security techniques that prevent a wide variety of malware attacks from redirecting the flow of execution (the control flow) of a program.
Control-flow integrity - Wikipedia
You can find this in Win10 by clicking Start, Settings (gear icon), Windows Security, Open Windows Security, App & Browser Control, Exploit Protection settings, Control Flow Guard (1st drop down in the list).
This is the Microsoft White Paper on the subject.
griffin-asplos17.pdf (microsoft.com)
Its quite low level stuff, looking at the instructions the cpu uses, and you can get at these instructions using something called Intel Processor Trace - Intel.com . This is a facility which dumps all the instructions the cpu executes, so if the cpu was a network switch, it would be like having every packet the switch handles and routes, being mirrored and sent to one port for logging purposes, or if you are into your circuit board hacking, then it would like a JTAG port.
There is a 4min video here which shows how to get at the Intel Processor Trace output.
Collecting Intel® Processor Trace (Intel® PT) in Intel® System…
Dont know if this is too off topic or not?