Гайд legendware fix (13.12.2021)

Статус
В этой теме нельзя размещать новые ответы.
  • 1,249
  • 6
  • 359
Всем привет, расскажу как фиксануть лв, если у вас есть прямые руки.
В Memory.cpp​
C++:
#include "Memory.h"
#include "..\utils\crypt_str.h"

template <typename T>
static constexpr auto relativeToAbsolute(int* address) noexcept
{
    return reinterpret_cast<T>(reinterpret_cast<char*>(address + 1) + *address);
}

#define FIND_PATTERN(type, ...) \
reinterpret_cast<type>(findPattern(__VA_ARGS__))

void Memory::initialize() noexcept
{
    auto temp = FIND_PATTERN(std::uintptr_t*, crypt_str("client"), crypt_str("\xB9????\xE8????\x8B\x5D\x08"), 1);
    hud = *temp;
    findHudElement = relativeToAbsolute<decltype(findHudElement)>(reinterpret_cast<int*>(reinterpret_cast<char*>(temp) + 5));
    clearHudWeapon = FIND_PATTERN(decltype(clearHudWeapon), crypt_str("client.dll"), crypt_str("55 8B EC 51 53 56 8B 75 08 8B D9 57 6B FE 34") + 1);
    itemSchema = relativeToAbsolute<decltype(itemSchema)>(FIND_PATTERN(int*, crypt_str("client"), crypt_str("\xE8????\x0F\xB7\x0F"), 1));
    equipWearable = FIND_PATTERN(decltype(equipWearable), crypt_str("client"), crypt_str("\x55\x8B\xEC\x83\xEC\x10\x53\x8B\x5D\x08\x57\x8B\xF9"));
}

В CInput.hpp​
Код:
#pragma once

#include "../misc/CUserCmd.hpp"

#define MULTIPLAYER_BACKUP 150

class bf_write;
class bf_read;

class CInput
{
public:
   // virtual void  Init_All(void);

    char pad_0000[12]; //0x0000
    bool m_fTrackIRAvailable; //0x000C
    bool m_fMouseInitialized; //0x000D
    bool m_fMouseActive; //0x000E
    bool m_fJoystickAdvancedInit; //0x000F
    char pad_0010[44]; //0x0010
    char* m_pKeys; //0x003C
    char pad_0040[48]; //0x0040
    int32_t m_nCamCommand; //0x0070
    char pad_0074[76]; //0x0074
    bool m_fCameraInterceptingMouse; //0x00C0
    bool m_fCameraInThirdPerson; //0xC1
    bool m_fCameraMovingWithMouse; //0x00C2
    char pad_00C3[1]; //0x00C3
    Vector m_vecCameraOffset; //0x00C4
    bool m_fCameraDistanceMove; //0x00D0
    char pad_00D1[19]; //0x00D1
    bool m_CameraIsOrthographic; //0x00E4
    bool m_CameraIsThirdPersonOverview; //0x00E5
    char pad_00E6[2]; //0x00E6
    QAngle* m_angPreviousViewAngles; //0x00E8
    QAngle* m_angPreviousViewAnglesTilt; //0x00EC
    char pad_00F0[16]; //0x00F0
    float m_flLastForwardMove; //0x0100
    int32_t m_nClearInputState; //0x0104
    CUserCmd* m_pCommands; //0x0108
    CVerifiedUserCmd* m_pVerifiedCommands; //0x010C

    CUserCmd* CInput::GetUserCmd(int sequence_number)
    {
        return &m_pCommands[sequence_number % MULTIPLAYER_BACKUP];
    }
    CUserCmd* CInput::GGetUserCmd(int slot, int sequence_number)//ignore error
    {
        return &m_pCommands[slot, sequence_number % MULTIPLAYER_BACKUP];
    }
    CVerifiedUserCmd* GetVerifiedUserCmd(int sequence_number)
    {
        return &m_pVerifiedCommands[sequence_number % MULTIPLAYER_BACKUP];
    }

};
 
Статус
В этой теме нельзя размещать новые ответы.

Похожие темы

Сверху Снизу