Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
6d98f8c77e | |||
3cb114e821 |
5 changed files with 59 additions and 35 deletions
|
@ -9,9 +9,8 @@ crate-type = ["cdylib"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
cn_beta_1_4_0 = []
|
cn_beta_1_4_0 = []
|
||||||
cn_beta_1_3_0 = []
|
cn_live_1_4_0 = []
|
||||||
cn_live_1_3_0 = []
|
os_live_1_4_0 = []
|
||||||
os_live_1_3_0 = []
|
|
||||||
enable-sdk = []
|
enable-sdk = []
|
||||||
only-sig-bypass = []
|
only-sig-bypass = []
|
||||||
regular = ["dep:regex", "dep:widestring"]
|
regular = ["dep:regex", "dep:widestring"]
|
||||||
|
|
41
_archive/offsets.rs
Normal file
41
_archive/offsets.rs
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
#[cfg(feature = "cn_beta_1_3_0")]
|
||||||
|
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
||||||
|
f_pak_file_check: 0x3D2F460,
|
||||||
|
f_pak_file_check_preamble: 0x8148574157565340,
|
||||||
|
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
kuro_http_get: 0xFC8CF0,
|
||||||
|
#[cfg(all(not(feature = "enable-sdk"), not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
disable_sdk: DisableSdkConfiguration{
|
||||||
|
sdk_dll: s!("KRSDKEx.dll"),
|
||||||
|
eula_accept: 0x4A690,
|
||||||
|
sdk_go_away: 0x8BB80,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
#[cfg(feature = "cn_live_1_3_0")]
|
||||||
|
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
||||||
|
f_pak_file_check: 0x3D35DF0,
|
||||||
|
f_pak_file_check_preamble: 0x8148574157565340,
|
||||||
|
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
kuro_http_get: 0xFC9900,
|
||||||
|
#[cfg(all(not(feature = "enable-sdk"), not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
disable_sdk: DisableSdkConfiguration{
|
||||||
|
sdk_dll: s!("KRSDKEx.dll"),
|
||||||
|
eula_accept: 0x4A690,
|
||||||
|
sdk_go_away: 0x8B9F0,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
#[cfg(feature = "os_live_1_3_0")]
|
||||||
|
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
||||||
|
f_pak_file_check: 0x3CDC430,
|
||||||
|
f_pak_file_check_preamble: 0x8148574157565340,
|
||||||
|
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
kuro_http_get: 0xFC6C20,
|
||||||
|
#[cfg(all(not(feature = "enable-sdk"), not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
disable_sdk: DisableSdkConfiguration{
|
||||||
|
sdk_dll: s!("KRSDK.dll"),
|
||||||
|
eula_accept: 0x95440,
|
||||||
|
sdk_go_away: 0xA1280
|
||||||
|
}
|
||||||
|
};
|
|
@ -15,12 +15,10 @@ EXIT /B 0
|
||||||
SETLOCAL ENABLEDELAYEDEXPANSION
|
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||||
: Build for cn_beta_1_4_0
|
: Build for cn_beta_1_4_0
|
||||||
call:cargoReleaseBuild "cn_beta_1_4_0,%~1" %~1
|
call:cargoReleaseBuild "cn_beta_1_4_0,%~1" %~1
|
||||||
: Build for cn_beta_1_3_0
|
|
||||||
call:cargoReleaseBuild "cn_beta_1_3_0,%~1" %~1
|
|
||||||
: Build for cn_live_1_3_0
|
: Build for cn_live_1_3_0
|
||||||
call:cargoReleaseBuild "cn_live_1_3_0,%~1" %~1
|
call:cargoReleaseBuild "cn_live_1_4_0,%~1" %~1
|
||||||
: Build for os_live_1_3_0
|
: Build for os_live_1_3_0
|
||||||
call:cargoReleaseBuild "os_live_1_3_0,%~1" %~1
|
call:cargoReleaseBuild "os_live_1_4_0,%~1" %~1
|
||||||
ENDLOCAL
|
ENDLOCAL
|
||||||
EXIT /B 0
|
EXIT /B 0
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ unsafe extern "win64" fn on_kurohttp_get(reg: *mut Registers, _: usize) {
|
||||||
if let Some(result) = replacer.replace(url.as_str()) {
|
if let Some(result) = replacer.replace(url.as_str()) {
|
||||||
println!("Redirecting to: {result}");
|
println!("Redirecting to: {result}");
|
||||||
// TODO: Track https://doc.rust-lang.org/nightly/unstable-book/library-features/str-from-utf16-endian.html to replace widestring when stabilized
|
// TODO: Track https://doc.rust-lang.org/nightly/unstable-book/library-features/str-from-utf16-endian.html to replace widestring when stabilized
|
||||||
let new_url = widestring::U16String::from_str(result.as_str());
|
let new_url = widestring::U16CString::from_str(result.as_str()).unwrap();
|
||||||
let new_wstr = PCWSTR::from_raw(new_url.as_ptr());
|
let new_wstr = PCWSTR::from_raw(new_url.as_ptr());
|
||||||
std::ptr::copy_nonoverlapping(new_wstr.as_ptr(), wstr, new_wstr.as_wide().len() + 2);
|
std::ptr::copy_nonoverlapping(new_wstr.as_ptr(), wstr, new_wstr.as_wide().len() + 2);
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,7 +19,7 @@ pub(crate) struct InjectConfiguration {
|
||||||
|
|
||||||
#[cfg(feature = "cn_beta_1_4_0")]
|
#[cfg(feature = "cn_beta_1_4_0")]
|
||||||
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
||||||
f_pak_file_check: 0x3E37D90, // 0x3E37D90
|
f_pak_file_check: 0x3E37D90,
|
||||||
f_pak_file_check_preamble: 0x8148574157565340,
|
f_pak_file_check_preamble: 0x8148574157565340,
|
||||||
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
kuro_http_get: 0xFE9E00,
|
kuro_http_get: 0xFE9E00,
|
||||||
|
@ -31,44 +31,30 @@ pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(feature = "cn_beta_1_3_0")]
|
#[cfg(feature = "cn_live_1_4_0")]
|
||||||
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
||||||
f_pak_file_check: 0x3D2F460,
|
f_pak_file_check: 0x3E3FCB0,
|
||||||
f_pak_file_check_preamble: 0x8148574157565340,
|
f_pak_file_check_preamble: 0x5741544156535540,
|
||||||
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
kuro_http_get: 0xFC8CF0,
|
kuro_http_get: 0xFED3E0,
|
||||||
#[cfg(all(not(feature = "enable-sdk"), not(feature = "only-sig-bypass"), feature = "regular"))]
|
#[cfg(all(not(feature = "enable-sdk"), not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
disable_sdk: DisableSdkConfiguration{
|
disable_sdk: DisableSdkConfiguration{
|
||||||
sdk_dll: s!("KRSDKEx.dll"),
|
sdk_dll: s!("KRSDKEx.dll"),
|
||||||
eula_accept: 0x4A690,
|
eula_accept: 0x4A6D0,
|
||||||
sdk_go_away: 0x8BB80,
|
sdk_go_away: 0x8BB40,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(feature = "cn_live_1_3_0")]
|
#[cfg(feature = "os_live_1_4_0")]
|
||||||
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
||||||
f_pak_file_check: 0x3D35DF0,
|
f_pak_file_check: 0x3DE6650,
|
||||||
f_pak_file_check_preamble: 0x8148574157565340,
|
f_pak_file_check_preamble: 0x5741544156535540,
|
||||||
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
kuro_http_get: 0xFC9900,
|
kuro_http_get: 0xFEA7A0,
|
||||||
#[cfg(all(not(feature = "enable-sdk"), not(feature = "only-sig-bypass"), feature = "regular"))]
|
|
||||||
disable_sdk: DisableSdkConfiguration{
|
|
||||||
sdk_dll: s!("KRSDKEx.dll"),
|
|
||||||
eula_accept: 0x4A690,
|
|
||||||
sdk_go_away: 0x8B9F0,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#[cfg(feature = "os_live_1_3_0")]
|
|
||||||
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
|
||||||
f_pak_file_check: 0x3CDC430,
|
|
||||||
f_pak_file_check_preamble: 0x8148574157565340,
|
|
||||||
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
|
||||||
kuro_http_get: 0xFC6C20,
|
|
||||||
#[cfg(all(not(feature = "enable-sdk"), not(feature = "only-sig-bypass"), feature = "regular"))]
|
#[cfg(all(not(feature = "enable-sdk"), not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
disable_sdk: DisableSdkConfiguration{
|
disable_sdk: DisableSdkConfiguration{
|
||||||
sdk_dll: s!("KRSDK.dll"),
|
sdk_dll: s!("KRSDK.dll"),
|
||||||
eula_accept: 0x95440,
|
eula_accept: 0x959D0,
|
||||||
sdk_go_away: 0xA1280
|
sdk_go_away: 0xA1810
|
||||||
}
|
}
|
||||||
};
|
};
|
Loading…
Reference in a new issue