教程 如何在作弊中更新偏移量

YinBuLiao

we're all gonna die
论坛管理员
论坛VIP
2020/10/25
22
160
大家好。在本指南中,我将告诉您如何为“自己的”外部作弊添加自动更新的偏移量。我马上说,是给新手程序员的文章。有点理论。什么是偏移量?我不会告诉您太多信息,您可以在Google或此处阅读基本信息:https : https://github.com/nightimegames/ddd#chapter-3 我要说的主要是,不要混淆签名和非生物的概念,它们被称为偏移量。网络,它们也是网络变量-这些是标志,运行状况和各种玩家属性,这些属性也经常更新。签名就是这样的值,没有它们,就不可能编写多个骗子(同样,一切都在Google中)。在本指南中,我们将自动更新签名。通常,该指南将包含几个文件,因为 因此以后重做作弊更为方便。第一个头文件将命名为FindAddress.h。在这里,您需要写下预安装的签名以及其他一些信息:
C++:
#include "Process.h"

class FindAddress : public Process
{
public:
    static bool Prepare();
    static bool isgetaddress;
    static MODULEENTRY32 client, engine;
    static DWORD dwLocalPlayer;
    static DWORD localPlayer;
};
第二个文件是Function.h。它定义了用于搜索偏移量模板的类(函数):
C++:
using namespace std;

class FindPattern
{
public:
    FindPattern(DWORD start, DWORD len, BYTE* pMask, char* szMask) : Base(0), Offset(0)
    {
        BYTE* data = new BYTE[len];
        unsigned long bytesMem;
        if (ReadProcessMemory(pHandle, (LPVOID)start, data, len, &bytesMem))
        {
            for (DWORD i = 0; i < len; i++)
            {
                if (DataCompare((const BYTE*)(data + i), (const BYTE*)pMask, szMask))
                {
                    Base = (DWORD)(start + i);
                    Offset = i;
                    break;
                }
            }
        }
        delete[] data;
    }
    static HANDLE pHandle;
    DWORD Base, Offset;
private:
    bool DataCompare(const BYTE* pData, const BYTE* pMask, const char* pszMask)
    {
        for (; *pszMask; ++pData, ++pMask, ++pszMask)
        {
            if (*pszMask == '0' && *pData != *pMask)
                return false;
        }
        return (*pszMask == NULL);
    }
};
⚠如果编译器生成警告,替换:class Hacks : public Process, public FindAddress用class Hacks:public FindAddress类定义。

第四个文件是Process.h。这里一切都清楚了,设置了读/写功能。
C++:
#include "Function.h"

class Process
{
public:
    template <class _R> static _R readMem(DWORD addr)
    {
        _R x;
        ReadProcessMemory(FindPattern::pHandle, (LPVOID)addr, &x, sizeof(_R), 0);
        return x;
    }
    template <class _W> static _W writeMem(DWORD addr, _W buff)
    {
        WriteProcessMemory(FindPattern::pHandle, (LPVOID)addr, &buff, sizeof(_W), 0);
        return 0;
    }
    static DWORD getProcess(const char* procName);
    static MODULEENTRY32 getModule(DWORD procId, const char* modName);
};
第五个文件称为FindAddress.cpp。实际上,这里是根据预定模板找到所需值的功能。
此外,除了main.cpp外,所有带有cpp扩展名的文件都被添加到资源文件中。
C++:
#include "FindAddress.h"

bool FindAddress::isgetaddress;
DWORD FindAddress::dwLocalPlayer = NULL,
FindAddress::localPlayer = NULL;
MODULEENTRY32  FindAddress::client,
FindAddress::engine;

bool FindAddress::Prepare()
{
    client = getModule(getProcess("csgo.exe"), "client.dll");
    if (!isgetaddress)
    {
       {
            dwLocalPlayer = FindPattern::FindPattern((DWORD)client.modBaseAddr, (DWORD)client.modBaseSize, (PBYTE)"\x8D\x34\x85\x00\x00\x00\x00\x89\x15\x00\x00\x00\x00\x8B\x41\x08\x8B\x48\x04\x83\xF9\xFF", "000????00????000000000").Base;
            {
                dwLocalPlayer = readMem<DWORD>(dwLocalPlayer + 0x3);
                dwLocalPlayer -= (DWORD)client.modBaseAddr;
                dwLocalPlayer += 0x4;
            }
        }
        isgetaddress = true;
    }
    localPlayer = readMem<DWORD>((DWORD)client.modBaseAddr + dwLocalPlayer);
    return 0;
}
可以从该文件中学习一些模板:
C++:
        dwLocalPlayer = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\x8D\x34\x85\x00\x00\x00\x00\x89\x15\x00\x00\x00\x00\x8B\x41\x00\x8B\x48\x00\x83\xF9\xFF\x74\x17"), "000????00????00?00?00000").Base;
        if (dwLocalPlayer)
        {
            dwLocalPlayer = *(DWORD*)(dwLocalPlayer + 0x3);
            dwLocalPlayer -= gameModule;
            dwLocalPlayer += 0x4;
        }
    } while (!dwLocalPlayer);

    do
    {
        dwClientState = CSGO::FindPattern(gameEngine, 0xFFFFFFF, (PBYTE)("\xA1\x00\x00\x00\x00\x33\xD2\x6A\x00\x6A\x00\x33\xC9\x89\xB0"), "0????000?0?0000").Base;
        if (dwClientState)
        {
            dwClientState = *(DWORD*)(dwClientState + 0x1);
            dwClientState -= gameEngine;
        }
    } while (!dwClientState);

    do
    {
        dwForceJump = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\x8B\x0D\x00\x00\x00\x00\x8B\xD6\x8B\xC1\x83\xCA\x02"), "00????0000000").Base;
        if (dwForceJump)
        {
            dwForceJump = *(DWORD*)(dwForceJump + 0x2);
            dwForceJump -= gameModule;
        }
    } while (!dwForceJump);

    do
    {
        dwEntityList = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\x89\x4D\xF8\x3B\xC7\x0F\x8C\x00\x00\x00\x00\xBB\x00\x00\x00\x00"), "0000000????0????").Base;
        if (dwEntityList)
        {
            dwEntityList = *(DWORD*)(dwEntityList + 0xC);
            dwEntityList -= gameModule;
        }
    } while (!dwEntityList);

    do
    {
        dwGlowObjectManager = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\x5E\x5D\xC2\x00\x00\x83\xE9\x40\xE9\x00\x00\x00\x00\xA1\x00\x00\x00\x00"), "000??0000????0????").Base;
        if (dwGlowObjectManager)
        {
            dwGlowObjectManager = *(DWORD*)(dwGlowObjectManager + 0xE);
            dwGlowObjectManager -= gameModule;
            dwGlowObjectManager += 0x4;
        }
    } while (!dwGlowObjectManager);

    do
    {
        dwClientState_GetLocalPlayer = CSGO::FindPattern(gameEngine, 0xFFFFFFF, (PBYTE)("\x8B\x80\x00\x00\x00\x00\x40\xC3"), "00????00").Base;
        if (dwClientState_GetLocalPlayer)
        {
            dwClientState_GetLocalPlayer = *(DWORD*)(dwClientState_GetLocalPlayer + 0x2);
        }
    } while (!dwClientState_GetLocalPlayer);

    do
    {
        dwClientState_IsHLTV = CSGO::FindPattern(gameEngine, 0xFFFFFFF, (PBYTE)("\x80\xBF\x00\x00\x00\x00\x00\x0F\x84\x00\x00\x00\x00\x32\xDB"), "00?????00????00").Base;
        if (dwClientState_IsHLTV)
        {
            dwClientState_IsHLTV = *(DWORD*)(dwClientState_IsHLTV + 0x2);
        }
    } while (!dwClientState_IsHLTV);


    do
    {
        dwClientState_Map = CSGO::FindPattern(gameEngine, 0xFFFFFFF, (PBYTE)("\x05\x00\x00\x00\x00\xC3\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xA1"), "0????000000000").Base;
        if (dwClientState_Map)
        {
            dwClientState_Map = *(DWORD*)(dwClientState_Map + 0x1);
        }
    } while (!dwClientState_Map);

    do
    {
        dwClientState_MapDirectory = CSGO::FindPattern(gameEngine, 0xFFFFFFF, (PBYTE)("\xB8\x00\x00\x00\x00\xC3\x05\x00\x00\x00\x00\xC3"), "0????00????0").Base;
        if (dwClientState_MapDirectory)
        {
            dwClientState_MapDirectory = *(DWORD*)(dwClientState_MapDirectory + 0x7);
        }
    } while (!dwClientState_MapDirectory);

    do
    {
        dwClientState_MaxPlayer = CSGO::FindPattern(gameEngine, 0xFFFFFFF, (PBYTE)("\xA1\x00\x00\x00\x00\x8B\x80\x00\x00\x00\x00\xC3\xCC\xCC\xCC\xCC\x55\x8B\xEC\x8A\x45\x08"), "0????00????00000000000").Base;
        if (dwClientState_MaxPlayer)
        {
            dwClientState_MaxPlayer = *(DWORD*)(dwClientState_MaxPlayer + 0x7);
        }
    } while (!dwClientState_MaxPlayer);

    do
    {
        dwClientState_State = CSGO::FindPattern(gameEngine, 0xFFFFFFF, (PBYTE)("\x83\xB8\x00\x00\x00\x00\x00\x0F\x94\xC0\xC3"), "00?????0000").Base;
        if (dwClientState_State)
        {
            dwClientState_State = *(DWORD*)(dwClientState_State + 0x2);
        }
    } while (!dwClientState_State);

    do
    {
        dwClientState_ViewAngles = CSGO::FindPattern(gameEngine, 0xFFFFFFF, (PBYTE)("\xF3\x0F\x11\x80\x00\x00\x00\x00\xD9\x46\x04\xD9\x05"), "0000????00000").Base;
        if (dwClientState_ViewAngles)
        {
            dwClientState_ViewAngles = *(DWORD*)(dwClientState_ViewAngles + 0x4);
        }
    } while (!dwClientState_ViewAngles);

    do
    {
        clientstate_delta_ticks = CSGO::FindPattern(gameEngine, 0xFFFFFFF, (PBYTE)("\xC7\x87\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x15\x00\x00\x00\x00\x83\xC4\x08"), "00????????00????000").Base;
        if (clientstate_delta_ticks)
        {
            clientstate_delta_ticks = *(DWORD*)(clientstate_delta_ticks + 0x2);
        }
    } while (!clientstate_delta_ticks);


    do
    {
        clientstate_last_outgoing_command = CSGO::FindPattern(gameEngine, 0xFFFFFFF, (PBYTE)("\x8B\x8F\x00\x00\x00\x00\x8B\x87\x00\x00\x00\x00\x41"), "00????00????0").Base;
        if (clientstate_last_outgoing_command)
        {
            clientstate_last_outgoing_command = *(DWORD*)(clientstate_last_outgoing_command + 0x2);
        }
    } while (!clientstate_last_outgoing_command);

    do
    {
        clientstate_choked_commands = CSGO::FindPattern(gameEngine, 0xFFFFFFF, (PBYTE)("\x8B\x87\x00\x00\x00\x00\x41"), "00????0").Base;
        if (clientstate_choked_commands)
        {
            clientstate_choked_commands = *(DWORD*)(clientstate_choked_commands + 0x2);
        }
    } while (!clientstate_choked_commands);

    do
    {
        clientstate_net_channel = CSGO::FindPattern(gameEngine, 0xFFFFFFF, (PBYTE)("\x8B\x8F\x00\x00\x00\x00\x8B\x01\x8B\x40\x18"), "00????00000").Base;
        if (clientstate_net_channel)
        {
            clientstate_net_channel = *(DWORD*)(clientstate_net_channel + 0x2);
        }
    } while (!clientstate_net_channel);

    do
    {
        dwForceAttack = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\x89\x0D\x00\x00\x00\x00\x8B\x0D\x00\x00\x00\x00\x8B\xF2\x8B\xC1\x83\xCE\x04"), "00????00????0000000").Base;
        if (dwForceAttack)
        {
            dwForceAttack = *(DWORD*)(dwForceAttack + 0x2);
            dwForceAttack -= gameModule;
            dwForceAttack2 = (DWORD)(dwForceAttack + 0xC);
            dwForceBackward = (DWORD)(dwForceAttack2 + 0x48);
            dwForceForward = (DWORD)(dwForceAttack + 0x30);
            dwForceLeft = (DWORD)(dwForceAttack + 0x48);
            dwForceRight = (DWORD)(dwForceAttack + 0x6C);
        }
    } while (!dwForceAttack);

    do
    {
        dwGameDir = CSGO::FindPattern(gameEngine, 0xFFFFFFF, (PBYTE)("\x68\x00\x00\x00\x00\x8D\x85\x00\x00\x00\x00\x50\x68\x00\x00\x00\x00\x68"), "0????00????00????0").Base;
        if (dwGameDir)
        {
            dwGameDir = *(DWORD*)(dwGameDir + 0x1);
            dwGameDir -= gameEngine;
        }
    } while (!dwGameDir);

    do
    {
        dwGameRulesProxy = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\xA1\x00\x00\x00\x00\x85\xC0\x0F\x84\x00\x00\x00\x00\x80\xB8\x00\x00\x00\x00\x00\x74\x7A"), "0????0000????00?????00").Base;
        if (dwGameRulesProxy)
        {
            dwGameRulesProxy = *(DWORD*)(dwGameRulesProxy + 0x1);
            dwGameRulesProxy -= gameModule;
        }
    } while (!dwGameRulesProxy);

    do
    {
        dwGetAllClasses = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\xA1\x00\x00\x00\x00\xC3\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xA1\x00\x00\x00\x00\xB9"), "0????000000000000????0").Base;
        if (dwGetAllClasses)
        {
            dwGetAllClasses = *(DWORD*)(dwGetAllClasses + 0x1);
            dwGetAllClasses -= gameModule;
            dwGetAllClasses = (DWORD)(dwGetAllClasses - 0x4504624);
        }
    } while (!dwGetAllClasses);

    do
    {
        dwGlobalVars = CSGO::FindPattern(gameEngine, 0xFFFFFFF, (PBYTE)("\x68\x00\x00\x00\x00\x68\x00\x00\x00\x00\xFF\x50\x08\x85\xC0"), "0????0????00000").Base;
        if (dwGlobalVars)
        {
            dwGlobalVars = *(DWORD*)(dwGlobalVars + 0x1);
            dwGlobalVars -= gameEngine;
        }
    } while (!dwGlobalVars);

    do
    {
        dwInput = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\xA1\x00\x00\x00\x00\xA8\x01\x75\x4B"), "0????0000").Base;
        if (dwInput)
        {
            dwInput = *(DWORD*)(dwInput + 0x1);
            dwInput -= gameModule;
            dwInput = (DWORD)(dwInput - 0xF661C);
        }
    } while (!dwInput);

    do
    {
        dwInterfaceLinkList = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\x8B\x35\x00\x00\x00\x00\x57\x85\xF6\x74\x00\x8B\x7D\x08\x8B\x4E\x04\x8B\xC7\x8A\x11\x3A\x10"), "00????0000?000000000000").Base;
        if (dwInterfaceLinkList)
        {
            dwInterfaceLinkList -= gameModule;
        }
    } while (!dwInterfaceLinkList);

    do
    {
        dwMouseEnablePtr = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\xB9\x00\x00\x00\x00\xFF\x50\x34\x85\xC0\x75\x10"), "0????0000000").Base;
        if (dwMouseEnablePtr)
        {
            dwMouseEnablePtr = *(DWORD*)(dwMouseEnablePtr + 0x1);
            dwMouseEnablePtr -= gameModule;
            dwMouseEnable = (DWORD)(dwMouseEnablePtr + 0x30);
        }
    } while (!dwMouseEnable);

    do
    {
        dwPlayerResource = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\x8B\x3D\x00\x00\x00\x00\x85\xFF\x0F\x84\x00\x00\x00\x00\x81\xC7"), "00????0000????00").Base;
        if (dwPlayerResource)
        {
            dwPlayerResource = *(DWORD*)(dwPlayerResource + 0x2);
            dwPlayerResource -= gameModule;
        }
    } while (!dwPlayerResource);

    do
    {
        dwRadarBase = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\xA1\x00\x00\x00\x00\x8B\x0C\xB0\x8B\x01\xFF\x50\x00\x46\x3B\x35\x00\x00\x00\x00\x7C\xEA\x8B\x0D"), "0????0000000?000????0000").Base;
        if (dwRadarBase)
        {
            dwRadarBase = *(DWORD*)(dwRadarBase + 0x1);
            dwRadarBase -= gameModule;
        }
    } while (!dwRadarBase);

    do
    {
        dwSensitivity = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\x81\xF9\x00\x00\x00\x00\x75\x1D\xF3\x0F\x10\x05\x00\x00\x00\x00\xF3\x0F\x11\x44\x24\x00\x8B\x44\x24\x18\x35\x00\x00\x00\x00\x89\x44\x24\x0C\xEB\x0B"), "00????000000????00000?00000????000000").Base;
        if (dwSensitivity)
        {
            dwSensitivity = *(DWORD*)(dwSensitivity + 0xC);
            dwSensitivity -= gameModule;
            dwSensitivityPtr = (DWORD)(dwSensitivity - 0x2C);
        }
    } while (!dwSensitivity);

    do
    {
        dwSetClanTag = CSGO::FindPattern(gameEngine, 0xFFFFFFF, (PBYTE)("\x53\x56\x57\x8B\xDA\x8B\xF9\xFF\x15"), "000000000").Base;
        if (dwSetClanTag)
        {
            dwSetClanTag -= gameEngine;
        }
    } while (!dwSetClanTag);

    do
    {
        dwViewMatrix = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\x0F\x10\x05\x00\x00\x00\x00\x8D\x85\x00\x00\x00\x00\xB9"), "000????00????0").Base;
        if (dwViewMatrix)
        {
            dwViewMatrix = *(DWORD*)(dwViewMatrix + 0x3);
            dwViewMatrix -= gameModule;
            dwViewMatrix = (DWORD)(dwViewMatrix + 0xB0);
        }
    } while (!dwViewMatrix);

    do
    {
        dwWeaponTable = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\xB9\x00\x00\x00\x00\x6A\x00\xFF\x50\x08\xC3"), "0????0?0000").Base;
        if (dwWeaponTable)
        {
            dwWeaponTable = *(DWORD*)(dwWeaponTable + 0x1);
            dwWeaponTable -= gameModule;
        }
    } while (!dwWeaponTable);

    do
    {
        dwWeaponTableIndex = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\x39\x86\x00\x00\x00\x00\x74\x06\x89\x86\x00\x00\x00\x00\x8B\x86"), "00????0000????00").Base;
        if (dwWeaponTableIndex)
        {
            dwWeaponTableIndex = *(DWORD*)(dwWeaponTableIndex + 0x2);
        }
    } while (!dwWeaponTableIndex);

    do
    {
        dwYawPtr = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\x81\xF9\x00\x00\x00\x00\x75\x1D\xF3\x0F\x10\x05\x00\x00\x00\x00\xF3\x0F\x11\x44\x24\x00\x8B\x44\x24\x1C\x35\x00\x00\x00\x00\x89\x44\x24\x18\xEB\x0B\x8B\x01\x8B\x40\x30\xFF\xD0\xD9\x5C\x24\x18\xF3\x0F\x10\x06"), "00????000000????00000?00000????000000000000000000000").Base;
        if (dwYawPtr)
        {
            dwYawPtr = *(DWORD*)(dwYawPtr + 0x2);
            dwYawPtr -= gameModule;
        }
    } while (!dwYawPtr);

    do
    {
        dwZoomSensitivityRatioPtr = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\x81\xF9\x00\x00\x00\x00\x75\x1A\xF3\x0F\x10\x05\x00\x00\x00\x00\xF3\x0F\x11\x45\x00\x8B\x45\xF4\x35\x00\x00\x00\x00\x89\x45\xFC\xEB\x0A\x8B\x01\x8B\x40\x30\xFF\xD0\xD9\x5D\xFC\xA1"), "00????000000????0000?0000????0000000000000000").Base;
        if (dwZoomSensitivityRatioPtr)
        {
            dwZoomSensitivityRatioPtr = *(DWORD*)(dwZoomSensitivityRatioPtr + 0x2);
            dwZoomSensitivityRatioPtr -= gameModule;
        }
    } while (!dwZoomSensitivityRatioPtr);

    do
    {
        dwbSendPackets = CSGO::FindPattern(gameEngine, 0xFFFFFFF, (PBYTE)("\xB3\x01\x8B\x01\x8B\x40\x10\xFF\xD0\x84\xC0\x74\x0F\x80\xBF\x00\x00\x00\x00\x00\x0F\x84"), "000000000000000?????00").Base;
        if (dwbSendPackets)
        {
            dwbSendPackets -= gameEngine;
            dwbSendPackets = (DWORD)(dwbSendPackets - 0xE);
        }
    } while (!dwbSendPackets);


    do
    {
        dwppDirect3DDevice9 = CSGO::FindPattern(shaderapidx9, 0xFFFFFFF, (PBYTE)("\xA1\x00\x00\x00\x00\x50\x8B\x08\xFF\x51\x0C"), "0????000000").Base;
        if (dwppDirect3DDevice9)
        {
            dwppDirect3DDevice9 = *(DWORD*)(dwppDirect3DDevice9 + 0x1);
            dwppDirect3DDevice9 -= shaderapidx9;
        }
    } while (!dwppDirect3DDevice9);

    do
    {
        m_pStudioHdr = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\x8B\xB6\x00\x00\x00\x00\x85\xF6\x74\x05\x83\x3E\x00\x75\x02\x33\xF6\xF3\x0F\x10\x44\x24"), "00????000000?000000000").Base;
        if (m_pStudioHdr)
        {
            m_pStudioHdr = *(DWORD*)(m_pStudioHdr + 0x2);
            m_pStudioHdr -= gameModule;
        }
    } while (!m_pStudioHdr);

    do
    {
        m_yawClassPtr = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\x81\xF9\x00\x00\x00\x00\x75\x16\xF3\x0F\x10\x05\x00\x00\x00\x00\xF3\x0F\x11\x45\x00\x81\x75\x00\x00\x00\x00\x00\xEB\x0A\x8B\x01\x8B\x40\x30\xFF\xD0\xD9\x5D\x0C\x8B\x55\x08"), "00????000000????0000?00?????000000000000000").Base;
        if (m_yawClassPtr)
        {
            m_yawClassPtr = *(DWORD*)(m_yawClassPtr + 0x2);
            m_yawClassPtr -= gameModule;
        }
    } while (!m_yawClassPtr);

    do
    {
        m_pitchClassPtr = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\xA1\x00\x00\x00\x00\x89\x74\x24\x28"), "0????0000").Base;
        if (m_pitchClassPtr)
        {
            m_pitchClassPtr = *(DWORD*)(m_pitchClassPtr + 0x1);
            m_pitchClassPtr -= gameModule;
        }
    } while (!m_pitchClassPtr);

    do
    {
        interface_engine_cvar = CSGO::FindPattern(vstdlib, 0xFFFFFFF, (PBYTE)("\x8B\x0D\x00\x00\x00\x00\xC7\x05"), "00????00").Base;
        if (interface_engine_cvar)
        {
            interface_engine_cvar = *(DWORD*)(interface_engine_cvar + 0x2);
            interface_engine_cvar -= vstdlib;
        }
    } while (!interface_engine_cvar);

    do
    {
        m_bDormant = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\x8A\x81\x00\x00\x00\x00\xC3\x32\xC0"), "00????000").Base;
        if (m_bDormant)
        {
            m_bDormant = *(DWORD*)(m_bDormant + 0x2);
            m_bDormant -= gameModule;
            m_bDormant = (BYTE)(m_bDormant + 0x8);
        }
    } while (!m_bDormant);

    do
    {
        model_ambient_min = CSGO::FindPattern(gameEngine, 0xFFFFFFF, (PBYTE)("\xF3\x0F\x10\x0D\x00\x00\x00\x00\xF3\x0F\x11\x4C\x24\x00\x8B\x44\x24\x20\x35\x00\x00\x00\x00\x89\x44\x24\x0C"), "0000????00000?00000????0000").Base;
        if (model_ambient_min)
        {
            model_ambient_min = *(DWORD*)(model_ambient_min + 0x4);
            model_ambient_min -= gameEngine;
        }
    } while (!model_ambient_min);

    do
    {
        set_abs_angles = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\x55\x8B\xEC\x83\xE4\xF8\x83\xEC\x64\x53\x56\x57\x8B\xF1\xE8"), "000000000000000").Base;
        if (set_abs_angles)
        {
            set_abs_angles -= gameModule;
        }
    } while (!set_abs_angles);

    do
    {
        set_abs_origin = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\x55\x8B\xEC\x83\xE4\xF8\x51\x53\x56\x57\x8B\xF1\xE8"), "0000000000000").Base;
        if (set_abs_origin)
        {
            set_abs_origin -= gameModule;
        }
    } while (!set_abs_origin);


    do
    {
        is_c4_owner = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\x56\x8B\xF1\x85\xF6\x74\x31"), "0000000").Base;
        if (is_c4_owner)
        {
            is_c4_owner -= gameModule;
        }
    } while (!is_c4_owner);


    do
    {
        force_update_spectator_glow = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\x74\x07\x8B\xCB\xE8\x00\x00\x00\x00\x83\xC7\x10"), "00000????000").Base;
        if (force_update_spectator_glow)
        {
            force_update_spectator_glow -= gameModule;
        }
    } while (!force_update_spectator_glow);

    do
    {
        anim_overlays = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\x8B\x89\x00\x00\x00\x00\x8D\x0C\xD1"), "00????000").Base;
        if (anim_overlays)
        {
            anim_overlays = *(DWORD*)(anim_overlays + 0x2);
        }
    } while (!anim_overlays);

    do
    {
        m_flSpawnTime = CSGO::FindPattern(gameModule, 0xFFFFFFF, (PBYTE)("\x89\x86\x00\x00\x00\x00\xE8\x00\x00\x00\x00\x80\xBE\x00\x00\x00\x00\x00"), "00????0????00?????").Base;
        if (m_flSpawnTime)
        {
            m_flSpawnTime = *(DWORD*)(m_flSpawnTime + 0x2);
        }
    } while (!m_flSpawnTime);
第六个文件是Hacks.cpp hack文件。签名搜索功能调用在此处设置。
C++:
#include "Hacks.h"

void Hacks::EntryPoint()
{
     Prepare();
     std::cout << dwLocalPlayer << endl;
}
本示例输出值dwLocalPlayer以验证搜索模式是否有效。


第七文件与进程和游戏模块的安装有关。Process.cpp:
C++:
DWORD Process::getProcess(const char* procName)
{
    DWORD pid = 0;
    HANDLE pProcess = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
    if (pProcess != INVALID_HANDLE_VALUE)
    {
        PROCESSENTRY32 entry;
        entry.dwSize = sizeof(entry);
        do
        {
            if (!_stricmp(entry.szExeFile, procName))
            {
                pid = entry.th32ProcessID;
                CloseHandle(pProcess);
                FindPattern::pHandle = OpenProcess(PROCESS_ALL_ACCESS, false, pid);
            }
        } while (Process32Next(pProcess, &entry));
    }
    return pid;
}

MODULEENTRY32 Process::getModule(DWORD procId, const char* modName)
{
    HANDLE hModule = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, procId);
    MODULEENTRY32 mod;
    mod.dwSize = sizeof(mod);
    do
    {
        if (!_stricmp(mod.szModule, modName))
        {
            CloseHandle(hModule);
            break;
        }
    } while (Module32Next(hModule, &mod));
    return mod;
}
最后一个文件是main.cpp。这是从我们的辅助那里调用类的地方。

如果抛出错误:“没有FindPattern :: FindPattern构造函数的实例”。然后在项目属性页上关闭兼容模式。一切都已在VisualStudio 2019中进行了测试。
如果这样不起作用,请尝试再次阅读该指南。
指南到此结束。感谢您的关注。
测试可执行文件:
 

附件