Added new patterns

This commit is contained in:
a2x 2023-09-29 16:55:15 +10:00
parent 2bc3e32c2d
commit b61d63b6ef
7 changed files with 78 additions and 8 deletions

View File

@ -20,6 +20,16 @@
} }
] ]
}, },
{
"name": "interfaceLinkList",
"module": "client.dll",
"pattern": "4C 8B 0D ? ? ? ? 4C 8B D2 4C 8B D9",
"operations": [
{
"type": "ripRelative"
}
]
},
{ {
"name": "localPlayerController", "name": "localPlayerController",
"module": "client.dll", "module": "client.dll",
@ -44,6 +54,27 @@
} }
] ]
}, },
{
"name": "networkGameClient",
"module": "engine2.dll",
"pattern": "48 89 3D ? ? ? ? 48 8D 15",
"operations": [
{
"type": "ripRelative"
}
]
},
{
"name": "networkGameClient_signOnState",
"module": "engine2.dll",
"pattern": "41 8B 94 24 ? ? ? ? 4C 8D 35",
"operations": [
{
"type": "offset",
"position": 4
}
]
},
{ {
"name": "viewAngles", "name": "viewAngles",
"module": "client.dll", "module": "client.dll",

View File

@ -1,8 +1,14 @@
public static class client_dll { public static class client_dll {
public const nint entityList = 0x178C878; public const nint entityList = 0x178C878;
public const nint globalVars = 0x168FCC8; public const nint globalVars = 0x168FCC8;
public const nint interfaceLinkList = 0x1972A38;
public const nint localPlayerController = 0x17DB0F8; public const nint localPlayerController = 0x17DB0F8;
public const nint localPlayerPawn = 0x1879BE8; public const nint localPlayerPawn = 0x1879BE8;
public const nint viewAngles = 0x18D9590; public const nint viewAngles = 0x18D9590;
public const nint viewMatrix = 0x187A6D0; public const nint viewMatrix = 0x187A6D0;
} }
public static class engine2_dll {
public const nint networkGameClient = 0x489AB0;
public const nint networkGameClient_signOnState = 0x240;
}

View File

@ -5,8 +5,14 @@
namespace client_dll { namespace client_dll {
constexpr std::ptrdiff_t entityList = 0x178C878; constexpr std::ptrdiff_t entityList = 0x178C878;
constexpr std::ptrdiff_t globalVars = 0x168FCC8; constexpr std::ptrdiff_t globalVars = 0x168FCC8;
constexpr std::ptrdiff_t interfaceLinkList = 0x1972A38;
constexpr std::ptrdiff_t localPlayerController = 0x17DB0F8; constexpr std::ptrdiff_t localPlayerController = 0x17DB0F8;
constexpr std::ptrdiff_t localPlayerPawn = 0x1879BE8; constexpr std::ptrdiff_t localPlayerPawn = 0x1879BE8;
constexpr std::ptrdiff_t viewAngles = 0x18D9590; constexpr std::ptrdiff_t viewAngles = 0x18D9590;
constexpr std::ptrdiff_t viewMatrix = 0x187A6D0; constexpr std::ptrdiff_t viewMatrix = 0x187A6D0;
} }
namespace engine2_dll {
constexpr std::ptrdiff_t networkGameClient = 0x489AB0;
constexpr std::ptrdiff_t networkGameClient_signOnState = 0x240;
}

View File

@ -2,9 +2,14 @@
"client_dll": { "client_dll": {
"entityList": 24692856, "entityList": 24692856,
"globalVars": 23657672, "globalVars": 23657672,
"interfaceLinkList": 26683960,
"localPlayerController": 25014520, "localPlayerController": 25014520,
"localPlayerPawn": 25664488, "localPlayerPawn": 25664488,
"viewAngles": 26056080, "viewAngles": 26056080,
"viewMatrix": 25667280 "viewMatrix": 25667280
},
"engine2_dll": {
"networkGameClient": 4758192,
"networkGameClient_signOnState": 576
} }
} }

View File

@ -3,8 +3,14 @@
pub mod client_dll { pub mod client_dll {
pub const entityList: usize = 0x178C878; pub const entityList: usize = 0x178C878;
pub const globalVars: usize = 0x168FCC8; pub const globalVars: usize = 0x168FCC8;
pub const interfaceLinkList: usize = 0x1972A38;
pub const localPlayerController: usize = 0x17DB0F8; pub const localPlayerController: usize = 0x17DB0F8;
pub const localPlayerPawn: usize = 0x1879BE8; pub const localPlayerPawn: usize = 0x1879BE8;
pub const viewAngles: usize = 0x18D9590; pub const viewAngles: usize = 0x18D9590;
pub const viewMatrix: usize = 0x187A6D0; pub const viewMatrix: usize = 0x187A6D0;
} }
pub mod engine2_dll {
pub const networkGameClient: usize = 0x489AB0;
pub const networkGameClient_signOnState: usize = 0x240;
}

View File

@ -6,6 +6,7 @@ pub enum Operation {
Add { value: usize }, Add { value: usize },
Dereference { times: Option<u16> }, Dereference { times: Option<u16> },
Jmp, Jmp,
Offset { position: usize },
RipRelative, RipRelative,
Subtract { value: usize }, Subtract { value: usize },
} }

View File

@ -21,6 +21,8 @@ pub fn dump_offsets(builders: &mut Vec<FileBuilderEnum>, process: &Process) -> R
let mut address = process.find_pattern(&signature.module, &signature.pattern)?; let mut address = process.find_pattern(&signature.module, &signature.pattern)?;
let mut offset: Option<u32> = None;
for operation in signature.operations { for operation in signature.operations {
match operation { match operation {
Operation::Add { value } => { Operation::Add { value } => {
@ -34,6 +36,9 @@ pub fn dump_offsets(builders: &mut Vec<FileBuilderEnum>, process: &Process) -> R
Operation::Jmp => { Operation::Jmp => {
address = process.resolve_jmp(address)?; address = process.resolve_jmp(address)?;
} }
Operation::Offset { position } => {
offset = Some(process.read_memory::<u32>(address + position)?);
}
Operation::RipRelative => { Operation::RipRelative => {
address = process.resolve_rip(address)?; address = process.resolve_rip(address)?;
} }
@ -43,17 +48,27 @@ pub fn dump_offsets(builders: &mut Vec<FileBuilderEnum>, process: &Process) -> R
} }
} }
log::info!( let sanitized_module_name = signature.module.replace(".", "_");
" -> Found '{}' @ {:#X} (RVA: {:#X})",
signature.name, let (name, value) = if let Some(offset) = offset {
address, log::info!(" -> Found '{}' @ {:#X}", signature.name, offset);
address - module.address()
); (signature.name, offset as usize)
} else {
log::info!(
" -> Found '{}' @ {:#X} (RVA: {:#X})",
signature.name,
address,
address - module.address()
);
(signature.name, address - module.address())
};
entries entries
.entry(signature.module.replace(".", "_")) .entry(sanitized_module_name)
.or_default() .or_default()
.push((signature.name, address - module.address())); .push((name, value));
} }
for builder in builders.iter_mut() { for builder in builders.iter_mut() {