### Retrieve Method Pointers and Create Hooks Source: https://github.com/toxocious/aetherim/blob/main/README.md Shows how to get a pointer to a specific class method and use MinHook to intercept the method execution for custom logic. ```cpp #define UFUNC(methodPointer) *(void**)methodPointer const auto Asm_CSharp = Wrapper->get_image( "Assembly-CSharp.dll" ); const auto player_handler = Asm_CSharp->get_class( "PlayerHandler" ); const auto player_move = player_handler->get_method( "Move" ); MH_CreateHook(UFUNC(player_move), &playerMove_h, (void**)&playerMove_o); ``` -------------------------------- ### Access Static Fields and Field Attributes Source: https://github.com/toxocious/aetherim/blob/main/README.md Retrieves static fields from a class, often used to get instance pointers. Also demonstrates how to fetch a field's attribute for metadata analysis. ```cpp // Accessing static field const auto player_instance = Asm_CSharp->get_class( "PlayerHandler" )->get_field( "Instance" )->get_as_static(); // Getting field attribute const auto attr = Asm_CSharp->get_class( "PlayerHandler" )->get_field( "Instance" )->get_attribute(); ``` -------------------------------- ### Initialize Aetherim Wrapper Source: https://github.com/toxocious/aetherim/blob/main/README.md Initializes the Aetherim wrapper to gain access to IL2CPP runtime methods. This step automatically attaches the IL2CPP domain to the current thread to ensure stability. ```cpp #include "Aetherim/src/wrapper.hpp" const auto Wrapper = std::make_unique(); ``` -------------------------------- ### Manage Aetherim via Git Submodules Source: https://github.com/toxocious/aetherim/blob/main/README.md Commands to integrate and maintain the Aetherim library within a project using Git submodules for easy updates. ```shell git submodule add https://github.com/Toxocious/Aetherim git submodule update --remote Aetherim git rm ``` -------------------------------- ### Invoke Static Method in C++ Source: https://github.com/toxocious/aetherim/blob/main/README.md Demonstrates how to invoke a static method using a method pointer. This method does not require an instance or object pointer. It retrieves an assembly, a class, and then the static method to invoke. ```cpp const auto Asm_CSharp = Wrapper->get_image( "Assembly-CSharp.dll" ); const auto player_handler = Asm_CSharp->get_class( "PlayerHandler" ); const auto player_instance = player_handler->get_method( "get_instance" ); if ( player_instance != nullptr ) { void * params = nullptr; const auto new_instance = reinterpret_cast( player_instance->invoke_static( params ) ); }; ``` -------------------------------- ### Invoke Non-Static Method in C++ Source: https://github.com/toxocious/aetherim/blob/main/README.md Shows how to invoke a non-static method. This requires obtaining an instance/object pointer before calling the method. It retrieves an assembly, a class, a method, and then the instance to invoke the method on. ```cpp const auto Asm_CSharp = Wrapper->get_image( "Assembly-CSharp.dll" ); const auto player_handler = Asm_CSharp->get_class( "PlayerHandler" ); const auto get_player_position = player_handler->get_method( "get_position" ); if ( get_player_position != nullptr ) { const auto instance = player_handler->get_field( "Instance" )->get_static_value(); void * params = nullptr; const auto position = reinterpret_cast( get_player_position->invoke( instance, // instance/object pointer params // either a void * of params or nullptr ) ); } ``` -------------------------------- ### Retrieve IL2CPP Classes and Nested Subclasses Source: https://github.com/toxocious/aetherim/blob/main/README.md Demonstrates how to obtain a pointer to a specific class from an IL2CPP image and how to access nested subclasses within that class. Returns a pointer to the class if found, or nullptr otherwise. ```cpp const auto Asm_CSharp = Wrapper->get_image( "Assembly-CSharp.dll" ); const auto player_handler = Asm_CSharp->get_class( "PlayerHandler" ); // Nested class example if ( player_handler != nullptr ) { const auto player_handler_sub_class = Asm_CSharp->get_class("Inventory"); } ``` -------------------------------- ### Inspect Class Fields and Attributes Source: https://github.com/toxocious/aetherim/blob/main/README.md Iterates through all fields of a class to retrieve their names, attributes, and memory offsets. This is useful for SDK generation or dynamic field identification. ```cpp const auto Asm_CSharp = Wrapper->get_image( "Assembly-CSharp.dll" ); const auto player = Asm_CSharp->get_class( "PlayerHandler" ); for ( const auto field : player->get_fields() ) { const auto field_attribute = field->get_attribute(); if ( field_attribute != nullptr ) printf( "\t[Aetherim] PlayerHandler -> %s %s (0x%zx)\n", field_attribute, field->get_name(), field->get_offset() ); else printf( "\t[Aetherim] PlayerHandler -> %s (0x%zx)\n", field->get_name(), field->get_offset() ); } ``` -------------------------------- ### Retrieve IL2CPP Image Source: https://github.com/toxocious/aetherim/blob/main/README.md Retrieves a pointer to a specific IL2CPP image (DLL) by name. Returns a pointer to the image if found, otherwise returns nullptr. ```cpp const auto Asm_CSharp = Wrapper->get_image("Assembly-CSharp.dll"); ``` -------------------------------- ### Check if Debugger is Attached in C++ Source: https://github.com/toxocious/aetherim/blob/main/README.md A simple function to check if a debugger is attached to the current thread. It returns a boolean value indicating the debugger's status. Requires a Wrapper instance. ```cpp const auto Wrapper = std::make_unique(); const auto is_debugger_active = Wrapper->is_debugger_attached(); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.