
Static reverse-engineering analysis of movement input heuristics in Source 2 engine, identifying structural edge cases in input automation and jump rate limiting routines.
server.dll)This paper presents a static reverse-engineering analysis of two client-side movement verification routines implemented in the Counter-Strike 2 engine (server.dll): the input automation / SOCD evaluator (sub_1801C6B30, designated CVE-2026-1801C / QUANTUM-SHIFT) and the jump request rate limiter (sub_180A7EDB0, designated CVE-2026-180A7 / BAL-JUMP). Through disassembly analysis and formal mathematical modeling of the underlying state machines, we demonstrate structural edge cases in both heuristics. Specifically, we document how discrete temporal quantization in sub_1801C6B30 creates an invariant classification boundary under fixed single-tick phase offsets, and how sub_180A7EDB0 relies on a univariant interval metric ($\Delta t$) that remains invariant under phase-locked single-impulse triggers.
sub_1801C6B30)server.dll (Win64 Retail Build)0x1C6B30void __fastcall sub_1801C6B30(int *pMovementServices, __int64 pPlayerController, __int64 pUserCmdPB)The routine evaluates movement button transition events (+moveleft / +moveright) submitted via client CBaseUserCmdPB payloads. Execution follows a conditional pipeline:
sv_auto_cstrafe_attempt_window, default 100).sub_1801C6B30)void __fastcall sub_1801C6B30(int *pMovementServices, __int64 pPlayerController, __int64 pUserCmdPB)
{
if (!pPlayerController || (*(_BYTE *)(pUserCmdPB + 16) & 1) == 0)
return;
__int64 pPawn = sub_180B137A0(pPlayerController);
if (!pPawn || !(*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)pPawn + 3216i64))(pPawn))
return;
float *pVel = (float *)sub_1803CBD90(pPawn, &szVelocityBuf);
float vSq = (pVel[0] * pVel[0]) + (pVel[1] * pVel[1]) + (pVel[2] * pVel[2]);
// Gating: Minimum velocity threshold
if (vSq <= 18279.04f)
return;
int rawTicks = *(_DWORD *)(pUserCmdPB + 24);
bool bIsOverlap = (rawTicks >= 0);
int absTicks = bIsOverlap ? rawTicks : ~rawTicks;
double curTime = sub_1801F46D0(off_181C9F350);
if (curTime * 1e-9 * (double)absTicks >= 15.5)
return;
int roundedTicks = (int)V_roundd();
if ((unsigned int)roundedTicks > 15)
return;
// Symbol Assignment
char symbolCode;
if (roundedTicks == 0)
symbolCode = 1; // Success / Perfect 0-tick
else
symbolCode = bIsOverlap ? 2 : 3; // Overlap or Underlap
// Fetch ConVar configuration pointers
unsigned int windowCap = *GetConVarUInt(&unk_181DDBD30, &qword_181DDBD38);
if (windowCap - 1 > 999)
return;
sub_1801ECEA0(pMovementServices, windowCap);
// Append symbol to circular buffer
int bufCap = pMovementServices[0];
if (bufCap > 0)
{
int writeIdx = pMovementServices[6];
if (writeIdx >= 0 && writeIdx < bufCap)
{
*(_BYTE *)(writeIdx + *((_QWORD *)pMovementServices + 1)) = symbolCode;
if (++pMovementServices[6] == bufCap)
pMovementServices[6] = 0;
}
}
// Update discrete tick frequency histograms
if (bIsOverlap)
pMovementServices[roundedTicks + 7]++;
else
pMovementServices[roundedTicks + 23]++;
int seqLen = *GetConVarInt(&unk_181DDBD40, &qword_181DDBD48);
if ((unsigned int)(seqLen - 1) > 999)
return;
// Evaluate sliding window sequence metrics
int totalValid = 0;
int totalOverlaps = 0;
int curSequenceSuccesses = 0;
int maxSequenceSuccesses = 0;
for (int i = 0; i < (int)windowCap; ++i)
{
if (i < bufCap)
{
int readIdx = i + pMovementServices[6] - bufCap;
if (i + pMovementServices[6] < bufCap)
readIdx = i + pMovementServices[6];
char sym = *(_BYTE *)(readIdx + *((_QWORD *)pMovementServices + 1));
if (sym != 0)
{
totalValid++;
if (sym == 2) totalOverlaps++;
else if (sym == 1) curSequenceSuccesses++;
}
}
// Sliding window update
if (i >= seqLen && (i - seqLen) >= 0)
{
if ((i - seqLen) < bufCap)
{
int popIdx = i + pMovementServices[6] - seqLen - bufCap;
if (i + pMovementServices[6] - seqLen < bufCap)
popIdx = i + pMovementServices[6] - seqLen;
if (*(_BYTE *)(popIdx + *((_QWORD *)pMovementServices + 1)) == 1)
curSequenceSuccesses--;
}
}
if (maxSequenceSuccesses < curSequenceSuccesses)
maxSequenceSuccesses = curSequenceSuccesses;
}
int minAttempts = *GetConVarInt(&unk_181DDBD20, &qword_181DDBD28);
float dynamicLimit = 0.0f;
if (totalValid >= minAttempts)
{
int minSuccessThreshold = *GetConVarInt(&unk_181DDBD50, &qword_181DDBD58);
if (maxSequenceSuccesses >= minSuccessThreshold)
{
float successRatio = 0.0f;
if (seqLen > minSuccessThreshold)
{
successRatio = (float)(maxSequenceSuccesses - minSuccessThreshold) /
(float)(seqLen - minSuccessThreshold);
}
float lowerPct = *GetConVarFloat(&unk_181DDBD70, &qword_181DDBD78); // Default 20.0%
float upperPct = *GetConVarFloat(&unk_181DDBD60, &qword_181DDBD68); // Default 5.0%
dynamicLimit = (lowerPct - upperPct) * successRatio + upperPct;
}
}
float observedOverlapPct = ((float)totalOverlaps / (float)totalValid) * 100.0f;
// Violation Condition: Dynamic limit exceeds observed overlap ratio
if (dynamicLimit > observedOverlapPct)
{
sub_1801ECEA0(pMovementServices, 0); // Flush buffer state
bool bEnableKick = *GetConVarByte(&unk_181DDBD90, &qword_181DDBD98);
if (bEnableKick)
{
__int64 pEngine = qword_182012050;
void (__fastcall *pfnKickClient)(__int64, unsigned int, _QWORD, __int64) =
*(void (__fastcall **)(__int64, unsigned int, _QWORD, __int64))(*(_QWORD *)pEngine + 768i64);
int slotIdx = -1;
sub_181265470(pPlayerController, &slotIdx);
// Disconnect Code 162: NETWORK_DISCONNECT_KICKED_INPUTAUTOMATION
pfnKickClient(pEngine, (unsigned int)(slotIdx - 1), 0, 162);
}
}
}
Let $\mathbf{S} = {s_1, s_2, \dots, s_N}$ represent the sequence of event symbols in the history buffer of size $N$. The parameter $S_{\text{max}}$ denotes the maximum number of code $1$ symbols ($s_i = 1$) within any contiguous sub-sequence of length $L$:
$$S_{\text{max}} = \max_{0 \le j \le N - L} \sum_{i=j}^{j+L-1} \mathbb{I}(s_i = 1)$$
The adaptive threshold function $T(S_{\text{max}})$ is conditioned on $S_{\text{max}} \ge S_{\text{thresh}}$:
$$T(S_{\text{max}}) = \begin{cases} \theta_{\text{upper}} + (\theta_{\text{lower}} - \theta_{\text{upper}}) \cdot \frac{S_{\text{max}} - S_{\text{thresh}}}{L - S_{\text{thresh}}} & \text{if } S_{\text{max}} \ge S_{\text{thresh}} \ 0 & \text{if } S_{\text{max}} < S_{\text{thresh}} \end{cases}$$
Where default configuration values are defined as:
sv_auto_cstrafe_sequence_length)sv_auto_cstrafe_success_threshold)sv_auto_cstrafe_lower_overlap_pct_threshold)sv_auto_cstrafe_upper_overlap_pct_threshold)A violation is declared if and only if $T(S_{\text{max}}) > P_{\text{overlap}}$, where $P_{\text{overlap}}$ is the sample ratio of code $2$ events:
$$P_{\text{overlap}} = \frac{100}{N} \sum_{i=1}^{N} \mathbb{I}(s_i = 2)$$
For any input stream where the phase offset $\Delta t_{\text{trans}}$ is constrained such that $k = \text{round}(\Delta t_{\text{trans}} / \tau_{\text{tick}}) \ge 1$:
pfnKickClient remains unexecuted.sub_180A7EDB0)server.dll (Win64 Retail Build)0x1A7EDB0void* __fastcall sub_180A7EDB0(__int64 pMovementServices, __int64 pMoveData)sub_180A7EDB0)void *__fastcall sub_180A7EDB0(__int64 pMovementServices, __int64 pMoveData)
{
__int64 pPawn = *(_QWORD *)(pMovementServices + 8);
sub_180C28550(pPawn, 2i64);
if (!*(_QWORD *)(pPawn + 56))
nullsub_908(pPawn);
// Collision hull & ground contact evaluation
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(pPawn + 56) + 1624i64))(*(_QWORD *)(pPawn + 56));
sub_1803CBD30(*(_QWORD *)(pPawn + 56));
sub_1803CD4C0(*(_QWORD *)(pPawn + 56), v14);
if (dword_181FDB358)
--dword_181FDB358;
// Check IN_JUMP bit (0x2) in command button mask
if ((*(_BYTE *)(pPawn + 88) & 2) != 0 || sub_180C28550(pPawn, 2i64))
{
_BYTE *pPenaltyActive = (_BYTE *)(pMovementServices + 16);
if (*pPenaltyActive)
{
float curTime = *((float *)off_181C9F350 + 12);
float lastJumpTime = *(float *)(pMovementServices + 20);
float penaltyInterval = sub_18029CE70(&unk_181FDB4D8, 0xFFFFFFFFi64); // sv_jump_spam_penalty_time
// Interval evaluation: curTime > lastJumpTime + penaltyInterval
if (curTime > (penaltyInterval + lastJumpTime))
{
if (*pPenaltyActive)
{
sub_180A99DE0(pMovementServices + 16, 0xFFFFFFFFi64, 0xFFFFFFFFi64);
*pPenaltyActive = 0; // Clear penalty state
}
// Apply jump impulse
sub_180A7F550(pMovementServices, pMoveData);
if (!*pPenaltyActive)
{
sub_180A99DE0(pPenaltyActive, 0xFFFFFFFFi64, 0xFFFFFFFFi64);
*pPenaltyActive = 1; // Engage penalty state
}
if (sub_180C28550(*(_QWORD *)(pMovementServices + 8), 2i64))
{
// Store jump timestamp: lastJumpTime = curTime - frameTime
*(float *)(pMovementServices + 20) = *((float *)off_181C9F350 + 12) -
*((float *)off_181C9F350 + 13);
}
return pMovementServices;
}
}
bool bDebugSpam = *GetConVarByte(&unk_181FDB640, &qword_181FDB648);
if (!bDebugSpam)
{
// Apply jump impulse when penalty debug is disabled
sub_180A7F550(pMovementServices, pMoveData);
if (!*pPenaltyActive)
{
sub_180A99DE0(pPenaltyActive, 0xFFFFFFFFi64, 0xFFFFFFFFi64);
*pPenaltyActive = 1;
}
*(float *)(pMovementServices + 20) = *((float *)off_181C9F350 + 12) -
*((float *)off_181C9F350 + 13);
}
}
return pMovementServices;
}
Let $t_n$ denote the execution timestamp of the $n$-th jump request, and $\tau_{\text{penalty}}$ denote the value of sv_jump_spam_penalty_time (typically $1$ tick, or $\approx 15.625\text{ ms}$). The state transition for penalty flag $P \in {0, 1}$ and impulse activation $I \in {0, 1}$ is defined by:
$$I_n = \begin{cases} 1 & \text{if } P_{n-1} = 0 \text{ or } t_n - t_{n-1} > \tau_{\text{penalty}} \ 0 & \text{if } P_{n-1} = 1 \text{ and } t_n - t_{n-1} \le \tau_{\text{penalty}} \end{cases}$$
FL_ONGROUND ($P_{\text{ground}} = 1$), the inter-request duration corresponds to the ballistic flight duration $T_{\text{flight}}$:$$t_n - t_{n-1} = T_{\text{flight}} \ge \frac{2 \cdot v_z}{g} \approx 300\text{--}500\text{ ms}$$
Because $T_{\text{flight}} \gg \tau_{\text{penalty}}$, the predicate $t_n - t_{n-1} > \tau_{\text{penalty}}$ holds unconditionally for all $n$, preventing activation of the suppression path.
| Component | Target Symbol | Current Primitive | Analytical Weakness | Proposed Remediation |
|---|---|---|---|---|
| Input Automation | sub_1801C6B30 | Binary classification ($k=0$ vs $k \ge 1$) + thresholding | Fixed phase offset ($k=1$) yields $S_{\text{max}} = 0$ identically | Evaluate sample variance $\sigma^2(\Delta t)$ across all $k$; flag low-variance distributions regardless of bin index |
| Jump Rate Limiting | sub_180A7EDB0 | Scalar time delta comparison ($t_n - t_{n-1} > \tau$) | Invariant under airborne phase delays ($T_{\text{flight}} \gg \tau$) | Evaluate velocity vector continuity and ground contact duration ($\Delta t_{\text{contact}}$) |