Creates decryption

Copies the encryption algorithm and changes it to decrypt. Fixes bugs,
the program compiles on Visual C++