1.运行函数,收集字符串
获取关键词字符串:luck
2.寻找字符串引用代码
3.生成伪代码
4.获得main函数的C语言代码
5.分析程序逻辑
check函数:
main函数
int __fastcall main(int argc, const char **argv, const char **envp){ unsigned int v3; // edx char v5; // [rsp+23h] [rbp-Dh] unsigned int v6; // [rsp+28h] [rbp-8h] unsigned int v7; // [rsp+2Ch] [rbp-4h] _main(argc, argv, envp); puts("Welcome to the maze. You need to find the exit, which is at point C. Your current position is marked as @."); puts("flag{\"The shortest route\"},good luck!!"); v7 = 14; v6 = 0; while ( (unsigned int)check(v7, v6) != 1 ) { while ( 1 ) { v5 = getchar(); if ( v5 == 108 ) break; if ( v5 > 108 ) { if ( v5 == 115 ) { ++v7; goto LABEL_15; } if ( v5 == 121 ) { --v7; goto LABEL_15; } } else if ( v5 == 99 ) { ++v6; goto LABEL_15; } } --v6;LABEL_15: if ( (unsigned int)check_1(v7, v6) ) { puts("you've hit a wall!!bro@!"); if ( v5 == 108 ) { ++v6; } else if ( v5 > 108 ) { if ( v5 == 115 ) { --v7; } else if ( v5 == 121 ) { ++v7; } } else if ( v5 == 99 ) { --v6; } } else { puts("You are one step closer to victory!!"); v3 = idx++; str[v3] = v5; } } puts("you are win!!"); sleep(60LL); return 0;}
发现 ‘s' 'l' 'y ' 'c' 为控制上下左右移动
要使map[10 * a1 + a2] == 67 为真,那得知道map数组存储值,这个就不知道了。。。