mirror of
https://github.com/a2x/cs2-dumper.git
synced 2025-04-05 00:25:36 +08:00
Port schemasystems
dumper to linux
This commit is contained in:
parent
1ef287c535
commit
10a908ab6f
@ -13,10 +13,13 @@ pub struct SchemaSystem<'a> {
|
|||||||
|
|
||||||
impl<'a> SchemaSystem<'a> {
|
impl<'a> SchemaSystem<'a> {
|
||||||
pub fn new(process: &'a Process) -> Result<Self> {
|
pub fn new(process: &'a Process) -> Result<Self> {
|
||||||
let mut address = process.find_pattern(
|
let mut address = process
|
||||||
"schemasystem.dll",
|
.find_pattern(
|
||||||
"48 8D 0D ? ? ? ? E9 ? ? ? ? CC CC CC CC 48 8D 0D ? ? ? ? E9 ? ? ? ? CC CC CC CC 48 83 EC 28"
|
"schemasystem.dll",
|
||||||
).expect("unable to find schema system pattern");
|
"48 8D 05 ? ? ? ? c3 ? ? ? 00 00 00 00 00 48 8d 05 ? ? ? ? c3 ? ? ? 00 00 00 00 00 48 ? ? ? c3"
|
||||||
|
// "48 8D 0D ? ? ? ? E9 ? ? ? ? CC CC CC CC 48 8D 0D ? ? ? ? E9 ? ? ? ? CC CC CC CC 48 83 EC 28"
|
||||||
|
)
|
||||||
|
.expect("unable to find schema system pattern");
|
||||||
|
|
||||||
address = process.resolve_rip(address, None, None)?;
|
address = process.resolve_rip(address, None, None)?;
|
||||||
|
|
||||||
@ -24,13 +27,15 @@ impl<'a> SchemaSystem<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn type_scopes(&self) -> Result<Vec<SchemaSystemTypeScope>> {
|
pub fn type_scopes(&self) -> Result<Vec<SchemaSystemTypeScope>> {
|
||||||
let size = self.process.read_memory::<u32>(self.address + 0x190)?;
|
// let size = self.process.read_memory::<u32>(self.address + 0x190)?;
|
||||||
|
let size = self.process.read_memory::<u32>(self.address + 0x1f8)?;
|
||||||
|
|
||||||
if size == 0 {
|
if size == 0 {
|
||||||
bail!("no type scopes found");
|
bail!("no type scopes found");
|
||||||
}
|
}
|
||||||
|
|
||||||
let data = self.process.read_memory::<usize>(self.address + 0x198)?;
|
// let data = self.process.read_memory::<usize>(self.address + 0x198)?;
|
||||||
|
let data = self.process.read_memory::<usize>(self.address + 0x200)?;
|
||||||
|
|
||||||
let mut addresses = vec![0; size as usize];
|
let mut addresses = vec![0; size as usize];
|
||||||
|
|
||||||
|
@ -17,7 +17,8 @@ impl<'a> SchemaSystemTypeScope<'a> {
|
|||||||
pub fn classes(&self) -> Result<Vec<SchemaClassInfo>> {
|
pub fn classes(&self) -> Result<Vec<SchemaClassInfo>> {
|
||||||
let declared_classes = self
|
let declared_classes = self
|
||||||
.process
|
.process
|
||||||
.read_memory::<UtlTsHash<*mut SchemaTypeDeclaredClass>>(self.address + 0x5B8)?;
|
.read_memory::<UtlTsHash<*mut SchemaTypeDeclaredClass>>(self.address + 0x620)?;
|
||||||
|
// .read_memory::<UtlTsHash<*mut SchemaTypeDeclaredClass>>(self.address + 0x5B8)?;
|
||||||
|
|
||||||
let classes: Vec<SchemaClassInfo> = declared_classes
|
let classes: Vec<SchemaClassInfo> = declared_classes
|
||||||
.elements(self.process)?
|
.elements(self.process)?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user