New features and improvements in VB6 and C# .NET decompilation and completely revised documentation in VB Decompiler 12.4
I am pleased to introduce you to another significant update to our decompiler, which seriously expands its capabilities while also introducing numerous improvements to previously available functionality. Additionally, we have completely revised VB Decompiler documentation in several languages. This was a massive undertaking, and I believe it will be noticeable even at first glance. But let's go through everything step by step.
Searching for functions by name within an entire project
I think it goes without saying that analyzing a large project with hundreds of classes, forms, and dozens or even hundreds of procedures within each module can be extremely challenging. Sometimes, after finding the necessary code, we only remember the name of the function in which it was found. Or we need to quickly jump to a specific procedure but we forgot which class it's in. In all these cases, using VB Decompiler's new feature will be incredibly useful. To do this, simply press "Ctrl" + "T" or select "Tools" -> "Find procedure", then enter the name of the function or procedure you're looking for. You can also enter just a part of the name and the search will still try to find matching procedures. If there are multiple procedures with the same name, all found variants will be presented in a list, allowing you to jump to them by double-clicking on their names.
![Request to searching for functions in VB Decompiler](/images/vbdecompiler/vb_decompiler_124/vb_decompiler_124_find_procedure_request.jpg)
![Searching for Functions in VB Decompiler](/images/vbdecompiler/vb_decompiler_124/vb_decompiler_124_find_procedure.jpg)
Searching for references to functions for C# .NET and Visual Basic .NET
Starting from version 10.8, VB Decompiler has included functionality that searches for references to any function within the object tree of Visual Basic 5.0 and 6.0 applications. Starting with this current version (12.4), this feature is also available for C# .NET and Visual Basic NET applications. Simply right-click on any function or procedure in the object tree, select "Find References", and the decompiler will analyze the entire program to find all procedures that call the selected function. All found procedures and functions will be displayed as a list, allowing you to jump to them for analysis by double-clicking.
![Searching for references to functions in VB Decompiler](/images/vbdecompiler/vb_decompiler_124/vb_decompiler_124_find_references.jpg)
![Founded references to functions VB Decompiler](/images/vbdecompiler/vb_decompiler_124/vb_decompiler_124_find_references_1.jpg)
Significant Improvement to .NET Decompiler
.NET decompilation continues to evolve, with significant enhancements now available. The new version supports converting "goto" statements into conditional blocks ("if { }") including nested ones, which greatly improves code readability. Additionally, extensive work has been done on heuristic analysis of comparisons and the decompiler can now combine multiple conditional comparisons into a single "if { }" block containing a set of conditions. Furthermore, the decompiler is now capable of parsing main variants of "Operators.CompareString" constructions and converting them to more readable comparison statements. All these improvements make code analysis more comfortable and enjoyable.
![If conditional blocks C# in VB Decompiler](/images/vbdecompiler/vb_decompiler_124/vb_decompiler_124_if.jpg)
![Another way of If conditional blocks C# in VB Decompiler](/images/vbdecompiler/vb_decompiler_124/vb_decompiler_124_if_2.jpg)
Heuristic .NET code analysis also provides better visualization of "switch" constructs. The "goto" transitions are analyzed, with some being converted into "break", while technical transitions are filtered out. Additionally, enhancements have been made in recognizing the last case of a "switch" for filtering unnecessary compiler commands and alignments.
![Decompiling switch case in C# using VB Decompiler](/images/vbdecompiler/vb_decompiler_124/vb_decompiler_124_if_and_case.jpg)
Improved Analysis of "try" Blocks. A range of improvements has been made to parsing multiple "try" blocks and their corresponding "finally" transitions.
![Decompiling try block in C# using VB Decompiler](/images/vbdecompiler/vb_decompiler_124/vb_decompiler_124_try_finally.jpg)
Completely Updated Documentation
Documentation has always been a sensitive spot for any large project that's constantly evolving. Very often, documentation can't keep up with the growth of product capabilities and you have to learn about new features from articles like this one. Moreover, much information in the documentation hasn't been updated in ages and unfortunately doesn't reflect a significant part of the new functionality.
Version 12.4 saw an enormous effort put into updating the documentation. All sections were rewritten, with immediate updates on four languages. Additionally, critical changes were made to three more languages, while one language gained entirely new documentation that didn't exist before. In total, four out of eighteen languages where VB Decompiler documentation is available are now up-to-date and another four have been revised.
Since the documentation was essentially rewritten from scratch, it's presented in a new PDF format with an easy-to-use table of contents for quick navigation. I hope this effort wasn't wasted, and you'll find it much more comfortable learning about VB Decompiler capabilities by reading about its features from a single source.
![English documentation for VB Decompiler](/images/vbdecompiler/vb_decompiler_124/vb_decompiler_124_documentation_en.jpg)
![Japanese documentation for VB Decompiler](/images/vbdecompiler/vb_decompiler_124/vb_decompiler_124_documentation_jp.jpg)
However, I highly recommend still reading articles describing the new product capabilities similar to this one. They provide in-depth analysis of the new functionality at an early stage of developing these capabilities.
And now, let's talk briefly about those features that were added in the previous version of VB Decompiler but haven't been covered in detail yet.
Renaming Variables
You have long been asking for this feature, and it has finally been implemented. Now you can rename any variable inside any function or procedure to make code analysis more comfortable. To do so, simply right-click on any variable in your code, select "Rename Variable" from the context menu, and enter a new name. The variable will be renamed throughout the entire code. Additionally, changes can be undone by selecting "Undo renaming" from the context menu. The decompiler analyzes each rename operation to prevent you from renaming a variable into a keyword or another existing variable, eliminating the need for manual verification of your actions. This feature is currently implemented for Visual Basic 5.0 and 6.0 applications compiled in P-Code and Native Code.
![Renaming Variables 1 in VB Decompiler](/images/vbdecompiler/vb_decompiler_124/vb_decompiler_124_rename_variable.jpg)
![Renaming Variables 2 in VB Decompiler](/images/vbdecompiler/vb_decompiler_124/vb_decompiler_124_rename_variable_2.jpg)
![Renaming Variables 3 in VB Decompiler](/images/vbdecompiler/vb_decompiler_124/vb_decompiler_124_rename_variable_3.jpg)
Improvements to VB6 Native Code and P-Code Decompilation
Starting from version 12.3, significant work has been done to add support for decomposing various OLE objects and their properties and methods within the decompiled code. The library of decomposable APIs from msvbvmXX.dll has also been expanded. Various bug fixes and improvements have been made in the Native Code emulator.
![Improvements to VB6 Native Code and P-Code Decompilation in VB Decompiler](/images/vbdecompiler/vb_decompiler_124/vb_decompiler_124_native_code.jpg)
Localized Files
In addition to the revised documentation, many localized interface files were reworked. Support for Persian localization was added. As a result, the decompiler now supports 24 languages of localization, as well as documentation on 18 languages, with four updated along with the English version to its current state.
As always, all found bugs have been fixed, and the product has become significantly more user-friendly. The new version is already available in your personal account if your license for updates and technical support has not yet expired. If you are encountering VB Decompiler for the first time - we're delighted to welcome you among our registered users.
July 12, 2024
(C) Sergey Chubchenko, VB Decompiler's main developer