Questions tagged [disassembly]

Involves turning "compiled" code (such as machine code, byte code or IR code) back in higher-level assembly mnemonics.

Disassembly is the process for turning a binary form back into its higher-level counterpart so that it can be inspected or altered in a human-readable form.

This is normally done with the aid of a disassembler, some notable examples being:

1640 questions
13
votes
1 answer

why is inlined function slower than function pointer?

Consider the following code: typedef void (*Fn)(); volatile long sum = 0; inline void accu() { sum+=4; } static const Fn map[4] = {&accu, &accu, &accu, &accu}; int main(int argc, char** argv) { static const long N = 10000000L; if…
Ming
  • 365
  • 2
  • 12
12
votes
3 answers

How to get instruction information from libopcodes?

I am writing a tool which uses libbfd and libopcodes in x86-32 and x86-64 Linux to perform disassembly. The problem is that whilst I am able to get libopcodes to disassemble, I am unable to get any instruction information. For the purposes of…
Mike Kwan
  • 24,123
  • 12
  • 63
  • 96
12
votes
1 answer

What to do with "DWARF error: section .debug_info is larger than its filesize!"?

Looking for ways to see generated assembler of a specific function in my binary (an .so to be exact), just as I can see similar on Compiler Explorer, I found How to disassemble one single function using objdump? and based on answers there (and also…
Adam Badura
  • 5,069
  • 1
  • 35
  • 70
12
votes
2 answers

Reverse Engineering old paint programs

I've got a couple of really old MSDos based paint programs. They work on palette indexed image buffers. They have a number of spectacular shape drawing tools, brushes and effects that simply do not exist in any modern paint program- Particularly not…
Breton
  • 15,401
  • 3
  • 59
  • 76
12
votes
6 answers

Disassemble an OpenCL kernel?

I'm not sure if it's possible. I want to study OpenCL in-depth, so I was wondering if there is a tool to disassemble an compiled OpenCL kernel. For normal x86 executable, I can use objdump to get a disassembly view. Is there a similar tool for…
Patrick
  • 4,186
  • 9
  • 32
  • 45
12
votes
2 answers

Not able to disassemble iOS Banking app

I use hopper disassembler to disassemble iOS apps. It works fine for most of the apps. However today I just got curious to understand a banking app so I tried to disassemble it. So, I moved the app from my jailbroken device to my mac and when I…
Jaffer Sheriff
  • 1,444
  • 13
  • 33
12
votes
4 answers

In C python, accessing the bytecode evaluation stack

Given a C Python frame pointer, how do I look at arbitrary evaluation stack entries? (Some specific stack entries can be found via locals(), I'm talking about other stack entries.) I asked a broader question like this a while ago: getting the C…
rocky
  • 7,226
  • 3
  • 33
  • 74
12
votes
3 answers

Find function's start offset in ELF

Suppose I have function fn somewhere within the .text section of an ELF64 executable. Is there a way to know at which offset (in bytes) from the start of the ELF file the fn function is located? Note that I don't need to know at which VA it was…
pr0gma
  • 577
  • 3
  • 8
  • 18
12
votes
5 answers

How to disassemble 16-bit x86 boot sector code in GDB with "x/i $pc"? It gets treated as 32-bit

For example, with a boot sector that BIOS prints a to the screen main.asm: org 0x7c00 bits 16 cli mov ax, 0x0E61 int 0x10 hlt times 510 - ($-$$) db 0 dw 0xaa55 Then: nasm -o main.img main.asm qemu-system-i386 -hda main.img -S -s & gdb -ex 'target…
Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
12
votes
1 answer

Debug executable with arguments in IDA

In the disassembler and debugger IDA, is there any way to run the currently loaded binary with command line parameters? For instance, say I have the command /bin/ls and want to debug it as /bin/ls test.txt, how could I do that in IDA?
Numeri
  • 1,027
  • 4
  • 14
  • 32
12
votes
1 answer

How can I understand a .pyc file content

I have a .pyc file. I need to understand the content of that file to know how the disassembler works of python, i.e. how can I generate a output like dis.dis(function) from .pyc file content. for e.g. >>> def sqr(x): ... return x*x ... >>>…
Niya Simon C
  • 279
  • 2
  • 4
  • 10
12
votes
6 answers

Modify Emdeded String in C# compiled exe

I have an issue where I need to be able to have a compiled exe ( .net 3.5 c# ) that I will make copies of to distribute that will need to change a key for example before the exe is sent out. I cannot compile each time a new exe is needed. This is a…
nitefrog
  • 1,760
  • 6
  • 31
  • 59
12
votes
2 answers

Is it possible to disassemble Visual FoxPro 9.0 exe file?

I have a legacy FoxPro exe application. Source codes are not available (it was written in outsourcing and source codes have been never delivered). There is a request to write exactly the same application in C# and then develop new features.…
Bogdan_Ch
  • 3,328
  • 4
  • 23
  • 39
11
votes
3 answers

Why does the compiler generate this code?

I disassembled an object file (most likely generated using the Visual C++ compiler) using DumpBin and saw the following piece of code: ... ... mov dword ptr [ebp-4],eax // Why save EAX? push dword ptr [ebp+14h] push …
user541686
  • 205,094
  • 128
  • 528
  • 886
11
votes
1 answer

React-native 0.61.2 with hermes disassembling index.android.bundle

I created a release build of my app with react-native 0.61.2 and enabled Hermes. In my Crashlytics I receive information about crashes along with stacktraces. Perviously I used to apply apktool to extract index.android.bundle from my apk, and it…