標 題:輕鬆提取資源 v1.82 序號產生器 (MASM32) (4千字)
發信人:lq7972 [發短訊息]
詳細資訊:
SoftWare:輕鬆提取資源 v1.82 序號產生器 (MASM32)
Cracker:lq7972[bruceyu13@sina.com]
Notes:學習。今天PJ完這個軟體後,發現simonyan分析過它的老版本(1.45)(精華V);新舊之間沒有很大的區別,只是對註冊碼的加密做了一點變動,同時在計算註冊碼前加入了幾個黑名單,如“ttdown”“crsky”等。這個軟體很適合新手練習比如我啦
;KeyGen.asm檔案
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; The KeyGen by lq7972,with MASM32 V8
; E-mail:bruceyu13@sina.com
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.386
.model flat,stdcall
option casemap:none
;Include檔案定義
include windows.inc
include user32.inc
includelib user32.lib
include kernel32.inc
includelib kernel32.lib
include gdi32.inc
includelib gdi32.lib
include comdlg32.inc
includelib comdlg32.lib
include masm32.inc
includelib masm32.lib
;Equ等值定義
ICO_MAIN equ 1000H
DLG_MAIN equ 1
EditName equ 10
EditSN equ 11
;*************************************************************************************
.data?
szSN db ?
szName db 20 dup (?)
Temp db ?
.data
hInstance dd 0
szErr db '請輸入使用者名稱!',0
szCaption db '錯誤!',0
szString db 'huydong',0
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.code
;***************************************************************************************
_RegCodCalc proc
pushad
invoke lstrlen,offset szName
mov esi,eax
sub ecx,ecx
@@:
lea eax,szName
mov ebp,7H
mov bl,BYTE ptr [eax+ecx]
mov eax,ecx
cdq
idiv ebp
movsx eax,bl
mov ebx,ecx
movsx edx,BYTE ptr [szString+edx]
add ebx,edx
add eax,ebx
mov ebx,9H
add eax,esi
cdq
idiv ebx
add dl,30H
inc ecx
mov BYTE ptr [Temp+ecw-1],dl
cmp ecx,esi
jl @B
invoke revstr,addr Temp,addr szSN ;這是MASM32.lib中的翻轉字串函式
;最後一位註冊碼
lea eax,DWORD ptr [esi+4DH]
mov ecx,9
cdq
idiv ecx
add dl,30H
mov BYTE ptr [szSN+esi],dl
popad
ret
_RegCodCalc endp
;**************************************************************************************
_ProcDlgMain proc uses ebx edi esi ecx edx,hWnd,wMsg,wParam,lParam
mov eax,wMsg
.if eax==WM_CLOSE
invoke EndDialog,hWnd,NULL
.elseif eax==WM_COMMAND
mov eax,wParam
.if eax == IDOK
invoke RtlZeroMemory,addr szSN,100
invoke GetDlgItemText,hWnd,EditName,offset szName,20
.if eax != NULL
invoke _RegCodCalc
invoke SetDlgItemText,hWnd,EditSN,offset szSN
mov eax,FALSE
ret
.else
invoke MessageBox,NULL,offset szErr,offset szCaption,MB_OK
mov eax,FALSE
ret
.endif
.elseif eax == IDCANCEL
invoke EndDialog,hWnd,NULL
.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,0
invoke ExitProcess,NULL
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
end start
//KeyGen.rc檔案
#include
#define ICO_MAIN 0x1000
#define DLG_MAIN 1
#define EDITName 10
#define EDITSN 11
//ICO_MAIN ICON "01.ico"
DLG_MAIN DIALOG 100,150,250,60
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "輕鬆提取資源 v1.82 序號產生器"
FONT 9,"宋體"
{
CONTROL "Name:" ,-1,"Static",SS_LEFT,10,13,40,17
CONTROL "Code:" ,-2,"Static",SS_CENTER,10,40,20,17
CONTROL "" ,10,"Edit",ES_LEFT,30,13,150,10
CONTROL "" ,11,"Edit",ES_LEFT,30,40,150,10
DEFPUSHBUTTON "GENERATE",IDOK,200,11,40,15
PUSHBUTTON "EXIT",IDCANCEL,200,36,41,14
}
#makefile檔案
NAME = KeyGen
OBJS = $(NAME).obj
RES = $(NAME).res
LINK_FLAG = /subsystem:windows
ML_FLAG = /c /coff
$(NAME).exe: $(OBJS) $(RES)
Link $(LINK_FLAG) $(OBJS) $(RES)
.asm.obj:
ml $(ML_FLAG) $<
.rc.res:
rc $<
clean:
del *.obj
del *.res