📄 cpix.asm
字号:
; ChromaPIX v1.0fc1 by CrackZ.
; tasm cpix.asm
; tlink /3 /t cpix
codesg segment
assume cs:codesg
assume ds:codesg
org 100h
.386P
start: jmp begin
;-----DATA-----
getname DB 'Insert desired name (2 spaces required): ','$'
linefeed DB 0Ah,0Dh,'$'
logo DB '--ChromaPIX v1.0fc1 Key Generator by CrackZ--',0Ah,0Dh,0Ah,0Dh,'$'
namebuff DB 34 dup(32)
outbuff DB 15 dup('$')
outcode DB 'Your serial # is: ','$'
;-----DATA END-----
begin: MOV DX, offset logo
MOV AH,09h
INT 21h
MOV DX, offset getname
MOV AH,09h
INT 21h
MOV DX, offset namebuff
MOV AH,0Ah
INT 21h
MOV EDI, offset namebuff+2 ;Start of name.
XOR AX, AX
MOV AL, BYTE PTR namebuff+1 ;Length
MOV BYTE PTR [EAX+EDI],20h ;Terminate the name with 20h.
XOR AX,AX
XOR ESI,ESI
XOR DX,DX ;Clear registers.
;Note that I perform NO error-checking for names with less than 2 space
;characters.
@calc_serial:
MOV DL,[EDI+ESI]
MOV ECX,EAX
SAR EAX,04
XOR ECX,EDX
AND ECX,0Fh
MOV EBX,ECX
SHL EBX,05
ADD EBX,ECX
SHL EBX,07
ADD ECX,EBX
XOR ECX,EAX
SHR EDX,04
AND EDX,0Fh
MOV EAX,ECX
AND EAX,0Fh
XOR EAX,EDX
MOV EDX,EAX
SHL EDX,05
ADD EDX,EAX
SHL EDX,07
ADD EAX,EDX
SAR ECX,04
XOR EAX,ECX
INC ESI
CMP ESI,20h
JL @calc_serial
ADD EAX, 3h
XOR EBX,EBX
MOV ECX,0Ah
@1: XOR EDX,EDX
DIV ECX
ADD EDX,30h
PUSH EDX
INC EBX
TEST EAX,EAX
JNZ @1
MOV EDI, offset outbuff
MOV DWORD PTR [EDI],'0CPS'
ADD EDI, 4h ;Move along for the serial #.
@2: POP EDX
MOV [EDI],DL
INC EDI
DEC EBX
TEST EBX,EBX
JNZ @2
MOV BYTE PTR [EDI],'-' ;Add the hyphen.
MOV DWORD PTR [EDI+1],'0000' ;Add the 0000 ending.
MOV EDX, offset linefeed
MOV AH,09h
INT 21h
MOV EDX, offset outcode
MOV AH,09h
INT 21h
MOV EDX, offset outbuff
MOV AH,09h
INT 21h
;-----End-----
@4: MOV AX,4C00h ;Exit
INT 21h
codesg ends
end start
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -