- UID
- 76030
注册时间2014-6-5
阅读权限30
最后登录1970-1-1
龙战于野
TA的每日心情 | 慵懒 2015-8-14 00:08 |
---|
签到天数: 25 天 [LV.4]偶尔看看III
|
本帖最后由 crackvip 于 2015-6-28 00:13 编辑
参考
https://www.chinapyg.com/thread-74566-1-1.html
写了一个winmm.dll的代码
码上来,供大家测试
- // 头文件
- #include <windows.h>
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // 导出函数
- #pragma comment(linker, "/EXPORT:CloseDriver=ChinaPYG_CloseDriver")
- #pragma comment(linker, "/EXPORT:DefDriverProc=ChinaPYG_DefDriverProc")
- #pragma comment(linker, "/EXPORT:DriverCallback=ChinaPYG_DriverCallback")
- #pragma comment(linker, "/EXPORT:DrvGetModuleHandle=ChinaPYG_DrvGetModuleHandle")
- #pragma comment(linker, "/EXPORT:GetDriverModuleHandle=ChinaPYG_GetDriverModuleHandle")
- #pragma comment(linker, "/EXPORT:NotifyCallbackData=ChinaPYG_NotifyCallbackData")
- #pragma comment(linker, "/EXPORT:OpenDriver=ChinaPYG_OpenDriver")
- #pragma comment(linker, "/EXPORT:PlaySound=ChinaPYG_PlaySound")
- #pragma comment(linker, "/EXPORT:PlaySoundA=ChinaPYG_PlaySoundA")
- #pragma comment(linker, "/EXPORT:PlaySoundW=ChinaPYG_PlaySoundW")
- #pragma comment(linker, "/EXPORT:SendDriverMessage=ChinaPYG_SendDriverMessage")
- #pragma comment(linker, "/EXPORT:WOW32DriverCallback=ChinaPYG_WOW32DriverCallback")
- #pragma comment(linker, "/EXPORT:WOW32ResolveMultiMediaHandle=ChinaPYG_WOW32ResolveMultiMediaHandle")
- #pragma comment(linker, "/EXPORT:WOWAppExit=ChinaPYG_WOWAppExit")
- #pragma comment(linker, "/EXPORT:aux32Message=ChinaPYG_aux32Message")
- #pragma comment(linker, "/EXPORT:auxGetDevCapsA=ChinaPYG_auxGetDevCapsA")
- #pragma comment(linker, "/EXPORT:auxGetDevCapsW=ChinaPYG_auxGetDevCapsW")
- #pragma comment(linker, "/EXPORT:auxGetNumDevs=ChinaPYG_auxGetNumDevs")
- #pragma comment(linker, "/EXPORT:auxGetVolume=ChinaPYG_auxGetVolume")
- #pragma comment(linker, "/EXPORT:auxOutMessage=ChinaPYG_auxOutMessage")
- #pragma comment(linker, "/EXPORT:auxSetVolume=ChinaPYG_auxSetVolume")
- #pragma comment(linker, "/EXPORT:joy32Message=ChinaPYG_joy32Message")
- #pragma comment(linker, "/EXPORT:joyConfigChanged=ChinaPYG_joyConfigChanged")
- #pragma comment(linker, "/EXPORT:joyGetDevCapsA=ChinaPYG_joyGetDevCapsA")
- #pragma comment(linker, "/EXPORT:joyGetDevCapsW=ChinaPYG_joyGetDevCapsW")
- #pragma comment(linker, "/EXPORT:joyGetNumDevs=ChinaPYG_joyGetNumDevs")
- #pragma comment(linker, "/EXPORT:joyGetPos=ChinaPYG_joyGetPos")
- #pragma comment(linker, "/EXPORT:joyGetPosEx=ChinaPYG_joyGetPosEx")
- #pragma comment(linker, "/EXPORT:joyGetThreshold=ChinaPYG_joyGetThreshold")
- #pragma comment(linker, "/EXPORT:joyReleaseCapture=ChinaPYG_joyReleaseCapture")
- #pragma comment(linker, "/EXPORT:joySetCapture=ChinaPYG_joySetCapture")
- #pragma comment(linker, "/EXPORT:joySetThreshold=ChinaPYG_joySetThreshold")
- #pragma comment(linker, "/EXPORT:mci32Message=ChinaPYG_mci32Message")
- #pragma comment(linker, "/EXPORT:mciDriverNotify=ChinaPYG_mciDriverNotify")
- #pragma comment(linker, "/EXPORT:mciDriverYield=ChinaPYG_mciDriverYield")
- #pragma comment(linker, "/EXPORT:mciExecute=ChinaPYG_mciExecute")
- #pragma comment(linker, "/EXPORT:mciFreeCommandResource=ChinaPYG_mciFreeCommandResource")
- #pragma comment(linker, "/EXPORT:mciGetCreatorTask=ChinaPYG_mciGetCreatorTask")
- #pragma comment(linker, "/EXPORT:mciGetDeviceIDA=ChinaPYG_mciGetDeviceIDA")
- #pragma comment(linker, "/EXPORT:mciGetDeviceIDFromElementIDA=ChinaPYG_mciGetDeviceIDFromElementIDA")
- #pragma comment(linker, "/EXPORT:mciGetDeviceIDFromElementIDW=ChinaPYG_mciGetDeviceIDFromElementIDW")
- #pragma comment(linker, "/EXPORT:mciGetDeviceIDW=ChinaPYG_mciGetDeviceIDW")
- #pragma comment(linker, "/EXPORT:mciGetDriverData=ChinaPYG_mciGetDriverData")
- #pragma comment(linker, "/EXPORT:mciGetErrorStringA=ChinaPYG_mciGetErrorStringA")
- #pragma comment(linker, "/EXPORT:mciGetErrorStringW=ChinaPYG_mciGetErrorStringW")
- #pragma comment(linker, "/EXPORT:mciGetYieldProc=ChinaPYG_mciGetYieldProc")
- #pragma comment(linker, "/EXPORT:mciLoadCommandResource=ChinaPYG_mciLoadCommandResource")
- #pragma comment(linker, "/EXPORT:mciSendCommandA=ChinaPYG_mciSendCommandA")
- #pragma comment(linker, "/EXPORT:mciSendCommandW=ChinaPYG_mciSendCommandW")
- #pragma comment(linker, "/EXPORT:mciSendStringA=ChinaPYG_mciSendStringA")
- #pragma comment(linker, "/EXPORT:mciSendStringW=ChinaPYG_mciSendStringW")
- #pragma comment(linker, "/EXPORT:mciSetDriverData=ChinaPYG_mciSetDriverData")
- #pragma comment(linker, "/EXPORT:mciSetYieldProc=ChinaPYG_mciSetYieldProc")
- #pragma comment(linker, "/EXPORT:mid32Message=ChinaPYG_mid32Message")
- #pragma comment(linker, "/EXPORT:midiConnect=ChinaPYG_midiConnect")
- #pragma comment(linker, "/EXPORT:midiDisconnect=ChinaPYG_midiDisconnect")
- #pragma comment(linker, "/EXPORT:midiInAddBuffer=ChinaPYG_midiInAddBuffer")
- #pragma comment(linker, "/EXPORT:midiInClose=ChinaPYG_midiInClose")
- #pragma comment(linker, "/EXPORT:midiInGetDevCapsA=ChinaPYG_midiInGetDevCapsA")
- #pragma comment(linker, "/EXPORT:midiInGetDevCapsW=ChinaPYG_midiInGetDevCapsW")
- #pragma comment(linker, "/EXPORT:midiInGetErrorTextA=ChinaPYG_midiInGetErrorTextA")
- #pragma comment(linker, "/EXPORT:midiInGetErrorTextW=ChinaPYG_midiInGetErrorTextW")
- #pragma comment(linker, "/EXPORT:midiInGetID=ChinaPYG_midiInGetID")
- #pragma comment(linker, "/EXPORT:midiInGetNumDevs=ChinaPYG_midiInGetNumDevs")
- #pragma comment(linker, "/EXPORT:midiInMessage=ChinaPYG_midiInMessage")
- #pragma comment(linker, "/EXPORT:midiInOpen=ChinaPYG_midiInOpen")
- #pragma comment(linker, "/EXPORT:midiInPrepareHeader=ChinaPYG_midiInPrepareHeader")
- #pragma comment(linker, "/EXPORT:midiInReset=ChinaPYG_midiInReset")
- #pragma comment(linker, "/EXPORT:midiInStart=ChinaPYG_midiInStart")
- #pragma comment(linker, "/EXPORT:midiInStop=ChinaPYG_midiInStop")
- #pragma comment(linker, "/EXPORT:midiInUnprepareHeader=ChinaPYG_midiInUnprepareHeader")
- #pragma comment(linker, "/EXPORT:midiOutCacheDrumPatches=ChinaPYG_midiOutCacheDrumPatches")
- #pragma comment(linker, "/EXPORT:midiOutCachePatches=ChinaPYG_midiOutCachePatches")
- #pragma comment(linker, "/EXPORT:midiOutClose=ChinaPYG_midiOutClose")
- #pragma comment(linker, "/EXPORT:midiOutGetDevCapsA=ChinaPYG_midiOutGetDevCapsA")
- #pragma comment(linker, "/EXPORT:midiOutGetDevCapsW=ChinaPYG_midiOutGetDevCapsW")
- #pragma comment(linker, "/EXPORT:midiOutGetErrorTextA=ChinaPYG_midiOutGetErrorTextA")
- #pragma comment(linker, "/EXPORT:midiOutGetErrorTextW=ChinaPYG_midiOutGetErrorTextW")
- #pragma comment(linker, "/EXPORT:midiOutGetID=ChinaPYG_midiOutGetID")
- #pragma comment(linker, "/EXPORT:midiOutGetNumDevs=ChinaPYG_midiOutGetNumDevs")
- #pragma comment(linker, "/EXPORT:midiOutGetVolume=ChinaPYG_midiOutGetVolume")
- #pragma comment(linker, "/EXPORT:midiOutLongMsg=ChinaPYG_midiOutLongMsg")
- #pragma comment(linker, "/EXPORT:midiOutMessage=ChinaPYG_midiOutMessage")
- #pragma comment(linker, "/EXPORT:midiOutOpen=ChinaPYG_midiOutOpen")
- #pragma comment(linker, "/EXPORT:midiOutPrepareHeader=ChinaPYG_midiOutPrepareHeader")
- #pragma comment(linker, "/EXPORT:midiOutReset=ChinaPYG_midiOutReset")
- #pragma comment(linker, "/EXPORT:midiOutSetVolume=ChinaPYG_midiOutSetVolume")
- #pragma comment(linker, "/EXPORT:midiOutShortMsg=ChinaPYG_midiOutShortMsg")
- #pragma comment(linker, "/EXPORT:midiOutUnprepareHeader=ChinaPYG_midiOutUnprepareHeader")
- #pragma comment(linker, "/EXPORT:midiStreamClose=ChinaPYG_midiStreamClose")
- #pragma comment(linker, "/EXPORT:midiStreamOpen=ChinaPYG_midiStreamOpen")
- #pragma comment(linker, "/EXPORT:midiStreamOut=ChinaPYG_midiStreamOut")
- #pragma comment(linker, "/EXPORT:midiStreamPause=ChinaPYG_midiStreamPause")
- #pragma comment(linker, "/EXPORT:midiStreamPosition=ChinaPYG_midiStreamPosition")
- #pragma comment(linker, "/EXPORT:midiStreamProperty=ChinaPYG_midiStreamProperty")
- #pragma comment(linker, "/EXPORT:midiStreamRestart=ChinaPYG_midiStreamRestart")
- #pragma comment(linker, "/EXPORT:midiStreamStop=ChinaPYG_midiStreamStop")
- #pragma comment(linker, "/EXPORT:mixerClose=ChinaPYG_mixerClose")
- #pragma comment(linker, "/EXPORT:mixerGetControlDetailsA=ChinaPYG_mixerGetControlDetailsA")
- #pragma comment(linker, "/EXPORT:mixerGetControlDetailsW=ChinaPYG_mixerGetControlDetailsW")
- #pragma comment(linker, "/EXPORT:mixerGetDevCapsA=ChinaPYG_mixerGetDevCapsA")
- #pragma comment(linker, "/EXPORT:mixerGetDevCapsW=ChinaPYG_mixerGetDevCapsW")
- #pragma comment(linker, "/EXPORT:mixerGetID=ChinaPYG_mixerGetID")
- #pragma comment(linker, "/EXPORT:mixerGetLineControlsA=ChinaPYG_mixerGetLineControlsA")
- #pragma comment(linker, "/EXPORT:mixerGetLineControlsW=ChinaPYG_mixerGetLineControlsW")
- #pragma comment(linker, "/EXPORT:mixerGetLineInfoA=ChinaPYG_mixerGetLineInfoA")
- #pragma comment(linker, "/EXPORT:mixerGetLineInfoW=ChinaPYG_mixerGetLineInfoW")
- #pragma comment(linker, "/EXPORT:mixerGetNumDevs=ChinaPYG_mixerGetNumDevs")
- #pragma comment(linker, "/EXPORT:mixerMessage=ChinaPYG_mixerMessage")
- #pragma comment(linker, "/EXPORT:mixerOpen=ChinaPYG_mixerOpen")
- #pragma comment(linker, "/EXPORT:mixerSetControlDetails=ChinaPYG_mixerSetControlDetails")
- #pragma comment(linker, "/EXPORT:mmDrvInstall=ChinaPYG_mmDrvInstall")
- #pragma comment(linker, "/EXPORT:mmGetCurrentTask=ChinaPYG_mmGetCurrentTask")
- #pragma comment(linker, "/EXPORT:mmTaskBlock=ChinaPYG_mmTaskBlock")
- #pragma comment(linker, "/EXPORT:mmTaskCreate=ChinaPYG_mmTaskCreate")
- #pragma comment(linker, "/EXPORT:mmTaskSignal=ChinaPYG_mmTaskSignal")
- #pragma comment(linker, "/EXPORT:mmTaskYield=ChinaPYG_mmTaskYield")
- #pragma comment(linker, "/EXPORT:mmioAdvance=ChinaPYG_mmioAdvance")
- #pragma comment(linker, "/EXPORT:mmioAscend=ChinaPYG_mmioAscend")
- #pragma comment(linker, "/EXPORT:mmioClose=ChinaPYG_mmioClose")
- #pragma comment(linker, "/EXPORT:mmioCreateChunk=ChinaPYG_mmioCreateChunk")
- #pragma comment(linker, "/EXPORT:mmioDescend=ChinaPYG_mmioDescend")
- #pragma comment(linker, "/EXPORT:mmioFlush=ChinaPYG_mmioFlush")
- #pragma comment(linker, "/EXPORT:mmioGetInfo=ChinaPYG_mmioGetInfo")
- #pragma comment(linker, "/EXPORT:mmioInstallIOProcA=ChinaPYG_mmioInstallIOProcA")
- #pragma comment(linker, "/EXPORT:mmioInstallIOProcW=ChinaPYG_mmioInstallIOProcW")
- #pragma comment(linker, "/EXPORT:mmioOpenA=ChinaPYG_mmioOpenA")
- #pragma comment(linker, "/EXPORT:mmioOpenW=ChinaPYG_mmioOpenW")
- #pragma comment(linker, "/EXPORT:mmioRead=ChinaPYG_mmioRead")
- #pragma comment(linker, "/EXPORT:mmioRenameA=ChinaPYG_mmioRenameA")
- #pragma comment(linker, "/EXPORT:mmioRenameW=ChinaPYG_mmioRenameW")
- #pragma comment(linker, "/EXPORT:mmiOSeek=ChinaPYG_mmioSeek")
- #pragma comment(linker, "/EXPORT:mmioSendMessage=ChinaPYG_mmioSendMessage")
- #pragma comment(linker, "/EXPORT:mmioSetBuffer=ChinaPYG_mmioSetBuffer")
- #pragma comment(linker, "/EXPORT:mmioSetInfo=ChinaPYG_mmioSetInfo")
- #pragma comment(linker, "/EXPORT:mmioStringToFOURCCA=ChinaPYG_mmioStringToFOURCCA")
- #pragma comment(linker, "/EXPORT:mmioStringToFOURCCW=ChinaPYG_mmioStringToFOURCCW")
- #pragma comment(linker, "/EXPORT:mmioWrite=ChinaPYG_mmioWrite")
- #pragma comment(linker, "/EXPORT:mmsystemGetVersion=ChinaPYG_mmsystemGetVersion")
- #pragma comment(linker, "/EXPORT:mod32Message=ChinaPYG_mod32Message")
- #pragma comment(linker, "/EXPORT:mxd32Message=ChinaPYG_mxd32Message")
- #pragma comment(linker, "/EXPORT:sndPlaySoundA=ChinaPYG_sndPlaySoundA")
- #pragma comment(linker, "/EXPORT:sndPlaySoundW=ChinaPYG_sndPlaySoundW")
- #pragma comment(linker, "/EXPORT:tid32Message=ChinaPYG_tid32Message")
- #pragma comment(linker, "/EXPORT:timeBeginPeriod=ChinaPYG_timeBeginPeriod")
- #pragma comment(linker, "/EXPORT:timeEndPeriod=ChinaPYG_timeEndPeriod")
- #pragma comment(linker, "/EXPORT:timeGetDevCaps=ChinaPYG_timeGetDevCaps")
- #pragma comment(linker, "/EXPORT:timeGetSystemTime=ChinaPYG_timeGetSystemTime")
- #pragma comment(linker, "/EXPORT:timeGetTime=ChinaPYG_timeGetTime")
- #pragma comment(linker, "/EXPORT:timeKillEvent=ChinaPYG_timeKillEvent")
- #pragma comment(linker, "/EXPORT:timeSetEvent=ChinaPYG_timeSetEvent")
- #pragma comment(linker, "/EXPORT:waveInAddBuffer=ChinaPYG_waveInAddBuffer")
- #pragma comment(linker, "/EXPORT:waveInClose=ChinaPYG_waveInClose")
- #pragma comment(linker, "/EXPORT:waveInGetDevCapsA=ChinaPYG_waveInGetDevCapsA")
- #pragma comment(linker, "/EXPORT:waveInGetDevCapsW=ChinaPYG_waveInGetDevCapsW")
- #pragma comment(linker, "/EXPORT:waveInGetErrorTextA=ChinaPYG_waveInGetErrorTextA")
- #pragma comment(linker, "/EXPORT:waveInGetErrorTextW=ChinaPYG_waveInGetErrorTextW")
- #pragma comment(linker, "/EXPORT:waveInGetID=ChinaPYG_waveInGetID")
- #pragma comment(linker, "/EXPORT:waveInGetNumDevs=ChinaPYG_waveInGetNumDevs")
- #pragma comment(linker, "/EXPORT:waveInGetPosition=ChinaPYG_waveInGetPosition")
- #pragma comment(linker, "/EXPORT:waveInMessage=ChinaPYG_waveInMessage")
- #pragma comment(linker, "/EXPORT:waveInOpen=ChinaPYG_waveInOpen")
- #pragma comment(linker, "/EXPORT:waveInPrepareHeader=ChinaPYG_waveInPrepareHeader")
- #pragma comment(linker, "/EXPORT:waveInReset=ChinaPYG_waveInReset")
- #pragma comment(linker, "/EXPORT:waveInStart=ChinaPYG_waveInStart")
- #pragma comment(linker, "/EXPORT:waveInStop=ChinaPYG_waveInStop")
- #pragma comment(linker, "/EXPORT:waveInUnprepareHeader=ChinaPYG_waveInUnprepareHeader")
- #pragma comment(linker, "/EXPORT:waveOutBreakLoop=ChinaPYG_waveOutBreakLoop")
- #pragma comment(linker, "/EXPORT:waveOutClose=ChinaPYG_waveOutClose")
- #pragma comment(linker, "/EXPORT:waveOutGetDevCapsA=ChinaPYG_waveOutGetDevCapsA")
- #pragma comment(linker, "/EXPORT:waveOutGetDevCapsW=ChinaPYG_waveOutGetDevCapsW")
- #pragma comment(linker, "/EXPORT:waveOutGetErrorTextA=ChinaPYG_waveOutGetErrorTextA")
- #pragma comment(linker, "/EXPORT:waveOutGetErrorTextW=ChinaPYG_waveOutGetErrorTextW")
- #pragma comment(linker, "/EXPORT:waveOutGetID=ChinaPYG_waveOutGetID")
- #pragma comment(linker, "/EXPORT:waveOutGetNumDevs=ChinaPYG_waveOutGetNumDevs")
- #pragma comment(linker, "/EXPORT:waveOutGetPitch=ChinaPYG_waveOutGetPitch")
- #pragma comment(linker, "/EXPORT:waveOutGetPlaybackRate=ChinaPYG_waveOutGetPlaybackRate")
- #pragma comment(linker, "/EXPORT:waveOutGetPosition=ChinaPYG_waveOutGetPosition")
- #pragma comment(linker, "/EXPORT:waveOutGetVolume=ChinaPYG_waveOutGetVolume")
- #pragma comment(linker, "/EXPORT:waveOutMessage=ChinaPYG_waveOutMessage")
- #pragma comment(linker, "/EXPORT:waveOutOpen=ChinaPYG_waveOutOpen")
- #pragma comment(linker, "/EXPORT:waveOutPause=ChinaPYG_waveOutPause")
- #pragma comment(linker, "/EXPORT:waveOutPrepareHeader=ChinaPYG_waveOutPrepareHeader")
- #pragma comment(linker, "/EXPORT:waveOutReset=ChinaPYG_waveOutReset")
- #pragma comment(linker, "/EXPORT:waveOutRestart=ChinaPYG_waveOutRestart")
- #pragma comment(linker, "/EXPORT:waveOutSetPitch=ChinaPYG_waveOutSetPitch")
- #pragma comment(linker, "/EXPORT:waveOutSetPlaybackRate=ChinaPYG_waveOutSetPlaybackRate")
- #pragma comment(linker, "/EXPORT:waveOutSetVolume=ChinaPYG_waveOutSetVolume")
- #pragma comment(linker, "/EXPORT:waveOutUnprepareHeader=ChinaPYG_waveOutUnprepareHeader")
- #pragma comment(linker, "/EXPORT:waveOutWrite=ChinaPYG_waveOutWrite")
- #pragma comment(linker, "/EXPORT:wid32Message=ChinaPYG_wid32Message")
- #pragma comment(linker, "/EXPORT:wod32Message=ChinaPYG_wod32Message")
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // 宏定义
- #define EXTERNC extern "C"
- #define ALSTD EXTERNC void __stdcall
- #define ALCDECL EXTERNC void __cdecl
- #define LOAD_ERROR TEXT("无法加载 %s,程序无法正常运行。")
- #define FUN_ERROR TEXT("无法找到函数 %hs,程序无法正常运行。")
- #define APPNAME TEXT("\\falcwav_64.exe")
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // 汇编函数声明
- ALSTD JmpAddr(INT64 _addr);
- ALSTD PatchBYTE(INT64 addr, byte data);
- ALSTD PatchWORD(INT64 addr, WORD data);
- ALSTD PatchDWORD(INT64 addr, DWORD data);
- ALSTD PatchQWORD(INT64 addr, INT64 data);
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // ChinaPYG 命名空间
- namespace ChinaPYG
- {
- HMODULE m_hModule = NULL; // 原始模块句柄
- DWORD m_dwReturn[5] = {0}; // 原始函数返回地址
- // 加载原始模块
- inline BOOL WINAPI Load()
- {
- TCHAR tzPath[MAX_PATH];
- TCHAR tzTemp[MAX_PATH * 2];
- GetSystemDirectory(tzPath, MAX_PATH);
- lstrcat(tzPath, TEXT("\\winmm.dll"));
- m_hModule = LoadLibrary(tzPath);
- if (m_hModule == NULL)
- {
- wsprintf(tzTemp, LOAD_ERROR, tzPath);
- MessageBox(NULL, tzTemp, TEXT("提示"), 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];
- if (m_hModule == NULL)
- {
- if (Load() == FALSE)
- {
- ExitProcess(-1);
- }
- }
- fpAddress = GetProcAddress(m_hModule, pszProcName);
- if (fpAddress == NULL)
- {
- if (HIWORD(pszProcName) == 0)
- {
- wsprintf(szProcName, "%d", pszProcName);
- pszProcName = szProcName;
- }
- wsprintf(tzTemp, FUN_ERROR, pszProcName);
- MessageBox(NULL, tzTemp,TEXT("错误"), MB_ICONSTOP);
- ExitProcess(-2);
- }
- return fpAddress;
- }
- }
- using namespace ChinaPYG;
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- void PatchIt()
- {
- // 写自己的Patch代码
- DWORD dwOldProtect;
- HMODULE BaseAddr;
- PVOID pAddr = NULL;
- INT64 PatchAddr;
- TCHAR szFileName[MAX_PATH] = { 0 };
- TCHAR szCrackVip[MAX_PATH] = { 0 };
- INT64 hLibrary = 0;
- hLibrary = ::GetModuleFileName(NULL, szFileName, MAX_PATH);
- if (hLibrary != NULL)
- {
- ::OutputDebugString(TEXT("GetModuleFileName 成功"));
- wsprintf(szCrackVip,TEXT("程序地址:%s"),szFileName);
- ::OutputDebugString(szCrackVip);
- #ifdef _UNICODE
- pAddr = wcsstr(szFileName, APPNAME);
- #else
- pAddr = strstr(szFileName, APPNAME);
- #endif //_UNICODE
- if (pAddr!= NULL)
- {
- ::OutputDebugString(TEXT("程序匹配成功!"));
- BaseAddr = GetModuleHandle(NULL);
- wsprintf(szCrackVip, TEXT("程序基址:%.16X"), (INT64)BaseAddr);
- ::OutputDebugString(szCrackVip);
-
- PatchAddr = (INT64)BaseAddr + 0x63C9;//patch地址
- wsprintf(szCrackVip, TEXT("补丁地址:%.16X"), (INT64)PatchAddr);
- ::OutputDebugString(szCrackVip);
- VirtualProtect((LPVOID)PatchAddr, 0x1000, PAGE_EXECUTE_READWRITE, &dwOldProtect);
- PatchBYTE(PatchAddr, 0x00);
- //PatchBYTE(IPatchAddr, 0x90);
- //PatchWORD(PatchAddr, 0x9090);
- //PatchDWORD(PatchAddr, 0x90909090);
- //PatchQWORD(PatchAddr, 0x9090909090909090);
- }
-
- //VirtualProtect((LPVOID)PatchAddr, 4, PAGE_EXECUTE_READWRITE, &dwOldProtect);
- //*(PWORD)PatchAddr = 0x9090;
- //PatchWORD(PatchAddr, 0x9090);
- }
- }
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // 入口函数
- BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, PVOID pvReserved)
- {
- switch (dwReason)
- {
- case DLL_PROCESS_ATTACH:
- {
- DisableThreadLibraryCalls(hModule);
- if(Load())
- {
- PatchIt();
- }
- else
- return FALSE;
- break;
- }
- case DLL_PROCESS_DETACH:
- {
- Free();
- break;
- }
- }
- return TRUE;
- }
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- ALCDECL ChinaPYG_CloseDriver(void)
- {
- JmpAddr((INT64)GetAddress("CloseDriver"));
- }
- ALCDECL ChinaPYG_DefDriverProc(void)
- {
- JmpAddr((INT64)GetAddress("DefDriverProc"));
- }
- ALCDECL ChinaPYG_DriverCallback(void)
- {
- JmpAddr((INT64)GetAddress("DriverCallback"));
- }
- ALCDECL ChinaPYG_DrvGetModuleHandle(void)
- {
- JmpAddr((INT64)GetAddress("DrvGetModuleHandle"));
- }
- ALCDECL ChinaPYG_GetDriverModuleHandle(void)
- {
- JmpAddr((INT64)GetAddress("GetDriverModuleHandle"));
- }
- ALCDECL ChinaPYG_NotifyCallbackData(void)
- {
- JmpAddr((INT64)GetAddress("NotifyCallbackData"));
- }
- ALCDECL ChinaPYG_OpenDriver(void)
- {
- JmpAddr((INT64)GetAddress("OpenDriver"));
- }
- ALCDECL ChinaPYG_PlaySound(void)
- {
- JmpAddr((INT64)GetAddress("PlaySound"));
- }
- ALCDECL ChinaPYG_PlaySoundA(void)
- {
- JmpAddr((INT64)GetAddress("PlaySoundA"));
- }
- ALCDECL ChinaPYG_PlaySoundW(void)
- {
- JmpAddr((INT64)GetAddress("PlaySoundW"));
- }
- ALCDECL ChinaPYG_SendDriverMessage(void)
- {
- JmpAddr((INT64)GetAddress("SendDriverMessage"));
- }
- ALCDECL ChinaPYG_WOW32DriverCallback(void)
- {
- JmpAddr((INT64)GetAddress("WOW32DriverCallback"));
- }
- ALCDECL ChinaPYG_WOW32ResolveMultiMediaHandle(void)
- {
- JmpAddr((INT64)GetAddress("WOW32ResolveMultiMediaHandle"));
- }
- ALCDECL ChinaPYG_WOWAppExit(void)
- {
- JmpAddr((INT64)GetAddress("WOWAppExit"));
- }
- ALCDECL ChinaPYG_aux32Message(void)
- {
- JmpAddr((INT64)GetAddress("aux32Message"));
- }
- ALCDECL ChinaPYG_auxGetDevCapsA(void)
- {
- JmpAddr((INT64)GetAddress("auxGetDevCapsA"));
- }
- ALCDECL ChinaPYG_auxGetDevCapsW(void)
- {
- JmpAddr((INT64)GetAddress("auxGetDevCapsW"));
- }
- ALCDECL ChinaPYG_auxGetNumDevs(void)
- {
- JmpAddr((INT64)GetAddress("auxGetNumDevs"));
- }
- ALCDECL ChinaPYG_auxGetVolume(void)
- {
- JmpAddr((INT64)GetAddress("auxGetVolume"));
- }
- ALCDECL ChinaPYG_auxOutMessage(void)
- {
- JmpAddr((INT64)GetAddress("auxOutMessage"));
- }
- ALCDECL ChinaPYG_auxSetVolume(void)
- {
- JmpAddr((INT64)GetAddress("auxSetVolume"));
- }
- ALCDECL ChinaPYG_joy32Message(void)
- {
- JmpAddr((INT64)GetAddress("joy32Message"));
- }
- ALCDECL ChinaPYG_joyConfigChanged(void)
- {
- JmpAddr((INT64)GetAddress("joyConfigChanged"));
- }
- ALCDECL ChinaPYG_joyGetDevCapsA(void)
- {
- JmpAddr((INT64)GetAddress("joyGetDevCapsA"));
- }
- ALCDECL ChinaPYG_joyGetDevCapsW(void)
- {
- JmpAddr((INT64)GetAddress("joyGetDevCapsW"));
- }
- ALCDECL ChinaPYG_joyGetNumDevs(void)
- {
- JmpAddr((INT64)GetAddress("joyGetNumDevs"));
- }
- ALCDECL ChinaPYG_joyGetPos(void)
- {
- JmpAddr((INT64)GetAddress("joyGetPos"));
- }
- ALCDECL ChinaPYG_joyGetPosEx(void)
- {
- JmpAddr((INT64)GetAddress("joyGetPosEx"));
- }
- ALCDECL ChinaPYG_joyGetThreshold(void)
- {
- JmpAddr((INT64)GetAddress("joyGetThreshold"));
- }
- ALCDECL ChinaPYG_joyReleaseCapture(void)
- {
- JmpAddr((INT64)GetAddress("joyReleaseCapture"));
- }
- ALCDECL ChinaPYG_joySetCapture(void)
- {
- JmpAddr((INT64)GetAddress("joySetCapture"));
- }
- ALCDECL ChinaPYG_joySetThreshold(void)
- {
- JmpAddr((INT64)GetAddress("joySetThreshold"));
- }
- ALCDECL ChinaPYG_mci32Message(void)
- {
- JmpAddr((INT64)GetAddress("mci32Message"));
- }
- ALCDECL ChinaPYG_mciDriverNotify(void)
- {
- JmpAddr((INT64)GetAddress("mciDriverNotify"));
- }
- ALCDECL ChinaPYG_mciDriverYield(void)
- {
- JmpAddr((INT64)GetAddress("mciDriverYield"));
- }
- ALCDECL ChinaPYG_mciExecute(void)
- {
- JmpAddr((INT64)GetAddress("mciExecute"));
- }
- ALCDECL ChinaPYG_mciFreeCommandResource(void)
- {
- JmpAddr((INT64)GetAddress("mciFreeCommandResource"));
- }
- ALCDECL ChinaPYG_mciGetCreatorTask(void)
- {
- JmpAddr((INT64)GetAddress("mciGetCreatorTask"));
- }
- ALCDECL ChinaPYG_mciGetDeviceIDA(void)
- {
- JmpAddr((INT64)GetAddress("mciGetDeviceIDA"));
- }
- ALCDECL ChinaPYG_mciGetDeviceIDFromElementIDA(void)
- {
- JmpAddr((INT64)GetAddress("mciGetDeviceIDFromElementIDA"));
- }
- ALCDECL ChinaPYG_mciGetDeviceIDFromElementIDW(void)
- {
- JmpAddr((INT64)GetAddress("mciGetDeviceIDFromElementIDW"));
- }
- ALCDECL ChinaPYG_mciGetDeviceIDW(void)
- {
- JmpAddr((INT64)GetAddress("mciGetDeviceIDW"));
- }
- ALCDECL ChinaPYG_mciGetDriverData(void)
- {
- JmpAddr((INT64)GetAddress("mciGetDriverData"));
- }
- ALCDECL ChinaPYG_mciGetErrorStringA(void)
- {
- JmpAddr((INT64)GetAddress("mciGetErrorStringA"));
- }
- ALCDECL ChinaPYG_mciGetErrorStringW(void)
- {
- JmpAddr((INT64)GetAddress("mciGetErrorStringW"));
- }
- ALCDECL ChinaPYG_mciGetYieldProc(void)
- {
- JmpAddr((INT64)GetAddress("mciGetYieldProc"));
- }
- ALCDECL ChinaPYG_mciLoadCommandResource(void)
- {
- JmpAddr((INT64)GetAddress("mciLoadCommandResource"));
- }
- ALCDECL ChinaPYG_mciSendCommandA(void)
- {
- JmpAddr((INT64)GetAddress("mciSendCommandA"));
- }
- ALCDECL ChinaPYG_mciSendCommandW(void)
- {
- JmpAddr((INT64)GetAddress("mciSendCommandW"));
- }
- ALCDECL ChinaPYG_mciSendStringA(void)
- {
- JmpAddr((INT64)GetAddress("mciSendStringA"));
- }
- ALCDECL ChinaPYG_mciSendStringW(void)
- {
- JmpAddr((INT64)GetAddress("mciSendStringW"));
- }
- ALCDECL ChinaPYG_mciSetDriverData(void)
- {
- JmpAddr((INT64)GetAddress("mciSetDriverData"));
- }
- ALCDECL ChinaPYG_mciSetYieldProc(void)
- {
- JmpAddr((INT64)GetAddress("mciSetYieldProc"));
- }
- ALCDECL ChinaPYG_mid32Message(void)
- {
- JmpAddr((INT64)GetAddress("mid32Message"));
- }
- ALCDECL ChinaPYG_midiConnect(void)
- {
- JmpAddr((INT64)GetAddress("midiConnect"));
- }
- ALCDECL ChinaPYG_midiDisconnect(void)
- {
- JmpAddr((INT64)GetAddress("midiDisconnect"));
- }
- ALCDECL ChinaPYG_midiInAddBuffer(void)
- {
- JmpAddr((INT64)GetAddress("midiInAddBuffer"));
- }
- ALCDECL ChinaPYG_midiInClose(void)
- {
- JmpAddr((INT64)GetAddress("midiInClose"));
- }
- ALCDECL ChinaPYG_midiInGetDevCapsA(void)
- {
- JmpAddr((INT64)GetAddress("midiInGetDevCapsA"));
- }
- ALCDECL ChinaPYG_midiInGetDevCapsW(void)
- {
- JmpAddr((INT64)GetAddress("midiInGetDevCapsW"));
- }
- ALCDECL ChinaPYG_midiInGetErrorTextA(void)
- {
- JmpAddr((INT64)GetAddress("midiInGetErrorTextA"));
- }
- ALCDECL ChinaPYG_midiInGetErrorTextW(void)
- {
- JmpAddr((INT64)GetAddress("midiInGetErrorTextW"));
- }
- ALCDECL ChinaPYG_midiInGetID(void)
- {
- JmpAddr((INT64)GetAddress("midiInGetID"));
- }
- ALCDECL ChinaPYG_midiInGetNumDevs(void)
- {
- JmpAddr((INT64)GetAddress("midiInGetNumDevs"));
- }
- ALCDECL ChinaPYG_midiInMessage(void)
- {
- JmpAddr((INT64)GetAddress("midiInMessage"));
- }
- ALCDECL ChinaPYG_midiInOpen(void)
- {
- JmpAddr((INT64)GetAddress("midiInOpen"));
- }
- ALCDECL ChinaPYG_midiInPrepareHeader(void)
- {
- JmpAddr((INT64)GetAddress("midiInPrepareHeader"));
- }
- ALCDECL ChinaPYG_midiInReset(void)
- {
- JmpAddr((INT64)GetAddress("midiInReset"));
- }
- ALCDECL ChinaPYG_midiInStart(void)
- {
- JmpAddr((INT64)GetAddress("midiInStart"));
- }
- ALCDECL ChinaPYG_midiInStop(void)
- {
- JmpAddr((INT64)GetAddress("midiInStop"));
- }
- ALCDECL ChinaPYG_midiInUnprepareHeader(void)
- {
- JmpAddr((INT64)GetAddress("midiInUnprepareHeader"));
- }
- ALCDECL ChinaPYG_midiOutCacheDrumPatches(void)
- {
- JmpAddr((INT64)GetAddress("midiOutCacheDrumPatches"));
- }
- ALCDECL ChinaPYG_midiOutCachePatches(void)
- {
- JmpAddr((INT64)GetAddress("midiOutCachePatches"));
- }
- ALCDECL ChinaPYG_midiOutClose(void)
- {
- JmpAddr((INT64)GetAddress("midiOutClose"));
- }
- ALCDECL ChinaPYG_midiOutGetDevCapsA(void)
- {
- JmpAddr((INT64)GetAddress("midiOutGetDevCapsA"));
- }
- ALCDECL ChinaPYG_midiOutGetDevCapsW(void)
- {
- JmpAddr((INT64)GetAddress("midiOutGetDevCapsW"));
- }
- ALCDECL ChinaPYG_midiOutGetErrorTextA(void)
- {
- JmpAddr((INT64)GetAddress("midiOutGetErrorTextA"));
- }
- ALCDECL ChinaPYG_midiOutGetErrorTextW(void)
- {
- JmpAddr((INT64)GetAddress("midiOutGetErrorTextW"));
- }
- ALCDECL ChinaPYG_midiOutGetID(void)
- {
- JmpAddr((INT64)GetAddress("midiOutGetID"));
- }
- ALCDECL ChinaPYG_midiOutGetNumDevs(void)
- {
- JmpAddr((INT64)GetAddress("midiOutGetNumDevs"));
- }
- ALCDECL ChinaPYG_midiOutGetVolume(void)
- {
- JmpAddr((INT64)GetAddress("midiOutGetVolume"));
- }
- ALCDECL ChinaPYG_midiOutLongMsg(void)
- {
- JmpAddr((INT64)GetAddress("midiOutLongMsg"));
- }
- ALCDECL ChinaPYG_midiOutMessage(void)
- {
- JmpAddr((INT64)GetAddress("midiOutMessage"));
- }
- ALCDECL ChinaPYG_midiOutOpen(void)
- {
- JmpAddr((INT64)GetAddress("midiOutOpen"));
- }
- ALCDECL ChinaPYG_midiOutPrepareHeader(void)
- {
- JmpAddr((INT64)GetAddress("midiOutPrepareHeader"));
- }
- ALCDECL ChinaPYG_midiOutReset(void)
- {
- JmpAddr((INT64)GetAddress("midiOutReset"));
- }
- ALCDECL ChinaPYG_midiOutSetVolume(void)
- {
- JmpAddr((INT64)GetAddress("midiOutSetVolume"));
- }
- ALCDECL ChinaPYG_midiOutShortMsg(void)
- {
- JmpAddr((INT64)GetAddress("midiOutShortMsg"));
- }
- ALCDECL ChinaPYG_midiOutUnprepareHeader(void)
- {
- JmpAddr((INT64)GetAddress("midiOutUnprepareHeader"));
- }
- ALCDECL ChinaPYG_midiStreamClose(void)
- {
- JmpAddr((INT64)GetAddress("midiStreamClose"));
- }
- ALCDECL ChinaPYG_midiStreamOpen(void)
- {
- JmpAddr((INT64)GetAddress("midiStreamOpen"));
- }
- ALCDECL ChinaPYG_midiStreamOut(void)
- {
- JmpAddr((INT64)GetAddress("midiStreamOut"));
- }
- ALCDECL ChinaPYG_midiStreamPause(void)
- {
- JmpAddr((INT64)GetAddress("midiStreamPause"));
- }
- ALCDECL ChinaPYG_midiStreamPosition(void)
- {
- JmpAddr((INT64)GetAddress("midiStreamPosition"));
- }
- ALCDECL ChinaPYG_midiStreamProperty(void)
- {
- JmpAddr((INT64)GetAddress("midiStreamProperty"));
- }
- ALCDECL ChinaPYG_midiStreamRestart(void)
- {
- JmpAddr((INT64)GetAddress("midiStreamRestart"));
- }
- ALCDECL ChinaPYG_midiStreamStop(void)
- {
- JmpAddr((INT64)GetAddress("midiStreamStop"));
- }
- ALCDECL ChinaPYG_mixerClose(void)
- {
- JmpAddr((INT64)GetAddress("mixerClose"));
- }
- ALCDECL ChinaPYG_mixerGetControlDetailsA(void)
- {
- JmpAddr((INT64)GetAddress("mixerGetControlDetailsA"));
- }
- ALCDECL ChinaPYG_mixerGetControlDetailsW(void)
- {
- JmpAddr((INT64)GetAddress("mixerGetControlDetailsW"));
- }
- ALCDECL ChinaPYG_mixerGetDevCapsA(void)
- {
- JmpAddr((INT64)GetAddress("mixerGetDevCapsA"));
- }
- ALCDECL ChinaPYG_mixerGetDevCapsW(void)
- {
- JmpAddr((INT64)GetAddress("mixerGetDevCapsW"));
- }
- ALCDECL ChinaPYG_mixerGetID(void)
- {
- JmpAddr((INT64)GetAddress("mixerGetID"));
- }
- ALCDECL ChinaPYG_mixerGetLineControlsA(void)
- {
- JmpAddr((INT64)GetAddress("mixerGetLineControlsA"));
- }
- ALCDECL ChinaPYG_mixerGetLineControlsW(void)
- {
- JmpAddr((INT64)GetAddress("mixerGetLineControlsW"));
- }
- ALCDECL ChinaPYG_mixerGetLineInfoA(void)
- {
- JmpAddr((INT64)GetAddress("mixerGetLineInfoA"));
- }
- ALCDECL ChinaPYG_mixerGetLineInfoW(void)
- {
- JmpAddr((INT64)GetAddress("mixerGetLineInfoW"));
- }
- ALCDECL ChinaPYG_mixerGetNumDevs(void)
- {
- JmpAddr((INT64)GetAddress("mixerGetNumDevs"));
- }
- ALCDECL ChinaPYG_mixerMessage(void)
- {
- JmpAddr((INT64)GetAddress("mixerMessage"));
- }
- ALCDECL ChinaPYG_mixerOpen(void)
- {
- JmpAddr((INT64)GetAddress("mixerOpen"));
- }
- ALCDECL ChinaPYG_mixerSetControlDetails(void)
- {
- JmpAddr((INT64)GetAddress("mixerSetControlDetails"));
- }
- ALCDECL ChinaPYG_mmDrvInstall(void)
- {
- JmpAddr((INT64)GetAddress("mmDrvInstall"));
- }
- ALCDECL ChinaPYG_mmGetCurrentTask(void)
- {
- JmpAddr((INT64)GetAddress("mmGetCurrentTask"));
- }
- ALCDECL ChinaPYG_mmTaskBlock(void)
- {
- JmpAddr((INT64)GetAddress("mmTaskBlock"));
- }
- ALCDECL ChinaPYG_mmTaskCreate(void)
- {
- JmpAddr((INT64)GetAddress("mmTaskCreate"));
- }
- ALCDECL ChinaPYG_mmTaskSignal(void)
- {
- JmpAddr((INT64)GetAddress("mmTaskSignal"));
- }
- ALCDECL ChinaPYG_mmTaskYield(void)
- {
- JmpAddr((INT64)GetAddress("mmTaskYield"));
- }
- ALCDECL ChinaPYG_mmioAdvance(void)
- {
- JmpAddr((INT64)GetAddress("mmioAdvance"));
- }
- ALCDECL ChinaPYG_mmioAscend(void)
- {
- JmpAddr((INT64)GetAddress("mmioAscend"));
- }
- ALCDECL ChinaPYG_mmioClose(void)
- {
- JmpAddr((INT64)GetAddress("mmioClose"));
- }
- ALCDECL ChinaPYG_mmioCreateChunk(void)
- {
- JmpAddr((INT64)GetAddress("mmioCreateChunk"));
- }
- ALCDECL ChinaPYG_mmioDescend(void)
- {
- JmpAddr((INT64)GetAddress("mmioDescend"));
- }
- ALCDECL ChinaPYG_mmioFlush(void)
- {
- JmpAddr((INT64)GetAddress("mmioFlush"));
- }
- ALCDECL ChinaPYG_mmioGetInfo(void)
- {
- JmpAddr((INT64)GetAddress("mmioGetInfo"));
- }
- ALCDECL ChinaPYG_mmioInstallIOProcA(void)
- {
- JmpAddr((INT64)GetAddress("mmioInstallIOProcA"));
- }
- ALCDECL ChinaPYG_mmioInstallIOProcW(void)
- {
- JmpAddr((INT64)GetAddress("mmioInstallIOProcW"));
- }
- ALCDECL ChinaPYG_mmioOpenA(void)
- {
- JmpAddr((INT64)GetAddress("mmioOpenA"));
- }
- ALCDECL ChinaPYG_mmioOpenW(void)
- {
- JmpAddr((INT64)GetAddress("mmioOpenW"));
- }
- ALCDECL ChinaPYG_mmioRead(void)
- {
- JmpAddr((INT64)GetAddress("mmioRead"));
- }
- ALCDECL ChinaPYG_mmioRenameA(void)
- {
- JmpAddr((INT64)GetAddress("mmioRenameA"));
- }
- ALCDECL ChinaPYG_mmioRenameW(void)
- {
- JmpAddr((INT64)GetAddress("mmioRenameW"));
- }
- ALCDECL ChinaPYG_mmioSeek(void)
- {
- JmpAddr((INT64)GetAddress("mmioSeek"));
- }
- ALCDECL ChinaPYG_mmioSendMessage(void)
- {
- JmpAddr((INT64)GetAddress("mmioSendMessage"));
- }
- ALCDECL ChinaPYG_mmioSetBuffer(void)
- {
- JmpAddr((INT64)GetAddress("mmioSetBuffer"));
- }
- ALCDECL ChinaPYG_mmioSetInfo(void)
- {
- JmpAddr((INT64)GetAddress("mmioSetInfo"));
- }
- ALCDECL ChinaPYG_mmioStringToFOURCCA(void)
- {
- JmpAddr((INT64)GetAddress("mmioStringToFOURCCA"));
- }
- ALCDECL ChinaPYG_mmioStringToFOURCCW(void)
- {
- JmpAddr((INT64)GetAddress("mmioStringToFOURCCW"));
- }
- ALCDECL ChinaPYG_mmioWrite(void)
- {
- JmpAddr((INT64)GetAddress("mmioWrite"));
- }
- ALCDECL ChinaPYG_mmsystemGetVersion(void)
- {
- JmpAddr((INT64)GetAddress("mmsystemGetVersion"));
- }
- ALCDECL ChinaPYG_mod32Message(void)
- {
- JmpAddr((INT64)GetAddress("mod32Message"));
- }
- ALCDECL ChinaPYG_mxd32Message(void)
- {
- JmpAddr((INT64)GetAddress("mxd32Message"));
- }
- ALCDECL ChinaPYG_sndPlaySoundA(void)
- {
- JmpAddr((INT64)GetAddress("sndPlaySoundA"));
- }
- ALCDECL ChinaPYG_sndPlaySoundW(void)
- {
- JmpAddr((INT64)GetAddress("sndPlaySoundW"));
- }
- ALCDECL ChinaPYG_tid32Message(void)
- {
- JmpAddr((INT64)GetAddress("tid32Message"));
- }
- ALCDECL ChinaPYG_timeBeginPeriod(void)
- {
- JmpAddr((INT64)GetAddress("timeBeginPeriod"));
- }
- ALCDECL ChinaPYG_timeEndPeriod(void)
- {
- JmpAddr((INT64)GetAddress("timeEndPeriod"));
- }
- ALCDECL ChinaPYG_timeGetDevCaps(void)
- {
- JmpAddr((INT64)GetAddress("timeGetDevCaps"));
- }
- ALCDECL ChinaPYG_timeGetSystemTime(void)
- {
- JmpAddr((INT64)GetAddress("timeGetSystemTime"));
- }
- ALCDECL ChinaPYG_timeGetTime(void)
- {
- JmpAddr((INT64)GetAddress("timeGetTime"));
- }
- ALCDECL ChinaPYG_timeKillEvent(void)
- {
- JmpAddr((INT64)GetAddress("timeKillEvent"));
- }
- ALCDECL ChinaPYG_timeSetEvent(void)
- {
- JmpAddr((INT64)GetAddress("timeSetEvent"));
- }
- ALCDECL ChinaPYG_waveInAddBuffer(void)
- {
- JmpAddr((INT64)GetAddress("waveInAddBuffer"));
- }
- ALCDECL ChinaPYG_waveInClose(void)
- {
- JmpAddr((INT64)GetAddress("waveInClose"));
- }
- ALCDECL ChinaPYG_waveInGetDevCapsA(void)
- {
- JmpAddr((INT64)GetAddress("waveInGetDevCapsA"));
- }
- ALCDECL ChinaPYG_waveInGetDevCapsW(void)
- {
- JmpAddr((INT64)GetAddress("waveInGetDevCapsW"));
- }
- ALCDECL ChinaPYG_waveInGetErrorTextA(void)
- {
- JmpAddr((INT64)GetAddress("waveInGetErrorTextA"));
- }
- ALCDECL ChinaPYG_waveInGetErrorTextW(void)
- {
- JmpAddr((INT64)GetAddress("waveInGetErrorTextW"));
- }
- ALCDECL ChinaPYG_waveInGetID(void)
- {
- JmpAddr((INT64)GetAddress("waveInGetID"));
- }
- ALCDECL ChinaPYG_waveInGetNumDevs(void)
- {
- JmpAddr((INT64)GetAddress("waveInGetNumDevs"));
- }
- ALCDECL ChinaPYG_waveInGetPosition(void)
- {
- JmpAddr((INT64)GetAddress("waveInGetPosition"));
- }
- ALCDECL ChinaPYG_waveInMessage(void)
- {
- JmpAddr((INT64)GetAddress("waveInMessage"));
- }
- ALCDECL ChinaPYG_waveInOpen(void)
- {
- JmpAddr((INT64)GetAddress("waveInOpen"));
- }
- ALCDECL ChinaPYG_waveInPrepareHeader(void)
- {
- JmpAddr((INT64)GetAddress("waveInPrepareHeader"));
- }
- ALCDECL ChinaPYG_waveInReset(void)
- {
- JmpAddr((INT64)GetAddress("waveInReset"));
- }
- ALCDECL ChinaPYG_waveInStart(void)
- {
- JmpAddr((INT64)GetAddress("waveInStart"));
- }
- ALCDECL ChinaPYG_waveInStop(void)
- {
- JmpAddr((INT64)GetAddress("waveInStop"));
- }
- ALCDECL ChinaPYG_waveInUnprepareHeader(void)
- {
- JmpAddr((INT64)GetAddress("waveInUnprepareHeader"));
- }
- ALCDECL ChinaPYG_waveOutBreakLoop(void)
- {
- JmpAddr((INT64)GetAddress("waveOutBreakLoop"));
- }
- ALCDECL ChinaPYG_waveOutClose(void)
- {
- JmpAddr((INT64)GetAddress("waveOutClose"));
- }
- ALCDECL ChinaPYG_waveOutGetDevCapsA(void)
- {
- JmpAddr((INT64)GetAddress("waveOutGetDevCapsA"));
- }
- ALCDECL ChinaPYG_waveOutGetDevCapsW(void)
- {
- JmpAddr((INT64)GetAddress("waveOutGetDevCapsW"));
- }
- ALCDECL ChinaPYG_waveOutGetErrorTextA(void)
- {
- JmpAddr((INT64)GetAddress("waveOutGetErrorTextA"));
- }
- ALCDECL ChinaPYG_waveOutGetErrorTextW(void)
- {
- JmpAddr((INT64)GetAddress("waveOutGetErrorTextW"));
- }
- ALCDECL ChinaPYG_waveOutGetID(void)
- {
- JmpAddr((INT64)GetAddress("waveOutGetID"));
- }
- ALCDECL ChinaPYG_waveOutGetNumDevs(void)
- {
- JmpAddr((INT64)GetAddress("waveOutGetNumDevs"));
- }
- ALCDECL ChinaPYG_waveOutGetPitch(void)
- {
- JmpAddr((INT64)GetAddress("waveOutGetPitch"));
- }
- ALCDECL ChinaPYG_waveOutGetPlaybackRate(void)
- {
- JmpAddr((INT64)GetAddress("waveOutGetPlaybackRate"));
- }
- ALCDECL ChinaPYG_waveOutGetPosition(void)
- {
- JmpAddr((INT64)GetAddress("waveOutGetPosition"));
- }
- ALCDECL ChinaPYG_waveOutGetVolume(void)
- {
- JmpAddr((INT64)GetAddress("waveOutGetVolume"));
- }
- ALCDECL ChinaPYG_waveOutMessage(void)
- {
- JmpAddr((INT64)GetAddress("waveOutMessage"));
- }
- ALCDECL ChinaPYG_waveOutOpen(void)
- {
- JmpAddr((INT64)GetAddress("waveOutOpen"));
- }
- ALCDECL ChinaPYG_waveOutPause(void)
- {
- JmpAddr((INT64)GetAddress("waveOutPause"));
- }
- ALCDECL ChinaPYG_waveOutPrepareHeader(void)
- {
- JmpAddr((INT64)GetAddress("waveOutPrepareHeader"));
- }
- ALCDECL ChinaPYG_waveOutReset(void)
- {
- JmpAddr((INT64)GetAddress("waveOutReset"));
- }
- ALCDECL ChinaPYG_waveOutRestart(void)
- {
- JmpAddr((INT64)GetAddress("waveOutRestart"));
- }
- ALCDECL ChinaPYG_waveOutSetPitch(void)
- {
- JmpAddr((INT64)GetAddress("waveOutSetPitch"));
- }
- ALCDECL ChinaPYG_waveOutSetPlaybackRate(void)
- {
- JmpAddr((INT64)GetAddress("waveOutSetPlaybackRate"));
- }
- ALCDECL ChinaPYG_waveOutSetVolume(void)
- {
- JmpAddr((INT64)GetAddress("waveOutSetVolume"));
- }
- ALCDECL ChinaPYG_waveOutUnprepareHeader(void)
- {
- JmpAddr((INT64)GetAddress("waveOutUnprepareHeader"));
- }
- ALCDECL ChinaPYG_waveOutWrite(void)
- {
- JmpAddr((INT64)GetAddress("waveOutWrite"));
- }
- ALCDECL ChinaPYG_wid32Message(void)
- {
- JmpAddr((INT64)GetAddress("wid32Message"));
- }
- ALCDECL ChinaPYG_wod32Message(void)
- {
- JmpAddr((INT64)GetAddress("wod32Message"));
- }
复制代码
obj文件源码(用FASMW生成OBJ文件)
- format MS64 COFF
- ;===================================================
- ;" X64 HOOK PiaoYun/P.Y.G"
- ;" bbs.chinapyg.com "
- ;" www.dllhook.com "
- ;===================================================
- public JmpAddr
- public PatchBYTE
- public PatchWORD
- public PatchDWORD
- public PatchQWORD
- public AddFun
- JmpAddr:
- mov rax, rcx
- push rax
- retn
- PatchBYTE:
- mov rax, rcx
- mov [rax], dl
- retn
- PatchWORD:
- mov rax, rcx
- mov [rax], dx
- retn
- PatchDWORD:
- mov rax, rcx
- mov [rax], edx
- retn
- PatchQWORD:
- mov rax, rcx
- mov [rax], rdx
- retn
- AddFun:
- mov rax, rcx
- add rax, rdx
- retn
复制代码
完全的源码下载【本源码WIN7X64+VS2013测试通过】
|
评分
-
查看全部评分
|