第一次写注册机!
破解程序来自《加密与解密》serial.exe
具体serial.exe代码请阅读《加密与解密》第三篇
高手勿笑!!
.asm文件
.386
.model flat, stdcall
option casemap:none
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
include windows.inc
include kernel32.inc
include user32.inc
includelib kernel32.lib
includelib user32.lib
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
ICO_MAIN equ 1000
DLG_MAIN equ 1000
IDC_TEXTNAME equ 1001
IDC_TEXTCODE equ 1002
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.data?
hInstance dd ?
szBuffer db 256 dup (?)
szK1 dd ?
szCode dd ?
szResult db 256 dup (?)
szKey dd ?
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.const
szFormat db "%d",0
szError db '出错!',0
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.code
_Suanfa proc
lea esi,szBuffer
mov szK1,esi
L002:
mov al,byte ptr [esi]
test al,al
je L014
cmp al,41h
jb L019
cmp al,5Ah
jnb L011
inc esi
jmp L002
L011:
call L035
inc esi
jmp L002
L014:
mov esi,szK1
call L026
xor edi,5678h
mov eax,edi
jmp L025
L019:
invoke MessageBox,NULL,offset szError,NULL,MB_OK
L025:
jmp LEND
L026:
xor ebx,ebx
xor edi,edi
L028:
mov bl,byte ptr [esi]
test bl,bl
je L034
add edi,ebx
inc esi
jmp L028
L034:
retn
L035:
sub al,20h
mov byte ptr [esi],al
retn
LEND:
xor eax,1234h
ret
_Suanfa endp
_ProcDlgMain proc uses ebx edi esi hWnd,wMsg,wParam,lParam
mov eax,wMsg
.if eax == WM_CLOSE
invoke EndDialog,hWnd,NULL
.elseif eax == WM_INITDIALOG
invoke LoadIcon,hInstance,ICO_MAIN
invoke SendMessage,hWnd,WM_SETICON,ICON_BIG,eax
invoke GetDlgItem,hWnd,IDC_TEXTCODE
invoke EnableWindow,eax,FALSE
.elseif eax == WM_COMMAND
mov eax,wParam
.if ax == IDOK
invoke _Suanfa
invoke wsprintf,addr szResult,addr szFormat,eax
invoke SetDlgItemText,hWnd,IDC_TEXTCODE,addr szResult
invoke GetDlgItem,hWnd,IDC_TEXTCODE
invoke EnableWindow,eax,TRUE
.elseif ax == IDC_TEXTNAME
invoke GetDlgItemText,hWnd,IDC_TEXTNAME,addr szBuffer,sizeof szBuffer
.endif
.else
mov eax,FALSE
ret
.endif
mov eax,TRUE
ret
_ProcDlgMain endp
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
start:
invoke GetModuleHandle,NULL
mov hInstance,eax
invoke DialogBoxParam,hInstance,DLG_MAIN,NULL,offset _ProcDlgMain,NULL
invoke ExitProcess,NULL
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
end start
资源文件.rc
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#include <resource.h>
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#define ICO_MAIN 1000
#define DLG_MAIN 1000
#define IDC_TEXTNAME 1001
#define IDC_TEXTCODE 1002
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
ICO_MAIN ICON "Main.ico"
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
DLG_MAIN DIALOG 150, 160, 180, 134
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "注册机"
FONT 9, "宋体"
{
GROUPBOX "输入框",-1, 27, 5, 125, 100, BS_GROUPBOX
LTEXT "用户名", -1, 35, 20, 105, 10
EDITTEXT IDC_TEXTNAME, 35, 35, 105, 12
LTEXT "注册码", -1, 35, 60, 105, 10
EDITTEXT IDC_TEXTCODE, 35, 75, 105, 12
DEFPUSHBUTTON "显示注册码", IDOK, 100, 115, 50, 14
}
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)