cmc5410 发表于 2014-12-31 10:27

LOL 无限视距VC源码

#include <windows.h>
#include <tchar.h>
#include <string>
#include <ddraw.h>
#include <Psapi.h>

HMODULE hDDRAW = nullptr;

typedef HRESULT (WINAPI *DirectDrawCreate_t) (GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter);
DirectDrawCreate_t fpDirectDrawCreate = nullptr;
HRESULT WINAPI DirectDrawCreate(GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter)
{
        return fpDirectDrawCreate(lpGUID, lplpDD, pUnkOuter);
}

typedef HRESULT (WINAPI *DirectDrawCreateEx_t) (GUID FAR * lpGuid, LPVOID *lplpDD, REFIID iid, IUnknown FAR *pUnkOuter);
DirectDrawCreateEx_t fpDirectDrawCreateEx = nullptr;
HRESULT WINAPI DirectDrawCreateEx(GUID FAR * lpGuid, LPVOID*lplpDD, REFIIDiid, IUnknown FAR *pUnkOuter)
{
        return fpDirectDrawCreateEx(lpGuid, lplpDD, iid, pUnkOuter);
}

VOID LoadDDRAW()
{
        TCHAR dllPath;
        GetSystemDirectory(dllPath, MAX_PATH);
        _tcscat_s(dllPath, MAX_PATH, _T("\\ddraw.dll"));
        hDDRAW = LoadLibrary(dllPath);

        fpDirectDrawCreate = reinterpret_cast<DirectDrawCreate_t>(GetProcAddress(hDDRAW, "DirectDrawCreate"));
        fpDirectDrawCreateEx = reinterpret_cast<DirectDrawCreateEx_t>(GetProcAddress(hDDRAW, "DirectDrawCreateEx"));
}

VOID Execute()
{
        LoadDDRAW();


        MODULEINFO mInfo;
        HMODULE hModule = GetModuleHandle(nullptr);
        GetModuleInformation(GetCurrentProcess(), hModule, &mInfo, sizeof(MODULEINFO));
        LPVOID base = mInfo.lpBaseOfDll;

        byte camValue[] = { 0x00, 0x40, 0x9c, 0x45 };
        auto addressToWrite = reinterpret_cast<DWORD>(base) + 0x0127D1FC;////基址 自己更新

        DWORD oldProtection;
        VirtualProtect(reinterpret_cast<LPVOID>(addressToWrite), 4, PAGE_EXECUTE_READWRITE, &oldProtection);
        memcpy(reinterpret_cast<LPVOID>(addressToWrite), camValue, 4);
        VirtualProtect(reinterpret_cast<LPVOID>(addressToWrite), 4, oldProtection, nullptr);
}

BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
        if (ul_reason_for_call == DLL_PROCESS_ATTACH)
                CreateThread(nullptr, 0, reinterpret_cast<LPTHREAD_START_ROUTINE>(Execute), nullptr, 0, nullptr);
        return TRUE;
}

yyz219 发表于 2014-12-31 11:51

wangdongdexin 发表于 2014-12-31 10:38

另外问一下楼主 过TP检测了吗

wangdongdexin 发表于 2014-12-31 10:37

不会VC楼主能不能弄一下易语言的 谢谢

尛龍 发表于 2014-12-31 19:10

可是没有过TP保护,你发的只是功能源码
包括防掉线 和卡屏都没有
谁要是使用这个不是坐等腾讯封号了么

只有汝丶 发表于 2014-12-31 12:02

求易语言的啊,

红客鄙哥 发表于 2014-12-31 19:15

西瓜籽 发表于 2015-1-1 10:00

无限不是会封号的吗?

lovemf 发表于 2015-1-2 01:39

感谢大神分享。。基础代码很强大。

CloudGuan 发表于 2015-1-2 19:27

看看代码,学习下。
页: [1] 2
查看完整版本: LOL 无限视距VC源码