Offipalsta.COM

Offipalsta.COM (https://forums.offipalsta.com/index.php)
-   Symbolic machine code (https://forums.offipalsta.com/forumdisplay.php?f=147)
-   -   Kryptaus (https://forums.offipalsta.com/showthread.php?t=46290)

Lars 08.12.2002 20:40

Kryptaus
 
Tein joskus vuonna -96, en tiedä toimiiko. Tutkihan...

.radix 16
.model small

assume cs:code

pura macro
mov cx,1000
paska:
mov al,[cryptinum]
mov bx,cx
cmp [point+bx],'$'
je ohitus
xor byte ptr [point+bx],al
loop paska
ohitus:
endm pura

otarandomi macro
mov ax,40
mov es,ax
mov ah,es:[6ch]
endm otarandomi

lataa macro
mov ah,03dh
mov al,66d
lea dx, nimi
int 21h
mov bx,ax
push bx
mov ah,3fh
mov cx,endi-start
lea dx, dump
int 21h
jc error
mov ah,3eh
pop bx
int 21h
jc error
mov point,endo-start
add point,endi-start
endm lataa

pakkaa macro
mov cx,1000
paska2:
mov al,[cryptinum]
mov bx,cx
cmp [point+bx],'$'
je ohitus2
xor byte ptr [point+bx],al
loop paska2
ohitus2:
endm pakkaa

saveta macro
mov ah,3dh
mov al,66d
lea dx,nimi
int 21h
mov bx,ax
push bx
mov ah,3fh
mov cx,endi-start
lea dx,dump
int 21h
mov ah,3eh
pop bx
int 21h
endm saveta

code segment
org 100
start:
mov ah,0
mov al,3
int 10h
lataa
pura
mov ah,9
lea dx,point
int 21h
otarandomi
mov cryptinum,ah
pakkaa
saveta
jmp enditus
error:
mov ah,2
mov dl,7
int 21h
enditus:
mov ax,4c00h
int 21h
nimi db 'crypting.com',0
point dw 0
cryptinum db 0
endo:
viesti db 'Heheheheeeeeeeeheeheeeeeee.... tama on cryptatty commissa!$'
endi:
dump db ?
code ends
end start


--
Lars


Sivu luotu: 19:36 (GMT +2).