Rating: 5.0

TLDR: The typescript code implements a VM at compile time that checks certain input constraints. I decoded the VM instructions and wrote a binja plugin to reverse the code. The constraints turn out to be a travelling-salesman minimization problem that we can solve by hand with heuristics.

Full writeup: [https://ctf.harrisongreen.me/2020/plaidctf/thats_a_lot_of_fish/](https://ctf.harrisongreen.me/2020/plaidctf/thats_a_lot_of_fish/)

Original writeup (https://ctf.harrisongreen.me/2020/plaidctf/thats_a_lot_of_fish/).