| View previous topic :: View next topic |
| Author |
Message |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Thu Mar 27, 2008 6:15 pm Post subject: programming a decompiler |
|
|
I havn't programmed anything in forever. And I finally figured out what I want to do. I want to program a universal decompiler, or something along those lines. I just have no idea where to start. Anybody have any links to APIs I should know, or anything like that would be appreciated. Becuase I honestly, have no idea where to start. _________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Thu Mar 27, 2008 10:25 pm Post subject: |
|
|
For all API as you will land up needing to deal with all of them if you want to decompile back to real code, or at least attempt it:
http://msdn2.microsoft.com/
Universal is not something I see you getting anywhere close to doing. As each language has it's own compiler, own methods, etc. Everything is different for the most part in each language.
Different languages use different runtimes, different environment setups, etc.
You should probably just stick to one language, master that, then move on to another. Then as time progresses combine the two into one program, move into another, and so on.
But you wont make a single code base for every language that will follow the same decompile instructions. _________________
- Retired. |
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Fri Mar 28, 2008 10:34 pm Post subject: |
|
|
I know. when I said universal, I didn't literally mean for everything, just for the comman languages, C/C++, delphi, vb, asm, stuff like that. And I know to go to msdn.com but, I don't know what APIs to look up. _________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
--Pillboi-- Grandmaster Cheater Supreme
Reputation: 0
Joined: 06 Mar 2007 Posts: 1383 Location: I don't understand the question. Is this a 1 to 10 thing?
|
Posted: Sat Mar 29, 2008 2:30 am Post subject: |
|
|
| Wiccaan wrote: | | You should probably just stick to one language. |
_________________
Enter darkness, leave the light, Here be nightmare, here be fright...
Earth and Water, Fire and Air. Prepare to meet a creature rare.
Enter now if you dare, Enter now the dragon's lair. |
|
| Back to top |
|
 |
goldengold Grandmaster Cheater Supreme
Reputation: -1
Joined: 11 Nov 2006 Posts: 1841 Location: -.-
|
Posted: Sat Mar 29, 2008 3:59 am Post subject: |
|
|
I dont think this is wise but google it _________________
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sat Mar 29, 2008 8:55 pm Post subject: |
|
|
| oib111 wrote: | | I know. when I said universal, I didn't literally mean for everything, just for the comman languages, C/C++, delphi, vb, asm, stuff like that. And I know to go to msdn.com but, I don't know what APIs to look up. |
You will need quiet a few to create a full decompiler. For the most part, you need file input/output to read the contents of the file that you want to decompile. Other then that you will be doing a lot of hand work yourself comparing, stripping, and splitting up the code.
I can't give you a clear answer, I have never written a decompiler myself, and I really don't plan on ever making one either. _________________
- Retired. |
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Sat Mar 29, 2008 9:59 pm Post subject: |
|
|
| Wiccaan wrote: | | oib111 wrote: | | I know. when I said universal, I didn't literally mean for everything, just for the comman languages, C/C++, delphi, vb, asm, stuff like that. And I know to go to msdn.com but, I don't know what APIs to look up. |
You will need quiet a few to create a full decompiler. For the most part, you need file input/output to read the contents of the file that you want to decompile. Other then that you will be doing a lot of hand work yourself comparing, stripping, and splitting up the code.
I can't give you a clear answer, I have never written a decompiler myself, and I really don't plan on ever making one either. |
any other APIs besides file in file out? I mean, I know, you can't write me down a list of every API i will need, just like list a few, that you think would be useful. _________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
Hieroglyphics I post too much
Reputation: 0
Joined: 06 Dec 2007 Posts: 2007 Location: Your bedroom
|
Posted: Sun Mar 30, 2008 12:08 am Post subject: |
|
|
Nice, that would be really nice since I am learning Delphi and C++ [kind of] _________________
|
|
| Back to top |
|
 |
Renkokuken GO Moderator
Reputation: 4
Joined: 22 Oct 2006 Posts: 3249
|
Posted: Sun Mar 30, 2008 12:25 am Post subject: |
|
|
| I really think you're underestimating the difficulty of this project. |
|
| Back to top |
|
 |
Trow Grandmaster Cheater
Reputation: 2
Joined: 17 Aug 2006 Posts: 957
|
Posted: Sun Mar 30, 2008 9:15 am Post subject: |
|
|
you'll need to do a lot of research on what every "ASM function" (or whatever you call it) mean in every language you plan to reinterpret as readable code.
For example, you might need to know what you code in vb to get "nop" in ASM.
(You cannot do that directly via default VB6 IDE) _________________
Get kidnapped often. |
|
| Back to top |
|
 |
DoomsDay Grandmaster Cheater
Reputation: 0
Joined: 06 Jan 2007 Posts: 768 Location: %HomePath%
|
Posted: Sun Mar 30, 2008 1:38 pm Post subject: |
|
|
When you say API, are you talking about winAPI or the IA32/IA64 (or alternatively AMD**) opcode list? (WinAPI's are DLL exports, and the IA32 opcode list could be found searching through intell's manuals)
For better managment I suggest you to use some debugging functions in order to handle the executables better. |
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Mon Mar 31, 2008 9:27 pm Post subject: |
|
|
Like I said, you will definitely need the file input/output, but you don't have to use API for that. You will come into contact with every API while decompiling something. It all depends on what the program itself uses. Basic steps for this would be:
- Open file and read contents into a buffer.
- Parse file header for needed information.
- Strip header from buffer.
- Convert ASM bytes to opcodes.
- Convert opcodes to 'attempted' translations.
- Output, in some fashion, the converted code.
Again, just basic overview of what I figure would be done. I've never written a decompiler, nor plan to so like I said, not much I can really say then my educated guess. _________________
- Retired. |
|
| Back to top |
|
 |
|