diff --git a/Cargo.toml b/Cargo.toml index 8802276..04c7120 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ crate-type = ["cdylib"] [features] advanced = [] -cn_beta_2_4_0 = [] +cn_beta_2_5_1 = [] enable-sdk = [] only-sig-bypass = [] regular = ["dep:regex", "dep:widestring"] diff --git a/archive.md b/archive.md index 7562eca..bc21947 100644 --- a/archive.md +++ b/archive.md @@ -1,3 +1,56 @@ +# CN BETA 2.4.0 +```rust +#[cfg(feature = "cn_beta_2_4_0")] +pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration { + f_pak_file_check: 0x42CF240, + f_pak_file_check_preamble: 0x8D48574157565540, + resize_grow: 0x08E1690, + f_print_f: 0x2912CF0, + add_pak_folders_entry: 0x42D6720, + add_pak_folders_ret: 0x42D8FC0, + #[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))] + ue_curl_config: CurlConfig { + handle_rcx_relative_offset: 0x110, + url_handle_relative_offset: 0x880, + http_headers_handle_relative_offset: None, + curl_easy_setopt: 0x66B3720, + curl_easy_perform: 0x3C65C60, + }, + #[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/(.*)$"#, + #[cfg(feature = "enable-sdk")] + sdk_server_regex: r#"^(https|http)://.*\.cos\..*\.myqcloud\.com/(.*)$"#, + replacement_defaults: &ReplacementDefaults { + config_server_default: "127.0.0.1:10001", + // hotpatch_server_default: "127.0.0.1:10001", + log_server_default: "127.0.0.1:10001", + #[cfg(feature = "enable-sdk")] + sdk_server_default: "127.0.0.1:10001", + }, + }, + #[cfg(all(not(feature = "enable-sdk"), not(feature = "only-sig-bypass"), feature = "regular"))] + disable_sdk: DisableSdkConfiguration { + sdk_dll: s!("KRSDKEx.dll"), + eula_accept: 0x4F490, + sdk_go_away: 0x93FD0, + }, + #[cfg(all(feature = "enable-sdk", not(feature = "only-sig-bypass"), feature = "regular"))] + kr_curl: KrCurlConfiguration { + curl_dll: s!("libkrsdkcurl.dll"), + curl_config: CurlConfig { + handle_rcx_relative_offset: 0, + url_handle_relative_offset: 0x1220, + http_headers_handle_relative_offset: Some(0x340), + curl_easy_setopt: 0x36E50, + curl_easy_perform: 0xE3D0, + }, + } + }; +``` + # CN BETA 2.3.0 ```rust #[cfg(feature = "cn_beta_2_3_0")] diff --git a/build.bat b/build.bat index 63fc18a..f19224f 100644 --- a/build.bat +++ b/build.bat @@ -13,7 +13,7 @@ EXIT /B 0 :buildAllVariants SETLOCAL ENABLEDELAYEDEXPANSION - call:cargoReleaseBuild "cn_beta_2_4_0,%~1" %~1 + call:cargoReleaseBuild "cn_beta_2_5_1,%~1" %~1 : call:cargoReleaseBuild "os_live_2_2_0,%~1" %~1 ENDLOCAL EXIT /B 0 diff --git a/src/config.rs b/src/config.rs index 4cb4eb3..e6763ef 100644 --- a/src/config.rs +++ b/src/config.rs @@ -51,21 +51,21 @@ pub(crate) struct InjectConfiguration { pub(crate) kr_curl: KrCurlConfiguration, } -#[cfg(feature = "cn_beta_2_4_0")] +#[cfg(feature = "cn_beta_2_5_1")] pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration { - f_pak_file_check: 0x42CF240, + f_pak_file_check: 0x439E080, f_pak_file_check_preamble: 0x8D48574157565540, - resize_grow: 0x08E1690, - f_print_f: 0x2912CF0, - add_pak_folders_entry: 0x42D6720, - add_pak_folders_ret: 0x42D8FC0, + resize_grow: 0x08EEFF0, + f_print_f: 0x29DA500, + add_pak_folders_entry: 0x43A5560, + add_pak_folders_ret: 0x43A7E00, #[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))] ue_curl_config: CurlConfig { handle_rcx_relative_offset: 0x110, url_handle_relative_offset: 0x880, http_headers_handle_relative_offset: None, - curl_easy_setopt: 0x66B3720, - curl_easy_perform: 0x3C65C60, + curl_easy_setopt: 0x678DFC0, + curl_easy_perform: 0x3D2E9F0, }, #[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))] replacement_config: ReplacementConfig { @@ -85,8 +85,8 @@ 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: 0x4F490, - sdk_go_away: 0x93FD0, + eula_accept: 0x50E20, + sdk_go_away: 0x95AD0, }, #[cfg(all(feature = "enable-sdk", not(feature = "only-sig-bypass"), feature = "regular"))] kr_curl: KrCurlConfiguration {