Jeffrey&Lynny

一个温馨小家庭的.Net生活

导航

Reversing SetLastError

kernel32!SetLastError(dwErrorCode)
{
    if(g_dwLastErrorToBreakOn!=null)
    {
         if(g_dwLastErrorToBreakOn==dwErrorCode)
        {
            DbgBreakPoint();
        }
    }
    if(teb.LastErrorValue!=dwErrorCode)
    {
        teb.LastErrorValue=dwErrorCode;
    }
}

kernel32!DbgBreakPoint:
7c87f4cb ff25e810807c jmp dword ptr [kernel32!_imp__DbgBreakPoint (7c8010e8)]

ntdll!DbgBreakPoint:
7c921230 cc               int     3

posted on 2006-07-09 22:15  比尔盖房  阅读(241)  评论(0编辑  收藏  举报