Original code

this is the original reverse engineered source code for both client and
server