This writeup does an in-depth step throuh of the spl code. It also has a nice flowgraph that demonstrates what happens to the input.
No brute force necessary! I've also included an algorithm (and python script) that will decode any string encoded by this program with no brute force.
[Much Ado Writeup](https://hgarrereyn.gitbooks.io/th3g3ntl3man-ctf-writeups/content/2017/picoCTF_2017/problems/reverse/Much_Ado_About_Hacking/Much_Ado_About_Hacking.html)