#include "native_data.h" #include "Engine/Game/Build/addresses.h" #include "Engine/Game/Build/20260929/profile.h" namespace dingosdk::game { bool initialize_native_data(std::uintptr_t base) { using namespace addr::profile; if (!base) return false; for (const auto& contract : {model_manager_contract, model_create_contract, model_destroy_contract, model_value_contract, model_find_contract, card_model_field_contract, neighborhood_publish_contract, model_lock_contract, model_unlock_contract, news_assign_contract, news_delegate_copy_contract, news_delegate_destroy_contract, news_invoke_contract, news_reference_contract, asset_find_contract}) { std::array bytes{}; if (base > UINTPTR_MAX - contract.rva || !memory::read(base + contract.rva, bytes) || bytes != contract.bytes) return false; } NativeData next; next.find_asset = reinterpret_cast(base + asset_find_contract.rva); auto& m = next.models; auto& v = next.values; m.get_model = reinterpret_cast(base + model_manager_contract.rva); m.create = reinterpret_cast(base + model_create_contract.rva); m.destroy = reinterpret_cast(base + model_destroy_contract.rva); m.value = reinterpret_cast(base + model_value_contract.rva); m.find = reinterpret_cast(base + model_find_contract.rva); m.field = reinterpret_cast(base + card_model_field_contract.rva); m.publish = reinterpret_cast(base + neighborhood_publish_contract.rva); m.lock = reinterpret_cast(base + model_lock_contract.rva); m.unlock = reinterpret_cast(base + model_unlock_contract.rva); v.assign = reinterpret_cast(base + news_assign_contract.rva); v.copy_delegate = reinterpret_cast(base + news_delegate_copy_contract.rva); v.destroy_delegate = reinterpret_cast(base + news_delegate_destroy_contract.rva); v.invoke = reinterpret_cast(base + news_invoke_contract.rva); v.null_reference = reinterpret_cast(base + news_reference_contract.rva); native_data() = next; return true; } }