|
[转帖]Telerik Software Pack 04.03.2016 (Win/Mac) DVT
Telerik.UI.for.ASP.NET.AJAX.v2016.1.225-DVT Telerik.UI.for.WPF.v2016.1.217-DVT 谢谢 |
|
[转帖]Universal Extractor 1.9.18.204 by gora
LonerD - павлуша дергунов - ВОР. |
|
[原创]VMProtect SDK 演示
多谢,还在。。。 |
|
[原创]rmtsvc2.5.x 源码
链接失效。 楼主可否更新链接? 或者已下载的网友帮忙传一个? |
|
[下载]AheadLib修改版本
高手验证一下,下面这份lpk.cpp是否可用。 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 头文件 #include "stdafx.h" #include <process.h> #include "WatchDog.h" //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 #pragma comment(linker, "/EXPORT:LpkInitialize=_AheadLib_LpkInitialize,@1") #pragma comment(linker, "/EXPORT:LpkTabbedTextOut=_AheadLib_LpkTabbedTextOut,@2") #pragma comment(linker, "/EXPORT:LpkDllInitialize=_AheadLib_LpkDllInitialize,@3") #pragma comment(linker, "/EXPORT:LpkDrawTextEx=_AheadLib_LpkDrawTextEx,@4") //#pragma comment(linker, "/EXPORT:LpkEditControl=_AheadLib_LpkEditControl,@5") #pragma comment(linker, "/EXPORT:LpkExtTextOut=_AheadLib_LpkExtTextOut,@6") #pragma comment(linker, "/EXPORT:LpkGetCharacterPlacement=_AheadLib_LpkGetCharacterPlacement,@7") #pragma comment(linker, "/EXPORT:LpkGetTextExtentExPoint=_AheadLib_LpkGetTextExtentExPoint,@8") #pragma comment(linker, "/EXPORT:LpkPSMTextOut=_AheadLib_LpkPSMTextOut,@9") #pragma comment(linker, "/EXPORT:LpkUseGDIWidthCache=_AheadLib_LpkUseGDIWidthCache,@10") #pragma comment(linker, "/EXPORT:ftsWordBreak=_AheadLib_ftsWordBreak,@11") //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 原函数地址指针 PVOID pfnLpkInitialize; PVOID pfnLpkTabbedTextOut; PVOID pfnLpkDllInitialize; PVOID pfnLpkDrawTextEx; PVOID pfnLpkEditControl; PVOID pfnLpkExtTextOut; PVOID pfnLpkGetCharacterPlacement; PVOID pfnLpkGetTextExtentExPoint; PVOID pfnLpkPSMTextOut; PVOID pfnLpkUseGDIWidthCache; PVOID pfnftsWordBreak; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 宏定义 #define EXTERNC extern "C" #define NAKED __declspec(naked) #define EXPORT __declspec(dllexport) #define ALCPP EXPORT NAKED #define ALSTD EXTERNC EXPORT NAKED void __stdcall #define ALCFAST EXTERNC EXPORT NAKED void __fastcall #define ALCDECL EXTERNC NAKED void __cdecl //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //LpkEditControl导出的是数组,不是单一的函数 EXTERNC void __cdecl AheadLib_LpkEditControl(void); EXTERNC __declspec(dllexport) void (*LpkEditControl[14])() = {AheadLib_LpkEditControl}; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // AheadLib 命名空间 namespace AheadLib { HMODULE m_hModule = NULL; // 原始模块句柄 DWORD m_dwReturn[11] = {0}; // 原始函数返回地址 // 获取原始函数地址 FARPROC WINAPI GetAddress(PCSTR pszProcName) { FARPROC fpAddress; CHAR szProcName[16]; TCHAR tzTemp[MAX_PATH]; fpAddress = GetProcAddress(m_hModule, pszProcName); if (fpAddress == NULL) { if (HIWORD(pszProcName) == 0) { wsprintf(szProcName, "%d", pszProcName); pszProcName = szProcName; } wsprintf(tzTemp, TEXT("无法找到函数 %hs,程序无法正常运行。"), pszProcName); MessageBox(NULL, tzTemp, TEXT("AheadLib"), MB_ICONSTOP); ExitProcess(-2); } return fpAddress; } // 初始化原始函数地址指针 inline VOID WINAPI InitializeAddresses() { pfnLpkInitialize = GetAddress("LpkInitialize"); pfnLpkTabbedTextOut = GetAddress("LpkTabbedTextOut"); pfnLpkDllInitialize = GetAddress("LpkDllInitialize"); pfnLpkDrawTextEx = GetAddress("LpkDrawTextEx"); pfnLpkEditControl = GetAddress("LpkEditControl"); RtlMoveMemory(LpkEditControl, (PVOID)GetAddress("LpkEditControl"), sizeof(LpkEditControl)); pfnLpkExtTextOut = GetAddress("LpkExtTextOut"); pfnLpkGetCharacterPlacement = GetAddress("LpkGetCharacterPlacement"); pfnLpkGetTextExtentExPoint = GetAddress("LpkGetTextExtentExPoint"); pfnLpkPSMTextOut = GetAddress("LpkPSMTextOut"); pfnLpkUseGDIWidthCache = GetAddress("LpkUseGDIWidthCache"); pfnftsWordBreak = GetAddress("ftsWordBreak"); } // 加载原始模块 inline BOOL WINAPI Load() { TCHAR tzPath[MAX_PATH]; TCHAR tzTemp[MAX_PATH * 2]; GetSystemDirectory(tzPath, MAX_PATH); lstrcat(tzPath, TEXT("\\lpk.dll")); m_hModule = LoadLibrary(tzPath); if (m_hModule == NULL) { wsprintf(tzTemp, TEXT("无法加载 %s,程序无法正常运行。"), tzPath); MessageBox(NULL, tzTemp, TEXT("AheadLib"), MB_ICONSTOP); } else { InitializeAddresses(); } return (m_hModule != NULL); } // 释放原始模块 inline VOID WINAPI Free() { if (m_hModule) { FreeLibrary(m_hModule); } } } using namespace AheadLib; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /* //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //函数声明 void WINAPIV Init(LPVOID pParam); void WINAPIV Init(LPVOID pParam) { TCHAR tzTemp[MAX_PATH]; wsprintf(tzTemp, TEXT("成功劫持!.......")); MessageBox(NULL, tzTemp, TEXT("gamehacker"), MB_ICONSTOP); return; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// */ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 入口函数 BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, PVOID pvReserved) { CWatchDog wd; if (dwReason == DLL_PROCESS_ATTACH) { DisableThreadLibraryCalls(hModule); if(Load()) { //LpkEditControl这个数组有14个成员,必须将其复制过来 //memcpy((LPVOID)(LpkEditControl), (LPVOID)((int*)GetAddress("LpkEditControl")), sizeof(LpkEditControl)); //_beginthread(Init, NULL, NULL); } else return FALSE; } else if (dwReason == DLL_PROCESS_DETACH) { Free(); } return TRUE; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkInitialize(void) { __asm JMP pfnLpkInitialize; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkTabbedTextOut(void) { __asm JMP pfnLpkTabbedTextOut; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkDllInitialize(void) { __asm JMP pfnLpkDllInitialize; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkDrawTextEx(void) { __asm JMP pfnLpkDrawTextEx; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkEditControl(void) { __asm JMP DWORD PTR [pfnLpkEditControl]; //这里的LpkEditControl是数组,eax存的是函数指针 } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkExtTextOut(void) { __asm JMP pfnLpkExtTextOut; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkGetCharacterPlacement(void) { __asm JMP pfnLpkGetCharacterPlacement; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkGetTextExtentExPoint(void) { __asm JMP pfnLpkGetTextExtentExPoint; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkPSMTextOut(void) { __asm JMP pfnLpkPSMTextOut; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkUseGDIWidthCache(void) { __asm JMP pfnLpkUseGDIWidthCache; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_ftsWordBreak(void) { __asm JMP pfnftsWordBreak; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
|
[下载]AheadLib修改版本
XP、Win 7都可以用的lpk.cpp应该是怎样的呢? |
|
[下载]AheadLib修改版本
我水平有限,对x64没太多研究。 把源码放上来,让有兴趣的朋友一起努力。 |
|
[下载]AheadLib修改版本
知道了。 谢谢K大,Z大。 |
|
[下载]AheadLib修改版本
yonsm原版程序生成的lpk.cpp -------------------- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 头文件 #include <Windows.h> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 #pragma comment(linker, "/EXPORT:LpkTabbedTextOut=_AheadLib_LpkTabbedTextOut,@1") #pragma comment(linker, "/EXPORT:LpkDllInitialize=_AheadLib_LpkDllInitialize,@2") #pragma comment(linker, "/EXPORT:LpkDrawTextEx=_AheadLib_LpkDrawTextEx,@3") #pragma comment(linker, "/EXPORT:LpkEditControl=_AheadLib_LpkEditControl,@4") #pragma comment(linker, "/EXPORT:LpkExtTextOut=_AheadLib_LpkExtTextOut,@5") #pragma comment(linker, "/EXPORT:LpkGetCharacterPlacement=_AheadLib_LpkGetCharacterPlacement,@6") #pragma comment(linker, "/EXPORT:LpkGetTextExtentExPoint=_AheadLib_LpkGetTextExtentExPoint,@7") #pragma comment(linker, "/EXPORT:LpkInitialize=_AheadLib_LpkInitialize,@8") #pragma comment(linker, "/EXPORT:LpkPSMTextOut=_AheadLib_LpkPSMTextOut,@9") #pragma comment(linker, "/EXPORT:LpkUseGDIWidthCache=_AheadLib_LpkUseGDIWidthCache,@10") #pragma comment(linker, "/EXPORT:ftsWordBreak=_AheadLib_ftsWordBreak,@11") //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 宏定义 #define EXTERNC extern "C" #define NAKED __declspec(naked) #define EXPORT __declspec(dllexport) #define ALCPP EXPORT NAKED #define ALSTD EXTERNC EXPORT NAKED void __stdcall #define ALCFAST EXTERNC EXPORT NAKED void __fastcall #define ALCDECL EXTERNC NAKED void __cdecl //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // AheadLib 命名空间 namespace AheadLib { HMODULE m_hModule = NULL; // 原始模块句柄 DWORD m_dwReturn[11] = {0}; // 原始函数返回地址 // 加载原始模块 inline BOOL WINAPI Load() { TCHAR tzPath[MAX_PATH]; TCHAR tzTemp[MAX_PATH * 2]; GetSystemDirectory(tzPath, MAX_PATH); lstrcat(tzPath, TEXT("\\lpk")); m_hModule = LoadLibrary(tzPath); if (m_hModule == NULL) { wsprintf(tzTemp, TEXT("无法加载 %s,程序无法正常运行。"), tzPath); MessageBox(NULL, tzTemp, TEXT("AheadLib"), MB_ICONSTOP); } return (m_hModule != NULL); } // 释放原始模块 inline VOID WINAPI Free() { if (m_hModule) { FreeLibrary(m_hModule); } } // 获取原始函数地址 FARPROC WINAPI GetAddress(PCSTR pszProcName) { FARPROC fpAddress; CHAR szProcName[16]; TCHAR tzTemp[MAX_PATH]; fpAddress = GetProcAddress(m_hModule, pszProcName); if (fpAddress == NULL) { if (HIWORD(pszProcName) == 0) { wsprintf(szProcName, "%d", pszProcName); pszProcName = szProcName; } wsprintf(tzTemp, TEXT("无法找到函数 %hs,程序无法正常运行。"), pszProcName); MessageBox(NULL, tzTemp, TEXT("AheadLib"), MB_ICONSTOP); ExitProcess(-2); } return fpAddress; } } using namespace AheadLib; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 入口函数 BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, PVOID pvReserved) { if (dwReason == DLL_PROCESS_ATTACH) { DisableThreadLibraryCalls(hModule); return Load(); } else if (dwReason == DLL_PROCESS_DETACH) { Free(); } return TRUE; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkTabbedTextOut(void) { // 保存返回地址 __asm POP m_dwReturn[0 * TYPE long]; // 调用原始函数 GetAddress("LpkTabbedTextOut")(); // 转跳到返回地址 __asm JMP m_dwReturn[0 * TYPE long]; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkDllInitialize(void) { // 保存返回地址 __asm POP m_dwReturn[1 * TYPE long]; // 调用原始函数 GetAddress("LpkDllInitialize")(); // 转跳到返回地址 __asm JMP m_dwReturn[1 * TYPE long]; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkDrawTextEx(void) { // 保存返回地址 __asm POP m_dwReturn[2 * TYPE long]; // 调用原始函数 GetAddress("LpkDrawTextEx")(); // 转跳到返回地址 __asm JMP m_dwReturn[2 * TYPE long]; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkEditControl(void) { // 保存返回地址 __asm POP m_dwReturn[3 * TYPE long]; // 调用原始函数 GetAddress("LpkEditControl")(); // 转跳到返回地址 __asm JMP m_dwReturn[3 * TYPE long]; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkExtTextOut(void) { // 保存返回地址 __asm POP m_dwReturn[4 * TYPE long]; // 调用原始函数 GetAddress("LpkExtTextOut")(); // 转跳到返回地址 __asm JMP m_dwReturn[4 * TYPE long]; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkGetCharacterPlacement(void) { // 保存返回地址 __asm POP m_dwReturn[5 * TYPE long]; // 调用原始函数 GetAddress("LpkGetCharacterPlacement")(); // 转跳到返回地址 __asm JMP m_dwReturn[5 * TYPE long]; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkGetTextExtentExPoint(void) { // 保存返回地址 __asm POP m_dwReturn[6 * TYPE long]; // 调用原始函数 GetAddress("LpkGetTextExtentExPoint")(); // 转跳到返回地址 __asm JMP m_dwReturn[6 * TYPE long]; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkInitialize(void) { // 保存返回地址 __asm POP m_dwReturn[7 * TYPE long]; // 调用原始函数 GetAddress("LpkInitialize")(); // 转跳到返回地址 __asm JMP m_dwReturn[7 * TYPE long]; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkPSMTextOut(void) { // 保存返回地址 __asm POP m_dwReturn[8 * TYPE long]; // 调用原始函数 GetAddress("LpkPSMTextOut")(); // 转跳到返回地址 __asm JMP m_dwReturn[8 * TYPE long]; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkUseGDIWidthCache(void) { // 保存返回地址 __asm POP m_dwReturn[9 * TYPE long]; // 调用原始函数 GetAddress("LpkUseGDIWidthCache")(); // 转跳到返回地址 __asm JMP m_dwReturn[9 * TYPE long]; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_ftsWordBreak(void) { // 保存返回地址 __asm POP m_dwReturn[10 * TYPE long]; // 调用原始函数 GetAddress("ftsWordBreak")(); // 转跳到返回地址 __asm JMP m_dwReturn[10 * TYPE long]; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 没有见到特殊处理呀 |
|
[下载]AheadLib修改版本
1、生成的.cpp可直接编译。 2、恢复导出函数。 3、加载DLL时,自动进行函数指针初始化。 4、当原dll有Noname函数,解决"__asm JMP pfn"错误。 大概是这样。其他懒得写了。 下载http://bbs.pediy.com/showthread.php?t=80903&highlight=AheadLib里的比对一下吧。 谢谢 |
|
[下载]AheadLib修改版本
贴个生成的lpk.cpp //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 头文件 #include <Windows.h> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 #pragma comment(linker, "/EXPORT:LpkInitialize=_AheadLib_LpkInitialize,@1") #pragma comment(linker, "/EXPORT:LpkTabbedTextOut=_AheadLib_LpkTabbedTextOut,@2") #pragma comment(linker, "/EXPORT:LpkDllInitialize=_AheadLib_LpkDllInitialize,@3") #pragma comment(linker, "/EXPORT:LpkDrawTextEx=_AheadLib_LpkDrawTextEx,@4") #pragma comment(linker, "/EXPORT:LpkEditControl=_AheadLib_LpkEditControl,@5") #pragma comment(linker, "/EXPORT:LpkExtTextOut=_AheadLib_LpkExtTextOut,@6") #pragma comment(linker, "/EXPORT:LpkGetCharacterPlacement=_AheadLib_LpkGetCharacterPlacement,@7") #pragma comment(linker, "/EXPORT:LpkGetTextExtentExPoint=_AheadLib_LpkGetTextExtentExPoint,@8") #pragma comment(linker, "/EXPORT:LpkPSMTextOut=_AheadLib_LpkPSMTextOut,@9") #pragma comment(linker, "/EXPORT:LpkUseGDIWidthCache=_AheadLib_LpkUseGDIWidthCache,@10") #pragma comment(linker, "/EXPORT:ftsWordBreak=_AheadLib_ftsWordBreak,@11") //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 原函数地址指针 PVOID pfnLpkInitialize; PVOID pfnLpkTabbedTextOut; PVOID pfnLpkDllInitialize; PVOID pfnLpkDrawTextEx; PVOID pfnLpkEditControl; PVOID pfnLpkExtTextOut; PVOID pfnLpkGetCharacterPlacement; PVOID pfnLpkGetTextExtentExPoint; PVOID pfnLpkPSMTextOut; PVOID pfnLpkUseGDIWidthCache; PVOID pfnftsWordBreak; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 宏定义 #define EXTERNC extern "C" #define NAKED __declspec(naked) #define EXPORT __declspec(dllexport) #define ALCPP EXPORT NAKED #define ALSTD EXTERNC EXPORT NAKED void __stdcall #define ALCFAST EXTERNC EXPORT NAKED void __fastcall #define ALCDECL EXTERNC NAKED void __cdecl //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // AheadLib 命名空间 namespace AheadLib { HMODULE m_hModule = NULL; // 原始模块句柄 DWORD m_dwReturn[11] = {0}; // 原始函数返回地址 // 获取原始函数地址 FARPROC WINAPI GetAddress(PCSTR pszProcName) { FARPROC fpAddress; CHAR szProcName[16]; TCHAR tzTemp[MAX_PATH]; fpAddress = GetProcAddress(m_hModule, pszProcName); if (fpAddress == NULL) { if (HIWORD(pszProcName) == 0) { wsprintf(szProcName, "%d", pszProcName); pszProcName = szProcName; } wsprintf(tzTemp, TEXT("无法找到函数 %hs,程序无法正常运行。"), pszProcName); MessageBox(NULL, tzTemp, TEXT("AheadLib"), MB_ICONSTOP); ExitProcess(-2); } return fpAddress; } // 初始化原始函数地址指针 inline VOID WINAPI InitializeAddresses() { pfnLpkInitialize = GetAddress("LpkInitialize"); pfnLpkTabbedTextOut = GetAddress("LpkTabbedTextOut"); pfnLpkDllInitialize = GetAddress("LpkDllInitialize"); pfnLpkDrawTextEx = GetAddress("LpkDrawTextEx"); pfnLpkEditControl = GetAddress("LpkEditControl"); pfnLpkExtTextOut = GetAddress("LpkExtTextOut"); pfnLpkGetCharacterPlacement = GetAddress("LpkGetCharacterPlacement"); pfnLpkGetTextExtentExPoint = GetAddress("LpkGetTextExtentExPoint"); pfnLpkPSMTextOut = GetAddress("LpkPSMTextOut"); pfnLpkUseGDIWidthCache = GetAddress("LpkUseGDIWidthCache"); pfnftsWordBreak = GetAddress("ftsWordBreak"); } // 加载原始模块 inline BOOL WINAPI Load() { TCHAR tzPath[MAX_PATH]; TCHAR tzTemp[MAX_PATH * 2]; GetSystemDirectory(tzPath, MAX_PATH); lstrcat(tzPath, TEXT("\\lpk.dll")); m_hModule = LoadLibrary(tzPath); if (m_hModule == NULL) { wsprintf(tzTemp, TEXT("无法加载 %s,程序无法正常运行。"), tzPath); MessageBox(NULL, tzTemp, TEXT("AheadLib"), MB_ICONSTOP); } else { InitializeAddresses(); } return (m_hModule != NULL); } // 释放原始模块 inline VOID WINAPI Free() { if (m_hModule) { FreeLibrary(m_hModule); } } } using namespace AheadLib; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 入口函数 BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, PVOID pvReserved) { if (dwReason == DLL_PROCESS_ATTACH) { DisableThreadLibraryCalls(hModule); return Load(); } else if (dwReason == DLL_PROCESS_DETACH) { Free(); } return TRUE; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkInitialize(void) { __asm JMP pfnLpkInitialize; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkTabbedTextOut(void) { __asm JMP pfnLpkTabbedTextOut; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkDllInitialize(void) { __asm JMP pfnLpkDllInitialize; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkDrawTextEx(void) { __asm JMP pfnLpkDrawTextEx; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkEditControl(void) { __asm JMP pfnLpkEditControl; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkExtTextOut(void) { __asm JMP pfnLpkExtTextOut; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkGetCharacterPlacement(void) { __asm JMP pfnLpkGetCharacterPlacement; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkGetTextExtentExPoint(void) { __asm JMP pfnLpkGetTextExtentExPoint; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkPSMTextOut(void) { __asm JMP pfnLpkPSMTextOut; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_LpkUseGDIWidthCache(void) { __asm JMP pfnLpkUseGDIWidthCache; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 导出函数 ALCDECL AheadLib_ftsWordBreak(void) { __asm JMP pfnftsWordBreak; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
|
|
|
Detours X86/X64 钩子库下载,推进X64位下安全技术发展
yshingo@163.com。 哪位下载到的传个。 谢谢! |
|
[原创]MHOOK中跳板复用bug分析
沉下去了 |
|
[求助]Sentinel RMS 8.5.3
哪能下载SLM Vendor ID Patcher 呢? |
|
|
|
[分享]公开RedScissorTools两个小工具软件的源码,祝新年快乐!
FileTime忘了打包源码吧。 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值