hello, i would like to write my own seh handler in assembly.

ive read some sources, and managed to do it (handler to [fs:0]).

but it doesnt work always. i can handle single instructions, know how to restore stack.
i cant handle MmProbeAndLockPages() function.

i pass to it correct mdl, UserMode and read request. it generate exception wich is not handled.

i have no idea why.


if i use DDK compiler and use __try/__except, it works fine, exception is handled.
Why? because DDK use ntoskrnl!_except_handler3() function + some other stuff wich i dont know about.

its not normal seh that i learned about, its something else.


Can you help me with it? Ive spend a week trying to figure it out - no success, no information, nothing ;/