⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 disme.cpp

📁 应用程序调试技术(DebuggingApplication)源代码
💻 CPP
字号:
// A quick test app for the i386DisASM dll.  This test application just
// disassembles itself starting at main.
#include <windows.h>
#include <stdio.h>
#include <imagehlp.h>
#include "i386DisASM.h"
#include "BugslayerUtil.h"


void main ( void )
{
    DEBUGPACKET dp ;
    dp.hProcess = OpenProcess ( PROCESS_ALL_ACCESS      ,
                                FALSE                   ,
                                GetCurrentProcessId ( )  ) ;
    dp.context.ContextFlags = CONTEXT_FULL ;
    GetThreadContext ( GetCurrentThread ( ) , &dp.context ) ;

    UCHAR szBuff[ 1024 ] ;
    PUCHAR pChar = (PUCHAR)&szBuff ;

    DWORD dwOffSet = (DWORD)main ;

    SymInitialize ( dp.hProcess , NULL , FALSE ) ;

    SymLoadModule ( dp.hProcess , NULL , "DisMe.exe" , NULL , 0 , 0 ) ;

    for ( int i = 0 ; i < 50 ; i++ )
    {
        pChar = (PUCHAR)&szBuff ;
        if ( FALSE == disasm ( &dp , &dwOffSet , pChar , FALSE ) )
        {
            printf ( "disasm failed!\n" ) ;
            break ;
        }
        else
        {
            printf ( "%s\n" , szBuff ) ;
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -