cleanup: remove unused call_usercall_esi_stdcall1, fix scheme_version scope
Browse files
crates/openwa-wormkit/src/replacements/replay.rs
CHANGED
|
@@ -275,9 +275,6 @@ unsafe fn parse_and_write_v2plus(
|
|
| 275 |
let _extra = s.read_u32()?;
|
| 276 |
}
|
| 277 |
|
| 278 |
-
#[allow(unused_assignments)]
|
| 279 |
-
let mut scheme_version: u8 = 0;
|
| 280 |
-
|
| 281 |
if scheme_present == 1 {
|
| 282 |
// Scheme header byte
|
| 283 |
if obs_count >= 3 {
|
|
@@ -300,7 +297,7 @@ unsafe fn parse_and_write_v2plus(
|
|
| 300 |
|
| 301 |
// SCHM magic + version
|
| 302 |
let magic = s.read_u32()?;
|
| 303 |
-
scheme_version = s.read_u8()?;
|
| 304 |
if magic != 0x4D484353 { return Err(ReplayError::InvalidFormat); }
|
| 305 |
|
| 306 |
let scheme_data_size = match scheme_version {
|
|
@@ -818,7 +815,6 @@ unsafe fn c_strlen(s: *const u8) -> usize {
|
|
| 818 |
|
| 819 |
// βββ Naked asm bridges ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 820 |
|
| 821 |
-
|
| 822 |
/// Bridge for usercall(EAX=value) + plain call. cdecl(eax_val, func_addr).
|
| 823 |
#[unsafe(naked)]
|
| 824 |
unsafe extern "cdecl" fn call_usercall_eax(_eax_val: u32, _func: u32) {
|
|
|
|
| 275 |
let _extra = s.read_u32()?;
|
| 276 |
}
|
| 277 |
|
|
|
|
|
|
|
|
|
|
| 278 |
if scheme_present == 1 {
|
| 279 |
// Scheme header byte
|
| 280 |
if obs_count >= 3 {
|
|
|
|
| 297 |
|
| 298 |
// SCHM magic + version
|
| 299 |
let magic = s.read_u32()?;
|
| 300 |
+
let scheme_version = s.read_u8()?;
|
| 301 |
if magic != 0x4D484353 { return Err(ReplayError::InvalidFormat); }
|
| 302 |
|
| 303 |
let scheme_data_size = match scheme_version {
|
|
|
|
| 815 |
|
| 816 |
// βββ Naked asm bridges ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 817 |
|
|
|
|
| 818 |
/// Bridge for usercall(EAX=value) + plain call. cdecl(eax_val, func_addr).
|
| 819 |
#[unsafe(naked)]
|
| 820 |
unsafe extern "cdecl" fn call_usercall_eax(_eax_val: u32, _func: u32) {
|