https://buuoj.cn/challenges#[ACTF%E6%96%B0%E7%94%9F%E8%B5%9B2020]Oruga

64 elf

对输入检查

_BOOL8 __fastcall check(char *in)
{
  int now; // [rsp+Ch] [rbp-Ch]
  int index; // [rsp+10h] [rbp-8h]
  int step; // [rsp+14h] [rbp-4h]
 
  now = 0;
  index = 5;
  step = 0;
  while ( map[now] != '!' )
  {
    now -= step;
    if ( in[index] != 'W' || step == -16 )
    {
      if ( in[index] != 'E' || step == 1 )
      {
        if ( in[index] != 'M' || step == 16 )
        {
          if ( in[index] != 'J' || step == -1 )
            return 0LL;
          step = -1;
        }
        else
        {
          step = 16;
        }
      }
      else
      {
        step = 1;
      }
    }
    else
    {
      step = -16;
    }
    ++index;
    while ( !map[now] )
    {
      if ( step == -1 && (now & 0xF) == 0 )
        return 0LL;
      if ( step == 1 && now % 16 == 15 )
        return 0LL;
      if ( step == 16 && (unsigned int)(now - 240) <= 15 )
        return 0LL;
      if ( step == -16 && (unsigned int)(now + 15) <= 30 )
        return 0LL;
      now += step;
    }
  }
  return in[index] == '}';
}

可以发现是那种溜冰的游戏

上下左右是 WMJE

...##...OO......
........OO.PP...
...L.OO.OO.PP...
...L.OO.OO.P....
..LL.OO....P....
.....OO....P....
#...............
............#...
......MMM...#...
.......MMM....EE
...0.M.M.M....E.
..............EE
TTTI.M.M.M....E.
.T.I.M.M.M....E.
.T.I.M.M.M!...EE

flag{MEWEMEWJMEWJM}