0

I have a raw assembly dump i.e.

.intel_syntax noprefix
.bits 32
.global main    

main:
    push   ebp
...

And I know it's Intel x86 and the original function was most likely written in C. Now the question is whether I could use IDA to reverse this and get the original function?

7
  • 1
    IDA disassembles binaries. (It's what "IDA" stands for.) What you have here is disassembled code, as plain text. What do you hope IDA will do with it?
    – Jongware
    Oct 6, 2018 at 18:22
  • Ideally spit out some nice pseudocode?
    – S. L.
    Oct 7, 2018 at 12:19
  • 1
    From a text file? No. It needs a binary.
    – Jongware
    Oct 7, 2018 at 13:42
  • 2
    If you assemble the file you can load it in ida
    – mrexodia
    Oct 7, 2018 at 14:46
  • @mrexodia that could work. can I just use gcc?
    – S. L.
    Oct 7, 2018 at 18:06

1 Answer 1

1

IDA does not accept assembly input, so you need to convert it to some binary format first. This is generally done with an assembler, such as GNU Assembler or gas (part of GNU Binutils and usually installed with gcc), or different alternative assemblers such as nasm, yasm, fasm and so on. If you need help assembling a specific file, you can ask on Stack Overflow, providing as much info as possible.

1
  • 1
    This worked like a charm: I compiled the original snippet and got into a good old executable and then was able to analyze that with IDA and dump some useable pseudocode. Not exactly reverse engineer of the year over here but it works!
    – S. L.
    Oct 17, 2018 at 7:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.