自己逆向的 某个注册机 源码
/*-------------------------------------------------------
/*
/* Beqee Key_gen Good Luck !!
/*
-------------------------------------------------------*/
/*-------------------------notes-------------------------------*/
//1.子类化SS_NOTIFY STATIC 控件必须加上SS_NOTIFY属性
/*-------------------------------------------------------------*/
////////////////////////////////////////////////////////////////////
#include <stdio.h>
#include <windows.h>
#include "resource.h"
#include "commctrl.h"
#pragma comment (lib,"msimg32.lib")
//debug 为0x0500 release 为0x0500
//#define _WIN32_WINNT 0x0400
#define _WIN32_WINNT 0x0500 //使用 TrackMouseEvent 需要定义
/*-------------------------------------------------------------*/
/* 定义子程序与全局变量、常量 */
/*-------------------------------------------------------------*/
HINSTANCE hInst;
HFONT hfont;
PAINTSTRUCT ps;
HDC hdc = NULL;
HBRUSH hBrush,hbrushOld;
HCURSOR hCursor;
HICON hIcon;
HHOOK Myhook;
HWND hStatic = NULL;
int Pos_Static = 108;
TRACKMOUSEEVENT tMs;
//#define MAXINPUTLEN 200
/*-------------------------------------------------------------*/
/* 函数声明 */
/*-------------------------------------------------------------*/
BOOL CALLBACK MainDlg (HWND, UINT, WPARAM, LPARAM) ;
BOOL CALLBACK AboutDlgProc (HWND, UINT, WPARAM, LPARAM) ;
LRESULT CALLBACK ClickStaticProc(HWND , UINT , WPARAM , LPARAM );
LRESULT CALLBACK SetStaticText(HWND , UINT , WPARAM , LPARAM );
void AnimateInit(HWND);
void PantTileAndDrawIcon(HDC ,char *);
void HookEditAndButton();
BOOL CALLBACK EnumProc( HWND , LPARAM ) ;
LRESULT CALLBACK MyHOOKPROC(
int nCode, // hook code
WPARAM wParam, // current-process flag
LPARAM lParam // message data
);
void CheckWindow(HWND );
void MySetBtnStyle(HWND ,BOOL,BOOL);
void MySetEdtStyle(HWND hwnd,BOOL in,BOOL state);
LRESULT CALLBACK ReSetBtnWindowPro(
HWND ,
UINT ,
WPARAM ,
LPARAM ) ;
LRESULT CALLBACK ReSetEdtWindowPro(
HWND ,
UINT ,
WPARAM ,
LPARAM ) ;
/*-------------------------------------------------------------*/
/* WinMain - 基于WIN32的程序的入口 */
/*-------------------------------------------------------------*/
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
{
hInst=hInstance;
hBrush = CreateSolidBrush(RGB(98,147,188));
// hbrushOld = (HBRUSH)SelectObject(hdc, hBrush);
hIcon = LoadIconA(hInstance,MAKEINTRESOURCE(IDI_ICON));
hCursor = LoadCursor(hInstance,MAKEINTRESOURCE(IDC_CURSOR));
DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_MAINDLG), NULL, (DLGPROC)MainDlg,0);
return 0;
}
/*-------------------------------------------------------------*/
/* AboutDlgProc - 关于窗口 */
/*-------------------------------------------------------------*/
BOOL CALLBACK AboutDlgProc (HWND hDlg, UINT message,
WPARAM wParam, LPARAM lParam)
{
HFONT hFont;
HWND tmp,tmp1;
WNDPROC OldOkprc,wpStaticOrigProc;
switch (message)
{
case WM_LBUTTONDOWN:
PostMessage(hDlg, WM_NCLBUTTONDOWN, HTCAPTION, 0);
return TRUE ;
// case WM_NCLBUTTONDOWN://用上面的那个
// Dragpt.x = (lParam & 0x0000ffff);
// Dragpt.y = (lParam & 0xffff0000) >> 16;
// if (PtInRect(&DragRc,Dragpt))
// PostMessage(hDlg,WM_NCLBUTTONDOWN,2,0);
// break;
case WM_PAINT:
hdc = BeginPaint (hDlg, &ps);
PantTileAndDrawIcon(hdc,"About");
// TextOut (hdc, 0, 0, "A Window!", 27);
EndPaint (hDlg, &ps);
break;
case WM_COMMAND :
switch (LOWORD (wParam))
{
case IDC_ABOUT_EXIT :
case IDC_ABOUT_OK :
KillTimer(hDlg,0);
EndDialog (hDlg, 0) ;
return TRUE ;
}
break ;
case WM_CTLCOLORDLG:
case WM_CTLCOLORSTATIC:
SetBkMode(HDC(wParam),TRANSPARENT);
SetTextColor(HDC(wParam),RGB(247,239,222));
return (int)hBrush;
break;
case WM_INITDIALOG:
tmp = GetDlgItem(hDlg,IDC_TEXT_ABOUT5);
tmp1 = GetDlgItem(hDlg,IDC_TEXT_ABOUT4);
hFont = CreateFontA(-12,0,0,0,FW_BOLD,FALSE,TRUE,FALSE,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH|FF_DONTCARE,"宋体");
SendMessage(tmp,WM_SETFONT,WPARAM(hFont),NULL);
SetDlgItemText(hDlg,IDC_TEXT_ABOUT5,"屏幕录像专家注册机");
SetDlgItemText(hDlg,IDC_TEXT_ABOUT6,"由tankaiha[FCG]编写");
hStatic = CreateWindowEx(0,"Static","dfdfgdfgdf",WS_CHILD|WS_VISIBLE,0,108,208,204,tmp1,NULL,hInst,NULL);
//static
wpStaticOrigProc = (WNDPROC) SetWindowLong(hStatic,GWL_WNDPROC,long(SetStaticText));
SetWindowLong(hStatic,GWL_USERDATA,long(wpStaticOrigProc));
//button
OldOkprc = (WNDPROC)SetWindowLong(GetDlgItem(hDlg,IDC_ABOUT_OK),GWL_WNDPROC,(long)ReSetBtnWindowPro);
SetWindowLong(GetDlgItem(hDlg,IDC_ABOUT_OK),GWL_USERDATA,long(OldOkprc));
OldOkprc = (WNDPROC)SetWindowLong(GetDlgItem(hDlg,IDC_ABOUT_EXIT),GWL_WNDPROC,(long)ReSetBtnWindowPro);
SetWindowLong(GetDlgItem(hDlg,IDC_ABOUT_EXIT),GWL_USERDATA,long(OldOkprc));
//
AnimateInit(hDlg);
SetTimer(hDlg,102,80,NULL);
Pos_Static = 108;
break;
case WM_TIMER:
Sleep(20);
Pos_Static = Pos_Static - 1;
if (Pos_Static> -208)
{
SetWindowPos(hStatic,HWND_TOP,0,Pos_Static,208,204,0);
}
else
Pos_Static = 108;
break;
}
return FALSE ;
}
&……………………
MyKey_Gen1.rar
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!