                      ͻ
                        Tutorial for magenta crackme #2 
                      ͼ



Ŀ
1.Intro 


The second crackme from the collection... and a very irritating scrolling text ;)



Ŀ
2. Let's go 


Open the crackme with Smartcheck, start it (program -> start), enter 'TSCube' as name and
'123456' as serial, then click on OK
=> "Better luck next time!"

Go to 'program -> End' if you have enough of these 'Timer1_timer' events ;)

Go to the 'Program result' window, click on '[+] Command1_Click' to expand it then go to the
last line of the listing :

<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->
Val(String:"123456") returns double:123456 	-> entered_serial
Val(String:"503") returns double:503	 	-> correct_serial
Msgbox(VARIANT:String:"Better luck"...)
<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->

This time, we don't even need to see all the events to find a valid serial !

name  : TSCube
serial : 503 



Ŀ
3. The keygen


Here are the events :

<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->
Text1.text
Text2.text
Len(...)
Mid(...)
Mid(...)
Asc(String:"T") returns integer:84
Asc(String:"S") returns integer:83
Mid(...)
Mid(...)
Asc(String:"S") returns integer:83
Asc(String:"C") returns integer:67
Mid(...)
Mid(...)
Asc(String:"C") returns integer:67
Asc(String:"u") returns integer:117
Str(VARIANT:integer:50)
LTrim(VARIANT:String: " 50)		-> first part of serial
Mid(...)
Mid(...)
Asc(String:"u") returns integer:1197
Asc(String:"b") returns integer:98
Mid(...)
Mid(...)
Asc(String:"b") returns integer:98
Asc(String:"e") returns integer:101
Str(VARIANT:integer:3)
LTrim(VARIANT:String: " 3)		-> second part of serial
Mid(...)
Mid(...)
Mid(...)
Asc(String:"e") returns integer:101
Asc(String:"T") returns integer:84
Val(String:"123456") returns double:123456 	-> entered_serial
Val(String:"503") returns double:503	 	-> correct_serial
Msgbox(VARIANT:String:"Better luck"...)
<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->

The crackme takes the letters of the name 2 by 2.

Here is the problem : "sometimes", the crackme takes 2 of these letters, does some sort of
mysterious computation with them to generate a magic_number which is then transformed to a 
string (which is part of the serial).
The only thing is this "sometimes" word is not enough to make a keygen ;)

Let's see the generation of the first part of the serial :

<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->
[...]
Asc(String:"C") returns integer:67
Asc(String:"u") returns integer:117
Str(VARIANT:integer:50)
LTrim(VARIANT:String: " 50)		-> first part of serial
[...]
<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->

Where does this '50' magic_value come from ? Wait : 117-67 = 50 !!!

Second question : why is this '50' value a part of the serial and not the previous values ?
Answer : because 117 >= 67 !

And it's true : if you look at all the values, you'll notice that the magic_value (which is in
fact the result of a substraction) is part of the serial only if the first value is smaller that 
the next one. If you don't understand (shame on you), just view 'all the events' to have more 
details.

Look at the keygen for more details.


    ________     _______     _______
   /__   __/\   /  ____/\   /  ____/\
   \_/  /\_\/  /  /\___\/  /  /\___\/
    /  / /    /  /_/_     /  / / 
   /  / /    /____  /\   /  / /
  /  / /     \___/ / /  /  / /
 /  / /     ____/ / /  /  /_/_
/  / /     /_____/ /  /______/\
\__\/      \_____\/   \______\/ 25/07/2000

www.tscube.cjb.net
