mirror of
https://github.com/a2x/cs2-dumper.git
synced 2025-04-04 08:35:34 +08:00
40 lines
770 B
Rust
40 lines
770 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Debug, Deserialize, Serialize)]
|
|
#[serde(tag = "type", rename_all = "camelCase")]
|
|
pub enum Operation {
|
|
Add {
|
|
value: usize,
|
|
},
|
|
Dereference {
|
|
times: Option<u16>,
|
|
},
|
|
Jmp {
|
|
offset: Option<usize>,
|
|
length: Option<usize>,
|
|
},
|
|
Offset {
|
|
offset: usize,
|
|
},
|
|
RipRelative {
|
|
offset: Option<usize>,
|
|
length: Option<usize>,
|
|
},
|
|
Subtract {
|
|
value: usize,
|
|
},
|
|
}
|
|
|
|
#[derive(Debug, Deserialize, Serialize)]
|
|
pub struct Signature {
|
|
pub name: String,
|
|
pub module: String,
|
|
pub pattern: String,
|
|
pub operations: Vec<Operation>,
|
|
}
|
|
|
|
#[derive(Debug, Deserialize, Serialize)]
|
|
pub struct Config {
|
|
pub signatures: Vec<Signature>,
|
|
}
|