![]() |
Unwanted code added while assembling on Olly
In the executable provided in chapter 6 of Lena's tutorials I see the following code which is responsible of setting the variable that will be used for checking if the app is registered or not:
Code:
; AL contains 0 from a previous call to a custom function,In the tutorial file I see Lena changing this: Code:
005C2C03 . 8038 00 CMP BYTE PTR DS:[EAX],0Code:
005C2C03 . 8038 00 MOV BYTE PTR DS:[EAX],1So i thought that i could achieve the same by fixing the MOV that is before those two lines like this: Code:
005C2BFC . 8802 MOV BYTE PTR DS:[EDX],1 ; Force it to be 1Code:
005C2BF6 . 8B15 8CEB6000 MOV EDX,DWORD PTR DS:[60EB8C] |
That's because you are replacing the opcodes 88 02 with C6 02 01 which is longer and overwrites the MOV EAX,DWORD PTR DS:[60EB8C] instruction by one byte.
|
Ok that makes sense, in part...
Im still not sure why changing AL to 1 changes "8802" to "C6 02 01" I thought the change to the opcode would be minimal since I am "removing" instead of adding characters. I will go and read about opcodes in a sec. |
Quote:
Quote:
|
| All times are GMT +8. The time now is 16:25. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX