Rating:

- reverse self-modifying code
- figure out it's not actually a binary tree
- calculate shortest path in directed graph
- get the flag from the shortest path

Original writeup (https://github.com/Pusty/writeups/tree/master/pbctf2021#binary-tree).