https://buuoj.cn/challenges#[MRCTF2020]Xor

32 exe

发现 反编译失败

https://blog.csdn.net/xiangshangbashaonian/article/details/82889924

多点几个 call (401095 处)进去反编译就成功了

错误的原因就是我们的 F5 插件不能正确识别这个 call 的参数

int __cdecl main(int argc, const char **argv, const char **envp)
{
  unsigned int i; // eax
 
  print((int)"Give Me Your Flag String:\n");
  scan("%s", input);
  if ( strlen(input) != 27 )
  {
LABEL_6:
    print((int)"Wrong!\n");
    system("pause");
    _loaddll(0);
    __debugbreak();
  }
  for ( i = 0; i < 0x1B; ++i )
  {
    if ( ((unsigned __int8)i ^ (unsigned __int8)input[i]) != byte_41EA08[i] )
      goto LABEL_6;
  }
  print((int)"Right!\n");
  system("pause");
  return 0;
}

就是异或

flag="MSAWB~FXZ:J:`tQJ\"N@ bpdd}8g"  
  
# 异或i  
res = ""  
  
for i in range(len(flag)):  
    res += chr(ord(flag[i]) ^ i)  
  
print(res)
MRCTF{@_R3@1ly_E2_R3verse!}