tl;dr:
1. Notice the binary does only sort+xor2. Recover keystream by encrypting black image3. Recover sorting order by sending diagonal line
Full writeup: https://github.com/p4-team/ctf/tree/master/2019-09-02-tokyowesterns/meow