Main

April 09, 2008

Some functions are neater than the decompiler thinks

The decompiler makes some assumptions about the input code. Like that call instructions usually return, the memory model is flat, the function frame is set properly, etc. When these assumptions are correct, the output is good. When they are wrong, well, the output does not correspond to the input. Take, for example, the following snippet:

The decompiler produces the following pseudocode:

Apparently, the v3 variable (it corresponds to edx) is not initialized at all. Why?

Continue reading "Some functions are neater than the decompiler thinks" »

March 12, 2008

New Hex-Rays Demo

This has been online for a while now, I just had no time to announce it properly: a new thorough demo of the decompiler by ccso.com, our US distributor:

This demo is not just a teaser like the previous one. It is much deeper and shows many decompiler aspects in detail: it starts with the plugin configuration, shows a couple of simple decompilation cases, and then moves on to more complex functions. If you wondered how to improve the resulting pseudocode and handle typical cases, this video is for you!

February 18, 2008

Easy structure types

I'm happy to tell you that a new build of the decompiler is ready! It introduces new easily accessible commands to manipulate structure pointers. First, a variable can be converted into a structure pointer with one click. Also, new the structure types can be build on the fly by the decompiler. As usual, any type or name can be modified any time. All this makes using the decompiler really agreeable. Please watch a short demo:

Continue reading "Easy structure types" »

January 02, 2008

Better user interface for decompiler

We are glad to release a new version of the Hex-Rays decompiler! Highlights of this build:
  • improved usability
  • support for unusual calling conventions
  • better handling of obfuscated code

The most important improvement is the user interface. Now the decompiler is at your fingertips at all times, the same way as the graph view. Remember that you can toggle graph-text views in IDA with one keyboard hit? For the decompiler you can use the Tab key: it toggles between the disassembly and pseudocode views.

For those of you who prefer to see both the decompiler output and disassembler output in the same window, we added the "copy to disassembly" command. It just does what its names says: copies the pseudocode text to the disassembly window. You can see both outputs simultaneously: mapping of low level assembly idioms to high level constructs is made as transparent as possible.

With this build, you will be able to open multiple pseudocode windows. This will be especially useful for long functions: just open a separate window for each called function by Ctrl-double clicking on function names. The long function will stay intact in its own window and you won't lose time by reanalyzing it upon each return.

One more command to handle code complexity: ability to hide parts of code. The new hide/unhide command allows you to collapse a multiline statement into just one line. Collapsing unimportant sub-statements reveals the global structure of the decompiled function.

We also added other things to make the life easier: the command to jump to xrefs, better status line information, support for the __spoiled keyword, and more heuristic rules to the analyzer.

Here's a short video:

The detailed list of changes can be accessed here

Nice analysis!

November 28, 2007

Decompiler output ctree

The upcoming version of the decompiler SDK adds some nice features.
First, we created a reference manual. It is in doxygen format: cross references make it really easy to browse. Second, the SDK is compatible with both IDA v5.1 and v5.2. Third, we added functions to retrieve and modify all user-defined attributes like variable names, types, and comments. Fourth, we added more sample plugins. And fifth, our forum is open. All your decompiler and SDK related questions can be asked there.

Since the "show, don't tell" rule applies to everyone, here's a short video demonstrating one of the new sample plugins (it displays the decompiler output as a graph):

Hopefully the new version will be available this week, as soon as the regression tests are over.

October 30, 2007

Hex-Rays SDK is ready!

A binary analysis tool like a decompiler is incomplete without a programming interface. Sure, decompilers tremendously facilitate binary analysis. You can concentrate of the program logic expressed in a familiar way. Just add comments, rename variables and functions to get almost the original source code, almost perfect. However, quite often there is a small ugly detail and the output falls short of being satisfactory.

Continue reading "Hex-Rays SDK is ready!" »

August 28, 2007

Coordinate system for Hex-Rays

One of must-have features of a reverse engineering tool is the ability to add comments to the output listing. Without this feature, the output stays difficult to understand. The user copies it to a text editor to continue the analysis but this is a bad solution because the dynamic nature of the output is lost. The command to rename variables alleviates the problem but comments are still necessary.

Continue reading "Coordinate system for Hex-Rays" »

June 19, 2007

Trunk, Branches, and Leaves

IDA Pro being and old and time-proven platform for binary analysis, many plugins grew on it. There are custom made plugins for new processors and file formats. There are deobfuscators, exporters, data visualizers, object reconstructors and other stuff.

Continue reading "Trunk, Branches, and Leaves" »

May 11, 2007

Hex-Rays beta testing is open!

This short entry is just to tell you that the decompiler got a name: Hex-Rays and it goes to the phase of closed beta testing. The qualified beta testers already received their copies and I have some very positive feedback. Thank you, guys!

For the curious about the decompiler, I put the user manual online. It is very short for the moment. I'd like to keep it like this forever but...

http://www.hexblog.com/hexrays/manual

The quick primer section shows in more detail how to work with the plugin.
Let the fun begin! :)

August 16, 2006

Automated binary analysis woes

If you used IDA Pro for a while, you might have noted that it contents itself with simple things. It neatly displays the disassembly listing. It allows you to improve the listing by adding names and comments. You can manually define your symbols, types, functions. IDA itself can add some types and discover some program properties, but overall the performed analyses appear to be rather modest.

Continue reading "Automated binary analysis woes" »

April 24, 2006

Portable output for assembler

Sometimes unexpected detours are necessary to reach the goal. Take this simple assembly code:

Continue reading "Portable output for assembler" »

January 15, 2006

Return to the sources?

A decompiler is commonly viewed as a tool to recover the source code of a program, the same way as a disassembler is a tool to convert a binary executable program to an assembler text.

This is true in some cases but only in some.

Continue reading "Return to the sources?" »

December 21, 2005

The longest arithmetic operation

So far this is the absolute record for the binary size of one division/remainder/multiplication operation:

Continue reading "The longest arithmetic operation" »

November 30, 2005

Reading assembly code

Even unobfuscated code is difficult to understand. Look at this function. Can you tell its purpose?

Continue reading "Reading assembly code" »

Latest news: Hex-Rays decompiler has been released!