home *** CD-ROM | disk | FTP | other *** search
/ KeyGen Studio 2002 / KeyGen_Studio_2002.iso / Tutorials / Dos CrackMes / com / CRACK50.ZIP / CRK50CRK.ASM < prev   
Encoding:
Assembly Source File  |  1998-12-12  |  1.9 KB  |  79 lines

  1. ; How to use this crap:
  2. ; calculate the last two bytes for a given number of loops of his main loops
  3. ; calculate them as: 35d8h+132h+number_of_looops
  4. ; read it off with break points..  in softice or something
  5. ; a correct serial is: PJ/7
  6. ; 25 loops is min. to make the last two bytes "typeable" but there is no values
  7. ; that first 25 loops.. 26 loops gives the PJ/7 serial
  8.  
  9. .model small
  10. .stack 100h    ; Plenty stack space
  11. .386           ; Who knows.. I might wanna use 386 code?
  12.  
  13. .data         
  14. sentence  db 05,04    ; input from int21h/0ah
  15.           db 0,0      ; Interate of these mother fuckers
  16.           db 47,37h   ; Bytes consistent with 26 loops : 35d8h+132h+26d
  17.           db 0dh      ; 0d terminated string - since read with int 21h/ah=0a
  18. count     db 0        ; counter
  19. finish    dw 0        ; place to store the current guess during iterations
  20.  
  21. .code
  22. mov ax, @data         ; Make DS&ES point to the DATA
  23. mov ds,ax
  24. mov es,ax
  25.  
  26. xor dx,dx             ; dx=0
  27.  
  28. next:
  29. lea bx, [sentence+2]  ; let bx point to the bytes we're checking for a fit
  30. mov word ptr [bx],dx  ; reset the bytes for next attempt
  31. inc word ptr [bx]     ; next two bytes
  32. mov bx, word ptr [bx] ; fetch it
  33. push bx               ; feed it to the call
  34. call flaffer          ; try it!
  35. pop dx                ; fetch attempt
  36. test ax,ax            ; Did it work?
  37. jnz next              ; no - try next
  38.  
  39. mov ax,4c00h          ; Breakpoint here - when it breaks DX=first two bytes
  40. int 21h
  41.  
  42.  
  43.  
  44.  
  45. flaffer:
  46. lea si,sentence
  47. mov cx,131h
  48. call again
  49. mov byte ptr [count],0
  50. ret
  51.  
  52.  
  53. again:
  54.   PUSH    SI
  55.   INC     CX
  56.   LODSW
  57.   XCHG    AX,BX
  58.   LODSW
  59.   ROL     BX,CL
  60.   XOR     BX,AX
  61.   XOR     BX,CX
  62.   MOV     BP,[SI]
  63.   LODSW
  64.   MUL     BX
  65.   MOV     [SI-04],AX
  66.   POP     SI
  67.   inc     byte ptr [count]
  68.   cmp     byte ptr [count],26h ; patch number of loops here
  69.   je      notagain
  70. ;  OR      AX,AX
  71.   JNZ     again
  72. ;  ret
  73. notagain:
  74.  
  75. ret
  76.  
  77. end
  78.  
  79.