While I'm sure it was an interesting exercise, the author could have saved himself some time and simply Googled the name, there are published scripts and COM objects to deal with this encoding stream such as[2].
[1] http://www.securityfocus.com/archive/1/520869
[2] http://www.remkoweijnen.nl/blog/2013/03/19/scriptable-citrix...