I need to copy some code of old version to the new version .exe file. It contains 30 to (N) number of code line. How can I copy and paste the old code to new version. Any help is so much appreciated. Basically I need to do it like what Fill with NOP does(which is noping N number of lines) I need to copy and paste a code like N number of times.
-
why you need to do it in Olly? can't you just copy bytes from one binary to the other at a specified offset? a simple python script would suffice– Paweł ŁukasikCommented Mar 6, 2018 at 4:32
-
I actually just want olly. I don't program in python.– arcCommented Mar 6, 2018 at 4:58
-
well, than any other programming language– Paweł ŁukasikCommented Mar 6, 2018 at 5:02
2 Answers
you can copy paste binary bytes between two ollydbg instances
select bytes rightclick->edit -> binary copy (ctrl+insert) from source
select bytes -> right click _> binary paste (shift + insert) in destination
There many ways to do this.
I once had to add 3000 lines to a program . The answer above works , but your life will become much ,much harder this way.
Use this tool MLA from Ramm michael In Olly , you can just right click and open a part or section if highlighted in this notepad like plugin. You can just simply copy paste and click to insert assembly.
I like this tool because as you go along you can simply just edit your code and click the assemble button and that is it! Its like coding assembly without needing to compile!
As a warning, make sure your code fits. Usually , I will code cave or something and then jump back to the origional code.
Let me know.of you have questions. The tool is pretty simple to use and Ramm is a pretty cool guy.
Here is a video that uses this a bit.