home *** CD-ROM | disk | FTP | other *** search
/ KeyGen Studio 2002 / KeyGen_Studio_2002.iso / Tutorials / Code Inside / nh-cm5kg.ZIP / nh-cm5kg.asm next >
Encoding:
Assembly Source File  |  2001-03-03  |  1.5 KB  |  119 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 ah,09h
  14. mov dx,offset messy2
  15. int 21h
  16. mov cl,byte ptr nm+1
  17. movzx ecx,cl
  18. mov si,offset nm+2
  19. mov di,offset arr
  20. xor ax,ax
  21. l1:
  22.  lodsb
  23.  mov bx,ax
  24.  mov byte ptr [di+bx],'1'
  25. loop l1
  26. mov ah,0ah
  27. mov dx,offset nm
  28. int 21h
  29. mov cl,byte ptr nm+1
  30. movzx ecx,cl
  31. mov si,offset nm+2
  32. mov di,offset nm-1
  33. xor ax,ax
  34. l2:
  35.  lodsb
  36.  mov bx,ax
  37.  not bx
  38.  mov byte ptr [di+bx],'1'
  39. loop l2
  40. mov si,offset arr
  41. mov cx,100h
  42. mov di,offset nm
  43. push di
  44. xor bx,bx
  45. l3:
  46.  inc bx
  47.  lodsb
  48.  cmp al,'0'
  49.  jz cnt
  50.  mov al,bl
  51.  stosb
  52. cnt:
  53. loop l3
  54. xor eax,eax
  55. stosd
  56. stosd
  57. pop si
  58. mov bx,4600h
  59. mov dl,45h
  60. call convert
  61. call convert
  62. mov di,si
  63. push si
  64. ll1:
  65.  lodsd
  66.  test eax,eax
  67.  jz ll2
  68.  xor eax,0a0b0c0dh
  69.  stosd
  70. jmp ll1
  71. ll2:
  72. xor al,al
  73. stosb
  74. pop si
  75. mov bx,00d0h
  76. mov dl,30h
  77. call convert
  78. mov byte ptr [di],'$'
  79. mov ah,09
  80. mov dx,offset messy3
  81. int 21h
  82. mov dx,si
  83. int 21h
  84. ret
  85.  
  86. convert proc near
  87.  push si
  88.  mov di,si
  89.  l4:
  90.   lodsb
  91.   or al,al
  92.   je l5
  93.   cmp al,20h
  94.   jae ok1
  95.   add al,dl
  96. ok1:
  97.   cmp al,7eh
  98.   jbe ok2
  99.   sub al,bh
  100.   add al,bl
  101. ok2:
  102.  stosb
  103.  jmp l4
  104.  l5:
  105.  pop si
  106.  ret
  107. convert endp
  108.  
  109. messy1    db 13,10,'CoDe_InSiDe''s 5th crackme keygen by nh',13,10
  110.     db       '  Your name        : $'
  111. messy2    db 13,10,'  Your organization: $'
  112. messy3    db 13,10,'  Your key         : $'
  113. arr    db 100h dup ('0')
  114. nm    dw 20h
  115.  
  116. code ends
  117. end start
  118. end
  119.