CrackingKeygenning and ProgrammingReversing AND Statement

23 Sep 2009, 20:28

I'm working with an algorithm that uses the AND procedure a LOT and the only way to reverse the algorithm would be to reverse that statement unless a suitable alternative would work. Now my problem is this:

9D8D6EBA <--Input1
9B4D1349 <--Input2
-------- ANDed
990D0208 <--Result

I need a way to convert 990D0208 back into 9D8D6EBA, using 9B4D1349 if necessary.
I was working on NOTing the result and XORing it with Input2 to produce input 1 with a little success, it actually worked, but those were coincidences because at a binary level the numbers I was working with were convertable that way.

I'm using Delphi 2009 but that's not really important as this is an Assembly problem.

Any help or pointers would be helpful.

Here is a piece of source code from the algorithm if it will help but I doubt it will:

MOV ECX,DWORD PTR SS:[Result3Array+$08]
MOV EBX,DWORD PTR DS:[EDI+Req5]
MOV EAX,DWORD PTR DS:[ESI+Req4]
MOV EDX,DWORD PTR SS:[Result3Array+$0C]
AND ECX,EBX
AND EAX,EDX
MOV DL,0

Rating 0 Comments 2
SerialKiller
1
SerialKiller 26 Sep 2009, 08:43 #
you should see it from the dual side

lets say u got 2 hex numbers a) 11 b) 15

in dual there are

11 = 0001 0001
15 = 0001 0101

now if you do an AND it would mean that only where both are 1 result be 1
e.g

17 = 0001 0111
AND
B3 = 1011 0011
-------------------
== 0001 0011 => = 13

so as you see its not reversible
JustusOumlov
0
JustusOumlov 26 Sep 2009, 15:21 #
I see all if that now thanks. I actually coded a program to give me all the possible numbers that you can AND it by to get 990D0208 and the list was 30 or 40 numbers long =/. After spending all that time on it I have an intimate knowledge of bitwise AND now lol, so at least SOME good came of my confusion and ignorance.

This program is just beyond my skill level for now :(
Reply

You have to login or register to post comments.

JustusOumlov
JustusOumlov
0 ♠ 0 ♣