Editing diassembled code

I can debug in DevStudio EXE file going step by step from one statement to another one. Now I would like to edit assempled code and modify some instructions, for instance I would like to change address to jump to of je instruction. How can I do this?
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

piano_boxerConnect With a Mentor Commented:
W32Dasm did it :-)
You cannot modify a .exe/.dll file using DevStudio. But URSoft's W32Dasm has some nice features for this (reverse enginereing).

Take a look at it:

galkinAuthor Commented:
This disassembler utility is rather useful but demo version that is availible for free download doesn't allow to modify instruction.
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

You cannot do this directly from within dev studio.  The assembler output is a listing only - it is not source code.

If you REALLY need to change at assembly level, then save the assembler output for a given statement/statements, discard the original source put in some inline assembler using an __asm block in its place.  You will need to replace memory addresses with the appropriate C/C++ variable and function names.

See the online help about __asm for more info

galkinAuthor Commented:
I don't have code. What I need to change is instructions. Yes DevStudio does not allow to change instructions so I am looking for some disassembler that does allow. I will give points to whom who will show me where I can get such a disassembler for free.
So you have a compiled program (fomr somewhere) that you don't have source for and you want to patch it to change the instructions.

A dissasmbler WONT let you change the original machine code .. you need an assembler for that.  You'd generate the assembly language from the execuatable using a disassembler, edit it to make changes (being careful about adding or deleting instructions, and then reassemble using an Assembler (eg Macro Assembler)

I'd try SoftIce from BoundsChecker - that should let you patch the executable .. it is commonly used by hackers and crackers for just such purposes.

PS: How does this relate to MFC Programming?

galkinAuthor Commented:
First I would like to emphasize I don't have source code I have only EXE and DLLs used by this EXE. Disassembler can show me instructions. One of them I want to modify. Disassembler that piano_boxer referred me to does allow to do this but full version not DEMO. SoftIce is also comercial application that is not free. I am looking for free disassembler. Anyway thank you for your answer.
And I increase points to 150.
the easiest way is to figure out the opcode of your new instructions, then patch it in using a hex editor, or even DOS's debug.
All Courses

From novice to tech pro — start learning today.