Cracking Projects For Newbies

Project 6: Task #3 Monday, 08-Feb-99 16:45:15 208.255.72.75 writes: Answer to question 1: :0040B73A call 0040CCC0 ;Compares the real and fake serial ;numbers :0040B73F add esp, 00000008 ;Compensate for the 2 unpoped pushes that ;were made before the call was executed.. ;Adding 4 to the stack equals ;one pop, thus adding 8 equals 2 pops. ;This is necessary ;so that when a return is encounter ;the program will return to the caller ;at the correct place. :0040B742 test eax, eax ;Checks eax and sets the equal flag accordingly. If eax = 0 ;then the equal flag is set otherwise ;the flag is reset. :0040B744 jne 0040B9BC ;This is a bad boy jump and goes to one of two places ;where the program displays the ;"Sorry.." message : Answer to question 2: This is the real fake serial number comparison routine, The comparison here is done on byte by byte bases and each loop does 2 bytes. If all bytes compare correctly the program jumps or defaults to 40CCF2 where eax is set to equal 00000000 and after that the program returns, but if the comparison fails the program jumps to 40CCFA where eax is set to equal FFFFFFFF and after that the program returns. The best way to explain this is to comment the relevant lines as below: :0040CCC0 83EC04 sub esp, 00000004 [Snip not important] :0040CCCE 8B4C2410 mov ecx, dword ptr [esp+10] ;Fake is here :0040CCD2 8B542414 mov edx, dword ptr [esp+14] ;Real is here :0040CCD6 8A01 mov al, byte ptr [ecx] ;one byte from ;fake to al :0040CCD8 3A02 cmp al, byte ptr [edx] ;Compare 1 byte ;from fake with ;the matching 1 ;from real :0040CCDA 751E jne 0040CCFA ;jump if the two byte are ;not equal :0040CCDC 0AC0 or al, al ;Check if the end of both is ;reached. Each number is ;terminated with 00 :0040CCDE 7412 je 0040CCF2 ;Jump if all was finished :0040CCE0 8A4101 mov al, byte ptr [ecx+01] ;Next fake byte :0040CCE3 3A4201 cmp al, byte ptr [edx+01] ;Next real byte :0040CCE6 7512 jne 0040CCFA ;Good boy jump :0040CCE8 83C102 add ecx, 00000002 ;Point to next fake byte :0040CCEB 83C202 add edx, 00000002 ;Point to next real byte :0040CCEE 0AC0 or al, al ;Check for terminating byte :0040CCF0 75E4 jne 0040CCD6 ;Do some more if last byte ;is not 00 :0040CCF2 33C0 xor eax, eax ;All is good, make eax = 00 :0040CCF4 5E pop esi :0040CCF5 5B pop ebx :0040CCF6 83C404 add esp, 00000004 :0040CCF9 C3 ret :0040CCFA 1BC0 sbb eax, eax ;No good, make eax = 00 ;in preparation for step ;at 40CCFD :0040CCFC 5E pop esi :0040CCFD 83D8FF sbb eax, FFFFFFFF ;Subtracting FFFFFFFF ;from eax = 00 results ;in eax = FFFFFFFF :0040CD00 5B pop ebx :0040CD01 83C404 add esp, 00000004 :0040CD04 C3 ret Answer 3 A partial answer was posted earlier, but more complete answer will be provided later and as soon as time permits. Joseph Joseph

Message thread:

Joseph: Projec6; General (03-Feb-99 04:49:00)

Shadow: Re: Projec6; General (03-Feb-99 04:59:19)

Joseph: Re: Re: Projec6; General (03-Feb-99 15:54:40)

The Sandman: Re: Projec6; General (03-Feb-99 06:27:22)

Joseph: Re: Re: Projec6; General (03-Feb-99 15:47:36)

Joseph: Serial Number Generation Routine (06-Feb-99 05:34:31)

Princess: Re: Serial Number Generation Routine (06-Feb-99 08:34:57)

Joseph: Task #2 done; One patch is possible (08-Feb-99 03:46:02)

Shadow: Re: Task #2 done; my comment [about debugging] (08-Feb-99 07:28:06)

Joseph: Re: Re: Task #2 done; my comment [about debugging] (08-Feb-99 15:01:03)

Joseph: Project 6: Task #3 (08-Feb-99 16:45:15)

Back to main board

Message subject: Name: (optional) Email address: (optional) Type your message here:

Back to main board

Copyright © InsideTheWeb, Inc. 1997-1999
All rights reserved.