实例代码

#include "stdafx.h"

#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <wtypes.h>


//x64  //8字节对齐
class CTestC
{
char ch;  //1+3
virtual void fun(){} //8
void test(){}
int n ;   //4
};
//sizeof(CTestC);// 16;
class CTestD
{
virtual void fun(){}
};


class CTest
{
virtual void fun(){}
char ch[5];
int n ;
short m_d;
};


//sizeof(CTest);


int _tmain(int argc, _TCHAR* argv[])
{
    int nSize = sizeof(CTestD);
int t = sizeof(CTestC);
char *ptest = new char[20];
char ch[] = {"test\n"};
delete []ptest;
strcpy_s(ptest,sizeof(ch),ch);
printf(ptest);
return 0;

}

2、生成exe 和pdb (如果有对应pdb文件你会发现意外惊喜的!!!)

idapro反汇编学习(一)

3、启动IDA Pro (32-bit)  将test_task.exe 拖到IDA Pro 一路确定即可。

idapro反汇编学习(一)

4、按快捷键f5可以看到伪代码哦!!

效果如图:

idapro反汇编学习(一)

接下来你懂得!!!

相关文章:

  • 2022-12-23
  • 2022-01-21
  • 2021-07-30
  • 2021-05-15
  • 2021-06-14
  • 2022-12-23
  • 2022-12-23
  • 2021-07-01
猜你喜欢
  • 2022-12-23
  • 2021-06-24
  • 2022-12-23
  • 2021-12-13
  • 2022-03-02
  • 2021-09-27
  • 2022-02-22
相关资源
相似解决方案