Merge pull request #1 from Hykem/master

Implemented SDAT decryption algorithm.
Fixed memory leaks