rot13 is (X + (26/2)) mod 26 ; this is (X + (2^16)/2) mod 2^16. (The BMP is the first 2^16 code points of unicode.)
Edit: silly formatting dropped my math punctuation.
Edit: silly formatting dropped my math punctuation.
AFAICS, it's actually using decimal 8000, not 2^16/2 = 0x8000, so I don't really understand how this is reversible at all unless they're just subtracting it back.
What we really need is rot88000h for the full U+0..U+10FFFF range. :)