When a stored procedure is created using the ENCRYPTED option, SQL Server internally saves the text with the object definition in obfuscated format
The actual definition of the object is stored in the sys.sysobjvalues ββsystem table, which is not directly accessible. When connecting to SQL Server using a dedicated administrator connection (DAC), you can select the imageval column, which stores the information.
If you do not allow your company or your client to use third-party tools, see this message on how to decrypt an encrypted object:
http://www.mssqltips.com/sqlservertip/2964/encrypting-and-decrypting-sql-server-stored-procedures-views-and-userdefined-functions/
However, the easiest way is to use third-party tools.
One of them is ApexSQL Complete , a free SSMS and VS add-in.
In ApexSQL, Encrypted objects are treated like any other SQL Server object with the addition of their DDL script, even if it is encrypted using the Decrypt encrypted objects option
The script of the encrypted object is displayed in the embedded object details dialog box:

Disclaimer: I work for ApexSQL as a support engineer
source share