0

let's say i have an ".exe program" and i want to disassemble it and get "disassembled code" .

my question is => can i maintain and organize that "disassembled code" and produce "assembly source-code project" that will compile and work again !

if the answer is yes it's possible => i would like to know what stuff should i take care of in that dissembled code to be able to compile/work successfully again .

target is "windows x86 .exe"

and thanks ;)

5
  • 2
    Hi, in principle the answer is yes. But there are a lot of ifs. Could you provide some more context? Just to give you an idea: you don't mention a target platform, but it could matter. Your question sounds as if you are attempting to change the functionality of an existing program, but by way of a DLL placement attack or LD_PRELOAD your endeavor may be easier to achieve than through round-tripping between disassembly and feeding that to the disassembler. One relevant point would also be if the program performs any sort of integrity checks on itself. Commented Aug 29, 2023 at 15:14
  • hi @0xC0000022L and thanks for the answer , my target is "windows x86 game". the goal is to achieve something like gta3re but on assembly level . Commented Aug 30, 2023 at 6:41
  • 1
    I am not sure if this is really possible for complex programs. Generating the assembler code isn't the problem but references (-> address) between different assembler blocks or to data. When decompiling you have to decide for every number if it is a a simple value or an address. Common decompilers can identify a lot of references, but when fully reversing a program just missing one can mean the program will no longer work after recompiling. Therefore binary modifications usually start with the original binary and try to modify as little as possible. Commented Aug 30, 2023 at 13:39
  • yes @Robert you right , i tried to disassemble a simple program i wrote by myself and i end up doing a lot effort on that "dissembled code" trying to make it valid/acceptable assembly code and in the end still not compile :( , need more effort Commented Aug 30, 2023 at 16:43
  • 1
    you could try disassembling with ddisasm: github.com/GrammaTech/ddisasm Commented Aug 30, 2023 at 17:31

0

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.