Add python file builder

This commit is contained in:
a2x
2023-10-17 12:06:23 +10:00
parent c55bdf15a2
commit 0a86db6b40
86 changed files with 17670 additions and 436 deletions

33
src/sdk/interface.rs Normal file
View File

@@ -0,0 +1,33 @@
use std::ffi::c_char;
use std::mem::offset_of;
use crate::error::Result;
use crate::remote::Process;
#[derive(Debug)]
#[repr(C)]
pub struct InterfaceReg {
pub create_fn: *const (), // 0x0000
pub name: *const c_char, // 0x0008
pub next: *mut InterfaceReg, // 0x0010
}
impl InterfaceReg {
pub fn ptr(&self, process: &Process) -> Result<usize> {
process
.read_memory::<usize>(self as *const _ as usize + offset_of!(InterfaceReg, create_fn))
}
pub fn name(&self, process: &Process) -> Result<String> {
let name_ptr = process
.read_memory::<usize>(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),
)
}
}

View File

@@ -1,3 +1,4 @@
pub use interface::InterfaceReg;
pub use schema_class_field_data::SchemaClassFieldData;
pub use schema_class_info::SchemaClassInfo;
pub use schema_system::SchemaSystem;
@@ -6,6 +7,7 @@ pub use schema_type::SchemaType;
pub use schema_type_declared_class::SchemaTypeDeclaredClass;
pub use utl_ts_hash::UtlTsHash;
pub mod interface;
pub mod schema_class_field_data;
pub mod schema_class_info;
pub mod schema_system;