Advertisement
NishimaQ

Untitled

Dec 17th, 2018
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. org 100h
  2.  
  3. .MODEL SMALL
  4. .DATA
  5. chiper db 00ah, 0dch, 0cbh, 040h, 033h, 0deh, 07bh, 0d8h, 001h, 0c6h, 00bh, 0dch, 001h, 0eeh, 093h, 0d2h, 0a3h, 0cah, 001h, 0c6h, 07bh, 0c8h, 02bh, 040h, 0a3h, 0d0h, 00bh, 0e8h, 001h, 0c2h, 001h, 0c6h, 07bh, 0dah, 083h, 0eah, 0a3h, 0cah, 093h, 040h, 01bh, 0c2h, 073h, 040h, 0abh, 0dch, 023h, 0cah, 093h, 0e6h, 0a3h, 0c2h, 073h, 0c8h, 071h, 040h, 03ah, 0deh, 07bh, 0c8h, 001h, 0e0h, 093h, 0deh, 03bh, 0e4h, 00bh, 0dah, 06bh, 0cah, 093h, 0e6h, 001h, 0eeh, 093h, 0d2h, 0a3h, 0cah, 001h, 0c6h, 07bh, 0c8h, 02bh, 040h, 0a3h, 0d0h, 00bh, 0e8h, 001h, 0d0h, 0abh, 0dah, 00bh, 0dch, 09bh, 040h, 01bh, 0c2h, 073h, 040h, 0abh, 0dch, 023h, 0cah, 093h, 0e6h, 0a3h, 0c2h, 073h, 0c8h, 001h, 050h, 06ah, 0c2h, 093h, 0e8h, 04bh, 0dch, 001h, 08ch, 07bh, 0eeh, 063h, 0cah, 093h, 052h, 071h, 024h,
  6.  
  7. printdecrypted db 'd','e','c','r','y','p','t','e','d',':',0ah,0dh,'$'
  8. printchanged db 0ah,0ah,0dh,'c','h','a','n','g','e','d',':',0ah,0dh,'$'
  9.  
  10. .CODE
  11. .STARTUP  
  12. lea si, chiper
  13. mov cx, 80h
  14. dekripsi proc
  15.  dkr:
  16.  push cx
  17.  mov al, [si]
  18.  cmp al, '$'
  19.  jz dkr_sel
  20.  
  21.  mov bx, cx
  22.  and bx, 1h
  23.  shl bl, 1h
  24.  mov cl, 5h
  25.  add cl, bl
  26.  
  27.  rol al, cl
  28.  pop cx
  29.  
  30.  dkr_sel:
  31.  mov [si], al
  32.  
  33.  inc si
  34.  loop dkr
  35.  
  36. dekripsi endp
  37.  
  38. lea dx, printdecrypted
  39. mov ah,09h
  40. int 21h
  41.  
  42. lea dx, chiper
  43. mov ah,09h
  44. int 21h
  45.  
  46.  
  47. lea si,chiper
  48. mov cx,80h
  49.  
  50. gantihuruf:
  51.  mov al,[si]
  52.  cmp al,'A'
  53.  jz rubah
  54.  cmp al,'a'
  55.  jz rubah
  56.  jmp lanjut
  57.  
  58.  rubah:
  59.   add al,4h
  60.  lanjut:
  61.   mov [si],al
  62.  
  63.   inc si
  64.  loop gantihuruf
  65.  
  66. lea dx, printchanged
  67. mov ah,09h
  68. int 21h
  69.  
  70. lea dx, chiper
  71. mov ah,09h
  72. int 21h
  73. .EXIT
  74. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement