攻防世界_Reverse_game

打开发现是一个游戏,挺简单的,直接输入12345678就能直接拿到flag在这里插入图片描述

使用IDA静态分析

在函数中搜索main,进入main函数,按F5进行反汇编

 int __cdecl main(int argc, const char **argv, const char **envp)
 {
   
	int result; // eax
	
main_0();
return result;
}

跳转到main_0函数

	void __cdecl main_0()
	{
   
	  signed int i; // [esp+DCh] [ebp-20h]
	  int v1; // [esp+F4h] [ebp-8h]
	
	  sub_13FA7BE(&unk_14AB110);
	  sub_13FA7BE(&unk_14AB158);
	  sub_13FA7BE(&unk_14AB1A0);
	  sub_13FA7BE(&unk_14AB1E8);
	  sub_13FA7BE(&unk_14AB230);
	  sub_13FA7BE(&unk_14AB278);
	  sub_13FA7BE(&unk_14AB2C0);
	  sub_13FA7BE(&unk_14AB308);
	  sub_13FA7BE(&unk_14AAFD0);
	  sub_13FA7BE("|              by 0x61                                 |\n");
	  sub_13FA7BE("|                                                      |\n");
	  sub_13FA7BE("|------------------------------------------------------|\n");
	  sub_13FA7BE(
	    "Play a game\n"
	    "The n is the serial number of the lamp,and m is the state of the lamp\n"
	    "If m of the Nth lamp is 1,it's on ,if not it's off\n"
	    "At first all the lights were closed\n");
	  sub_13FA7BE("Now you can input n to change its state\n");
	  sub_13FA7BE(
	    "But you should pay attention to one thing,if you change the state of the Nth lamp,the state of (N-1)th and (N+1)th w"
	    "ill be changed too\n");
	  sub_13FA7BE("When all lamps are on,flag will appear\n");
	  sub_13FA7BE("Now,input n \n");
	  while ( 1 )
	  {
   
	    while ( 1 )
	    {
   
	      sub_13FA7BE("input n,n(1-8)\n");
	      sub_13F9418();
	      sub_13FA7BE("n=");
	      sub_13F96D4("%d", &v1);
	      sub_13FA7BE("\n");
	      if ( v1 >= 0 && v1 <= 8 )
	        break;
	      sub_13FA7BE("sorry,n error,try again\n");
	    }
	    if ( v1 )
	    {
   
	      sub_13F76D6(v1 - 1);
	    }
	    else
	    {
   
	      for ( i = 0; i < 8; ++i )
	      {
   
	        if ( (unsigned int)i >= 9 )
	          j____report_rangecheckfailure();
	        byte_14D2E28[i] = 0;
	      }
	    }
	    j__system("CLS");
	    sub_13F8054();
	    if ( byte_14D2E28[0] == 1
	      && byte_14D2E28[1] == 1
	      
  • 4
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值