📄 swolfpro.asm
字号:
; SubmitWolf Pro v3.06 Key Generator.
; CrackZ (05/11/98).
;
; Use tasm /zi swolfpro.asm and then tlink /v swolfpro
; to generate swolfpro.exe
.MODEL SMALL
.STACK 100h
.386
.DATA
input DB 1Eh,0 ;Max 30 characters.
fill DB 10h dup ('$')
namecpy DB 1Eh dup (0)
prompt DB 'Input your desired Registration Name: ','$'
done DB 'Your Registration Code is: PW0-','$'
lf DB 0ah,0dh,'$'
logo DB 0ah,0dh, '--------------------------------------',0ah,0dh
DB ' SubmitWolf Pro v3.06 - Key Generator ',0ah,0dh
DB ' by CrackZ ',0ah,0dh
DB '--------------------------------------',0ah,0dh
DB 0ah,0dh,'$'
.CODE
START: MOV AX,@DATA
MOV DS,AX
MOV ES,AX
LEA EDX,[logo]
MOV AH,9
INT 21h ;Display Logo.
LEA EDX,[prompt]
MOV AH,9
INT 21h ;Prompt.
LEA EDX,[input]
MOV AH,0Ah
INT 21h ;Get registration name.
LEA EDX,[lf]
MOV AH,09h
INT 21h
CMP BYTE PTR [input+1],03
JL noname ;Jump no name/too short.
;Start by making a copy of the name in memory. Note that this obviously isn't the most
;effective means or correct way to do so but it is effective and simple to recall.
LEA EDI,input+2 ;Name.
MOVZX EBX, BYTE PTR [EDI-01] ;Get length.
PUSH EBX ;Save on stack.
LEA EAX, namecpy
XOR ECX,ECX ;Clear ECX.
;Note here how I save work by storing a modified copy of the name, i.e. +3.
copy:
MOV CL, BYTE PTR [EDI]
ADD CL,3h ;Add 3h as required.
MOV [EAX],CL ;Store.
INC EAX ;Increment store.
INC EDI ;Next name letter.
DEC EBX ;Loop.
JNZ copy ;More name to loop.
POP EBX ;Restore length.
SUB EDI,EBX ;& EDI.
XOR EAX,EAX
XOR ECX,ECX
XOR EDX,EDX
XOR ESI,ESI ;Clear registers.
MOV DL,53h ;P + 3 = 53h.
;This next stage is the mutiplication loop.
mult: MOV AL, BYTE PTR [EDI]
IMUL DL
MOV [EDI],AL
INC EDI
INC ESI
CMP ESI,4h
JNZ mult
XOR EAX,EAX
XOR ESI,ESI
SUB EDI,4h
INC ECX ;Loop pass counter.
CMP ECX,1h
JZ mult2
CMP ECX,2h
JZ mult3
XOR ECX,ECX
JMP part2
mult2: MOV DL, 5Ah ;W + 3 = Z (5Ah).
JMP mult
mult3: MOV DL, 33h ;0 + 3 = 3 (33h).
JMP mult
;Part 2 performs the XOR loop.
part2: LEA EAX,namecpy ;Return to our stored name.
xorloop:
MOV CL,BYTE PTR [EAX]
MOV DL,BYTE PTR [EDI]
XOR DL,CL ;Result of XOR is in DL.
MOV [EDI],DL
INC EDI
INC ESI
CMP ESI,4h
JNZ xorloop
DEC EBX ;Name length.
JNZ xoragain
JMP final
xoragain:
XOR ESI,ESI
SUB EDI,4h ;Reset EDI.
INC EAX ;Next name character.
JMP xorloop
final: SUB EDI,4h
XOR EAX,EAX
MOV EAX,[EDI] ;Result of all the name XOR's.
XOR EDI,EDI
MOV EDI,0Ah
MOV ECX, 0270Fh ;9999 decimal.
CMP EAX,ECX ;I'd be surprised if any name was less but..... JLE @out1
MOV ECX,0F423Fh ;999999 decimal.
@small: XOR EDX,EDX ;CDQ might work here.
CMP ECX,EAX
JLE @divide
XOR ECX,ECX
MOV ECX,0Ah
SUB EDI,8h ;Output preparation.
JMP @out1
@divide:
IDIV EDI
JMP @small
;EAX now holds the last 6 digits.
;Now convert the result into an ASCII value for output.
@out1: XOR EDX,EDX
DIV ECX
ADD EDX,30h ;Add 30h.
PUSH EDX ;Stack it.
INC EBX ;Increment counter.
TEST EAX,EAX
JNZ @out1
@out2: POP EDX ;Get character from the stack.
MOV BYTE PTR [EDI+EAX],DL
INC EAX
TEST EBX,EBX
DEC EBX ;Decrement counter.
JNZ @out2
MOV BYTE PTR [EDI+EAX],'$' ;Paste end character to the registration code.
;Now lets output the string.
LEA EDX,[done]
MOV AH,09h
INT 21h ;Output.
LEA EDX,[fill]
MOV AH,09h
INT 21h ;Print registration code.
noname:
LEA EDX,[lf]
MOV AH,09h
INT 21h
MOV AX,4C00h
INT 21h
END START
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -