I think this would be an excellent contender for an obfuscation contest. Perhaps some clarification could help elucidate this code for future readers.