亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dispatch.s

?? ReactOS是一些高手根據Windows XP的內核編寫出的類XP。內核實現機理和API函數調用幾乎相同。甚至可以兼容XP的程序。喜歡研究系統內核的人可以看一看。
?? S
字號:
/*
 * COPYRIGHT:       See COPYING in the top level directory
 * PROJECT:         ReactOS NT Library
 * FILE:            lib/ntdll/main/i386/dispatch.S
 * PURPOSE:         User-Mode NT Dispatchers
 * PROGRAMMERS:     Alex Ionescu (alex@relsoft.net)
 */

/* INCLUDES ******************************************************************/

#include <ndk/asm.h>
.intel_syntax noprefix

/* FUNCTIONS ****************************************************************/

.func LdrInitializeThunk@16
.globl _LdrInitializeThunk@16
_LdrInitializeThunk@16:

    /* Get the APC Context */
    lea eax, [esp+16]

    /* Send it as the first parameter */
    mov [esp+4], eax

    /* Terminate the frame list */
    xor ebp, ebp

    /* Jump into the C initialization routine */
    jmp _LdrpInit@12
.endfunc

.func KiUserApcExceptionHandler
_KiUserApcExceptionHandler:

    /* Put the exception record in ECX and check the Flags */
    mov ecx, [esp+4]
    test dword ptr [ecx+EXCEPTION_RECORD_EXCEPTION_FLAGS], EXCEPTION_EXIT_UNWIND + EXCEPTION_UNWINDING
    jz .return

    /* Test alert the thread */
    call _NtTestAlert@0

.return:
    /* We'll execute handler */
    mov eax, EXCEPTION_EXECUTE_HANDLER
    ret 16
.endfunc

.func KiUserApcDispatcher@16
.globl _KiUserApcDispatcher@16
_KiUserApcDispatcher@16:

    /* Setup SEH stack */
    lea eax, [esp+CONTEXT_ALIGNED_SIZE+16]
    mov ecx, fs:[TEB_EXCEPTION_LIST]
    mov edx, offset _KiUserApcExceptionHandler
    mov [eax], ecx
    mov [eax+4], edx

    /* Enable SEH */
    mov fs:[TEB_EXCEPTION_LIST], eax

    /* Put the Context in EDI */
    pop eax
    lea edi, [esp+12]

    /* Call the APC Routine */
    call eax

    /* Restore exception list */
    mov ecx, [edi+CONTEXT_ALIGNED_SIZE]
    mov fs:[TEB_EXCEPTION_LIST], ecx

    /* Switch back to the context */
    push 1
    push edi
    call _ZwContinue@8

    /* Save callback return value */
    mov esi, eax

    /* Raise status */
StatusRaiseApc:
    push esi
    call _RtlRaiseStatus@4
    jmp StatusRaiseApc
    ret 16
.endfunc

.func KiUserCallbackExceptionHandler
_KiUserCallbackExceptionHandler:

    /* Put the exception record in ECX and check the Flags */
    mov ecx, [esp+4]
    test dword ptr [ecx+EXCEPTION_RECORD_EXCEPTION_FLAGS], EXCEPTION_EXIT_UNWIND + EXCEPTION_UNWINDING
    jz return

    /* Tell the kernel to invalidate the stack */
    push STATUS_CALLBACK_POP_STACK
    push 0
    push 0
    call _ZwCallbackReturn@12

return:
    /* We'll execute the handler */
    mov eax, EXCEPTION_EXECUTE_HANDLER
    ret 16
.endfunc

.func KiUserCallbackDispatcher@12
.globl _KiUserCallbackDispatcher@12
_KiUserCallbackDispatcher@12:

    /* Setup SEH stack */
    mov ecx, fs:[TEB_EXCEPTION_LIST]
    mov edx, offset _KiUserCallbackExceptionHandler
    lea eax, [esp+16]
    mov [esp+16], ecx
    mov [esp+20], edx

    /* Enable SEH */
    mov fs:[TEB_EXCEPTION_LIST], eax

    /* Get the callback Index */
    add esp, 4
    pop edx

    /* Get the callback table */
    mov eax, [fs:TEB_PEB]
    mov eax, [eax+PEB_KERNEL_CALLBACK_TABLE]

    /* Call the routine */
    call [eax+edx*4]

    /* Return from callback */
    push eax
    push 0
    push 0
    call _ZwCallbackReturn@12

    /* Save callback return value */
    mov esi, eax

    /* Raise status */
StatusRaise:
    push esi
    call _RtlRaiseStatus@4
    jmp StatusRaise
    ret 12
.endfunc

.func KiRaiseUserExceptionDispatcher@0
.globl _KiRaiseUserExceptionDispatcher@0
_KiRaiseUserExceptionDispatcher@0:

    /* Setup stack for EXCEPTION_RECORD */
    push ebp
    mov ebp, esp
    sub esp, EXCEPTION_RECORD_LENGTH

    /* Fill out the record */
    mov [esp+EXCEPTION_RECORD_EXCEPTION_ADDRESS], eax
    mov eax, [fs:KPCR_TEB]
    mov eax, [eax+TEB_EXCEPTION_CODE]
    mov [esp+EXCEPTION_RECORD_EXCEPTION_CODE], eax
    mov dword ptr [esp+EXCEPTION_RECORD_EXCEPTION_FLAGS], 0
    mov dword ptr [esp+EXCEPTION_RECORD_EXCEPTION_RECORD], 0
    mov dword ptr [esp+EXCEPTION_RECORD_NUMBER_PARAMETERS], 0

    /* Raise the exception */
    push esp
    call _RtlRaiseException@4

    /* Return exception code */
    mov eax, [esp+EXCEPTION_RECORD_EXCEPTION_CODE]
    mov esp, ebp
    pop ebp
    ret
.endfunc

.func KiUserExceptionDispatcher@8
.globl _KiUserExceptionDispatcher@8
_KiUserExceptionDispatcher@8:

    /* clear the direct flag 
     * text from bug 2279
     * if it not clear it means that if an exception occurs while
     * the direction flag is set (typically inside memmove), the 
     * exception handlers will be called with the direction flag still
     * set.  The Windows x86-32 and x86-64 ABI requires that the 
     * direction flag be Calling memset() with a compile-time constant 
     * size on both GCC and MSVC will result in inlining a "rep stosd" 
     * instruction.  Because of the ABI, they will assume that the 
     * direction flag is clear and not emit a "cld" instruction. 
     * Using memset() in an exception handler therefore will 
     * corrupt memory if the exception occurred during a reverse copy 
     * such as a forward overlapping memmove().
     *
     * For reliability and ease of debugging, please add "cld" to the beginning of
     * KiUserExceptionDispatcher.  Note that the same will be true of x86-64 whenever
     * that happens.  This does not affect continuing execution; the CONTEXT of the
     * exception has the direction flag set and will be restored upon NtContinue. 
     * KiUserApcDispatcher and KiUserCallbackDispatcher need to be evaluated for this
     * issue.
     */
     
    cld

    /* Save the Context and Exception Records */
    mov ecx, [esp+4]
    mov ebx, [esp]

    /* Call the vectored exception handler */
    push ecx
    push ebx
    call _RtlpExecuteVectoredExceptionHandlers@8

    /* Check for success */
    or al, al
    jnz ContinueExecution

    /* Dispatch the exception */
    sub esp, 8
    call _RtlDispatchException@8

    /* Check for success */
    or al, al
    jz RaiseException

ContinueExecution:
    /* Pop off the records */
    pop ebx
    pop ecx

    /* We're fine, continue execution */
    push 0
    push ecx
    call _ZwContinue@8

    /* Exit */
    jmp Exit

RaiseException:
    /* Pop off the records */
    pop ebx
    pop ecx

    /* Raise the exception */
    push 0
    push ecx
    push ebx
    call _ZwRaiseException@12

Exit:
    /* Allocate space for the nested exception record */
    add esp, -SIZEOF_EXCEPTION_RECORD

    /* Set it up */
    mov [esp+EXCEPTION_RECORD_EXCEPTION_CODE], eax
    mov dword ptr [esp+EXCEPTION_RECORD_EXCEPTION_FLAGS], EXCEPTION_NONCONTINUABLE
    mov [esp+EXCEPTION_RECORD_EXCEPTION_RECORD], ebx
    mov dword ptr [esp+EXCEPTION_RECORD_NUMBER_PARAMETERS], 0

    /* Raise the exception */
    push esp
    call _RtlRaiseException@4
    ret 8
.endfunc

.func KiIntSystemCall@0
.globl _KiIntSystemCall@0
_KiIntSystemCall@0:

    /* Set stack in EDX and do the interrupt */
    lea edx, [esp+8]
    int 0x2E

    /* Return to caller */
    ret
.endfunc

.func KiFastSystemCall@0
.globl _KiFastSystemCall@0
_KiFastSystemCall@0:

    /* Put ESP in EDX and do the SYSENTER */
    mov edx, esp
    sysenter
.endfunc

.func KiFastSystemCallRet@0
.globl _KiFastSystemCallRet@0
_KiFastSystemCallRet@0:

    /* Just return to caller */
    ret
.endfunc

.func RtlpGetStackLimits@8
.globl _RtlpGetStackLimits@8
_RtlpGetStackLimits@8:

    /* Get the stack limits */
    mov eax, [fs:TEB_STACK_LIMIT]
    mov ecx, [fs:TEB_STACK_BASE]

    /* Return them */
    mov edx, [esp+4]
    mov [edx], eax
    mov edx, [esp+8]
    mov [edx], ecx

    /* return */
    ret 8
.endfunc

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品影音先锋| 色偷偷一区二区三区| 日韩精品在线一区| 寂寞少妇一区二区三区| 日韩视频不卡中文| 国产乱子轮精品视频| 欧美国产禁国产网站cc| 97国产一区二区| 亚洲高清免费在线| 日韩一卡二卡三卡四卡| 国产精品一品二品| 亚洲色图欧美偷拍| 欧美一区二区三区日韩| 国产成人在线视频免费播放| 国产精品成人网| 欧美色老头old∨ideo| 另类小说图片综合网| 国产欧美视频一区二区| 欧美三级韩国三级日本三斤 | 日韩中文字幕亚洲一区二区va在线 | 日韩一区二区三区电影在线观看| 国产在线精品一区在线观看麻豆| 国产人成亚洲第一网站在线播放| 97se狠狠狠综合亚洲狠狠| 亚洲午夜羞羞片| 久久久不卡网国产精品二区| 91浏览器在线视频| 青青青爽久久午夜综合久久午夜| 国产欧美日韩卡一| 91精品国产一区二区三区| 国产成人在线免费| 亚洲6080在线| 亚洲天堂成人在线观看| 精品久久久久香蕉网| 一本色道a无线码一区v| 国产在线不卡一区| 天堂资源在线中文精品| 欧美国产日产图区| 日韩欧美国产综合| 在线观看中文字幕不卡| 国产成人亚洲精品狼色在线| 日韩精品乱码免费| 亚洲欧美偷拍三级| 国产视频在线观看一区二区三区| 欧美日韩国产美| 一本久久a久久免费精品不卡| 国内精品在线播放| 蜜桃一区二区三区四区| 一区二区三区蜜桃| 国产精品美女久久久久av爽李琼| 日韩欧美三级在线| 欧美日韩国产三级| 欧美在线观看视频一区二区 | 日韩一区精品视频| 亚洲制服丝袜av| 中文字幕一区二区三区在线不卡| 欧美变态tickling挠脚心| 欧美区视频在线观看| 色综合色综合色综合色综合色综合 | 日韩国产欧美三级| 一级日本不卡的影视| 欧美国产日韩亚洲一区| 久久综合色8888| 精品日产卡一卡二卡麻豆| 69p69国产精品| 91麻豆精品国产91久久久更新时间| 91蜜桃婷婷狠狠久久综合9色| 国产高清在线精品| 国产精品自拍三区| 久久激情综合网| 免费观看一级特黄欧美大片| 日韩精品福利网| 日本美女一区二区三区视频| 免费国产亚洲视频| 日本不卡视频在线| 捆绑变态av一区二区三区| 热久久久久久久| 美国一区二区三区在线播放| 蜜臀av一区二区三区| 九九国产精品视频| 精品一二三四在线| 国产在线精品一区在线观看麻豆| 国产一区在线观看麻豆| 国产伦精品一区二区三区免费迷| 国产精品影视在线观看| 成人av在线资源| 色欧美乱欧美15图片| 欧美日韩日本视频| 欧美一卡2卡3卡4卡| 久久女同精品一区二区| 国产日韩影视精品| 亚洲人成7777| 亚洲一二三四区不卡| 日韩**一区毛片| 国产乱码精品一品二品| 91丨porny丨中文| 欧美色国产精品| 欧美精品一区二区三区一线天视频| 国产亚洲精品精华液| 怡红院av一区二区三区| 无吗不卡中文字幕| 精品亚洲欧美一区| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 欧美三级电影精品| 欧美成人在线直播| 欧美国产成人精品| 亚洲v精品v日韩v欧美v专区| 理论片日本一区| av成人免费在线观看| 欧美剧情电影在线观看完整版免费励志电影 | 国产精品久久久久久久久免费丝袜 | 欧美日韩午夜在线| 精品成人a区在线观看| 中文字幕第一区第二区| 亚洲成人你懂的| 99麻豆久久久国产精品免费优播| 欧美亚洲动漫精品| 2023国产精品自拍| 亚洲一区二区三区视频在线| 精久久久久久久久久久| 91年精品国产| 欧美成人午夜电影| 亚洲欧美日韩国产成人精品影院 | 日本在线不卡一区| 不卡一区二区中文字幕| 制服丝袜中文字幕一区| 国产精品成人免费精品自在线观看| 日日夜夜精品免费视频| 99国内精品久久| 国产性色一区二区| 日韩影院在线观看| 色妹子一区二区| 国产日韩av一区| 日本美女一区二区三区| 色噜噜夜夜夜综合网| 欧美激情一区二区三区四区| 奇米综合一区二区三区精品视频| 97se亚洲国产综合在线| 国产日韩三级在线| 蜜臀av性久久久久av蜜臀妖精| 91成人免费在线视频| 中文字幕亚洲在| 国产麻豆精品在线观看| 日韩午夜在线播放| 午夜亚洲国产au精品一区二区| 不卡视频在线观看| 国产夜色精品一区二区av| 免费在线观看一区二区三区| 在线中文字幕一区二区| 国产精品毛片久久久久久久| 久久精品国产77777蜜臀| 欧美色倩网站大全免费| 一区二区三区精密机械公司| 成人亚洲一区二区一| 久久精品一区四区| 精品无人码麻豆乱码1区2区| 欧美一区二区三区爱爱| 日本伊人色综合网| 91麻豆精品久久久久蜜臀| 日日摸夜夜添夜夜添国产精品| 欧美午夜精品一区二区三区| 一区在线观看视频| jizzjizzjizz欧美| 国产精品丝袜在线| 97久久精品人人做人人爽| 中文一区在线播放| 成人h动漫精品| 亚洲视频1区2区| 在线日韩av片| 午夜不卡在线视频| 日韩一区二区在线观看视频 | 97久久超碰国产精品电影| 综合激情成人伊人| 色老汉一区二区三区| 亚洲成av人片| 欧美sm极限捆绑bd| 国产成人精品一区二| 中文字幕欧美日韩一区| 91在线视频观看| 亚洲成人免费观看| 日韩欧美123| 国产伦精品一区二区三区在线观看| 久久久久久久久久电影| 大桥未久av一区二区三区中文| 国产精品成人一区二区艾草| 欧亚洲嫩模精品一区三区| 午夜av电影一区| 久久亚洲免费视频| 97久久超碰国产精品| 亚洲1区2区3区4区| 久久久久国产成人精品亚洲午夜 | 亚洲精品国产第一综合99久久| 欧美日韩日日骚| 国产麻豆精品theporn| 亚洲欧美日韩中文字幕一区二区三区 | 亚洲亚洲精品在线观看| 精品日韩一区二区| 99在线精品一区二区三区| 亚洲大片在线观看| 久久久久久久久久久电影|