Find CCSBotManager AddBot BotNavIgnore

From HLND2T/CS2_VibeSignatures · View interactive version

Find CCSBotManager AddBot BotNavIgnore is an AI agent skill from the GitHub repository HLND2T/CS2_VibeSignatures. Find and patch the g_pNavMesh null-check inside CCSBotManager_AddBot in CS2 binary using IDA Pro MCP. This patch removes the navigation mesh requirement so bots can be added even without a nav mesh loaded. Use this skill when reverse engineering CS2 server.dll or libserver.so to locate and patch the

How to use this skill

Skill file

CCSBotManager_AddBot_BotNavIgnore Patch Workflow

Overview

Locate the g_pNavMesh null-check at the beginning of CCSBotManager_AddBot and generate a patch that converts the conditional jz (jump-if-zero) into an unconditional jmp past the early-return, so bots can be added even when no navigation mesh is loaded.

The target code pattern in pseudocode:

if ( !g_pNavMesh || !*(_BYTE *)(g_pNavMesh + 264) )   // <-- patch target: skip this check
    return 0;

In assembly, the first branch of this check is:

mov     rax, cs:g_pNavMesh
...
test    rax, rax
jz      loc_XXXXXXXX         ; <-- patch this: jz -> jmp to loc after the nav check

The jz is a near conditional jump (0F 84 rel32 — 6 bytes). Patching it to jmp rel32 (E9 <new_rel32> 90 — 5 bytes + 1 NOP) makes it always jump past both the null-pointer check and the g_pNavMesh + 264 byte check, landing at the code that continues bot creation.

The jump target should be the loc_ label that is reached after both nav mesh checks pass (the code right after the second jz that also targets the same early-return).

Prerequisites

Location Steps

1. Get CCSBotManager_AddBot Function Address

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

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

2. Decompile and Locate the Nav Mesh Check

Decompile the function:

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

In the decompiled output, search for the nav mesh check pattern at the very beginning of the function body. The key indicators are:

Note the address annotation on the if-statement line.

3. Disassemble the Function Prologue

Disassemble the first ~30 instructions of the function to find the exact test rax, rax + jz pair:

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

Look for this assembly pattern:

mov     rax, cs:g_pNavMesh
...
test    rax, rax
jz      loc_XXXXXXXX         ; early return if g_pNavMesh == NULL
cmp     byte ptr [rax+108h], 0
jz      loc_XXXXXXXX         ; early return if nav mesh not loaded

Record:

4. Determine Patch Bytes

Read the original bytes of the jz instruction:

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

The jz is a near conditional jump: 0F 84 rel32 (6 bytes).

Compute the new unconditional jump to the target (the code after both nav checks):

Where <new_rel32_le> is the 4-byte little-endian encoding of new_rel32.

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.