三大基本类型(整型,浮点型,字符型)局部变量#include
#include
int _tmain(int argc, _TCHAR* argv[])
{
//局部变量
int nNum = 1;
float fNum = 25;
char ch = 'A';
printf("int %d,float %f,char %c",nNum,fNum,ch);
return 0;
}
vs2017编译,IDA Pro分析
x86_debug:1234法找main函数通过三个函数调用来获取三个参数,第一个是参数数量,第二个是参数数组,第三个环境变量地址数组地址
vs2017编译,IDA Pro分析
vs2017编译,IDA Pro分析
x86_release版本:23法找main函数
vs2017编译,IDA Pro分析
x64_debug:1234法
vs2017编译,IDA Pro分析
vs2017编译,IDA Pro分析
x64_release:25法
vs2017编译,IDA Pro分析
vs2017编译,IDA Pro分析
全局变量:#include
#include
//全局变量,静态变量
int g_nNum = 1;
static int g_nCount = 2;
float g_fNum = 25;
char g_ch = 'A';
int _tmain(int argc, _TCHAR* argv[])
{
printf("int %d,float %f,char %c",g_nNum,g_fNum,g_ch);
return 0;
}
×86_debug:1234法找main函数 ×86_release版本:23法找main函数 ×64_debug:1234法 x64_release:25法
vs2017编译,IDA Pro分析
复合数据类型(数组、结构体)整型数据#include
#include
int _tmain(int argc, _TCHAR* argv[])
{
int nArr[5] = { 1,2,3,4,5 };
int n = 2;
nArr[n] = 20;
return 0;
}
vs2017编译,IDA Pro分析
结构体#include
#include
struct MyStruct {
int nNum;
float fNum;
char chA;
};
void Print(MyStruct stc) {
printf("int %d,float %f,char %c", stc.nNum, stc.fNum, stc.chA);
}
int _tmain(int argc, _TCHAR* argv[])
{
MyStruct stc = { 1,2.2,'A' };
stc.fNum = 5.5;
Print(stc);
return 0;
}
vs2017编译,IDA Pro分析
常量#include
#include
#define SIZE 100
const int g_nCount = 1000;
enum eData
{
enum_TYPE_1 = 1,
enum_TYPE_1 = 2,
enum_TYPE_1 = 3,
};
struct sData {
int n;
float fNum;
char chA;
};
int _tmain(int argc, _TCHAR* argv[])
{
bool bRet = true;
const int nCount = SIZE;
const char* szHello = "Hello 15PB";
const eData data = enum_TYPE_1;
const float fNum = 1.5;
const sData stc = { 1,2.0,'1' };
return 0;
}
vs2017编译,IDA Pro分析
vs2017编译,IDA Pro分析
字符串#include
#include
int _tmain(int argc, _TCHAR* argv[])
{
char szStr[100] = { "szStr[100] Hello 15PB" };
wchar_t szWchar[100] = L"szWchar Hello 15PB";
char* szHello = "szHello* Hello 15PB";
return 0;
}
字符数组
vs2017编译,IDA Pro分析
Unicode字符数组
vs2017编译,IDA Pro分析
字符串指针
vs2017编译,IDA Pro分析
|