From 4d9f131453ecb8d4a3f0589b6aaeb98cdc914583 Mon Sep 17 00:00:00 2001 From: a2x <45197573+a2x@users.noreply.github.com> Date: Fri, 6 Oct 2023 20:10:40 +1000 Subject: [PATCH] Fetch `dwWindowWidth` and `dwWindowHeight` offsets --- config.json | 24 ++++++++++++++++++++++++ generated/offsets.cs | 4 +++- generated/offsets.hpp | 4 +++- generated/offsets.json | 4 +++- generated/offsets.rs | 4 +++- src/dumpers/interfaces.rs | 4 ++-- 6 files changed, 38 insertions(+), 6 deletions(-) diff --git a/config.json b/config.json index bf70c74..075437f 100644 --- a/config.json +++ b/config.json @@ -228,6 +228,30 @@ "type": "ripRelative" } ] + }, + { + "name": "dwWindowHeight", + "module": "engine2.dll", + "pattern": "8B 05 ? ? ? ? 89 03", + "operations": [ + { + "type": "ripRelative", + "offset": 2, + "length": 6 + } + ] + }, + { + "name": "dwWindowWidth", + "module": "engine2.dll", + "pattern": "8B 05 ? ? ? ? 89 07", + "operations": [ + { + "type": "ripRelative", + "offset": 2, + "length": 6 + } + ] } ] } \ No newline at end of file diff --git a/generated/offsets.cs b/generated/offsets.cs index badb1ee..945bdd1 100644 --- a/generated/offsets.cs +++ b/generated/offsets.cs @@ -1,5 +1,5 @@ // Created using https://github.com/a2x/cs2-dumper -// 2023-10-05 13:02:39.759621900 UTC +// 2023-10-06 10:09:36.064478400 UTC public static class client_dll { public const nint dwEntityList = 0x178D8E8; @@ -24,4 +24,6 @@ public static class engine2_dll { public const nint dwNetworkGameClient = 0x48BAB0; public const nint dwNetworkGameClient_maxClients = 0x250; public const nint dwNetworkGameClient_signOnState = 0x240; + public const nint dwWindowHeight = 0x53D56C; + public const nint dwWindowWidth = 0x53D568; } \ No newline at end of file diff --git a/generated/offsets.hpp b/generated/offsets.hpp index 1376656..c0f1fbe 100644 --- a/generated/offsets.hpp +++ b/generated/offsets.hpp @@ -3,7 +3,7 @@ #include // Created using https://github.com/a2x/cs2-dumper -// 2023-10-05 13:02:39.758365100 UTC +// 2023-10-06 10:09:36.064037800 UTC namespace client_dll { constexpr std::ptrdiff_t dwEntityList = 0x178D8E8; @@ -28,4 +28,6 @@ namespace engine2_dll { constexpr std::ptrdiff_t dwNetworkGameClient = 0x48BAB0; constexpr std::ptrdiff_t dwNetworkGameClient_maxClients = 0x250; constexpr std::ptrdiff_t dwNetworkGameClient_signOnState = 0x240; + constexpr std::ptrdiff_t dwWindowHeight = 0x53D56C; + constexpr std::ptrdiff_t dwWindowWidth = 0x53D568; } \ No newline at end of file diff --git a/generated/offsets.json b/generated/offsets.json index 961ca83..cf0a068 100644 --- a/generated/offsets.json +++ b/generated/offsets.json @@ -20,6 +20,8 @@ "dwBuildNumber": 4769028, "dwNetworkGameClient": 4766384, "dwNetworkGameClient_maxClients": 592, - "dwNetworkGameClient_signOnState": 576 + "dwNetworkGameClient_signOnState": 576, + "dwWindowHeight": 5494124, + "dwWindowWidth": 5494120 } } \ No newline at end of file diff --git a/generated/offsets.rs b/generated/offsets.rs index 3483c5b..d3814c1 100644 --- a/generated/offsets.rs +++ b/generated/offsets.rs @@ -1,7 +1,7 @@ #![allow(non_snake_case, non_upper_case_globals)] // Created using https://github.com/a2x/cs2-dumper -// 2023-10-05 13:02:39.761284500 UTC +// 2023-10-06 10:09:36.065210800 UTC pub mod client_dll { pub const dwEntityList: usize = 0x178D8E8; @@ -26,4 +26,6 @@ pub mod engine2_dll { pub const dwNetworkGameClient: usize = 0x48BAB0; pub const dwNetworkGameClient_maxClients: usize = 0x250; pub const dwNetworkGameClient_signOnState: usize = 0x240; + pub const dwWindowHeight: usize = 0x53D56C; + pub const dwWindowWidth: usize = 0x53D568; } \ No newline at end of file diff --git a/src/dumpers/interfaces.rs b/src/dumpers/interfaces.rs index 78cffbf..6efd0f4 100644 --- a/src/dumpers/interfaces.rs +++ b/src/dumpers/interfaces.rs @@ -13,9 +13,9 @@ pub fn dump_interfaces(builders: &mut Vec, process: &Process) - for module_name in module_names { let module = process.get_module_by_name(&module_name)?; - log::info!("Dumping interfaces in {}...", module_name); - if let Some(create_interface_export) = module.export("CreateInterface") { + log::info!("Dumping interfaces in {}...", module_name); + let create_interface_address = process.resolve_rip(create_interface_export.va, None, None)?;