That's some serious reverse engineering. RDP is pretty coveted by MS. They're constantly working on the terminal server, it gets changed almost every update. There's actually a separate license required to use it for multiple seats. Though there's hacks out there I've used myself to enable it in Windows versions that don't fully support it.
In any case I don't think I'd mess with RDP on a Unix system, I'd just use an X sever with an X client, that's what it's designed for and you don't need no stinkin license. Though RDP'ing into a Unix system from a Windows client might be kind of cool, I don't know if it would be that useful.