mov di,81h 81 is the first byte of the cmdline after the command itself
mov al,' ' next two lines: move forward in the buffer until
repe scasb the first space is encountered (usually just
lea dx,[di-1] the first byte, #82h)
dec di now move backward 1 byte in the buffer
mov al,13 scan forward again, this time looking for the car.
repne scasb return that ended the cmdline
mov byte [di-1],0 and punch in a zero there,
(presumably in preparation for a file-open operation which needs that byte to be a zero). essentially all it does is determine the beginning of the filename (into DX for fileopen) and plant a zero at end. just use debug and trace the code and you can watch what it does. (except you need to replace
" " with 20 in line 3 and don't put the "h" after the numbers) not clear if are you intending to open the file and encrypt it, or encrypt the word on the cmdline itself... this snippet is geared toward opening the file.