Compare commits

...

1 commit

Author SHA1 Message Date
ed8ea77890 Updated offsets for 1.6.12 2025-03-05 02:02:07 +01:00
3 changed files with 12 additions and 12 deletions

View file

@ -2,7 +2,7 @@ use ilhook::x64::Registers;
use super::{ModuleInitError, NapModule, NapModuleContext};
const SET_DITHER_CONFIG: usize = 0x95BCFF0;
const SET_DITHER_CONFIG: usize = 0x79FCBA0;
pub struct CensorshipPatch;

View file

@ -7,14 +7,14 @@ use crate::{
util::{import, read_csharp_string, GAME_ASSEMBLY_BASE},
};
import!(rsa_create() -> usize = 0x69100D0);
import!(rsa_from_xml_string(instance: usize, xml_string: usize) -> usize = 0x6910310);
import!(il2cpp_string_new(cstr: *const u8) -> usize = 0x3538F0);
import!(rsa_create() -> usize = 0x1850CC50);
import!(rsa_from_xml_string(instance: usize, xml_string: usize) -> usize = 0x1850CE90);
import!(il2cpp_string_new(cstr: *const u8) -> usize = 0x11CB4C0);
pub unsafe fn initialize_rsa_public_key() {
const SERVER_PUBLIC_KEY: &str = include_str!("../../server_public_key.xml");
let rsa_public_key_backdoor_field =
((*(GAME_ASSEMBLY_BASE.wrapping_add(0x4F251C0) as *const usize)) + 244080) as *mut usize;
((*(GAME_ASSEMBLY_BASE.wrapping_add(0x4C12AB0) as *const usize)) + 244072) as *mut usize;
let rsa = rsa_create();
rsa_from_xml_string(
@ -33,14 +33,14 @@ pub unsafe fn initialize_rsa_public_key() {
pub unsafe fn replace_sdk_public_key_string_literal() {
const SDK_PUBLIC_KEY: &str = include_str!("../../sdk_public_key.xml");
*(GAME_ASSEMBLY_BASE.wrapping_add(0x5237348) as *mut usize) = il2cpp_string_new(
*(GAME_ASSEMBLY_BASE.wrapping_add(0x51C87D8) as *mut usize) = il2cpp_string_new(
CString::new(SDK_PUBLIC_KEY)
.unwrap()
.to_bytes_with_nul()
.as_ptr(),
) as usize;
*(GAME_ASSEMBLY_BASE.wrapping_add(0x5257948) as *mut usize) = il2cpp_string_new(
*(GAME_ASSEMBLY_BASE.wrapping_add(0x51E8DD8) as *mut usize) = il2cpp_string_new(
[
27818, 40348, 47410, 27936, 51394, 33172, 51987, 33287, 44524, 39195, 47922, 8238,
53932, 42445, 929, 38470, 27758, 56475, 5938, 26471, 58462, 55701, 37675, 22326, 36428,
@ -63,14 +63,14 @@ pub unsafe fn replace_sdk_public_key_string_literal() {
pub unsafe fn monitor_network_state(interceptor: &mut Interceptor) {
interceptor
.attach(
GAME_ASSEMBLY_BASE.wrapping_add(0x86F05A0),
GAME_ASSEMBLY_BASE.wrapping_add(0x6979EA0),
on_network_state_change,
)
.unwrap();
interceptor
.attach(
GAME_ASSEMBLY_BASE.wrapping_add(0x9326760),
GAME_ASSEMBLY_BASE.wrapping_add(0x8120EE0),
download_data_slave,
)
.unwrap();

View file

@ -6,8 +6,8 @@ use crate::util::{self, import, read_csharp_string};
use super::{ModuleInitError, NapModule, NapModuleContext};
const MAKE_INITIAL_URL: usize = 0x7CE75F0;
const WEB_REQUEST_CREATE: usize = 0x798F080;
const MAKE_INITIAL_URL: usize = 0x1A1F3510;
const WEB_REQUEST_CREATE: usize = 0x19D0DF80;
pub struct Network;
@ -37,7 +37,7 @@ unsafe extern "win64" fn on_web_request_create(reg: *mut Registers, _: usize) {
}
}
import!(il2cpp_string_new(cstr: *const u8) -> usize = 0x3538F0);
import!(il2cpp_string_new(cstr: *const u8) -> usize = 0x11CB4C0);
impl Network {
const SDK_URL: &str = "http://127.0.0.1:20100";