Fetch `dwWindowWidth` and `dwWindowHeight` offsets

This commit is contained in:
a2x 2023-10-06 20:10:40 +10:00
parent d58e02556b
commit 4d9f131453
6 changed files with 38 additions and 6 deletions

View File

@ -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
}
]
}
]
}

View File

@ -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;
}

View File

@ -3,7 +3,7 @@
#include <cstddef>
// 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;
}

View File

@ -20,6 +20,8 @@
"dwBuildNumber": 4769028,
"dwNetworkGameClient": 4766384,
"dwNetworkGameClient_maxClients": 592,
"dwNetworkGameClient_signOnState": 576
"dwNetworkGameClient_signOnState": 576,
"dwWindowHeight": 5494124,
"dwWindowWidth": 5494120
}
}

View File

@ -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;
}

View File

@ -13,9 +13,9 @@ pub fn dump_interfaces(builders: &mut Vec<FileBuilderEnum>, 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)?;