Decompile 006EE65A

Quick look shows this is used in a bunch of places, so I threw it in window.c

Code flow is a still a bit awkward though