# convert .exe files to .c files



## Lucky Rathod (Mar 25, 2008)

Friends is it possible to convert .exe files to .c files as i have deleted my .c file accidentally


----------



## Pathik (Mar 25, 2008)

You can't.. Maybe reverse engg wd help? Google.


----------



## MetalheadGautham (Mar 25, 2008)

If the program was your own, there is no reason why you can't rewrite it.
If it was downloaded, there is no reason why you can't download it again.

But exe to c is a next to impossible job.


----------



## mehulved (Mar 25, 2008)

MetalheadGautham said:


> If the program was your own, there is no reason why you can't rewrite it.
> If it was downloaded, there is no reason why you can't download it again.


And if you copied it from someone, you can copy it again.


----------



## DigitalDude (Mar 25, 2008)

try searching for a decompiler...



_


----------



## MetalheadGautham (Mar 25, 2008)

DigitalDude said:


> try searching for a decompiler...
> 
> 
> 
> _


a decompiler needs to convert binary to c in this case. Its very hard to do even for a human, and won't generate the same code.


----------



## DigitalDude (Mar 25, 2008)

MetalheadGautham said:


> a decompiler needs to convert binary to c in this case. Its very hard to do even for a human, and won't generate the same code.


Most probably he would have written a simple C program  Thats why I said 



_


----------



## ray|raven (Mar 25, 2008)

Decompiler work for languages that write byte code and not binary.
I did use one once, when i acidentally deleted my java files instead of my class files, _Yeah, Stupid me.
_They dont give you the exact code , but its helpful instead of starting back from ground zero.


----------



## QwertyManiac (Mar 25, 2008)

Try a file recovering software will you?  (Recover-My-Files is good)


----------



## ray|raven (Mar 25, 2008)

^Well, in my case , XFS has no undelete mechanism.


----------



## aritrap (Mar 25, 2008)

Whose program was it anyway? If it was yours, you could have rewritten it easily. 

Have you forgotten the site from where u downloaded it? ? ?


----------



## QwertyManiac (Mar 25, 2008)

Err why do you guys thing rewriting code is easy? It could have been over 500~ lines, a piece of art put together day by day! It'd be downright frustrating to rewrite the entire process again.

And why is it a common thing with you guys to think that every other poster here in this section only downloads or asks for code and never codes himself? :\


----------



## redhat (Mar 25, 2008)

Dunno, think a decompiler should work...
I have tried Java decompilers for that matter, dunno about C


----------



## khattam_ (Mar 25, 2008)

java decompilers might work..coz it is an interpreted language. But getting .c from exe is IMPOSSIBLE....

all you can do now is try file recovery.. or rewrite the code..


----------



## lilovirus (Apr 1, 2008)

You can get assembly code out of your exe, and if you understand assembly then you can write C code by looking into it.

As while doing name mangling compiler puts different name for variables in exe so you can not get back original C file. but surely you can get your code back.


----------



## BSOD (Apr 8, 2008)

Even if it is possible to actually get back the code manually, it would take days, if not months. Its better if you rewrite the whole thing or use a recovery software to find the deleted file.


----------



## Ishan (Apr 30, 2008)

Digit guys are getting sick day by day!


----------



## JGuru (Apr 30, 2008)

Use can try *Reverse Engineering Compiler* (REC 2.1) to convert EXE to a
 C language file.

 *www.backerstreet.com/rec/rec.htm

 I don't know how good it is, since I haven't tested it.


----------

