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

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

?? intrcpt.c

?? Windows 95 系統程式設計大奧秘書籍源碼
?? C
字號:
//==================================
// APISPY32 - Matt Pietrek 1995
// FILE: INTRCPT.C
//==================================
#include <windows.h>
#include <malloc.h>
#include <string.h>
#include <stdio.h>
#pragma hdrstop
#include "intrcpt.h"
#include "intrcpt2.h"
#include "log.h"

PAPIFunction BuildAPIStub(PSTR pszModule, PSTR pszFuncName, PBYTE params);

// MakePtr is a macro that allows you to easily add to values (including
// pointers) together without dealing with C's pointer arithmetic.  It
// essentially treats the last two parameters as DWORDs.  The first
// parameter is used to typecast the result to the appropriate pointer type.
#define MakePtr( cast, ptr, addValue ) (cast)( (DWORD)(ptr)+(DWORD)(addValue))

#define MAX_INTERCEPTED_APIS 2048
unsigned InterceptedAPICount = 0;
PAPIFunction InterceptedAPIArray[MAX_INTERCEPTED_APIS];

extern BOOL FChicago;
extern FILE * PLogFile;

BOOL AddAPIFunction
(
    PSTR pszModule,     // exporting DLL name
    PSTR pszFuncName,   // exported function name
    PBYTE params        // opcode encoded parameters of exported function
)
{
    PAPIFunction pNewFunction;

    if ( InterceptedAPICount >= MAX_INTERCEPTED_APIS )
        return FALSE;
    
    pNewFunction = BuildAPIStub(pszModule, pszFuncName, params);
    if ( !pNewFunction )
        return FALSE;
    
    InterceptedAPIArray[ InterceptedAPICount++ ] = pNewFunction;
    
    return TRUE;
}


PAPIFunction BuildAPIStub(PSTR pszModule, PSTR pszFuncName, PBYTE params)
{
    UINT allocSize;
    PAPIFunction pNewFunction;
    PVOID realProcAddress;
    UINT cbFuncName;
    HMODULE hModule;
    
    hModule = GetModuleHandle(pszModule);
    if ( !hModule )
        return 0;
    
    realProcAddress = GetProcAddress( hModule, pszFuncName );
    if ( !realProcAddress )
        return 0;
    
    cbFuncName = strlen(pszFuncName);
    allocSize = sizeof(APIFunction) + cbFuncName +1 + *params + 1;

    pNewFunction = malloc(allocSize);
    if ( !pNewFunction )
        return 0;

    pNewFunction->RealProcAddress = realProcAddress;
    pNewFunction->instr_pushad = 0x60;
    pNewFunction->instr_lea_eax_esp_plus_32 = 0x2024448D;
    pNewFunction->instr_push_eax = 0x50;
    pNewFunction->instr_push_offset_params = 0x68;
    pNewFunction->offset_params = (DWORD)(pNewFunction + 1) + cbFuncName + 1;
    pNewFunction->instr_push_offset_funcName = 0x68;
    pNewFunction->offset_funcName = (DWORD)(pNewFunction + 1);
    pNewFunction->instr_call_LogFunction = 0xE8;
    pNewFunction->offset_LogFunction
        =  (DWORD)LogCall - (DWORD)&pNewFunction->instr_popad;
    pNewFunction->instr_popad = 0x61;
    pNewFunction->instr_jmp_dword_ptr_RealProcAddress = 0x25FF;
    pNewFunction->offset_dword_ptr_RealProcAddrss = (DWORD)pNewFunction;

    strcpy( (PSTR)pNewFunction->offset_funcName, pszFuncName );
    memcpy( (PVOID)pNewFunction->offset_params, params, *params+1 );
    
    return pNewFunction;
}


PAPIFunction LookupInterceptedAPI( PVOID address )
{
    unsigned i;
    PVOID stubAddress;
    
    for ( i=0; i < InterceptedAPICount; i++ )
    {
        if ( InterceptedAPIArray[i]->RealProcAddress == address )
            return InterceptedAPIArray[i];
    }

    // If it's Chicago, and the app is being debugged (as this app is)
    // the loader doesn't fix up the calls to point directly at the
    // DLL's entry point.  Instead, the address in the .idata section
    // points to a PUSH xxxxxxxx / JMP yyyyyyyy stub.  The address in
    // xxxxxxxx points to another stub: PUSH aaaaaaaa / JMP bbbbbbbb.
    // The address in aaaaaaaa is the real address of the function in the
    // DLL.  This ugly code verifies we're looking at this stub setup,
    // and if so, grabs the real DLL entry point, and scans through
    // the InterceptedAPIArray list of addresses again.
    // ***WARNING*** ***WARNING*** ***WARNING*** ***WARNING*** 
    // This code is subject to change, and is current only as of 9/94.

    if ( FChicago )
    {
        
        if ( address < (PVOID)0x80000000 )  // Only shared, system DLLs
            return 0;                       // have stubs
        
        if ( IsBadReadPtr(address, 9) || (*(PBYTE)address != 0x68)
             || (*((PBYTE)address+5) != 0xE9) )
            return 0;

        stubAddress = (PVOID) *(PDWORD)((PBYTE)address+1);

        for ( i=0; i < InterceptedAPICount; i++ )
        {
            PVOID lunacy;
            
            if ( InterceptedAPIArray[i]->RealProcAddress == stubAddress )
                return InterceptedAPIArray[i];
            
            lunacy = InterceptedAPIArray[i]->RealProcAddress;
            
            if ( !IsBadReadPtr(lunacy, 9) && (*(PBYTE)lunacy == 0x68)
                && (*((PBYTE)lunacy+5) == 0xE9) )
            {
                lunacy = (PVOID)*(PDWORD)((PBYTE)lunacy+1);
                if ( lunacy == stubAddress )
                    return InterceptedAPIArray[i];
            }
        }
    }

    return 0;
}

BOOL InterceptFunctionsInModule(PVOID baseAddress)
{
    PIMAGE_DOS_HEADER pDOSHeader = (PIMAGE_DOS_HEADER)baseAddress;
    PIMAGE_NT_HEADERS pNTHeader;
    PIMAGE_IMPORT_DESCRIPTOR pImportDesc;
    
    if ( IsBadReadPtr(baseAddress, sizeof(PIMAGE_NT_HEADERS)) )
        return FALSE;
    
    if ( pDOSHeader->e_magic != IMAGE_DOS_SIGNATURE )
        return FALSE;

    pNTHeader = MakePtr(PIMAGE_NT_HEADERS, pDOSHeader, pDOSHeader->e_lfanew);
    if ( pNTHeader->Signature != IMAGE_NT_SIGNATURE )
        return FALSE;
    
    pImportDesc = MakePtr(PIMAGE_IMPORT_DESCRIPTOR, baseAddress, 
                            pNTHeader->OptionalHeader.
                            DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].
                            VirtualAddress);
                        
    // Bail out if the RVA of the imports section is 0 (it doesn't exist)
    if ( pImportDesc == (PIMAGE_IMPORT_DESCRIPTOR)pNTHeader )
        return FALSE;

    while ( pImportDesc->Name )
    {
        PIMAGE_THUNK_DATA pThunk;
        
        pThunk = MakePtr(PIMAGE_THUNK_DATA,
                         baseAddress, pImportDesc->FirstThunk);

        while ( pThunk->u1.Function )
        {
            PAPIFunction pInterceptedFunction;
            
            pInterceptedFunction = LookupInterceptedAPI(pThunk->u1.Function);

            if ( pInterceptedFunction )
            {
                DWORD cBytesMoved;
                DWORD src = (DWORD)&pInterceptedFunction->instr_pushad;
                
                // Bash the import thunk.  We have to use WriteProcessMemory,
                // since the import table may be in a code section (courtesy
                // of the NT 3.51 team!)
                
                WriteProcessMemory( GetCurrentProcess(),
                                &pThunk->u1.Function,
                                &src, sizeof(DWORD), &cBytesMoved );
            }
            
            pThunk++;
        }
        
        pImportDesc++;
    }
    
    return TRUE;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人夜色高潮福利影视| 日韩和欧美一区二区三区| 欧美一区二区三区视频免费 | 一区二区三区不卡在线观看| 国产欧美日韩在线看| 久久久久久久久久久99999| 欧美mv和日韩mv国产网站| 精品国产91乱码一区二区三区| 欧美一区二区免费视频| 日韩欧美在线不卡| 国产调教视频一区| 国产精品入口麻豆九色| 亚洲欧美一区二区三区久本道91| 亚洲日本成人在线观看| 亚洲图片自拍偷拍| 麻豆成人91精品二区三区| 韩国av一区二区三区在线观看| 黑人巨大精品欧美一区| 国产成a人无v码亚洲福利| av在线播放一区二区三区| 在线中文字幕一区| 欧美一区二区三区系列电影| 精品国产第一区二区三区观看体验| 久久久久久久久久美女| 亚洲人成网站在线| 99久久久免费精品国产一区二区| 国产精品99久| 国产精品一卡二卡| 一本大道久久a久久综合婷婷| 日本高清免费不卡视频| 欧美日本一区二区| 国产亚洲短视频| 亚洲另类在线制服丝袜| 日韩成人午夜精品| 成人av影院在线| 7777精品伊人久久久大香线蕉的 | 日日夜夜精品免费视频| 国产在线精品一区二区不卡了 | 国产在线不卡一区| 日本韩国视频一区二区| 精品福利在线导航| 亚洲第一成人在线| 不卡的av网站| 2023国产精品自拍| 亚洲r级在线视频| 成人a区在线观看| 日韩免费观看高清完整版在线观看| 国产精品日韩精品欧美在线| 日韩av一二三| 日本道色综合久久| 国产校园另类小说区| 日韩黄色一级片| 91在线观看一区二区| 久久久亚洲综合| 奇米888四色在线精品| 色婷婷一区二区| 中文字幕精品—区二区四季| 久久爱www久久做| 欧美精品在线一区二区| 亚洲黄色在线视频| a4yy欧美一区二区三区| 久久久久久久久久久久久夜| 麻豆国产精品777777在线| 欧美精品日韩精品| 午夜欧美大尺度福利影院在线看| 99re在线视频这里只有精品| 久久综合视频网| 韩国精品久久久| 久久亚洲精品国产精品紫薇| 日韩av电影一区| 欧美一区欧美二区| 天天色天天爱天天射综合| 精品污污网站免费看| 亚洲卡通欧美制服中文| 91美女福利视频| 怡红院av一区二区三区| 欧洲精品在线观看| 亚洲一区av在线| 777奇米成人网| 日本人妖一区二区| 日韩欧美亚洲一区二区| 九九视频精品免费| 国产亚洲精品中文字幕| 国产精品18久久久久久vr| 久久精品亚洲精品国产欧美 | 国产精品家庭影院| 99这里只有久久精品视频| 综合电影一区二区三区 | 精品国产一区二区三区四区四| 日韩精品成人一区二区三区| 日韩欧美一二区| 国产成人综合精品三级| 国产精品国产三级国产aⅴ入口| 成人开心网精品视频| 亚洲欧美日韩国产另类专区| 在线观看成人免费视频| 日本不卡高清视频| 国产欧美精品一区二区色综合| 成人91在线观看| 亚洲妇女屁股眼交7| 日韩免费电影网站| 成人精品一区二区三区四区| 亚洲欧洲综合另类在线| 欧美电影影音先锋| 国产美女久久久久| 亚洲精品乱码久久久久久日本蜜臀| 欧美日产国产精品| 国产精品一区二区无线| 亚洲精品自拍动漫在线| 日韩色在线观看| 99久久99久久免费精品蜜臀| 日韩精品亚洲专区| 国产婷婷色一区二区三区四区| 欧美在线免费观看亚洲| 国产精品亚洲视频| 亚洲一区二区三区爽爽爽爽爽| 精品国产髙清在线看国产毛片| 一本大道久久精品懂色aⅴ| 精品在线你懂的| 亚洲一区二区三区视频在线| 国产欧美一区二区精品性色超碰| 欧美写真视频网站| 成人在线视频一区二区| 日本一不卡视频| 亚洲蜜臀av乱码久久精品蜜桃| 亚洲精品在线三区| 欧美三级视频在线播放| 成人av动漫在线| 毛片av一区二区| 亚洲高清免费观看 | 91在线一区二区三区| 极品销魂美女一区二区三区| 亚洲bt欧美bt精品777| 一区免费观看视频| 久久久亚洲午夜电影| 日韩一区二区三区免费观看| 色综合天天性综合| 成人黄动漫网站免费app| 激情五月播播久久久精品| 日本亚洲三级在线| 亚洲一区二区三区四区在线免费观看| 久久精品一区二区| 久久毛片高清国产| 精品国产一区a| 日韩午夜在线观看视频| 欧美精品九九99久久| 欧美日韩国产一区| 欧美亚洲丝袜传媒另类| 99精品视频在线观看免费| 粉嫩在线一区二区三区视频| 国内不卡的二区三区中文字幕 | 制服丝袜国产精品| 欧美日韩精品欧美日韩精品| 色av一区二区| 欧美性受xxxx黑人xyx性爽| 色香蕉成人二区免费| 91成人在线精品| 欧美日韩一区 二区 三区 久久精品| 一本在线高清不卡dvd| 一本一本大道香蕉久在线精品| thepron国产精品| 日本道色综合久久| 欧美精选在线播放| 欧美成人精品二区三区99精品| 精品久久国产老人久久综合| 久久影院视频免费| 中文字幕一区二区三区乱码在线 | 亚洲一区二区中文在线| 婷婷开心久久网| 麻豆成人av在线| 国产成人免费在线| 色综合天天综合网国产成人综合天| 91社区在线播放| 欧美精品一级二级| 久久综合资源网| 日韩毛片精品高清免费| 午夜精品久久久久久久99水蜜桃| 日韩电影在线观看电影| 国产精品系列在线播放| 91丨九色丨尤物| 日韩小视频在线观看专区| 欧美韩日一区二区三区四区| 一区二区三区欧美久久| 久久99久久精品| av在线不卡免费看| 日韩午夜激情视频| 国产精品成人一区二区三区夜夜夜| 亚洲综合免费观看高清完整版在线 | 久久精品欧美日韩| 亚洲精品中文字幕乱码三区| 日本成人在线视频网站| 成人免费毛片嘿嘿连载视频| 欧美精品777| 国产精品理伦片| 奇米综合一区二区三区精品视频| 成人av小说网| 2020国产精品自拍| 午夜欧美在线一二页| 99re热这里只有精品视频| 日韩女同互慰一区二区|