Reversed Functions: Pixel Surf + Edge Bug + Prediction
Reversed from
File Structure
Architecture
Key Functions
Byte Signatures
The Shared Velocity Window
How They Differ
Constants
Reversed from
strafe_one_dump.bin — CS2 cheat "Strafe" by koval.File Structure
Code:
cheat_functions_reversed/
├── README.md
├── prediction.hpp / .cpp ← Surface prediction engine (geometry scanning)
├── pixelsurf.hpp / .cpp ← Pixel surf assist (angle + button correction)
└── edgebug.hpp / .cpp ← Edge bug assist (velocity window detection)
Architecture
Code:
Every frame while airborne & feature enabled:
sub_1A2D80 — Movement Dispatcher
├─ Checks settings via sub_3A3040
├─ Gets player pawn via sub_3A3C10
├─ Reads m_fFlags, m_nActualMoveType
│
├── [if pixelsurf] ──► prediction.cpp (sub_1A23C0) ──► pixelsurf.cpp (sub_1A29A0)
│ │ │
│ ▼ ▼
│ sub_1A18D0 sub_1A2180 + sub_3A24B0
│ (geometry scan) (buttons + angles)
│
└── [if edgebug] ────► edgebug.cpp (sub_19CFB0)
│
▼
sub_19D7F0 (velocity check)
sub_19D680 (movement sim, pass 0/1)
Key Functions
| Function | Address | Size | Purpose |
|---|---|---|---|
prediction::predict_surface_contact | 0x1A23C0 | 1489 B | Scans geometry, predicts surface contact |
prediction::scan_surfaces | 0x1A18D0 | 2215 B | Traces N/E/S/W for walkable surfaces |
pixelsurf::apply_pixelsurf_assist | 0x1A29A0 | 985 B | Applies correction via angles + buttons |
edgebug::apply_edgebug_assist | 0x19CFB0 | 1741 B | Velocity-window detection + duck latch |
edgebug::detect_edgebug | 0x19D7F0 | 442 B | Checks m_fFlags + m_vecAbsVelocity.z |
edgebug::run_movement_cmd | 0x19D680 | 365 B | Runs movement sim tick (pass0=no duck, pass1=duck) |
Byte Signatures
| Name | Pattern |
|---|---|
prediction_entry | 48 8B C4 48 89 58 ? 48 89 70 ? 48 89 78 ? 55 41 56 41 57 48 8D 68 ? 48 81 EC 10 01 00 00 |
surface_scanner | 48 8B C4 48 89 58 08 55 56 57 41 54 41 55 41 56 41 57 48 8D A8 A8 FE FF FF 48 81 EC 20 02 |
pixelsurf_assist | 48 89 5C 24 ? 48 89 6C 24 ? 56 57 41 56 48 81 EC A0 00 00 00 48 8B 05 ? ? ? ? 48 33 C4 48 89 84 24 ? ? ? ? 4D 8B F0 |
edgebug_assist | 48 8B C4 48 89 58 ? 55 56 57 41 54 41 55 41 56 41 57 48 8D 68 ? 48 81 EC B0 00 00 00 |
edgebug_detector | 48 89 5C 24 18 48 89 7C 24 20 48 89 54 24 10 55 48 8B EC 48 83 EC 60 49 8B D8 |
edgebug_movement_cmd | 48 89 5C 24 18 48 89 6C 24 20 48 89 4C 24 08 56 57 41 54 41 56 41 57 48 83 EC 60 |
The Shared Velocity Window
Code:
velocity.z ∈ [-8.293, -5.629]
↑ ↑
-8.293f -5.629f
(0xC104B17E) (0xC0B4205C)
Above -5.6: falling too slowly, still has contact
In range: "slipping" — both features trigger here
Below -8.3: falling too fast, already past the edge
How They Differ
| Aspect | Pixel Surf | Edge Bug |
|---|---|---|
| Detection | geometry scan (4 traces) + velocity | pure velocity check |
| Input | corrected yaw + IN_JUMP/IN_ATTACK2 | IN_DUCK |
| Lookahead | single frame + fallback trace | up to 64 ticks simulated |
| State machine | multi-byte state + persistence | one-shot: active/tick_count |
| Sound/effects | none | plays hit sound, logs chat |
| Fallback | ground-distance trace + offset retry | second pass with IN_DUCK |
Constants
| Address | Value | Used By |
|---|---|---|
| 0x940A34 | -8.293333 | pixel surf + edge bug (velocity lower) |
| 0x940A30 | -5.628950 | pixel surf + edge bug (velocity upper) |
| 0x9C4BE8 | 64 (0x40) | edge bug radius (max iterations) |
| 0x9C4BE4 | 1.0f | edge bug hit sound volume |
| 0x9C4BE0 | 1.0f | edge bug sound volume |
| 0x9407E8 | 1.0f | pixel surf step size |
| 0x94090C | 32.0f | pixel surf offset retry |
Password for .zip file is hvh.net
Last edited by a moderator: