传奇广告查询第一站 同步54.com

三种call解释(二): 代码解释
原创 于2026-01-05 18:07:00发布
2 阅读
0
0
 #include  #include  using namespace std; void _cdecl test111(int num) { printf("num=%d\n", num); } void _stdcall test222(int num) { printf("num=%d\n", num); } void __declspec(naked) test333(int num) { _asm{ push ebp mov ebp,esp } printf("num=%d\n", num); _asm{ mov ebp,esp pop ebp retn } } void _cdecl test(int num) { printf("_cdecl num=%d\n", num); ////// EIP的值不允许通过MOV指令来修改,可以通过PE结构修改; _asm{ push num call test111 // 调用cdcall的方法; add ESP,0x4 } int xxx = 0; _asm{ push num call test333 // 调用naked call的方法; add ESP,0x4 } _asm{ push num // 调用stdcall的方法; call test222 } int xxx2 = 1; } void _stdcall test1(int num) { printf("_stdcall num=%d\n", num); _asm{ push num call test111 // 调用cdcall的方法; add ESP,0x4 } int xxx = 0; _asm{ push num call test333 // 调用naked call的方法; add ESP,0x4 } _asm{ push num // 调用stdcall的方法; call test222 } int xxx2 = 1; } int main() { int num = 20; _asm{ mov eax,0 mov eax,0 mov eax,0 } test(num); // _cdecl test1(num); // _cdecl _asm{ mov eax,0 mov eax,0 mov eax,0 } test111(num); // _cdecl _asm{ mov eax,0 mov eax,0 mov eax,0 } test222(num); // _stdcall _asm{ mov eax,0 mov eax,0 mov eax,0 } test333(num); printf("num=%d\n", num); // MessageBoxA(0, 0, 0, 0); // getchar(); return 0; }

管理员
0
0
0
分享
上一篇: 传奇服务器设置验证码,简单设置传奇服务端支持二级密码的办法
下一篇: python自动化操作网页游戏_用Python脚本做一些网页游戏中力所能及的自动化任务...
评论
历史记录
回顶部
浏览时间 游戏名称 游戏IP 开区网址
注册1GM论坛账号
  • 上传头像
注册

已有账号,

微信扫码登录
重置密码
重置密码

注册

绑定关联手机号
关联手机号