hafer
January 13th, 2001, 02:53
I decided to make a legitimate regkey for APISpy32 V2.4 (same regkey also works for V2.5) rather than unpack it, then patch it. That always seems so messy and I would rather not do that if I can avoid it. I was able to create a regkey for my regname halifax. However, I had to do it using brute force. It took about 20 minutes to test/record all 255 byte combinations (01 to FF) results for the encryption method used. Then you have to XOR the bytes that are needed for your name with 50+i (where i is the name char position). What I could use some help with is if somebody knows how to do the math so that brute force isn't needed. Below is an example of the encryption technique:
START WITH BYTE 1A TO ENCRYPT (OR DECRYPT DEPENDING ON HOW YOU LOOK AT IT)
1 1 x 1A= 1A (IF <=8899h CONTINUE)
2 1A x 1A= 2A4 (IF <=8899h CONTINUE)
3 2A4 x 1A= 44A8 (IF <=8899h CONTINUE)
4 44A8 x 1A= 6F910 (IF >8899h DIVIDE 6F910/8899= D REMAINDER 94B)
5 94B x 1A= F19E (IF >8899h DIVIDE F19E/8899= 1 REMAINDER 6905)
6 6905 x 1A= AAA82 (IF >8899h DIVIDE AAA82/8899=13 REMAINDER 8727)
7 8727 x 1A= DB9F6 (IF >8899h DIVIDE DB9F6/8899=19 REMAINDER 6305)
DIVIDE THE REMAINDER OF THE SEVEN ITERATIONS BY BB
6305/BB = 87 REMAINDER 68h (h)
h - first letter of my regname
Now if I want the remainder to be 61h (a-second letter of regname), how would I mathematically find what byte to start with? Turns out to be 3A, but how can that be determined mathmatically? Any math whizes out there or someone that can point me in the right direction?
(Sorry about the format of the example.)
START WITH BYTE 1A TO ENCRYPT (OR DECRYPT DEPENDING ON HOW YOU LOOK AT IT)
1 1 x 1A= 1A (IF <=8899h CONTINUE)
2 1A x 1A= 2A4 (IF <=8899h CONTINUE)
3 2A4 x 1A= 44A8 (IF <=8899h CONTINUE)
4 44A8 x 1A= 6F910 (IF >8899h DIVIDE 6F910/8899= D REMAINDER 94B)
5 94B x 1A= F19E (IF >8899h DIVIDE F19E/8899= 1 REMAINDER 6905)
6 6905 x 1A= AAA82 (IF >8899h DIVIDE AAA82/8899=13 REMAINDER 8727)
7 8727 x 1A= DB9F6 (IF >8899h DIVIDE DB9F6/8899=19 REMAINDER 6305)
DIVIDE THE REMAINDER OF THE SEVEN ITERATIONS BY BB
6305/BB = 87 REMAINDER 68h (h)
h - first letter of my regname
Now if I want the remainder to be 61h (a-second letter of regname), how would I mathematically find what byte to start with? Turns out to be 3A, but how can that be determined mathmatically? Any math whizes out there or someone that can point me in the right direction?
(Sorry about the format of the example.)