Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #3050

Disassembler Download C

Newsgroups comp.lang.basic.visual.misc
Date 2023-12-21 05:23 -0800
Message-ID <14d4df29-a5a9-494f-9bca-87f9ae23f4d6n@googlegroups.com> (permalink)
Subject Disassembler Download C
From Aura Maire <maireaura72@gmail.com>

Show all headers | View raw


Assembly language source code generally permits the use of constants and programmer comments. These are usually removed from the assembled machine code by the assembler. If so, a disassembler operating on the machine code would produce disassembly lacking these constants and comments; the disassembled output becomes more difficult for a human to interpret than the original annotated source code. Some disassemblers provide a built-in code commenting feature where the generated output gets enriched with comments regarding called API functions or parameters of called functions. Some disassemblers make use of the symbolic debugging information present in object files such as ELF. For example, IDA allows the human user to make up mnemonic symbols for values or regions of code in an interactive session: human insight applied to the disassembly process often parallels human creativity in the code writing process.


Writing a disassembler which produces code which, when assembled, produces exactly the original binary is possible; however, there are often differences. This poses demands on the expressivity of the assembler. For example, an x86 assembler takes an arbitrary choice between two binary codes for something as simple as MOV AX,BX. If the original code uses the other choice, the original code simply cannot be reproduced at any given point in time. However, even when a fully correct disassembly is produced, problems remain if the program requires modification. For example, the same machine language jump instruction can be generated by assembly code to jump to a specified location (for example, to execute specific code), or to jump a specified number of bytes (for example, to skip over an unwanted branch). A disassembler cannot know what is intended, and may use either syntax to generate a disassembly which reproduces the original binary. However, if a programmer wants to add instructions between the jump instruction and its destination, it is necessary to understand the program's operation to determine whether the jump should be absolute or relative, i.e., whether its destination should remain at a fixed location, or be moved so as to skip both the original and added instructions.



disassembler download c

Download https://t.co/uNdxD6PqQ4 






A disassembler may be stand-alone or interactive. A stand-alone disassembler, when executed, generates an assembly language file which can be examined; an interactive one shows the effect of any change the user makes immediately. For example, the disassembler may initially not know that a section of the program is actually code, and treat it as data; if the user specifies that it is code, the resulting disassembled code is shown immediately, allowing the user to examine it and take further action during the same run.


Any interactive debugger will include some way of viewing the disassembly of the program being debugged. Often, the same disassembly tool will be packaged as a standalone disassembler distributed along with the debugger. For example, objdump, part of GNU Binutils, is related to the interactive debugger gdb.[1]


A dynamic disassembler can be incorporated into the output of an emulator or hypervisor to 'trace out', line-by-line, the real time execution of any executed machine instructions. In this case, as well as lines containing the disassembled machine code, the register(s) and/or data change(s) (or any other changes of "state", such as condition codes) that each individual instruction causes can be shown alongside or beneath the disassembled instruction. This provides extremely powerful debugging information for ultimate problem resolution, although the size of the resultant output can sometimes be quite large, especially if active for an entire program's execution. OLIVER provided these features from the early 1970s as part of its CICS debugging product offering and is now to be found incorporated into the XPEDITER product from Compuware.


A length disassembler, also known as length disassembler engine (LDE), is a tool that, given a sequence of bytes (instructions), outputs the number of bytes taken by the parsed instruction. Notable open source projects for the x86 architecture include ldisasm,[6] Tiny x86 Length Disassembler[7] and Extended Length Disassembler Engine for x86-64.[8]


The only real resource I have found is Spiral Space's, "How to write a disassembler". While this gives a nice high level description of the various components of a disassembler, I'm interested in some more detailed resources. I've also taken a quick look at NASM's source code but this is somewhat of a heavyweight to learn from.


That process, automated, is the core of a disassembler. Ideally, you're probably going to want to construct a n array of instruction structures internally (or externally, if the program is really large). You can then translate that array into the instructions in assembler format.


Trent, that's not the worse way to learn ASM you know...But I agree, without any base of ASM programming, learning from disassemblies (alone) will be near damn impossible.

To be a bit more constructive, GDB! Best disassembler/debugger out there (for Linux anyway). If you're a GUI fellow, try Insight, a rather nice GDB frontend.

A nice guide to GDB >


IDA Pro as a disassembler is capable of creating maps of their execution to show the binary instructions that are actually executed by the processor in a symbolic representation (assembly language). Advanced techniques have been implemented into IDA Pro so that it can generate assembly language source code from machine-executable code and make this complex code more human-readable.






A disassembler can just jump to EOP and start reading bytes (opcodes) ( ). It can just start reading from the top down or it can also enumerate the results, eg follow calls/jmps in order to find weird code.


There're number of open-source disassemblers whose code you can study to get more insight into inner workings (or to improve for your needs!). For example, ScratchABit is written in Python, is very easy to study and hack on.


BizTalk Server performs most processing for received EDI-encoded interchanges in the EDI Receive Pipeline (Microsoft.BizTalk.DefaultPipelines.EDIReceivePipeline). This pipeline includes the EDI disassembler pipeline component, which performs the following processing:


If an EDIINT/AS2-encoded message was received via HTTP/HTTPS transport, the EDI disassembler will inspect the context property BTS.MessageDestination. If that property is set to SuspendQueue, indicating that an error occurred in AS2 processing and the message is to be suspended, the EDI disassembler will act as a passthrough pipeline component, and will suspend the message to the MessageBox.


The source code of the software we use on a daily basis isnt always available. A disassembler like IDA Pro is capable of creating maps of their execution to show the binary instructions that are actually executed by the processor in a symbolic representation called assembly language. This disassembly process allows software specialists to analyze programs that are suspected to be nefarious in nature, such as spyware or malware. However, assembly language is hard to read and make sense of. That is why advanced techniques have been implemented into IDA Pro to make that complex code more readable. In some cases, it is possible to revert the binary program back, to a quite close level, to the original source code that produced it. The map of the programs code can then be post-processed for further investigation.


IDA Pro features a broad and powerful set of instruments that allow a quick disassembly. Ranging from the function call tree, parse import and export of the executable and show information about the binary piece of any software, IDA as a disassembler is a powerful


The best disassembler I ever seen is IDA. It also supports AVR. But I have only used it for x86. I believe the feature you are asking is one of its core features. May be that is why this disassembler is named Interactive. -rays.com/idapro/idaproc.htm


At an extreme, writing your own disassembler is not necessarily that large an undertaking, and can be an informative one. You can start by making groups of opcodes that use the same format. Usually the binary encoding of a given style of instruction has a few bits for the ALU operation, perhaps a few option bits, and then a number of bits that encode the operand register numbers.


The source states a "b" command for "branch endless", but the window shows some random tokens which dont really make sense. While stepping into, it shows that the "branch endless" loop is actually executed. So the disassembler seems to be wrong.


Perhaps the range of memory being displayed by the disassembler has been trashed somehow. I suggest you use the View  Memory Browser feature of CCS to inspect memory starting at address 0x00014b50. Look right after a successful load, and then again after hitting this breakpoint. I bet it changed, even though it shouldn't.


The first instruction of __TI_decompress_rle24 is supposed to be MOVS R2, #0x1, which for R4 thumb mode has opcode 0x0122, as shown in your screenshot. However, the disassembler inside CCS is decoding it as a different instruction. I don't know enough about ARM opcode encodings to take a guess at what's wrong here.


Okay, I've looked at the pristine rtsv7R4_T_be_v3D16_eabi.lib from ARM compiler version 4.9.7, and as expected, the first instruction in __TI_decompress_rle24 is the Thumb 2 instruction "MOVS R2, #0x1", which is 16 bits long. This shows up in raw memory as 2201, just as it does in your snapshot of memory as raw data. The memory at that location is correct, but for some reason the disassembly window gets the instruction wrong. My first thought was that the disassembly window is configued to use the wrong endianness or CPU architecture, but I can't figure out how it could be interpreting it as an "LSL". The standalone disassembler that comes with the compiler (dis470) correctly disassembles it, so this problem seems to be specific to the CCS disassembler. We will likely need to move this thread to the CCS forum for further analysis.

 0aad45d008


Back to comp.lang.basic.visual.misc | Previous | Next | Find similar | Unroll thread


Thread

Disassembler Download C Aura Maire <maireaura72@gmail.com> - 2023-12-21 05:23 -0800

csiph-web