Click here to Skip to main content
16,012,508 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I've downloaded exe file and I wont to extract the code from this file

What I have tried:

I've downloaded exe file and I wont to extract the code from this file
Posted
Updated 23-May-16 20:01pm
Comments
Sergey Alexandrovich Kryukov 24-May-16 1:51am    
Why?
—SA

The process is called "disassembly". There is a great open-source tool, ILSpy:
ILSpy[^].

The process is extremely easy and the quality of output is very good. Output languages are IL, C# and VB.NET. You can disassemble the whole assembly or a part of it.

—SA
 
Share this answer
 
v2
You can do it - it's a process called decompiling - but how much use it'll be to you is another matter.
A quick google will give you lots of solutions: exe to source c - Google Search[^]
The problems are:
1) Copyright. If the original author is fine about you having the source, than that's good - but in that case it's normally published under an "open source" licence of some form and the actual source code is released at the same time either via Github, or as a ZIP download. If you don't have permission, then you could be prosecuted for theft if you use the contents of the exe to produce "your own" version of the code.
2) If it isn't released under an open source licence, then there is a good chance that the EXE is obfuscated - which is a process designed to make it as hard to read as possible so you can't do what you are trying to do - read the source and find out how they do it.
3) EXE's come in two main "flavours": Native and .NET. .NET EXEs can be decompiled into code of some form (subject to 1 and 2 above) but Native exes pretty much can't - they are optimised machine code generated from a higher level language and unless you want to wade through a huge amount of assembler with no names, no comments, and no visible structure you aren't going to get anything usable. Native EXE files cannot be decompiled to C# or VB.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900