⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 textoys.asm

📁 破解很多程序的序列号算法程序
💻 ASM
字号:
.data

myname db 50 dup(0)
myserial db 16 dup(0)
currentnumber   dd 0
fixedname   db  50 dup(0)
myfixedserial  db   'RC'
               db  16 dup (0)

.code
start:
    call GetModuleHandle, NULL
    mov  hInstance,eax
    call GetCommandLine
    call WinMain, hInstance,NULL,CommandLine, SW_SHOWDEFAULT
    call ExitProcess,eax
WinMain proc hInst:HINSTANCE,hPrevInst:HINSTANCE,CmdLine:LPSTR,CmdShow:SDWORD
        mov  eax, OFFSET DlgProc
        call DialogBoxParam, hInst, offset DlgName,NULL,eax,NULL
        ret
WinMain endp

MyProc proc


serialgencode:

    pushad
    ;int 03
    lea     esi, myname         ; input name
    lea     edi, fixedname      ; where to 'parse' it to
startfixname:                   ; parsing the name, killing everything but letters
    mov     al, byte ptr [esi]  ; then ammending 't' s on the end if length[name] < 8
    test    al,al
    jz      endofname
    cmp     al, 7ah         ; 'z'
    jg      skipit              ; jg, oops, its not a letter
    cmp     al, 61h         ; 'a' smaller than z and bigger than a, its ok
    jge     @oki
    cmp     al, 5ah         ; 'Z'
    jg      skipit              ; jg, oops, its not a letter
    cmp     al, 41h         ; 'A' smaller than Z and bigger than A, its ok
    jl      skipit              ; jl, oops, its not a letter
@oki:
    mov     byte ptr [edi], al
    inc     edi
    mov     byte ptr [edi],0         ; null terminate it
skipit:
    inc     esi
    jmp     startfixname
endofname:
    lea     esi, fixedname
    call    getlength
    cmp     eax, 8          ; check length
    jge     lengthcorrect   ; greater or equal to 8, done
    add     esi,eax         ; otherwise, put a null terminated 't' on the end
    mov     word ptr [esi], 0074h   ; 't',0
    jmp     endofname
lengthcorrect:

    lea     edi, myserial
    mov     edx, 8
reverseit:                  ; reverse the name, after killing all non letters, and ammending 't's if needed
    mov     al, byte ptr [esi+edx-1]
    mov     byte ptr [edi],al
    inc     edi
    dec     edx
    jne     reverseit

doneparsing:                ; yay! that was easy..  

    lea     esi, myserial
    xor     edi,edi
sloop1:                     ; serial loop #1
    xor     edx,edx
    mov     dl, byte ptr [esi]
    add     edx, edi
    add     edx, 02      ; ?? 
    mov     byte ptr [esi], dl
    cmp     edx, 5ah        ; check its not upper case letter
    jle     sloop2
    cmp     edx, 61h        ; 61h=a? has to be lowercase...
    jge     sloop2
    add     byte ptr [esi],8
sloop2:
    ;int 03
    cmp     edx, 7ah            ; 7ah=z, if its bigger than z, sub 8 from it.. 
    jle     sloop3
    sub     byte ptr [esi], 8
sloop3:
    inc     edi
    inc     esi
    cmp     edi, 8
    jne     sloop1
    
    mov     edi, 8
    lea     esi, myserial       ; now we change the serial to upper case
checkitsuppercase:
    cmp     byte ptr [esi], 5ah
    jl      itsuppercase
    sub     byte ptr [esi],20h
itsuppercase:
    inc     esi
    dec     edi
    jnz     checkitsuppercase
    
    lea     esi, myserial       ; parse the serial, got to be 14 characters..
    lea     edi, myfixedserial+2
    
    movsw
    
    mov byte ptr [edi],'X'      ; random letter :)
    inc edi
    movsw
    mov dword ptr [edi],' DSI'  ; reads 'isd' inside ! 
    add edi,3
    movsd                       ; first two letters, 'RC' R!SC !
    

    
    popad       ; wayhey! done..
 ret

getlength:
    push    esi
    cmp     byte ptr [esi],0
    je      _null@
length1:
    inc     esi
    cmp     byte ptr [esi],0
    jnz     length1
_null@:
    lea     eax, dword ptr [esi]
    pop     esi
    sub     eax,esi
    ret
 
MyProc endp

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -