home *** CD-ROM | disk | FTP | other *** search
/ Cracking 2 / Cracking II..iso / Texty / crackme / easy2-lu48.asm < prev    next >
Encoding:
Assembly Source File  |  1999-07-11  |  2.7 KB  |  93 lines

  1. ;Written by Lucifer48 for "Not Entirely Easy" :)
  2. ;compile with :tasm32 -ml -m5 -q easy2-lu48
  3. ;              tlink32 -Tpe -aa -x -c easy2-lu48 ,,, import32
  4. ;-----------------------------------------------------------------------------
  5. .386p                                        ;386 instruction set enable
  6. .model flat, stdCALL
  7.  
  8. extrn    ExitProcess     : PROC
  9. extrn    MessageBeep     : PROC
  10. extrn    MessageBoxA     : PROC
  11.  
  12. ;-----------------------------------------------------------------------------
  13. ;Ces 3 paramΦtres peuvent Ωtre changΘs
  14.  
  15. longueur_serial      EQU 9                    ;METTRE LA LONGUEUR DU SERIAL ICI
  16. char_start           EQU 061h                 ;commence α partir de ce caractΦre
  17. char_end             EQU 07Ah                 ;termine α ce caractΦre
  18.  
  19. ;-----------------------------------------------------------------------------
  20. .data
  21.  
  22. serial   db longueur_serial dup(char_start),0  ;emplacement sur tester les serials
  23. sum     dd (longueur_serial*char_start)+(longueur_serial*(longueur_serial +1))/2
  24.  
  25. indice1     dd ?            ;longueur_serial
  26. indice2  dd ?            ;10h
  27.  
  28. ;-----------------------------------------------------------------------------
  29. .code
  30.  
  31. Main:                                        ;The code begins here
  32.     mov   ecx, offset serial             ;ne pas modifier ecx
  33. boucle:
  34.     xor   ebp,ebp                        ;ne pas modifier ebp
  35.     mov   dword ptr [indice2], 10h
  36.  
  37.     cmp   [sum],410h                     ;enleve quelques combinaisons...
  38.     jnz   pasbon
  39.  
  40.     ;======================== Double boucle du crackme
  41.  
  42.     xor   esi,esi
  43.     xor   ebx,ebx
  44. loop2:
  45.     mov   edi,1
  46.     mov   dword ptr [indice1], longueur_serial
  47. loop1:
  48.     add   esi,edi
  49.     movzx eax,byte ptr [ecx+edi-1]
  50.     add   esi,eax
  51.     
  52.     add   ebx,ebx
  53.     xor   ebx,esi
  54.     mov   eax,esi
  55.     cdq
  56.     idiv  edi
  57.     add   edx,3
  58.     sub   ebx,edx
  59.     inc   edi
  60.  
  61.     dec   [indice1]
  62.     jnz   loop1
  63.     dec   [indice2]
  64.     jnz   loop2
  65.  
  66.     cmp   ebx,0F61D4A8Fh
  67.     jnz   pasbon
  68.  
  69.     call  MessageBoxA, 0, offset serial, 0, 0
  70.     jmp   fin
  71. pasbon:
  72.     ;======================== FIN DE LA ZONE
  73.  
  74. compteur:
  75.     inc   [sum]                ;rajoutΘ
  76.     inc   byte ptr [ecx+ebp]        ;rajoutΘ
  77.     cmp   byte ptr [ecx+ebp],char_end+1
  78.     jnz   boucle
  79.  
  80.     sub   [sum], char_end+1-char_start    ;rajoutΘ
  81.     mov   byte ptr [ecx+ebp],char_start
  82.     inc   ebp
  83.     cmp   ebp,longueur_serial
  84.     jz    fin
  85.     jmp   compteur
  86. fin:                                         ;on a testΘ toutes les combinaisons
  87.     call  MessageBeep, 020h              ;MB_ICONQUESTION
  88.  
  89.         call ExitProcess, 0                  ;End (exit) program
  90.  
  91. End Main                                     ;End of code, Main is the entrypoint
  92. ;-----------------------------------------------------------------------------
  93.