Find CCSPlayer MovementServices FullWalkMove SpeedClamp

From HLND2T/CS2_VibeSignatures · View interactive version

Find CCSPlayer MovementServices FullWalkMove SpeedClamp is an AI agent skill from the GitHub repository HLND2T/CS2_VibeSignatures. Find and identify the velocity clamping branch inside CCSPlayer_MovementServices_FullWalkMove in CS2 binary using IDA Pro MCP, then generate a patch signature to disable it. Use this skill when reverse engineering CS2 server.dll or libserver.so to locate and patch the speed-clamp if-branch that caps

How to use this skill

Skill file

CCSPlayer_MovementServices_FullWalkMove_SpeedClamp Patch Workflow

Overview

Locate the velocity clamping branch inside CCSPlayer_MovementServices_FullWalkMove and generate a patch that converts the conditional jump into an unconditional jump, making the speed-clamp code a dead path.

The target code pattern in pseudocode:

v20 = (float)((float)(v16 * v16) + (float)(v19 * v19)) + (float)(v17 * v17);
if ( v20 > (float)(v18 * v18) )    // <-- patch target: disable this branch
{
    // velocity clamping logic: scale velocity down to maxspeed
    v21 = fsqrt(v20);
    v22 = v18 / v21;
    *(float *)(a2 + 56) = ... * v22;
    *(float *)(a2 + 60) = ... * v22;
    *(float *)(a2 + 64) = ... * v22;
    ...
}

In assembly, this is a comiss + jbe (or jbe short) pair. The jbe skips the clamping block when velocity <= maxspeed^2. Patching jbe to jmp makes it always skip, disabling the clamp entirely.

Prerequisites

Location Steps

1. Get FullWalkMove Function Address

ALWAYS Use SKILL /get-func-from-yaml with func_name=CCSPlayer_MovementServices_FullWalkMove.

If the skill returns an error, stop and report to user.

2. Decompile and Locate the Speed Clamp Pattern

Decompile the function:

mcp__ida-pro-mcp__decompile(addr="<func_va>")

In the decompiled output, search for the velocity clamping pattern. The key indicators are:

Note the address annotation on the comparison line (e.g., /*0x180a00e28*/ or similar).

3. Disassemble Around the Comparison

Disassemble the function starting from slightly before the annotated address to find the exact comiss + jbe/jbe short instruction pair:

mcp__ida-pro-mcp__disasm(addr="<func_va>", offset=<estimated_offset>, max_instructions=30)

Look for this assembly pattern:

addss   xmm2, xmm1          ; v20 = sum of squares
comiss  xmm2, xmm0          ; compare v20 vs v18*v18
jbe     loc_XXXXXXXX         ; skip clamp block if v20 <= v18*v18

Record:

4. Determine Patch Bytes

Read the original bytes of the jbe instruction:

mcp__ida-pro-mcp__get_bytes(regions={"addr": "<patch_va>", "size": 6})

Determine the patch based on the instruction encoding:

Case A: Near jbe (0F 86 rel32 — 6 bytes)

Case B: Short jbe (76 rel8 — 2 bytes)

5. Generate Patch Signature

ALWAYS Use SKILL /generate-signature-for-patch to generate and validate the signature.

Required context for the skill:

6. Write YAML Output

ALWAYS Use SKILL /write-patch-as-yaml to persist the results.

Required parameters:

Output YAML Files

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.