摘要: #include "stdafx.h"int main(int argc, char* argv[]){ int sum=0; int i=0; while (i<=100) { sum += i++; } printf("sum=%d\n",sum); return 0;} 既然IDA给我们反编译的时候变化了,我就学习下吧。int __cdecl main(int argc, const char **argv, const char **envp){ signed int v3; // eax@1 int v4; // ecx@1 v4 = 0 阅读全文
posted @ 2012-05-18 19:53 r3call 阅读(314) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"int main(int argc, char* argv[]){ int sum=0; for (int i=0;i<=100;i++) { sum=sum+i; } printf("sum=%d\n",sum); return 0;} 这是一个求1+2+3+...+100的和的过程。int __cdecl main(int argc, const char **argv, const char **envp){ signed int v3; // eax@1 int v4; // ecx@1 v4 = 0; 阅读全文
posted @ 2012-05-18 19:24 r3call 阅读(254) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h" int main(int argc, char* argv[]){ int a; scanf("%d",&a); if (a==1) { printf("你输入的数据为1\n"); } else if(a==2) { printf("你输入的数据是2\n"); } else { printf("你输入的数据既不是1也不是2\n"); } return 0;} 其实也差不多,分支下还有分支而已,有点像树的感觉。 阅读全文
posted @ 2012-05-18 19:07 r3call 阅读(349) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"int main(int argc, char* argv[]){ int a; scanf("%d",&a); if (a==1) { printf("你输入的数据为1\n"); } else { printf("你输入的数据不是1\n"); } return 0;} 同样,这个if-else也很简单,重点是要能用IDA认真的学习一遍。和if一样,没多大不同,只是选择的分支多了一个而已,在反汇编的时候,那个是if那个是else,还重要么? 阅读全文
posted @ 2012-05-18 18:51 r3call 阅读(259) 评论(0) 推荐(0) 编辑
摘要: // if语句.cpp : Defines the entry point for the console application.//#include "stdafx.h"int main(int argc, char* argv[]){ int a; scanf("%d",&a); if (a==1) { printf("你输入的数据为1\n"); } return 0;}这个代码看起来更简单,但我们不研究它,我们研究的是它的反汇编代码。这样看来,if语句也很漂亮。不过,当我们遇到一堆if的时候,就会觉得头疼了,因为我们要 阅读全文
posted @ 2012-05-18 18:43 r3call 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 先来看源代码: 1 // 函数的嵌套调用.cpp : Defines the entry point for the console application. 2 // 3 4 #include "stdafx.h" 5 6 int main(int argc, char* argv[]) 7 { 8 int max(int x,int y); 9 int a,b,c,d;10 scanf("%d,%d,%d",&a,&b,&c);11 d=max(max(a,b),c);12 printf("max=%d\n" 阅读全文
posted @ 2012-05-18 18:27 r3call 阅读(921) 评论(0) 推荐(0) 编辑
摘要: 先来看代码 1 // 求两个数中的大者.cpp : Defines the entry point for the console application. 2 // 3 4 #include "stdafx.h" 5 6 int main(int argc, char* argv[]) 7 { 8 int max(int x,int y); //函数的声明 9 int a,b,c;10 scanf("%d,%d",&a,&b);11 c=max(a,b);12 printf("max=%d\n",c);13 retu 阅读全文
posted @ 2012-05-18 18:11 r3call 阅读(346) 评论(0) 推荐(0) 编辑
摘要: 1 //*--------------------------------------------------打开触摸板开始---------------------------------------------------*// 2 HWND hStatus=::FindWindow("Shell_TrayWnd",NULL); //得到任务栏窗口句柄 3 HWND hTray = ::FindWindowEx(hStatus,0,"TrayNotifyWnd",NULL); //获取托盘部分的窗口句柄 4 5 //获得触摸板所在的位置,由用户输入 阅读全文
posted @ 2012-05-18 14:07 r3call 阅读(1296) 评论(0) 推荐(0) 编辑