Compare commits
11 commits
Author | SHA1 | Date | |
---|---|---|---|
9c5415386a | |||
467b4726f3 | |||
2b2a11df4c | |||
47c5c9d123 | |||
fae28ec132 | |||
1d367f370b | |||
94d9526135 | |||
cb618cc146 | |||
58f8f2b1c5 | |||
57e6f43142 | |||
3cb114e821 |
12 changed files with 1083 additions and 315 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
/target
|
/target
|
||||||
/build
|
/build
|
||||||
**.zip
|
**.zip
|
||||||
|
.idea
|
248
Cargo.lock
generated
248
Cargo.lock
generated
|
@ -1,6 +1,6 @@
|
||||||
# This file is automatically @generated by Cargo.
|
# This file is automatically @generated by Cargo.
|
||||||
# It is not intended for manual editing.
|
# It is not intended for manual editing.
|
||||||
version = 3
|
version = 4
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "aho-corasick"
|
name = "aho-corasick"
|
||||||
|
@ -13,9 +13,19 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bitflags"
|
name = "bitflags"
|
||||||
version = "2.6.0"
|
version = "2.9.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
|
checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "curly-injector"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "git+https://git.xeondev.com/ReversedRoomsMisc/curly-injector.git#1184af99d3788931ee691f5922c55d9ea06b3003"
|
||||||
|
dependencies = [
|
||||||
|
"ilhook",
|
||||||
|
"interceptor-rs",
|
||||||
|
"regex",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced-x86"
|
name = "iced-x86"
|
||||||
|
@ -37,14 +47,23 @@ dependencies = [
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"libc",
|
"libc",
|
||||||
"regex",
|
"regex",
|
||||||
"thiserror",
|
"thiserror 1.0.69",
|
||||||
"windows-sys",
|
"windows-sys",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "injector-utils"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "git+https://git.xeondev.com/ReversedRoomsMisc/process-launcher-rs.git#4dc7349c86020b92d795f74a30c9f3c76414f2f4"
|
||||||
|
dependencies = [
|
||||||
|
"thiserror 2.0.12",
|
||||||
|
"windows",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "interceptor-rs"
|
name = "interceptor-rs"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://git.xeondev.com/xavo95/interceptor-rs.git#282da6f98b8e4a4e9844422343d4ce11606c9de6"
|
source = "git+https://git.xeondev.com/ReversedRoomsMisc/interceptor-rs.git#418aef083cc6768201f0512fdbdca5c03aa4f787"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ilhook",
|
"ilhook",
|
||||||
]
|
]
|
||||||
|
@ -57,9 +76,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.2.159"
|
version = "0.2.172"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5"
|
checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "memchr"
|
name = "memchr"
|
||||||
|
@ -69,18 +88,18 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.87"
|
version = "1.0.95"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a"
|
checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "1.0.37"
|
version = "1.0.40"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
|
checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
]
|
]
|
||||||
|
@ -99,9 +118,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex-automata"
|
name = "regex-automata"
|
||||||
version = "0.4.8"
|
version = "0.4.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3"
|
checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aho-corasick",
|
"aho-corasick",
|
||||||
"memchr",
|
"memchr",
|
||||||
|
@ -116,9 +135,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "2.0.79"
|
version = "2.0.101"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590"
|
checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -127,18 +146,38 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror"
|
name = "thiserror"
|
||||||
version = "1.0.64"
|
version = "1.0.69"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84"
|
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"thiserror-impl",
|
"thiserror-impl 1.0.69",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "thiserror"
|
||||||
|
version = "2.0.12"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708"
|
||||||
|
dependencies = [
|
||||||
|
"thiserror-impl 2.0.12",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror-impl"
|
name = "thiserror-impl"
|
||||||
version = "1.0.64"
|
version = "1.0.69"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3"
|
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "thiserror-impl"
|
||||||
|
version = "2.0.12"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -147,55 +186,89 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-ident"
|
name = "unicode-ident"
|
||||||
version = "1.0.13"
|
version = "1.0.18"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
|
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unreal-niggery-rs"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "git+https://git.xeondev.com/ReversedRoomsMisc/unreal-niggery-rs.git#e07eda21e461e1ec234ec9ef2562dc8187742631"
|
||||||
|
dependencies = [
|
||||||
|
"thiserror 2.0.12",
|
||||||
|
"widestring",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wicked-waifus-win-patch"
|
name = "wicked-waifus-win-patch"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"curly-injector",
|
||||||
"ilhook",
|
"ilhook",
|
||||||
|
"injector-utils",
|
||||||
"interceptor-rs",
|
"interceptor-rs",
|
||||||
"regex",
|
"regex",
|
||||||
|
"unreal-niggery-rs",
|
||||||
"widestring",
|
"widestring",
|
||||||
"windows",
|
"windows",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "widestring"
|
name = "widestring"
|
||||||
version = "1.1.0"
|
version = "1.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311"
|
checksum = "dd7cf3379ca1aac9eea11fba24fd7e315d621f8dfe35c8d7d2be8b793726e07d"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows"
|
name = "windows"
|
||||||
version = "0.58.0"
|
version = "0.61.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6"
|
checksum = "c5ee8f3d025738cb02bad7868bbb5f8a6327501e870bf51f1b455b0a2454a419"
|
||||||
|
dependencies = [
|
||||||
|
"windows-collections",
|
||||||
|
"windows-core",
|
||||||
|
"windows-future",
|
||||||
|
"windows-link",
|
||||||
|
"windows-numerics",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows-collections"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-core",
|
"windows-core",
|
||||||
"windows-targets",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-core"
|
name = "windows-core"
|
||||||
version = "0.58.0"
|
version = "0.61.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
|
checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-implement",
|
"windows-implement",
|
||||||
"windows-interface",
|
"windows-interface",
|
||||||
|
"windows-link",
|
||||||
"windows-result",
|
"windows-result",
|
||||||
"windows-strings",
|
"windows-strings",
|
||||||
"windows-targets",
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows-future"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7a1d6bbefcb7b60acd19828e1bc965da6fcf18a7e39490c5f8be71e54a19ba32"
|
||||||
|
dependencies = [
|
||||||
|
"windows-core",
|
||||||
|
"windows-link",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-implement"
|
name = "windows-implement"
|
||||||
version = "0.58.0"
|
version = "0.60.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b"
|
checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -204,9 +277,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-interface"
|
name = "windows-interface"
|
||||||
version = "0.58.0"
|
version = "0.59.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515"
|
checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -214,22 +287,37 @@ dependencies = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-result"
|
name = "windows-link"
|
||||||
|
version = "0.1.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows-numerics"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e"
|
checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-targets",
|
"windows-core",
|
||||||
|
"windows-link",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows-result"
|
||||||
|
version = "0.3.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252"
|
||||||
|
dependencies = [
|
||||||
|
"windows-link",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-strings"
|
name = "windows-strings"
|
||||||
version = "0.1.0"
|
version = "0.4.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
|
checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-result",
|
"windows-link",
|
||||||
"windows-targets",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -238,29 +326,13 @@ version = "0.42.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
|
checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows_aarch64_gnullvm 0.42.2",
|
"windows_aarch64_gnullvm",
|
||||||
"windows_aarch64_msvc 0.42.2",
|
"windows_aarch64_msvc",
|
||||||
"windows_i686_gnu 0.42.2",
|
"windows_i686_gnu",
|
||||||
"windows_i686_msvc 0.42.2",
|
"windows_i686_msvc",
|
||||||
"windows_x86_64_gnu 0.42.2",
|
"windows_x86_64_gnu",
|
||||||
"windows_x86_64_gnullvm 0.42.2",
|
"windows_x86_64_gnullvm",
|
||||||
"windows_x86_64_msvc 0.42.2",
|
"windows_x86_64_msvc",
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows-targets"
|
|
||||||
version = "0.52.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
|
||||||
dependencies = [
|
|
||||||
"windows_aarch64_gnullvm 0.52.6",
|
|
||||||
"windows_aarch64_msvc 0.52.6",
|
|
||||||
"windows_i686_gnu 0.52.6",
|
|
||||||
"windows_i686_gnullvm",
|
|
||||||
"windows_i686_msvc 0.52.6",
|
|
||||||
"windows_x86_64_gnu 0.52.6",
|
|
||||||
"windows_x86_64_gnullvm 0.52.6",
|
|
||||||
"windows_x86_64_msvc 0.52.6",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -269,86 +341,38 @@ version = "0.42.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
|
checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_aarch64_gnullvm"
|
|
||||||
version = "0.52.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_aarch64_msvc"
|
name = "windows_aarch64_msvc"
|
||||||
version = "0.42.2"
|
version = "0.42.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
|
checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_aarch64_msvc"
|
|
||||||
version = "0.52.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_i686_gnu"
|
name = "windows_i686_gnu"
|
||||||
version = "0.42.2"
|
version = "0.42.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
|
checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_i686_gnu"
|
|
||||||
version = "0.52.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_i686_gnullvm"
|
|
||||||
version = "0.52.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_i686_msvc"
|
name = "windows_i686_msvc"
|
||||||
version = "0.42.2"
|
version = "0.42.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
|
checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_i686_msvc"
|
|
||||||
version = "0.52.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_x86_64_gnu"
|
name = "windows_x86_64_gnu"
|
||||||
version = "0.42.2"
|
version = "0.42.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
|
checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_x86_64_gnu"
|
|
||||||
version = "0.52.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_x86_64_gnullvm"
|
name = "windows_x86_64_gnullvm"
|
||||||
version = "0.42.2"
|
version = "0.42.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
|
checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_x86_64_gnullvm"
|
|
||||||
version = "0.52.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_x86_64_msvc"
|
name = "windows_x86_64_msvc"
|
||||||
version = "0.42.2"
|
version = "0.42.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
|
checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_x86_64_msvc"
|
|
||||||
version = "0.52.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
|
||||||
|
|
27
Cargo.toml
27
Cargo.toml
|
@ -1,31 +1,32 @@
|
||||||
[package]
|
[package]
|
||||||
name = "wicked-waifus-win-patch"
|
name = "wicked-waifus-win-patch"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2024"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "wicked_waifus_win"
|
name = "wicked_waifus_win"
|
||||||
crate-type = ["cdylib"]
|
crate-type = ["cdylib"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
cn_beta_1_4_0 = []
|
advanced = []
|
||||||
cn_beta_1_3_0 = []
|
cn_beta_2_5_1 = []
|
||||||
cn_live_1_3_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"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
curly-injector = { git = "https://git.xeondev.com/ReversedRoomsMisc/curly-injector.git" }
|
||||||
ilhook = "2.1.1"
|
ilhook = "2.1.1"
|
||||||
interceptor-rs = { git = "https://git.xeondev.com/xavo95/interceptor-rs.git" }
|
injector-utils = { git = "https://git.xeondev.com/ReversedRoomsMisc/process-launcher-rs.git" }
|
||||||
regex = {version = "1.11.1", optional = true}
|
interceptor-rs = { git = "https://git.xeondev.com/ReversedRoomsMisc/interceptor-rs.git" }
|
||||||
widestring = {version = "1.1.0", optional = true}
|
regex = { version = "1.11.1", optional = true }
|
||||||
windows = { version = "0.58.0", features = [
|
unreal-niggery-rs = { git = "https://git.xeondev.com/ReversedRoomsMisc/unreal-niggery-rs.git" }
|
||||||
"Win32_Foundation",
|
widestring = { version = "1.2.0", optional = true }
|
||||||
"Win32_System_LibraryLoader",
|
windows = { version = "0.61.1", features = [
|
||||||
"Win32_System_SystemServices",
|
"Win32_Foundation",
|
||||||
"Win32_System_Console",
|
"Win32_System_LibraryLoader",
|
||||||
|
"Win32_System_SystemServices",
|
||||||
|
"Win32_System_Console",
|
||||||
] }
|
] }
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
|
|
593
archive.md
Normal file
593
archive.md
Normal file
|
@ -0,0 +1,593 @@
|
||||||
|
# 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")]
|
||||||
|
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
||||||
|
f_pak_file_check: 0x4274440,
|
||||||
|
f_pak_file_check_preamble: 0x8D48574157565540,
|
||||||
|
resize_grow: 0x8E2D30,
|
||||||
|
f_print_f: 0x28E5F70,
|
||||||
|
add_pak_folders_entry: 0x427B910,
|
||||||
|
add_pak_folders_ret: 0x427E1B0,
|
||||||
|
#[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: 0x66325A0,
|
||||||
|
curl_easy_perform: 0x3C0BFA0,
|
||||||
|
},
|
||||||
|
#[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: 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",
|
||||||
|
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: 0x4F410,
|
||||||
|
sdk_go_away: 0x93620,
|
||||||
|
},
|
||||||
|
#[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,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
# OS LIVE 2.2.0
|
||||||
|
```rust
|
||||||
|
#[cfg(feature = "os_live_2_2_0")]
|
||||||
|
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
||||||
|
f_pak_file_check: 0x418A2F0,
|
||||||
|
f_pak_file_check_preamble: 0x8D48574157565540,
|
||||||
|
resize_grow: 0x08D6D70,
|
||||||
|
f_print_f: 0x280B240,
|
||||||
|
add_pak_folders_entry: 0x41917D0,
|
||||||
|
add_pak_folders_ret: 0x4194070,
|
||||||
|
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
ue_curl_config: CurlConfig {
|
||||||
|
handle_rcx_relative_offset: Some(0x110),
|
||||||
|
url_handle_relative_offset: 0x880,
|
||||||
|
http_headers_handle_relative_offset: None,
|
||||||
|
curl_easy_setopt: 0x64FF840,
|
||||||
|
curl_easy_perform: 0x3B21490,
|
||||||
|
},
|
||||||
|
#[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: "",
|
||||||
|
// 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",
|
||||||
|
// 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!("KRSDK.dll"),
|
||||||
|
eula_accept: 0x96800,
|
||||||
|
sdk_go_away: 0xA2680,
|
||||||
|
},
|
||||||
|
// TODO: Ported for compliance in the future, not supported on 2.2.0 OS
|
||||||
|
#[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: None,
|
||||||
|
url_handle_relative_offset: 0,
|
||||||
|
http_headers_handle_relative_offset: None,
|
||||||
|
curl_easy_setopt: 0,
|
||||||
|
curl_easy_perform: 0,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
# CN BETA 2.2.1
|
||||||
|
|
||||||
|
```rust
|
||||||
|
#[cfg(feature = "cn_beta_2_2_1")]
|
||||||
|
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
||||||
|
f_pak_file_check: 0x41CE7F0,
|
||||||
|
f_pak_file_check_preamble: 0x8D48574157565540,
|
||||||
|
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: 0x657A660,
|
||||||
|
curl_easy_perform: 0x3B6A440,
|
||||||
|
},
|
||||||
|
#[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,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
# OS LIVE 2.1.0
|
||||||
|
|
||||||
|
```rust
|
||||||
|
#[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,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
# 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
|
||||||
|
#[cfg(feature = "cn_live_2_0_2")]
|
||||||
|
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
||||||
|
f_pak_file_check: 0x4052560,
|
||||||
|
f_pak_file_check_preamble: 0x8D48574157565540,
|
||||||
|
resize_grow: 0x08C8E00,
|
||||||
|
f_print_f: 0x27440D0,
|
||||||
|
add_pak_folders_entry: 0x4059A40,
|
||||||
|
add_pak_folders_ret: 0x405C270,
|
||||||
|
#[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: 0x63EB660,
|
||||||
|
curl_easy_perform: 0x39F47C0,
|
||||||
|
},
|
||||||
|
#[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: 0x4E710,
|
||||||
|
sdk_go_away: 0x91960,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
# CN LIVE BILIBILI 2.0.0
|
||||||
|
|
||||||
|
```rust
|
||||||
|
#[cfg(feature = "cn_live_bilibili_2_0_2")]
|
||||||
|
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
||||||
|
f_pak_file_check: 0x4052560,
|
||||||
|
f_pak_file_check_preamble: 0x8D48574157565540,
|
||||||
|
resize_grow: 0x08C8E00,
|
||||||
|
f_print_f: 0x27440D0,
|
||||||
|
add_pak_folders_entry: 0x4059A40,
|
||||||
|
add_pak_folders_ret: 0x405C270,
|
||||||
|
#[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: 0x63EB660,
|
||||||
|
curl_easy_perform: 0x39F47C0,
|
||||||
|
},
|
||||||
|
#[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: 0x53310,
|
||||||
|
sdk_go_away: 0x925F0,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
# OS LIVE 2.0.0
|
||||||
|
|
||||||
|
```rust
|
||||||
|
#[cfg(feature = "os_live_2_0_2")]
|
||||||
|
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
||||||
|
f_pak_file_check: 0x3FF8E50,
|
||||||
|
f_pak_file_check_preamble: 0x8D48574157565540,
|
||||||
|
resize_grow: 0x08C61C0,
|
||||||
|
f_print_f: 0x26E96F0,
|
||||||
|
add_pak_folders_entry: 0x4000330,
|
||||||
|
add_pak_folders_ret: 0x4002B60,
|
||||||
|
#[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: 0x63598C0,
|
||||||
|
curl_easy_perform: 0x3997FA0,
|
||||||
|
},
|
||||||
|
#[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,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
# CN BETA 2.0.0
|
||||||
|
|
||||||
|
```rust
|
||||||
|
#[cfg(feature = "cn_beta_2_0_0")]
|
||||||
|
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
||||||
|
f_pak_file_check: 0x403AD00,
|
||||||
|
f_pak_file_check_preamble: 0x8D48574157565540,
|
||||||
|
#[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: 0x63D30C0,
|
||||||
|
curl_easy_perform: 0x39DD6E0,
|
||||||
|
},
|
||||||
|
#[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: 0x4E580,
|
||||||
|
sdk_go_away: 0x90B90,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
# OS BETA 2.0.0
|
||||||
|
|
||||||
|
```rust
|
||||||
|
#[cfg(feature = "os_beta_2_0_0")]
|
||||||
|
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration { // TODO
|
||||||
|
f_pak_file_check: 0x3E37D90,
|
||||||
|
f_pak_file_check_preamble: 0x8148574157565340,
|
||||||
|
#[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: 0x6187020,
|
||||||
|
curl_easy_perform: 0x37DDDD0,
|
||||||
|
},
|
||||||
|
#[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: 0x4A6D0,
|
||||||
|
sdk_go_away: 0x8BB40,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
# CN LIVE 1.4
|
||||||
|
|
||||||
|
```rust
|
||||||
|
#[cfg(feature = "cn_live_1_4_0")]
|
||||||
|
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration { // TODO
|
||||||
|
f_pak_file_check: 0x3E37D90,
|
||||||
|
f_pak_file_check_preamble: 0x8148574157565340,
|
||||||
|
#[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: 0x6187020,
|
||||||
|
curl_easy_perform: 0x37DDDD0,
|
||||||
|
},
|
||||||
|
#[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: 0x4A6D0,
|
||||||
|
sdk_go_away: 0x8BB40,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
# OS LIVE 1.4
|
||||||
|
|
||||||
|
```rust
|
||||||
|
#[cfg(feature = "os_live_1_4_0")]
|
||||||
|
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration { // TODO
|
||||||
|
f_pak_file_check: 0x3DE6650, // 0x3DE6650 // 0x8879a13
|
||||||
|
f_pak_file_check_preamble: 0x5741544156535540, // 0x5741544156535540 // 0x8D49575355e38949
|
||||||
|
#[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: 0x60FD460,
|
||||||
|
curl_easy_perform: 0x37894E0,
|
||||||
|
},
|
||||||
|
#[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: 0x959D0,
|
||||||
|
sdk_go_away: 0xA1810,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
# CN BETA 1.4
|
||||||
|
|
||||||
|
```rust
|
||||||
|
#[cfg(feature = "cn_beta_1_4_0")]
|
||||||
|
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
||||||
|
f_pak_file_check: 0x3E37D90,
|
||||||
|
f_pak_file_check_preamble: 0x8148574157565340,
|
||||||
|
#[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: 0x6187020,
|
||||||
|
curl_easy_perform: 0x37DDDD0,
|
||||||
|
},
|
||||||
|
#[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: 0x4A6D0,
|
||||||
|
sdk_go_away: 0x8BB40,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
# OS BETA 1.4
|
||||||
|
|
||||||
|
```rust
|
||||||
|
#[cfg(feature = "os_beta_1_4_0")]
|
||||||
|
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
||||||
|
f_pak_file_check: 0x3E37D90,
|
||||||
|
f_pak_file_check_preamble: 0x8148574157565340,
|
||||||
|
#[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: 0x6187020,
|
||||||
|
curl_easy_perform: 0x37DDDD0,
|
||||||
|
},
|
||||||
|
#[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: 0x4A6D0,
|
||||||
|
sdk_go_away: 0x8BB40,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
# CN LIVE 1.3
|
||||||
|
|
||||||
|
```rust
|
||||||
|
#[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,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
# OS LIVE 1.3
|
||||||
|
|
||||||
|
```rust
|
||||||
|
#[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,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
# CN BETA 1.3
|
||||||
|
|
||||||
|
```rust
|
||||||
|
#[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,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
10
build.bat
10
build.bat
|
@ -13,14 +13,8 @@ EXIT /B 0
|
||||||
|
|
||||||
:buildAllVariants
|
:buildAllVariants
|
||||||
SETLOCAL ENABLEDELAYEDEXPANSION
|
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||||
: Build for cn_beta_1_4_0
|
call:cargoReleaseBuild "cn_beta_2_5_1,%~1" %~1
|
||||||
call:cargoReleaseBuild "cn_beta_1_4_0,%~1" %~1
|
: call:cargoReleaseBuild "os_live_2_2_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
|
|
||||||
call:cargoReleaseBuild "cn_live_1_3_0,%~1" %~1
|
|
||||||
: Build for os_live_1_3_0
|
|
||||||
call:cargoReleaseBuild "os_live_1_3_0,%~1" %~1
|
|
||||||
ENDLOCAL
|
ENDLOCAL
|
||||||
EXIT /B 0
|
EXIT /B 0
|
||||||
|
|
||||||
|
|
102
src/config.rs
Normal file
102
src/config.rs
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
use windows::core::{PCSTR, s};
|
||||||
|
use curly_injector::CurlConfig;
|
||||||
|
|
||||||
|
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
pub(crate) struct ReplacementDefaults {
|
||||||
|
pub(crate) config_server_default: &'static str,
|
||||||
|
// pub(crate) hotpatch_server_default: &'static str,
|
||||||
|
pub(crate) log_server_default: &'static str,
|
||||||
|
#[cfg(feature = "enable-sdk")]
|
||||||
|
pub(crate) sdk_server_default: &'static str,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(all(not(feature = "enable-sdk"), not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
pub(crate) struct DisableSdkConfiguration {
|
||||||
|
pub(crate) sdk_dll: PCSTR,
|
||||||
|
pub(crate) eula_accept: usize,
|
||||||
|
pub(crate) sdk_go_away: usize,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
pub(crate) struct ReplacementConfig {
|
||||||
|
pub(crate) config_server_regex: &'static str,
|
||||||
|
// pub(crate) hotpatch_server_regex: &'static str,
|
||||||
|
pub(crate) log_server_regex: &'static str,
|
||||||
|
#[cfg(feature = "enable-sdk")]
|
||||||
|
pub(crate) sdk_server_regex: &'static str,
|
||||||
|
pub(crate) replacement_defaults: &'static ReplacementDefaults,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(all(feature = "enable-sdk", not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
pub(crate) struct KrCurlConfiguration {
|
||||||
|
pub(crate) curl_dll: PCSTR,
|
||||||
|
pub(crate) curl_config: CurlConfig,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub(crate) struct InjectConfiguration {
|
||||||
|
pub(crate) f_pak_file_check: usize,
|
||||||
|
pub(crate) f_pak_file_check_preamble: u64,
|
||||||
|
pub(crate) resize_grow: usize,
|
||||||
|
pub(crate) f_print_f: usize,
|
||||||
|
pub(crate) add_pak_folders_entry: usize,
|
||||||
|
pub(crate) add_pak_folders_ret: usize,
|
||||||
|
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
pub(crate) ue_curl_config: CurlConfig,
|
||||||
|
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
pub(crate) replacement_config: ReplacementConfig,
|
||||||
|
#[cfg(all(not(feature = "enable-sdk"), not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
pub(crate) disable_sdk: DisableSdkConfiguration,
|
||||||
|
#[cfg(all(feature = "enable-sdk", not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
pub(crate) kr_curl: KrCurlConfiguration,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "cn_beta_2_5_1")]
|
||||||
|
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
||||||
|
f_pak_file_check: 0x439E080,
|
||||||
|
f_pak_file_check_preamble: 0x8D48574157565540,
|
||||||
|
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: 0x678DFC0,
|
||||||
|
curl_easy_perform: 0x3D2E9F0,
|
||||||
|
},
|
||||||
|
#[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: 0x50E20,
|
||||||
|
sdk_go_away: 0x95AD0,
|
||||||
|
},
|
||||||
|
#[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,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
93
src/curl_hook.rs
Normal file
93
src/curl_hook.rs
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint
|
||||||
|
#![allow(static_mut_refs)]
|
||||||
|
|
||||||
|
use crate::config::ReplacementConfig;
|
||||||
|
use curly_injector::replacer::AbstractReplacer;
|
||||||
|
use curly_injector::utils::EnvBoolMapper;
|
||||||
|
use curly_injector::{CurlConfig, CurlUserData};
|
||||||
|
use std::sync::OnceLock;
|
||||||
|
use windows::core::PCSTR;
|
||||||
|
|
||||||
|
static mut UE_CURL_EASY: OnceLock<CurlUserData> = OnceLock::new();
|
||||||
|
#[cfg(feature = "enable-sdk")]
|
||||||
|
static mut KR_CURL_EASY: OnceLock<CurlUserData> = OnceLock::new();
|
||||||
|
|
||||||
|
pub(crate) fn configure_ue_curl(
|
||||||
|
interceptor: &mut interceptor_rs::Interceptor,
|
||||||
|
module_name: Option<PCSTR>,
|
||||||
|
config: &'static CurlConfig,
|
||||||
|
replacement: &ReplacementConfig,
|
||||||
|
) {
|
||||||
|
let module = injector_utils::get_module_base(module_name);
|
||||||
|
let replacer = vec![
|
||||||
|
// Config Server Replacer
|
||||||
|
AbstractReplacer::GenericReplacer(curly_injector::replacer::GenericReplacer {
|
||||||
|
regex: regex::Regex::new(replacement.config_server_regex).unwrap(),
|
||||||
|
replacement: std::env::var("CFG_SERVER_URL").unwrap_or(
|
||||||
|
replacement
|
||||||
|
.replacement_defaults
|
||||||
|
.config_server_default
|
||||||
|
.to_string(),
|
||||||
|
),
|
||||||
|
force_http: std::env::var("CFG_SERVER_FORCE_HTTP").map_env_bool(true),
|
||||||
|
}),
|
||||||
|
// TODO: Hotpatch Server replacer
|
||||||
|
// Log server replacer
|
||||||
|
AbstractReplacer::GenericReplacer(curly_injector::replacer::GenericReplacer {
|
||||||
|
regex: regex::Regex::new(replacement.log_server_regex).unwrap(),
|
||||||
|
replacement: std::env::var("LOG_SERVER_URL").unwrap_or(
|
||||||
|
replacement
|
||||||
|
.replacement_defaults
|
||||||
|
.log_server_default
|
||||||
|
.to_string(),
|
||||||
|
),
|
||||||
|
force_http: std::env::var("LOG_SERVER_FORCE_HTTP").map_env_bool(true),
|
||||||
|
}),
|
||||||
|
];
|
||||||
|
unsafe {
|
||||||
|
curly_injector::hook_curl(
|
||||||
|
interceptor,
|
||||||
|
module.0 as usize,
|
||||||
|
config,
|
||||||
|
replacer,
|
||||||
|
None,
|
||||||
|
&UE_CURL_EASY,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Not sig bypass and regular check already done at top of the file
|
||||||
|
#[cfg(feature = "enable-sdk")]
|
||||||
|
pub(crate) fn configure_kr_curl(
|
||||||
|
interceptor: &mut interceptor_rs::Interceptor,
|
||||||
|
module_name: Option<PCSTR>,
|
||||||
|
config: &'static CurlConfig,
|
||||||
|
replacement: &ReplacementConfig,
|
||||||
|
) {
|
||||||
|
let module = injector_utils::get_module_base(module_name);
|
||||||
|
let replacer = vec![
|
||||||
|
// SDK server replacer
|
||||||
|
AbstractReplacer::GenericReplacer(curly_injector::replacer::GenericReplacer {
|
||||||
|
regex: regex::Regex::new(replacement.sdk_server_regex).unwrap(),
|
||||||
|
replacement: std::env::var("SDK_SERVER_URL").unwrap_or(
|
||||||
|
replacement
|
||||||
|
.replacement_defaults
|
||||||
|
.sdk_server_default
|
||||||
|
.to_string(),
|
||||||
|
),
|
||||||
|
force_http: std::env::var("SDK_SERVER_FORCE_HTTP").map_env_bool(true),
|
||||||
|
}),
|
||||||
|
];
|
||||||
|
let proxy_config = Some(ProxyConfig {
|
||||||
|
proxy_url: "http://127.0.0.1:8888",
|
||||||
|
skip_url_replace: true,
|
||||||
|
});
|
||||||
|
curly_injector::hook_curl(
|
||||||
|
interceptor,
|
||||||
|
module.0 as usize,
|
||||||
|
config,
|
||||||
|
replacer,
|
||||||
|
proxy_config,
|
||||||
|
&KR_CURL_EASY,
|
||||||
|
);
|
||||||
|
}
|
|
@ -1,63 +0,0 @@
|
||||||
#![cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
|
||||||
use std::sync::OnceLock;
|
|
||||||
use std::thread;
|
|
||||||
use std::time::Duration;
|
|
||||||
|
|
||||||
use ilhook::x64::Registers;
|
|
||||||
use windows::core::{PCSTR, PCWSTR};
|
|
||||||
use windows::Win32::System::LibraryLoader::GetModuleHandleA;
|
|
||||||
|
|
||||||
use crate::offsets::CONFIG;
|
|
||||||
use crate::replacer::{GenericReplacer, Replacer};
|
|
||||||
|
|
||||||
static CFG_SERVER_REPLACER: OnceLock<GenericReplacer> = OnceLock::new();
|
|
||||||
|
|
||||||
pub(crate) fn configure_extras(interceptor: &mut interceptor_rs::Interceptor) {
|
|
||||||
let module = unsafe { GetModuleHandleA(PCSTR::null()) }.unwrap();
|
|
||||||
println!("Game base: {:X}", module.0 as usize);
|
|
||||||
|
|
||||||
interceptor
|
|
||||||
.attach((module.0 as usize) + CONFIG.kuro_http_get, on_kurohttp_get)
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let krsdk_ex = loop {
|
|
||||||
match unsafe { GetModuleHandleA(CONFIG.disable_sdk.sdk_dll) } {
|
|
||||||
Ok(handle) => break handle,
|
|
||||||
Err(_) => thread::sleep(Duration::from_millis(1)),
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
interceptor
|
|
||||||
.replace((krsdk_ex.0 as usize) + CONFIG.disable_sdk.eula_accept, dummy)
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
interceptor
|
|
||||||
.replace((krsdk_ex.0 as usize) + CONFIG.disable_sdk.sdk_go_away, dummy)
|
|
||||||
.unwrap();
|
|
||||||
}
|
|
||||||
|
|
||||||
unsafe extern "win64" fn on_kurohttp_get(reg: *mut Registers, _: usize) {
|
|
||||||
let wstr = *((*reg).rcx as *const usize) as *mut u16;
|
|
||||||
let url = PCWSTR::from_raw(wstr).to_string().unwrap();
|
|
||||||
println!("HTTP GET: {url}");
|
|
||||||
|
|
||||||
let replacer = CFG_SERVER_REPLACER.get_or_init(|| {
|
|
||||||
GenericReplacer {
|
|
||||||
regex: regex::Regex::new(r#"^(?:https|http)://.*/([a-zA-Z0-9]{32}/index\.json)$"#).unwrap(),
|
|
||||||
replacement: std::env::var("CFG_SERVER_URL").unwrap_or("127.0.0.1:10001".to_string()),
|
|
||||||
scheme: std::env::var("CFG_SERVER_SCHEME").unwrap_or("http".to_string()),
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if let Some(result) = replacer.replace(url.as_str()) {
|
|
||||||
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
|
|
||||||
let new_url = widestring::U16String::from_str(result.as_str());
|
|
||||||
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);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
unsafe extern "win64" fn dummy(_: *mut Registers, _: usize, _: usize) -> usize {
|
|
||||||
1
|
|
||||||
}
|
|
117
src/lib.rs
117
src/lib.rs
|
@ -1,21 +1,28 @@
|
||||||
use std::thread;
|
|
||||||
use std::time::Duration;
|
|
||||||
|
|
||||||
use ilhook::x64::Registers;
|
use ilhook::x64::Registers;
|
||||||
use interceptor_rs::Interceptor;
|
use interceptor_rs::Interceptor;
|
||||||
use windows::core::{PCSTR, PCWSTR};
|
use std::sync::OnceLock;
|
||||||
|
use std::thread;
|
||||||
|
use std::time::Duration;
|
||||||
|
use unreal_niggery_rs::f_string::{FString, Printf};
|
||||||
|
use unreal_niggery_rs::t_array::TArray;
|
||||||
|
use unreal_niggery_rs::Add;
|
||||||
|
use windows::core::PCSTR;
|
||||||
|
#[cfg(any(feature = "only-sig-bypass", feature = "regular"))]
|
||||||
|
use windows::core::PCWSTR;
|
||||||
use windows::Win32::Foundation::HINSTANCE;
|
use windows::Win32::Foundation::HINSTANCE;
|
||||||
use windows::Win32::System::Console;
|
use windows::Win32::System::Console;
|
||||||
use windows::Win32::System::LibraryLoader::GetModuleHandleA;
|
use windows::Win32::System::LibraryLoader::GetModuleHandleA;
|
||||||
use windows::Win32::System::SystemServices::DLL_PROCESS_ATTACH;
|
use windows::Win32::System::SystemServices::DLL_PROCESS_ATTACH;
|
||||||
|
|
||||||
use offsets::CONFIG;
|
use config::CONFIG;
|
||||||
|
|
||||||
mod offsets;
|
mod config;
|
||||||
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
mod replacer;
|
mod curl_hook;
|
||||||
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
mod extras;
|
mod sdk;
|
||||||
|
|
||||||
|
static CUSTOM_PAK_FOLDER: OnceLock<String> = OnceLock::new();
|
||||||
|
|
||||||
fn thread_func() {
|
fn thread_func() {
|
||||||
unsafe { Console::AllocConsole() }.unwrap();
|
unsafe { Console::AllocConsole() }.unwrap();
|
||||||
|
@ -34,35 +41,117 @@ fn thread_func() {
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut interceptor = Interceptor::new();
|
let mut interceptor = Interceptor::new();
|
||||||
|
#[cfg(any(feature = "only-sig-bypass", feature = "regular"))]
|
||||||
interceptor
|
interceptor
|
||||||
.replace((module.0 as usize) + CONFIG.f_pak_file_check, fpakfile_check_replacement)
|
.replace(
|
||||||
|
(module.0 as usize) + CONFIG.f_pak_file_check,
|
||||||
|
fpakfile_check_replacement,
|
||||||
|
None,
|
||||||
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
TArray::set_t_array_resize_grow_ptr(module.0 as usize + CONFIG.resize_grow);
|
||||||
|
FString::set_f_string_printf_ptr(module.0 as usize + CONFIG.f_print_f);
|
||||||
|
|
||||||
|
if let Ok(value) = std::env::var("CFG_WUWA_CUSTOM_PAK_DIR") {
|
||||||
|
println!("Found custom location for pak files: {value}");
|
||||||
|
let _ = CUSTOM_PAK_FOLDER.set(value).unwrap();
|
||||||
|
interceptor
|
||||||
|
.attach(
|
||||||
|
(module.0 as usize) + CONFIG.add_pak_folders_entry,
|
||||||
|
add_pak_folders,
|
||||||
|
None,
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
|
interceptor
|
||||||
|
.attach(
|
||||||
|
(module.0 as usize) + CONFIG.add_pak_folders_ret,
|
||||||
|
debug_get_pak_folders,
|
||||||
|
None,
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "advanced")]
|
||||||
|
wicked_waifus_win_payload_advanced::enable_advanced_features(
|
||||||
|
module.0 as usize,
|
||||||
|
&mut interceptor,
|
||||||
|
&wicked_waifus_win_payload_advanced::AdvancedConfig {
|
||||||
|
enable_debug_view: false,
|
||||||
|
enable_dev_tools: false,
|
||||||
|
enable_dump_paks: false,
|
||||||
|
enable_dump_buffer_contents: false,
|
||||||
|
enable_hook_find_file_in_pak: false,
|
||||||
|
enable_dump_magic: false,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
extras::configure_extras(&mut interceptor);
|
curl_hook::configure_ue_curl(
|
||||||
|
&mut interceptor,
|
||||||
|
None,
|
||||||
|
&CONFIG.ue_curl_config,
|
||||||
|
&CONFIG.replacement_config,
|
||||||
|
);
|
||||||
|
#[cfg(all(
|
||||||
|
not(feature = "enable-sdk"),
|
||||||
|
not(feature = "only-sig-bypass"),
|
||||||
|
feature = "regular"
|
||||||
|
))]
|
||||||
|
sdk::configure_sdk(&mut interceptor);
|
||||||
|
#[cfg(all(
|
||||||
|
feature = "enable-sdk",
|
||||||
|
not(feature = "only-sig-bypass"),
|
||||||
|
feature = "regular"
|
||||||
|
))]
|
||||||
|
curl_hook::configure_kr_curl(
|
||||||
|
&mut interceptor,
|
||||||
|
Some(CONFIG.kr_curl.curl_dll),
|
||||||
|
&CONFIG.kr_curl.curl_config,
|
||||||
|
&CONFIG.replacement_config,
|
||||||
|
);
|
||||||
|
|
||||||
println!("Successfully initialized!");
|
println!("Successfully initialized!");
|
||||||
|
|
||||||
thread::sleep(Duration::from_secs(u64::MAX));
|
thread::sleep(Duration::from_secs(u64::MAX));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(any(feature = "only-sig-bypass", feature = "regular"))]
|
||||||
unsafe extern "win64" fn fpakfile_check_replacement(
|
unsafe extern "win64" fn fpakfile_check_replacement(
|
||||||
reg: *mut Registers,
|
reg: *mut Registers,
|
||||||
_: usize,
|
_: usize,
|
||||||
_: usize,
|
_: usize,
|
||||||
) -> usize {
|
) -> usize {
|
||||||
let wstr = *(((*reg).rcx + 8) as *const usize) as *const u16;
|
let pak_name = unsafe {
|
||||||
let pak_name = PCWSTR::from_raw(wstr).to_string().unwrap();
|
PCWSTR::from_raw(*(((*reg).rcx + 8) as *const usize) as *const u16)
|
||||||
|
.to_string()
|
||||||
|
.unwrap()
|
||||||
|
};
|
||||||
println!("Trying to verify pak: {pak_name}, returning true");
|
println!("Trying to verify pak: {pak_name}, returning true");
|
||||||
|
|
||||||
1
|
1
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
unsafe extern "win64" fn add_pak_folders(reg: *mut Registers, _: usize) {
|
||||||
|
let local_ptr = unsafe { ((*reg).rbp - 0x20) as usize }; // Uninitialized local FString pointer
|
||||||
|
let pak_folder = CUSTOM_PAK_FOLDER.get().unwrap();
|
||||||
|
let _ = FString::printf(local_ptr, pak_folder).unwrap();
|
||||||
|
let mut f_string = FString(TArray::read(local_ptr));
|
||||||
|
println!("Injecting custom pak folder: {}", f_string);
|
||||||
|
unsafe {
|
||||||
|
TArray::read((*reg).rdx as usize).add(&mut f_string.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unsafe extern "win64" fn debug_get_pak_folders(reg: *mut Registers, _: usize) {
|
||||||
|
println!("Loading Paks from: {}", unsafe { TArray::read((*reg).rbx as usize) });
|
||||||
|
}
|
||||||
|
|
||||||
|
#[unsafe(no_mangle)]
|
||||||
unsafe extern "system" fn DllMain(_: HINSTANCE, call_reason: u32, _: *mut ()) -> bool {
|
unsafe extern "system" fn DllMain(_: HINSTANCE, call_reason: u32, _: *mut ()) -> bool {
|
||||||
if call_reason == DLL_PROCESS_ATTACH {
|
if call_reason == DLL_PROCESS_ATTACH {
|
||||||
thread::spawn(|| thread_func());
|
thread::spawn(|| thread_func());
|
||||||
}
|
}
|
||||||
|
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,74 +0,0 @@
|
||||||
#[cfg(all(not(feature = "enable-sdk"), not(feature = "only-sig-bypass"), feature = "regular"))]
|
|
||||||
use windows::core::{PCSTR, s};
|
|
||||||
|
|
||||||
#[cfg(all(not(feature = "enable-sdk"), not(feature = "only-sig-bypass"), feature = "regular"))]
|
|
||||||
pub(crate) struct DisableSdkConfiguration {
|
|
||||||
pub(crate) sdk_dll: PCSTR,
|
|
||||||
pub(crate) eula_accept: usize,
|
|
||||||
pub(crate) sdk_go_away: usize,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub(crate) struct InjectConfiguration {
|
|
||||||
pub(crate) f_pak_file_check: usize,
|
|
||||||
pub(crate) f_pak_file_check_preamble: u64,
|
|
||||||
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
|
||||||
pub(crate) kuro_http_get: usize,
|
|
||||||
#[cfg(all(not(feature = "enable-sdk"), not(feature = "only-sig-bypass"), feature = "regular"))]
|
|
||||||
pub(crate) disable_sdk: DisableSdkConfiguration,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "cn_beta_1_4_0")]
|
|
||||||
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
|
||||||
f_pak_file_check: 0x3E37D90, // 0x3E37D90
|
|
||||||
f_pak_file_check_preamble: 0x8148574157565340,
|
|
||||||
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
|
||||||
kuro_http_get: 0xFE9E00,
|
|
||||||
#[cfg(all(not(feature = "enable-sdk"), not(feature = "only-sig-bypass"), feature = "regular"))]
|
|
||||||
disable_sdk: DisableSdkConfiguration{
|
|
||||||
sdk_dll: s!("KRSDKEx.dll"),
|
|
||||||
eula_accept: 0x4A6D0,
|
|
||||||
sdk_go_away: 0x8BB40,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#[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
|
|
||||||
}
|
|
||||||
};
|
|
|
@ -1,30 +0,0 @@
|
||||||
#![cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
|
||||||
pub(crate) trait Replacer {
|
|
||||||
fn replace(&self, original: &str) -> Option<String>;
|
|
||||||
}
|
|
||||||
|
|
||||||
pub(crate) struct GenericReplacer {
|
|
||||||
pub(crate) regex: regex::Regex,
|
|
||||||
pub(crate) replacement: String,
|
|
||||||
pub(crate) scheme: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Replacer for GenericReplacer {
|
|
||||||
fn replace(&self, original: &str) -> Option<String> {
|
|
||||||
// Prepare output array
|
|
||||||
let mut results: Vec<String> = vec![];
|
|
||||||
// Perform the capture over input
|
|
||||||
for (_, [path]) in self.regex.captures_iter(original).map(|c| c.extract()) {
|
|
||||||
results.push(format!("{}://{}/{}", self.scheme, self.replacement, path));
|
|
||||||
}
|
|
||||||
// We are supposed to only parse one entry from text
|
|
||||||
if 1 == results.len() {
|
|
||||||
return Some(results.remove(0));
|
|
||||||
} else if results.is_empty() {
|
|
||||||
println!("No valid url match found so returning original url");
|
|
||||||
} else {
|
|
||||||
println!("Invalid number of entries parsed, expected 1, obtained {:?}", results.len());
|
|
||||||
}
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
|
38
src/sdk.rs
Normal file
38
src/sdk.rs
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
#![cfg(all(not(feature = "enable-sdk"), not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
|
||||||
|
use std::thread;
|
||||||
|
use std::time::Duration;
|
||||||
|
|
||||||
|
use ilhook::x64::Registers;
|
||||||
|
use windows::Win32::System::LibraryLoader::GetModuleHandleA;
|
||||||
|
|
||||||
|
use crate::config::CONFIG;
|
||||||
|
|
||||||
|
pub(crate) fn configure_sdk(interceptor: &mut interceptor_rs::Interceptor) {
|
||||||
|
let krsdk_ex = loop {
|
||||||
|
match unsafe { GetModuleHandleA(CONFIG.disable_sdk.sdk_dll) } {
|
||||||
|
Ok(handle) => break handle,
|
||||||
|
Err(_) => thread::sleep(Duration::from_millis(1)),
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
interceptor
|
||||||
|
.replace(
|
||||||
|
(krsdk_ex.0 as usize) + CONFIG.disable_sdk.eula_accept,
|
||||||
|
dummy,
|
||||||
|
None,
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
|
interceptor
|
||||||
|
.replace(
|
||||||
|
(krsdk_ex.0 as usize) + CONFIG.disable_sdk.sdk_go_away,
|
||||||
|
dummy,
|
||||||
|
None,
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
|
}
|
||||||
|
|
||||||
|
unsafe extern "win64" fn dummy(_: *mut Registers, _: usize, _: usize) -> usize {
|
||||||
|
1
|
||||||
|
}
|
Loading…
Reference in a new issue