#pragma once #include "Common.h" struct Il2cppSlotDefinition { uintptr_t slot_offset; uintptr_t gameassembly_offset; const char* name; }; extern const std::array kIl2cppSlotMap; void Log(const char* fmt, ...); void ResolveGABypassSlots(); void* GetIl2cppSlot(uintptr_t slot_offset); uintptr_t GetGameAssemblyBase(); bool WaitForGameAssembly(uint32_t timeout_ms = 0, uint32_t poll_ms = 100); bool EnsureIl2CppThreadAttached(); bool WaitForIl2CppThreadAttach(uint32_t timeout_ms = 15000, uint32_t poll_ms = 100); void DetachIl2CppThreadIfAttached(); void SetGameThreadContext(bool enabled); bool IsGameThreadContext(); std::wstring Utf8ToWide(const std::string& value); std::string WideToUtf8(const std::wstring& value); bool IsWindowsBuildAtLeast(uint32_t build_number); void ToggleConsole(bool enabled); bool ScanLoadedModulesForInjectionMarkers(); void InitializeI18N(); const char* Tr(const char* key); void SetLanguage(Language language); void ApplyThemeDefault(); void ApplyThemeEvangelionUnit01(); void ApplyThemeEvangelionUnit02(); void ApplyThemeMatrix(); bool IsKeyPressedOnce(int vk); template Fn GetIl2cppFn(uintptr_t slot_offset) { if (!IsGameThreadContext()) { return nullptr; } if (!EnsureIl2CppThreadAttached()) { return nullptr; } return reinterpret_cast(GetIl2cppSlot(slot_offset)); }