Compare commits
13 commits
Author | SHA1 | Date | |
---|---|---|---|
58f8f2b1c5 | |||
57e6f43142 | |||
3cb114e821 | |||
e2a8ef4130 | |||
b50fad32ec | |||
b30c83353e | |||
636579945e | |||
40ac7d3dcd | |||
bac8d2277f | |||
0c9a1e61c7 | |||
b7966f71ba | |||
9c9254a550 | |||
af2fbb0527 |
13 changed files with 860 additions and 234 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,2 +1,4 @@
|
||||||
/target
|
/target
|
||||||
|
/build
|
||||||
|
**.zip
|
||||||
|
.idea
|
161
Cargo.lock
generated
161
Cargo.lock
generated
|
@ -13,9 +13,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bitflags"
|
name = "bitflags"
|
||||||
version = "2.6.0"
|
version = "2.8.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
|
checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced-x86"
|
name = "iced-x86"
|
||||||
|
@ -41,6 +41,14 @@ dependencies = [
|
||||||
"windows-sys",
|
"windows-sys",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "interceptor-rs"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "git+https://git.xeondev.com/xavo95/interceptor-rs.git#418aef083cc6768201f0512fdbdca5c03aa4f787"
|
||||||
|
dependencies = [
|
||||||
|
"ilhook",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lazy_static"
|
name = "lazy_static"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
|
@ -49,9 +57,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.2.158"
|
version = "0.2.169"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
|
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "memchr"
|
name = "memchr"
|
||||||
|
@ -61,27 +69,27 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.86"
|
version = "1.0.93"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
|
checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "1.0.37"
|
version = "1.0.38"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
|
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex"
|
name = "regex"
|
||||||
version = "1.10.6"
|
version = "1.11.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619"
|
checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aho-corasick",
|
"aho-corasick",
|
||||||
"memchr",
|
"memchr",
|
||||||
|
@ -91,9 +99,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex-automata"
|
name = "regex-automata"
|
||||||
version = "0.4.7"
|
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 = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df"
|
checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aho-corasick",
|
"aho-corasick",
|
||||||
"memchr",
|
"memchr",
|
||||||
|
@ -102,23 +110,15 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex-syntax"
|
name = "regex-syntax"
|
||||||
version = "0.8.4"
|
version = "0.8.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b"
|
checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "shorekeeper-patch"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"ilhook",
|
|
||||||
"windows",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "2.0.76"
|
version = "2.0.96"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525"
|
checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -127,18 +127,18 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror"
|
name = "thiserror"
|
||||||
version = "1.0.63"
|
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 = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724"
|
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"thiserror-impl",
|
"thiserror-impl",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror-impl"
|
name = "thiserror-impl"
|
||||||
version = "1.0.63"
|
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 = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
|
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -147,15 +147,41 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-ident"
|
name = "unicode-ident"
|
||||||
version = "1.0.12"
|
version = "1.0.14"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
|
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unreal-niggery-rs"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "git+https://git.xeondev.com/xavo95/unreal-niggery-rs.git#f4043b9cd0def3939e2904415626071b945b0b3e"
|
||||||
|
dependencies = [
|
||||||
|
"widestring",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wicked-waifus-win-patch"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"ilhook",
|
||||||
|
"interceptor-rs",
|
||||||
|
"regex",
|
||||||
|
"unreal-niggery-rs",
|
||||||
|
"widestring",
|
||||||
|
"windows",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "widestring"
|
||||||
|
version = "1.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows"
|
name = "windows"
|
||||||
version = "0.58.0"
|
version = "0.59.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6"
|
checksum = "7f919aee0a93304be7f62e8e5027811bbba96bcb1de84d6618be56e43f8a32a1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-core",
|
"windows-core",
|
||||||
"windows-targets",
|
"windows-targets",
|
||||||
|
@ -163,9 +189,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-core"
|
name = "windows-core"
|
||||||
version = "0.58.0"
|
version = "0.59.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
|
checksum = "810ce18ed2112484b0d4e15d022e5f598113e220c53e373fb31e67e21670c1ce"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-implement",
|
"windows-implement",
|
||||||
"windows-interface",
|
"windows-interface",
|
||||||
|
@ -176,9 +202,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-implement"
|
name = "windows-implement"
|
||||||
version = "0.58.0"
|
version = "0.59.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b"
|
checksum = "83577b051e2f49a058c308f17f273b570a6a758386fc291b5f6a934dd84e48c1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -187,9 +213,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-interface"
|
name = "windows-interface"
|
||||||
version = "0.58.0"
|
version = "0.59.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515"
|
checksum = "cb26fd936d991781ea39e87c3a27285081e3c0da5ca0fcbc02d368cc6f52ff01"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -198,20 +224,19 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-result"
|
name = "windows-result"
|
||||||
version = "0.2.0"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e"
|
checksum = "d08106ce80268c4067c0571ca55a9b4e9516518eaa1a1fe9b37ca403ae1d1a34"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-targets",
|
"windows-targets",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-strings"
|
name = "windows-strings"
|
||||||
version = "0.1.0"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
|
checksum = "b888f919960b42ea4e11c2f408fadb55f78a9f236d5eef084103c8ce52893491"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-result",
|
|
||||||
"windows-targets",
|
"windows-targets",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -232,18 +257,18 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-targets"
|
name = "windows-targets"
|
||||||
version = "0.52.6"
|
version = "0.53.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows_aarch64_gnullvm 0.52.6",
|
"windows_aarch64_gnullvm 0.53.0",
|
||||||
"windows_aarch64_msvc 0.52.6",
|
"windows_aarch64_msvc 0.53.0",
|
||||||
"windows_i686_gnu 0.52.6",
|
"windows_i686_gnu 0.53.0",
|
||||||
"windows_i686_gnullvm",
|
"windows_i686_gnullvm",
|
||||||
"windows_i686_msvc 0.52.6",
|
"windows_i686_msvc 0.53.0",
|
||||||
"windows_x86_64_gnu 0.52.6",
|
"windows_x86_64_gnu 0.53.0",
|
||||||
"windows_x86_64_gnullvm 0.52.6",
|
"windows_x86_64_gnullvm 0.53.0",
|
||||||
"windows_x86_64_msvc 0.52.6",
|
"windows_x86_64_msvc 0.53.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -254,9 +279,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_aarch64_gnullvm"
|
name = "windows_aarch64_gnullvm"
|
||||||
version = "0.52.6"
|
version = "0.53.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_aarch64_msvc"
|
name = "windows_aarch64_msvc"
|
||||||
|
@ -266,9 +291,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_aarch64_msvc"
|
name = "windows_aarch64_msvc"
|
||||||
version = "0.52.6"
|
version = "0.53.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_i686_gnu"
|
name = "windows_i686_gnu"
|
||||||
|
@ -278,15 +303,15 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_i686_gnu"
|
name = "windows_i686_gnu"
|
||||||
version = "0.52.6"
|
version = "0.53.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_i686_gnullvm"
|
name = "windows_i686_gnullvm"
|
||||||
version = "0.52.6"
|
version = "0.53.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_i686_msvc"
|
name = "windows_i686_msvc"
|
||||||
|
@ -296,9 +321,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_i686_msvc"
|
name = "windows_i686_msvc"
|
||||||
version = "0.52.6"
|
version = "0.53.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_x86_64_gnu"
|
name = "windows_x86_64_gnu"
|
||||||
|
@ -308,9 +333,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_x86_64_gnu"
|
name = "windows_x86_64_gnu"
|
||||||
version = "0.52.6"
|
version = "0.53.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_x86_64_gnullvm"
|
name = "windows_x86_64_gnullvm"
|
||||||
|
@ -320,9 +345,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_x86_64_gnullvm"
|
name = "windows_x86_64_gnullvm"
|
||||||
version = "0.52.6"
|
version = "0.53.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_x86_64_msvc"
|
name = "windows_x86_64_msvc"
|
||||||
|
@ -332,6 +357,6 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_x86_64_msvc"
|
name = "windows_x86_64_msvc"
|
||||||
version = "0.52.6"
|
version = "0.53.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486"
|
||||||
|
|
17
Cargo.toml
17
Cargo.toml
|
@ -1,21 +1,26 @@
|
||||||
[package]
|
[package]
|
||||||
name = "shorekeeper-patch"
|
name = "wicked-waifus-win-patch"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "shorekeeper"
|
name = "wicked_waifus_win"
|
||||||
crate-type = ["cdylib"]
|
crate-type = ["cdylib"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
cn_beta_1_3_0 = []
|
advanced = []
|
||||||
cn_live_1_3_0 = []
|
cn_beta_2_1_0 = []
|
||||||
os_live_1_3_0 = []
|
|
||||||
enable-sdk = []
|
enable-sdk = []
|
||||||
|
only-sig-bypass = []
|
||||||
|
regular = ["dep:regex", "dep:widestring"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
ilhook = "2.1.1"
|
ilhook = "2.1.1"
|
||||||
windows = { version = "0.58.0", features = [
|
interceptor-rs = { git = "https://git.xeondev.com/xavo95/interceptor-rs.git" }
|
||||||
|
regex = { version = "1.11.1", optional = true }
|
||||||
|
unreal-niggery-rs = { git = "https://git.xeondev.com/xavo95/unreal-niggery-rs.git" }
|
||||||
|
widestring = { version = "1.1.0", optional = true }
|
||||||
|
windows = { version = "0.59.0", features = [
|
||||||
"Win32_Foundation",
|
"Win32_Foundation",
|
||||||
"Win32_System_LibraryLoader",
|
"Win32_System_LibraryLoader",
|
||||||
"Win32_System_SystemServices",
|
"Win32_System_SystemServices",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# shorekeeper-patch
|
# wicked-waifus-win-patch
|
||||||
|
|
||||||
PAK files signature check bypass for Wuthering Waves 1.3 beta
|
PAK files signature check bypass for the PC version of a certain game.
|
||||||
|
|
||||||
### How to use
|
### How to use
|
||||||
Just inject it at early startup.
|
Just inject it at early startup.
|
||||||
|
|
335
archive.md
Normal file
335
archive.md
Normal file
|
@ -0,0 +1,335 @@
|
||||||
|
# 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,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
36
build.bat
36
build.bat
|
@ -1,6 +1,30 @@
|
||||||
: Build for cn_beta_1_3_0
|
GOTO:MAIN
|
||||||
cargo build --release --no-default-features -F cn_beta_1_3_0
|
|
||||||
: Build for cn_live_1_3_0
|
:cargoReleaseBuild
|
||||||
cargo build --release --no-default-features -F cn_live_1_3_0
|
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||||
: Build for os_live_1_3_0
|
cargo clean
|
||||||
cargo build --release --no-default-features -F os_live_1_3_0
|
cargo build --release --no-default-features -F %~1
|
||||||
|
set features=%~1
|
||||||
|
set cleaned_features=%features:,=-%
|
||||||
|
COPY target\release\wicked_waifus_win.dll build\%~2\wicked-waifus-win-%cleaned_features%.dll
|
||||||
|
cargo clean
|
||||||
|
ENDLOCAL
|
||||||
|
EXIT /B 0
|
||||||
|
|
||||||
|
:buildAllVariants
|
||||||
|
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||||
|
call:cargoReleaseBuild "cn_beta_2_1_0,%~1" %~1
|
||||||
|
ENDLOCAL
|
||||||
|
EXIT /B 0
|
||||||
|
|
||||||
|
:MAIN
|
||||||
|
if exist "build" rd /q /s "build"
|
||||||
|
mkdir build
|
||||||
|
mkdir build\regular
|
||||||
|
mkdir build\only-sig-bypass
|
||||||
|
cargo clean
|
||||||
|
|
||||||
|
call:buildAllVariants regular
|
||||||
|
call:buildAllVariants only-sig-bypass
|
||||||
|
|
||||||
|
tar -acvf wicked-waifus-win-patch-win64.zip -C build .
|
79
src/config.rs
Normal file
79
src/config.rs
Normal file
|
@ -0,0 +1,79 @@
|
||||||
|
#[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) const CONFIG_SERVER_DEFAULT: &'static str = "127.0.0.1:10001";
|
||||||
|
#[cfg(all(not(feature = "enable-sdk"), not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
// pub(crate) const HOTPATCH_SERVER_DEFAULT: &'static str = "127.0.0.1:10001";
|
||||||
|
#[cfg(all(not(feature = "enable-sdk"), not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
pub(crate) const LOG_SERVER_DEFAULT: &'static str = "127.0.0.1:10001";
|
||||||
|
#[cfg(all(not(feature = "enable-sdk"), not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
// pub(crate) const SDK_SERVER_DEFAULT: &'static str = "127.0.0.1:10001";
|
||||||
|
|
||||||
|
#[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 CurlConfig {
|
||||||
|
pub(crate) handle_rcx_relative_offset: u64,
|
||||||
|
pub(crate) url_handle_relative_offset: usize,
|
||||||
|
pub(crate) curl_easy_setopt: usize,
|
||||||
|
pub(crate) curl_easy_perform: 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,
|
||||||
|
// pub(crate) sdk_server_regex: &'static str,
|
||||||
|
}
|
||||||
|
|
||||||
|
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(feature = "cn_beta_2_1_0")]
|
||||||
|
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
||||||
|
f_pak_file_check: 0x40E8980,
|
||||||
|
f_pak_file_check_preamble: 0x8D48574157565540,
|
||||||
|
resize_grow: 0x08D34D0,
|
||||||
|
f_print_f: 0x2787600,
|
||||||
|
add_pak_folders_entry: 0x40EFE60,
|
||||||
|
add_pak_folders_ret: 0x40F2700,
|
||||||
|
#[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,
|
||||||
|
},
|
||||||
|
#[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,
|
||||||
|
},
|
||||||
|
};
|
26
src/curl_utils.rs
Normal file
26
src/curl_utils.rs
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
#![cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
#![allow(unused)]
|
||||||
|
|
||||||
|
const CURL_OPT_TYPE_LONG: u64 = 0;
|
||||||
|
const CURL_OPT_TYPE_OBJECT_POINT: u64 = 10000;
|
||||||
|
const CURL_OPT_TYPE_FUNCTION_POINT: u64 = 20000;
|
||||||
|
const CURL_OPT_TYPE_OFF_T: u64 = 30000;
|
||||||
|
const CURL_OPT_TYPE_BLOB: u64 = 40000;
|
||||||
|
|
||||||
|
const CURL_OPT_TYPE_STRING_POINT: u64 = CURL_OPT_TYPE_OBJECT_POINT;
|
||||||
|
const CURL_OPT_TYPE_S_LIST_POINT: u64 = CURL_OPT_TYPE_OBJECT_POINT;
|
||||||
|
const CURL_OPT_TYPE_CB_POINT: u64 = CURL_OPT_TYPE_OBJECT_POINT;
|
||||||
|
const CURL_OPT_TYPE_VALUES: u64 = CURL_OPT_TYPE_LONG;
|
||||||
|
|
||||||
|
#[macro_export]
|
||||||
|
macro_rules! curl_opt {
|
||||||
|
($name:ident, $typ:ident, $value:literal) => {
|
||||||
|
pub(crate) const $name: u64 = $typ + $value;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
curl_opt!(CURL_OPT_URL, CURL_OPT_TYPE_STRING_POINT, 2);
|
||||||
|
curl_opt!(CURL_OPT_SSL_VERIFY_PEER, CURL_OPT_TYPE_LONG, 64);
|
||||||
|
curl_opt!(CURL_OPT_CA_INFO, CURL_OPT_TYPE_STRING_POINT, 65);
|
||||||
|
curl_opt!(CURL_OPT_SSL_VERIFY_HOST, CURL_OPT_TYPE_LONG, 81);
|
||||||
|
curl_opt!(CURL_OPT_CA_PATH, CURL_OPT_TYPE_STRING_POINT, 97);
|
123
src/extras.rs
Normal file
123
src/extras.rs
Normal file
|
@ -0,0 +1,123 @@
|
||||||
|
#![cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
|
||||||
|
use std::env::VarError;
|
||||||
|
use std::ffi::{c_char, CStr, CString};
|
||||||
|
use std::sync::OnceLock;
|
||||||
|
use std::thread;
|
||||||
|
use std::time::Duration;
|
||||||
|
|
||||||
|
use ilhook::x64::Registers;
|
||||||
|
use windows::core::PCSTR;
|
||||||
|
use windows::Win32::System::LibraryLoader::GetModuleHandleA;
|
||||||
|
|
||||||
|
use crate::{config, curl_utils};
|
||||||
|
use crate::config::{CONFIG, CurlConfig};
|
||||||
|
use crate::replacer::{AbstractReplacer, GenericReplacer, Replacer};
|
||||||
|
|
||||||
|
type CurlEasySetStr = fn(handle: usize, tag: u64, value: *const c_char);
|
||||||
|
|
||||||
|
static mut URL_REPLACER: OnceLock<Vec<AbstractReplacer>> = OnceLock::new();
|
||||||
|
static UE_CURL_EASY_SETOPT_FUNC: OnceLock<usize> = OnceLock::new();
|
||||||
|
|
||||||
|
trait EnvBoolMapper {
|
||||||
|
fn map_env_bool(self, default: bool) -> bool;
|
||||||
|
}
|
||||||
|
|
||||||
|
impl EnvBoolMapper for Result<String, VarError> {
|
||||||
|
fn map_env_bool(self, default: bool) -> bool {
|
||||||
|
self.map(|val| match val.as_str() {
|
||||||
|
"y" => true,
|
||||||
|
_ => false
|
||||||
|
}).unwrap_or(default)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub(crate) fn configure_extras(interceptor: &mut interceptor_rs::Interceptor) {
|
||||||
|
unsafe {
|
||||||
|
URL_REPLACER.set(vec![
|
||||||
|
// Config Server Replacer
|
||||||
|
AbstractReplacer::GenericReplacer(GenericReplacer {
|
||||||
|
regex: regex::Regex::new(CONFIG.replacement_config.config_server_regex).unwrap(),
|
||||||
|
replacement: std::env::var("CFG_SERVER_URL")
|
||||||
|
.unwrap_or(config::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(GenericReplacer {
|
||||||
|
regex: regex::Regex::new(CONFIG.replacement_config.log_server_regex).unwrap(),
|
||||||
|
replacement: std::env::var("LOG_SERVER_URL")
|
||||||
|
.unwrap_or(config::LOG_SERVER_DEFAULT.to_string()),
|
||||||
|
force_http: std::env::var("LOG_SERVER_FORCE_HTTP").map_env_bool(true),
|
||||||
|
}),
|
||||||
|
// TODO: SDK Server replacer
|
||||||
|
]).unwrap()
|
||||||
|
}
|
||||||
|
|
||||||
|
let module = unsafe { GetModuleHandleA(PCSTR::null()) }.unwrap();
|
||||||
|
println!("Game base: {:X}", module.0 as usize);
|
||||||
|
|
||||||
|
let _ = UE_CURL_EASY_SETOPT_FUNC.set(module.0 as usize + CONFIG.ue_curl_config.curl_easy_setopt);
|
||||||
|
interceptor
|
||||||
|
.attach(
|
||||||
|
(module.0 as usize) + CONFIG.ue_curl_config.curl_easy_perform,
|
||||||
|
on_curl_easy_perform,
|
||||||
|
Some(&CONFIG.ue_curl_config as *const _ as usize)
|
||||||
|
).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, 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
|
||||||
|
}
|
||||||
|
|
||||||
|
unsafe extern "win64" fn on_curl_easy_perform(reg: *mut Registers, user_data: usize) {
|
||||||
|
let config = std::ptr::read(user_data as *const CurlConfig);
|
||||||
|
|
||||||
|
let curl_handle = unsafe {
|
||||||
|
*(((*reg).rcx + config.handle_rcx_relative_offset) as *const usize)
|
||||||
|
};
|
||||||
|
let url_ptr = unsafe {
|
||||||
|
*((curl_handle + config.url_handle_relative_offset) as *const usize)
|
||||||
|
};
|
||||||
|
let url = unsafe { CStr::from_ptr(url_ptr as *const i8) }.to_str().unwrap();
|
||||||
|
println!("[curl_easy_perform] Original URL: {url}");
|
||||||
|
|
||||||
|
for replacer in unsafe { URL_REPLACER.get_mut().unwrap() } {
|
||||||
|
match replacer.replace(url) {
|
||||||
|
Ok(result) => {
|
||||||
|
println!("[curl_easy_perform] Replacement URL: {result}");
|
||||||
|
let url = CString::new(result.as_str()).unwrap();
|
||||||
|
unsafe {
|
||||||
|
// TODO: Rethink this for other curl interceptors
|
||||||
|
std::mem::transmute::<usize, CurlEasySetStr>(*UE_CURL_EASY_SETOPT_FUNC.get().unwrap())(
|
||||||
|
curl_handle,
|
||||||
|
curl_utils::CURL_OPT_URL,
|
||||||
|
url.as_ptr(),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
// TODO: Future stuff
|
||||||
|
// let headers_ptr = unsafe { *(((*reg).rcx + 0x118) as *const usize) };
|
||||||
|
// let headers = unsafe { std::slice::from_raw_parts(*(headers_ptr as *const usize) as *const u8, 1000) };
|
||||||
|
// println!("Headers: {headers:02X?}");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Err(_) => {}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
println!("No valid url match found");
|
||||||
|
}
|
|
@ -1,50 +0,0 @@
|
||||||
use ilhook::x64::{
|
|
||||||
CallbackOption, HookFlags, HookPoint, HookType, Hooker, JmpBackRoutine, RetnRoutine,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub struct Interceptor {
|
|
||||||
pub hooks: Vec<HookPoint>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Interceptor {
|
|
||||||
pub const fn new() -> Self {
|
|
||||||
Self { hooks: Vec::new() }
|
|
||||||
}
|
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub unsafe fn attach(
|
|
||||||
&mut self,
|
|
||||||
addr: usize,
|
|
||||||
routine: JmpBackRoutine,
|
|
||||||
) -> Result<(), ilhook::HookError> {
|
|
||||||
let hooker = Hooker::new(
|
|
||||||
addr,
|
|
||||||
HookType::JmpBack(routine),
|
|
||||||
CallbackOption::None,
|
|
||||||
0,
|
|
||||||
HookFlags::empty(),
|
|
||||||
);
|
|
||||||
|
|
||||||
let hook_point = hooker.hook()?;
|
|
||||||
self.hooks.push(hook_point);
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
pub unsafe fn replace(
|
|
||||||
&mut self,
|
|
||||||
addr: usize,
|
|
||||||
routine: RetnRoutine,
|
|
||||||
) -> Result<(), ilhook::HookError> {
|
|
||||||
let hooker = Hooker::new(
|
|
||||||
addr,
|
|
||||||
HookType::Retn(routine),
|
|
||||||
CallbackOption::None,
|
|
||||||
0,
|
|
||||||
HookFlags::empty(),
|
|
||||||
);
|
|
||||||
|
|
||||||
let hook_point = hooker.hook()?;
|
|
||||||
self.hooks.push(hook_point);
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
|
110
src/lib.rs
110
src/lib.rs
|
@ -1,69 +1,86 @@
|
||||||
|
use std::sync::OnceLock;
|
||||||
use std::thread;
|
use std::thread;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
use ilhook::x64::Registers;
|
use ilhook::x64::Registers;
|
||||||
use interceptor::Interceptor;
|
use interceptor_rs::Interceptor;
|
||||||
use windows::core::{w, PCSTR, PCWSTR};
|
use unreal_niggery_rs::Add;
|
||||||
|
use unreal_niggery_rs::f_string::{FString, Printf};
|
||||||
|
use unreal_niggery_rs::t_array::TArray;
|
||||||
|
use windows::core::{PCSTR, PCWSTR};
|
||||||
|
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::SystemServices::DLL_PROCESS_ATTACH;
|
use windows::Win32::System::SystemServices::DLL_PROCESS_ATTACH;
|
||||||
use windows::Win32::{Foundation::HINSTANCE, System::LibraryLoader::GetModuleHandleA};
|
|
||||||
|
|
||||||
mod interceptor;
|
use config::CONFIG;
|
||||||
mod offsets;
|
|
||||||
|
|
||||||
use offsets::CONFIG;
|
mod config;
|
||||||
|
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
mod replacer;
|
||||||
|
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
mod extras;
|
||||||
|
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
mod curl_utils;
|
||||||
|
|
||||||
unsafe fn thread_func() {
|
static CUSTOM_PAK_FOLDER: OnceLock<String> = OnceLock::new();
|
||||||
Console::AllocConsole().unwrap();
|
|
||||||
println!("Wuthering Waves signature check bypass");
|
fn thread_func() {
|
||||||
|
unsafe { Console::AllocConsole() }.unwrap();
|
||||||
|
println!("Wuthering Waves essential binary patcher");
|
||||||
println!("Don't forget to visit https://discord.gg/reversedrooms");
|
println!("Don't forget to visit https://discord.gg/reversedrooms");
|
||||||
|
|
||||||
let module = GetModuleHandleA(PCSTR::null()).unwrap();
|
println!("Waiting for ACE init");
|
||||||
println!("Base: {:X}", module.0 as usize);
|
let module = unsafe { GetModuleHandleA(PCSTR::null()) }.unwrap();
|
||||||
|
let pak_file_offset = ((module.0 as usize) + CONFIG.f_pak_file_check) as *const u64;
|
||||||
|
loop {
|
||||||
|
if unsafe { std::ptr::read(pak_file_offset) } == CONFIG.f_pak_file_check_preamble {
|
||||||
|
println!("ACE Initialization finished");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
thread::sleep(Duration::from_millis(1))
|
||||||
|
}
|
||||||
|
|
||||||
let mut interceptor = Interceptor::new();
|
let mut interceptor = Interceptor::new();
|
||||||
interceptor
|
interceptor
|
||||||
.replace(
|
.replace((module.0 as usize) + CONFIG.f_pak_file_check, fpakfile_check_replacement, None)
|
||||||
(module.0 as usize) + CONFIG.f_pak_file_check,
|
|
||||||
fpakfile_check_replacement,
|
|
||||||
)
|
|
||||||
.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
|
interceptor
|
||||||
.attach((module.0 as usize) + CONFIG.kuro_http_get, on_kurohttp_get)
|
.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();
|
.unwrap();
|
||||||
|
|
||||||
let krsdk_ex = loop {
|
|
||||||
match GetModuleHandleA(CONFIG.disable_sdk.sdk_dll) {
|
|
||||||
Ok(handle) => break handle,
|
|
||||||
Err(_) => thread::sleep(Duration::from_millis(1)),
|
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
interceptor
|
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular", feature = "advanced"))]
|
||||||
.replace((krsdk_ex.0 as usize) + CONFIG.disable_sdk.eula_accept, dummy)
|
wicked_waifus_win_payload_advanced::enable_advanced_features(
|
||||||
.unwrap();
|
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,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
interceptor
|
#[cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
.replace((krsdk_ex.0 as usize) + CONFIG.disable_sdk.sdk_go_away, dummy)
|
extras::configure_extras(&mut interceptor);
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
println!("Successfully initialized!");
|
println!("Successfully initialized!");
|
||||||
|
|
||||||
thread::sleep(Duration::from_secs(u64::MAX));
|
thread::sleep(Duration::from_secs(u64::MAX));
|
||||||
}
|
}
|
||||||
|
|
||||||
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}");
|
|
||||||
if url.ends_with("/index.json") {
|
|
||||||
println!("index.json requested, redirecting");
|
|
||||||
let new_wstr = w!("http://127.0.0.1:10001/index.json");
|
|
||||||
std::ptr::copy_nonoverlapping(new_wstr.as_ptr(), wstr, new_wstr.as_wide().len() + 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
unsafe extern "win64" fn fpakfile_check_replacement(
|
unsafe extern "win64" fn fpakfile_check_replacement(
|
||||||
reg: *mut Registers,
|
reg: *mut Registers,
|
||||||
_: usize,
|
_: usize,
|
||||||
|
@ -76,8 +93,17 @@ unsafe extern "win64" fn fpakfile_check_replacement(
|
||||||
1
|
1
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe extern "win64" fn dummy(_: *mut Registers, _: usize, _: usize) -> usize {
|
unsafe extern "win64" fn add_pak_folders(reg: *mut Registers, _: usize) {
|
||||||
1
|
let local_ptr = ((*reg).rbp - 0x20) as usize; // Uninitialized local FString pointer
|
||||||
|
let pak_folder = CUSTOM_PAK_FOLDER.get().unwrap();
|
||||||
|
FString::printf(local_ptr, pak_folder);
|
||||||
|
let mut f_string = FString(TArray::read(local_ptr));
|
||||||
|
println!("Injecting custom pak folder: {}", f_string);
|
||||||
|
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: {}", TArray::read((*reg).rbx as usize));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
|
|
@ -1,52 +0,0 @@
|
||||||
#[cfg(not(feature = "enable-sdk"))]
|
|
||||||
use windows::core::{PCSTR, s};
|
|
||||||
|
|
||||||
#[cfg(not(feature = "enable-sdk"))]
|
|
||||||
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) kuro_http_get: usize,
|
|
||||||
#[cfg(not(feature = "enable-sdk"))]
|
|
||||||
pub(crate) disable_sdk: DisableSdkConfiguration,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "cn_beta_1_3_0")]
|
|
||||||
pub(crate) const CONFIG: InjectConfiguration = InjectConfiguration {
|
|
||||||
f_pak_file_check: 0x3D2F460,
|
|
||||||
kuro_http_get: 0xFC8CF0,
|
|
||||||
#[cfg(not(feature = "enable-sdk"))]
|
|
||||||
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,
|
|
||||||
kuro_http_get: 0xFC9900,
|
|
||||||
#[cfg(not(feature = "enable-sdk"))]
|
|
||||||
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,
|
|
||||||
kuro_http_get: 0xFC6C20,
|
|
||||||
#[cfg(not(feature = "enable-sdk"))]
|
|
||||||
disable_sdk: DisableSdkConfiguration{
|
|
||||||
sdk_dll: s!("KRSDK.dll"),
|
|
||||||
eula_accept: 0x94710,
|
|
||||||
sdk_go_away: 0x9FE10
|
|
||||||
}
|
|
||||||
};
|
|
83
src/replacer.rs
Normal file
83
src/replacer.rs
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
#![cfg(all(not(feature = "only-sig-bypass"), feature = "regular"))]
|
||||||
|
pub(crate) trait Replacer {
|
||||||
|
fn replace(&mut self, original: &str) -> Result<String, String>;
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub(crate) enum AbstractReplacer {
|
||||||
|
GenericReplacer(GenericReplacer),
|
||||||
|
GenericCdnReplacer(GenericCdnReplacer),
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub(crate) struct GenericReplacer {
|
||||||
|
pub(crate) regex: regex::Regex,
|
||||||
|
pub(crate) replacement: String,
|
||||||
|
pub(crate) force_http: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub(crate) struct GenericCdnReplacer {
|
||||||
|
pub(crate) regex: regex::Regex,
|
||||||
|
pub(crate) replacement: Vec<String>,
|
||||||
|
pub(crate) force_http: bool,
|
||||||
|
pub(crate) url_index: u8,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Replacer for AbstractReplacer {
|
||||||
|
fn replace(&mut self, original: &str) -> Result<String, String> {
|
||||||
|
match self {
|
||||||
|
AbstractReplacer::GenericReplacer(replacer) => replacer.replace(original),
|
||||||
|
AbstractReplacer::GenericCdnReplacer(replacer) => replacer.replace(original)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Replacer for GenericReplacer {
|
||||||
|
fn replace(&mut self, original: &str) -> Result<String, String> {
|
||||||
|
// Prepare output array
|
||||||
|
let mut results: Vec<String> = vec![];
|
||||||
|
// Perform the capture over input
|
||||||
|
for (_, [scheme, path]) in self.regex.captures_iter(original).map(|c| c.extract()) {
|
||||||
|
results.push(format!(
|
||||||
|
"{}://{}/{}",
|
||||||
|
if self.force_http { "http" } else { scheme },
|
||||||
|
self.replacement,
|
||||||
|
path
|
||||||
|
));
|
||||||
|
}
|
||||||
|
// We are supposed to only parse one entry from text
|
||||||
|
if 1 == results.len() {
|
||||||
|
Ok(results.remove(0))
|
||||||
|
} else if results.is_empty() {
|
||||||
|
Err("No valid url match found so returning original url".to_string())
|
||||||
|
} else {
|
||||||
|
Err(format!("Invalid number of entries parsed, expected 1, obtained {:?}", results.len()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Replacer for GenericCdnReplacer {
|
||||||
|
fn replace(&mut self, original: &str) -> Result<String, String> {
|
||||||
|
// Prepare output array
|
||||||
|
let mut results: Vec<String> = vec![];
|
||||||
|
// Perform the capture over input
|
||||||
|
for (_, [scheme, path]) in self.regex.captures_iter(original).map(|c| c.extract()) {
|
||||||
|
results.push(format!(
|
||||||
|
"{}://{}/{}",
|
||||||
|
if self.force_http { "http" } else { scheme },
|
||||||
|
self.replacement[self.url_index as usize],
|
||||||
|
path
|
||||||
|
));
|
||||||
|
}
|
||||||
|
// We are supposed to only parse one entry from text
|
||||||
|
if 1 == results.len() {
|
||||||
|
self.url_index = (self.url_index + 1) % self.replacement.len() as u8;
|
||||||
|
Ok(results.remove(0))
|
||||||
|
} else if results.is_empty() {
|
||||||
|
Err("No valid url match found".to_string())
|
||||||
|
} else {
|
||||||
|
Err(format!("Invalid number of entries parsed, expected 1, obtained {:?}", results.len()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue