PDA

View Full Version : How to convert dll to cpp file



hYph3n
11-09-2006, 07:27 AM
Hi,

I somehow deleted the source file for the dll i created. I am trying to get it using recovery softwares, but uptil now i am unable to get it.

Can any one help me to suggest a software which can convert the dll file to the cpp file. I made the dll file using "Microsoft Visual C 6". Please help me out. It's really important.

Mario F.
11-09-2006, 07:45 AM
No way jose.

You need to decompile your DLL. And the resuls will not bring you down to the algorithm level. You can expect to salvage function definitions and calls, variables and some of the operations performed on them. But you definitely lose your code structure. includes, classes definitions, hierarchies,... all lost.

With enough effort you could in theory reach your source code. But this implies a deep knowledge of assembler and lots of trying and testing. The time and the effort is just not comparable to simply rewriting the whole thing from scratch.

Which is my advise. That and next time keep backups.

hYph3n
11-09-2006, 07:56 AM
No way jose.

You need to decompile your DLL. And the resuls will not bring you down to the algorithm level. You can expect to salvage function definitions and calls, variables and some of the operations performed on them. But you definitely lose your code structure. includes, classes definitions, hierarchies,... all lost.

With enough effort you could in theory reach your source code. But this implies a deep knowledge of assembler and lots of trying and testing. The time and the effort is just not comparable to simply rewriting the whole thing from scratch.

Which is my advise. That and next time keep backups.
definitely i'll back up from next time.

It'd be enough if i get the function definitions, calls and variables. Can you tell me any softwares like this ?

Mario F.
11-09-2006, 08:02 AM
search for c++ decompilers and cross your fingers while you also search for how to use them.

Prelude
11-09-2006, 08:44 AM
>It'd be enough if i get the function definitions, calls and variables.
That's just about everything. You're pretty much SOL unless you know assembly and feel confident that you can reverse engineer your program.

maxorator
11-09-2006, 09:25 AM
Reverse engineering is quite difficult, I'd say. I've only reverse engineered some functions from other programs, I've never done it to the whole program or dll.

Mario F.
11-09-2006, 10:20 AM
Which begs the question why the OP feels he just needs function definitions and variables.

Some people are so funny... At least he didn't go the "a friend of mine" routine.

Prelude
11-09-2006, 10:45 AM
>Reverse engineering is quite difficult, I'd say.
Reverse engineering is extremely difficult, especially with a complicated application. Disassemblies are notoriously obtuse, even if you don't consider that translating assembly to C++ requires a lot of creativity. I've done a fair amount of RE, and it always feels like an exercise in futility.

maxorator
11-09-2006, 12:05 PM
Disassemblies are notoriously obtuse, even if you don't consider that translating assembly to C++ requires a lot of creativity.
Yeah, creativity is what most of the people lack.

DavidP
11-10-2006, 09:40 PM
you know it would just be completely amazing if you had just HAPPENED to compile that DLL in debugging mode...but I guess you didnt...

VirtualAce
11-12-2006, 09:43 PM
Yeah, creativity is what most of the people lack.

However many of us also lack knowledge. Not naming names here.

maxorator
11-13-2006, 06:27 AM
You're referring to my age, are you?:rolleyes:

So, I think there are 4 important things in programming: creativity, knowledge, experience and interest. :)