查找vs2015编译的OEP

1.写个简单的main函数
···
#include<iostream>
using namespace std;
int main() {
int a = 0;
int b = 3;
int c = 4;
float aq = 44.4;
double c3 = 3432.423432;

return 0;

}
···
下断到return 0
查找vs2015编译的OEP
2.运行到断点
查找vs2015编译的OEP
3.反汇编运行到真下的ret指令
查找vs2015编译的OEP
4.单步走进去 旁边就多了个文件
查找vs2015编译的OEP
5.点击文件
查找vs2015编译的OEP
发现不管是main还是winmain 都是 invoke_main() 调用的
···
static int __cdecl invoke_main() throw()
{
return main(argc, argv, _get_initial_narrow_environment());
}

static int __cdecl invoke_main() throw()
{
    return wWinMain(
        reinterpret_cast<HINSTANCE>(&__ImageBase),
        nullptr,
        _get_wide_winmain_command_line(),
        __scrt_get_show_window_mode());
}

···
查找vs2015编译的OEP
///////////////////////////通过ida查找///////////////////////////////

猜你喜欢

转载自blog.51cto.com/haidragon/2116951
今日推荐