.386 ;v3.1 _STACK SEGMENT STACK dw 100h dup (?) _STACK ENDS _DATA SEGMENT DATACOUNT dw 0 DATA1 db 'HEXAMELIAN' DATA2 db 0,0,0,02Dh DATA3 db 0,0,0,0,02Dh DATA4 db 0,0,0,0 ALSO_MSG db 'Cygnus Hex Edit is not Case Sensitive. UCF=ucf also',0 ADDCOUNTER db 1 LINE1 equ 0B878h REGMEMNAMECNTR dw 0 ACTUAL_LETTERS dw 0 RED db 0 GREEN db 0 BLUE db 0 COLOR db 63 ISTHEREANERROR db 0 INIT equ 1Fh INIT_COLOR equ 01F7Eh NAME_COLOR equ 1Fh NUM_COLOR equ 1Fh PRINT_NUM_CNT dw 22 ;and video address ERROR_MSG_COLOR equ 0Ch ERROR db 'Sorry bud, please read the instructions',0 LOGO db 9 dup (0dh,0ah) db 'Type Name and Company, I.e. NAMECOMPANY-10 char min-',0dh,0ah db 'Cygnus Hex Editor 1.5 Keygen/tIE - greetz to UCF',0dh,0ah,0dh,0ah db 'Name+Compa:$' SERIAL db 0dh,0ah,' Serial:$' NAMENOVMEM db 40 dup (0) _DATA ENDS _TEXT SEGMENT use16 Assume CS:_TEXT, DS:_DATA, ES:_DATA, SS:_STACK INTRO: mov ax,0003h int 10h mov ax,_DATA mov ds,ax mov ax,1015h mov bx,0007h int 10h mov GREEN,ch mov BLUE,cl mov RED,dh lea dx,LOGO mov ah,9 int 21h call CLASS cld sub di,58 ;numbe of char *2 jmp DISPLAY_TEXT ERROR_1: call ERROR_MSG DISPLAY_TEXT: call ASK cmp ISTHEREANERROR,1 jz ERROR_1 call ENKRYPT QUIT: call WRI_HEX_DIG call RESET_PAL call ALSO mov ax,4c00h int 21h WRI_HEX_DIG Proc push di push ax push dx cld mov di,LINE1+10 mov es,di mov di,PRINT_NUM_CNT lea si,DATA2 L00PWRITE: lodsb mov ah,NUM_COLOR stosw or al,al jnz L00PWRITE pop dx pop ax pop di ret WRI_HEX_DIG EndP CLASS Proc mov bx,LINE1 mov es,bx mov di,22 mov ax,INIT_COLOR mov cx,29 rep stosw mov ax,1000h xor bx,bx mov dx,1000h int 10h ret CLASS EndP DEL_ERR_MSG Proc push cx push ax push si push di push es mov di,LINE1-10 mov es,di mov di,0 xor ax,ax mov cx,40 rep stosw pop es pop di pop si pop ax pop cx ret DEL_ERR_MSG EndP ERROR_MSG Proc push ax push esi push es push di dec ISTHEREANERROR mov di,LINE1-10 mov es,di mov di,0 mov esi,offset ERROR cld ERROR_1_1: lodsb mov ah,ERROR_MSG_COLOR stosw cmp al,0 jne ERROR_1_1 pop di pop es pop esi pop ax ret ERROR_MSG EndP ASK Proc STOP_1: call FLASHNOW xor ah,ah int 16h call DEL_ERR_MSG cmp al,0dh jz DONE cmp al,08h jz NO_SAVE cmp ACTUAL_LETTERS,29 jz ERROR_DONE IS_IT_NUM: cmp al,39h jle SAVE and al,05fh jmp short SAVE NO_SAVE: cmp ACTUAL_LETTERS,0 jz ERROR_DONE std push ax dec di dec di mov ax,INIT_COLOR stosw inc di inc di pop ax cld dec ACTUAL_LETTERS dec ACTUAL_LETTERS dec REGMEMNAMECNTR jmp short BLAH SAVE: mov ah,NAME_COLOR stosw call SAVEINREGMEM BLAH: inc ACTUAL_LETTERS jmp STOP_1 ERROR_DONE: mov ISTHEREANERROR,1 ret DONE: cmp ACTUAL_LETTERS,0 jz ERROR_DONE cmp ACTUAL_LETTERS,10 jl ERROR_DONE ret ASK EndP FLASHNOW Proc push ax push bx push cx push dx mov ax,1010h xor bh,bh mov bl,7 mov cl,COLOR mov dh,COLOR mov ch,COLOR REDO: mov ax,1010h mov cl,COLOR mov ch,COLOR mov dh,COLOR int 10h dec COLOR or cl,cl jnz QUIT_COLOR mov COLOR,63 QUIT_COLOR: pop dx pop cx pop bx pop ax ret FLASHNOW EndP RESET_PAL Proc mov ax,1010h xor bh,bh mov bl,7 mov ch,GREEN mov cl,BLUE mov dh,RED int 10h ret RESET_PAL EndP SAVEINREGMEM Proc push es push ax push di push ds pop es mov edi,offset NAMENOVMEM add di,REGMEMNAMECNTR stosb inc REGMEMNAMECNTR pop di pop ax pop es ret SAVEINREGMEM EndP ENKRYPT Proc push ax mov ah,09 push dx lea dx,SERIAL int 21h pop dx pop ax xor eax,eax cld xor edx,edx mov ecx,0ah xor ebx,ebx mov esi,offset NAMENOVMEM L00P: lea ebx,DATA1 lodsb cmp al,20h jz L00P add al,ADDCOUNTER mov bp,ax cdq idiv ecx movsx eax,[ebx+edx] add ax,bp xor edx,edx cdq idiv ecx add dx,30h push di lea di,DATA4 add di,DATACOUNT mov [di],dl pop di inc DATACOUNT inc ADDCOUNTER cmp ADDCOUNTER,4 jnz L00P mov DATACOUNT,0 L00P2: lea ebx,DATA1 lodsb cmp al,20h jz L00P2 add al,ADDCOUNTER mov bp,ax cdq idiv ecx movsx eax,[ebx+edx] add ax,bp xor edx,edx cdq idiv ecx add dx,30h push di lea di,DATA2 add di,DATACOUNT mov [di],dl pop di inc DATACOUNT inc ADDCOUNTER cmp ADDCOUNTER,07 jnz L00P2 mov DATACOUNT,0 L00P3: lea ebx,DATA1 lodsb cmp al,20h jz L00P3 add al,ADDCOUNTER mov bp,ax cdq idiv ecx movsx eax,[ebx+edx] add ax,bp xor edx,edx cdq idiv ecx add dx,30h push di lea di,DATA3 add di,DATACOUNT mov [di],dl pop di inc DATACOUNT inc ADDCOUNTER cmp ADDCOUNTER,0Bh jnz L00P3 RETURN: ret ;value in ecx ENKRYPT EndP ALSO Proc push ax push esi push es push di mov di,LINE1-10 mov es,di mov di,0 mov esi,offset ALSO_MSG cld ALSO_1_1: lodsb mov ah,ERROR_MSG_COLOR stosw cmp al,0 jne ALSO_1_1 pop di pop es pop esi pop ax ret ALSO EndP _TEXT ENDS END INTRO