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

📄 zen-rfkg.asm

📁 破解很多程序的序列号算法程序
💻 ASM
📖 第 1 页 / 共 2 页
字号:
; ##################################
; # NEXT LIMIT REALFLOW 1.3 KEYGEN #
; #################[XOR37H/ZENiTH]##


.386
.MODEL FLAT,STDCALL
locals
jumps

UNICODE=0                       ; Not Unicode

include res.inc                 ; Resource Includes
include w32.inc                 ; Win 32 Definitions

ICON_SMALL      equ 0

; KERNEL32.dll
        extrn   _wsprintfA:proc
        extrn   DrawIcon:proc

.data

        szName                  db      201 dup(00h)
        szCompany               db      201 dup(00h)
        Serial                  db      31 dup(00h)

        dbl_1e8                 dq      1.0e8
        dbl_1e9                 dq      1.0e9

        decimal_hex_format      db      '%d-%X',0
        uppercase_hex_format    db      '%X',0

        done                    dd      0                          ; To tell it to exit the app

        _hInst                  dd      ?                          ; the hInst
        _hWnd                   dd      ?                          ; Window Handle
        _hIcon                  dd      ?
        _msg                    MSG     <?>                        ; The message Structure
        _pnt                    PAINTSTRUCT <?>
        DlgRect                 RECT     <>                     
        DlgWidth                dd      ?
        DlgHeight               dd      ?
        DesktopRect             RECT    <>


.code
code_begin:

        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


; ############### SUBROUTINE #######################################
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
 .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], IDC_EDIT1   ; See if the user entered some text into the NAME edit box
        jne     @Next                           ; If not go to the next compare
        jmp     generate
@Next:
        cmp     word ptr [_wparam], IDC_EDIT2   ; See if the user entered some text into the ORGANIZATION edit box
        jne     @teo                            ; If not exit

generate:
        push    200                             ; 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    __hWnd                          ; The handle of the dialog
        call    GetDlgItemTextA                 ; Get the Name
        push    200                             ; The max length of the string to get
        push    offset szCompany                ; Pointer to the Company string
        push    IDC_EDIT2                       ; The text box to get the string from
        push    __hWnd                          ; The handle of the dialog
        call    GetDlgItemTextA                 ; Get the Company
        
        push    offset szCompany
        push    offset szName
        call    KeyGen                          ; If they did, generate their key

	sub	esp,8				; fixup stack

        push    offset Serial
        push    IDC_EDIT3                       ; The edit box to put the info into
        push    __hWnd                          ; The dialog handle
        call    SetDlgItemText                  ; Set the text

@teo:
        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

        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
        ret
        
DlgProc ENDP


; ############### SUBROUTINE #######################################
KeyGen   proc near

  var_280	 = 	dword 	ptr -280h
  var_27C	 = 	dword 	ptr -27Ch
  var_278	 = 	dword 	ptr -278h
  var_274	 = 	dword 	ptr -274h
  var_270	 = 	qword 	ptr -270h
  var_268	 = 	qword 	ptr -268h
  var_260	 = 	qword 	ptr -260h
  var_258	 = 	qword 	ptr -258h
  var_250	 = 	dword 	ptr -250h
  var_24C	 = 	dword 	ptr -24Ch
  var_248	 = 	dword 	ptr -248h
  var_244	 = 	dword 	ptr -244h
  var_240	 = 	dword 	ptr -240h
  var_23C	 = 	dword 	ptr -23Ch
  var_238	 = 	dword 	ptr -238h
  var_234	 = 	dword 	ptr -234h
  var_230	 = 	dword 	ptr -230h
  var_22C	 = 	dword 	ptr -22Ch
  var_228	 = 	dword 	ptr -228h
  var_200	 = 	byte	ptr -200h
  var_100	 = 	byte	ptr -100h
  arg_0          =      dword   ptr  4          ; name
  arg_4          =      dword   ptr  8          ; company

	 sub	 esp, 280h
	 push	 ebx
	 push	 ebp
	 push	 esi
	 push	 edi
	 mov	 [esp+290h+var_250], 3E23D70Ah
	 mov	 [esp+290h+var_24C], 3E19999Ah
	 mov	 [esp+290h+var_248], 3E19999Ah
	 mov	 [esp+290h+var_244], 0BF451EB8h
	 mov	 [esp+290h+var_240], 3F000000h
	 mov	 [esp+290h+var_23C], 0BE19999Ah
	 mov	 [esp+290h+var_238], 3F733333h
	 mov	 [esp+290h+var_234], 3E800000h
	 mov	 [esp+290h+var_230], 3F451EB8h
	 mov	 [esp+290h+var_22C], 3E800000h
	 mov	 [esp+290h+var_278], 1
loc_444282:
	 fild	 [esp+290h+var_278]
	 xor	 eax, eax
loc_444288:
	 fld	 st
	 fadd	 [esp+eax+290h+var_250]
	 add	 eax, 4
	 cmp	 eax, 28h
	 fstp	 [esp+eax+290h+var_22C]
	 jl	 short loc_444288
	 mov	 edx, [esp+290h+arg_0]
	 or	 ecx, 0FFFFFFFFh
	 mov	 edi, edx
	 xor	 eax, eax
	 repne scasb
	 fstp	 st
	 not	 ecx
	 dec	 ecx
	 xor	 esi, esi
	 mov	 edi, ecx
	 xor	 ebp, ebp
	 test	 edi, edi
	 mov	 [esp+290h+var_274], edi
	 jle	 short loc_4442EC
loc_4442BD:
	 movsx	 ebx, byte ptr [esi+edx]
	 mov	 eax, esi
	 mov	 ecx, 0Ah
	 cdq
	 idiv	 ecx

⌨️ 快捷键说明

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