[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课
//************************************************************************* void PreSwapContext(PETHREAD Thread) { PEPROCESS Process = PsGetCurrentProcess(); if(!IsXxxxProcess(Process)) return; if(!g_EnablePatch) return; PatchXxxx(TRUE); } //************************************************************************* void PostSwapContext(PETHREAD Thread) { PEPROCESS Process = PsGetCurrentProcess(); if(!IsXxxxProcess(Process)) return; if(!g_EnablePatch) return; if(IsXxxxMainThread(Thread)) PatchXxxx(FALSE); else PatchXxxx(TRUE); } //************************************************************************* __declspec(naked) NewSwapContext() { __asm { pushad push esi call PreSwapContext popad call OldSwapContext pushad push esi call PostSwapContext popad ret } } //*************************************************************************