Code Monkey home page Code Monkey logo

veh_hooking's Introduction

veh_hooking

x64/x86 Hooking through VectoredExceptionHandler (PAGE_GUARD method)

Anti-cheat safe in most games with little performance loss in some situations

How To Use

  • Call veh::Setup()
  • Hook functions through veh::Hook(old, new)
  • Unhook functions with veh::Destroy() (you will need to call veh::Setup() again if you wanna hook functions again)

To call the original function from inside the hook function use veh::CallOriginal(original, args)

Example

void hooks::Setup()
{
    veh::Setup();
    veh::Hook(Present, Present_hk);
    veh::Hook(CreateMove, CreateMove_hk);
}

void hooks::Destroy()
{
    veh::Destroy();

    if (ImGui::GetCurrentContext())
    {
        ImGui_ImplDX11_Shutdown();
        ImGui_ImplWin32_Shutdown();
    }
}

bool hooks::CreateMove_hk(CCSGOInput* csgo_input, uint32_t slot, uint64_t a3, uint8_t a4)
{
    bool result = veh::CallOriginal<bool>(CreateMove, csgo_input, slot, a3, a4);

    if (!globals::Update() || !globals::local_pawn->m_pGameSceneNode())
        return result;

    CUserCmd* user_cmd = csgo_input->GetUserCmd(slot);
    globals::view_angles = user_cmd->base_user_cmd->msg_qangle->angles;
    globals::shoot_position = globals::local_pawn->m_pGameSceneNode()->m_vecAbsOrigin() + globals::local_pawn->m_vecViewOffset();

    aim_assist::Tick(user_cmd, csgo_input, slot);
    triggerbot::Tick(user_cmd);
    misc::AutoFire(user_cmd);

    return result;
}

veh_hooking's People

Contributors

acroberto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.