Decompiling it using https://retdec.com/ (thanks @cmaddy) and viewing the source helped me see what was going on.