// @ OwDumper By NormnPlayer
// 2026-06-06 23:15:23

#pragma once

namespace OwDumper
{
    namespace Base
    {
        constexpr uint64_t Entity = 0x3935908;
        constexpr uint64_t FOV = 0x4037628;
        constexpr uint64_t Components = 0x5A55B0;
        constexpr uint64_t Outline = 0x56E4B1;
        constexpr uint64_t Alter_outline = 0x56E42A;
        constexpr uint64_t Visibility = 0x7451A1;
    }

    namespace Offsets
    {
        constexpr uint32_t ViewAngle = 0x1260;
        constexpr uint32_t Sensitivity = 0x2238;
        constexpr uint32_t SkillCheckCount = 0x2A8;
        constexpr uint32_t SkillCheckArray = 0x2A0;
    }

    namespace Decryption
    {
        inline uint64_t GetViewmatrix()
        {
            uint64_t var_qword = Read<uint64_t>(ModuleBase + 0x38DC230);
            uint64_t EncViewMatrix = *(*(((var_qword + 0x37316FB2858F0E4AULL) ^ 0xB6326CCBCA7E34F4uULL) + 0x20) + 0x0);
            return EncViewMatrix;
        }

        inline uintptr_t GetSingleton(uint8_t index)
        {
            return Read<uintptr_t>(__ROR8__(((Read<uintptr_t>(ModuleBase + 0x3A98CF0 + 0x160) ^ 0x41D346232DA856D8ULL) - 0x53B5A9FA87525DFCULL), 0x3B) + 0x57374166C207BE12ULL + 0x8ULL * index);
        }

        // Outline
        // 0x56E418 mov rax, 0x1F21DE5151741226
        // 0x56E422 sub rdx, rax
        // 0x56E425 mov rax, [qword_3A92E70]
        // 0x56E42C xor rdx, [rax+0x97]
        // 0x56E4A4 mov rcx, 0x2240EA534C11100D
        // 0x56E4AE add rax, rcx
        // 0x56E4B1 movzx ecx, [byte_377E6E4]
        // 0x56E4B8 xor rax, rcx
        // 0x56E4BB mov rcx, 0xEF781B6466FAB59B
        // 0x56E4C5 xor rax, rcx
        // 0x56E4C8 ror rax, 0x17
        // 0x56E4E0 movzx eax, [byte_3A9355B]

        // Alter outline
        // 0x56E390 movzx eax, [byte_3A93559]
        // 0x56E3A8 mov rcx, 0x3A7D48F98701DF53
        // 0x56E3B2 add rax, rcx
        // 0x56E3B5 mov rcx, 0xA0CC9EB06D3118CD
        // 0x56E3BF xor rax, rcx
        // 0x56E3C2 mov rcx, 0x2AF9257775C5D0FF
        // 0x56E3CC ror rax, 0x11
        // 0x56E3D0 add rcx, rax
        // 0x56E3D3 ror rcx, 0x22
        // 0x56E418 mov rax, 0x1F21DE5151741226
        // 0x56E422 sub rdx, rax
        // 0x56E425 mov rax, [qword_3A92E70]
        // 0x56E42C xor rdx, [rax+0x97]

        // Visibility
        // ((*([qword_3A92E70+0xB2]) ^ (uint64_t)byte_377E893 ^ __ROR8__((0xDF18509046BC9E1Eui64 + input), 0x37)) ^ input)

    }
}
