• 大小:
    文件类型: .7z
    金币: 1
    下载: 0 次
    发布日期: 2023-01-21
  • 语言: C/C++
  • 标签: C++反汇编  

资源简介

C++反汇编与逆向分析技术揭秘 带书签(完整版+光盘)

资源截图

代码片段和文件信息

// Decode2Asm.cpp: implementation of the CDecode2Asm class.
//
//////////////////////////////////////////////////////////////////////

#include “stdafx.h“
#include “Disasm.h“
#include “Decode2Asm.h“

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

void
__stdcall
Decode2Asm(IN PBYTE pCodeEntry
           OUT char* strAsmCode
           OUT UINT* pnCodeSize
           UINT nAddress)
{
  DISASSEMBLY Disasm; // Creates an Disasm Struct
  // Pointer to linear address
  char *Linear = (char *)pCodeEntry;// Points to the address of array to decode.
  // Index of opcoded to decode
  DWORD       Index = 0; 
  Disasm.Address = nAddress; // Common Entry Point (usually default..)
  FlushDecoded(&Disasm);     // reset all content
  
  // Decode instruction
  Decode(&Disasm
    Linear
    &Index);
  
  strcpy(strAsmCode Disasm.Assembly);

  if(strstr((char *)Disasm.Opcode “:“))
  {
  Disasm.OpcodeSize++;
    char ch =‘ ‘;
    strncat(strAsmCode&chsizeof(char));
  }

  strcat(strAsmCodeDisasm.Remarks);
  *pnCodeSize = Disasm.OpcodeSize;
  
  // Clear all information
  FlushDecoded(&Disasm);
  
  return;
}

评论

共有 条评论