From cb618cc14691fdbe2e4ea7733ac308ef39f06169 Mon Sep 17 00:00:00 2001 From: xavo95 Date: Sat, 1 Mar 2025 04:05:36 +0100 Subject: [PATCH] Merge pull request '2.2.1 support' (#2) from 2.1.1 into master --- Cargo.toml | 3 ++- archive.md | 34 ++++++++++++++++++++++++++++++++++ build.bat | 3 ++- src/config.rs | 50 ++++++++++++++++++++++++++++++++++++++++---------- 4 files changed, 78 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 438f84d..6c524d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,8 @@ crate-type = ["cdylib"] [features] advanced = [] -cn_beta_2_1_0 = [] +cn_beta_2_2_1 = [] +os_live_2_1_0 = [] enable-sdk = [] only-sig-bypass = [] regular = ["dep:regex", "dep:widestring"] diff --git a/archive.md b/archive.md index 947c4ac..d37a5d7 100644 --- a/archive.md +++ b/archive.md @@ -1,3 +1,37 @@ +# CN BETA 2.2.0 + +```rust +#[cfg(feature = "cn_beta_2_2_0")] +pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration { + f_pak_file_check: 0x41CA5F0, + f_pak_file_check_preamble: 0x8D48574157565540, + resize_grow: 0x08D93D0, + f_print_f: 0x284EB20, + add_pak_folders_entry: 0x41D1AD0, + add_pak_folders_ret: 0x41D4370, + #[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))] + ue_curl_config: CurlConfig { + handle_rcx_relative_offset: 0x110, + url_handle_relative_offset: 0x880, + curl_easy_setopt: 0x6576460, + curl_easy_perform: 0x3B66280, + }, + #[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))] + replacement_config: ReplacementConfig { + config_server_regex: r#"^(https|http)://.*/([a-zA-Z0-9]{32}/index\.json)$"#, + // hotpatch_server_regex: "", + log_server_regex: r#"^(https|http)://.*\.cos\..*\.myqcloud\.com/(.*)$"#, + // sdk_server_regex: "", + }, + #[cfg(all(not(feature = "enable-sdk"), not(feature = "only-sig-bypass"), feature = "regular"))] + disable_sdk: DisableSdkConfiguration { + sdk_dll: s!("KRSDKEx.dll"), + eula_accept: 0x4ED80, + sdk_go_away: 0x91FE0, + }, +}; +``` + # CN LIVE 2.0.0 ```rust diff --git a/build.bat b/build.bat index 1efb531..317e703 100644 --- a/build.bat +++ b/build.bat @@ -13,7 +13,8 @@ EXIT /B 0 :buildAllVariants SETLOCAL ENABLEDELAYEDEXPANSION - call:cargoReleaseBuild "cn_beta_2_1_0,%~1" %~1 + call:cargoReleaseBuild "cn_beta_2_2_0,%~1" %~1 + call:cargoReleaseBuild "os_live_2_1_0,%~1" %~1 ENDLOCAL EXIT /B 0 diff --git a/src/config.rs b/src/config.rs index 56f3e60..eeee21e 100644 --- a/src/config.rs +++ b/src/config.rs @@ -48,20 +48,20 @@ pub(crate) struct InjectConfiguration { pub(crate) disable_sdk: DisableSdkConfiguration, } -#[cfg(feature = "cn_beta_2_1_0")] +#[cfg(feature = "cn_beta_2_2_1")] pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration { - f_pak_file_check: 0x40E8980, + f_pak_file_check: 0x41CE7F0, f_pak_file_check_preamble: 0x8D48574157565540, - resize_grow: 0x08D34D0, - f_print_f: 0x2787600, - add_pak_folders_entry: 0x40EFE60, - add_pak_folders_ret: 0x40F2700, + resize_grow: 0x08D9510, + f_print_f: 0x2852CE0, + add_pak_folders_entry: 0x41D5CD0, + add_pak_folders_ret: 0x41D8570, #[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))] ue_curl_config: CurlConfig { handle_rcx_relative_offset: 0x110, url_handle_relative_offset: 0x880, - curl_easy_setopt: 0x648F300, - curl_easy_perform: 0x3A88E90, + curl_easy_setopt: 0x657A660, + curl_easy_perform: 0x3B6A440, }, #[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))] replacement_config: ReplacementConfig { @@ -73,7 +73,37 @@ pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration { #[cfg(all(not(feature = "enable-sdk"), not(feature = "only-sig-bypass"), feature = "regular"))] disable_sdk: DisableSdkConfiguration { sdk_dll: s!("KRSDKEx.dll"), - eula_accept: 0x4E710, - sdk_go_away: 0x91960, + eula_accept: 0x4ED80, + sdk_go_away: 0x91FE0, + }, +}; + +#[cfg(feature = "os_live_2_1_0")] +pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration { + f_pak_file_check: 0x40A6840, + f_pak_file_check_preamble: 0x8D48574157565540, + resize_grow: 0x08D1430, + f_print_f: 0x2736C10, + add_pak_folders_entry: 0x40ADD20, + add_pak_folders_ret: 0x40B05C0, + #[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))] + ue_curl_config: CurlConfig { + handle_rcx_relative_offset: 0x110, + url_handle_relative_offset: 0x880, + curl_easy_setopt: 0x6415920, + curl_easy_perform: 0x3A430D0, + }, + #[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))] + replacement_config: ReplacementConfig { + config_server_regex: r#"^(https|http)://.*/([a-zA-Z0-9]{32}/index\.json)$"#, + // hotpatch_server_regex: "", + log_server_regex: r#"^(https|http)://.*\.cos\..*\.myqcloud\.com/(.*)$"#, + // sdk_server_regex: "", + }, + #[cfg(all(not(feature = "enable-sdk"), not(feature = "only-sig-bypass"), feature = "regular"))] + disable_sdk: DisableSdkConfiguration { + sdk_dll: s!("KRSDK.dll"), + eula_accept: 0x96800, + sdk_go_away: 0xA2680, }, }; \ No newline at end of file