[BUUCTF]Reverse | 您所在的位置:网站首页 › ff14刮奖 › [BUUCTF]Reverse |
是32位的,拖入ida严刑拷打 【还可以点进DialogBoxParamA函数,这是一个从对话框模板资源创建模式对话框。 在显示对话框之前,函数会将应用程序定义的值作为WM_INITDIALOG消息的 lParam 参数传递给对话框过程。 应用程序可以使用此值初始化对话框控件的函数。 DialogBoxParam 函数使用 CreateWindowEx 函数创建对话框。 然后,如果模板指定对话框过程DS_SETFONT或DS_SHELLFONT样式) ,则 DialogBoxParam 会发送WM_INITDIALOG消息 (和WM_SETFONT消息。 无论模板是否指定 WS_VISIBLE样式) 、禁用所有者窗口,以及启动其自己的消息循环来检索和调度对话框,函数都会 (显示对话框。 当对话框过程调用 EndDialog 函数时,DialogBoxParam 将销毁对话框,结束消息循环,如果以前启用) ,则启用所有者窗口 (,并在调用 EndDialog 时返回由对话框过程指定的 nResult 参数。】 Shift+f12字符串窗口查看 点进去4010F0查看 int __cdecl sub_4010F0(int a1, int a2, int a3) { int result; // eax int i; // esi int v5; // ecx int v6; // edx result = a3; for ( i = a2; i *(_DWORD *)(a1 + 4 * result) ) { if ( i >= result ) break; ++i; *(_DWORD *)(v5 + a1) = *(_DWORD *)(a1 + 4 * result); if ( i >= result ) break; while ( *(_DWORD *)(a1 + 4 * i) = result ) goto LABEL_13; } if ( i >= result ) break; v5 = 4 * i; *(_DWORD *)(a1 + 4 * result) = *(_DWORD *)(4 * i + a1); } --result; } while ( i < result ); } LABEL_13: *(_DWORD *)(a1 + 4 * result) = v6; sub_4010F0(a1, a2, i - 1); result = a3; ++i; } return result; }
转换为c语言代码执行,这里参考的是这个大佬的wp:https://blog.csdn.net/weixin_46009088/article/details/109148249 #include #include int sub_4010F0(char* a1, int a2, int a3) { int result; // eax int i; // esi int v5; // ecx int v6; // edx result = a3; for (i = a2; i = result) break; ++i; a1[v5] = a1[result]; if (i >= result) break; while (a1[i] = result) goto LABEL_13; } if (i >= result) break; v5 = i; a1[result] = a1[i]; } --result; } while (i |
CopyRight 2018-2019 实验室设备网 版权所有 |