This is a completely static analysis solution, and how we did it during the competition:http://ohaithe-re.tumblr.com/post/129657401392/csaw-quals-2015-reversing-500-wyvernIf you want a really silly script that can solve it with angr, a binary analysis framework, though, here's a way to do that. We didn't actually do it this way during the competition, but it's an interesting proof-of-concept.https://github.com/angr/angr-doc/blob/master/examples/csaw_wyvern/solve.py