On Windows Azure Cloud Services, instances are loaded as .cspkg packages.
According to the documentation, the Get Package operation retrieves the cloud service package for deployment and stores the package files in Windows Azure Blob storage.
Then you can download and extract this package (it is in the ZIP file format) to extract its contents. See this answer for more details.
In the case of ASP.NET applications, this will be a mixture of text files and binary assemblies (.DLL). In the case of Java, these will be .jar files. You can use the appropriate decompiler to extract the approximate source code. But it would probably be unsafe to change this reverse engineering source code and upload it back into production, at least without rigorous testing.
source share