home *** CD-ROM | disk | FTP | other *** search
/ KeyGen Studio 2002 / KeyGen_Studio_2002.iso / Tutorials / CrackMesCbjNet / nh-kgme.ZIP / nh-kgme.asm next >
Encoding:
Assembly Source File  |  2001-03-04  |  1.5 KB  |  118 lines

  1. .386
  2. .model tiny
  3. code segment 'code' public use16
  4. assume cs:code,ds:code
  5. org 100h
  6. start:
  7. mov ah,09h
  8. mov dx,offset messy1
  9. int 21h
  10. mov ah,0ah
  11. mov dx,offset nm
  12. int 21h
  13. mov cl,byte ptr nm+1
  14. cmp cl,4
  15. jae oki
  16.  mov ah,09h
  17.  mov dx,offset errror
  18.  int 21h
  19.  ret
  20. oki:
  21. movzx ecx,cl
  22. mov si,offset nm+2
  23. xor ebx,ebx
  24. xor ebp,ebp
  25. l1:
  26.  lodsb
  27.  movzx eax,al
  28.  add ebx,eax
  29.  xor al,byte ptr nm+1
  30.  add ebp,eax
  31.  xor al,byte ptr nm+1
  32. loop l1
  33. movzx ecx,byte ptr nm+1
  34. mov edx,ebx
  35. imul edx,ebx
  36. imul ebx,ecx
  37. add ebx,ebp
  38. add ebx,edx
  39. mov di,offset messy1
  40. push di
  41. call convert
  42. mov al,'$'
  43. stosb
  44. pop di
  45. mov ebx,edx
  46. imul ebx,2dh
  47. mov ah,09h
  48. mov dx,offset messy2
  49. int 21h
  50. mov dx,di
  51. int 21h
  52. mov ah,09h
  53. mov dx,offset messy3
  54. int 21h
  55. mov cx,4
  56. mov si,offset nm+2
  57. l4:
  58.  lodsb
  59.  mov ah,02h
  60.  mov dl,al
  61.  int 21h
  62. loop l4
  63. mov dl,'-'
  64. int 21h
  65. mov ah,09h
  66. mov dx,di
  67. int 21h
  68.  
  69. mov di,offset messy2
  70. std
  71. mov eax,'1$X-'
  72. mov [di+1],eax
  73. call convert
  74. mov al,'-'
  75. stosb
  76. cld
  77. mov ah,09h
  78. inc di
  79. mov dx,di
  80. int 21h
  81. ret
  82.  
  83. convert proc near
  84. xor edx,edx
  85. l2:
  86.  or ebx,ebx
  87.  je l3
  88.  mov al,bl
  89.  and al,0fh
  90.  cmp al,0ah
  91.  jb ok
  92. notok:
  93.  sub al,4
  94.  cmp al,0ah
  95.  jae notok
  96. ok:
  97.  add al,30h
  98. cnt:
  99.  movzx eax,al
  100.  add edx,eax
  101.  stosb
  102.  shr ebx,4
  103. jmp l2
  104. l3:
  105.  ret
  106. convert endp
  107.  
  108. messy1    db 13,10,'CoDe_InSiDe''s KeygenMe crackme keygen by nh',13,10
  109.     db       '  Your name   : $'
  110. messy2    db 13,10,'  Your serial : $'
  111. messy3    db 13,10,'  Your code   : $'
  112. errror    db 13,10,'Use a name of 4 chars or more...$'
  113. nm    dw 20h
  114.  
  115. code ends
  116. end start
  117. end
  118.