?? beycomp.asm
字號:
; Beyond Compare v1.7c Key Generator
; tasm /zi beycomp.asm, tlink /v beycomp
; Final Revision (11/07/00).
.MODEL SMALL
.STACK 100h
.386
.DATA
logo db 0Ah,0Dh,'-----------------------------',0Ah,0Dh
db ' Beyond Compare v1.7c Keygen ',0Ah,0Dh
db ' By CrackZ (11/07/00) ',0Ah,0Dh
db '-----------------------------',0Ah,0Dh
db 0Ah,0Dh,'$'
msg1 db 'Input your registration name: ','$'
msg2 db 0Ah,0Dh,'Input your organization name: ','$'
namebuf db 32 dup('$') ;Buffer for name.
outmsg db 0Ah,0Dh,'Your Registration # is: ','$'
orgbuf db 32 dup('$') ;Buffer for organization.
prefix db 'BEYONDCOMPARE1',0
reqbuf db 74 dup(0) ;Required buffer.
tablebc db 00h,00h,00h,00h,1Bh,0B0h,0D4h,5Bh,81h,7Dh,68h,0B3h,9Ah,0CDh,0BCh,0E8h
db 02h,0FBh,0D0h,66h,19h,4Bh,04h,3Dh,83h,86h,0B8h,0D5h,98h,36h,6Ch,8Eh
db 04h,0F6h,0A1h,0CDh,1Fh,46h,75h,96h,85h,8Bh,0C9h,7Eh,9Eh,3Bh,1Dh,25h
db 06h,0Dh,71h,0ABh,1Dh,0BDh,0A5h,0F0h,87h,70h,19h,18h,9Ch,0C0h,0CDh,43h,0
.CODE
START: MOV AX,@DATA
MOV DS,AX
MOV ES,AX
LEA EDX,[logo]
MOV AH,09h
INT 21h
LEA EDX,[msg1]
MOV AH,09h
INT 21h
LEA EDX,[namebuf]
MOV AH,0Ah
INT 21h
LEA ESI, namebuf+2 ;Get name.
MOVZX ECX, BYTE PTR [ESI-1] ;Name length.
LEA EDI, reqbuf
ADD EDI, 0Eh ;Prefix takes up the first 14 bytes.
PUSH ECX ;Save name length.
REPZ MOVSB ;Store name in buffer.
LEA EDX,[msg2]
MOV AH,09h
INT 21h
LEA EDX,[orgbuf]
MOV AH,0Ah
INT 21h
LEA ESI, orgbuf+2 ;Get organisation.
MOVZX ECX, BYTE PTR [ESI-1] ;Organisation length.
PUSH ECX ;Save organisation length.
REPZ MOVSB ;Store organisation in buffer.
LEA ESI, prefix
POP EAX ;Organisation length.
POP EBX ;Name length.
MOV ECX, EAX
ADD ECX, EBX
ADD ECX, 0Eh
SUB EDI, ECX ;Gets the start of the buffer.
MOV CX, 0Eh
REPZ MOVSB ;Insert prefix.
MOV ECX, EAX
ADD ECX, EBX ;Get total length of name & org.
XOR ESI, ESI ;Clear ESI.
CALL uppercase
MOV EBX,ESI ;The length of name & org courtesy of the previous loop.
ADD EBX,0Eh ;Plus the prefix.
SUB EDI,0Eh ;Start of string.
XOR SI, SI ;Clear SI again.
CALL part1
XOR EAX, EAX
XOR EBX, EBX
LEA EDX, tablebc ;Table.
XOR EBP,EBP ;Clear EBP for use.
MOV ECX,ESI ;Get total length in ECX.
MOV EBP,EDX ;EBP denotes start of table.
CALL part2
PUSHA
MOV CX,08h
LEA EDX,[outmsg]
MOV AH,09h
INT 21h
@out1: ROL EBX,04h
MOV DL,BL
AND DL,0Fh
ADD DL,'0'
CMP DL,'9'
JBE @out2
ADD DL,07h
@out2: MOV AH,02h
INT 21h
LOOP @out1
JMP exitprog
;-----Functions-----
part1: MOV CL, BYTE PTR [EDI+ESI]
MOV EAX, ECX
ADD AL, 0BFh
SUB AL, 01Ah
JAE part1a
XOR DX, DX
MOV DL, CL
SUB EDX, 37h
JMP part1storebyte
part1a: MOV EAX, ECX
ADD AL, 0D0h
SUB AL, 0Ah
JAE part1storeanull
XOR EDX, EDX
MOV DL, CL
SUB EDX, 30h
JMP part1storebyte
part1storeanull:
XOR EDX, EDX
part1storebyte:
MOV BYTE PTR [EDI+ESI], DL
INC ESI
DEC EBX
JNZ part1
RET
part2: MOVZX ESI,BYTE PTR [EDI+EBX]
PUSH EDI
TEST ESI,ESI
JZ part2a
MOV EDI,EAX
SHR EDI,18h
XOR ESI,EDI
AND ESI,0FFh
CALL part2tableoffs
SHL EAX,8h
XOR ESI,EAX
MOV EAX,ESI
JMP part2a
part2a: INC EBX
POP EDI
DEC CX
JNZ part2
MOV EBX, EAX ;Result
XOR EAX, EAX ;Clear EAX.
RET
part2tableoffs:
CMP SI,0Fh ;Will it make our 64 byte table.
JG reduceit
JMP getoffset
getoffset:
MOV ESI, DWORD PTR DS:[ESI*4+EBP]
RET
reduceit:
PUSH ECX
MOV ECX,10h
PUSH EAX
XOR EAX,EAX
XOR DX,DX
MOV EAX,ESI
DIV ECX
MOV ESI,EDX
POP EAX
POP ECX
JMP getoffset
uppercase:
MOV DL, BYTE PTR [EDI+ESI]
CMP DL, 61h
JL isnotlowercase
CMP DL, 7Ah
JG isnotlowercase
AND DL, 5Fh ;Uppercase it.
uprepl: MOV BYTE PTR [EDI+ESI], DL ;Replace it.
INC ESI ;Position counter.
DEC ECX ;Loop counter.
JNZ uppercase
RET
isnotlowercase:
JMP uprepl
exitprog:
MOV AX,4C00h
INT 21h
END START
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -