├── .vs ├── CSGO_Offset_Dumper │ ├── FileContentIndex │ │ └── read.lock │ ├── v17 │ │ ├── .suo │ │ └── .futdcache.v1 │ └── DesignTimeBuild │ │ └── .dtbcache.v2 └── ProjectEvaluation │ ├── csgo_offset_dumper.metadata.v2 │ └── csgo_offset_dumper.projects.v2 ├── CSGO_Offset_Dumper.csproj ├── .github └── FUNDING.yml ├── LICENSE.txt ├── CSGO_Offset_Dumper.sln ├── JsonClasses └── Config.cs ├── AppConfig.cs ├── SDK ├── SourceSDK.cs └── Netvar.cs ├── dwGetAllClasses └── ClassExporter.cs ├── .gitattributes ├── app.manifest ├── README.md ├── PatternScan.cs ├── Program.cs ├── .gitignore ├── Win32.cs ├── Dumper.cs └── config.json /.vs/CSGO_Offset_Dumper/FileContentIndex/read.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.vs/CSGO_Offset_Dumper/v17/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KyeOnDiscord/CSGO_Offset_Dumper/HEAD/.vs/CSGO_Offset_Dumper/v17/.suo -------------------------------------------------------------------------------- /.vs/CSGO_Offset_Dumper/v17/.futdcache.v1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KyeOnDiscord/CSGO_Offset_Dumper/HEAD/.vs/CSGO_Offset_Dumper/v17/.futdcache.v1 -------------------------------------------------------------------------------- /.vs/CSGO_Offset_Dumper/DesignTimeBuild/.dtbcache.v2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KyeOnDiscord/CSGO_Offset_Dumper/HEAD/.vs/CSGO_Offset_Dumper/DesignTimeBuild/.dtbcache.v2 -------------------------------------------------------------------------------- /.vs/ProjectEvaluation/csgo_offset_dumper.metadata.v2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KyeOnDiscord/CSGO_Offset_Dumper/HEAD/.vs/ProjectEvaluation/csgo_offset_dumper.metadata.v2 -------------------------------------------------------------------------------- /.vs/ProjectEvaluation/csgo_offset_dumper.projects.v2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KyeOnDiscord/CSGO_Offset_Dumper/HEAD/.vs/ProjectEvaluation/csgo_offset_dumper.projects.v2 -------------------------------------------------------------------------------- /CSGO_Offset_Dumper.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net6.0-windows 6 | enable 7 | enable 8 | x86 9 | CSGO_Offset_Dumper.Program 10 | x86 11 | True 12 | app.manifest 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: kye5000 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [year] [fullname] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /CSGO_Offset_Dumper.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.2.32526.322 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSGO_Offset_Dumper", "CSGO_Offset_Dumper.csproj", "{4C5E5BC8-77F8-4492-A6CB-4474515730B4}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x86 = Debug|x86 11 | Release|x86 = Release|x86 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {4C5E5BC8-77F8-4492-A6CB-4474515730B4}.Debug|x86.ActiveCfg = Debug|x86 15 | {4C5E5BC8-77F8-4492-A6CB-4474515730B4}.Debug|x86.Build.0 = Debug|x86 16 | {4C5E5BC8-77F8-4492-A6CB-4474515730B4}.Release|x86.ActiveCfg = Release|x86 17 | {4C5E5BC8-77F8-4492-A6CB-4474515730B4}.Release|x86.Build.0 = Release|x86 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {B3DD7C52-0DFA-49B4-B09A-00F6FA28C112} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /JsonClasses/Config.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace CSGO_Offset_Dumper.JsonClasses 8 | { 9 | internal class Config 10 | { 11 | 12 | public class Rootobject 13 | { 14 | public string executable { get; set; } 15 | public string filename { get; set; } 16 | public Signature[] signatures { get; set; } 17 | public Netvar[] netvars { get; set; } 18 | } 19 | 20 | public class Signature 21 | { 22 | public string name { get; set; } 23 | public int extra { get; set; } 24 | public bool relative { get; set; } 25 | public string module { get; set; } 26 | public int[] offsets { get; set; } = new int[0]; 27 | public string pattern { get; set; } 28 | } 29 | 30 | public class Netvar 31 | { 32 | public string name { get; set; } 33 | public string prop { get; set; } 34 | public string table { get; set; } 35 | public int offset { get; set; } = 0; 36 | } 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /AppConfig.cs: -------------------------------------------------------------------------------- 1 | namespace CSGO_Offset_Dumper 2 | { 3 | internal class AppConfig 4 | { 5 | 6 | private const string ConfigPath = "csgodumperconfig.json"; 7 | 8 | public static ConfigObj CurrentConfig; 9 | public static void InitConfig() 10 | { 11 | if (!File.Exists(ConfigPath)) 12 | File.WriteAllText(ConfigPath, System.Text.Json.JsonSerializer.Serialize(new ConfigObj())); 13 | 14 | CurrentConfig = System.Text.Json.JsonSerializer.Deserialize(File.ReadAllText(ConfigPath)); 15 | } 16 | public static void SaveConfig() => File.WriteAllText(ConfigPath, System.Text.Json.JsonSerializer.Serialize(CurrentConfig)); 17 | public class ConfigObj 18 | { 19 | public string ExportNamespace { get; set; } = "kyedumper"; 20 | public string FallbackConfigURL { get; set; } = "https://raw.githubusercontent.com/frk1/hazedumper/master/config.json"; 21 | 22 | //These are the Source classes to include under LocalPlayer, CCSPlayer and all the classes it inherits 23 | public string[] LocalPlayerClasses { get; set; } = new string[] { "CBaseEntity", "CBaseAnimating", "CBaseAnimatingOverlay", "CBaseFlex", "CBaseCombatCharacter", "CBasePlayer", "CCSPlayer" }; 24 | } 25 | 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /SDK/SourceSDK.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.InteropServices; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace CSGO_Offset_Dumper.SDK 9 | { 10 | internal class SourceSDK 11 | { 12 | [StructLayout(LayoutKind.Sequential)] 13 | internal class RecvTable 14 | { 15 | public IntPtr m_pProps;//RecvProp* 16 | public int m_nProps; 17 | public IntPtr m_pDecoder; 18 | public string m_pNetTableName; 19 | public bool m_bInitialized; 20 | public bool m_bInMainList; 21 | }; 22 | 23 | 24 | //unnecessary class pointers have been converted to void* for simplicity 25 | [StructLayout(LayoutKind.Sequential)] 26 | internal class RecvProp 27 | { 28 | public string m_pVarName; 29 | public IntPtr m_RecvType; 30 | public int m_Flags; 31 | public int m_StringBufferSize; 32 | public int m_bInsideArray; 33 | public IntPtr m_pExtraData; 34 | public IntPtr m_pArrayProp;//RecvProp* 35 | public IntPtr m_ArrayLengthProxy; 36 | public IntPtr m_ProxyFn; 37 | public IntPtr m_DataTableProxyFn; 38 | public IntPtr m_pDataTable;//RecvTable* 39 | public int m_Offset; 40 | public int m_ElementStride; 41 | public int m_nElements; 42 | string m_pParentArrayPropName; 43 | }; 44 | 45 | [StructLayout(LayoutKind.Sequential)] 46 | internal class ClientClass 47 | { 48 | public IntPtr m_pCreateFn; 49 | public IntPtr m_pCreateEventFn; 50 | public string m_pNetworkName; 51 | public IntPtr m_pRecvTable;//RecvTable* 52 | public IntPtr m_pNext;//ClientClass* 53 | //public int m_ClassID; This only works inside csgo not when we load a dll so yeah. 54 | }; 55 | 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /dwGetAllClasses/ClassExporter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using static CSGO_Offset_Dumper.SDK.SourceSDK; 7 | 8 | namespace CSGO_Offset_Dumper.dwGetAllClasses 9 | { 10 | internal class ClassExporter 11 | { 12 | public class SourceClassRoot 13 | { 14 | public List SourceClass { get; set; } = new(); 15 | } 16 | 17 | public class SourceClass 18 | { 19 | public string ClassName { get; set; } 20 | public string VariableName { get; set; } 21 | public int Offset { get; set; } 22 | } 23 | internal static SourceClassRoot GetAllClasses(IntPtr clientClass) 24 | { 25 | SourceClassRoot root = new(); 26 | for (IntPtr currNode = clientClass; currNode != IntPtr.Zero; currNode = currNode.Deference().m_pNext) 27 | { 28 | ClientClass? node = currNode.Deference(); 29 | root.SourceClass.AddRange(LoopTable(node.m_pRecvTable, node.m_pNetworkName)); 30 | } 31 | return root; 32 | } 33 | 34 | 35 | internal static IEnumerable LoopTable(IntPtr ptable, string networkName) 36 | { 37 | RecvTable? table = ptable.Deference(); 38 | for (int i = 0; i < table.m_nProps; i++) 39 | { 40 | //Size of RecvProp is 60 bytes (using sizeof(RecvTable in cpp) (Using sizeof in C# has different string sizes so it doesn't work) 41 | IntPtr propAddress = table.m_pProps + i * 60; 42 | 43 | RecvProp? prop = (propAddress).Deference(); 44 | if (prop != null)//Props are never null but might as well check for it 45 | yield return new SourceClass() { ClassName = networkName, Offset = prop.m_Offset, VariableName = prop.m_pVarName }; 46 | } 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /SDK/Netvar.cs: -------------------------------------------------------------------------------- 1 | using static CSGO_Offset_Dumper.SDK.SourceSDK; 2 | using Spectre.Console; 3 | using System.IO; 4 | namespace CSGO_Offset_Dumper.SDK 5 | { 6 | internal static class Netvar 7 | { 8 | internal static int GetNetVarOffset(string tableName, string netvarName, IntPtr clientClass) 9 | { 10 | for (IntPtr currNode = clientClass; currNode != IntPtr.Zero; currNode = currNode.Deference().m_pNext) 11 | { 12 | ClientClass? node = currNode.Deference(); 13 | 14 | RecvTable? table = node.m_pRecvTable.Deference(); 15 | 16 | if (tableName == table.m_pNetTableName) 17 | { 18 | return GetOffset(node.m_pRecvTable, tableName, netvarName); 19 | } 20 | } 21 | return 0; 22 | } 23 | 24 | /// 25 | /// Our recursive function to return the netvar offset. 26 | /// 27 | /// 28 | /// 29 | /// 30 | /// 31 | internal static int GetOffset(IntPtr ptable, string tableName, string netvarName) 32 | { 33 | RecvTable? table = ptable.Deference(); 34 | for (int i = 0; i < table.m_nProps; i++) 35 | { 36 | //Size of RecvProp is 60 bytes (using sizeof(RecvTable in cpp) (Using sizeof in C# has different string sizes so it doesn't work) 37 | IntPtr propAddress = table.m_pProps + i * 60; 38 | 39 | RecvProp? prop = (propAddress).Deference(); 40 | if (prop is not null) 41 | { 42 | if (prop.m_pVarName == netvarName) 43 | { 44 | return prop.m_Offset; 45 | } 46 | 47 | if (prop.m_pDataTable != IntPtr.Zero) 48 | { 49 | int offset = GetOffset(prop.m_pDataTable, tableName, netvarName); 50 | if (offset > 0) 51 | { 52 | return offset + prop.m_Offset; 53 | } 54 | } 55 | } 56 | 57 | } 58 | return 0; 59 | } 60 | 61 | internal static void GetNetvarOffsets(JsonClasses.Config.Netvar[] NetvarConfig, ref Dictionary Netvars, IntPtr dwGetallClassesAddr) 62 | { 63 | foreach (var netvar in NetvarConfig) 64 | { 65 | if (Netvars.ContainsKey(netvar.name))//Remove duplicates (some configs might have duplicates) 66 | continue; 67 | 68 | int offset = GetNetVarOffset(netvar.table, netvar.prop, dwGetallClassesAddr); 69 | 70 | if (netvar.offset != 0) 71 | { 72 | offset += netvar.offset; 73 | } 74 | 75 | AnsiConsole.MarkupLine($"[grey]Found netvar [blue]{netvar.name}[/] -> [blue]0x{offset:X}[/][/]"); 76 | Netvars.Add(netvar.name, offset); 77 | } 78 | } 79 | 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /app.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 54 | 62 | 63 | 64 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CSGO Offset Dumper 2 | 3 | [![CS:GO on steam](https://img.shields.io/badge/Steam-CS%3AGO-grey?labelColor=black&logo=Steam)](https://store.steampowered.com/app/730/CounterStrike_Global_Offensive/) 4 | ![](https://img.shields.io/github/languages/top/KyeOnDiscord/csgo_offset_dumper) 5 | ![](https://img.shields.io/github/downloads/kyeondiscord/csgo_offset_dumper/total?color=32a852) 6 | [![GitHub issues](https://img.shields.io/github/issues/KyeOnDiscord/CSGO_Offset_Dumper)](https://github.com/KyeOnDiscord/CSGO_Offset_Dumper/issues) 7 | [![GitHub stars](https://img.shields.io/github/stars/KyeOnDiscord/CSGO_Offset_Dumper)](https://github.com/KyeOnDiscord/CSGO_Offset_Dumper/stargazers) 8 | 9 | 10 | 11 | 12 | 13 | An offset dumper for [Counter-Strike: Global Offensive](https://store.steampowered.com/app/730/CounterStrike_Global_Offensive/) written entirely in C#. 14 | 15 | 16 | 17 | 18 | ## Getting Started 19 | ___You can either build the project with the instructions below or download the prebuilt executable in [releases](https://github.com/KyeOnDiscord/CSGO_Offset_Dumper/releases)___ 20 | 21 | ### Prerequisites 22 | * [![.NET 6 SDK](https://img.shields.io/badge/.NET-6_SDK-5a25e3)](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) 23 | 24 | ### Building the Project 25 | 1. Clone the repo 26 | ```sh 27 | git clone https://github.com/KyeOnDiscord/CSGO_Offset_Dumper.git 28 | ``` 29 | 2. Goto the folder directory 30 | ```sh 31 | cd CSGO_Offset_Dumper 32 | ``` 33 | 4. Build the project 34 | ```sh 35 | dotnet build 36 | ``` 37 | 38 | 39 | ## Usage 40 | 41 | 1. Put your config.json file into the same directory as `CSGO_Offset_Dumper.exe`. If you don't have a config.json file, you can get one from [hazedumper](https://github.com/frk1/hazedumper/blob/master/config.json). 42 | 2. Launch csgo in steam using [`-insecure`](https://guidedhacking.com/threads/how-to-bypass-vac-valve-anti-cheat-info.8125/) so [VAC](https://en.wikipedia.org/wiki/Valve_Anti-Cheat) is not loaded. 43 | 3. Open `CSGO_Offset_Dumper.exe` and your files will be dumped. 44 | 45 | ## Features 46 | 47 | ✔ Compatible with [hazedumper](https://github.com/frk1/hazedumper/blob/master/config.json) & [GH Offset Dumper](https://guidedhacking.com/resources/guided-hacking-offset-dumper-gh-offset-dumper.51/) config files 48 | 49 | ✔ Signature Offsets Dumper 50 | 51 | ✔ Netvar Offsets Dumper 52 | 53 | ✔ Exports all netvar classes and offsets 54 | 55 | ✔ Cheat Engine Table contains a 'Local Player' section which is readily available to modify any of the local player netvars. 56 | 57 | ✔ Dumps offsets to the following file formats: 58 | * [C++ (.h)](https://github.com/topics/cpp) 59 | * [C# (.cs)](https://github.com/topics/csharp) 60 | * [JSON (.json)](https://github.com/topics/json) (Also exports min.json which is the json in one line without line breaks) 61 | * [TOML (.toml)](https://github.com/toml-lang/toml) 62 | * [Cheat Engine](https://www.cheatengine.org/)'s Cheat Tables (.ct) 63 | 64 | ### To Do: 65 | 66 | - [ ] Add more types of entities in Cheat Table Export 67 | - [ ] Add Class Inheritance in export using RTTI 68 | 69 | ## Built With 70 | 71 | * [C# .NET 6](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) 72 | 73 | 74 | ### Acknowledgments 75 | * [GH Offset Dumper](https://github.com/guided-hacking/GH-Offset-Dumper)'s massively inspired this. 76 | * [frk1](https://github.com/frk1)'s [hazedumper](https://github.com/frk1/hazedumper)'s config files. 77 | * [Spectre.Console](https://github.com/spectreconsole/spectre.console) for an amazing and easy way to create good looking console apps. 78 | -------------------------------------------------------------------------------- /PatternScan.cs: -------------------------------------------------------------------------------- 1 | using System.Globalization; 2 | using static CSGO_Offset_Dumper.Win32; 3 | using Spectre.Console; 4 | namespace CSGO_Offset_Dumper 5 | { 6 | //https://guidedhacking.com/threads/simple-c-pattern-scan.13981/ 7 | internal class PatternScan 8 | { 9 | internal static void GetSignatureOffsets(JsonClasses.Config.Signature[] SignatureConfig, ref Dictionary Signatures) 10 | { 11 | foreach (var sig in SignatureConfig) 12 | { 13 | if (Signatures.ContainsKey(sig.name))//Remove duplicates (some configs might have duplicates) 14 | continue; 15 | 16 | var mod = (MODULEENTRY32)Win32.GetModule((IntPtr)Program.ProcessID, sig.module); 17 | 18 | int offset = (int)PatternScanMod(mod, sig.pattern); 19 | 20 | 21 | if (offset == 0) 22 | { 23 | Console.ForegroundColor = ConsoleColor.Red; 24 | Console.WriteLine($"Could not find {sig.name}"); 25 | Console.ForegroundColor = ConsoleColor.Yellow; 26 | continue; 27 | } 28 | 29 | 30 | //Offsets 31 | foreach (int sigoffset in sig.offsets) 32 | { 33 | offset += sigoffset; 34 | 35 | offset = Win32.ReadMemory(offset); 36 | } 37 | 38 | //Extra 39 | if (sig.extra > 0) 40 | { 41 | offset += sig.extra; 42 | } 43 | 44 | //Relative 45 | if (sig.relative) 46 | { 47 | offset -= (int)mod.modBaseAddr; 48 | } 49 | AnsiConsole.MarkupLine($"[grey]Found signature [blue]{sig.name}[/] -> [blue]0x{offset:X}[/][/]"); 50 | Signatures.Add(sig.name, offset); 51 | } 52 | } 53 | 54 | 55 | 56 | public static bool CheckPattern(string pattern, byte[] array2check) 57 | { 58 | string[] strBytes = pattern.Split(' '); 59 | int x = 0; 60 | foreach (byte b in array2check) 61 | { 62 | if (strBytes[x] == "?" || strBytes[x] == "??") 63 | { 64 | x++; 65 | } 66 | else if (byte.Parse(strBytes[x], NumberStyles.HexNumber) == b) 67 | { 68 | x++; 69 | } 70 | else 71 | { 72 | return false; 73 | } 74 | } 75 | return true; 76 | } 77 | 78 | 79 | public static IntPtr PatternScanMod(Win32.MODULEENTRY32 pMod, string pattern) 80 | { 81 | try 82 | { 83 | byte[] module = ReadModule(pMod); 84 | 85 | int offset = ScanBasic(pattern, module); 86 | 87 | if (offset == -1) 88 | { 89 | return IntPtr.Zero; 90 | // throw new Exception("Pattern could not be found in module " + pMod.szModule); 91 | } 92 | 93 | //Return it with the full address to resolve offsets, remove it later if its relative 94 | return (IntPtr)(offset + (int)pMod.modBaseAddr); 95 | 96 | } 97 | catch (Exception) 98 | { 99 | return IntPtr.Zero; 100 | } 101 | } 102 | 103 | 104 | public static int ScanBasic(string pattern, byte[] buffer) 105 | { 106 | string[] pBytes = pattern.Split(' '); 107 | 108 | for (int y = 0; y < buffer.Length; y++) 109 | { 110 | if (buffer[y] == byte.Parse(pBytes[0], NumberStyles.HexNumber)) 111 | { 112 | byte[] checkArray = new byte[pBytes.Length]; 113 | for (int x = 0; x < pBytes.Length; x++) 114 | { 115 | checkArray[x] = buffer[y + x]; 116 | } 117 | if (CheckPattern(pattern, checkArray)) 118 | { 119 | return y; 120 | } 121 | //else 122 | //{ 123 | // //Sometimes the pattern might be inside the wrong checkArray but the start of the right pattern is inside checkArray 124 | // //y += pBytes.Length - (pBytes.Length / 2); 125 | //} 126 | } 127 | } 128 | 129 | return -1; 130 | } 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /Program.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using System.Net; 3 | using System.Text.Json; 4 | using CSGO_Offset_Dumper.JsonClasses; 5 | using Spectre.Console; 6 | namespace CSGO_Offset_Dumper 7 | { 8 | internal class Program 9 | { 10 | /// 11 | /// The location of the configuration file the signatures and netvars are saved in. 12 | /// 13 | const string configFilePath = "config.json"; 14 | /// 15 | /// The Process ID of CSGO 16 | /// 17 | public static int ProcessID { get; private set; } 18 | /// 19 | /// Field to get the offset of dwGetAllClasses from the signature scan. (We must start signature scan first before netvar scan because netvars require this signature. 20 | /// 21 | private static int dwGetAllClassesOffset => Signatures.FirstOrDefault(x => x.Key.Equals("dwGetAllClasses")).Value; 22 | private static Dictionary Signatures = new(); 23 | private static Dictionary Netvars = new(); 24 | private const string clientdll = "client.dll"; 25 | 26 | static void Main(string[] args) 27 | { 28 | Console.Title = "CSGO Offset Dumper C# | Made by KyeOnDiscord"; 29 | AppConfig.InitConfig(); 30 | AnsiConsole.Write(new FigletText("CSGO Offset Dumper").LeftAligned().Color(Color.Blue)); 31 | 32 | if (!File.Exists(configFilePath)) 33 | { 34 | AnsiConsole.MarkupLine($"[red][[Error]] Could not find {configFilePath}! Downloading config from {AppConfig.CurrentConfig.FallbackConfigURL}![/]"); 35 | new WebClient().DownloadFile(AppConfig.CurrentConfig.FallbackConfigURL, configFilePath); 36 | } 37 | 38 | 39 | Config.Rootobject? config = JsonSerializer.Deserialize(File.ReadAllText(configFilePath)); 40 | 41 | AnsiConsole.MarkupLine($"[purple]Loading [green]{config.netvars.Length}[/] netvars and [green]{config.signatures.Length}[/] signatures[/]"); 42 | 43 | AnsiConsole.MarkupLine($"[grey]Trying to find {config.executable}[/]"); 44 | 45 | Process[] csgoproc = Process.GetProcessesByName(Path.GetFileNameWithoutExtension(config.executable)); 46 | 47 | if (csgoproc.Length > 0) 48 | { 49 | ProcessID = csgoproc[0].Id; 50 | AnsiConsole.MarkupLine($"[green]Found {csgoproc[0].ProcessName}.exe -> {ProcessID}[/]"); 51 | 52 | AnsiConsole.MarkupLine("[grey]Trying to get process handle[/]"); 53 | 54 | Win32.ProcessHandle = Win32.OpenProcess(0x0008 | 0x0010 | 0x0020, false, ProcessID); 55 | 56 | if (Win32.ProcessHandle != IntPtr.Zero) 57 | { 58 | AnsiConsole.MarkupLine($"[green]Found Proccess Handle -> 0x{Win32.ProcessHandle.ToString("X")}[/]"); 59 | 60 | AnsiConsole.MarkupLine($"[grey]Searching for {clientdll}[/]"); 61 | var clientModule = Win32.GetModule((IntPtr)ProcessID, clientdll); 62 | if (clientModule != null) 63 | { 64 | string path = clientModule.Value.szExePath; 65 | 66 | AnsiConsole.MarkupLine($"[green]Found {clientdll} -> {path}[/]"); 67 | 68 | AnsiConsole.MarkupLine($"[grey]Trying to load {clientdll}[/]"); 69 | IntPtr internalClientDll = Win32.LoadLibrary(path); 70 | if (internalClientDll != IntPtr.Zero) 71 | { 72 | AnsiConsole.MarkupLine($"[green]Loaded {clientdll} -> 0x{internalClientDll}[/]"); 73 | 74 | PatternScan.GetSignatureOffsets(config.signatures, ref Signatures); 75 | 76 | AnsiConsole.MarkupLine($"[green]Finished getting signatures![/]"); 77 | 78 | IntPtr dwGetallClassesAddr = internalClientDll + dwGetAllClassesOffset; 79 | 80 | var allClasses = dwGetAllClasses.ClassExporter.GetAllClasses(dwGetallClassesAddr); 81 | 82 | SDK.Netvar.GetNetvarOffsets(config.netvars, ref Netvars, dwGetallClassesAddr); 83 | 84 | 85 | AnsiConsole.MarkupLine($"[green]Found [blue]{Netvars.Count}/{config.netvars.Length}[/] netvars and [blue]{Signatures.Count}/{config.signatures.Length}[/] signatures[/]"); 86 | 87 | //Dumps netvars and signatures 88 | Dumper.DumpCPP(Netvars, Signatures, config.filename); 89 | Dumper.DumpCSharp(Netvars, Signatures, config.filename); 90 | Dumper.DumpJson(Netvars, Signatures, config.filename); 91 | Dumper.DumpTOML(Netvars, Signatures, config.filename); 92 | Dumper.DumpCheatTable(Netvars, Signatures, config.filename, allClasses); 93 | 94 | 95 | //Dumps all netvar classes 96 | Dumper.DumpJson(allClasses); 97 | Dumper.DumpCPP(allClasses); 98 | 99 | 100 | AnsiConsole.MarkupLine(""); 101 | AnsiConsole.MarkupLine(""); 102 | AnsiConsole.MarkupLine($"[bold underline green]Finished![/]"); 103 | } 104 | } 105 | } 106 | } 107 | else 108 | { 109 | AnsiConsole.MarkupLine($"[red][[Error]] Could not find {config.executable}! Maybe try opening the game?[/]"); 110 | } 111 | 112 | Console.ReadLine(); 113 | 114 | } 115 | } 116 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Oo]ut/ 33 | [Ll]og/ 34 | [Ll]ogs/ 35 | 36 | # Visual Studio 2015/2017 cache/options directory 37 | .vs/ 38 | # Uncomment if you have tasks that create the project's static files in wwwroot 39 | #wwwroot/ 40 | 41 | # Visual Studio 2017 auto generated files 42 | Generated\ Files/ 43 | 44 | # MSTest test Results 45 | [Tt]est[Rr]esult*/ 46 | [Bb]uild[Ll]og.* 47 | 48 | # NUnit 49 | *.VisualState.xml 50 | TestResult.xml 51 | nunit-*.xml 52 | 53 | # Build Results of an ATL Project 54 | [Dd]ebugPS/ 55 | [Rr]eleasePS/ 56 | dlldata.c 57 | 58 | # Benchmark Results 59 | BenchmarkDotNet.Artifacts/ 60 | 61 | # .NET Core 62 | project.lock.json 63 | project.fragment.lock.json 64 | artifacts/ 65 | 66 | # ASP.NET Scaffolding 67 | ScaffoldingReadMe.txt 68 | 69 | # StyleCop 70 | StyleCopReport.xml 71 | 72 | # Files built by Visual Studio 73 | *_i.c 74 | *_p.c 75 | *_h.h 76 | *.ilk 77 | *.meta 78 | *.obj 79 | *.iobj 80 | *.pch 81 | *.pdb 82 | *.ipdb 83 | *.pgc 84 | *.pgd 85 | *.rsp 86 | *.sbr 87 | *.tlb 88 | *.tli 89 | *.tlh 90 | *.tmp 91 | *.tmp_proj 92 | *_wpftmp.csproj 93 | *.log 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio LightSwitch build output 298 | **/*.HTMLClient/GeneratedArtifacts 299 | **/*.DesktopClient/GeneratedArtifacts 300 | **/*.DesktopClient/ModelManifest.xml 301 | **/*.Server/GeneratedArtifacts 302 | **/*.Server/ModelManifest.xml 303 | _Pvt_Extensions 304 | 305 | # Paket dependency manager 306 | .paket/paket.exe 307 | paket-files/ 308 | 309 | # FAKE - F# Make 310 | .fake/ 311 | 312 | # CodeRush personal settings 313 | .cr/personal 314 | 315 | # Python Tools for Visual Studio (PTVS) 316 | __pycache__/ 317 | *.pyc 318 | 319 | # Cake - Uncomment if you are using it 320 | # tools/** 321 | # !tools/packages.config 322 | 323 | # Tabs Studio 324 | *.tss 325 | 326 | # Telerik's JustMock configuration file 327 | *.jmconfig 328 | 329 | # BizTalk build output 330 | *.btp.cs 331 | *.btm.cs 332 | *.odx.cs 333 | *.xsd.cs 334 | 335 | # OpenCover UI analysis results 336 | OpenCover/ 337 | 338 | # Azure Stream Analytics local run output 339 | ASALocalRun/ 340 | 341 | # MSBuild Binary and Structured Log 342 | *.binlog 343 | 344 | # NVidia Nsight GPU debugger configuration file 345 | *.nvuser 346 | 347 | # MFractors (Xamarin productivity tool) working folder 348 | .mfractor/ 349 | 350 | # Local History for Visual Studio 351 | .localhistory/ 352 | 353 | # BeatPulse healthcheck temp database 354 | healthchecksdb 355 | 356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 357 | MigrationBackup/ 358 | 359 | # Ionide (cross platform F# VS Code tools) working folder 360 | .ionide/ 361 | 362 | # Fody - auto-generated XML schema 363 | FodyWeavers.xsd -------------------------------------------------------------------------------- /Win32.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.InteropServices; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace CSGO_Offset_Dumper 9 | { 10 | //Platform Invoked 11 | public static class Win32 12 | { 13 | [Flags] 14 | enum LoadLibraryFlags : uint 15 | { 16 | None = 0, 17 | DONT_RESOLVE_DLL_REFERENCES = 0x00000001, 18 | LOAD_IGNORE_CODE_AUTHZ_LEVEL = 0x00000010, 19 | LOAD_LIBRARY_AS_DATAFILE = 0x00000002, 20 | LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE = 0x00000040, 21 | LOAD_LIBRARY_AS_IMAGE_RESOURCE = 0x00000020, 22 | LOAD_LIBRARY_SEARCH_APPLICATION_DIR = 0x00000200, 23 | LOAD_LIBRARY_SEARCH_DEFAULT_DIRS = 0x00001000, 24 | LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR = 0x00000100, 25 | LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800, 26 | LOAD_LIBRARY_SEARCH_USER_DIRS = 0x00000400, 27 | LOAD_WITH_ALTERED_SEARCH_PATH = 0x00000008 28 | } 29 | 30 | 31 | 32 | [DllImport("kernel32.dll", SetLastError = true)] 33 | static extern IntPtr LoadLibraryEx(string lpFileName, IntPtr hReservedNull, LoadLibraryFlags dwFlags); 34 | 35 | [DllImport("kernel32.dll")] 36 | public static extern bool VirtualProtectEx(IntPtr hProcess, IntPtr lpAddress, UIntPtr dwSize, uint flNewProtect, out uint lpflOldProtect); 37 | 38 | [DllImport("kernel32.dll")] 39 | public static extern bool WriteProcessMemory(int hProcess, int lpBaseAddress, string buffer, int size, out int lpNumberOfBytesWritten); 40 | 41 | [DllImport("kernel32.dll")] 42 | public static extern IntPtr OpenProcess(int dwDesiredAccess, bool bInheritHandle, int dwProcessId); 43 | 44 | [DllImport("kernel32.dll")] 45 | public static extern bool ReadProcessMemory(int hProcess, int lpBaseAddress, byte[] buffer, int size, ref int lpNumberOfBytesRead); 46 | 47 | [DllImport("kernel32.dll")] 48 | public static extern bool WriteProcessMemory(int hProcess, int lpBaseAddress, byte[] buffer, int size, out int lpNumberOfBytesWritten); 49 | 50 | public static IntPtr ProcessHandle = IntPtr.Zero; 51 | public static int m_iBytesRead = 0; 52 | public static int m_iBytesWrite = 0; 53 | 54 | public static T ReadMemory(int Adress) where T : struct 55 | { 56 | int ByteSize = Marshal.SizeOf(typeof(T)); 57 | byte[] buffer = new byte[ByteSize]; 58 | ReadProcessMemory((int)ProcessHandle, Adress, buffer, buffer.Length, ref m_iBytesRead); 59 | 60 | return ByteArrayToStructure(buffer); 61 | } 62 | 63 | public const uint PAGE_EXECUTE_READWRITE = 0x40; 64 | public static byte[] ReadMemoryBytes(int Adress, int bytesToRead, ref int bytesRead) 65 | { 66 | byte[] buffer = new byte[bytesToRead]; 67 | 68 | if (VirtualProtectEx(ProcessHandle, (IntPtr)Adress, (UIntPtr)bytesToRead, PAGE_EXECUTE_READWRITE, out uint oldProtect)) 69 | { 70 | if (ReadProcessMemory((int)ProcessHandle, Adress, buffer, buffer.Length, ref bytesRead)) 71 | { 72 | VirtualProtectEx(ProcessHandle, (IntPtr)Adress, (UIntPtr)bytesToRead, oldProtect, out uint oldProtectagain); 73 | } 74 | } 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | return buffer; 83 | } 84 | 85 | 86 | 87 | public const uint SizeOfMemoryBasicInfo = 28; 88 | public const uint MEM_COMMIT = 0x00001000; 89 | public const uint PAGE_NOACCESS = 0x01; 90 | [StructLayout(LayoutKind.Sequential)] 91 | public struct MEMORY_BASIC_INFORMATION 92 | { 93 | public IntPtr BaseAddress; 94 | public IntPtr AllocationBase; 95 | public uint AllocationProtect; 96 | public IntPtr RegionSize; 97 | public uint State; 98 | public uint Protect; 99 | public uint Type; 100 | } 101 | 102 | [DllImport("kernel32.dll")] 103 | public static extern int VirtualQueryEx(IntPtr hProcess, IntPtr lpAddress, out MEMORY_BASIC_INFORMATION lpBuffer, uint dwLength); 104 | 105 | 106 | private const int MemoryPageSize = 0x1000; 107 | private static Dictionary ModuleBytes = new(); 108 | 109 | //Reads a specified module memory page at a time. 110 | public static byte[] ReadModule(MODULEENTRY32 pMod) 111 | { 112 | if (ModuleBytes.TryGetValue(pMod.szModule, out byte[] module)) 113 | { 114 | return module; 115 | } 116 | else 117 | { 118 | //Create a byte array the size of our module 119 | byte[] bytesRead = new byte[(int)pMod.modBaseSize]; 120 | 121 | 122 | for (int i = 0; i < pMod.modBaseSize; i += MemoryPageSize) 123 | { 124 | int currentAddress = (int)pMod.modBaseAddr + i; 125 | if (VirtualQueryEx(ProcessHandle, (IntPtr)currentAddress, out MEMORY_BASIC_INFORMATION mbi, SizeOfMemoryBasicInfo) != 0)//Return 0 means fail 126 | { 127 | if (mbi.State != MEM_COMMIT || mbi.State == PAGE_NOACCESS) 128 | continue; 129 | int i_BytesRead = 0; 130 | byte[] thisRegion = ReadMemoryBytes(currentAddress, MemoryPageSize, ref i_BytesRead); 131 | if (i_BytesRead > 0) 132 | Array.Copy(thisRegion, 0, bytesRead, i, MemoryPageSize); 133 | } 134 | } 135 | 136 | //Add our module to our dictionary so we can fetch it later. 137 | ModuleBytes.Add(pMod.szModule, bytesRead); 138 | return bytesRead; 139 | } 140 | } 141 | 142 | 143 | public static void WriteMemory(int Adress, object Value) 144 | { 145 | byte[] buffer = StructureToByteArray(Value); 146 | 147 | WriteProcessMemory((int)ProcessHandle, Adress, buffer, buffer.Length, out m_iBytesWrite); 148 | } 149 | 150 | public static string ReadString(int baseAddress, int size) 151 | { 152 | //create buffer for string 153 | byte[] buffer = new byte[size]; 154 | 155 | 156 | ReadProcessMemory((int)ProcessHandle, baseAddress, buffer, size, ref m_iBytesWrite); 157 | 158 | //encode bytes to ASCII 159 | return Encoding.ASCII.GetString(buffer); 160 | } 161 | public static T ByteArrayToStructure(byte[] bytes) where T : struct 162 | { 163 | var handle = GCHandle.Alloc(bytes, GCHandleType.Pinned); 164 | try 165 | { 166 | return (T)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(T)); 167 | } 168 | finally 169 | { 170 | handle.Free(); 171 | } 172 | } 173 | 174 | public static byte[] StructureToByteArray(object obj, int size = -1) 175 | { 176 | int len = Marshal.SizeOf(obj); 177 | 178 | byte[] arr; 179 | if (size == -1) 180 | arr = new byte[len]; 181 | else 182 | arr = new byte[size]; 183 | 184 | IntPtr ptr = Marshal.AllocHGlobal(len); 185 | 186 | Marshal.StructureToPtr(obj, ptr, true); 187 | Marshal.Copy(ptr, arr, 0, len); 188 | Marshal.FreeHGlobal(ptr); 189 | 190 | return arr; 191 | } 192 | 193 | public static unsafe byte[] ConvertStruct(ref T str) where T : struct 194 | { 195 | int size = Marshal.SizeOf(str); 196 | var arr = new byte[size]; 197 | 198 | fixed (byte* arrPtr = arr) 199 | { 200 | Marshal.StructureToPtr(str, (IntPtr)arrPtr, true); 201 | } 202 | 203 | return arr; 204 | } 205 | 206 | 207 | public static T? Deference(this IntPtr address) => Marshal.PtrToStructure(address); 208 | 209 | 210 | 211 | const long INVALID_HANDLE_VALUE = -1; 212 | [Flags] 213 | 214 | private enum SnapshotFlags : uint 215 | { 216 | HeapList = 0x00000001, 217 | Process = 0x00000002, 218 | Thread = 0x00000004, 219 | Module = 0x00000008, 220 | Module32 = 0x00000010, 221 | Inherit = 0x80000000, 222 | All = 0x0000001F, 223 | NoHeaps = 0x40000000 224 | } 225 | 226 | [StructLayout(LayoutKind.Sequential, CharSet = System.Runtime.InteropServices.CharSet.Ansi)] 227 | public struct MODULEENTRY32 228 | { 229 | public uint dwSize; 230 | public uint th32ModuleID; 231 | public uint th32ProcessID; 232 | public uint GlblcntUsage; 233 | public uint ProccntUsage; 234 | public IntPtr modBaseAddr; 235 | public uint modBaseSize; 236 | public IntPtr hModule; 237 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] 238 | public string szModule; 239 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] 240 | public string szExePath; 241 | } 242 | 243 | [DllImport("kernel32.dll")] 244 | static extern bool Module32First(IntPtr hSnapshot, ref MODULEENTRY32 lpme); 245 | 246 | [DllImport("kernel32.dll")] 247 | static extern bool Module32Next(IntPtr hSnapshot, ref MODULEENTRY32 lpme); 248 | 249 | [DllImport("kernel32", SetLastError = true)] 250 | [return: MarshalAs(UnmanagedType.Bool)] 251 | private static extern bool CloseHandle([In] IntPtr hObject); 252 | 253 | [DllImport("kernel32.dll", SetLastError = true)] 254 | static extern IntPtr CreateToolhelp32Snapshot(SnapshotFlags dwFlags, IntPtr th32ProcessID); 255 | 256 | [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 257 | static extern int AddDllDirectory(string NewDirectory); 258 | 259 | 260 | //Just store modules here so we don't have to call them everytime we need a basemoduleaddress 261 | private static List ModuleList = new(); 262 | public static MODULEENTRY32? GetModule(IntPtr procId, string modName) 263 | { 264 | var modList = ModuleList.Where(x => x.szModule.Equals(modName)); 265 | if (modList.Count() > 0) 266 | { 267 | return modList.First(); 268 | } 269 | else 270 | { 271 | IntPtr hSnap = CreateToolhelp32Snapshot(SnapshotFlags.Module | SnapshotFlags.Module32, procId); 272 | 273 | if (hSnap.ToInt64() != INVALID_HANDLE_VALUE) 274 | { 275 | MODULEENTRY32 modEntry = new MODULEENTRY32(); 276 | modEntry.dwSize = (uint)Marshal.SizeOf(typeof(MODULEENTRY32)); 277 | 278 | if (Module32First(hSnap, ref modEntry)) 279 | { 280 | do 281 | { 282 | if (modEntry.szModule.Equals(modName)) 283 | { 284 | ModuleList.Add(modEntry);//Add module for future use 285 | return modEntry; 286 | } 287 | } while (Module32Next(hSnap, ref modEntry)); 288 | } 289 | } 290 | CloseHandle(hSnap); 291 | } 292 | 293 | 294 | 295 | 296 | return null; 297 | } 298 | 299 | 300 | public static IntPtr LoadLibrary(string dllPath) 301 | { 302 | 303 | string? Directory = Path.GetFullPath(dllPath); 304 | Directory = Path.GetFullPath(Path.Combine(Directory, @"..\..\..\bin")); 305 | 306 | 307 | if (Directory != null && AddDllDirectory(Directory) != 0) 308 | { 309 | IntPtr result = LoadLibraryEx(dllPath, IntPtr.Zero, LoadLibraryFlags.LOAD_LIBRARY_SEARCH_DEFAULT_DIRS); 310 | 311 | if (result != IntPtr.Zero) 312 | return result; 313 | } 314 | 315 | 316 | return IntPtr.Zero; 317 | } 318 | 319 | } 320 | } 321 | -------------------------------------------------------------------------------- /Dumper.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Text.Json; 3 | using System.Text.Json.Nodes; 4 | using CSGO_Offset_Dumper.dwGetAllClasses; 5 | using Spectre.Console; 6 | 7 | namespace CSGO_Offset_Dumper 8 | { 9 | internal static class Dumper 10 | { 11 | //Netvar and Signature Dumpers 12 | public static void DumpCPP(Dictionary netvars, Dictionary signatures, string filename) 13 | { 14 | filename += ".hpp";//Add file extension 15 | using (StreamWriter writer = File.CreateText(filename)) 16 | { 17 | writer.WriteLine("#pragma once"); 18 | writer.WriteLine("#include "); 19 | writer.WriteLine(""); 20 | writer.WriteLine($"// {DateTime.UtcNow.ToString("yyyy-MM-dd hh:mm:tt")} UTC"); 21 | writer.WriteLine(""); 22 | writer.WriteLine($"namespace {AppConfig.CurrentConfig.ExportNamespace} {{"); 23 | writer.WriteLine($"constexpr int64_t timestamp = {DateTimeOffset.UtcNow.ToUnixTimeSeconds()};"); 24 | writer.WriteLine($"namespace netvars {{"); 25 | 26 | 27 | foreach (var netvar in netvars.OrderBy(x => x.Key)) 28 | { 29 | writer.WriteLine($"constexpr uintptr_t {netvar.Key} = 0x{netvar.Value.ToString("X")};"); 30 | } 31 | 32 | writer.WriteLine($"}} // namespace netvars"); 33 | 34 | writer.WriteLine($"namespace signatures {{"); 35 | 36 | foreach (var sig in signatures.OrderBy(x => x.Key)) 37 | { 38 | writer.WriteLine($"constexpr uintptr_t {sig.Key} = 0x{sig.Value.ToString("X")};"); 39 | } 40 | 41 | writer.WriteLine($"}} // namespace signatures"); 42 | 43 | writer.Write($"}} // namespace {AppConfig.CurrentConfig.ExportNamespace}"); 44 | 45 | writer.Flush(); 46 | } 47 | AnsiConsole.MarkupLine($"[blue]Dumped to [green]{filename}[/][/]"); 48 | } 49 | 50 | public static void DumpCSharp(Dictionary netvars, Dictionary signatures, string filename) 51 | { 52 | filename += ".cs";//Add file extension 53 | using (StreamWriter writer = File.CreateText(filename)) 54 | { 55 | writer.WriteLine("using System;"); 56 | writer.WriteLine(""); 57 | writer.WriteLine($"// {DateTime.UtcNow.ToString("yyyy-MM-dd hh:mm:tt")} UTC"); 58 | writer.WriteLine(""); 59 | writer.WriteLine($"namespace {AppConfig.CurrentConfig.ExportNamespace}"); 60 | writer.WriteLine("{"); 61 | writer.WriteLine(" public static class info"); 62 | writer.WriteLine(" {"); 63 | writer.WriteLine($" public static DateTime timestamp = DateTimeOffset.FromUnixTimeSeconds({DateTimeOffset.Now.ToUnixTimeSeconds()}).DateTime;"); 64 | writer.WriteLine(" }"); 65 | writer.WriteLine(" public static class netvars"); 66 | writer.WriteLine(" {"); 67 | 68 | 69 | foreach (var netvar in netvars.OrderBy(x => x.Key)) 70 | { 71 | writer.WriteLine($" public const int {netvar.Key} = 0x{netvar.Value.ToString("X")};"); 72 | } 73 | 74 | writer.WriteLine(" }"); 75 | 76 | writer.WriteLine(" public static class signatures"); 77 | writer.WriteLine(" {"); 78 | 79 | foreach (var sig in signatures.OrderBy(x => x.Key)) 80 | { 81 | writer.WriteLine($" public const int {sig.Key} = 0x{sig.Value.ToString("X")};"); 82 | } 83 | 84 | writer.Write(" }\n}"); 85 | 86 | writer.Flush(); 87 | } 88 | 89 | AnsiConsole.MarkupLine($"[blue]Dumped to [green]{filename}[/][/]"); 90 | } 91 | 92 | public static void DumpJson(Dictionary netvars, Dictionary signatures, string filename) 93 | { 94 | JsonNode jsonNode = JsonNode.Parse("{}"); 95 | jsonNode["timestamp"] = DateTimeOffset.Now.ToUnixTimeSeconds(); 96 | jsonNode["netvars"] = JsonNode.Parse(JsonSerializer.Serialize(netvars)); 97 | jsonNode["signatures"] = JsonNode.Parse(JsonSerializer.Serialize(signatures)); 98 | 99 | File.WriteAllText(filename + ".json", JsonSerializer.Serialize(jsonNode, new JsonSerializerOptions() { WriteIndented = true })); 100 | File.WriteAllText(filename + ".min.json", JsonSerializer.Serialize(jsonNode)); 101 | 102 | 103 | AnsiConsole.MarkupLine($"[blue]Dumped to [green]{filename}.json[/][/]"); 104 | AnsiConsole.MarkupLine($"[blue]Dumped to [green]{filename}.min.json[/][/]"); 105 | } 106 | 107 | public static void DumpTOML(Dictionary netvars, Dictionary signatures, string filename) 108 | { 109 | filename += ".toml";//Add file extension 110 | using (StreamWriter writer = File.CreateText(filename)) 111 | { 112 | writer.WriteLine($"timestamp = {DateTimeOffset.Now.ToUnixTimeSeconds()}"); 113 | writer.WriteLine(""); 114 | writer.WriteLine("[netvars]"); 115 | foreach (var netvar in netvars.OrderBy(x => x.Key)) 116 | { 117 | writer.WriteLine($"{netvar.Key} = {netvar.Value}"); 118 | } 119 | 120 | writer.WriteLine("[signatures]"); 121 | foreach (var sig in signatures.OrderBy(x => x.Key)) 122 | { 123 | writer.WriteLine($"{sig.Key} = {sig.Value}"); 124 | } 125 | writer.Flush(); 126 | } 127 | 128 | AnsiConsole.MarkupLine($"[blue]Dumped to [green]{filename}[/][/]"); 129 | } 130 | 131 | 132 | public static void DumpCheatTable(Dictionary netvars, Dictionary signatures, string filename, dwGetAllClasses.ClassExporter.SourceClassRoot allClasses) 133 | { 134 | filename += ".ct";//Add file extension 135 | 136 | 137 | 138 | using (StreamWriter writer = File.CreateText(filename)) 139 | { 140 | writer.WriteLine(""); 141 | writer.WriteLine(""); 142 | writer.WriteLine(""); 143 | 144 | //Blank Row 145 | writer.WriteLine(""); 146 | writer.WriteLine("0"); 147 | writer.WriteLine("\"\""); 148 | writer.WriteLine(""); 149 | writer.WriteLine("1"); 150 | writer.WriteLine(""); 151 | 152 | 153 | //Dumped by KyeDumper with date 154 | writer.WriteLine(""); 155 | writer.WriteLine("1"); 156 | writer.WriteLine($"\"Dumped by KyeDumper on {DateTime.UtcNow.ToString("yyyy-MM-dd hh:mm:tt")} UTC\""); 157 | writer.WriteLine(""); 158 | writer.WriteLine("C8450D"); 159 | writer.WriteLine("1"); 160 | writer.WriteLine(""); 161 | 162 | //Blank Row 163 | writer.WriteLine(""); 164 | writer.WriteLine("3"); 165 | writer.WriteLine("\"\""); 166 | writer.WriteLine(""); 167 | writer.WriteLine("1"); 168 | writer.WriteLine(""); 169 | 170 | //Netvars 171 | writer.WriteLine(""); 172 | writer.WriteLine("4"); 173 | writer.WriteLine("\"Netvars\""); 174 | writer.WriteLine(""); 175 | writer.WriteLine(""); 176 | writer.WriteLine("0000FF"); 177 | writer.WriteLine("1"); 178 | 179 | //Entries in netvars 180 | writer.WriteLine(""); 181 | 182 | var SortedNetVars = netvars.OrderBy(x => x.Key); 183 | foreach (var netvar in SortedNetVars) 184 | { 185 | int index = SortedNetVars.ToList().IndexOf(netvar) * 10;//Just make the netvars end with `0` 186 | writer.WriteLine(""); 187 | writer.WriteLine($"{index}"); 188 | writer.WriteLine($"\"{netvar.Key}\""); 189 | writer.WriteLine($"0"); 190 | writer.WriteLine($"4 Bytes"); 191 | writer.WriteLine($"
{netvar.Key}
"); 192 | writer.WriteLine($"
"); 193 | } 194 | writer.WriteLine($"
"); 195 | writer.WriteLine($"
"); 196 | 197 | //End netvars 198 | 199 | //Signatures 200 | writer.WriteLine(""); 201 | writer.WriteLine("5"); 202 | writer.WriteLine("\"Signatures\""); 203 | writer.WriteLine(""); 204 | writer.WriteLine(""); 205 | writer.WriteLine("0000FF"); 206 | writer.WriteLine("1"); 207 | 208 | //Entries in signatures 209 | writer.WriteLine(""); 210 | 211 | var SortedSigs = signatures.OrderBy(x => x.Key); 212 | foreach (var sig in SortedSigs) 213 | { 214 | int index = SortedNetVars.ToList().IndexOf(sig) * 100;//Just make the netvars end with `0` 215 | writer.WriteLine(""); 216 | writer.WriteLine($"{index}"); 217 | writer.WriteLine($"\"{sig.Key}\""); 218 | writer.WriteLine($"0"); 219 | writer.WriteLine($"4 Bytes"); 220 | writer.WriteLine($"
{sig.Key}
"); 221 | writer.WriteLine($"
"); 222 | } 223 | writer.WriteLine($"
"); 224 | writer.WriteLine($"
"); 225 | 226 | //End signatures 227 | 228 | 229 | //LocalPlayer 230 | writer.WriteLine(""); 231 | writer.WriteLine("6"); 232 | writer.WriteLine("\"Local Player\""); 233 | writer.WriteLine(""); 234 | writer.WriteLine(""); 235 | writer.WriteLine("C22925"); 236 | writer.WriteLine("1"); 237 | 238 | 239 | //Entries in LocalPlayer 240 | writer.WriteLine(""); 241 | 242 | var AllClasses = allClasses.SourceClass.OrderBy(x => x.Offset).ToList(); 243 | foreach (var offset in AllClasses) 244 | { 245 | if (AppConfig.CurrentConfig.LocalPlayerClasses.Any(offset.ClassName.Contains)) 246 | { 247 | GenerateDynamicCheatEntry(AllClasses, offset, writer); 248 | } 249 | 250 | } 251 | writer.WriteLine($""); 252 | writer.WriteLine($""); 253 | 254 | //End LocalPlayer 255 | 256 | writer.WriteLine($"
"); 257 | writer.WriteLine($""); 258 | 259 | List AddedOffsets = new List(); 260 | 261 | foreach (var item in netvars) 262 | { 263 | if (!AddedOffsets.Contains(item.Key)) 264 | { 265 | writer.WriteLine($""); 266 | writer.WriteLine($"{item.Key}"); 267 | writer.WriteLine($"
0x{item.Value.ToString("X")}
"); 268 | writer.WriteLine($"
"); 269 | AddedOffsets.Add(item.Key); 270 | } 271 | } 272 | 273 | foreach (var item in signatures) 274 | { 275 | if (!AddedOffsets.Contains(item.Key)) 276 | { 277 | writer.WriteLine($""); 278 | writer.WriteLine($"{item.Key}"); 279 | writer.WriteLine($"
0x{item.Value.ToString("X")}
"); 280 | writer.WriteLine($"
"); 281 | AddedOffsets.Add(item.Key); 282 | } 283 | } 284 | 285 | foreach (var item in allClasses.SourceClass) 286 | { 287 | if (!AddedOffsets.Contains(item.VariableName)) 288 | { 289 | writer.WriteLine($""); 290 | writer.WriteLine($"{item.VariableName}"); 291 | writer.WriteLine($"
0x{item.Offset.ToString("X")}
"); 292 | writer.WriteLine($"
"); 293 | } 294 | } 295 | 296 | 297 | writer.WriteLine($"
"); 298 | 299 | 300 | writer.Write($"
"); 301 | 302 | writer.Flush(); 303 | } 304 | 305 | AnsiConsole.MarkupLine($"[blue]Dumped to [green]{filename}[/][/]"); 306 | } 307 | 308 | 309 | //All netvar dumpers 310 | public static void DumpJson(dwGetAllClasses.ClassExporter.SourceClassRoot allClasses) 311 | { 312 | string filename = "Classes\\netvardump"; 313 | Directory.CreateDirectory("Classes"); 314 | 315 | File.WriteAllText(filename + ".json", JsonSerializer.Serialize(allClasses.SourceClass, new JsonSerializerOptions() { WriteIndented = true })); 316 | File.WriteAllText(filename + ".min.json", JsonSerializer.Serialize(allClasses.SourceClass)); 317 | 318 | AnsiConsole.MarkupLine($"[blue]Dumped to [green]{filename}.json[/][/]"); 319 | AnsiConsole.MarkupLine($"[blue]Dumped to [green]{filename}.min.json[/][/]"); 320 | 321 | } 322 | 323 | public static void DumpCPP(ClassExporter.SourceClassRoot allClasses) 324 | { 325 | string filename = "Classes\\netvardump.hpp"; 326 | Directory.CreateDirectory("Classes"); 327 | 328 | using (StreamWriter writer = File.CreateText(filename)) 329 | { 330 | writer.WriteLine("#pragma once"); 331 | writer.WriteLine("#include "); 332 | writer.WriteLine("#include "); 333 | writer.WriteLine(""); 334 | writer.WriteLine($"// {DateTime.UtcNow.ToString("yyyy-MM-dd hh:mm:tt")} UTC"); 335 | writer.WriteLine(""); 336 | 337 | writer.WriteLine("#define STR_MERGE_IMPL(a, b) a##b"); 338 | writer.WriteLine("#define STR_MERGE(a, b) STR_MERGE_IMPL(a, b)"); 339 | writer.WriteLine("#define MAKE_PAD(size) STR_MERGE(_pad, __COUNTER__)[size]"); 340 | writer.WriteLine("#define DEFINE_MEMBER_N(type, name, offset) struct {unsigned char MAKE_PAD(offset); type name;}"); 341 | writer.WriteLine("struct Vector3 { float x, y, z; };"); 342 | 343 | writer.WriteLine(""); 344 | writer.WriteLine($"namespace {AppConfig.CurrentConfig.ExportNamespace}"); 345 | writer.WriteLine("{"); 346 | writer.WriteLine($" constexpr int64_t timestamp = {DateTimeOffset.UtcNow.ToUnixTimeSeconds()};"); 347 | 348 | string previousClass = ""; 349 | 350 | List AllClasses = allClasses.SourceClass.OrderBy(x => x.ClassName).ToList(); 351 | for (int i = 0; i < AllClasses.Count(); i++) 352 | { 353 | string currentClassName = AllClasses[i].ClassName; 354 | string offset = $"0x{AllClasses[i].Offset.ToString("X")}"; 355 | if (previousClass != currentClassName) 356 | { 357 | writer.WriteLine($" class {currentClassName}"); 358 | writer.WriteLine(" {"); 359 | writer.WriteLine(" public:"); 360 | writer.WriteLine(" union"); 361 | writer.WriteLine(" {"); 362 | } 363 | 364 | string VarToType = VariableNameToDataType(AllClasses[i].VariableName); 365 | 366 | 367 | writer.WriteLine($" DEFINE_MEMBER_N({VarToType}, {AllClasses[i].VariableName.Replace(".", "")},{offset} );"); 368 | 369 | 370 | if (i + 1 < AllClasses.Count && currentClassName != AllClasses[i + 1].ClassName) 371 | { 372 | writer.WriteLine(" };"); 373 | writer.WriteLine(" };"); 374 | } 375 | else if (i == AllClasses.Count - 1)//Add the last item properly 376 | { 377 | writer.WriteLine(" };"); 378 | writer.WriteLine(" };"); 379 | } 380 | previousClass = currentClassName; 381 | } 382 | 383 | 384 | writer.Write($"}} // namespace {AppConfig.CurrentConfig.ExportNamespace}"); 385 | 386 | writer.Flush(); 387 | } 388 | AnsiConsole.MarkupLine($"[blue]Dumped to [green]{filename}[/][/]"); 389 | } 390 | 391 | 392 | 393 | internal static string VariableNameToDataType(string varName) 394 | { 395 | if (varName.StartsWith("m_b")) 396 | return "char"; 397 | if (varName.StartsWith("m_i") || varName.StartsWith("m_n")) 398 | return "int"; 399 | 400 | if (varName.StartsWith("m_sz")) 401 | return "std::string"; 402 | if (varName.StartsWith("m_fl")) 403 | return "float"; 404 | 405 | if (varName.StartsWith("m_vec")) 406 | return "Vector3"; 407 | 408 | 409 | 410 | 411 | return "int"; 412 | } 413 | 414 | internal static string VariableNameToCEDataType(string varName) 415 | { 416 | if (varName.StartsWith("m_b")) 417 | return "Byte"; 418 | if (varName.StartsWith("m_i") || varName.StartsWith("m_n") || varName.StartsWith("int")) 419 | return "4 Bytes"; 420 | 421 | if (varName.StartsWith("m_sz")) 422 | return "String"; 423 | if (varName.StartsWith("m_fl")) 424 | return "Float"; 425 | 426 | if (varName.StartsWith("m_vec")) 427 | return "Vector3"; 428 | 429 | 430 | 431 | 432 | return "4 Bytes"; 433 | } 434 | 435 | 436 | private static void GenerateDynamicCheatEntry(List AllClasses, ClassExporter.SourceClass offset, StreamWriter writer) 437 | { 438 | int index = AllClasses.ToList().IndexOf(offset) * 1000; 439 | string VariableType = VariableNameToCEDataType(offset.VariableName); 440 | 441 | if (VariableType != "Vector3") 442 | { 443 | writer.WriteLine(""); 444 | writer.WriteLine($"{index}"); 445 | writer.WriteLine($"\"{offset.VariableName}\""); 446 | writer.WriteLine($"0"); 447 | writer.WriteLine($"{VariableType}"); 448 | writer.WriteLine($"
[client.dll + dwLocalPlayer] + {offset.VariableName}
"); 449 | writer.WriteLine($"
"); 450 | } 451 | else 452 | { 453 | //X 454 | writer.WriteLine(""); 455 | writer.WriteLine($"{index}"); 456 | writer.WriteLine($"\"{offset.VariableName} (X)\""); 457 | writer.WriteLine($"0"); 458 | writer.WriteLine($"Float"); 459 | writer.WriteLine($"
[client.dll + dwLocalPlayer] + {offset.VariableName}
"); 460 | writer.WriteLine($"
"); 461 | 462 | //Y 463 | writer.WriteLine(""); 464 | writer.WriteLine($"{index}"); 465 | writer.WriteLine($"\"{offset.VariableName} (Y)\""); 466 | writer.WriteLine($"0"); 467 | writer.WriteLine($"Float"); 468 | writer.WriteLine($"
[client.dll + dwLocalPlayer] + {offset.VariableName} + 0x4
"); 469 | writer.WriteLine($"
"); 470 | 471 | //Z 472 | writer.WriteLine(""); 473 | writer.WriteLine($"{index}"); 474 | writer.WriteLine($"\"{offset.VariableName} (Z)\""); 475 | writer.WriteLine($"0"); 476 | writer.WriteLine($"4 Bytes"); 477 | writer.WriteLine($"
[client.dll + dwLocalPlayer] + {offset.VariableName} + 0x8
"); 478 | writer.WriteLine($"
"); 479 | } 480 | 481 | 482 | } 483 | } 484 | } 485 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "executable": "csgo.exe", 3 | "filename": "csgo", 4 | "signatures": [ 5 | { 6 | "name": "dwClientState", 7 | "extra": 0, 8 | "relative": true, 9 | "module": "engine.dll", 10 | "offsets": [ 11 | 1 12 | ], 13 | "pattern": "A1 ? ? ? ? 33 D2 6A 00 6A 00 33 C9 89 B0" 14 | }, 15 | { 16 | "name": "dwClientState_GetLocalPlayer", 17 | "extra": 0, 18 | "relative": false, 19 | "module": "engine.dll", 20 | "offsets": [ 21 | 2 22 | ], 23 | "pattern": "8B 80 ? ? ? ? 40 C3" 24 | }, 25 | { 26 | "name": "dwClientState_IsHLTV", 27 | "extra": 0, 28 | "relative": false, 29 | "module": "engine.dll", 30 | "offsets": [ 31 | 2 32 | ], 33 | "pattern": "80 BF ? ? ? ? ? 0F 84 ? ? ? ? 32 DB" 34 | }, 35 | { 36 | "name": "dwClientState_Map", 37 | "extra": 0, 38 | "relative": false, 39 | "module": "engine.dll", 40 | "offsets": [ 41 | 1 42 | ], 43 | "pattern": "05 ? ? ? ? C3 CC CC CC CC CC CC CC A1" 44 | }, 45 | { 46 | "name": "dwClientState_MapDirectory", 47 | "extra": 0, 48 | "relative": false, 49 | "module": "engine.dll", 50 | "offsets": [ 51 | 7 52 | ], 53 | "pattern": "B8 ? ? ? ? C3 05 ? ? ? ? C3" 54 | }, 55 | { 56 | "name": "dwClientState_MaxPlayer", 57 | "extra": 0, 58 | "relative": false, 59 | "module": "engine.dll", 60 | "offsets": [ 61 | 7 62 | ], 63 | "pattern": "A1 ? ? ? ? 8B 80 ? ? ? ? C3 CC CC CC CC 55 8B EC 8A 45 08" 64 | }, 65 | { 66 | "name": "dwClientState_PlayerInfo", 67 | "extra": 0, 68 | "relative": false, 69 | "module": "engine.dll", 70 | "offsets": [ 71 | 2 72 | ], 73 | "pattern": "8B 89 ? ? ? ? 85 C9 0F 84 ? ? ? ? 8B 01" 74 | }, 75 | { 76 | "name": "dwClientState_State", 77 | "extra": 0, 78 | "relative": false, 79 | "module": "engine.dll", 80 | "offsets": [ 81 | 2 82 | ], 83 | "pattern": "83 B8 ? ? ? ? ? 0F 94 C0 C3" 84 | }, 85 | { 86 | "name": "dwClientState_ViewAngles", 87 | "extra": 0, 88 | "relative": false, 89 | "module": "engine.dll", 90 | "offsets": [ 91 | 4 92 | ], 93 | "pattern": "F3 0F 11 86 ? ? ? ? F3 0F 10 44 24 ? F3 0F 11 86" 94 | }, 95 | { 96 | "name": "clientstate_delta_ticks", 97 | "extra": 0, 98 | "relative": false, 99 | "module": "engine.dll", 100 | "offsets": [ 101 | 2 102 | ], 103 | "pattern": "C7 87 ? ? ? ? ? ? ? ? FF 15 ? ? ? ? 83 C4 08" 104 | }, 105 | { 106 | "name": "clientstate_last_outgoing_command", 107 | "extra": 0, 108 | "relative": false, 109 | "module": "engine.dll", 110 | "offsets": [ 111 | 2 112 | ], 113 | "pattern": "8B 8F ? ? ? ? 8B 87 ? ? ? ? 41" 114 | }, 115 | { 116 | "name": "clientstate_choked_commands", 117 | "extra": 0, 118 | "relative": false, 119 | "module": "engine.dll", 120 | "offsets": [ 121 | 2 122 | ], 123 | "pattern": "8B 87 ? ? ? ? 41" 124 | }, 125 | { 126 | "name": "clientstate_net_channel", 127 | "extra": 0, 128 | "relative": false, 129 | "module": "engine.dll", 130 | "offsets": [ 131 | 2 132 | ], 133 | "pattern": "8B 8F ? ? ? ? 8B 01 8B 40 18" 134 | }, 135 | { 136 | "name": "dwEntityList", 137 | "extra": 0, 138 | "relative": true, 139 | "module": "client.dll", 140 | "offsets": [ 141 | 1 142 | ], 143 | "pattern": "BB ? ? ? ? 83 FF 01 0F 8C ? ? ? ? 3B F8" 144 | }, 145 | { 146 | "name": "dwForceAttack", 147 | "extra": 0, 148 | "relative": true, 149 | "module": "client.dll", 150 | "offsets": [ 151 | 2 152 | ], 153 | "pattern": "89 0D ? ? ? ? 8B 0D ? ? ? ? 8B F2 8B C1 83 CE 04" 154 | }, 155 | { 156 | "name": "dwForceAttack2", 157 | "extra": 12, 158 | "relative": true, 159 | "module": "client.dll", 160 | "offsets": [ 161 | 2 162 | ], 163 | "pattern": "89 0D ? ? ? ? 8B 0D ? ? ? ? 8B F2 8B C1 83 CE 04" 164 | }, 165 | { 166 | "name": "dwForceBackward", 167 | "extra": 0, 168 | "relative": true, 169 | "module": "client.dll", 170 | "offsets": [ 171 | 287 172 | ], 173 | "pattern": "55 8B EC 51 53 8A 5D 08" 174 | }, 175 | { 176 | "name": "dwForceForward", 177 | "extra": 0, 178 | "relative": true, 179 | "module": "client.dll", 180 | "offsets": [ 181 | 245 182 | ], 183 | "pattern": "55 8B EC 51 53 8A 5D 08" 184 | }, 185 | { 186 | "name": "dwForceJump", 187 | "extra": 0, 188 | "relative": true, 189 | "module": "client.dll", 190 | "offsets": [ 191 | 2 192 | ], 193 | "pattern": "8B 0D ? ? ? ? 8B D6 8B C1 83 CA 02" 194 | }, 195 | { 196 | "name": "dwForceLeft", 197 | "extra": 0, 198 | "relative": true, 199 | "module": "client.dll", 200 | "offsets": [ 201 | 465 202 | ], 203 | "pattern": "55 8B EC 51 53 8A 5D 08" 204 | }, 205 | { 206 | "name": "dwForceRight", 207 | "extra": 0, 208 | "relative": true, 209 | "module": "client.dll", 210 | "offsets": [ 211 | 512 212 | ], 213 | "pattern": "55 8B EC 51 53 8A 5D 08" 214 | }, 215 | { 216 | "name": "dwGameDir", 217 | "extra": 0, 218 | "relative": true, 219 | "module": "engine.dll", 220 | "offsets": [ 221 | 1 222 | ], 223 | "pattern": "68 ? ? ? ? 8D 85 ? ? ? ? 50 68 ? ? ? ? 68" 224 | }, 225 | { 226 | "name": "dwGameRulesProxy", 227 | "extra": 0, 228 | "relative": true, 229 | "module": "client.dll", 230 | "offsets": [ 231 | 1 232 | ], 233 | "pattern": "A1 ? ? ? ? 85 C0 0F 84 ? ? ? ? 80 B8 ? ? ? ? ? 74 7A" 234 | }, 235 | { 236 | "name": "dwGetAllClasses", 237 | "extra": 0, 238 | "relative": true, 239 | "module": "client.dll", 240 | "offsets": [ 241 | 1, 242 | 0 243 | ], 244 | "pattern": "A1 ? ? ? ? C3 CC CC CC CC CC CC CC CC CC CC A1 ? ? ? ? B9" 245 | }, 246 | { 247 | "name": "dwGlobalVars", 248 | "extra": 0, 249 | "relative": true, 250 | "module": "engine.dll", 251 | "offsets": [ 252 | 1 253 | ], 254 | "pattern": "68 ? ? ? ? 68 ? ? ? ? FF 50 08 85 C0" 255 | }, 256 | { 257 | "name": "dwGlowObjectManager", 258 | "extra": 4, 259 | "relative": true, 260 | "module": "client.dll", 261 | "offsets": [ 262 | 1 263 | ], 264 | "pattern": "A1 ? ? ? ? A8 01 75 4B" 265 | }, 266 | { 267 | "name": "dwInput", 268 | "extra": 0, 269 | "relative": true, 270 | "module": "client.dll", 271 | "offsets": [ 272 | 1 273 | ], 274 | "pattern": "B9 ? ? ? ? F3 0F 11 04 24 FF 50 10" 275 | }, 276 | { 277 | "name": "dwInterfaceLinkList", 278 | "extra": 0, 279 | "relative": true, 280 | "module": "client.dll", 281 | "offsets": [], 282 | "pattern": "8B 35 ? ? ? ? 57 85 F6 74 ? 8B 7D 08 8B 4E 04 8B C7 8A 11 3A 10" 283 | }, 284 | { 285 | "name": "dwLocalPlayer", 286 | "extra": 4, 287 | "relative": true, 288 | "module": "client.dll", 289 | "offsets": [ 290 | 3 291 | ], 292 | "pattern": "8D 34 85 ? ? ? ? 89 15 ? ? ? ? 8B 41 08 8B 48 04 83 F9 FF" 293 | }, 294 | { 295 | "name": "dwMouseEnable", 296 | "extra": 48, 297 | "relative": true, 298 | "module": "client.dll", 299 | "offsets": [ 300 | 1 301 | ], 302 | "pattern": "B9 ? ? ? ? FF 50 34 85 C0 75 10" 303 | }, 304 | { 305 | "name": "dwMouseEnablePtr", 306 | "extra": 0, 307 | "relative": true, 308 | "module": "client.dll", 309 | "offsets": [ 310 | 1 311 | ], 312 | "pattern": "B9 ? ? ? ? FF 50 34 85 C0 75 10" 313 | }, 314 | { 315 | "name": "dwPlayerResource", 316 | "extra": 0, 317 | "relative": true, 318 | "module": "client.dll", 319 | "offsets": [ 320 | 2 321 | ], 322 | "pattern": "8B 3D ? ? ? ? 85 FF 0F 84 ? ? ? ? 81 C7" 323 | }, 324 | { 325 | "name": "dwRadarBase", 326 | "extra": 0, 327 | "relative": true, 328 | "module": "client.dll", 329 | "offsets": [ 330 | 1 331 | ], 332 | "pattern": "A1 ? ? ? ? 8B 0C B0 8B 01 FF 50 ? 46 3B 35 ? ? ? ? 7C EA 8B 0D" 333 | }, 334 | { 335 | "name": "dwSensitivity", 336 | "extra": 44, 337 | "relative": true, 338 | "module": "client.dll", 339 | "offsets": [ 340 | 2 341 | ], 342 | "pattern": "81 F9 ? ? ? ? 75 1D F3 0F 10 05 ? ? ? ? F3 0F 11 44 24 ? 8B 44 24 0C 35 ? ? ? ? 89 44 24 0C" 343 | }, 344 | { 345 | "name": "dwSensitivityPtr", 346 | "extra": 0, 347 | "relative": true, 348 | "module": "client.dll", 349 | "offsets": [ 350 | 2 351 | ], 352 | "pattern": "81 F9 ? ? ? ? 75 1D F3 0F 10 05 ? ? ? ? F3 0F 11 44 24 ? 8B 44 24 0C 35 ? ? ? ? 89 44 24 0C" 353 | }, 354 | { 355 | "name": "dwSetClanTag", 356 | "extra": 0, 357 | "relative": true, 358 | "module": "engine.dll", 359 | "offsets": [], 360 | "pattern": "53 56 57 8B DA 8B F9 FF 15" 361 | }, 362 | { 363 | "name": "dwViewMatrix", 364 | "extra": 176, 365 | "relative": true, 366 | "module": "client.dll", 367 | "offsets": [ 368 | 3 369 | ], 370 | "pattern": "0F 10 05 ? ? ? ? 8D 85 ? ? ? ? B9" 371 | }, 372 | { 373 | "name": "dwWeaponTable", 374 | "extra": 0, 375 | "relative": true, 376 | "module": "client.dll", 377 | "offsets": [ 378 | 1 379 | ], 380 | "pattern": "B9 ? ? ? ? 6A 00 FF 50 08 C3" 381 | }, 382 | { 383 | "name": "dwWeaponTableIndex", 384 | "extra": 0, 385 | "relative": false, 386 | "module": "client.dll", 387 | "offsets": [ 388 | 2 389 | ], 390 | "pattern": "39 86 ? ? ? ? 74 06 89 86 ? ? ? ? 8B 86" 391 | }, 392 | { 393 | "name": "dwYawPtr", 394 | "extra": 0, 395 | "relative": true, 396 | "module": "client.dll", 397 | "offsets": [ 398 | 2 399 | ], 400 | "pattern": "81 F9 ? ? ? ? 75 16 F3 0F 10 05 ? ? ? ? F3 0F 11 45 ? 81 75 ? ? ? ? ? EB 0A 8B 01 8B 40 30 FF D0 D9 5D 0C 8B 55 08" 401 | }, 402 | { 403 | "name": "dwZoomSensitivityRatioPtr", 404 | "extra": 0, 405 | "relative": true, 406 | "module": "client.dll", 407 | "offsets": [ 408 | 2 409 | ], 410 | "pattern": "81 F9 ? ? ? ? 75 1A F3 0F 10 05 ? ? ? ? F3 0F 11 45 ? 8B 45 F4 35 ? ? ? ? 89 45 FC EB 0A 8B 01 8B 40 30 FF D0 D9 5D FC A1" 411 | }, 412 | { 413 | "name": "dwbSendPackets", 414 | "extra": 1, 415 | "relative": true, 416 | "module": "engine.dll", 417 | "offsets": [], 418 | "pattern": "B3 01 8B 01 8B 40 10 FF D0 84 C0 74 0F 80 BF ? ? ? ? ? 0F 84" 419 | }, 420 | { 421 | "name": "dwppDirect3DDevice9", 422 | "extra": 0, 423 | "relative": true, 424 | "module": "shaderapidx9.dll", 425 | "offsets": [ 426 | 1 427 | ], 428 | "pattern": "A1 ? ? ? ? 50 8B 08 FF 51 0C" 429 | }, 430 | { 431 | "name": "m_pStudioHdr", 432 | "extra": 0, 433 | "relative": false, 434 | "module": "client.dll", 435 | "offsets": [ 436 | 2 437 | ], 438 | "pattern": "8B B6 ? ? ? ? 85 F6 74 05 83 3E 00 75 02 33 F6 F3 0F 10 44 24" 439 | }, 440 | { 441 | "name": "m_yawClassPtr", 442 | "extra": 0, 443 | "relative": true, 444 | "module": "client.dll", 445 | "offsets": [ 446 | 2 447 | ], 448 | "pattern": "81 F9 ? ? ? ? 75 16 F3 0F 10 05 ? ? ? ? F3 0F 11 45 ? 81 75 ? ? ? ? ? EB 0A 8B 01 8B 40 30 FF D0 D9 5D 0C 8B 55 08" 449 | }, 450 | { 451 | "name": "m_pitchClassPtr", 452 | "extra": 0, 453 | "relative": true, 454 | "module": "client.dll", 455 | "offsets": [ 456 | 1 457 | ], 458 | "pattern": "A1 ? ? ? ? 89 74 24 28" 459 | }, 460 | { 461 | "name": "interface_engine_cvar", 462 | "extra": 0, 463 | "relative": true, 464 | "module": "vstdlib.dll", 465 | "offsets": [ 466 | 2 467 | ], 468 | "pattern": "8B 0D ? ? ? ? C7 05" 469 | }, 470 | { 471 | "name": "convar_name_hash_table", 472 | "extra": 0, 473 | "relative": true, 474 | "module": "vstdlib.dll", 475 | "offsets": [ 476 | 3 477 | ], 478 | "pattern": "8B 3C 85" 479 | }, 480 | { 481 | "name": "m_bDormant", 482 | "extra": 8, 483 | "relative": false, 484 | "module": "client.dll", 485 | "offsets": [ 486 | 2 487 | ], 488 | "pattern": "8A 81 ? ? ? ? C3 32 C0" 489 | }, 490 | { 491 | "name": "model_ambient_min", 492 | "extra": 0, 493 | "relative": true, 494 | "module": "engine.dll", 495 | "offsets": [ 496 | 4 497 | ], 498 | "pattern": "F3 0F 10 0D ? ? ? ? F3 0F 11 4C 24 ? 8B 44 24 20 35 ? ? ? ? 89 44 24 0C" 499 | }, 500 | { 501 | "name": "set_abs_angles", 502 | "extra": 0, 503 | "relative": true, 504 | "module": "client.dll", 505 | "pattern": "55 8B EC 83 E4 F8 83 EC 64 53 56 57 8B F1 E8" 506 | }, 507 | { 508 | "name": "set_abs_origin", 509 | "extra": 0, 510 | "relative": true, 511 | "module": "client.dll", 512 | "pattern": "55 8B EC 83 E4 F8 51 53 56 57 8B F1 E8" 513 | }, 514 | { 515 | "name": "is_c4_owner", 516 | "extra": 0, 517 | "relative": true, 518 | "module": "client.dll", 519 | "pattern": "56 8B F1 85 F6 74 31" 520 | }, 521 | { 522 | "name": "force_update_spectator_glow", 523 | "extra": 0, 524 | "relative": true, 525 | "module": "client.dll", 526 | "pattern": "74 07 8B CB E8 ? ? ? ? 83 C7 10" 527 | }, 528 | { 529 | "name": "anim_overlays", 530 | "extra": 0, 531 | "relative": false, 532 | "module": "client.dll", 533 | "offsets": [ 534 | 2 535 | ], 536 | "pattern": "8B 89 ? ? ? ? 8D 0C D1" 537 | }, 538 | { 539 | "name": "m_flSpawnTime", 540 | "extra": 0, 541 | "relative": false, 542 | "module": "client.dll", 543 | "offsets": [ 544 | 2 545 | ], 546 | "pattern": "89 86 ? ? ? ? E8 ? ? ? ? 80 BE ? ? ? ? ?" 547 | }, 548 | { 549 | "name": "find_hud_element", 550 | "extra": 0, 551 | "relative": false, 552 | "module": "client.dll", 553 | "pattern": "55 8B EC 53 8B 5D 08 56 57 8B F9 33 F6 39 77 28" 554 | } 555 | ], 556 | "netvars": [ 557 | { 558 | "name": "m_ArmorValue", 559 | "prop": "m_ArmorValue", 560 | "table": "DT_CSPlayer" 561 | }, 562 | { 563 | "name": "m_Collision", 564 | "prop": "m_Collision", 565 | "table": "DT_BasePlayer" 566 | }, 567 | { 568 | "name": "m_CollisionGroup", 569 | "prop": "m_CollisionGroup", 570 | "table": "DT_CSPlayer" 571 | }, 572 | { 573 | "name": "m_Local", 574 | "prop": "m_Local", 575 | "table": "DT_BasePlayer" 576 | }, 577 | { 578 | "name": "m_MoveType", 579 | "prop": "m_nRenderMode", 580 | "offset": 1, 581 | "table": "DT_CSPlayer" 582 | }, 583 | { 584 | "name": "m_OriginalOwnerXuidHigh", 585 | "prop": "m_OriginalOwnerXuidHigh", 586 | "table": "DT_BaseAttributableItem" 587 | }, 588 | { 589 | "name": "m_OriginalOwnerXuidLow", 590 | "prop": "m_OriginalOwnerXuidLow", 591 | "table": "DT_BaseAttributableItem" 592 | }, 593 | { 594 | "name": "m_aimPunchAngle", 595 | "prop": "m_aimPunchAngle", 596 | "table": "DT_BasePlayer" 597 | }, 598 | { 599 | "name": "m_aimPunchAngleVel", 600 | "prop": "m_aimPunchAngleVel", 601 | "table": "DT_BasePlayer" 602 | }, 603 | { 604 | "name": "m_bGunGameImmunity", 605 | "prop": "m_bGunGameImmunity", 606 | "table": "DT_CSPlayer" 607 | }, 608 | { 609 | "name": "m_bHasDefuser", 610 | "prop": "m_bHasDefuser", 611 | "table": "DT_CSPlayer" 612 | }, 613 | { 614 | "name": "m_bHasHelmet", 615 | "prop": "m_bHasHelmet", 616 | "table": "DT_CSPlayer" 617 | }, 618 | { 619 | "name": "m_bInReload", 620 | "prop": "m_flNextPrimaryAttack", 621 | "offset": 109, 622 | "table": "DT_BaseCombatWeapon" 623 | }, 624 | { 625 | "name": "m_bIsDefusing", 626 | "prop": "m_bIsDefusing", 627 | "table": "DT_CSPlayer" 628 | }, 629 | { 630 | "name": "m_bIsScoped", 631 | "prop": "m_bIsScoped", 632 | "table": "DT_CSPlayer" 633 | }, 634 | { 635 | "name": "m_bSpotted", 636 | "prop": "m_bSpotted", 637 | "table": "DT_BaseEntity" 638 | }, 639 | { 640 | "name": "m_bSpottedByMask", 641 | "prop": "m_bSpottedByMask", 642 | "table": "DT_BaseEntity" 643 | }, 644 | { 645 | "name": "m_dwBoneMatrix", 646 | "prop": "m_nForceBone", 647 | "offset": 28, 648 | "table": "DT_BaseAnimating" 649 | }, 650 | { 651 | "name": "m_fAccuracyPenalty", 652 | "prop": "m_fAccuracyPenalty", 653 | "table": "DT_WeaponCSBase" 654 | }, 655 | { 656 | "name": "m_fFlags", 657 | "prop": "m_fFlags", 658 | "table": "DT_CSPlayer" 659 | }, 660 | { 661 | "name": "m_hViewModel", 662 | "prop": "m_hViewModel[0]", 663 | "table": "DT_CSPlayer" 664 | }, 665 | { 666 | "name": "m_flFallbackWear", 667 | "prop": "m_flFallbackWear", 668 | "table": "DT_BaseAttributableItem" 669 | }, 670 | { 671 | "name": "m_flFlashDuration", 672 | "prop": "m_flFlashDuration", 673 | "table": "DT_CSPlayer" 674 | }, 675 | { 676 | "name": "m_flFlashMaxAlpha", 677 | "prop": "m_flFlashMaxAlpha", 678 | "table": "DT_CSPlayer" 679 | }, 680 | { 681 | "name": "m_flNextPrimaryAttack", 682 | "prop": "m_flNextPrimaryAttack", 683 | "table": "DT_BaseCombatWeapon" 684 | }, 685 | { 686 | "name": "m_hActiveWeapon", 687 | "prop": "m_hActiveWeapon", 688 | "table": "DT_BasePlayer" 689 | }, 690 | { 691 | "name": "m_hMyWeapons", 692 | "prop": "m_hActiveWeapon", 693 | "offset": -256, 694 | "table": "DT_BasePlayer" 695 | }, 696 | { 697 | "name": "m_hObserverTarget", 698 | "prop": "m_hObserverTarget", 699 | "table": "DT_BasePlayer" 700 | }, 701 | { 702 | "name": "m_hOwner", 703 | "prop": "m_hOwner", 704 | "table": "DT_PredictedViewModel" 705 | }, 706 | { 707 | "name": "m_hOwnerEntity", 708 | "prop": "m_hOwnerEntity", 709 | "table": "DT_CSPlayer" 710 | }, 711 | { 712 | "name": "m_iAccountID", 713 | "prop": "m_iAccountID", 714 | "table": "DT_BaseAttributableItem" 715 | }, 716 | { 717 | "name": "m_iClip1", 718 | "prop": "m_iClip1", 719 | "table": "DT_BaseCombatWeapon" 720 | }, 721 | { 722 | "name": "m_zoomLevel", 723 | "prop": "m_zoomLevel", 724 | "table": "DT_WeaponCSBaseGun" 725 | }, 726 | { 727 | "name": "m_iCompetitiveRanking", 728 | "prop": "m_iCompetitiveRanking", 729 | "table": "DT_CSPlayerResource" 730 | }, 731 | { 732 | "name": "m_iCompetitiveWins", 733 | "prop": "m_iCompetitiveWins", 734 | "table": "DT_CSPlayerResource" 735 | }, 736 | { 737 | "name": "m_iCrosshairId", 738 | "prop": "m_bHasDefuser", 739 | "offset": 92, 740 | "table": "DT_CSPlayer" 741 | }, 742 | { 743 | "name": "m_iEntityQuality", 744 | "prop": "m_iEntityQuality", 745 | "table": "DT_BaseAttributableItem" 746 | }, 747 | { 748 | "name": "m_iFOVStart", 749 | "prop": "m_iFOVStart", 750 | "table": "DT_CSPlayer" 751 | }, 752 | { 753 | "name": "m_iGlowIndex", 754 | "prop": "m_flFlashDuration", 755 | "offset": 24, 756 | "table": "DT_CSPlayer" 757 | }, 758 | { 759 | "name": "m_iHealth", 760 | "prop": "m_iHealth", 761 | "table": "DT_BasePlayer" 762 | }, 763 | { 764 | "name": "m_iItemDefinitionIndex", 765 | "prop": "m_iItemDefinitionIndex", 766 | "table": "DT_BaseCombatWeapon" 767 | }, 768 | { 769 | "name": "m_iItemIDHigh", 770 | "prop": "m_iItemIDHigh", 771 | "table": "DT_BaseAttributableItem" 772 | }, 773 | { 774 | "name": "m_iObserverMode", 775 | "prop": "m_iObserverMode", 776 | "table": "DT_BasePlayer" 777 | }, 778 | { 779 | "name": "m_iShotsFired", 780 | "prop": "m_iShotsFired", 781 | "table": "DT_CSPlayer" 782 | }, 783 | { 784 | "name": "m_iState", 785 | "prop": "m_iState", 786 | "table": "DT_BaseCombatWeapon" 787 | }, 788 | { 789 | "name": "m_iTeamNum", 790 | "prop": "m_iTeamNum", 791 | "table": "DT_BasePlayer" 792 | }, 793 | { 794 | "name": "m_lifeState", 795 | "prop": "m_lifeState", 796 | "table": "DT_CSPlayer" 797 | }, 798 | { 799 | "name": "m_nFallbackPaintKit", 800 | "prop": "m_nFallbackPaintKit", 801 | "table": "DT_BaseAttributableItem" 802 | }, 803 | { 804 | "name": "m_nFallbackSeed", 805 | "prop": "m_nFallbackSeed", 806 | "table": "DT_BaseAttributableItem" 807 | }, 808 | { 809 | "name": "m_nFallbackStatTrak", 810 | "prop": "m_nFallbackStatTrak", 811 | "table": "DT_BaseAttributableItem" 812 | }, 813 | { 814 | "name": "m_szCustomName", 815 | "prop": "m_szCustomName", 816 | "table": "DT_BaseAttributableItem" 817 | }, 818 | { 819 | "name": "m_iDefaultFOV", 820 | "prop": "m_iDefaultFOV", 821 | "table": "DT_CSPlayer" 822 | }, 823 | { 824 | "name": "m_iFOV", 825 | "prop": "m_iFOV", 826 | "table": "DT_CSPlayer" 827 | }, 828 | { 829 | "name": "m_nForceBone", 830 | "prop": "m_nForceBone", 831 | "table": "DT_BaseAnimating" 832 | }, 833 | { 834 | "name": "m_nTickBase", 835 | "prop": "m_nTickBase", 836 | "table": "DT_BasePlayer" 837 | }, 838 | { 839 | "name": "m_rgflCoordinateFrame", 840 | "prop": "m_CollisionGroup", 841 | "offset": -48, 842 | "table": "DT_CSPlayer" 843 | }, 844 | { 845 | "name": "m_szCustomName", 846 | "prop": "m_szCustomName", 847 | "table": "DT_BaseAttributableItem" 848 | }, 849 | { 850 | "name": "m_szLastPlaceName", 851 | "prop": "m_szLastPlaceName", 852 | "table": "DT_CSPlayer" 853 | }, 854 | { 855 | "name": "m_vecOrigin", 856 | "prop": "m_vecOrigin", 857 | "table": "DT_BasePlayer" 858 | }, 859 | { 860 | "name": "m_vecVelocity", 861 | "prop": "m_vecVelocity[0]", 862 | "table": "DT_CSPlayer" 863 | }, 864 | { 865 | "name": "m_vecViewOffset", 866 | "prop": "m_vecViewOffset[0]", 867 | "table": "DT_CSPlayer" 868 | }, 869 | { 870 | "name": "m_viewPunchAngle", 871 | "prop": "m_viewPunchAngle", 872 | "table": "DT_BasePlayer" 873 | }, 874 | { 875 | "name": "m_thirdPersonViewAngles", 876 | "prop": "deadflag", 877 | "offset": 4, 878 | "table": "DT_CSPlayer" 879 | }, 880 | { 881 | "name": "m_clrRender", 882 | "prop": "m_clrRender", 883 | "table": "DT_BaseEntity" 884 | }, 885 | { 886 | "name": "m_bBombTicking", 887 | "prop": "m_bBombTicking", 888 | "table": "DT_PlantedC4" 889 | }, 890 | { 891 | "name": "m_bBombDefused", 892 | "prop": "m_bBombDefused", 893 | "table": "DT_PlantedC4" 894 | }, 895 | { 896 | "name": "m_flC4Blow", 897 | "prop": "m_flC4Blow", 898 | "table": "DT_PlantedC4" 899 | }, 900 | { 901 | "name": "m_hBombDefuser", 902 | "prop": "m_hBombDefuser", 903 | "table": "DT_PlantedC4" 904 | }, 905 | { 906 | "name": "m_flTimerLength", 907 | "prop": "m_flTimerLength", 908 | "table": "DT_PlantedC4" 909 | }, 910 | { 911 | "name": "m_flDefuseLength", 912 | "prop": "m_flDefuseLength", 913 | "table": "DT_PlantedC4" 914 | }, 915 | { 916 | "name": "m_flDefuseCountDown", 917 | "prop": "m_flDefuseCountDown", 918 | "table": "DT_PlantedC4" 919 | }, 920 | { 921 | "name": "m_nBombSite", 922 | "prop": "m_nBombSite", 923 | "table": "DT_PlantedC4" 924 | }, 925 | { 926 | "name": "cs_gamerules_data", 927 | "prop": "cs_gamerules_data", 928 | "table": "DT_CSGameRulesProxy" 929 | }, 930 | { 931 | "name": "m_SurvivalRules", 932 | "prop": "m_SurvivalRules", 933 | "table": "DT_CSGameRulesProxy" 934 | }, 935 | { 936 | "name": "m_SurvivalGameRuleDecisionTypes", 937 | "prop": "m_SurvivalGameRuleDecisionTypes", 938 | "table": "DT_CSGameRulesProxy" 939 | }, 940 | { 941 | "name": "m_bIsValveDS", 942 | "prop": "m_bIsValveDS", 943 | "table": "DT_CSGameRulesProxy" 944 | }, 945 | { 946 | "name": "m_bFreezePeriod", 947 | "prop": "m_bFreezePeriod", 948 | "table": "DT_CSGameRulesProxy" 949 | }, 950 | { 951 | "name": "m_bBombPlanted", 952 | "prop": "m_bBombPlanted", 953 | "table": "DT_CSGameRulesProxy" 954 | }, 955 | { 956 | "name": "m_bIsQueuedMatchmaking", 957 | "prop": "m_bIsQueuedMatchmaking", 958 | "table": "DT_CSGameRulesProxy" 959 | }, 960 | { 961 | "name": "m_flSimulationTime", 962 | "prop": "m_flSimulationTime", 963 | "table": "DT_CSPlayer" 964 | }, 965 | { 966 | "name": "m_flLowerBodyYawTarget", 967 | "prop": "m_flLowerBodyYawTarget", 968 | "table": "DT_CSPlayer" 969 | }, 970 | { 971 | "name": "m_angEyeAnglesX", 972 | "prop": "m_angEyeAngles[0]", 973 | "table": "DT_CSPlayer" 974 | }, 975 | { 976 | "name": "m_angEyeAnglesY", 977 | "prop": "m_angEyeAngles[1]", 978 | "table": "DT_CSPlayer" 979 | }, 980 | { 981 | "name": "m_flNextAttack", 982 | "prop": "m_flNextAttack", 983 | "table": "DT_CSPlayer" 984 | }, 985 | { 986 | "name": "m_iMostRecentModelBoneCounter", 987 | "prop": "m_nForceBone", 988 | "offset": 4, 989 | "table": "DT_CSPlayer" 990 | }, 991 | { 992 | "name": "m_flLastBoneSetupTime", 993 | "prop": "m_nSequence", 994 | "offset": 104, 995 | "table": "DT_BaseAnimating" 996 | }, 997 | { 998 | "name": "m_bStartedArming", 999 | "prop": "m_bStartedArming", 1000 | "table": "DT_WeaponC4" 1001 | }, 1002 | { 1003 | "name": "m_bUseCustomBloomScale", 1004 | "prop": "m_bUseCustomBloomScale", 1005 | "table": "DT_EnvTonemapController" 1006 | }, 1007 | { 1008 | "name": "m_bUseCustomAutoExposureMin", 1009 | "prop": "m_bUseCustomAutoExposureMin", 1010 | "table": "DT_EnvTonemapController" 1011 | }, 1012 | { 1013 | "name": "m_bUseCustomAutoExposureMax", 1014 | "prop": "m_bUseCustomAutoExposureMax", 1015 | "table": "DT_EnvTonemapController" 1016 | }, 1017 | { 1018 | "name": "m_flCustomBloomScale", 1019 | "prop": "m_flCustomBloomScale", 1020 | "table": "DT_EnvTonemapController" 1021 | }, 1022 | { 1023 | "name": "m_flCustomAutoExposureMin", 1024 | "prop": "m_flCustomAutoExposureMin", 1025 | "table": "DT_EnvTonemapController" 1026 | }, 1027 | { 1028 | "name": "m_flCustomAutoExposureMax", 1029 | "prop": "m_flCustomAutoExposureMax", 1030 | "table": "DT_EnvTonemapController" 1031 | }, 1032 | { 1033 | "name": "m_nViewModelIndex", 1034 | "prop": "m_nViewModelIndex", 1035 | "table": "DT_BaseViewModel" 1036 | }, 1037 | { 1038 | "name": "m_nModelIndex", 1039 | "prop": "m_nModelIndex", 1040 | "table": "DT_BaseViewModel" 1041 | }, 1042 | { 1043 | "name": "m_bShouldGlow", 1044 | "prop": "m_bShouldGlow", 1045 | "table": "DT_DynamicProp" 1046 | }, 1047 | { 1048 | "name": "m_nSkin", 1049 | "prop": "m_nSkin", 1050 | "table": "DT_BaseViewModel" 1051 | }, 1052 | { 1053 | "name": "m_iWeaponOrigin", 1054 | "prop": "m_iWeaponOrigin", 1055 | "table": "DT_BaseCombatWeapon" 1056 | } 1057 | ] 1058 | } --------------------------------------------------------------------------------