zfigura / semblance Goto Github PK
View Code? Open in Web Editor NEWDisassembler for Windows executables. Supports 16-bit NE (New Executable), MZ (DOS), and PE (Portable Executable, i.e. Win32) files.
License: GNU General Public License v3.0
Disassembler for Windows executables. Supports 16-bit NE (New Executable), MZ (DOS), and PE (Portable Executable, i.e. Win32) files.
License: GNU General Public License v3.0
Semblance version 0.2 ===================== Semblance is eventually meant as a set of tools to manipulate assembly code. Currently it only contains a single program: dump - produce disassembly and other information from exectable files. Originally written to support NE (New Executable) files due to the lack of any available tool. Currently supports MZ (aka DOS), NE, and PE/PE+ (Portable Executable, i.e. Win32) executables. Semblance is free software, released under the GNU GPL v3; see the file LICENSE for the details. Semblance is hosted at the following URL: https://gitlab.winehq.org/zfigura/semblance It was originally hosted on GitHub, but has since been moved. Installing ---------- To build, just run: ./autogen.sh ./configure make To install to your computer, subsequently run "make install" as root. About ----- I originally wrote Semblance as a disassembler for NE images, in the absence of any existing tool. As I wrote it I added some quite useful features, and eventually decided these were useful enough to extend it to PE images as well, where an existing decompilation tool (objdump) had enough annoyances that Semblance actually ended up being more useful. Some of the notable features of Semblance are: * Instead of indiscriminately trying to dump everything as assembly, it scans entry points and exports, following branches, to determine what instructions are valid code, and dumps only these by default. This avoids dumping data or zeroes, inserted into text sections, as code. * Prints warnings when bogus instructions are disassembled. * Can disassemble NE resources. (PE resources are forthcoming.) * Detects instructions that call PE imports better—e.g. can recognize a call into an IAT. * Prints PE relocations inline. * Supports MASM, NASM, and GAS-based syntax.
Several of the testcases seem to have junk relocation data, and, more concerningly, junk entry points.
Using dump with PE32 PodTools.exe from archive PodTools segfaults at pe_header.c:491
The reason for it seems to be the wrong address of nametab[0].name
Relevant functions are:
dump_pe(), get_import_name_table() and addr2offset()
Hi zfigura,
Thanks for your great project for PE disassembler.
I noticed that semblance will skip some instructions following by "ret" instruction in _TEXT section as the following:
401152: 5e pop esi
401153: c3 ret
401154: 55 push ebp
401155: 8b ec mov ebp, esp
This example code can be obtained from MASM32 examples (MASM32/examples/dialogs/simple/simple.exe).
So far, I did a workaround (return from scan_segment) when next instruction is INT3.
Hope you can fix this issue.
If you need this PE file, please tell me.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.