Загрузка...

Кто сможет чекнуть?

Тема в разделе C/C++ создана пользователем dsadnbcxzncxz 12 апр 2022. 555 просмотров

  1. dsadnbcxzncxz
    dsadnbcxzncxz Автор темы 12 апр 2022 не беспокоить кроме секса 38 3 сен 2021
    есть ли в этом коде вредноносный код?

    C
    #include <iostream>
    #include "GL/glew.h"
    #include "imgui/imgui.h"
    #include "imgui/imgui_impl_glfw.h"
    #include "imgui/imgui_impl_opengl3.h"
    #include <GLFW/glfw3.h>
    #define GLFW_EXPOSE_NATIVE_WIN32
    #include <GLFW/glfw3native.h>
    #include <Windows.h>
    #include <TlHelp32.h>
    #include <vector>
    #include "offsets.h"
    #include "vector3.h"
    #include "defs.h"
    #include <tchar.h>
    #include <intrin.h>
    #include "auth.hpp"
    #include "comm.h"
    #include "xorstr.hpp"
    #include <ProcessSnapshot.h>
    #include "xor.hpp"
    #include <Windows.h>
    #include "fontSF.h.bak"
    #include <iostream>
    #include <fstream>
    #include <cstdint>
    #include <filesystem>

    uintptr_t unique_id;
    std::string tm_to_readable_time(tm ctx);
    static std::time_t string_to_timet(std::string timestamp);
    static std::tm timet_to_tm(time_t timestamp);

    using namespace KeyAuth;

    std::string name = "Emre"; // application name. right above the blurred text aka the secret on the licenses tab among other tabs
    std::string ownerid = "e1HCo5FQWL"; // ownerid, found in account settings. click your profile picture on top right of dashboard and then account settings.
    std::string secret = "e6b0156fab99d029b26b329b4a4f8996540a0dd62199bc19879e62e3b312cb52"; // app secret, the blurred text on licenses tab and other tabs
    std::string version = "1.0"; // leave alone unless you've changed version on website
    std::string url = "https://keyauth.win/api/1.1/"; // change if you're self-hosting
    std::string sslPin = "ssl pin key (optional)"; // don't change unless you intend to pin public certificate key. you can get here in the "Pin SHA256" field https://www.ssllabs.com/ssltest/analyze.html?d=keyauth.win&latest. If you do this you need to be aware of when SSL key expires so you can update i

    api KeyAuthApp(name, ownerid, secret, version, url, sslPin);

    struct State {
    uintptr_t keys[7];
    };
    UINT profetrol;
    typedef struct {
    uintptr_t actor_ptr;
    uintptr_t damage_handler_ptr;
    uintptr_t player_state_ptr;
    uintptr_t root_component_ptr;
    uintptr_t mesh_ptr;
    uintptr_t bone_array_ptr;
    int bone_count;
    bool is_visible;
    } Enemy;

    // Window / Process values
    HWND valorant_window;
    GLFWwindow* g_window;
    int g_width;
    int g_height;
    int g_pid;
    uintptr_t g_base_address;
    ImU32 g_esp_color = ImGui::ColorConvertFloat4ToU32(ImVec4(0, 136, 255, 200));
    ImU32 g_color_white = ImGui::ColorConvertFloat4ToU32(ImVec4(255, 0, 255, 200));

    // Cheat toggle values
    bool g_overlay_visible{ false };
    bool g_esp_enabled{ true };
    bool g_esp_dormantcheck{ false };
    bool g_aimbot{ false };
    bool g_aimbottest{ false };

    bool g_lines{ false };
    bool g_health{ false };
    bool g_distanceesp{ false };
    bool g_headesp{ true };
    bool g_boneesp{ true };
    bool g_agentname{ false };
    bool g_boxesp{ true };
    bool test1{ false };
    bool test2{ false };
    bool test3{ false };
    bool test4{ false };
    ImVec2 head_at_screen;
    ImVec2 boted_vex_screen;
    Vector3 camera_position;
    Vector3 camera_rotation;
    // Pointers
    uintptr_t local_player_pawn;
    uintptr_t g_local_player_controller;
    uintptr_t g_local_player_pawn;
    uintptr_t g_local_damage_handler;
    uintptr_t g_camera_manager;
    int g_local_team_id;

    // Enemy list
    std::vector<Enemy> enemy_collection{};


    int Depth;

    static int bonepos = 1;
    static const char* bones[]
    {
    "Head",
    "Neck",
    "Chest",
    "Pelvis",
    "Stomach",
    "Random"
    };
    static int bonekey;


    static int aimkeypos = 2;
    static const char* aimkeys[]
    {
    "Left Mouse Button",
    "Right Mouse Button",
    "Middle Mouse Button",
    "Mouse Side 1",
    "Mouse Side 2",
    "Control-Break Processing",
    "Backspace",
    "Tab",
    "Clear",
    "Enter",
    "SHIFT",
    "CTRL",
    "ALT",
    "Caps Lock",
    "Esc",
    "Space",
    "0",
    "1",
    "2",
    "3",
    "4",
    "5",
    "6",
    "7",
    "8",
    "9",
    "A",
    "B",
    "C",
    "D",
    "E",
    "F",
    "G",
    "H",
    "I",
    "J",
    "K",
    "L",
    "M",
    "N",
    "O",
    "P",
    "Q",
    "R",
    "S",
    "T",
    "U",
    "V",
    "W",
    "X",
    "Y",
    "Z",
    "Numpad 0",
    "Numpad 1",
    "Numpad 2",
    "Numpad 3",
    "Numpad 4",
    "Numpad 5",
    "Numpad 6",
    "Numpad 7",
    "Numpad 8",
    "Numpad 9",
    "Multiply"
    };
    static int aimkey;

    /*std::uintptr_t find_signature(const char* sig, const char* mask)
    {
    auto buffer = std::make_unique<std::array<std::uint8_t, 0x100000>>();
    auto data = buffer.get()->data();

    for (std::uintptr_t i = 0u; i < (2u << 25u); ++i)
    {
    driver->ReadProcessMemory(g_base_address + i * 0x100000, data, 0x100000);

    if (!data)
    return 0;

    for (std::uintptr_t j = 0; j < 0x100000u; ++j)
    {
    if ([](std::uint8_t const* data, std::uint8_t const* sig, char const* mask)
    {
    for (; *mask; ++mask, ++data, ++sig)
    {
    if (*mask == 'x' && *data != *sig) return false;
    }
    return (*mask) == 0;
    }(data + j, (std::uint8_t*)sig, mask))
    {
    std::uintptr_t result = g_base_address + i * 0x100000 + j;
    std::uint32_t rel = 0;

    driver->ReadProcessMemory(result + 3, &rel, sizeof(std::uint32_t));

    if (!rel)
    return 0;

    return result + rel + 7;
    }
    }
    }

    return 0;
    }*/

    void AimLock(Vector3 Target) {
    Vector3 ControlRotation = read<Vector3>(g_local_player_controller + offsets::control_rotation);
    Vector3 Delta = Vector3((camera_position.x - Target.x), (camera_position.y - Target.y), (camera_position.z - Target.z));
    float hyp = sqrtf(Delta.x * Delta.x + Delta.y * Delta.y + Delta.z * Delta.z);

    Vector3 Rotation{};
    Rotation.x = acosf(Delta.z / hyp) * (float)(RadianToURotation);
    Rotation.y = atanf(Delta.y / Delta.x) * (float)(RadianToURotation);
    Rotation.z = 0;

    Rotation.x += 270.f;
    if (Rotation.x > 360.f) {
    Rotation.x -= 360.f;
    }
    if (Delta.x >= 0.0f) {
    Rotation.y += 180.0f;
    }
    if (Rotation.y < 0.f) {
    Rotation.y += 360.f;
    }

    boted_vex_screen.x = Rotation.x;
    boted_vex_screen.y = Rotation.y;

    }


    inline Vector3 SmoothAim(Vector3 Camera_rotation, Vector3 Target, float SmoothFactor)
    {
    Vector3 diff = Target - Camera_rotation;
    diff.normalize();
    return Camera_rotation + diff / SmoothFactor;
    }


    void RCS(float SmoothFactor) {
    Vector3 DeltaRotation = Vector3(0, 0, 0);
    Vector3 ConvertRotation = Vector3(0, 0, 0);
    Vector3 ControlRotation = read<Vector3>(g_local_player_controller + offsets::control_rotation);

    // Camera 2 Control space
    if (camera_rotation.x < 0.f) {
    ConvertRotation.x = 360.f + camera_rotation.x;
    }
    else {
    ConvertRotation.x = camera_rotation.x;
    }
    if (camera_rotation.y < 0.f) {
    ConvertRotation.y = 360.f + camera_rotation.y;
    }
    else {
    ConvertRotation.y = camera_rotation.y;
    }

    // Calculate recoil/aimpunch
    DeltaRotation.x = ConvertRotation.x - ControlRotation.x;
    DeltaRotation.y = ConvertRotation.y - ControlRotation.y;
    // (-360, 360)
    DeltaRotation.x = fmodf(DeltaRotation.x, 360.f);
    DeltaRotation.y = fmodf(DeltaRotation.y, 360.f);


    // Remove 2x aimpunch from CameraRotationD
    ConvertRotation.x = boted_vex_screen.x - DeltaRotation.x - DeltaRotation.x;
    ConvertRotation.y = boted_vex_screen.y - DeltaRotation.y - DeltaRotation.y;
    // (-360, 360)
    ConvertRotation.x = fmodf(ConvertRotation.x, 360.f);
    ConvertRotation.y = fmodf(ConvertRotation.y, 360.f);
    // [0, 360)
    if (ConvertRotation.x < 0.f) {
    ConvertRotation.x = 360.f + ConvertRotation.x;
    }
    if (ConvertRotation.y < 0.f) {
    ConvertRotation.y = 360.f + ConvertRotation.y;
    }





    if (local_player_pawn != 0) {
    write<Vector3>(g_local_player_controller + offsets::control_rotation, ConvertRotation);
    }

    }


    inline void gg(Vector3 Target, Vector3 Camera_rotation, float SmoothFactor) {
    // Camera 2 Control space
    Vector3 ConvertRotation = Camera_rotation;
    ConvertRotation.normalize();

    // Calculate recoil/aimpunch
    auto ControlRotation = read<Vector3>(g_local_player_controller + offsets::control_rotation);
    Vector3 DeltaRotation = ConvertRotation - ControlRotation;
    DeltaRotation.normalize();

    // Remove aimpunch from CameraRotation
    ConvertRotation = Target - (DeltaRotation * SmoothFactor);
    ConvertRotation.normalize();

    //Smooth the whole thing
    Vector3 Smoothed = SmoothAim(Camera_rotation, ConvertRotation, SmoothFactor);
    Smoothed -= (DeltaRotation / SmoothFactor);

    write(g_local_player_controller + offsets::control_rotation, Smoothed);
    }


    typedef struct
    {
    DWORD R;
    DWORD G;
    DWORD B;
    DWORD A;
    }RGBA;

    class Color
    {
    public:
    RGBA red = { 255,0,0,255 };
    RGBA Magenta = { 255,0,255,255 };
    RGBA yellow = { 255,255,0,255 };
    RGBA grayblue = { 128,128,255,255 };
    RGBA green = { 128,224,0,255 };
    RGBA darkgreen = { 0,224,128,255 };
    RGBA brown = { 192,96,0,255 };
    RGBA pink = { 255,168,255,255 };
    RGBA DarkYellow = { 216,216,0,255 };
    RGBA SilverWhite = { 236,236,236,255 };
    RGBA purple = { 144,0,255,255 };
    RGBA Navy = { 88,48,224,255 };
    RGBA skyblue = { 0,136,255,255 };
    RGBA graygreen = { 128,160,128,255 };
    RGBA blue = { 0,96,192,255 };
    RGBA orange = { 255,128,0,255 };
    RGBA peachred = { 255,80,128,255 };
    RGBA reds = { 255,128,192,255 };
    RGBA darkgray = { 96,96,96,255 };
    RGBA Navys = { 0,0,128,255 };
    RGBA darkgreens = { 0,128,0,255 };
    RGBA darkblue = { 0,128,128,255 };
    RGBA redbrown = { 128,0,0,255 };
    RGBA purplered = { 128,0,128,255 };
    RGBA greens = { 0,255,0,255 };
    RGBA envy = { 0,255,255,255 };
    RGBA black = { 0,0,0,255 };
    RGBA gray = { 128,128,128,255 };
    RGBA white = { 255,255,255,255 };
    RGBA blues = { 30,144,255,255 };
    RGBA lightblue = { 135,206,250,160 };
    RGBA Scarlet = { 220, 20, 60, 160 };
    RGBA white_ = { 255,255,255,200 };
    RGBA gray_ = { 128,128,128,200 };
    RGBA black_ = { 0,0,0,200 };
    RGBA red_ = { 255,0,0,200 };
    RGBA Magenta_ = { 255,0,255,200 };
    RGBA yellow_ = { 255,255,0,200 };
    RGBA grayblue_ = { 128,128,255,200 };
    RGBA green_ = { 128,224,0,200 };
    RGBA darkgreen_ = { 0,224,128,200 };
    RGBA brown_ = { 192,96,0,200 };
    RGBA pink_ = { 255,168,255,200 };
    RGBA darkyellow_ = { 216,216,0,200 };
    RGBA silverwhite_ = { 236,236,236,200 };
    RGBA purple_ = { 144,0,255,200 };
    RGBA Blue_ = { 88,48,224,200 };
    RGBA skyblue_ = { 0,136,255,200 };
    RGBA graygreen_ = { 128,160,128,200 };
    RGBA blue_ = { 0,96,192,200 };
    RGBA orange_ = { 255,128,0,200 };
    RGBA pinks_ = { 255,80,128,200 };
    RGBA Fuhong_ = { 255,128,192,200 };
    RGBA darkgray_ = { 96,96,96,200 };
    RGBA Navy_ = { 0,0,128,200 };
    RGBA darkgreens_ = { 0,128,0,200 };
    RGBA darkblue_ = { 0,128,128,200 };
    RGBA redbrown_ = { 128,0,0,200 };
    RGBA purplered_ = { 128,0,128,200 };
    RGBA greens_ = { 0,255,0,200 };
    RGBA envy_ = { 0,255,255,200 };

    RGBA glassblack = { 0, 0, 0, 160 };
    RGBA GlassBlue = { 65,105,225,80 };
    RGBA glassyellow = { 255,255,0,160 };
    RGBA glass = { 200,200,200,60 };


    RGBA Plum = { 221,160,221,160 };

    };
    Color Col;

    ImU32 green = ImGui::ColorConvertFloat4ToU32(ImVec4(0, 224, 128, 200));
    ImU32 half = ImGui::ColorConvertFloat4ToU32(ImVec4(255, 128, 0, 255));
    ImU32 end = ImGui::ColorConvertFloat4ToU32(ImVec4(255, 0, 0, 255));
    struct
    {
    bool ShowMenu = false;
    bool FirstUse = false;
    int MenuTab = 0;
    float Width;
    float Height;
    struct
    {
    bool Enable = true;
    bool DrawFOV = true;
    bool prediction = true;
    bool autofiretrigger = false;
    bool ClosestByCrosshair = true;
    bool ClosestByDistance = false;
    bool AimPos_Head = true;
    bool AimPos_Body = false;
    float AimbotFOV = 100.0f;
    float maxdist = 60.0f;
    float smooth = 20;
    float AimbotSmooth = 20.0f;
    float AimbotMaximalDistance = 100.0f;
    bool AimKey_RMB = true;
    bool AimKey_SHIFT = false;

    bool AimKey_DOWN = false;
    int AimKey;
    } Aimbot;
    struct {
    bool Boxes = true;
    bool Corner = true;
    bool filledboxes = false;
    bool Skeletons = false;
    bool Snaplines = true;
    bool Distance = true;
    bool HeadDot = false;
    bool debug = false;
    bool bone = false;
    bool chest = false;
    bool guntest1 = false;
    bool guntest2 = false;
    bool guntest3 = false;
    bool guntest4 = false;
    bool guntest5 = false;
    bool guntest6 = false;
    bool guntest7 = false;
    bool guntest8 = false;
    bool Nickname;
    bool ActiveItemOrWeapon;
    bool esppreview = true;
    float EspMaximalDistance = 100.0f;
    bool PlayerESP = true;
    bool enabled = true;
    } Visuals;
    struct
    {
    bool FakeKeyboardSounds = false;
    bool Crosshair = false;
    bool WhiteCross = false;
    float CrosshairX = 10.0f;
    float CrosshairY = 10.0f;
    float CrosshairThickness = 1.0f;
    } Misc;

    } Options;
    namespace Settings {
    namespace Selection {
    bool Weapon_esp_player = false;
    bool ps4controllermode = false;
    bool bMouseAimbotEnabled = false, showhead = false, Crosshair = false, LineESP = true, DistanceESP = false, DrawFOV = false, AutoFire = false, Prediction = true, VisualName = false, Box = true;
    int BoxMode = 2, distance, outline = false, hitbox = false, EspDistance = 200, AimbotDistance = 200;
    float AimbotFOVValue = 127.0f, AimbotSmoothingValue = 1.989f;
    }

    float EspCircle;

    namespace MajorValues {
    uintptr_t LocalPlayer = 0, LocalPawn = 0, LocalPawnRootComponent = 0;

    int LocalPlayerID = 0, CorrectbSpotted = 0;

    bool menuIsOpen = false;

    Vector3 LocalPlayerRelativeLocation = Vector3(0.0f, 0.0f, 0.0f);

    float Width = GetSystemMetrics(SM_CXSCREEN), Height = GetSystemMetrics(SM_CYSCREEN), ScreenCenterX = 0.0f, ScreenCenterY = 0.0f;
    }
    }



    std::string GetCharacterName(int id)
    {

    switch (id)
    {
    case 12831861: return "ASTRA";
    break;
    case 12839233: return "JETT";
    break;
    case 12821164: return "CHAMBER";
    break;
    case 12828461: return "KILLJOY";
    break;
    case 12819166: return "RAZE";
    break;
    case 12837583: return "REYNA";
    break;
    case 12836716: return "SAGE";
    break;
    case 12824834: return "SKYE";
    break;
    case 12834049: return "NEON";
    break;
    case 12829776: return "VIPER";
    break;
    case 12818573: return "BREACH";
    break;
    case 12833178: return "BRIMSTONE";
    break;
    case 12826043: return "CYPHER";
    break;
    case 12838374: return "OMEN";
    break;
    case 12830864: return "PHOENIX";
    break;
    case 12827255: return "SOVA";
    break;
    case 12835854: return "YORU";
    break;
    case 12823740: return "KAY/O";
    break;
    case 12837536: return "BOT";
    break;
    default:
    return std::to_string(id);
    break;
    }
    }

    std::wstring s2ws(const std::string& str) {
    int size_needed = MultiByteToWideChar(CP_UTF8, 0, &str[0], (int)str.size(), NULL, 0);
    std::wstring wstrTo(size_needed, 0);
    MultiByteToWideChar(CP_UTF8, 0, &str[0], (int)str.size(), &wstrTo[0], size_needed);
    return wstrTo;
    }
    std::wstring MBytesToWString(const char* lpcszString)
    {
    int len = strlen(lpcszString);
    int unicodeLen = ::MultiByteToWideChar(CP_ACP, 0, lpcszString, -1, NULL, 0);
    wchar_t* pUnicode = new wchar_t[unicodeLen + 1];
    memset(pUnicode, 0, (unicodeLen + 1) * sizeof(wchar_t));
    ::MultiByteToWideChar(CP_ACP, 0, lpcszString, -1, (LPWSTR)pUnicode, unicodeLen);
    std::wstring wString = (wchar_t*)pUnicode;
    delete[] pUnicode;
    return wString;
    }

    std::string WStringToUTF8(const wchar_t* lpwcszWString)
    {
    char* pElementText;
    int iTextLen = ::WideCharToMultiByte(CP_UTF8, 0, (LPWSTR)lpwcszWString, -1, NULL, 0, NULL, NULL);
    pElementText = new char[iTextLen + 1];
    memset((void*)pElementText, 0, (iTextLen + 1) * sizeof(char));
    ::WideCharToMultiByte(CP_UTF8, 0, (LPWSTR)lpwcszWString, -1, pElementText, iTextLen, NULL, NULL);
    std::string strReturn(pElementText);
    delete[] pElementText;
    return strReturn;
    }
    void DrawString(float fontSize, int x, int y, RGBA* color, bool bCenter, bool stroke, const char* pText, ...)
    {
    va_list va_alist;
    char buf[1024] = { 0 };
    va_start(va_alist, pText);
    _vsnprintf_s(buf, sizeof(buf), pText, va_alist);
    va_end(va_alist);
    std::string text = WStringToUTF8(MBytesToWString(buf).c_str());
    if (bCenter)
    {
    ImVec2 textSize = ImGui::CalcTextSize(text.c_str());
    x = x - textSize.x / 2;
    y = y - textSize.y;
    }
    if (stroke)
    {
    ImGui::GetOverlayDrawList()->AddText(ImGui::GetFont(), fontSize, ImVec2(x + 1, y + 1), ImGui::ColorConvertFloat4ToU32(ImVec4(0, 0, 0, 1)), text.c_str());
    ImGui::GetOverlayDrawList()->AddText(ImGui::GetFont(), fontSize, ImVec2(x - 1, y - 1), ImGui::ColorConvertFloat4ToU32(ImVec4(0, 0, 0, 1)), text.c_str());
    ImGui::GetOverlayDrawList()->AddText(ImGui::GetFont(), fontSize, ImVec2(x + 1, y - 1), ImGui::ColorConvertFloat4ToU32(ImVec4(0, 0, 0, 1)), text.c_str());
    ImGui::GetOverlayDrawList()->AddText(ImGui::GetFont(), fontSize, ImVec2(x - 1, y + 1), ImGui::ColorConvertFloat4ToU32(ImVec4(0, 0, 0, 1)), text.c_str());
    }
    ImGui::GetOverlayDrawList()->AddText(ImGui::GetFont(), fontSize, ImVec2(x, y), ImGui::ColorConvertFloat4ToU32(ImVec4(color->R / 255.0, color->G / 255.0, color->B / 255.0, color->A / 255.0)), text.c_str());
    }

    int noteypad() {
    BYTE target_name[] = { 'n','o','t','e','p','a','d','.','e','x','e', 0};
    std::wstring process_name = s2ws(std::string((char*)target_name));
    HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); // 0 to get all processes
    PROCESSENTRY32W entry;
    entry.dwSize = sizeof(entry);

    if (!Process32First(snapshot, &entry)) {
    return 0;
    }

    while (Process32Next(snapshot, &entry)) {
    if (std::wstring(entry.szExeFile) == process_name) {
    return entry.th32ProcessID;
    }
    }

    return 0;
    }

    int retreiveValProcessId() {
    BYTE target_name[] = { 'V','A','L','O','R','A','N','T','-','W','i','n','6','4','-','S','h','i','p','p','i','n','g','.','e','x','e', 0 };
    std::wstring process_name = s2ws(std::string((char*)target_name));
    HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); // 0 to get all processes
    PROCESSENTRY32W entry;
    entry.dwSize = sizeof(entry);

    if (!Process32First(snapshot, &entry)) {
    return 0;
    }

    while (Process32Next(snapshot, &entry)) {
    if (std::wstring(entry.szExeFile) == process_name) {
    return entry.th32ProcessID;
    }
    }

    return 0;
    }

    static void glfwErrorCallback(int error, const char* description)
    {

    }

    void setupWindow() {
    glfwSetErrorCallback(glfwErrorCallback);
    if (!glfwInit()) {

    return;
    }

    GLFWmonitor* monitor = glfwGetPrimaryMonitor();
    if (!monitor) {
    fprintf(stderr, E("Error 7!\n"));
    return;
    }

    g_width = glfwGetVideoMode(monitor)->width + 1;
    g_height = glfwGetVideoMode(monitor)->height + 1;

    glfwWindowHint(GLFW_FLOATING, true);
    glfwWindowHint(GLFW_RESIZABLE, false);
    glfwWindowHint(GLFW_MAXIMIZED, true);
    glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, true);

    g_window = glfwCreateWindow(g_width, g_height, E("Firefox"), NULL, NULL);
    if (g_window == NULL) {
    std::cout << E("Error 6!\n");
    return;
    }

    glfwSetWindowAttrib(g_window, GLFW_DECORATED, false);
    glfwSetWindowAttrib(g_window, GLFW_MOUSE_PASSTHROUGH, true);
    glfwSetWindowMonitor(g_window, NULL, 0, 0, g_width, g_height, 0);

    glfwMakeContextCurrent(g_window);
    glfwSwapInterval(1); // Enable vsync

    if (glewInit() != GLEW_OK)
    {
    fprintf(stderr, E("Error 5! Contacnt To Support\n"));
    return;
    }

    IMGUI_CHECKVERSION();
    ImGui::CreateContext();
    ImGuiIO& io = ImGui::GetIO(); (void)io;

    ImGui::StyleColorsLight();

    // Setup Platform/Renderer backends
    ImGui_ImplGlfw_InitForOpenGL(g_window, true);
    ImGui_ImplOpenGL3_Init(E("#version 130"));

    ImFont* font = io.Fonts->AddFontFromFileTTF(E("Roboto-Light.ttf"), 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
    IM_ASSERT(font != NULL);
    }

    void cleanupWindow() {
    ImGui_ImplOpenGL3_Shutdown();
    ImGui_ImplGlfw_Shutdown();
    ImGui::DestroyContext();

    glfwDestroyWindow(g_window);
    glfwTerminate();
    }

    BOOL CALLBACK retreiveValorantWindow(HWND hwnd, LPARAM lparam) {
    DWORD process_id;
    GetWindowThreadProcessId(hwnd, &process_id);
    if (process_id == profetrol) {
    valorant_window = hwnd;
    }
    return TRUE;
    }

    void activateValorantWindow() {
    SetForegroundWindow(valorant_window);
    mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
    mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
    }

    void handleKeyPresses() {
    // Toggle overlay
    if (GetAsyncKeyState(VK_INSERT) & 1) {
    g_overlay_visible = !g_overlay_visible;
    glfwSetWindowAttrib(g_window, GLFW_MOUSE_PASSTHROUGH, !g_overlay_visible);
    if (g_overlay_visible) {
    HWND overlay_window = glfwGetWin32Window(g_window);
    SetForegroundWindow(overlay_window);
    }
    else {
    activateValorantWindow();
    }
    }
    }

    uintptr_t decryptWorld(uintptr_t base_address) {
    const auto key = read<uintptr_t>(base_address + offsets::uworld_key);
    const auto state = read<State>(base_address + offsets::uworld_state);
    const auto uworld_ptr = decrypt_uworld(key, (uintptr_t*)&state);
    return read<uintptr_t>(uworld_ptr);
    }


    struct FText
    {
    char _padding_[0x28];
    PWCHAR Name;
    DWORD Length;
    };

    uintptr_t player_state;

    /*inline Vector3 SmoothAim(Vector3 Camera_rotation, Vector3 Target, float SmoothFactor)
    {
    Vector3 diff = Target - Camera_rotation;
    diff.Normalize();
    return Camera_rotation + diff / SmoothFactor;
    }*/
    float matWorldView[4][4];
    float matProj[4][4];

    std::vector<Enemy> retreiveValidEnemies(uintptr_t actor_array, int actor_count) {
    std::vector<Enemy> temp_enemy_collection{};
    size_t size = sizeof(uintptr_t);
    for (int i = 0; i < actor_count; i++) {
    uintptr_t actor = read<uintptr_t>(actor_array + (i * size));
    if (actor == 0x00) {
    continue;
    }
    unique_id = read<uintptr_t>(actor + offsets::unique_id);
    if (unique_id != 18743553) {
    continue;
    }
    uintptr_t mesh = read<uintptr_t>(actor + offsets::mesh_component);
    if (!mesh) {
    continue;
    }

    player_state = read<uintptr_t>(actor + offsets::player_state);
    uintptr_t team_component = read<uintptr_t>(player_state + offsets::team_component);
    int team_id = read<int>(team_component + offsets::team_id);
    int bone_count = read<int>(mesh + offsets::bone_count);
    bool is_bot = bone_count == 103;
    if (team_id == g_local_team_id && !is_bot) {
    continue;
    }

    uintptr_t damage_handler = read<uintptr_t>(actor + offsets::damage_handler);
    uintptr_t root_component = read<uintptr_t>(actor + offsets::root_component);
    uintptr_t bone_array = read<uintptr_t>(mesh + offsets::bone_array);



    Enemy enemy{
    actor,
    damage_handler,
    player_state,
    root_component,
    mesh,
    bone_array,
    bone_count,
    true
    };

    temp_enemy_collection.push_back(enemy);
    }

    return temp_enemy_collection;
    }

    void retreiveData() {
    while (true) {
    uintptr_t world = decryptWorld(g_base_address);

    uintptr_t game_instance = read<uintptr_t>(world + offsets::game_instance);
    uintptr_t persistent_level = read<uintptr_t>(world + offsets::persistent_level);

    uintptr_t local_player_array = read<uintptr_t>(game_instance + offsets::local_player_array);
    uintptr_t local_player = read<uintptr_t>(local_player_array);
    uintptr_t local_player_controller = read<uintptr_t>(local_player + offsets::local_player_controller);
    local_player_pawn = read<uintptr_t>(local_player_controller + offsets::local_player_pawn);
    uintptr_t local_damage_handler = read<uintptr_t>(local_player_pawn + offsets::damage_handler);
    uintptr_t local_player_state = read<uintptr_t>(local_player_pawn + offsets::player_state);
    uintptr_t local_team_component = read<
     
  2. dsadnbcxzncxz
    dsadnbcxzncxz Автор темы 12 апр 2022 не беспокоить кроме секса 38 3 сен 2021
    а то скомпилил и заливаю на вт, показывает что там ратка есть[IMG]
     
  3. M1h4n1k
    M1h4n1k 13 апр 2022 Ответы skysmart - t.me/SkyAnsBot 272 4 май 2021
    возможно жалуется на функцию "system_no_output1" (строка 1039), но она используется для остановки процессов всяких (строка 1100).
    Кстати тут есть какой то антидебаг (nignog1, строка 1069), хз зачем антидебаг для сурсов
    Может тут че то и есть, но я поверхностным взгядом не заметил
    --- Сообщение объединено с предыдущим 13 апр 2022
    кстати читы для валоранта уже в паблик доступе что ли?
     
    13 апр 2022 Изменено
    1. dsadnbcxzncxz Автор темы
      M1h4n1k, опен сурсов миллион на гите
    2. M1h4n1k
    3. M1h4n1k
      dsadnbcxzncxz, а че они тогда выебывались, что пиздец античит ахуенный ебет всех
Top
Загрузка...