Decoding Base64 message encoded with a key. I only know the ciphertext and code
I have briefly looked at the code. It is not well readable, but it looks like it is Vigenère cipher. It seems to operate on Unicode values of the characters, but it probably does not expect the Unicode value to be over 255 or lower than 16, so it can have troubles with some unicode characters. Finally, it is encoded to base64 in order to produce ASCII characters.

So, you can use known cryptanalysis for Vigenère cipher. There are probably also some tools, but you will likely need to adjust the input.