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

📄 restest.asm

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


; This is borrowed from RudeBoy keygen template.I have added one 
; bitmap and changed code to make messagebox child.
;
.386
.MODEL FLAT,STDCALL
locals
jumps

UNICODE=0			;Not Unicode
;
;This is an example of how to create a VERY simple dialog based application
;using win32 asm.
;If you have any questions come to #win32asm on EFnet.
;

include w32.inc   ;Win 32 Definitions
IDD_DIALOG1                     equ 103
IDC_EDIT1                       equ 1000
IDC_EDIT2                       equ 1001
IDC_GROUPBOX1			   equ 1002
IDC_GROUPBOX2			   equ 1003
IDC_STATIC                      equ -1
IDI_ICON			   equ 105
IDB_BITMAP1 			   equ 134
CLICK_VISIT                     equ 10


ICON_SMALL	equ 0

extrn DrawIcon:proc
extrn _wsprintfA:proc		;This isn't in w32.inc

extrn lstrcatA:proc
extrn ShellExecuteA:proc
.DATA

caption db 'About',0
Do_visit     	db 'http://mrstop.da.ru',0 ; the activ url
info 	 db 'Keygenized by LaptoniC'
db 0ah,0dh,'at 13 August 2000'	
db 0ah,0dh,'http://mrstop.da.ru',0
LOC_10021D78    db        'PQYZMERUOA',0
dandikkey       db        '7ueYd74nF83jdyejj5',0 ;This is different for every rsagent prog
LOC_10021D6C    db        'JIKLICBXZC',0



szName		 db 33h dup(00h)	;The user's name
tempbuf dd ?
    

szWarning        db 'Give me 10 digits please',0


_hInst          dd ?		;the hInst
_hWnd	        dd ?		;Window Handle
_hIcon		dd ?


done		dd 0		;To tell it to exit the app

;%-010.10li
_msg             MSG         <?> ;The message Structure
_pnt		 PAINTSTRUCT <?>
DlgRect 	 RECT <>			
DlgWidth 	 dd ?
DlgHeight 	 dd ?
DesktopRect 	 RECT <>

.CODE

;---哪哪哪耐屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯湍哪哪哪----

main:
        call GetModuleHandle, NULL	;Get the handle to our app
        mov     _hinst, eax		;Store it
	xor	eax, eax		;clear eax
	mov	ax, IDD_DIALOG1		;load the handle of the dialog into eax
	push	0			;Initialization Value...we don't need it, make it 0
	push	offset DlgProc		;Pointer to the Procedure which handles messages for the dialog
	push	0			;We have no owner window, so this can be null
	push	eax			;The dialog that we want to load
	push	_hinst			;The hInst
	call	DialogBoxParamA		;Create the Dialog

	call	ExitProcess			;Exit the Program
	

;
;The DlgProc, handles messages for the Dialog Box
;See API Ref for info on the variables passed to it
;

PUBLIC DlgProc
DlgProc proc STDCALL, __hwnd:DWORD, wmsg:DWORD, _wparam:DWORD, _lparam:DWORD
    USES  ebx, edi, esi


xor	eax,eax				;Clear eax
mov 	ax, word ptr [wmsg]		;Put the message into eax

.IF ax==WM_DESTROY			;Was the msg WM_DESTROY
 jmp  _wmdestroy			;If so, destroy the window
.ELSEIF ax==WM_CLOSE			;Same thing if it's WM_CLOSE
 jmp  _wmdestroy
.ELSEIF ax==WM_COMMAND			;WM_COMMAND means something interesting happened
 jmp	_wmcommand			;So process it
.ELSEIF ax==WM_INITDIALOG		;Code runs when the dialog is first initialized
 jmp	_initdlg
.ELSEIF ax==WM_PAINT			;Code runs on WM_PAINT
 jmp	_paint
.ENDIF					
xor eax,eax
ret					;Exit the message loop, return 0

_wmdestroy:
push	0				;Return 0
push	__hWnd				;The handle of the Dialog
call	EndDialog			;End the Dialog
call	ExitProcess			;Exit Process
mov	done, 1				;This wasn't working even before i added the ExitProcess call ;)
ret

_wmcommand:
cmp	word ptr [_wparam], CLICK_VISIT
je	visit
cmp	word ptr [_wparam], IDC_EDIT1	;See if the user entered some text into the edit box
jne	@next				;If not go to the next compare
call	GenKey, __hWnd			;If they did, generate their key
jmp     @teo
@Next:
cmp	_wparam, IDOK			;Did they press the about button?
jne     @teo




;    push MB_ICONEXCLAMATION
    push 0
    push offset caption
    push offset info
    push __hWnd
    call MessageBoxA
    mov eax,-1
@teo:
ret

visit:
        CALL    ShellExecuteA,0,0,offset Do_visit,0,0,0
        RET

_initdlg:
;
;Here we will put the icon on the dialog and center the dialog
;
push	IDI_ICON			;The Icon Identifier, from the resource file (included in res.inc)
push	_hinst				;The hInstance
call	LoadIcon			;Load the Icon

mov	_hIcon, eax			;Store the Icon handle
push	eax				;Push it for the call to load the icon into the titlebar
push	ICON_SMALL			;The icon to be used in the title bar is the small icon
push	WM_SETICON			;The message to send
push	__hwnd				;The window handle
call	SendMessage			;Send the Message

;
;Code to center the dialog
;Code donated by Iczelion (commented by rudeboy)
;Thanks Iczelion!!
;
   push OFFSET DlgRect		;Ptr to the Rect struct that will store the coordinates
   push __hwnd				;The window handle
   call GetWindowRect			;
   call GetDesktopWindow		;get the handle to the Desktop window
   push OFFSET DesktopRect		;offset to the Rect struct that holds the size ofthe desktop
   push eax                       	;The hWnd ofthe desktop
   call GetWindowRect			;Get the info
   push  0				;Part of the later call to MoveWindow (no repaint)
   mov  eax,DlgRect.rc_bottom		;Get the bottom of our dialogs window
   sub  eax,DlgRect.rc_top		;subtract the y value at the top of our window
   mov  DlgHeight,eax			;And store it as the dialog's height
   push eax				;Push it for the call to MoveWindow
   mov  eax,DlgRect.rc_right		;The X coordinate of the right side of our dialog
   sub  eax,DlgRect.rc_left		;minus that of the left side
   mov  DlgWidth,eax			;gives us the width
   push eax				;Push it for the call to MoveWindow
   mov  eax,DesktopRect.rc_bottom	;Get the bottom of the desktop window
   sub  eax,DlgHeight			;Subtract the height of our dialog
   shr  eax,1				;and divide by 2...this gives the middle of the screen
   push eax				;Push for the movewindow call
   mov  eax,DesktopRect.rc_right	;Get the right side of the desktop
   sub  eax,DlgWidth			;Minus the width of our dialog
   shr  eax,1				;Divide by 2
   push eax				;Push it
   push  __hwnd				;Push the window handle
   call MoveWindow			;Move the window

   	push	offset szWarning	
	push	IDC_EDIT2		;The edit box to put the info into
	push	_hDlg			;The dialog handle
	call	SetDlgItemTextA		;Set the text
	mov	eax, 1			;set the return value


ret

_paint:
push	offset _pnt			;Push the paint structure
push	__hwnd				;The window handle
call	BeginPaint			;BeginPainting

;This is where we display the icon below the 'OK' button
push	_hIcon				;Icon Handle
push	175				;the location to draw at
push	120
push	eax				;The hDc (returned by BeginPaint)
call	DrawIcon			;Draw it
	
push	offset _pnt			;End our painting session
push	__hwnd
call	EndPaint
ret

DlgProc ENDP



GenKey proc _hDlg:dword
uses ebx, edx

	push	32h		        ;The max length of the string to get
	push	offset szName		;Pointer to the Name string
	push	IDC_EDIT1		;The text box to get the string from
	push	_hDlg			;The handle of the dialog
	call	GetDlgItemTextA		;Get the Name
	lea	ecx, szName		
	cmp 	byte ptr [ecx], 0	;See if there is anything in the name
       je     ExitProc0
       lea	esi, szName		;ismi esiye al
       push    esi			;ismi stack a yolla
       call    lstrlen			;listele.

⌨️ 快捷键说明

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