3 ms·
True, you don't usually need the prologue to hook a function, but we're talking about hooking functions that might be called by another thread at the same time.
by dkopi 11y ago
True, you don't usually need the prologue to hook a function, but we're talking about hooking functions that might be called by another thread at the same time.
If you just modify the instructions while another thread is running the code, you might crash and burn.
The prologue helps by ensuring the first 8 bytes of a function are just a large NOP.