Rumour Posted January 5, 2007 Posted January 5, 2007 How this code for keygen in asm?I must need a way and for chose random digits.Example 4 digit ABCD are random.But only thing: A+B+C+D must 26 (hex)How do?
Ziggy Posted January 5, 2007 Posted January 5, 2007 (edited) This is a snippet from a keygen for Puma products. In this case I needed just 3 random decimal digits A+B+C = Integer Value. But this code could be extended to four decimal digits A+B+C+D ; ????????????????????????????????????????????????????????????????????????? .data testval dd 0 Val1 dd 0 Val2 dd 0 Val3 dd 0 .code ; ????????????????????????????????????????????????????????????????????????? ; Random ; generate a random number between 0 and nRange-1 Random PROC uses edx ecx nRange: DWORD INVOKE GetTickCount mov ecx, 41C64E6Dh mul ecx add eax, 3039h and eax, 7FFFFFFh mov ecx, nRange sub edx, edx div ecx xchg eax, edx ret Random ENDP ; ????????????????????????????????????????????????????????????????????????? ; sumval is the integer value we want = A+B+C ; output A,B,C Val1,Val2,Val3 GenVals proc sumval :dword tryagain: mov eax, sumval mov testval, eax dec testval invoke Random, testval .if eax > 9 jmp tryagain .endif mov Val1, eax mov eax, sumval sub eax, Val1 mov testval, eax dec testval invoke Random, testval .if eax > 9 jmp tryagain .endif mov Val2, eax mov ebx, Val1 add eax, ebx .if eax >= sumval jmp tryagain .else mov ebx, eax mov eax, sumval sub eax, ebx mov Val3, eax .if eax > 9 jmp tryagain .endif .endif ret GenVals endp ; ????????????????????????????????????????????????????????????????????????? If you code a four digit A+B+C+D = Integer example or find a better way - post it here BTW what is the target for your keygen? Z Edited January 5, 2007 by Ziggy
Rumour Posted January 5, 2007 Author Posted January 5, 2007 Target is little japan game. Good for learn keygen.INVOKE GetTickCount !!! Stupid, I must think that!Thank much Ziggy.
Gyver75 Posted January 7, 2007 Posted January 7, 2007 Chineese Little Box, the Ku-Pan Game, isn't true?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now