home *** CD-ROM | disk | FTP | other *** search
/ KeyGen Studio 2002 / KeyGen_Studio_2002.iso / Tutorials / CrackMesCbjNet / nh-ovlcm.ZIP / nh-olvcm.asm next >
Encoding:
Assembly Source File  |  2001-04-12  |  1.8 KB  |  146 lines

  1. .386
  2. .model tiny
  3. cseg    segment para public 'code' use16
  4. assume    cs:cseg,ds:cseg
  5. org 100h
  6. start:
  7. mov ah,09h
  8. mov dx,offset copyright
  9. int 21h
  10. inc ah
  11. mov dx,offset nm
  12. int 21h
  13. mov cl,byte ptr nm+1
  14. cmp cl,6
  15. ja ok
  16. mov ah,09h
  17. mov dx,offset error
  18. int 21h
  19. ret
  20. ok:
  21. mov ah,09h
  22. mov dx,offset messy2
  23. int 21h
  24. movzx ecx,cl
  25. mov si,offset nm+3
  26. lea ebp,[esi+ecx-1]
  27. mov di,offset nm+2+100h
  28. push di
  29. dec ecx
  30. xor edx,edx
  31. l1:
  32.  dec bp
  33.  mov al,[bp]
  34.  call hex2dec1
  35.  mov al,[si]
  36.  mov ah,al
  37.  stosw
  38.  add edx,2
  39.  inc si
  40. loop l1
  41. lea ecx,[edx-4]
  42. pop si
  43. lea edi,[esi+200h]
  44. push di
  45. xor edx,edx
  46. l3:
  47.  lodsb
  48.  call hex2dec
  49. loop l3
  50. mov ecx,30h
  51. pop si
  52. mov di,offset nm+2+100h
  53. push di
  54. xor edx,edx
  55. l4:
  56.  add si,2
  57.  movsb
  58.  sub cx,2
  59.  inc edx
  60. loop l4
  61. pop di
  62. mov ecx,edx
  63. movzx edx,byte ptr nm+1
  64. mov si,offset nm+2+300h
  65. lea esi,[esi+edx-2]
  66. push di
  67. l5:
  68.  movzx eax,byte ptr [di]
  69.  movzx ebx,byte ptr [si]
  70.  sub eax,ebx
  71.  cdq
  72.  xor al,dl
  73.  sub al,dl
  74.  add al,'0'
  75.  inc si
  76.  stosb
  77. loop l5
  78. mov byte ptr [di-1],'$'
  79. pop dx
  80. mov ah,09h
  81. int 21h
  82. ret
  83.  
  84. hex2dec proc near
  85.  push si
  86.  push ecx
  87.  push edx
  88.  mov si,offset nm-1
  89.  movzx eax,al
  90.  mov ebx,10
  91.  xor ecx,ecx
  92. l2:
  93.  cdq
  94.  div ebx
  95.  add dl,'0'
  96.  dec si
  97.  mov [si],dl
  98.  inc ecx
  99.  or eax,eax
  100.  jne l2
  101.  pop edx
  102.  add edx,ecx
  103.  rep movsb
  104.  pop ecx
  105.  pop si
  106.  ret
  107. hex2dec endp
  108.  
  109. hex2dec1 proc near
  110.  push si
  111.  push ecx
  112.  push edx
  113.  mov si,offset nm-1
  114.  movzx eax,al
  115.  mov ebx,10
  116.  xor ecx,ecx
  117. ll2:
  118.  cdq
  119.  div ebx
  120.  add dl,'0'
  121.  dec si
  122.  mov [si],dl
  123.  dec si
  124.  mov [si],dl
  125.  add ecx,2
  126.  or eax,eax
  127.  jne ll2
  128.  pop edx
  129.  add edx,ecx
  130.  rep movsb
  131.  pop ecx
  132.  pop si
  133.  ret
  134. hex2dec1 endp
  135.  
  136. copyright    db 13,10,'Olivers Crackme keygen by nh',13,10
  137.         db ' ■ Name : $'
  138. messy2        db 13,10,' ■ Key  : $'
  139. error        db 13,10,'Too little name...$'
  140. nm        dw 20h
  141.  
  142. ends
  143. end start
  144. end
  145.  
  146.