Исходник Weave V2 Source

Начинающий
Статус
Оффлайн
Регистрация
18 Окт 2019
Сообщения
11
Реакции[?]
0
Поинты[?]
0
не компилиться пишет:
Серьезность Код Описание Проект Файл Строка Состояние подавления Подробности
Ошибка MSB8073 не удается найти версию набора инструментов LLVM "16": папка "'D:\VisualStuidio\VC\Tools\Llvm\x64\lib\clang\16'" не существует. Убедитесь, что набор инструментов LLVM версии "16" установлен или выберите другую версию набора инструментов. Дополнительные сведения см. на странице
Пожалуйста, авторизуйтесь для просмотра ссылки.
. ParseCheat D:\VisualStuidio\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.ClangCl.Common.targets 74
и это:
Серьезность Код Описание Проект Файл Строка Состояние подавления Подробности
Ошибка TRK0005 не удалось обнаружить "fxc.exe". Не удается найти указанный файл. weave F:\plaga\counterstrike2\TRACKER 1
Пожалуйста, авторизуйтесь для просмотра ссылки.
 
Начинающий
Статус
Оффлайн
Регистрация
23 Апр 2024
Сообщения
75
Реакции[?]
6
Поинты[?]
1K
ппц много ошибок полезло,
миллиард ошибок полезло помогите пожалукйтсва
 

Вложения

Начинающий
Статус
Оффлайн
Регистрация
23 Окт 2019
Сообщения
46
Реакции[?]
3
Поинты[?]
0
Начинающий
Статус
Оффлайн
Регистрация
1 Янв 2024
Сообщения
5
Реакции[?]
0
Поинты[?]
0
pasting corporation
Участник
Статус
Оффлайн
Регистрация
4 Дек 2022
Сообщения
735
Реакции[?]
217
Поинты[?]
4K
Без обид, просто попросили слить.
Скачать --
Пожалуйста, авторизуйтесь для просмотра ссылки.


Цитирую слова:


Credits:
Пожалуйста, авторизуйтесь для просмотра ссылки.
Пожалуйста, авторизуйтесь для просмотра ссылки.
ахахаахах ахахааха опять ликнули
 
Начинающий
Статус
Оффлайн
Регистрация
14 Июн 2023
Сообщения
156
Реакции[?]
6
Поинты[?]
6K
Без обид, просто попросили слить.
Скачать --
Пожалуйста, авторизуйтесь для просмотра ссылки.


Цитирую слова:


Credits:
Пожалуйста, авторизуйтесь для просмотра ссылки.
Пожалуйста, авторизуйтесь для просмотра ссылки.
пастим братья мусульмани
 
Тьомчик
Участник
Статус
Оффлайн
Регистрация
30 Июн 2020
Сообщения
711
Реакции[?]
150
Поинты[?]
58K
pasting corporation
Участник
Статус
Оффлайн
Регистрация
4 Дек 2022
Сообщения
735
Реакции[?]
217
Поинты[?]
4K
Участник
Статус
Оффлайн
Регистрация
6 Апр 2021
Сообщения
338
Реакции[?]
207
Поинты[?]
113K
Код:
#include "../pch.h"
#include "core1.hpp"

#define in_range(x, a, b) ((x) >= (a) && (x) <= (b))
#define get_bits(x) (in_range((x & (~0x20)), 'A', 'F') ? (((x) & (~0x20)) - 'A' + 0xA): (in_range(x, '0', '9') ? (x) - '0': 0))
#define get_byte(x) (get_bits(x[0]) << 4 | get_bits(x[1]))

#include "../../counterstrike2/utilities/service/loader_pattern_generated.h"
#include "../../counterstrike2/utilities/service/schema_generated.h"
#include "../../counterstrike2/utilities/service/response_generated.h"

#include "../../counterstrike2/utilities/address/address.hpp"
#include "../../counterstrike2/sdk/interfaces/i_schema_system.hpp"
#include "../../counterstrike2/utilities/xorstr.h"
#include "../../counterstrike2/utilities/fnv.h"
//#include "../../counterstrike2/sdk/interfaces/interfaces.hpp"

class xored_schema
{
public:
    struct alignas(16) utl_xor_hash
    {
        std::uint64_t key;
        char pad[0x8];
        std::uint64_t hash_key;
        char pad2[0x15];
        std::uint64_t xored;
        void* naebka;
        std::uint64_t xored_hash;
    };
    xored_schema() = default;
    xored_schema(const std::uint64_t offset)
    {
        map.key = get_hash<0x8936721837>(0x673521098);
        map.hash_key = get_hash<0x89732193213>(map.key);
        map.xored = offset ^ map.key;
        map.xored_hash = map.xored ^ get_hash(get_hash<0x4562321983721>(map.hash_key));
    }

    xored_schema(const std::uint64_t offset_, const std::uint64_t key_, const std::uint64_t hash_key_)
    {
        key = key_;
        hash_key = hash_key_;
        xored_key = offset_;
    }

    std::uint64_t get() {
        return xored_key ^ key ^ get_hash(hash_key ^ 0x4562321983721);
    }

    __forceinline operator size_t() {
        return get();
    }
private:
    template<std::uint64_t key = 0x9863217634217321>
    std::size_t constexpr get_hash(const std::size_t& value)
    {
        return std::integral_constant<uint64_t, key>::value^ value;
    }
public:
    utl_xor_hash map;
    std::uint64_t key;
    std::uint64_t hash_key;
    std::uint64_t xored_key;
};

c_address pattern_scan(std::uintptr_t module, const char* signature)
{
    PIMAGE_DOS_HEADER dos_header = reinterpret_cast<PIMAGE_DOS_HEADER>(module);
    PIMAGE_NT_HEADERS nt_headers = reinterpret_cast<PIMAGE_NT_HEADERS>(reinterpret_cast<std::uint8_t*>(module) + dos_header->e_lfanew);

    std::size_t size_of_image = nt_headers->OptionalHeader.SizeOfImage;
    std::uintptr_t image_base = module;

    uintptr_t first_match = 0;
    auto pattern = signature;
    for (uintptr_t current = image_base; current < image_base + size_of_image; current++)
    {
        if (!*pattern)
            return first_match;

        if (*(PBYTE)pattern == ('\?') || *(BYTE*)current == get_byte(pattern))
        {
            if (!first_match)
                first_match = current;

            if (!pattern[2])
                return first_match;

            if (*(PWORD)pattern == ('\?\?') || *(PBYTE)pattern != ('\?'))
                pattern += 3;
            else
                pattern += 2;
        }
        else
        {
            pattern = signature;
            first_match = 0;
        }
    }

    return 0;
}

std::uintptr_t resolve_rip(std::uintptr_t address, std::uintptr_t offset)
{
    if (!address)
        return 0;

    auto new_address = address + offset;

    std::uintptr_t rva = *reinterpret_cast<std::uint32_t*>(new_address);
    std::uintptr_t rip = new_address + sizeof(std::uint32_t);

    return rip + rva;
}

template<typename T>
T* get_interface(std::uint64_t module, const char* interface_name)
{
    if (!interface_name)
        return nullptr;

    if (!module)
        return nullptr;

    auto create_interface = GetProcAddress(HMODULE(module), xorstr_("CreateInterface"));

    if (!create_interface)
        return nullptr;


    using interface_callback_fn = void* (__cdecl*)();

    typedef struct _interface_reg_t
    {
        interface_callback_fn callback;
        const char* name;
        _interface_reg_t* flink;
    } interface_reg_t;

    interface_reg_t* interface_list = *reinterpret_cast<interface_reg_t**>(resolve_rip(std::uintptr_t(create_interface), 3));

    if (!interface_list)
        return nullptr;


    for (interface_reg_t* it = interface_list; it; it = it->flink)
    {
        if (!strcmp(it->name, interface_name))
            return reinterpret_cast<T*>(it->callback());

    }

    return nullptr;
}

#include <filesystem>
namespace fs = std::filesystem;

void Core::Initilization() {
    fs::create_directories( "C:/testboss" );

    std::vector<ConstructorPattern> const_pattern = {
        {"client.dll", "48 89 5C 24 18 56 48 83 EC 30 48", 0, false, "level_init"},
        {"client.dll", "48 89 74 24 10 57 48 83 EC 20 48 8B F9 E8 ?? ?? ?? ?? 48 8D 8F", 0, false, "level_shutdown"},
        {"client.dll", "48 89 5C 24 08 57 48 83 EC 20 33 C9 41", 0, false, "get_player_tick"},
        {"client.dll", "48 8D 05 ?? ?? ?? ?? 48 8B D3 4C 8D 05", 3, true, "get_unk"},
        {"client.dll", "48 89 5C 24 10 56 48 83 EC 30 8B 05", 0, false, "frame_stage_notify"},
        {"engine2.dll", "40 55 53 56 57 48 8D", 0, false, "send_move_internal"},
        {"scenesystem.dll", "48 8B C4 48 89 50 10 55 41", 0, false, "draw_scene_object"},
        {"client.dll", "48 8B C4 48 81 EC F8 00 00 00 48", 0, false, "run_command"},
        {"client.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 48 83 EC 20 48 8B F1 49 8B F8", 0, false, "filter_init"},
        {"client.dll", "48 8D 05 ?? ?? ?? ?? 89 5C 24 54", 3, true, "trace_filter"},
        {"scenesystem.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 49 8B 41", 0, false, "get_material_for_draw"},
        {"client.dll", "48 89 5C 24 10 55 48 8D 6C 24 A9 48 81 EC B0 00 00 00 48 8B 01", 0, false, "override_view"},
        {"client.dll", "40 56 48 83 EC 60 8B", 0, false, "interpolate_entities"},
        {"client.dll", "48 89 5C 24 10 48 89 6C 24 18 56 57 41 56 48 83 EC 70", 0, false, "on_render_start"},
        {"client.dll", "40 57 48 83 EC 20 49 8B", 0, false, "add_effect"},
        {"client.dll", "48 89 5C 24 08 48 89 6C 24 10 56 57 41 56 48 83 EC 40 4D", 0, false, "create_new_entity"},
        {"client.dll", "48 89 5C 24 10 48 89 7C 24 20 55 48 8B EC 48 83 EC 50", 0, false, "set_model"},
        {"client.dll", "E8 ? ? ? ? 48 8B F0 48 85 C0 74 0E 4C 8B C3", 1, true, "find_so_cache"},
        {"client.dll", "40 53 48 83 EC 20 4C 8B 49 18", 0, false, "create_base_type_cache"},
        {"client.dll", "48 8B 0D ?? ?? ?? ?? 48 8D 5E 10 48 89 44 24 28", 3, true, "render_game_system"},
        {"client.dll", "48 83 EC 38 48 63 91", 0, false, "get_spread"},
        {"client.dll", "48 89 5C 24 08 57 48 81 EC D0 00 00 00 0F", 0, false, "get_inaccuracy"},
        {"client.dll", "66 89 54 24 10 55 48", 0, false, "get_spread_pattern"},
        {"client.dll", "48 8B 05 ?? ?? ?? ?? 48 8D 3C CD 00 00 00 00 48 03 D7 48 8D 4C 24 30 FF D0 84 C0 74 12 66 3B DE 74 4A", 3, true, "game_session"},
        {"client.dll", "48 89 5C 24 18 48 89 74 24 20 57 48 83 EC 30 48 8B 41", 0, false, "backtrack_local_player"},
        {"client.dll", "48 89 5C 24 18 57 48 83 EC 50 48 8B F9", 0, false, "update_accuracy"},
        {"client.dll", "48 89 6C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 41 56 48 83 EC ? 4D 8B F1", 0, false, "get_bone_position"},
        {"client.dll", "E8 ?? ?? ?? ?? 33 DB 89 47 08", 1, true, "get_bone_index"},
        {"client.dll", "48 89 5C 24 08 57 48 83 EC 40 48 8B 01 48 8B FA 48", 0, false, "set_local_origin"},
        {"client.dll", "48 89 6C 24 20 57 41 56 41 57 48 81 EC 90 00 00 00 48 8B FA C7 44 24 20 00 00 00 00 4D 8B F8 4C 8D 0D ?? ?? ?? ?? 48 8B E9 4C 8D 05 ?? ?? ?? ?? 33 D2 48 8B 4F 18 E8 ?? ?? ?? ?? 4C 8B F0 48 85 C0 0F 84 9A", 0, false, "set_dynamic_attribute_value"},
        {"client.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 48 89 7C 24 20 41 56 48 83 EC 20 48 8B D9 E8", 0, false, "get_attribute_definition_by_name"},
        {"client.dll", "48 89 7C 24 18 4C 89 64 24 20 55 41 56 41 57 48 8D 6C 24 B9 48 81 EC B0", 0, false, "set_dynamic_attribute_value_string"},
        {"client.dll", "48 83 EC 28 B9 48 00 00 00 E8 ?? ?? ?? ?? 48 85", 0, false, "econ_item_initilization"},
        {"client.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 30 48 8B D9 48", 0, false, "uses_legacy_model"},
        {"client.dll", "E8 ?? ?? ?? ?? 4C 8B C0 EB 17", 1, true, "localize_name"},
        {"client.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 48 8D 99 60", 0, false, "set_mesh_group_mask"},
        {"client.dll", "40 55 56 41 56 48 81 EC 80", 0, false, "prediction_update"},
        {"client.dll", "48 63 41 10 48 8B 0D", 0, false, "get_surface_data"},
        {"resourcesystem.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 48 83 EC 30 41 8B", 0, false, "enumerate_material"},
        {"client.dll", "48 89 5C 24 10 48 89 74 24 18 48 89 7C 24 20 48 89 4C 24 08 55 41 54 41 55 41 56 41 57 48 8D", 0, false, "trace_shape"},
        {"client.dll", "48 83 EC 38 F3 0F 10 15 ?? ?? ?? ?? 66", 0, false, "point_contents"},
        {"client.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 41 56 41 57 48 83 EC 40 F2", 0, false, "init_trace_data"},
        {"client.dll", "41 0F B7 40 ?? F3 41 0F 10 10", 0, false, "get_trace"}, // update
        {"client.dll", "4C 8B DC 53 55 41", 0, false, "run_trace"},
        {"client.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 48 89 7C 24 20 41 54 41 56 41 57 48 81 EC C0 00 00 00 48 8B 9C", 0, false, "clip_ray_to_entity"},
        {"client.dll", "48 83 EC 28 83 F9 FF 75 17 48 8B 0D ?? ?? ?? ?? 48 8D 54 24 30 48 8B 01 FF 90 ?? ?? ?? ?? 8B 08 48 63 C1 48 8D 0D ?? ?? ?? ?? 48 8B 0C", 0, false, "get_split_screen_view_player"},
        {"client.dll", "48 8B 0D ? ? ? ? 48 8B 01 FF 50 ? 8B DF", 3, true, "csgo_input"},
        {"client.dll", "48 8B 0D ? ? ? ? 48 8D 94 24 50 02 00 00 33 DB", 3, true, "game_entity_system"},
        {"client.dll", "48 8B 0D ?? ?? ?? ?? 48 8B D7 E8 ?? ?? ?? ?? 4C 8B E0", 3, true, "trace"},
        {"client.dll", "48 83 EC 28 45 33 C0 E8", 0, false, "smoke_view"},
        {"client.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 40 48 8B 01 48 8B F1 0F 29 74 24 30 48 8D 4C 24 20 41", 0, false, "get_float_event"},
        {"client.dll", "48 89 5C 24 08 48 89 74 24 10 48 89 7C 24 18 41 56 48 83 EC 30 48 8B 01 41 8B F0 4C 8B F1 41 B0 01 48 8D 4C 24 20 48 8B DA 48 8B 78", 0, false, "get_int_event"},
        {"client.dll", "48 8B 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8B 0D ?? ?? ?? ?? 48 85 C9 74 2D", 3, true, "game_event_manager"},
        {"client.dll", "4C 8D 35 ?? ?? ?? ?? 33 DB 48 8D 2D", 3, true, "client_mode"},
        {"client.dll", "48 8D 0D ?? ?? ?? ?? 45 33 C0 0F B7 D7 E8 ?? ?? ?? ?? 48 8B D8 48 85 C0", 3, true, "inventory_manager"},
        {"client.dll", "48 8B 05 ?? ?? ?? ?? 4C 8D 45 90 48 8B 54 24 40", 3, true, "gc_client"},
        {"client.dll", "48 8B 05 ?? ?? ?? ?? 48 85 C0 75 6B", 3, true, "econ_item_system"},
        {"client.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 48 89 7C 24 20 41 56 48 83 EC 20 45 33 F6 0F", 0, false, "create_attribute_string"},
        {"client.dll", "E8 ? ? ? ? 40 80 FF 03", 1, true, "game_particle_manager"},
        {"client.dll", "48 8B 05 ?? ?? ?? ?? 48 8B 08 48 8B 59 68", 3, true, "particle_manager"},
        {"client.dll", "48 8B 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 84 C0 74 0D 33 C0", 3, true, "game_rules"},
        {"client.dll", "48 85 C9 74 32 48 8B 41 10 48 85 C0 74 29 44", 0, false, "get_handle_entity"},
        {"client.dll", "40 53 48 83 EC 20 48 8B D9 48 85 C9 74 24", 0, false, "get_collision_entity"},
        {"client.dll", "40 55 56 57 41 54 41 55 41 56 41 57 48 81 EC D0", 0, false, "calc_world_space_bones"},
        {"client.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 48 8B FA 49 63 F0 BA FF FF 0F 00 48 8B D9 E8 ?? ?? ?? ?? 48 8B", 0, false, "get_bone"},
        {"client.dll", "48 85 C9 75 04 83 C8 FF C3 8B", 0, false, "num_bones"},
        {"client.dll", "85 D2 78 16 3B 91", 0, false, "bone_flags"},
        {"client.dll", "85 D2 78 25 3B 91", 0, false, "bone_name"},
        {"client.dll", "85 D2 78 17 3B 91 78", 0, false, "bone_parent"},
        {"particles.dll", "48 89 5C 24 08 57 48 81 EC C0 00 00 00 33 C0 8B", 0, false, "FindVarMaterial"},
        {"particles.dll", "48 89 5C 24 10 48 89 6C 24 18 56 57 41 54 41 56 41 57 48 83 EC 30 0F B6 01 45 0F B6 F9 8B 2A 4D 8B E0 4C 8B 72 08 48 8B F9 C0 E8 02 24 0F 3C 09 74 0A 41 B0 0B B2 09 E8 ?? ?? ?? ?? 0F B6 07 33 DB C0 E8 02 24 0F 3C 09 75 06 48 8B 77 08 EB 03 48 8B F3 4C 8D 44 24 60 C7 44 24 60 FF FF FF FF 48 8D 54 24 20 89 6C 24 20 48 8B CE 4C 89 74 24 28 E8 ?? ?? ?? ?? 8B D0 83 F8 FF 75 1E 45 33 C9 89 6C 24 20 4C 8D 44 24 20 4C 89 74 24 28 48 8B D7 48 8B CE E8 ?? ?? ?? ?? 8B D0 0F B6 0F C0 E9 02 80 E1 0F 80 F9 09 75 06 48 8B 4F 08 EB 03 48 8B CB 8B 41 3C 85 C0 74 0C 48 8D 59 40 83 F8 08 76 03 48 8B 1B 48 63 C2 4D", 0, false, "SetMaterialShaderType"},
        {"particles.dll", "48 89 5C 24 08 48 89 6C 24 10 56 57 41 54", 0, false, "SetMaterialFunctions"},
        {"client.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 41 56 41 57 48 83 EC 40 48 8B 9C 24 88 00 00 00 4D", 0, false, "smoke_vortex_draw"},
        {"client.dll", "48 8B 0D ?? ?? ?? ?? 41 81 C9 30 1E", 3, true, "fx_queue_manager"},
        {"client.dll", "85 D2 0F 85 52", 0, false, "create_move"},
        {"client.dll", "48 81 EC F8 00 00 00 F3 0F 10 0A", 0, false, "get_hash_seed"}, // get_hash_seed
        {"client.dll", "48 8B C4 48 89 58 10 48 89 70 18 55 57 41 54 41 56 41 57 48 8D 68 B8", 0, false, "movement_processing"},
        {"client.dll", "48 89 5C 24 08 57 48 83 EC 20 48 8B DA E8 ?? ?? ?? ?? 48 8B F8", 0, false, "set_prediction_data"},
        {"client.dll", "E8 ?? ?? ?? ?? 48 89 3D ?? ?? ?? ?? 48 8B 5C 24 30", 1, true, "set_prediction_command"},
        {"client.dll", "48 83 EC 28 B9 FF FF FF FF E8 ?? ?? ?? ?? 48 C7", 0, false, "clear_prediction_data"},
        {"client.dll", "48 8B 05 ?? ?? ?? ?? 48 8B 74 24 48 48 83 C4 20", 3, true, "get_scene_view_debug_overlay"},
        {"client.dll", "48 89 54 24 10 55 53 56 41 55 48", 0, false, "draw_hitbox"},
        {"client.dll", "40 57 48 83 EC 20 49 8B 00", 0, false, "create_effect_index"},
        {"client.dll", "48 83 EC 58 F3 41 0F 10 51", 0, false, "create_effect"},
        {"client.dll", "48 89 74 24 10 57 48 83 EC 30 4C 8B D9 49 8B F9 33 C9 41 8B F0 83 FA FF 0F", 0, false, "unk_function"},
        {"client.dll", "48 83 EC 58 F3 41 0F 10 51", 0, false, "unk_function2"},
        {"materialsystem2.dll", "48 89 5C 24 08 48 89 6C 24 18 56 57 41 56 48", 0, false, "create_material"},
        {"client.dll", "48 83 EC 28 4C 8B C1 48 85 C9 0F", 0, false, "delete_entity"},
        {"client.dll", "40 53 48 83 EC 30 48 8B 41 10 48 8B D9 0F 29 74 24 20 48 8D 4C 24 50", 0, false, "valid_throw"},
        {"client.dll", "48 89 5C 24 18 48 89 6C 24 20 57 48 83 EC 20 48 8B 3D", 0, false, "get_time"},
        {"client.dll", "40 53 48 83 EC 20 48 8B 01 48 8B D9 44", 0, false, "get_type"},
        {"client.dll", "48 89 5C 24 08 44 0F", 0, false, "get_hash_function"},
        {"engine2.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 66 0F 6E CA 41", 0, false, "set_function_bool"},
        {"engine2.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 66 0F 6E CA 49 8B F8 66 0F 70 C9 00 8B F2 48 8B D9 45 33 C9 48 8B C1 66 66 0F 1F 84 00 00 00 00 00 66 0F 6F C1 4C 8D 15 ?? ?? ?? ?? 66 0F 76 00 0F 50 C8 85 C9 75 5A 41 FF C1 48 83 C0 10 41 83 F9 02", 0, false, "set_function_vector"},
        {"client.dll", "40 53 48 81 EC 80 00 00 00 48 8B D9 E8 ?? ?? ?? ?? 48 85", 0, false, "get_fov"},
        {"inputsystem.dll", "48 89 5C 24 ? 57 48 83 EC 20 0F B6 FA 48 8B D9 FF 15", 0, false, "relative_mode_mouse"},
        {"client.dll", "48 89 4C 24 08 55 53 56 57 41 54 41 55 41 56 41 57 48 8D AC 24 68 FE", 0, false, "debug_info"},
        {"client.dll", "48 8B C4 48 89 58 18 48 89 50 10 55", 0, false, "init_position"},
        {"client.dll", "48 85 D2 0F 84 EB 03", 0, false, "init_direction"},
        {"client.dll", "48 8B C4 48 89 50 10 55 41 56 48", 0, false, "init_grenade_trace"},
        {"client.dll", "48 89 5C 24 08 57 48 83 EC 20 48 8B D9 E8 ?? ?? ?? ?? 48 85", 0, false, "draw_crosshair"},
        {"client.dll", "48 8B 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8B F8 48 89 BE E8 0C 00 00", 3, true, "dynamic_manager"},
        {"client.dll", "48 89 6C 24 18 56 41 56 41 57 48 83 EC 20 45", 0, false, "create_dynamic_light"},
        {"client.dll", "40 55 48 83 EC 20 48 83", 0, false, "find_hud"},
        {"client.dll", "48 89 5C 24 10 48 89 74 24 18 48 89 7C 24 20 55 48 8D 6C 24 B1", 0, false, "calc_viewmodel_view"},
        {"client.dll", "89 54 24 10 4C 8B DC 53", 0, false, "setup_view"},
        {"scenesystem.dll", "45 85 C9 0F 8E 71", 0, false, "skybox_draw_array"},
        {"client.dll", "40 57 48 83 EC 40 48 8B F9 BA", 0, false, "grenade_trace"},
        {"client.dll", "48 89 5C 24 18 4C 89 4C 24 20 89", 0, false, "draw_processing"},
        {"client.dll", "48 8B C4 48 89 48 08 55 56 41 54 41 56 48 8D A8", 0, false, "processing"},
        {"client.dll", "66 0F 6E CA 4C 8D 1D ?? ?? ?? ?? 66 0F 70 C9 00 4D", 0, false, "get_post_processing_settings"},
        {"client.dll", "40 53 48 83 EC 20 48 8B D9 E8 ?? ?? ?? ?? 48 85 C0 0F 85", 0, false, "show_legs"},
        {"client.dll", "40 53 48 83 EC 20 48 8B 01 48 8B DA FF 90 ?? ?? ?? ?? 48 85 C0 74 0D", 0, false, "has_hold_button"},
        {"client.dll", "48 89 5C 24 08 57 48 83 EC 20 48 8B 41 30 48", 0, false, "get_fov2"},
        {"client.dll", "48 89 5C 24 18 55 56 57 48 81 EC 90 00 00 00 48", 0, false, "serialize_partial_to_array"},
        {"client.dll", "48 89 5C 24 10 48 89 6C 24 18 48 89 7C 24 20 41 56 48 83 EC 20 48 BF", 0, false, "parse_partial_to_array"},
        {"client.dll", "48 89 5C 24 20 55 56 57 48 83 EC 30 49", 0, false, "merge_to_from"},
        {"client.dll", "48 89 5C 24 08 48 89 74 24 18 57 48 83 EC 20 48 8B 0D", 0, false, "is_loadout_allowed"},
        {"client.dll", "4C 8D 05 ?? ?? ?? ?? C6 44 24 28 01 8D 56 16", 3, true, "binding"},
        {"engine2.dll", "40 53 48 83 EC 20 48 8B 05 ?? ?? ?? ?? 33 DB 48 8B 08 8D 53 30 48 8B 01 FF 50 ?? 48 85 C0 74 25", 0, false, "c_clc_msg_voice_data"},
        {"client.dll", "48 89 5C 24 10 48 89 74 24 18 57 48 83 EC 20 33 F6 48 8B F9 48 85 C9 75 2B 8D 4F 58", 0, false, "c_msg_voice_audio"},
        {"client.dll", "44 88 4C 24 20 44 88 44 24 18 48", 0, false, "add_econ_item"},
        {"client.dll", "48 89 5C 24 08 48 89 74 24 10 48 89 7C 24 18 41 56 48 83 EC 70 48", 0, false, "get_lerp_tick"},
        {"networksystem.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 48 83 EC 60 48", 0, false, "recview_message"}, // update
        {"client.dll", "48 8B 05 ?? ?? ?? ?? 48 8B 00 48 8B 0D ?? ?? ?? ?? FF 90 ?? ?? ?? ?? 0F B6 C0 85 C0 74 0B 8B 44 24 34 83 C8 02", 3, true, "application"},
        {"client.dll", "E8 ?? ?? ?? ?? 48 8B 4F 18 48 8D 53 20", 1, true, "panorama_icon"},
        {"client.dll", "48 8B C4 4C 89 48 20 55 56 41 56 48 8D 68", 0, false, "input_history"},
        {"client.dll", "85 D2 0F 85 8A", 0, false, "kukold_move"},
        {"client.dll", "40 56 57 48 83 EC 68", 0, false, "render_scope"},
        {"client.dll", "48 89 5C 24 20 55 41 56 41 57 48 81", 0, false, "calculation_view_bob"},
        {"engine2.dll", "41 56 41 57 48 83 EC 28 80", 0, false, "run_prediction"}, // update
        {"client.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 48 8B 71 68", 0, false, "clear_notice"},
        {"client.dll", "48 89 5C 24 10 57 48 83 EC 20 33 FF 48 8B D9 48 85 C9 75 21 8D 4B 30 E8 ?? ?? ?? ?? 48 85 C0 74 06 48 89 78 08 EB 23 48 8B C7 48 8B 5C 24 38 48 83 C4 20 5F C3 4C 8D 05 ?? ?? ?? ?? BA 30 00 00 00 E8 ?? ?? ?? ?? 48 89 58 08 48 8B 5C 24 38 48 8D 0D ?? ?? ?? ?? 48 89 08 33 C9 48 89 48 10 89 78 2C", 0, false, "create_subtick_step"},
        { "client.dll", "48 89 5C 24 08 57 48 83 EC 20 48 8B D9 48 8B FA 48 8B 49 10", 0, false, "add_subtick" },
        {"animationsystem.dll", "48 89 5C 24 08 48 89 74 24 18 57 48 83 EC 20 49", 0,false, "animation_fix"},
        {"client.dll", "40 53 48 83 EC 30 48 8B 41 10 48 8B D9 8B 50 30",0,false, "update_subclass"},
        {"scenesystem.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 48 8B 71 08", 0,0, "get_cvar_value"},
        {"client.dll", "48 8B C4 44 89 48 20 44 89 40 18 48 89 50",0,0, "run_simulation"},
        {"client.dll", "89 54 24 10 48 83 EC 28 48 81 C1 88",0,0, "invalidate_material"},
        {"client.dll", "40 53 48 83 EC 30 0F 29 74 24 20 48 8B D9 E8 ?? ?? ?? ?? 48 85", 0,0,"should_grenade_crosshair"},
    };

    std::vector<Pattern2> patterns;

    for ( auto& it : const_pattern ) {
        auto address = pattern_scan( MODULE( it.module.c_str( ) ), it.pattern.c_str( ) );

        if ( address.get( ) == 0 ) {
            MessageBoxA( 0, it.debug_info.c_str( ), 0, 0 );
            continue;
        }

        std::uint64_t offset = 0;
        if ( it.relative )
            offset = address.add( it.offset ).relative_address( ).get( );
        else
            offset = address.get( );

        patterns.push_back( { MODULE_HASH( it.module.c_str( ) ), offset - MODULE( it.module.c_str( ) ) } );
    }

    {
        // Open the file in text mode to write the offsets
        std::ofstream file( "C:/testboss/patterns.txt" );

        for ( const auto& pattern : patterns ) {
            file << pattern.offset << "\n";
        }

        file.close( );
    }

    flatbuffers::FlatBufferBuilder builder;

    std::vector<flatbuffers::Offset<Pattern>> offsets_pattern;

    for ( auto it = patterns.begin( ); it != patterns.end( ); it++ ) {
        offsets_pattern.push_back( CreatePattern( builder, it->module, it->offset ) );
    }

    builder.Finish( CreateLoaderPatternDirect( builder, &offsets_pattern ) );

    auto pattern_data = builder.GetBufferSpan( );
    flatbuffers::FlatBufferBuilder builder2;

    auto schema_system = get_interface<i_schema_system>( MODULE( "schemasystem.dll" ), xorstr_( "SchemaSystem_001" ) );

    std::vector<std::string> modules = { xorstr_( "client.dll" ), xorstr_( "engine2.dll" ), xorstr_( "schemasystem.dll" ), xorstr_( "meshsystem.dll" ), xorstr_ ( "materialsystem2.dll" ), xorstr_( "scenesystem.dll" ), xorstr_( "animationsystem.dll" ), xorstr_( "particles.dll" ) };
    std::unordered_map<std::uint64_t, std::unordered_map<std::uint64_t, xored_schema>> schema_data{};
    std::unordered_map<std::string, std::unordered_map<std::string, std::int32_t>> schema_data2{};

    for ( int i{}; i < modules.size() ; i++ ) {
        auto module = modules[ i ];
        schema_system_type_scope* schema_class = schema_system->find_type_scope_for_module( module.c_str() );

        if ( !schema_class ) continue;

        const int nTableSize = schema_class->m_classes.Count( );
        UtlTSHashHandle_t* pElements = new UtlTSHashHandle_t[ nTableSize + 1U ];
        const auto nElements = schema_class->m_classes.GetElements( 0, nTableSize, pElements );

        for ( int i = 0; i < nElements; i++ ) {
            const UtlTSHashHandle_t hElement = pElements[ i ];

            if ( hElement == 0 )
                continue;

            auto pClassBinding = schema_class->m_classes[ hElement ];
            if ( pClassBinding == nullptr )
                continue;

            schema_class_info_data_t* client_class_info = schema_class->find_type_declared_class( pClassBinding->binary_name );

            if ( !client_class_info ) continue;

            for ( std::int16_t j = 0; j < client_class_info->field_size; j++ ) {
                schema_class_field_data_t* field = &client_class_info->fields[ j ];

                if ( !pClassBinding->binary_name || !field || !field->name ) continue;

                schema_data2[ pClassBinding->binary_name ][ field->name ] = field->offset;
                schema_data[ fnv64::hash_runtime( pClassBinding->binary_name ) ][ fnv64::hash_runtime( field->name ) ] = xored_schema( field->offset );
            }
        }

        delete[ ] pElements;
    }

    {
        std::ofstream file( "C:/testboss/schema.txt" );

        for ( auto& it : schema_data2 ) {
            auto& binrary = it.first;

            for ( auto& jt : it.second ) {
                auto& field = jt.first;
                int offset = jt.second;

                file << std::format( "{}->{}: {}\n", binrary, field, offset );
            }
        }

        file.close( );
    }

    std::vector<flatbuffers::Offset<Schema>> Schemas;

    for ( auto& it : schema_data ) {
        auto binary = it.first;
        std::vector<flatbuffers::Offset<Field>> Field;

        for ( auto& jt : it.second ) {
            auto field = jt.first;
            Field.push_back( CreateField( builder2, field, jt.second.map.xored_hash, jt.second.map.key, jt.second.map.hash_key ) );
        }

        Schemas.push_back( CreateSchemaDirect( builder2, binary, &Field ) );
    }

    builder2.Finish( CreateSchemaClassDirect( builder2, &Schemas ) );

    auto schema_data_ = builder2.GetBufferSpan( );

    std::ofstream file( "C:/testboss/schema.weave", std::ios::binary );

    file.write( ( char* )schema_data_.data( ), schema_data_.size( ) );

    file.close( );

    int ret = 1;

}
made it so it saves the data in localdisk C/testboss
 
Начинающий
Статус
Оффлайн
Регистрация
1 Янв 2024
Сообщения
5
Реакции[?]
0
Поинты[?]
0
i removed the loader connection before building and injecting it, chillout
dll pls
Код:
#include "../pch.h"
#include "core1.hpp"

#define in_range(x, a, b) ((x) >= (a) && (x) <= (b))
#define get_bits(x) (in_range((x & (~0x20)), 'A', 'F') ? (((x) & (~0x20)) - 'A' + 0xA): (in_range(x, '0', '9') ? (x) - '0': 0))
#define get_byte(x) (get_bits(x[0]) << 4 | get_bits(x[1]))

#include "../../counterstrike2/utilities/service/loader_pattern_generated.h"
#include "../../counterstrike2/utilities/service/schema_generated.h"
#include "../../counterstrike2/utilities/service/response_generated.h"

#include "../../counterstrike2/utilities/address/address.hpp"
#include "../../counterstrike2/sdk/interfaces/i_schema_system.hpp"
#include "../../counterstrike2/utilities/xorstr.h"
#include "../../counterstrike2/utilities/fnv.h"
//#include "../../counterstrike2/sdk/interfaces/interfaces.hpp"

class xored_schema
{
public:
    struct alignas(16) utl_xor_hash
    {
        std::uint64_t key;
        char pad[0x8];
        std::uint64_t hash_key;
        char pad2[0x15];
        std::uint64_t xored;
        void* naebka;
        std::uint64_t xored_hash;
    };
    xored_schema() = default;
    xored_schema(const std::uint64_t offset)
    {
        map.key = get_hash<0x8936721837>(0x673521098);
        map.hash_key = get_hash<0x89732193213>(map.key);
        map.xored = offset ^ map.key;
        map.xored_hash = map.xored ^ get_hash(get_hash<0x4562321983721>(map.hash_key));
    }

    xored_schema(const std::uint64_t offset_, const std::uint64_t key_, const std::uint64_t hash_key_)
    {
        key = key_;
        hash_key = hash_key_;
        xored_key = offset_;
    }

    std::uint64_t get() {
        return xored_key ^ key ^ get_hash(hash_key ^ 0x4562321983721);
    }

    __forceinline operator size_t() {
        return get();
    }
private:
    template<std::uint64_t key = 0x9863217634217321>
    std::size_t constexpr get_hash(const std::size_t& value)
    {
        return std::integral_constant<uint64_t, key>::value^ value;
    }
public:
    utl_xor_hash map;
    std::uint64_t key;
    std::uint64_t hash_key;
    std::uint64_t xored_key;
};

c_address pattern_scan(std::uintptr_t module, const char* signature)
{
    PIMAGE_DOS_HEADER dos_header = reinterpret_cast<PIMAGE_DOS_HEADER>(module);
    PIMAGE_NT_HEADERS nt_headers = reinterpret_cast<PIMAGE_NT_HEADERS>(reinterpret_cast<std::uint8_t*>(module) + dos_header->e_lfanew);

    std::size_t size_of_image = nt_headers->OptionalHeader.SizeOfImage;
    std::uintptr_t image_base = module;

    uintptr_t first_match = 0;
    auto pattern = signature;
    for (uintptr_t current = image_base; current < image_base + size_of_image; current++)
    {
        if (!*pattern)
            return first_match;

        if (*(PBYTE)pattern == ('\?') || *(BYTE*)current == get_byte(pattern))
        {
            if (!first_match)
                first_match = current;

            if (!pattern[2])
                return first_match;

            if (*(PWORD)pattern == ('\?\?') || *(PBYTE)pattern != ('\?'))
                pattern += 3;
            else
                pattern += 2;
        }
        else
        {
            pattern = signature;
            first_match = 0;
        }
    }

    return 0;
}

std::uintptr_t resolve_rip(std::uintptr_t address, std::uintptr_t offset)
{
    if (!address)
        return 0;

    auto new_address = address + offset;

    std::uintptr_t rva = *reinterpret_cast<std::uint32_t*>(new_address);
    std::uintptr_t rip = new_address + sizeof(std::uint32_t);

    return rip + rva;
}

template<typename T>
T* get_interface(std::uint64_t module, const char* interface_name)
{
    if (!interface_name)
        return nullptr;

    if (!module)
        return nullptr;

    auto create_interface = GetProcAddress(HMODULE(module), xorstr_("CreateInterface"));

    if (!create_interface)
        return nullptr;


    using interface_callback_fn = void* (__cdecl*)();

    typedef struct _interface_reg_t
    {
        interface_callback_fn callback;
        const char* name;
        _interface_reg_t* flink;
    } interface_reg_t;

    interface_reg_t* interface_list = *reinterpret_cast<interface_reg_t**>(resolve_rip(std::uintptr_t(create_interface), 3));

    if (!interface_list)
        return nullptr;


    for (interface_reg_t* it = interface_list; it; it = it->flink)
    {
        if (!strcmp(it->name, interface_name))
            return reinterpret_cast<T*>(it->callback());

    }

    return nullptr;
}

#include <filesystem>
namespace fs = std::filesystem;

void Core::Initilization() {
    fs::create_directories( "C:/testboss" );

    std::vector<ConstructorPattern> const_pattern = {
        {"client.dll", "48 89 5C 24 18 56 48 83 EC 30 48", 0, false, "level_init"},
        {"client.dll", "48 89 74 24 10 57 48 83 EC 20 48 8B F9 E8 ?? ?? ?? ?? 48 8D 8F", 0, false, "level_shutdown"},
        {"client.dll", "48 89 5C 24 08 57 48 83 EC 20 33 C9 41", 0, false, "get_player_tick"},
        {"client.dll", "48 8D 05 ?? ?? ?? ?? 48 8B D3 4C 8D 05", 3, true, "get_unk"},
        {"client.dll", "48 89 5C 24 10 56 48 83 EC 30 8B 05", 0, false, "frame_stage_notify"},
        {"engine2.dll", "40 55 53 56 57 48 8D", 0, false, "send_move_internal"},
        {"scenesystem.dll", "48 8B C4 48 89 50 10 55 41", 0, false, "draw_scene_object"},
        {"client.dll", "48 8B C4 48 81 EC F8 00 00 00 48", 0, false, "run_command"},
        {"client.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 48 83 EC 20 48 8B F1 49 8B F8", 0, false, "filter_init"},
        {"client.dll", "48 8D 05 ?? ?? ?? ?? 89 5C 24 54", 3, true, "trace_filter"},
        {"scenesystem.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 49 8B 41", 0, false, "get_material_for_draw"},
        {"client.dll", "48 89 5C 24 10 55 48 8D 6C 24 A9 48 81 EC B0 00 00 00 48 8B 01", 0, false, "override_view"},
        {"client.dll", "40 56 48 83 EC 60 8B", 0, false, "interpolate_entities"},
        {"client.dll", "48 89 5C 24 10 48 89 6C 24 18 56 57 41 56 48 83 EC 70", 0, false, "on_render_start"},
        {"client.dll", "40 57 48 83 EC 20 49 8B", 0, false, "add_effect"},
        {"client.dll", "48 89 5C 24 08 48 89 6C 24 10 56 57 41 56 48 83 EC 40 4D", 0, false, "create_new_entity"},
        {"client.dll", "48 89 5C 24 10 48 89 7C 24 20 55 48 8B EC 48 83 EC 50", 0, false, "set_model"},
        {"client.dll", "E8 ? ? ? ? 48 8B F0 48 85 C0 74 0E 4C 8B C3", 1, true, "find_so_cache"},
        {"client.dll", "40 53 48 83 EC 20 4C 8B 49 18", 0, false, "create_base_type_cache"},
        {"client.dll", "48 8B 0D ?? ?? ?? ?? 48 8D 5E 10 48 89 44 24 28", 3, true, "render_game_system"},
        {"client.dll", "48 83 EC 38 48 63 91", 0, false, "get_spread"},
        {"client.dll", "48 89 5C 24 08 57 48 81 EC D0 00 00 00 0F", 0, false, "get_inaccuracy"},
        {"client.dll", "66 89 54 24 10 55 48", 0, false, "get_spread_pattern"},
        {"client.dll", "48 8B 05 ?? ?? ?? ?? 48 8D 3C CD 00 00 00 00 48 03 D7 48 8D 4C 24 30 FF D0 84 C0 74 12 66 3B DE 74 4A", 3, true, "game_session"},
        {"client.dll", "48 89 5C 24 18 48 89 74 24 20 57 48 83 EC 30 48 8B 41", 0, false, "backtrack_local_player"},
        {"client.dll", "48 89 5C 24 18 57 48 83 EC 50 48 8B F9", 0, false, "update_accuracy"},
        {"client.dll", "48 89 6C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 41 56 48 83 EC ? 4D 8B F1", 0, false, "get_bone_position"},
        {"client.dll", "E8 ?? ?? ?? ?? 33 DB 89 47 08", 1, true, "get_bone_index"},
        {"client.dll", "48 89 5C 24 08 57 48 83 EC 40 48 8B 01 48 8B FA 48", 0, false, "set_local_origin"},
        {"client.dll", "48 89 6C 24 20 57 41 56 41 57 48 81 EC 90 00 00 00 48 8B FA C7 44 24 20 00 00 00 00 4D 8B F8 4C 8D 0D ?? ?? ?? ?? 48 8B E9 4C 8D 05 ?? ?? ?? ?? 33 D2 48 8B 4F 18 E8 ?? ?? ?? ?? 4C 8B F0 48 85 C0 0F 84 9A", 0, false, "set_dynamic_attribute_value"},
        {"client.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 48 89 7C 24 20 41 56 48 83 EC 20 48 8B D9 E8", 0, false, "get_attribute_definition_by_name"},
        {"client.dll", "48 89 7C 24 18 4C 89 64 24 20 55 41 56 41 57 48 8D 6C 24 B9 48 81 EC B0", 0, false, "set_dynamic_attribute_value_string"},
        {"client.dll", "48 83 EC 28 B9 48 00 00 00 E8 ?? ?? ?? ?? 48 85", 0, false, "econ_item_initilization"},
        {"client.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 30 48 8B D9 48", 0, false, "uses_legacy_model"},
        {"client.dll", "E8 ?? ?? ?? ?? 4C 8B C0 EB 17", 1, true, "localize_name"},
        {"client.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 48 8D 99 60", 0, false, "set_mesh_group_mask"},
        {"client.dll", "40 55 56 41 56 48 81 EC 80", 0, false, "prediction_update"},
        {"client.dll", "48 63 41 10 48 8B 0D", 0, false, "get_surface_data"},
        {"resourcesystem.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 48 83 EC 30 41 8B", 0, false, "enumerate_material"},
        {"client.dll", "48 89 5C 24 10 48 89 74 24 18 48 89 7C 24 20 48 89 4C 24 08 55 41 54 41 55 41 56 41 57 48 8D", 0, false, "trace_shape"},
        {"client.dll", "48 83 EC 38 F3 0F 10 15 ?? ?? ?? ?? 66", 0, false, "point_contents"},
        {"client.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 41 56 41 57 48 83 EC 40 F2", 0, false, "init_trace_data"},
        {"client.dll", "41 0F B7 40 ?? F3 41 0F 10 10", 0, false, "get_trace"}, // update
        {"client.dll", "4C 8B DC 53 55 41", 0, false, "run_trace"},
        {"client.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 48 89 7C 24 20 41 54 41 56 41 57 48 81 EC C0 00 00 00 48 8B 9C", 0, false, "clip_ray_to_entity"},
        {"client.dll", "48 83 EC 28 83 F9 FF 75 17 48 8B 0D ?? ?? ?? ?? 48 8D 54 24 30 48 8B 01 FF 90 ?? ?? ?? ?? 8B 08 48 63 C1 48 8D 0D ?? ?? ?? ?? 48 8B 0C", 0, false, "get_split_screen_view_player"},
        {"client.dll", "48 8B 0D ? ? ? ? 48 8B 01 FF 50 ? 8B DF", 3, true, "csgo_input"},
        {"client.dll", "48 8B 0D ? ? ? ? 48 8D 94 24 50 02 00 00 33 DB", 3, true, "game_entity_system"},
        {"client.dll", "48 8B 0D ?? ?? ?? ?? 48 8B D7 E8 ?? ?? ?? ?? 4C 8B E0", 3, true, "trace"},
        {"client.dll", "48 83 EC 28 45 33 C0 E8", 0, false, "smoke_view"},
        {"client.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 40 48 8B 01 48 8B F1 0F 29 74 24 30 48 8D 4C 24 20 41", 0, false, "get_float_event"},
        {"client.dll", "48 89 5C 24 08 48 89 74 24 10 48 89 7C 24 18 41 56 48 83 EC 30 48 8B 01 41 8B F0 4C 8B F1 41 B0 01 48 8D 4C 24 20 48 8B DA 48 8B 78", 0, false, "get_int_event"},
        {"client.dll", "48 8B 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8B 0D ?? ?? ?? ?? 48 85 C9 74 2D", 3, true, "game_event_manager"},
        {"client.dll", "4C 8D 35 ?? ?? ?? ?? 33 DB 48 8D 2D", 3, true, "client_mode"},
        {"client.dll", "48 8D 0D ?? ?? ?? ?? 45 33 C0 0F B7 D7 E8 ?? ?? ?? ?? 48 8B D8 48 85 C0", 3, true, "inventory_manager"},
        {"client.dll", "48 8B 05 ?? ?? ?? ?? 4C 8D 45 90 48 8B 54 24 40", 3, true, "gc_client"},
        {"client.dll", "48 8B 05 ?? ?? ?? ?? 48 85 C0 75 6B", 3, true, "econ_item_system"},
        {"client.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 48 89 7C 24 20 41 56 48 83 EC 20 45 33 F6 0F", 0, false, "create_attribute_string"},
        {"client.dll", "E8 ? ? ? ? 40 80 FF 03", 1, true, "game_particle_manager"},
        {"client.dll", "48 8B 05 ?? ?? ?? ?? 48 8B 08 48 8B 59 68", 3, true, "particle_manager"},
        {"client.dll", "48 8B 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 84 C0 74 0D 33 C0", 3, true, "game_rules"},
        {"client.dll", "48 85 C9 74 32 48 8B 41 10 48 85 C0 74 29 44", 0, false, "get_handle_entity"},
        {"client.dll", "40 53 48 83 EC 20 48 8B D9 48 85 C9 74 24", 0, false, "get_collision_entity"},
        {"client.dll", "40 55 56 57 41 54 41 55 41 56 41 57 48 81 EC D0", 0, false, "calc_world_space_bones"},
        {"client.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 48 8B FA 49 63 F0 BA FF FF 0F 00 48 8B D9 E8 ?? ?? ?? ?? 48 8B", 0, false, "get_bone"},
        {"client.dll", "48 85 C9 75 04 83 C8 FF C3 8B", 0, false, "num_bones"},
        {"client.dll", "85 D2 78 16 3B 91", 0, false, "bone_flags"},
        {"client.dll", "85 D2 78 25 3B 91", 0, false, "bone_name"},
        {"client.dll", "85 D2 78 17 3B 91 78", 0, false, "bone_parent"},
        {"particles.dll", "48 89 5C 24 08 57 48 81 EC C0 00 00 00 33 C0 8B", 0, false, "FindVarMaterial"},
        {"particles.dll", "48 89 5C 24 10 48 89 6C 24 18 56 57 41 54 41 56 41 57 48 83 EC 30 0F B6 01 45 0F B6 F9 8B 2A 4D 8B E0 4C 8B 72 08 48 8B F9 C0 E8 02 24 0F 3C 09 74 0A 41 B0 0B B2 09 E8 ?? ?? ?? ?? 0F B6 07 33 DB C0 E8 02 24 0F 3C 09 75 06 48 8B 77 08 EB 03 48 8B F3 4C 8D 44 24 60 C7 44 24 60 FF FF FF FF 48 8D 54 24 20 89 6C 24 20 48 8B CE 4C 89 74 24 28 E8 ?? ?? ?? ?? 8B D0 83 F8 FF 75 1E 45 33 C9 89 6C 24 20 4C 8D 44 24 20 4C 89 74 24 28 48 8B D7 48 8B CE E8 ?? ?? ?? ?? 8B D0 0F B6 0F C0 E9 02 80 E1 0F 80 F9 09 75 06 48 8B 4F 08 EB 03 48 8B CB 8B 41 3C 85 C0 74 0C 48 8D 59 40 83 F8 08 76 03 48 8B 1B 48 63 C2 4D", 0, false, "SetMaterialShaderType"},
        {"particles.dll", "48 89 5C 24 08 48 89 6C 24 10 56 57 41 54", 0, false, "SetMaterialFunctions"},
        {"client.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 41 56 41 57 48 83 EC 40 48 8B 9C 24 88 00 00 00 4D", 0, false, "smoke_vortex_draw"},
        {"client.dll", "48 8B 0D ?? ?? ?? ?? 41 81 C9 30 1E", 3, true, "fx_queue_manager"},
        {"client.dll", "85 D2 0F 85 52", 0, false, "create_move"},
        {"client.dll", "48 81 EC F8 00 00 00 F3 0F 10 0A", 0, false, "get_hash_seed"}, // get_hash_seed
        {"client.dll", "48 8B C4 48 89 58 10 48 89 70 18 55 57 41 54 41 56 41 57 48 8D 68 B8", 0, false, "movement_processing"},
        {"client.dll", "48 89 5C 24 08 57 48 83 EC 20 48 8B DA E8 ?? ?? ?? ?? 48 8B F8", 0, false, "set_prediction_data"},
        {"client.dll", "E8 ?? ?? ?? ?? 48 89 3D ?? ?? ?? ?? 48 8B 5C 24 30", 1, true, "set_prediction_command"},
        {"client.dll", "48 83 EC 28 B9 FF FF FF FF E8 ?? ?? ?? ?? 48 C7", 0, false, "clear_prediction_data"},
        {"client.dll", "48 8B 05 ?? ?? ?? ?? 48 8B 74 24 48 48 83 C4 20", 3, true, "get_scene_view_debug_overlay"},
        {"client.dll", "48 89 54 24 10 55 53 56 41 55 48", 0, false, "draw_hitbox"},
        {"client.dll", "40 57 48 83 EC 20 49 8B 00", 0, false, "create_effect_index"},
        {"client.dll", "48 83 EC 58 F3 41 0F 10 51", 0, false, "create_effect"},
        {"client.dll", "48 89 74 24 10 57 48 83 EC 30 4C 8B D9 49 8B F9 33 C9 41 8B F0 83 FA FF 0F", 0, false, "unk_function"},
        {"client.dll", "48 83 EC 58 F3 41 0F 10 51", 0, false, "unk_function2"},
        {"materialsystem2.dll", "48 89 5C 24 08 48 89 6C 24 18 56 57 41 56 48", 0, false, "create_material"},
        {"client.dll", "48 83 EC 28 4C 8B C1 48 85 C9 0F", 0, false, "delete_entity"},
        {"client.dll", "40 53 48 83 EC 30 48 8B 41 10 48 8B D9 0F 29 74 24 20 48 8D 4C 24 50", 0, false, "valid_throw"},
        {"client.dll", "48 89 5C 24 18 48 89 6C 24 20 57 48 83 EC 20 48 8B 3D", 0, false, "get_time"},
        {"client.dll", "40 53 48 83 EC 20 48 8B 01 48 8B D9 44", 0, false, "get_type"},
        {"client.dll", "48 89 5C 24 08 44 0F", 0, false, "get_hash_function"},
        {"engine2.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 66 0F 6E CA 41", 0, false, "set_function_bool"},
        {"engine2.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 66 0F 6E CA 49 8B F8 66 0F 70 C9 00 8B F2 48 8B D9 45 33 C9 48 8B C1 66 66 0F 1F 84 00 00 00 00 00 66 0F 6F C1 4C 8D 15 ?? ?? ?? ?? 66 0F 76 00 0F 50 C8 85 C9 75 5A 41 FF C1 48 83 C0 10 41 83 F9 02", 0, false, "set_function_vector"},
        {"client.dll", "40 53 48 81 EC 80 00 00 00 48 8B D9 E8 ?? ?? ?? ?? 48 85", 0, false, "get_fov"},
        {"inputsystem.dll", "48 89 5C 24 ? 57 48 83 EC 20 0F B6 FA 48 8B D9 FF 15", 0, false, "relative_mode_mouse"},
        {"client.dll", "48 89 4C 24 08 55 53 56 57 41 54 41 55 41 56 41 57 48 8D AC 24 68 FE", 0, false, "debug_info"},
        {"client.dll", "48 8B C4 48 89 58 18 48 89 50 10 55", 0, false, "init_position"},
        {"client.dll", "48 85 D2 0F 84 EB 03", 0, false, "init_direction"},
        {"client.dll", "48 8B C4 48 89 50 10 55 41 56 48", 0, false, "init_grenade_trace"},
        {"client.dll", "48 89 5C 24 08 57 48 83 EC 20 48 8B D9 E8 ?? ?? ?? ?? 48 85", 0, false, "draw_crosshair"},
        {"client.dll", "48 8B 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8B F8 48 89 BE E8 0C 00 00", 3, true, "dynamic_manager"},
        {"client.dll", "48 89 6C 24 18 56 41 56 41 57 48 83 EC 20 45", 0, false, "create_dynamic_light"},
        {"client.dll", "40 55 48 83 EC 20 48 83", 0, false, "find_hud"},
        {"client.dll", "48 89 5C 24 10 48 89 74 24 18 48 89 7C 24 20 55 48 8D 6C 24 B1", 0, false, "calc_viewmodel_view"},
        {"client.dll", "89 54 24 10 4C 8B DC 53", 0, false, "setup_view"},
        {"scenesystem.dll", "45 85 C9 0F 8E 71", 0, false, "skybox_draw_array"},
        {"client.dll", "40 57 48 83 EC 40 48 8B F9 BA", 0, false, "grenade_trace"},
        {"client.dll", "48 89 5C 24 18 4C 89 4C 24 20 89", 0, false, "draw_processing"},
        {"client.dll", "48 8B C4 48 89 48 08 55 56 41 54 41 56 48 8D A8", 0, false, "processing"},
        {"client.dll", "66 0F 6E CA 4C 8D 1D ?? ?? ?? ?? 66 0F 70 C9 00 4D", 0, false, "get_post_processing_settings"},
        {"client.dll", "40 53 48 83 EC 20 48 8B D9 E8 ?? ?? ?? ?? 48 85 C0 0F 85", 0, false, "show_legs"},
        {"client.dll", "40 53 48 83 EC 20 48 8B 01 48 8B DA FF 90 ?? ?? ?? ?? 48 85 C0 74 0D", 0, false, "has_hold_button"},
        {"client.dll", "48 89 5C 24 08 57 48 83 EC 20 48 8B 41 30 48", 0, false, "get_fov2"},
        {"client.dll", "48 89 5C 24 18 55 56 57 48 81 EC 90 00 00 00 48", 0, false, "serialize_partial_to_array"},
        {"client.dll", "48 89 5C 24 10 48 89 6C 24 18 48 89 7C 24 20 41 56 48 83 EC 20 48 BF", 0, false, "parse_partial_to_array"},
        {"client.dll", "48 89 5C 24 20 55 56 57 48 83 EC 30 49", 0, false, "merge_to_from"},
        {"client.dll", "48 89 5C 24 08 48 89 74 24 18 57 48 83 EC 20 48 8B 0D", 0, false, "is_loadout_allowed"},
        {"client.dll", "4C 8D 05 ?? ?? ?? ?? C6 44 24 28 01 8D 56 16", 3, true, "binding"},
        {"engine2.dll", "40 53 48 83 EC 20 48 8B 05 ?? ?? ?? ?? 33 DB 48 8B 08 8D 53 30 48 8B 01 FF 50 ?? 48 85 C0 74 25", 0, false, "c_clc_msg_voice_data"},
        {"client.dll", "48 89 5C 24 10 48 89 74 24 18 57 48 83 EC 20 33 F6 48 8B F9 48 85 C9 75 2B 8D 4F 58", 0, false, "c_msg_voice_audio"},
        {"client.dll", "44 88 4C 24 20 44 88 44 24 18 48", 0, false, "add_econ_item"},
        {"client.dll", "48 89 5C 24 08 48 89 74 24 10 48 89 7C 24 18 41 56 48 83 EC 70 48", 0, false, "get_lerp_tick"},
        {"networksystem.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 48 83 EC 60 48", 0, false, "recview_message"}, // update
        {"client.dll", "48 8B 05 ?? ?? ?? ?? 48 8B 00 48 8B 0D ?? ?? ?? ?? FF 90 ?? ?? ?? ?? 0F B6 C0 85 C0 74 0B 8B 44 24 34 83 C8 02", 3, true, "application"},
        {"client.dll", "E8 ?? ?? ?? ?? 48 8B 4F 18 48 8D 53 20", 1, true, "panorama_icon"},
        {"client.dll", "48 8B C4 4C 89 48 20 55 56 41 56 48 8D 68", 0, false, "input_history"},
        {"client.dll", "85 D2 0F 85 8A", 0, false, "kukold_move"},
        {"client.dll", "40 56 57 48 83 EC 68", 0, false, "render_scope"},
        {"client.dll", "48 89 5C 24 20 55 41 56 41 57 48 81", 0, false, "calculation_view_bob"},
        {"engine2.dll", "41 56 41 57 48 83 EC 28 80", 0, false, "run_prediction"}, // update
        {"client.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 48 8B 71 68", 0, false, "clear_notice"},
        {"client.dll", "48 89 5C 24 10 57 48 83 EC 20 33 FF 48 8B D9 48 85 C9 75 21 8D 4B 30 E8 ?? ?? ?? ?? 48 85 C0 74 06 48 89 78 08 EB 23 48 8B C7 48 8B 5C 24 38 48 83 C4 20 5F C3 4C 8D 05 ?? ?? ?? ?? BA 30 00 00 00 E8 ?? ?? ?? ?? 48 89 58 08 48 8B 5C 24 38 48 8D 0D ?? ?? ?? ?? 48 89 08 33 C9 48 89 48 10 89 78 2C", 0, false, "create_subtick_step"},
        { "client.dll", "48 89 5C 24 08 57 48 83 EC 20 48 8B D9 48 8B FA 48 8B 49 10", 0, false, "add_subtick" },
        {"animationsystem.dll", "48 89 5C 24 08 48 89 74 24 18 57 48 83 EC 20 49", 0,false, "animation_fix"},
        {"client.dll", "40 53 48 83 EC 30 48 8B 41 10 48 8B D9 8B 50 30",0,false, "update_subclass"},
        {"scenesystem.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 48 8B 71 08", 0,0, "get_cvar_value"},
        {"client.dll", "48 8B C4 44 89 48 20 44 89 40 18 48 89 50",0,0, "run_simulation"},
        {"client.dll", "89 54 24 10 48 83 EC 28 48 81 C1 88",0,0, "invalidate_material"},
        {"client.dll", "40 53 48 83 EC 30 0F 29 74 24 20 48 8B D9 E8 ?? ?? ?? ?? 48 85", 0,0,"should_grenade_crosshair"},
    };

    std::vector<Pattern2> patterns;

    for ( auto& it : const_pattern ) {
        auto address = pattern_scan( MODULE( it.module.c_str( ) ), it.pattern.c_str( ) );

        if ( address.get( ) == 0 ) {
            MessageBoxA( 0, it.debug_info.c_str( ), 0, 0 );
            continue;
        }

        std::uint64_t offset = 0;
        if ( it.relative )
            offset = address.add( it.offset ).relative_address( ).get( );
        else
            offset = address.get( );

        patterns.push_back( { MODULE_HASH( it.module.c_str( ) ), offset - MODULE( it.module.c_str( ) ) } );
    }

    {
        // Open the file in text mode to write the offsets
        std::ofstream file( "C:/testboss/patterns.txt" );

        for ( const auto& pattern : patterns ) {
            file << pattern.offset << "\n";
        }

        file.close( );
    }

    flatbuffers::FlatBufferBuilder builder;

    std::vector<flatbuffers::Offset<Pattern>> offsets_pattern;

    for ( auto it = patterns.begin( ); it != patterns.end( ); it++ ) {
        offsets_pattern.push_back( CreatePattern( builder, it->module, it->offset ) );
    }

    builder.Finish( CreateLoaderPatternDirect( builder, &offsets_pattern ) );

    auto pattern_data = builder.GetBufferSpan( );
    flatbuffers::FlatBufferBuilder builder2;

    auto schema_system = get_interface<i_schema_system>( MODULE( "schemasystem.dll" ), xorstr_( "SchemaSystem_001" ) );

    std::vector<std::string> modules = { xorstr_( "client.dll" ), xorstr_( "engine2.dll" ), xorstr_( "schemasystem.dll" ), xorstr_( "meshsystem.dll" ), xorstr_ ( "materialsystem2.dll" ), xorstr_( "scenesystem.dll" ), xorstr_( "animationsystem.dll" ), xorstr_( "particles.dll" ) };
    std::unordered_map<std::uint64_t, std::unordered_map<std::uint64_t, xored_schema>> schema_data{};
    std::unordered_map<std::string, std::unordered_map<std::string, std::int32_t>> schema_data2{};

    for ( int i{}; i < modules.size() ; i++ ) {
        auto module = modules[ i ];
        schema_system_type_scope* schema_class = schema_system->find_type_scope_for_module( module.c_str() );

        if ( !schema_class ) continue;

        const int nTableSize = schema_class->m_classes.Count( );
        UtlTSHashHandle_t* pElements = new UtlTSHashHandle_t[ nTableSize + 1U ];
        const auto nElements = schema_class->m_classes.GetElements( 0, nTableSize, pElements );

        for ( int i = 0; i < nElements; i++ ) {
            const UtlTSHashHandle_t hElement = pElements[ i ];

            if ( hElement == 0 )
                continue;

            auto pClassBinding = schema_class->m_classes[ hElement ];
            if ( pClassBinding == nullptr )
                continue;

            schema_class_info_data_t* client_class_info = schema_class->find_type_declared_class( pClassBinding->binary_name );

            if ( !client_class_info ) continue;

            for ( std::int16_t j = 0; j < client_class_info->field_size; j++ ) {
                schema_class_field_data_t* field = &client_class_info->fields[ j ];

                if ( !pClassBinding->binary_name || !field || !field->name ) continue;

                schema_data2[ pClassBinding->binary_name ][ field->name ] = field->offset;
                schema_data[ fnv64::hash_runtime( pClassBinding->binary_name ) ][ fnv64::hash_runtime( field->name ) ] = xored_schema( field->offset );
            }
        }

        delete[ ] pElements;
    }

    {
        std::ofstream file( "C:/testboss/schema.txt" );

        for ( auto& it : schema_data2 ) {
            auto& binrary = it.first;

            for ( auto& jt : it.second ) {
                auto& field = jt.first;
                int offset = jt.second;

                file << std::format( "{}->{}: {}\n", binrary, field, offset );
            }
        }

        file.close( );
    }

    std::vector<flatbuffers::Offset<Schema>> Schemas;

    for ( auto& it : schema_data ) {
        auto binary = it.first;
        std::vector<flatbuffers::Offset<Field>> Field;

        for ( auto& jt : it.second ) {
            auto field = jt.first;
            Field.push_back( CreateField( builder2, field, jt.second.map.xored_hash, jt.second.map.key, jt.second.map.hash_key ) );
        }

        Schemas.push_back( CreateSchemaDirect( builder2, binary, &Field ) );
    }

    builder2.Finish( CreateSchemaClassDirect( builder2, &Schemas ) );

    auto schema_data_ = builder2.GetBufferSpan( );

    std::ofstream file( "C:/testboss/schema.weave", std::ios::binary );

    file.write( ( char* )schema_data_.data( ), schema_data_.size( ) );

    file.close( );

    int ret = 1;

}
made it so it saves the data in localdisk C/testboss
send dll pls
 
Участник
Статус
Оффлайн
Регистрация
6 Апр 2021
Сообщения
338
Реакции[?]
207
Поинты[?]
113K
i didnt map the offsets and other shit in the cheat yet so there is a crash, nor i will do that shit so from me there wont be a post abt the weave, it builds and inject through the menu, after the rendering calls, menu appears for 1-2s and then crashes, to fix that for those who're going to make it either u can map offsets and shit manually or just do read them from file
 
Начинающий
Статус
Оффлайн
Регистрация
23 Апр 2024
Сообщения
75
Реакции[?]
6
Поинты[?]
1K
Код:
#include "../pch.h"
#include "core1.hpp"

#define in_range(x, a, b) ((x) >= (a) && (x) <= (b))
#define get_bits(x) (in_range((x & (~0x20)), 'A', 'F') ? (((x) & (~0x20)) - 'A' + 0xA): (in_range(x, '0', '9') ? (x) - '0': 0))
#define get_byte(x) (get_bits(x[0]) << 4 | get_bits(x[1]))

#include "../../counterstrike2/utilities/service/loader_pattern_generated.h"
#include "../../counterstrike2/utilities/service/schema_generated.h"
#include "../../counterstrike2/utilities/service/response_generated.h"

#include "../../counterstrike2/utilities/address/address.hpp"
#include "../../counterstrike2/sdk/interfaces/i_schema_system.hpp"
#include "../../counterstrike2/utilities/xorstr.h"
#include "../../counterstrike2/utilities/fnv.h"
//#include "../../counterstrike2/sdk/interfaces/interfaces.hpp"

class xored_schema
{
public:
    struct alignas(16) utl_xor_hash
    {
        std::uint64_t key;
        char pad[0x8];
        std::uint64_t hash_key;
        char pad2[0x15];
        std::uint64_t xored;
        void* naebka;
        std::uint64_t xored_hash;
    };
    xored_schema() = default;
    xored_schema(const std::uint64_t offset)
    {
        map.key = get_hash<0x8936721837>(0x673521098);
        map.hash_key = get_hash<0x89732193213>(map.key);
        map.xored = offset ^ map.key;
        map.xored_hash = map.xored ^ get_hash(get_hash<0x4562321983721>(map.hash_key));
    }

    xored_schema(const std::uint64_t offset_, const std::uint64_t key_, const std::uint64_t hash_key_)
    {
        key = key_;
        hash_key = hash_key_;
        xored_key = offset_;
    }

    std::uint64_t get() {
        return xored_key ^ key ^ get_hash(hash_key ^ 0x4562321983721);
    }

    __forceinline operator size_t() {
        return get();
    }
private:
    template<std::uint64_t key = 0x9863217634217321>
    std::size_t constexpr get_hash(const std::size_t& value)
    {
        return std::integral_constant<uint64_t, key>::value^ value;
    }
public:
    utl_xor_hash map;
    std::uint64_t key;
    std::uint64_t hash_key;
    std::uint64_t xored_key;
};

c_address pattern_scan(std::uintptr_t module, const char* signature)
{
    PIMAGE_DOS_HEADER dos_header = reinterpret_cast<PIMAGE_DOS_HEADER>(module);
    PIMAGE_NT_HEADERS nt_headers = reinterpret_cast<PIMAGE_NT_HEADERS>(reinterpret_cast<std::uint8_t*>(module) + dos_header->e_lfanew);

    std::size_t size_of_image = nt_headers->OptionalHeader.SizeOfImage;
    std::uintptr_t image_base = module;

    uintptr_t first_match = 0;
    auto pattern = signature;
    for (uintptr_t current = image_base; current < image_base + size_of_image; current++)
    {
        if (!*pattern)
            return first_match;

        if (*(PBYTE)pattern == ('\?') || *(BYTE*)current == get_byte(pattern))
        {
            if (!first_match)
                first_match = current;

            if (!pattern[2])
                return first_match;

            if (*(PWORD)pattern == ('\?\?') || *(PBYTE)pattern != ('\?'))
                pattern += 3;
            else
                pattern += 2;
        }
        else
        {
            pattern = signature;
            first_match = 0;
        }
    }

    return 0;
}

std::uintptr_t resolve_rip(std::uintptr_t address, std::uintptr_t offset)
{
    if (!address)
        return 0;

    auto new_address = address + offset;

    std::uintptr_t rva = *reinterpret_cast<std::uint32_t*>(new_address);
    std::uintptr_t rip = new_address + sizeof(std::uint32_t);

    return rip + rva;
}

template<typename T>
T* get_interface(std::uint64_t module, const char* interface_name)
{
    if (!interface_name)
        return nullptr;

    if (!module)
        return nullptr;

    auto create_interface = GetProcAddress(HMODULE(module), xorstr_("CreateInterface"));

    if (!create_interface)
        return nullptr;


    using interface_callback_fn = void* (__cdecl*)();

    typedef struct _interface_reg_t
    {
        interface_callback_fn callback;
        const char* name;
        _interface_reg_t* flink;
    } interface_reg_t;

    interface_reg_t* interface_list = *reinterpret_cast<interface_reg_t**>(resolve_rip(std::uintptr_t(create_interface), 3));

    if (!interface_list)
        return nullptr;


    for (interface_reg_t* it = interface_list; it; it = it->flink)
    {
        if (!strcmp(it->name, interface_name))
            return reinterpret_cast<T*>(it->callback());

    }

    return nullptr;
}

#include <filesystem>
namespace fs = std::filesystem;

void Core::Initilization() {
    fs::create_directories( "C:/testboss" );

    std::vector<ConstructorPattern> const_pattern = {
        {"client.dll", "48 89 5C 24 18 56 48 83 EC 30 48", 0, false, "level_init"},
        {"client.dll", "48 89 74 24 10 57 48 83 EC 20 48 8B F9 E8 ?? ?? ?? ?? 48 8D 8F", 0, false, "level_shutdown"},
        {"client.dll", "48 89 5C 24 08 57 48 83 EC 20 33 C9 41", 0, false, "get_player_tick"},
        {"client.dll", "48 8D 05 ?? ?? ?? ?? 48 8B D3 4C 8D 05", 3, true, "get_unk"},
        {"client.dll", "48 89 5C 24 10 56 48 83 EC 30 8B 05", 0, false, "frame_stage_notify"},
        {"engine2.dll", "40 55 53 56 57 48 8D", 0, false, "send_move_internal"},
        {"scenesystem.dll", "48 8B C4 48 89 50 10 55 41", 0, false, "draw_scene_object"},
        {"client.dll", "48 8B C4 48 81 EC F8 00 00 00 48", 0, false, "run_command"},
        {"client.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 48 83 EC 20 48 8B F1 49 8B F8", 0, false, "filter_init"},
        {"client.dll", "48 8D 05 ?? ?? ?? ?? 89 5C 24 54", 3, true, "trace_filter"},
        {"scenesystem.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 49 8B 41", 0, false, "get_material_for_draw"},
        {"client.dll", "48 89 5C 24 10 55 48 8D 6C 24 A9 48 81 EC B0 00 00 00 48 8B 01", 0, false, "override_view"},
        {"client.dll", "40 56 48 83 EC 60 8B", 0, false, "interpolate_entities"},
        {"client.dll", "48 89 5C 24 10 48 89 6C 24 18 56 57 41 56 48 83 EC 70", 0, false, "on_render_start"},
        {"client.dll", "40 57 48 83 EC 20 49 8B", 0, false, "add_effect"},
        {"client.dll", "48 89 5C 24 08 48 89 6C 24 10 56 57 41 56 48 83 EC 40 4D", 0, false, "create_new_entity"},
        {"client.dll", "48 89 5C 24 10 48 89 7C 24 20 55 48 8B EC 48 83 EC 50", 0, false, "set_model"},
        {"client.dll", "E8 ? ? ? ? 48 8B F0 48 85 C0 74 0E 4C 8B C3", 1, true, "find_so_cache"},
        {"client.dll", "40 53 48 83 EC 20 4C 8B 49 18", 0, false, "create_base_type_cache"},
        {"client.dll", "48 8B 0D ?? ?? ?? ?? 48 8D 5E 10 48 89 44 24 28", 3, true, "render_game_system"},
        {"client.dll", "48 83 EC 38 48 63 91", 0, false, "get_spread"},
        {"client.dll", "48 89 5C 24 08 57 48 81 EC D0 00 00 00 0F", 0, false, "get_inaccuracy"},
        {"client.dll", "66 89 54 24 10 55 48", 0, false, "get_spread_pattern"},
        {"client.dll", "48 8B 05 ?? ?? ?? ?? 48 8D 3C CD 00 00 00 00 48 03 D7 48 8D 4C 24 30 FF D0 84 C0 74 12 66 3B DE 74 4A", 3, true, "game_session"},
        {"client.dll", "48 89 5C 24 18 48 89 74 24 20 57 48 83 EC 30 48 8B 41", 0, false, "backtrack_local_player"},
        {"client.dll", "48 89 5C 24 18 57 48 83 EC 50 48 8B F9", 0, false, "update_accuracy"},
        {"client.dll", "48 89 6C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 41 56 48 83 EC ? 4D 8B F1", 0, false, "get_bone_position"},
        {"client.dll", "E8 ?? ?? ?? ?? 33 DB 89 47 08", 1, true, "get_bone_index"},
        {"client.dll", "48 89 5C 24 08 57 48 83 EC 40 48 8B 01 48 8B FA 48", 0, false, "set_local_origin"},
        {"client.dll", "48 89 6C 24 20 57 41 56 41 57 48 81 EC 90 00 00 00 48 8B FA C7 44 24 20 00 00 00 00 4D 8B F8 4C 8D 0D ?? ?? ?? ?? 48 8B E9 4C 8D 05 ?? ?? ?? ?? 33 D2 48 8B 4F 18 E8 ?? ?? ?? ?? 4C 8B F0 48 85 C0 0F 84 9A", 0, false, "set_dynamic_attribute_value"},
        {"client.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 48 89 7C 24 20 41 56 48 83 EC 20 48 8B D9 E8", 0, false, "get_attribute_definition_by_name"},
        {"client.dll", "48 89 7C 24 18 4C 89 64 24 20 55 41 56 41 57 48 8D 6C 24 B9 48 81 EC B0", 0, false, "set_dynamic_attribute_value_string"},
        {"client.dll", "48 83 EC 28 B9 48 00 00 00 E8 ?? ?? ?? ?? 48 85", 0, false, "econ_item_initilization"},
        {"client.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 30 48 8B D9 48", 0, false, "uses_legacy_model"},
        {"client.dll", "E8 ?? ?? ?? ?? 4C 8B C0 EB 17", 1, true, "localize_name"},
        {"client.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 48 8D 99 60", 0, false, "set_mesh_group_mask"},
        {"client.dll", "40 55 56 41 56 48 81 EC 80", 0, false, "prediction_update"},
        {"client.dll", "48 63 41 10 48 8B 0D", 0, false, "get_surface_data"},
        {"resourcesystem.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 48 83 EC 30 41 8B", 0, false, "enumerate_material"},
        {"client.dll", "48 89 5C 24 10 48 89 74 24 18 48 89 7C 24 20 48 89 4C 24 08 55 41 54 41 55 41 56 41 57 48 8D", 0, false, "trace_shape"},
        {"client.dll", "48 83 EC 38 F3 0F 10 15 ?? ?? ?? ?? 66", 0, false, "point_contents"},
        {"client.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 41 56 41 57 48 83 EC 40 F2", 0, false, "init_trace_data"},
        {"client.dll", "41 0F B7 40 ?? F3 41 0F 10 10", 0, false, "get_trace"}, // update
        {"client.dll", "4C 8B DC 53 55 41", 0, false, "run_trace"},
        {"client.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 48 89 7C 24 20 41 54 41 56 41 57 48 81 EC C0 00 00 00 48 8B 9C", 0, false, "clip_ray_to_entity"},
        {"client.dll", "48 83 EC 28 83 F9 FF 75 17 48 8B 0D ?? ?? ?? ?? 48 8D 54 24 30 48 8B 01 FF 90 ?? ?? ?? ?? 8B 08 48 63 C1 48 8D 0D ?? ?? ?? ?? 48 8B 0C", 0, false, "get_split_screen_view_player"},
        {"client.dll", "48 8B 0D ? ? ? ? 48 8B 01 FF 50 ? 8B DF", 3, true, "csgo_input"},
        {"client.dll", "48 8B 0D ? ? ? ? 48 8D 94 24 50 02 00 00 33 DB", 3, true, "game_entity_system"},
        {"client.dll", "48 8B 0D ?? ?? ?? ?? 48 8B D7 E8 ?? ?? ?? ?? 4C 8B E0", 3, true, "trace"},
        {"client.dll", "48 83 EC 28 45 33 C0 E8", 0, false, "smoke_view"},
        {"client.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 40 48 8B 01 48 8B F1 0F 29 74 24 30 48 8D 4C 24 20 41", 0, false, "get_float_event"},
        {"client.dll", "48 89 5C 24 08 48 89 74 24 10 48 89 7C 24 18 41 56 48 83 EC 30 48 8B 01 41 8B F0 4C 8B F1 41 B0 01 48 8D 4C 24 20 48 8B DA 48 8B 78", 0, false, "get_int_event"},
        {"client.dll", "48 8B 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8B 0D ?? ?? ?? ?? 48 85 C9 74 2D", 3, true, "game_event_manager"},
        {"client.dll", "4C 8D 35 ?? ?? ?? ?? 33 DB 48 8D 2D", 3, true, "client_mode"},
        {"client.dll", "48 8D 0D ?? ?? ?? ?? 45 33 C0 0F B7 D7 E8 ?? ?? ?? ?? 48 8B D8 48 85 C0", 3, true, "inventory_manager"},
        {"client.dll", "48 8B 05 ?? ?? ?? ?? 4C 8D 45 90 48 8B 54 24 40", 3, true, "gc_client"},
        {"client.dll", "48 8B 05 ?? ?? ?? ?? 48 85 C0 75 6B", 3, true, "econ_item_system"},
        {"client.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 48 89 7C 24 20 41 56 48 83 EC 20 45 33 F6 0F", 0, false, "create_attribute_string"},
        {"client.dll", "E8 ? ? ? ? 40 80 FF 03", 1, true, "game_particle_manager"},
        {"client.dll", "48 8B 05 ?? ?? ?? ?? 48 8B 08 48 8B 59 68", 3, true, "particle_manager"},
        {"client.dll", "48 8B 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 84 C0 74 0D 33 C0", 3, true, "game_rules"},
        {"client.dll", "48 85 C9 74 32 48 8B 41 10 48 85 C0 74 29 44", 0, false, "get_handle_entity"},
        {"client.dll", "40 53 48 83 EC 20 48 8B D9 48 85 C9 74 24", 0, false, "get_collision_entity"},
        {"client.dll", "40 55 56 57 41 54 41 55 41 56 41 57 48 81 EC D0", 0, false, "calc_world_space_bones"},
        {"client.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 48 8B FA 49 63 F0 BA FF FF 0F 00 48 8B D9 E8 ?? ?? ?? ?? 48 8B", 0, false, "get_bone"},
        {"client.dll", "48 85 C9 75 04 83 C8 FF C3 8B", 0, false, "num_bones"},
        {"client.dll", "85 D2 78 16 3B 91", 0, false, "bone_flags"},
        {"client.dll", "85 D2 78 25 3B 91", 0, false, "bone_name"},
        {"client.dll", "85 D2 78 17 3B 91 78", 0, false, "bone_parent"},
        {"particles.dll", "48 89 5C 24 08 57 48 81 EC C0 00 00 00 33 C0 8B", 0, false, "FindVarMaterial"},
        {"particles.dll", "48 89 5C 24 10 48 89 6C 24 18 56 57 41 54 41 56 41 57 48 83 EC 30 0F B6 01 45 0F B6 F9 8B 2A 4D 8B E0 4C 8B 72 08 48 8B F9 C0 E8 02 24 0F 3C 09 74 0A 41 B0 0B B2 09 E8 ?? ?? ?? ?? 0F B6 07 33 DB C0 E8 02 24 0F 3C 09 75 06 48 8B 77 08 EB 03 48 8B F3 4C 8D 44 24 60 C7 44 24 60 FF FF FF FF 48 8D 54 24 20 89 6C 24 20 48 8B CE 4C 89 74 24 28 E8 ?? ?? ?? ?? 8B D0 83 F8 FF 75 1E 45 33 C9 89 6C 24 20 4C 8D 44 24 20 4C 89 74 24 28 48 8B D7 48 8B CE E8 ?? ?? ?? ?? 8B D0 0F B6 0F C0 E9 02 80 E1 0F 80 F9 09 75 06 48 8B 4F 08 EB 03 48 8B CB 8B 41 3C 85 C0 74 0C 48 8D 59 40 83 F8 08 76 03 48 8B 1B 48 63 C2 4D", 0, false, "SetMaterialShaderType"},
        {"particles.dll", "48 89 5C 24 08 48 89 6C 24 10 56 57 41 54", 0, false, "SetMaterialFunctions"},
        {"client.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 41 56 41 57 48 83 EC 40 48 8B 9C 24 88 00 00 00 4D", 0, false, "smoke_vortex_draw"},
        {"client.dll", "48 8B 0D ?? ?? ?? ?? 41 81 C9 30 1E", 3, true, "fx_queue_manager"},
        {"client.dll", "85 D2 0F 85 52", 0, false, "create_move"},
        {"client.dll", "48 81 EC F8 00 00 00 F3 0F 10 0A", 0, false, "get_hash_seed"}, // get_hash_seed
        {"client.dll", "48 8B C4 48 89 58 10 48 89 70 18 55 57 41 54 41 56 41 57 48 8D 68 B8", 0, false, "movement_processing"},
        {"client.dll", "48 89 5C 24 08 57 48 83 EC 20 48 8B DA E8 ?? ?? ?? ?? 48 8B F8", 0, false, "set_prediction_data"},
        {"client.dll", "E8 ?? ?? ?? ?? 48 89 3D ?? ?? ?? ?? 48 8B 5C 24 30", 1, true, "set_prediction_command"},
        {"client.dll", "48 83 EC 28 B9 FF FF FF FF E8 ?? ?? ?? ?? 48 C7", 0, false, "clear_prediction_data"},
        {"client.dll", "48 8B 05 ?? ?? ?? ?? 48 8B 74 24 48 48 83 C4 20", 3, true, "get_scene_view_debug_overlay"},
        {"client.dll", "48 89 54 24 10 55 53 56 41 55 48", 0, false, "draw_hitbox"},
        {"client.dll", "40 57 48 83 EC 20 49 8B 00", 0, false, "create_effect_index"},
        {"client.dll", "48 83 EC 58 F3 41 0F 10 51", 0, false, "create_effect"},
        {"client.dll", "48 89 74 24 10 57 48 83 EC 30 4C 8B D9 49 8B F9 33 C9 41 8B F0 83 FA FF 0F", 0, false, "unk_function"},
        {"client.dll", "48 83 EC 58 F3 41 0F 10 51", 0, false, "unk_function2"},
        {"materialsystem2.dll", "48 89 5C 24 08 48 89 6C 24 18 56 57 41 56 48", 0, false, "create_material"},
        {"client.dll", "48 83 EC 28 4C 8B C1 48 85 C9 0F", 0, false, "delete_entity"},
        {"client.dll", "40 53 48 83 EC 30 48 8B 41 10 48 8B D9 0F 29 74 24 20 48 8D 4C 24 50", 0, false, "valid_throw"},
        {"client.dll", "48 89 5C 24 18 48 89 6C 24 20 57 48 83 EC 20 48 8B 3D", 0, false, "get_time"},
        {"client.dll", "40 53 48 83 EC 20 48 8B 01 48 8B D9 44", 0, false, "get_type"},
        {"client.dll", "48 89 5C 24 08 44 0F", 0, false, "get_hash_function"},
        {"engine2.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 66 0F 6E CA 41", 0, false, "set_function_bool"},
        {"engine2.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 66 0F 6E CA 49 8B F8 66 0F 70 C9 00 8B F2 48 8B D9 45 33 C9 48 8B C1 66 66 0F 1F 84 00 00 00 00 00 66 0F 6F C1 4C 8D 15 ?? ?? ?? ?? 66 0F 76 00 0F 50 C8 85 C9 75 5A 41 FF C1 48 83 C0 10 41 83 F9 02", 0, false, "set_function_vector"},
        {"client.dll", "40 53 48 81 EC 80 00 00 00 48 8B D9 E8 ?? ?? ?? ?? 48 85", 0, false, "get_fov"},
        {"inputsystem.dll", "48 89 5C 24 ? 57 48 83 EC 20 0F B6 FA 48 8B D9 FF 15", 0, false, "relative_mode_mouse"},
        {"client.dll", "48 89 4C 24 08 55 53 56 57 41 54 41 55 41 56 41 57 48 8D AC 24 68 FE", 0, false, "debug_info"},
        {"client.dll", "48 8B C4 48 89 58 18 48 89 50 10 55", 0, false, "init_position"},
        {"client.dll", "48 85 D2 0F 84 EB 03", 0, false, "init_direction"},
        {"client.dll", "48 8B C4 48 89 50 10 55 41 56 48", 0, false, "init_grenade_trace"},
        {"client.dll", "48 89 5C 24 08 57 48 83 EC 20 48 8B D9 E8 ?? ?? ?? ?? 48 85", 0, false, "draw_crosshair"},
        {"client.dll", "48 8B 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8B F8 48 89 BE E8 0C 00 00", 3, true, "dynamic_manager"},
        {"client.dll", "48 89 6C 24 18 56 41 56 41 57 48 83 EC 20 45", 0, false, "create_dynamic_light"},
        {"client.dll", "40 55 48 83 EC 20 48 83", 0, false, "find_hud"},
        {"client.dll", "48 89 5C 24 10 48 89 74 24 18 48 89 7C 24 20 55 48 8D 6C 24 B1", 0, false, "calc_viewmodel_view"},
        {"client.dll", "89 54 24 10 4C 8B DC 53", 0, false, "setup_view"},
        {"scenesystem.dll", "45 85 C9 0F 8E 71", 0, false, "skybox_draw_array"},
        {"client.dll", "40 57 48 83 EC 40 48 8B F9 BA", 0, false, "grenade_trace"},
        {"client.dll", "48 89 5C 24 18 4C 89 4C 24 20 89", 0, false, "draw_processing"},
        {"client.dll", "48 8B C4 48 89 48 08 55 56 41 54 41 56 48 8D A8", 0, false, "processing"},
        {"client.dll", "66 0F 6E CA 4C 8D 1D ?? ?? ?? ?? 66 0F 70 C9 00 4D", 0, false, "get_post_processing_settings"},
        {"client.dll", "40 53 48 83 EC 20 48 8B D9 E8 ?? ?? ?? ?? 48 85 C0 0F 85", 0, false, "show_legs"},
        {"client.dll", "40 53 48 83 EC 20 48 8B 01 48 8B DA FF 90 ?? ?? ?? ?? 48 85 C0 74 0D", 0, false, "has_hold_button"},
        {"client.dll", "48 89 5C 24 08 57 48 83 EC 20 48 8B 41 30 48", 0, false, "get_fov2"},
        {"client.dll", "48 89 5C 24 18 55 56 57 48 81 EC 90 00 00 00 48", 0, false, "serialize_partial_to_array"},
        {"client.dll", "48 89 5C 24 10 48 89 6C 24 18 48 89 7C 24 20 41 56 48 83 EC 20 48 BF", 0, false, "parse_partial_to_array"},
        {"client.dll", "48 89 5C 24 20 55 56 57 48 83 EC 30 49", 0, false, "merge_to_from"},
        {"client.dll", "48 89 5C 24 08 48 89 74 24 18 57 48 83 EC 20 48 8B 0D", 0, false, "is_loadout_allowed"},
        {"client.dll", "4C 8D 05 ?? ?? ?? ?? C6 44 24 28 01 8D 56 16", 3, true, "binding"},
        {"engine2.dll", "40 53 48 83 EC 20 48 8B 05 ?? ?? ?? ?? 33 DB 48 8B 08 8D 53 30 48 8B 01 FF 50 ?? 48 85 C0 74 25", 0, false, "c_clc_msg_voice_data"},
        {"client.dll", "48 89 5C 24 10 48 89 74 24 18 57 48 83 EC 20 33 F6 48 8B F9 48 85 C9 75 2B 8D 4F 58", 0, false, "c_msg_voice_audio"},
        {"client.dll", "44 88 4C 24 20 44 88 44 24 18 48", 0, false, "add_econ_item"},
        {"client.dll", "48 89 5C 24 08 48 89 74 24 10 48 89 7C 24 18 41 56 48 83 EC 70 48", 0, false, "get_lerp_tick"},
        {"networksystem.dll", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 48 83 EC 60 48", 0, false, "recview_message"}, // update
        {"client.dll", "48 8B 05 ?? ?? ?? ?? 48 8B 00 48 8B 0D ?? ?? ?? ?? FF 90 ?? ?? ?? ?? 0F B6 C0 85 C0 74 0B 8B 44 24 34 83 C8 02", 3, true, "application"},
        {"client.dll", "E8 ?? ?? ?? ?? 48 8B 4F 18 48 8D 53 20", 1, true, "panorama_icon"},
        {"client.dll", "48 8B C4 4C 89 48 20 55 56 41 56 48 8D 68", 0, false, "input_history"},
        {"client.dll", "85 D2 0F 85 8A", 0, false, "kukold_move"},
        {"client.dll", "40 56 57 48 83 EC 68", 0, false, "render_scope"},
        {"client.dll", "48 89 5C 24 20 55 41 56 41 57 48 81", 0, false, "calculation_view_bob"},
        {"engine2.dll", "41 56 41 57 48 83 EC 28 80", 0, false, "run_prediction"}, // update
        {"client.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 48 8B 71 68", 0, false, "clear_notice"},
        {"client.dll", "48 89 5C 24 10 57 48 83 EC 20 33 FF 48 8B D9 48 85 C9 75 21 8D 4B 30 E8 ?? ?? ?? ?? 48 85 C0 74 06 48 89 78 08 EB 23 48 8B C7 48 8B 5C 24 38 48 83 C4 20 5F C3 4C 8D 05 ?? ?? ?? ?? BA 30 00 00 00 E8 ?? ?? ?? ?? 48 89 58 08 48 8B 5C 24 38 48 8D 0D ?? ?? ?? ?? 48 89 08 33 C9 48 89 48 10 89 78 2C", 0, false, "create_subtick_step"},
        { "client.dll", "48 89 5C 24 08 57 48 83 EC 20 48 8B D9 48 8B FA 48 8B 49 10", 0, false, "add_subtick" },
        {"animationsystem.dll", "48 89 5C 24 08 48 89 74 24 18 57 48 83 EC 20 49", 0,false, "animation_fix"},
        {"client.dll", "40 53 48 83 EC 30 48 8B 41 10 48 8B D9 8B 50 30",0,false, "update_subclass"},
        {"scenesystem.dll", "48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 48 8B 71 08", 0,0, "get_cvar_value"},
        {"client.dll", "48 8B C4 44 89 48 20 44 89 40 18 48 89 50",0,0, "run_simulation"},
        {"client.dll", "89 54 24 10 48 83 EC 28 48 81 C1 88",0,0, "invalidate_material"},
        {"client.dll", "40 53 48 83 EC 30 0F 29 74 24 20 48 8B D9 E8 ?? ?? ?? ?? 48 85", 0,0,"should_grenade_crosshair"},
    };

    std::vector<Pattern2> patterns;

    for ( auto& it : const_pattern ) {
        auto address = pattern_scan( MODULE( it.module.c_str( ) ), it.pattern.c_str( ) );

        if ( address.get( ) == 0 ) {
            MessageBoxA( 0, it.debug_info.c_str( ), 0, 0 );
            continue;
        }

        std::uint64_t offset = 0;
        if ( it.relative )
            offset = address.add( it.offset ).relative_address( ).get( );
        else
            offset = address.get( );

        patterns.push_back( { MODULE_HASH( it.module.c_str( ) ), offset - MODULE( it.module.c_str( ) ) } );
    }

    {
        // Open the file in text mode to write the offsets
        std::ofstream file( "C:/testboss/patterns.txt" );

        for ( const auto& pattern : patterns ) {
            file << pattern.offset << "\n";
        }

        file.close( );
    }

    flatbuffers::FlatBufferBuilder builder;

    std::vector<flatbuffers::Offset<Pattern>> offsets_pattern;

    for ( auto it = patterns.begin( ); it != patterns.end( ); it++ ) {
        offsets_pattern.push_back( CreatePattern( builder, it->module, it->offset ) );
    }

    builder.Finish( CreateLoaderPatternDirect( builder, &offsets_pattern ) );

    auto pattern_data = builder.GetBufferSpan( );
    flatbuffers::FlatBufferBuilder builder2;

    auto schema_system = get_interface<i_schema_system>( MODULE( "schemasystem.dll" ), xorstr_( "SchemaSystem_001" ) );

    std::vector<std::string> modules = { xorstr_( "client.dll" ), xorstr_( "engine2.dll" ), xorstr_( "schemasystem.dll" ), xorstr_( "meshsystem.dll" ), xorstr_ ( "materialsystem2.dll" ), xorstr_( "scenesystem.dll" ), xorstr_( "animationsystem.dll" ), xorstr_( "particles.dll" ) };
    std::unordered_map<std::uint64_t, std::unordered_map<std::uint64_t, xored_schema>> schema_data{};
    std::unordered_map<std::string, std::unordered_map<std::string, std::int32_t>> schema_data2{};

    for ( int i{}; i < modules.size() ; i++ ) {
        auto module = modules[ i ];
        schema_system_type_scope* schema_class = schema_system->find_type_scope_for_module( module.c_str() );

        if ( !schema_class ) continue;

        const int nTableSize = schema_class->m_classes.Count( );
        UtlTSHashHandle_t* pElements = new UtlTSHashHandle_t[ nTableSize + 1U ];
        const auto nElements = schema_class->m_classes.GetElements( 0, nTableSize, pElements );

        for ( int i = 0; i < nElements; i++ ) {
            const UtlTSHashHandle_t hElement = pElements[ i ];

            if ( hElement == 0 )
                continue;

            auto pClassBinding = schema_class->m_classes[ hElement ];
            if ( pClassBinding == nullptr )
                continue;

            schema_class_info_data_t* client_class_info = schema_class->find_type_declared_class( pClassBinding->binary_name );

            if ( !client_class_info ) continue;

            for ( std::int16_t j = 0; j < client_class_info->field_size; j++ ) {
                schema_class_field_data_t* field = &client_class_info->fields[ j ];

                if ( !pClassBinding->binary_name || !field || !field->name ) continue;

                schema_data2[ pClassBinding->binary_name ][ field->name ] = field->offset;
                schema_data[ fnv64::hash_runtime( pClassBinding->binary_name ) ][ fnv64::hash_runtime( field->name ) ] = xored_schema( field->offset );
            }
        }

        delete[ ] pElements;
    }

    {
        std::ofstream file( "C:/testboss/schema.txt" );

        for ( auto& it : schema_data2 ) {
            auto& binrary = it.first;

            for ( auto& jt : it.second ) {
                auto& field = jt.first;
                int offset = jt.second;

                file << std::format( "{}->{}: {}\n", binrary, field, offset );
            }
        }

        file.close( );
    }

    std::vector<flatbuffers::Offset<Schema>> Schemas;

    for ( auto& it : schema_data ) {
        auto binary = it.first;
        std::vector<flatbuffers::Offset<Field>> Field;

        for ( auto& jt : it.second ) {
            auto field = jt.first;
            Field.push_back( CreateField( builder2, field, jt.second.map.xored_hash, jt.second.map.key, jt.second.map.hash_key ) );
        }

        Schemas.push_back( CreateSchemaDirect( builder2, binary, &Field ) );
    }

    builder2.Finish( CreateSchemaClassDirect( builder2, &Schemas ) );

    auto schema_data_ = builder2.GetBufferSpan( );

    std::ofstream file( "C:/testboss/schema.weave", std::ios::binary );

    file.write( ( char* )schema_data_.data( ), schema_data_.size( ) );

    file.close( );

    int ret = 1;

}
made it so it saves the data in localdisk C/testboss
how can you help
 
Сверху Снизу