I had a look at the code and I see what you mean - some of the endings depend on the game state, or aren't clearly delineated. It's possible though. I hacked together something that works for all the endings, and can send it to you if you like.