When trying to open stored procedure or other object with Sql Server Management Studio you get the error "Sql Server script failed for storedProcedure property TextHeader is not available for storedProcedure. This property may not exists for this object, or may not be retrievable due insufficient access rights. The text is encrypted"
You are trying to do that by right click on the stored procedure -> "Script Stored Procedure as" -> "CREATE To" -> "New Query Editor Window"
The stored procedure is not encrypted, the error is because there is no grant permission "VIEW DEFINITION"