Never loop on eof. It is almost never right and leads to all sort of errors. In your case: reading one character more than needed. Loop on input operation.
1 2 3
while (!fin.eof()) {
fin.get(c);while (fin.get(c)) {
Your first step is to make the recommended changes.
The next step is to comment out all your code in the loop and just display character c. That will tell you whether the read file process is going ok.
Then you proceed with your code slowly but surely from there.
It's next to impossible to debug reams of code ie test as you go, not in big slabs.
BTW Hint: Rot13 is a modular arithmetic exercise and you need to limit the range of the ascii code range accordingly because that's more than likely what the gibberish is all about.