1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
//! Research command CLI definitions (requires 'research' feature)
use clap::Subcommand;
use std::path::PathBuf;
#[derive(Subcommand)]
pub enum UsmapCommand {
/// Show info about a usmap file
Info {
/// Path to usmap file
path: PathBuf,
},
/// Search usmap for struct/enum names
Search {
/// Path to usmap file
path: PathBuf,
/// Search pattern (case-insensitive substring match)
pattern: String,
/// Show struct properties
#[arg(short, long)]
verbose: bool,
},
}
#[derive(Subcommand)]
pub enum ExtractCommand {
/// Extract part pools from the parts database
#[command(visible_alias = "pp")]
PartPools {
/// Input parts database JSON
#[arg(short, long, default_value = "share/manifest/parts_database.json")]
input: PathBuf,
/// Output part pools JSON
#[arg(short, long, default_value = "share/manifest/part_pools.json")]
output: PathBuf,
},
/// Extract manufacturer data from pak_manifest.json
#[command(visible_alias = "m")]
Manufacturers {
/// Path to pak_manifest.json
#[arg(short, long, default_value = "share/manifest/pak_manifest.json")]
input: PathBuf,
/// Output file
#[arg(short, long, default_value = "share/manifest/manufacturers.json")]
output: PathBuf,
},
/// Extract weapon type data from pak_manifest.json
#[command(visible_alias = "wt")]
WeaponTypes {
/// Path to pak_manifest.json
#[arg(short, long, default_value = "share/manifest/pak_manifest.json")]
input: PathBuf,
/// Output file
#[arg(short, long, default_value = "share/manifest/weapon_types.json")]
output: PathBuf,
},
/// Extract gear type data from pak_manifest.json
#[command(visible_alias = "gt")]
GearTypes {
/// Path to pak_manifest.json
#[arg(short, long, default_value = "share/manifest/pak_manifest.json")]
input: PathBuf,
/// Output file
#[arg(short, long, default_value = "share/manifest/gear_types.json")]
output: PathBuf,
},
/// Extract element types from pak_manifest.json
#[command(visible_alias = "el")]
Elements {
/// Path to pak_manifest.json
#[arg(short, long, default_value = "share/manifest/pak_manifest.json")]
input: PathBuf,
/// Output file
#[arg(short, long, default_value = "share/manifest/elements.json")]
output: PathBuf,
},
/// Extract rarity tiers from pak_manifest.json
#[command(visible_alias = "ra")]
Rarities {
/// Path to pak_manifest.json
#[arg(short, long, default_value = "share/manifest/pak_manifest.json")]
input: PathBuf,
/// Output file
#[arg(short, long, default_value = "share/manifest/rarities.json")]
output: PathBuf,
},
/// Extract stat types from pak_manifest.json
#[command(visible_alias = "st")]
Stats {
/// Path to pak_manifest.json
#[arg(short, long, default_value = "share/manifest/pak_manifest.json")]
input: PathBuf,
/// Output file
#[arg(short, long, default_value = "share/manifest/stats.json")]
output: PathBuf,
},
/// Extract executable from Windows minidump (bypasses Denuvo)
#[command(name = "minidump-to-exe", visible_alias = "m2e")]
MinidumpToExe {
/// Path to Windows minidump file (.dmp)
input: PathBuf,
/// Output executable path
#[arg(short, long)]
output: Option<PathBuf>,
/// Base address of the executable in memory (default: 0x140000000)
#[arg(short, long, default_value = "0x140000000")]
base: String,
},
/// Check if a file is a valid NCS file
#[command(name = "ncs-check")]
NcsCheck {
/// Path to file to check
input: PathBuf,
},
/// Decompress an NCS file
#[command(name = "ncs-decompress")]
NcsDecompress {
/// Path to NCS file
input: PathBuf,
/// Output path (default: input with .decompressed extension)
#[arg(short, long)]
output: Option<PathBuf>,
},
/// Show information about an NCS file
#[command(name = "ncs-info")]
NcsInfo {
/// Path to NCS file
input: PathBuf,
},
/// Search for NCS files in a directory
#[command(name = "ncs-find")]
NcsFind {
/// Directory to search
path: PathBuf,
/// Recursive search
#[arg(short, long)]
recursive: bool,
},
/// Scan a binary file for embedded NCS chunks
#[command(name = "ncs-scan")]
NcsScan {
/// Path to file to scan (e.g., .pak file)
input: PathBuf,
/// Show all matches including invalid ones
#[arg(short, long)]
all: bool,
},
/// Extract all NCS chunks from a binary file
#[command(name = "ncs-extract")]
NcsExtract {
/// Path to file to scan
input: PathBuf,
/// Output directory for extracted chunks
#[arg(short, long)]
output: PathBuf,
/// Also decompress the chunks
#[arg(short, long)]
decompress: bool,
},
}