Figured it'd be a fun coding exercise... I've updated
http://nsis.sourceforge.net/Base64 to include the decoding function.
I haven't tested it rigorously - if there's an actual error in it (I know it uses more variables than it would strictly need, that's just for clarity), let me know or just edit the WiKi, of course.
Here's a further testbed, though:
!addincludedir "."
!include "LogicLib.nsh"
!include "CharToASCII.nsh"
!include "Base64.nsh"
OutFile "$%temp%\temp.exe"
Section
/* testing a string with some typical URL chars */
StrCpy $R9 "This is a test, this is only a test. http://nsis.sourceforge.net/?not+a%20query#at_all"
${Base64_Encode} $R9
Pop $R8
${Base64_Decode} $R8
Pop $R7
MessageBox MB_OK "$R9 (in)$\n$R8 (encoded)$\n$R7 (decoded)$\n$R9 (in)"
/* testing a supershort string */
StrCpy $R9 "A"
${Base64_Encode} $R9
Pop $R8
${Base64_Decode} $R8
Pop $R7
MessageBox MB_OK "$R9 (in)$\n$R8 (encoded)$\n$R7 (decoded)$\n$R9 (in)"
/* testing a short string */
StrCpy $R9 "AAA"
${Base64_Encode} $R9
Pop $R8
${Base64_Decode} $R8
Pop $R7
MessageBox MB_OK "$R9 (in)$\n$R8 (encoded)$\n$R7 (decoded)$\n$R9 (in)"
/* testing decoding of a looooooong string */
StrCpy $R9 "TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBpc2NpbmcgZWxpdC4NCk1hdXJpcyB2b2x1dHBhdCBsZWN0dXMgdmVsIG1pIHBoYXJldHJhIG1vbGxpcy4NCkluIG51bmMgZXJhdCwgYmxhbmRpdCBldSBncmF2aWRhIHZpdGFlLCBjb25zZWN0ZXR1ciBhIHF1YW0uDQpOdWxsYW0gc2FnaXR0aXMgbGliZXJvIHNpdCBhbWV0IHF1YW0gZGFwaWJ1cyB0aW5jaWR1bnQuDQpJbnRlZ2VyIGFudGUgYW50ZSwgZGFwaWJ1cyB1bGxhbWNvcnBlciBsYW9yZWV0IHNlZCwgcGVsbGVudGVzcXVlIHZlbCB0ZWxsdXMuDQpJbnRlZ2VyIGxhY2luaWEgaW1wZXJkaWV0IGxhY3VzIHV0IGRpZ25pc3NpbS4gTW9yYmkgZmFjaWxpc2lzIG1hZ25hIHZlbGl0Lg0KQWxpcXVhbSBwZWxsZW50ZXNxdWUgaWFjdWxpcyBuaXNpIGV1IGFsaXF1YW0uIEFsaXF1YW0gdGluY2lkdW50IHBlbGxlbnRlc3F1ZSBtb2xsaXMuDQpBZW5lYW4gY29uc2VjdGV0dXIgaW1wZXJkaWV0IGJsYW5kaXQuDQpJbnRlZ2VyIGFjIHJpc3VzIGEgbG9yZW0gY3Vyc3VzIHNjZWxlcmlzcXVlLg0KUGhhc2VsbHVzIHBlbGxlbnRlc3F1ZSwgbGliZXJvIHF1aXMgcG9zdWVyZSBydXRydW0sIG5lcXVlIHZlbGl0IGNvbnNlY3RldHVyIHRvcnRvciwgYWMgbWF0dGlzIGxpZ3VsYSBsZW8gZXUgYXJjdS4="
${Base64_Decode} $R9
Pop $R7
MessageBox MB_OK "$R7$\n$\n^^^ Lorem ipsum etc. with linebreaks ^^^"
SectionEnd
As far as I can tell, the URLDecode variant works correctly as well - but difficult to find actual use examples via Google.