flat assembler
Message board for the users of flat assembler.

Index > Windows > Is there a decompiler compatable with the flat assembler

Author
Thread Post new topic Reply to topic
radoslavkirilov



Joined: 27 Dec 2006
Posts: 7
radoslavkirilov
e.g. can I reverse engineer and extract the assembler code of a windows aplication, and ther compile it back with the flat assembler Smile Thanks in regards.
Post 15 Apr 2007, 07:12
View user's profile Send private message Reply with quote
Garthower



Joined: 21 Apr 2006
Posts: 158
Location: Ukraine
Garthower
Maybe you help IDA?
Post 15 Apr 2007, 08:25
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
radoslavkirilov



Joined: 27 Dec 2006
Posts: 7
radoslavkirilov
There are surely decompilers that make assembler code, but how to compile again the source code?
Post 16 Apr 2007, 17:57
View user's profile Send private message Reply with quote
Daedalus



Joined: 25 Mar 2007
Posts: 52
Daedalus
I don't know any compiler that does that, but you could create an ollydbg script I guess?

Though I have another question: Why? Laughing
Post 16 Apr 2007, 19:31
View user's profile Send private message MSN Messenger Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
Imho, this isn't generally very useful.

If you want to extend/augment and application, by far the easiest and most manageable way is to write your extension in a DLL, and either augment the executable to load your DLL, or use a loader that injects it. From the DLL, you can then patch the necessary locations in the executable, creating 'hooks' that call into your DLL.

There's just too many things that can go wrong with dis/reassembly, especially when dealing with real-world applications.
Post 16 Apr 2007, 22:19
View user's profile Send private message Visit poster's website Reply with quote
Xorpd!



Joined: 21 Dec 2006
Posts: 161
Xorpd!
There is a blind spot every optimizer I have seen (including myself) has. It would be cool to be able to start with the assembly output of Intel's compiler and patch around that blind spot, however Intel's assembly language output seems to be a hodgepodge of 3 or more assembly languages so that it won't assemble with, for e.g. gas or ml64. Given a disassembler this wouldn't be a problem, but disassembly in the general case is not possible because the code could calculate an address and then jump to it. Detecting when an address calculation is occurring and modifying it so that the jump would be to the changed address is not going to happen.

Maybe the only reasonable thing to do in this case would be to write a translator from Intel assembly output to an assembly language that some assembler understands but this would be a lot of work for just a couple of percent improvement in overall performance.
Post 17 Apr 2007, 17:21
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
couple of percent is good optimization, but you will hardly manage it with lowlevel optimization. especially optimization on binary code.
Post 17 Apr 2007, 17:38
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
Xorpd! wrote:

Maybe the only reasonable thing to do in this case would be to write a translator from Intel assembly output to an assembly language that some assembler understands but this would be a lot of work for just a couple of percent improvement in overall performance.

Some perl wizard could probably whip up a script to do it pretty quickly...

vid wrote:

couple of percent is good optimization, but you will hardly manage it with lowlevel optimization. especially optimization on binary code.

Depends on the target platform and what the code is for. <5% speedup on a 1+ GHz x86 generally isn't worth it if it's a lot of work, imho.
Post 17 Apr 2007, 22:06
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.