From c55bdf15a2a3344ac4423d518803cd2e66db146d Mon Sep 17 00:00:00 2001 From: a2x <45197573+a2x@users.noreply.github.com> Date: Sun, 15 Oct 2023 22:17:02 +1000 Subject: [PATCH] Ref #20 --- Cargo.toml | 2 +- generated/animationsystem.dll.cs | 6 +- generated/animationsystem.dll.hpp | 6 +- generated/animationsystem.dll.rs | 6 +- generated/client.dll.cs | 6 +- generated/client.dll.hpp | 6 +- generated/client.dll.rs | 6 +- generated/engine2.dll.cs | 6 +- generated/engine2.dll.hpp | 6 +- generated/engine2.dll.rs | 6 +- generated/host.dll.cs | 6 +- generated/host.dll.hpp | 6 +- generated/host.dll.rs | 6 +- generated/interfaces.cs | 6 +- generated/interfaces.hpp | 6 +- generated/interfaces.rs | 6 +- generated/materialsystem2.dll.cs | 6 +- generated/materialsystem2.dll.hpp | 6 +- generated/materialsystem2.dll.rs | 6 +- generated/networksystem.dll.cs | 6 +- generated/networksystem.dll.hpp | 6 +- generated/networksystem.dll.rs | 6 +- generated/offsets.cs | 6 +- generated/offsets.hpp | 6 +- generated/offsets.rs | 6 +- generated/particles.dll.cs | 6 +- generated/particles.dll.hpp | 6 +- generated/particles.dll.rs | 6 +- generated/pulse_system.dll.cs | 6 +- generated/pulse_system.dll.hpp | 6 +- generated/pulse_system.dll.rs | 6 +- generated/rendersystemdx11.dll.cs | 6 +- generated/rendersystemdx11.dll.hpp | 6 +- generated/rendersystemdx11.dll.rs | 6 +- generated/resourcesystem.dll.cs | 6 +- generated/resourcesystem.dll.hpp | 6 +- generated/resourcesystem.dll.rs | 6 +- generated/scenesystem.dll.cs | 6 +- generated/scenesystem.dll.hpp | 6 +- generated/scenesystem.dll.rs | 6 +- generated/schemasystem.dll.cs | 6 +- generated/schemasystem.dll.hpp | 6 +- generated/schemasystem.dll.rs | 6 +- generated/server.dll.cs | 6 +- generated/server.dll.hpp | 6 +- generated/server.dll.rs | 6 +- generated/soundsystem.dll.cs | 6 +- generated/soundsystem.dll.hpp | 6 +- generated/soundsystem.dll.rs | 6 +- generated/vphysics2.dll.cs | 6 +- generated/vphysics2.dll.hpp | 6 +- generated/vphysics2.dll.rs | 6 +- generated/worldrenderer.dll.cs | 6 +- generated/worldrenderer.dll.hpp | 6 +- generated/worldrenderer.dll.rs | 6 +- src/dumpers/interfaces.rs | 86 ++++++++++++++++-------- src/dumpers/mod.rs | 2 +- src/main.rs | 1 + src/sdk/utl_ts_hash.rs | 102 ++++++++++++++++------------- 59 files changed, 335 insertions(+), 182 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6f11a02..58c791f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cs2-dumper" -version = "1.1.0" +version = "1.1.1" authors = ["a2x"] edition = "2021" readme = "README.md" diff --git a/generated/animationsystem.dll.cs b/generated/animationsystem.dll.cs index b9d5781..ec5c947 100644 --- a/generated/animationsystem.dll.cs +++ b/generated/animationsystem.dll.cs @@ -1,5 +1,7 @@ -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.831799400 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.539445700 UTC + */ public static class AimMatrixOpFixedSettings_t { public const nint m_attachment = 0x0; // CAnimAttachment diff --git a/generated/animationsystem.dll.hpp b/generated/animationsystem.dll.hpp index e4d520f..d31708c 100644 --- a/generated/animationsystem.dll.hpp +++ b/generated/animationsystem.dll.hpp @@ -2,8 +2,10 @@ #include -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.808630100 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.515770200 UTC + */ namespace AimMatrixOpFixedSettings_t { constexpr std::ptrdiff_t m_attachment = 0x0; // CAnimAttachment diff --git a/generated/animationsystem.dll.rs b/generated/animationsystem.dll.rs index 761b964..7367c64 100644 --- a/generated/animationsystem.dll.rs +++ b/generated/animationsystem.dll.rs @@ -1,7 +1,9 @@ #![allow(non_snake_case, non_upper_case_globals)] -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.856065600 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.563817600 UTC + */ pub mod AimMatrixOpFixedSettings_t { pub const m_attachment: usize = 0x0; // CAnimAttachment diff --git a/generated/client.dll.cs b/generated/client.dll.cs index 6de7fab..69a02e8 100644 --- a/generated/client.dll.cs +++ b/generated/client.dll.cs @@ -1,5 +1,7 @@ -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:09.188128400 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:32.884630900 UTC + */ public static class ActiveModelConfig_t { public const nint m_Handle = 0x28; // ModelConfigHandle_t diff --git a/generated/client.dll.hpp b/generated/client.dll.hpp index 25c11f3..b988d9f 100644 --- a/generated/client.dll.hpp +++ b/generated/client.dll.hpp @@ -2,8 +2,10 @@ #include -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:09.147412100 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:32.843400800 UTC + */ namespace ActiveModelConfig_t { constexpr std::ptrdiff_t m_Handle = 0x28; // ModelConfigHandle_t diff --git a/generated/client.dll.rs b/generated/client.dll.rs index bcf9246..4693a06 100644 --- a/generated/client.dll.rs +++ b/generated/client.dll.rs @@ -1,7 +1,9 @@ #![allow(non_snake_case, non_upper_case_globals)] -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:09.229902300 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:32.927109500 UTC + */ pub mod ActiveModelConfig_t { pub const m_Handle: usize = 0x28; // ModelConfigHandle_t diff --git a/generated/engine2.dll.cs b/generated/engine2.dll.cs index 2344623..659e720 100644 --- a/generated/engine2.dll.cs +++ b/generated/engine2.dll.cs @@ -1,5 +1,7 @@ -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.666106100 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.375847600 UTC + */ public static class CEntityComponentHelper { public const nint m_flags = 0x8; // uint32_t diff --git a/generated/engine2.dll.hpp b/generated/engine2.dll.hpp index d613338..035bb4e 100644 --- a/generated/engine2.dll.hpp +++ b/generated/engine2.dll.hpp @@ -2,8 +2,10 @@ #include -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.664094400 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.373798700 UTC + */ namespace CEntityComponentHelper { constexpr std::ptrdiff_t m_flags = 0x8; // uint32_t diff --git a/generated/engine2.dll.rs b/generated/engine2.dll.rs index 147fe20..06e39b6 100644 --- a/generated/engine2.dll.rs +++ b/generated/engine2.dll.rs @@ -1,7 +1,9 @@ #![allow(non_snake_case, non_upper_case_globals)] -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.668437300 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.378512600 UTC + */ pub mod CEntityComponentHelper { pub const m_flags: usize = 0x8; // uint32_t diff --git a/generated/host.dll.cs b/generated/host.dll.cs index 6477a30..c71d373 100644 --- a/generated/host.dll.cs +++ b/generated/host.dll.cs @@ -1,5 +1,7 @@ -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:09.272441400 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:32.969358100 UTC + */ public static class CAnimScriptBase { public const nint m_bIsValid = 0x8; // bool diff --git a/generated/host.dll.hpp b/generated/host.dll.hpp index 7a0522a..942e6bc 100644 --- a/generated/host.dll.hpp +++ b/generated/host.dll.hpp @@ -2,8 +2,10 @@ #include -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:09.271971 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:32.968868800 UTC + */ namespace CAnimScriptBase { constexpr std::ptrdiff_t m_bIsValid = 0x8; // bool diff --git a/generated/host.dll.rs b/generated/host.dll.rs index d2f7c2f..281e3cd 100644 --- a/generated/host.dll.rs +++ b/generated/host.dll.rs @@ -1,7 +1,9 @@ #![allow(non_snake_case, non_upper_case_globals)] -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:09.273270 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:32.970197200 UTC + */ pub mod CAnimScriptBase { pub const m_bIsValid: usize = 0x8; // bool diff --git a/generated/interfaces.cs b/generated/interfaces.cs index 33d1eef..182ca1f 100644 --- a/generated/interfaces.cs +++ b/generated/interfaces.cs @@ -1,5 +1,7 @@ -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:09.552341700 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:33.222923700 UTC + */ public static class animationsystem_dll { public const nint AnimationSystemUtils_001 = 0x64670; diff --git a/generated/interfaces.hpp b/generated/interfaces.hpp index 9b3a3d4..c97b3b1 100644 --- a/generated/interfaces.hpp +++ b/generated/interfaces.hpp @@ -2,8 +2,10 @@ #include -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:09.549930800 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:33.220433600 UTC + */ namespace animationsystem_dll { constexpr std::ptrdiff_t AnimationSystemUtils_001 = 0x64670; diff --git a/generated/interfaces.rs b/generated/interfaces.rs index a62cfc1..aa09b80 100644 --- a/generated/interfaces.rs +++ b/generated/interfaces.rs @@ -1,7 +1,9 @@ #![allow(non_snake_case, non_upper_case_globals)] -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:09.554948500 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:33.225495 UTC + */ pub mod animationsystem_dll { pub const AnimationSystemUtils_001: usize = 0x64670; diff --git a/generated/materialsystem2.dll.cs b/generated/materialsystem2.dll.cs index a890cf7..b98b752 100644 --- a/generated/materialsystem2.dll.cs +++ b/generated/materialsystem2.dll.cs @@ -1,5 +1,7 @@ -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.677717800 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.387776500 UTC + */ public static class MaterialParamBuffer_t { public const nint m_value = 0x8; // CUtlBinaryBlock diff --git a/generated/materialsystem2.dll.hpp b/generated/materialsystem2.dll.hpp index 0ab8cab..0af5442 100644 --- a/generated/materialsystem2.dll.hpp +++ b/generated/materialsystem2.dll.hpp @@ -2,8 +2,10 @@ #include -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.675997500 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.386044300 UTC + */ namespace MaterialParamBuffer_t { constexpr std::ptrdiff_t m_value = 0x8; // CUtlBinaryBlock diff --git a/generated/materialsystem2.dll.rs b/generated/materialsystem2.dll.rs index a6557dc..36c8682 100644 --- a/generated/materialsystem2.dll.rs +++ b/generated/materialsystem2.dll.rs @@ -1,7 +1,9 @@ #![allow(non_snake_case, non_upper_case_globals)] -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.679671600 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.389748900 UTC + */ pub mod MaterialParamBuffer_t { pub const m_value: usize = 0x8; // CUtlBinaryBlock diff --git a/generated/networksystem.dll.cs b/generated/networksystem.dll.cs index f048291..ddc64cf 100644 --- a/generated/networksystem.dll.cs +++ b/generated/networksystem.dll.cs @@ -1,5 +1,7 @@ -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.681994300 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.392118600 UTC + */ public static class ChangeAccessorFieldPathIndex_t { public const nint m_Value = 0x0; // int16_t diff --git a/generated/networksystem.dll.hpp b/generated/networksystem.dll.hpp index 47edbc6..9a2013b 100644 --- a/generated/networksystem.dll.hpp +++ b/generated/networksystem.dll.hpp @@ -2,8 +2,10 @@ #include -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.681603300 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.391722300 UTC + */ namespace ChangeAccessorFieldPathIndex_t { constexpr std::ptrdiff_t m_Value = 0x0; // int16_t diff --git a/generated/networksystem.dll.rs b/generated/networksystem.dll.rs index 1907e27..2abff74 100644 --- a/generated/networksystem.dll.rs +++ b/generated/networksystem.dll.rs @@ -1,7 +1,9 @@ #![allow(non_snake_case, non_upper_case_globals)] -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.682654600 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.392830500 UTC + */ pub mod ChangeAccessorFieldPathIndex_t { pub const m_Value: usize = 0x0; // int16_t diff --git a/generated/offsets.cs b/generated/offsets.cs index c5579fe..bb36b25 100644 --- a/generated/offsets.cs +++ b/generated/offsets.cs @@ -1,5 +1,7 @@ -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:10.045575200 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:33.672128500 UTC + */ public static class client_dll { public const nint dwEntityList = 0x178FC88; diff --git a/generated/offsets.hpp b/generated/offsets.hpp index c9a555b..5d4b2e6 100644 --- a/generated/offsets.hpp +++ b/generated/offsets.hpp @@ -2,8 +2,10 @@ #include -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:10.044386600 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:33.670867800 UTC + */ namespace client_dll { constexpr std::ptrdiff_t dwEntityList = 0x178FC88; diff --git a/generated/offsets.rs b/generated/offsets.rs index ed064ba..391c882 100644 --- a/generated/offsets.rs +++ b/generated/offsets.rs @@ -1,7 +1,9 @@ #![allow(non_snake_case, non_upper_case_globals)] -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:10.046951800 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:33.673543400 UTC + */ pub mod client_dll { pub const dwEntityList: usize = 0x178FC88; diff --git a/generated/particles.dll.cs b/generated/particles.dll.cs index 8b56428..5709f13 100644 --- a/generated/particles.dll.cs +++ b/generated/particles.dll.cs @@ -1,5 +1,7 @@ -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:08.263690400 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.967344 UTC + */ public static class CBaseRendererSource2 { public const nint m_flRadiusScale = 0x200; // CParticleCollectionRendererFloatInput diff --git a/generated/particles.dll.hpp b/generated/particles.dll.hpp index a0b7379..869e3e1 100644 --- a/generated/particles.dll.hpp +++ b/generated/particles.dll.hpp @@ -2,8 +2,10 @@ #include -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:08.224701300 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.927930 UTC + */ namespace CBaseRendererSource2 { constexpr std::ptrdiff_t m_flRadiusScale = 0x200; // CParticleCollectionRendererFloatInput diff --git a/generated/particles.dll.rs b/generated/particles.dll.rs index bf572d4..32040c0 100644 --- a/generated/particles.dll.rs +++ b/generated/particles.dll.rs @@ -1,7 +1,9 @@ #![allow(non_snake_case, non_upper_case_globals)] -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:08.305765 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:32.008264 UTC + */ pub mod CBaseRendererSource2 { pub const m_flRadiusScale: usize = 0x200; // CParticleCollectionRendererFloatInput diff --git a/generated/pulse_system.dll.cs b/generated/pulse_system.dll.cs index 4078c1e..6f5828a 100644 --- a/generated/pulse_system.dll.cs +++ b/generated/pulse_system.dll.cs @@ -1,5 +1,7 @@ -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:08.008265200 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.713845500 UTC + */ public static class CPulseCell_Base { public const nint m_nEditorNodeID = 0x8; // PulseDocNodeID_t diff --git a/generated/pulse_system.dll.hpp b/generated/pulse_system.dll.hpp index 8417b95..a28fe9d 100644 --- a/generated/pulse_system.dll.hpp +++ b/generated/pulse_system.dll.hpp @@ -2,8 +2,10 @@ #include -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:08.005583400 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.711122600 UTC + */ namespace CPulseCell_Base { constexpr std::ptrdiff_t m_nEditorNodeID = 0x8; // PulseDocNodeID_t diff --git a/generated/pulse_system.dll.rs b/generated/pulse_system.dll.rs index de9dde5..b0048a4 100644 --- a/generated/pulse_system.dll.rs +++ b/generated/pulse_system.dll.rs @@ -1,7 +1,9 @@ #![allow(non_snake_case, non_upper_case_globals)] -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:08.011364200 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.716897500 UTC + */ pub mod CPulseCell_Base { pub const m_nEditorNodeID: usize = 0x8; // PulseDocNodeID_t diff --git a/generated/rendersystemdx11.dll.cs b/generated/rendersystemdx11.dll.cs index 6024221..672cd17 100644 --- a/generated/rendersystemdx11.dll.cs +++ b/generated/rendersystemdx11.dll.cs @@ -1,5 +1,7 @@ -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.652584400 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.362776200 UTC + */ public static class RenderInputLayoutField_t { public const nint m_pSemanticName = 0x0; // uint8_t[32] diff --git a/generated/rendersystemdx11.dll.hpp b/generated/rendersystemdx11.dll.hpp index cde1db8..3835eb1 100644 --- a/generated/rendersystemdx11.dll.hpp +++ b/generated/rendersystemdx11.dll.hpp @@ -2,8 +2,10 @@ #include -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.651789100 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.361960700 UTC + */ namespace RenderInputLayoutField_t { constexpr std::ptrdiff_t m_pSemanticName = 0x0; // uint8_t[32] diff --git a/generated/rendersystemdx11.dll.rs b/generated/rendersystemdx11.dll.rs index e5f55ef..52525ab 100644 --- a/generated/rendersystemdx11.dll.rs +++ b/generated/rendersystemdx11.dll.rs @@ -1,7 +1,9 @@ #![allow(non_snake_case, non_upper_case_globals)] -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.653714500 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.363913900 UTC + */ pub mod RenderInputLayoutField_t { pub const m_pSemanticName: usize = 0x0; // uint8_t[32] diff --git a/generated/resourcesystem.dll.cs b/generated/resourcesystem.dll.cs index b0f55c5..4721ae1 100644 --- a/generated/resourcesystem.dll.cs +++ b/generated/resourcesystem.dll.cs @@ -1,5 +1,7 @@ -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.648012200 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.358179600 UTC + */ public static class AABB_t { public const nint m_vMinBounds = 0x0; // Vector diff --git a/generated/resourcesystem.dll.hpp b/generated/resourcesystem.dll.hpp index 131e1d8..2dfce76 100644 --- a/generated/resourcesystem.dll.hpp +++ b/generated/resourcesystem.dll.hpp @@ -2,8 +2,10 @@ #include -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.646852600 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.356904800 UTC + */ namespace AABB_t { constexpr std::ptrdiff_t m_vMinBounds = 0x0; // Vector diff --git a/generated/resourcesystem.dll.rs b/generated/resourcesystem.dll.rs index 450b779..225e508 100644 --- a/generated/resourcesystem.dll.rs +++ b/generated/resourcesystem.dll.rs @@ -1,7 +1,9 @@ #![allow(non_snake_case, non_upper_case_globals)] -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.649503 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.359706 UTC + */ pub mod AABB_t { pub const m_vMinBounds: usize = 0x0; // Vector diff --git a/generated/scenesystem.dll.cs b/generated/scenesystem.dll.cs index e8134aa..381703b 100644 --- a/generated/scenesystem.dll.cs +++ b/generated/scenesystem.dll.cs @@ -1,5 +1,7 @@ -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.969286700 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.675288600 UTC + */ public static class CSSDSEndFrameViewInfo { public const nint m_nViewId = 0x0; // uint64_t diff --git a/generated/scenesystem.dll.hpp b/generated/scenesystem.dll.hpp index 3b922ef..61a67bd 100644 --- a/generated/scenesystem.dll.hpp +++ b/generated/scenesystem.dll.hpp @@ -2,8 +2,10 @@ #include -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.968148600 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.674184500 UTC + */ namespace CSSDSEndFrameViewInfo { constexpr std::ptrdiff_t m_nViewId = 0x0; // uint64_t diff --git a/generated/scenesystem.dll.rs b/generated/scenesystem.dll.rs index c88fbe7..aa1cf84 100644 --- a/generated/scenesystem.dll.rs +++ b/generated/scenesystem.dll.rs @@ -1,7 +1,9 @@ #![allow(non_snake_case, non_upper_case_globals)] -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.970666700 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.676655900 UTC + */ pub mod CSSDSEndFrameViewInfo { pub const m_nViewId: usize = 0x0; // uint64_t diff --git a/generated/schemasystem.dll.cs b/generated/schemasystem.dll.cs index fc06a61..88aee68 100644 --- a/generated/schemasystem.dll.cs +++ b/generated/schemasystem.dll.cs @@ -1,5 +1,7 @@ -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.637873300 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.348418900 UTC + */ public static class CExampleSchemaVData_Monomorphic { public const nint m_nExample1 = 0x0; // int32_t diff --git a/generated/schemasystem.dll.hpp b/generated/schemasystem.dll.hpp index c8f17e1..a2da526 100644 --- a/generated/schemasystem.dll.hpp +++ b/generated/schemasystem.dll.hpp @@ -2,8 +2,10 @@ #include -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.636407800 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.347354400 UTC + */ namespace CExampleSchemaVData_Monomorphic { constexpr std::ptrdiff_t m_nExample1 = 0x0; // int32_t diff --git a/generated/schemasystem.dll.rs b/generated/schemasystem.dll.rs index 4661a7f..2509484 100644 --- a/generated/schemasystem.dll.rs +++ b/generated/schemasystem.dll.rs @@ -1,7 +1,9 @@ #![allow(non_snake_case, non_upper_case_globals)] -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.639317700 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.349825800 UTC + */ pub mod CExampleSchemaVData_Monomorphic { pub const m_nExample1: usize = 0x0; // int32_t diff --git a/generated/server.dll.cs b/generated/server.dll.cs index 04d5f94..a9f94e9 100644 --- a/generated/server.dll.cs +++ b/generated/server.dll.cs @@ -1,5 +1,7 @@ -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:08.785381800 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:32.484000900 UTC + */ public static class ActiveModelConfig_t { public const nint m_Handle = 0x28; // ModelConfigHandle_t diff --git a/generated/server.dll.hpp b/generated/server.dll.hpp index 54c87ac..75482b0 100644 --- a/generated/server.dll.hpp +++ b/generated/server.dll.hpp @@ -2,8 +2,10 @@ #include -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:08.715646100 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:32.413845700 UTC + */ namespace ActiveModelConfig_t { constexpr std::ptrdiff_t m_Handle = 0x28; // ModelConfigHandle_t diff --git a/generated/server.dll.rs b/generated/server.dll.rs index fc4dcc8..d55659b 100644 --- a/generated/server.dll.rs +++ b/generated/server.dll.rs @@ -1,7 +1,9 @@ #![allow(non_snake_case, non_upper_case_globals)] -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:08.856435 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:32.557311800 UTC + */ pub mod ActiveModelConfig_t { pub const m_Handle: usize = 0x28; // ModelConfigHandle_t diff --git a/generated/soundsystem.dll.cs b/generated/soundsystem.dll.cs index a6350bc..e21b64f 100644 --- a/generated/soundsystem.dll.cs +++ b/generated/soundsystem.dll.cs @@ -1,5 +1,7 @@ -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.958367400 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.664413500 UTC + */ public static class CDSPMixgroupModifier { public const nint m_mixgroup = 0x0; // CUtlString diff --git a/generated/soundsystem.dll.hpp b/generated/soundsystem.dll.hpp index b9a2873..089a8bc 100644 --- a/generated/soundsystem.dll.hpp +++ b/generated/soundsystem.dll.hpp @@ -2,8 +2,10 @@ #include -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.954931600 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.660932900 UTC + */ namespace CDSPMixgroupModifier { constexpr std::ptrdiff_t m_mixgroup = 0x0; // CUtlString diff --git a/generated/soundsystem.dll.rs b/generated/soundsystem.dll.rs index d9442f4..60fa282 100644 --- a/generated/soundsystem.dll.rs +++ b/generated/soundsystem.dll.rs @@ -1,7 +1,9 @@ #![allow(non_snake_case, non_upper_case_globals)] -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.962135 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.668319800 UTC + */ pub mod CDSPMixgroupModifier { pub const m_mixgroup: usize = 0x0; // CUtlString diff --git a/generated/vphysics2.dll.cs b/generated/vphysics2.dll.cs index 5bdd5f5..24d64a0 100644 --- a/generated/vphysics2.dll.cs +++ b/generated/vphysics2.dll.cs @@ -1,5 +1,7 @@ -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.923654100 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.630609100 UTC + */ public static class CFeIndexedJiggleBone { public const nint m_nNode = 0x0; // uint32_t diff --git a/generated/vphysics2.dll.hpp b/generated/vphysics2.dll.hpp index 7ce8ff8..da920fd 100644 --- a/generated/vphysics2.dll.hpp +++ b/generated/vphysics2.dll.hpp @@ -2,8 +2,10 @@ #include -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.915889900 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.622787900 UTC + */ namespace CFeIndexedJiggleBone { constexpr std::ptrdiff_t m_nNode = 0x0; // uint32_t diff --git a/generated/vphysics2.dll.rs b/generated/vphysics2.dll.rs index c0dcfeb..5d21329 100644 --- a/generated/vphysics2.dll.rs +++ b/generated/vphysics2.dll.rs @@ -1,7 +1,9 @@ #![allow(non_snake_case, non_upper_case_globals)] -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.931753800 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.638771500 UTC + */ pub mod CFeIndexedJiggleBone { pub const m_nNode: usize = 0x0; // uint32_t diff --git a/generated/worldrenderer.dll.cs b/generated/worldrenderer.dll.cs index d7ccb22..febd513 100644 --- a/generated/worldrenderer.dll.cs +++ b/generated/worldrenderer.dll.cs @@ -1,5 +1,7 @@ -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.986008800 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.691751700 UTC + */ public static class AggregateLODSetup_t { public const nint m_vLODOrigin = 0x0; // Vector diff --git a/generated/worldrenderer.dll.hpp b/generated/worldrenderer.dll.hpp index 88ec2cd..0cf960c 100644 --- a/generated/worldrenderer.dll.hpp +++ b/generated/worldrenderer.dll.hpp @@ -2,8 +2,10 @@ #include -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.983315700 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.689004 UTC + */ namespace AggregateLODSetup_t { constexpr std::ptrdiff_t m_vLODOrigin = 0x0; // Vector diff --git a/generated/worldrenderer.dll.rs b/generated/worldrenderer.dll.rs index 5e955c8..aec8b71 100644 --- a/generated/worldrenderer.dll.rs +++ b/generated/worldrenderer.dll.rs @@ -1,7 +1,9 @@ #![allow(non_snake_case, non_upper_case_globals)] -// Created using https://github.com/a2x/cs2-dumper -// 2023-10-14 05:19:07.989091200 UTC +/* + * https://github.com/a2x/cs2-dumper + * 2023-10-15 12:13:31.694871800 UTC + */ pub mod AggregateLODSetup_t { pub const m_vLODOrigin: usize = 0x0; // Vector diff --git a/src/dumpers/interfaces.rs b/src/dumpers/interfaces.rs index aeac459..778580e 100644 --- a/src/dumpers/interfaces.rs +++ b/src/dumpers/interfaces.rs @@ -1,3 +1,6 @@ +use std::ffi::c_char; +use std::mem::offset_of; + use crate::builder::FileBuilderEnum; use crate::dumpers::Entry; use crate::error::Result; @@ -5,12 +8,44 @@ use crate::remote::Process; use super::{generate_files, Entries}; +#[derive(Debug)] +#[repr(C)] +struct InterfaceReg { + create_fn: *const (), // 0x0000 + name: *const c_char, // 0x0008 + next: *mut InterfaceReg, // 0x0010 +} + +impl InterfaceReg { + pub fn ptr(&self, process: &Process) -> Result { + process + .read_memory::(self as *const _ as usize + offset_of!(InterfaceReg, create_fn)) + } + + pub fn name(&self, process: &Process) -> Result { + let name_ptr = process + .read_memory::(self as *const _ as usize + offset_of!(InterfaceReg, name))?; + + process.read_string(name_ptr) + } + + pub fn next(&self, process: &Process) -> Result<*mut InterfaceReg> { + process.read_memory::<*mut InterfaceReg>( + self as *const _ as usize + offset_of!(InterfaceReg, next), + ) + } +} + pub fn dump_interfaces(builders: &mut Vec, process: &Process) -> Result<()> { let module_names = process.get_loaded_modules()?; let mut entries = Entries::new(); for module_name in module_names { + if module_name == "crashhandler64.dll" { + continue; + } + let module = process.get_module_by_name(&module_name)?; if let Some(create_interface_export) = module.export("CreateInterface") { @@ -19,37 +54,32 @@ pub fn dump_interfaces(builders: &mut Vec, process: &Process) - let create_interface_address = process.resolve_rip(create_interface_export.va, None, None)?; - let mut interface_registry_ptr = process - .read_memory::(create_interface_address) - .unwrap_or(0); + if let Ok(mut interface_reg) = + process.read_memory::<*mut InterfaceReg>(create_interface_address) + { + while !interface_reg.is_null() { + let ptr = unsafe { (*interface_reg).ptr(process) }?; + let name = unsafe { (*interface_reg).name(process) }?; - while interface_registry_ptr != 0 { - let interface_ptr = process.read_memory::(interface_registry_ptr)?; + log::debug!( + " └─ {} @ {:#X} ({} + {:#X})", + name, + ptr, + module_name, + ptr - module.base() + ); - let interface_version_ptr = - process.read_memory::(interface_registry_ptr + 0x8)?; + entries + .entry(module_name.replace(".", "_")) + .or_default() + .push(Entry { + name: name.clone(), + value: ptr - module.base(), + comment: None, + }); - let interface_version = process.read_string(interface_version_ptr)?; - - log::debug!( - " └─ {} @ {:#X} ({} + {:#X})", - interface_version, - interface_ptr, - module_name, - interface_ptr - module.base() - ); - - entries - .entry(module_name.replace(".", "_")) - .or_default() - .push(Entry { - name: interface_version.clone(), - value: interface_ptr - module.base(), - comment: None, - }); - - interface_registry_ptr = - process.read_memory::(interface_registry_ptr + 0x10)?; + interface_reg = unsafe { (*interface_reg).next(process) }?; + } } } } diff --git a/src/dumpers/mod.rs b/src/dumpers/mod.rs index c1b308b..086a20c 100644 --- a/src/dumpers/mod.rs +++ b/src/dumpers/mod.rs @@ -39,7 +39,7 @@ pub fn generate_file( if builder.extension() != "json" { write!( file, - "// Created using https://github.com/a2x/cs2-dumper\n// {}\n\n", + "/*\n * https://github.com/a2x/cs2-dumper\n * {}\n */\n\n", chrono::Utc::now() )?; } diff --git a/src/main.rs b/src/main.rs index 92126b4..1655dc5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,5 @@ #![allow(dead_code)] +#![feature(offset_of)] use std::fs; use std::time::Instant; diff --git a/src/sdk/utl_ts_hash.rs b/src/sdk/utl_ts_hash.rs index bc9ce94..ebde7f2 100644 --- a/src/sdk/utl_ts_hash.rs +++ b/src/sdk/utl_ts_hash.rs @@ -1,86 +1,102 @@ +use std::mem::offset_of; + use crate::error::Result; use crate::remote::Process; #[derive(Debug)] #[repr(C)] -pub struct HashBucketDataInternal { - data: T, - pad_0: [u8; 8], - ui_key: K, +pub struct HashFixedDataInternal { + ui_key: K, // 0x0010 + next: *mut HashFixedDataInternal, // 0x0010 + data: T, // 0x0010 } -impl HashBucketDataInternal { - pub fn next(&self, process: &Process) -> Result<*const HashBucketDataInternal> { - process - .read_memory::<*const HashBucketDataInternal>((self as *const _ as usize) + 0x8) +impl HashFixedDataInternal { + pub fn next(&self, process: &Process) -> Result<*mut HashFixedDataInternal> { + process.read_memory::<*mut HashFixedDataInternal>( + (self as *const _ as usize) + offset_of!(HashFixedDataInternal, next), + ) } } #[derive(Debug)] #[repr(C)] -pub struct HashFixedDataInternal { - ui_key: K, - pad_0: [u8; 8], - data: T, +pub struct HashBucketDataInternal { + data: T, // 0x0000 + next: *mut HashFixedDataInternal, // 0x0008 + ui_key: K, // 0x0010 } -impl HashFixedDataInternal { - pub fn next(&self, process: &Process) -> Result<*const HashFixedDataInternal> { - process.read_memory::<*const HashFixedDataInternal>((self as *const _ as usize) + 0x8) +impl HashBucketDataInternal { + pub fn next(&self, process: &Process) -> Result<*mut HashFixedDataInternal> { + process.read_memory::<*mut HashFixedDataInternal>( + (self as *const _ as usize) + offset_of!(HashBucketDataInternal, next), + ) } } #[derive(Debug)] #[repr(C)] pub struct HashAllocatedData { - list: [HashFixedDataInternal; 128], + pad_0: [u8; 0x18], // 0x0000 + list: [HashFixedDataInternal; 128], // 0x0018 } impl HashAllocatedData { pub fn list(&self, process: &Process) -> Result<[HashFixedDataInternal; 128]> { - process - .read_memory::<[HashFixedDataInternal; 128]>((self as *const _ as usize) + 0x18) + process.read_memory::<[HashFixedDataInternal; 128]>( + (self as *const _ as usize) + offset_of!(HashAllocatedData, list), + ) } } #[derive(Debug)] #[repr(C)] pub struct HashUnallocatedData { - block_list: [HashBucketDataInternal; 256], + next: *mut HashUnallocatedData, // 0x0000 + unknown_1: K, // 0x0008 + ui_key: K, // 0x0010 + unknown_2: K, // 0x0018 + block_list: [HashBucketDataInternal; 256], // 0x0020 } impl HashUnallocatedData { - pub fn next(&self, process: &Process) -> Result<*const HashUnallocatedData> { - process.read_memory::<*const HashUnallocatedData>(self as *const _ as usize) + pub fn next(&self, process: &Process) -> Result<*mut HashUnallocatedData> { + process.read_memory::<*mut HashUnallocatedData>( + self as *const _ as usize + offset_of!(HashUnallocatedData, next), + ) } pub fn ui_key(&self, process: &Process) -> Result { - process.read_memory::((self as *const _ as usize) + 0x10) + process.read_memory::( + (self as *const _ as usize) + offset_of!(HashUnallocatedData, ui_key), + ) } pub fn block_list(&self, process: &Process) -> Result<[HashBucketDataInternal; 256]> { - process - .read_memory::<[HashBucketDataInternal; 256]>((self as *const _ as usize) + 0x20) + process.read_memory::<[HashBucketDataInternal; 256]>( + (self as *const _ as usize) + offset_of!(HashUnallocatedData, block_list), + ) } } #[derive(Debug)] #[repr(C)] pub struct HashBucket { - pad_0: [u8; 16], - allocated_data: *const HashAllocatedData, - unallocated_data: *const HashUnallocatedData, + pad_0: [u8; 0x10], // 0x0000 + allocated_data: *const HashAllocatedData, // 0x0010 + unallocated_data: *const HashUnallocatedData, // 0x0018 } #[derive(Debug)] #[repr(C)] pub struct UtlMemoryPool { - block_size: i32, - blocks_per_blob: i32, - grow_mode: i32, - blocks_allocated: i32, - block_allocated_size: i32, - peak_alloc: i32, + block_size: i32, // 0x0000 + blocks_per_blob: i32, // 0x0004 + grow_mode: i32, // 0x0008 + blocks_allocated: i32, // 0x000C + block_allocated_size: i32, // 0x0010 + peak_alloc: i32, // 0x0014 } impl UtlMemoryPool { @@ -98,8 +114,8 @@ impl UtlMemoryPool { #[derive(Debug)] #[repr(C)] pub struct UtlTsHash { - entry_memory: UtlMemoryPool, - buckets: HashBucket, + entry_memory: UtlMemoryPool, // 0x0000 + buckets: HashBucket, // 0x0018 } impl UtlTsHash @@ -124,19 +140,17 @@ where let mut address = self.buckets.unallocated_data; while !address.is_null() { - unsafe { - let block_list = (*address).block_list(process)?; + let block_list = unsafe { (*address).block_list(process) }?; - for i in 0..min_size { - list.push(block_list[i].data); + for i in 0..min_size { + list.push(block_list[i].data); - if list.len() >= self.count() as usize { - return Ok(list); - } + if list.len() >= self.count() as usize { + return Ok(list); } - - address = (*address).next(process)?; } + + address = unsafe { (*address).next(process) }?; } Ok(list)