├── .gitignore ├── Frostyv2 ├── FROSTY v2.sln ├── FROSTY v2 │ ├── Autowall.cpp │ ├── Autowall.h │ ├── BaseClient.h │ ├── Chams.cpp │ ├── Chams.h │ ├── CommonIncludes.h │ ├── Configuration.cpp │ ├── Configuration.hpp │ ├── CreateMove.h │ ├── DLLMain.cpp │ ├── DoPostScreenSpaceEffects.h │ ├── DrawModelExecute.h │ ├── ESP.cpp │ ├── ESP.h │ ├── EngineClient.h │ ├── EnginePrediction.cpp │ ├── EnginePrediction.h │ ├── Entities.h │ ├── FROSTY v2.aps │ ├── FROSTY v2.rc │ ├── FROSTY.vcxproj │ ├── FROSTY.vcxproj.filters │ ├── FROSTY.vcxproj.user │ ├── FindMDL.h │ ├── FireEventClientSide.h │ ├── FrameStageNotify.h │ ├── Global.cpp │ ├── Global.h │ ├── GloveChanger.h │ ├── GrenadePrediction.cpp │ ├── GrenadePrediction.h │ ├── HookIncludes.h │ ├── Hooks.cpp │ ├── Hooks.h │ ├── HooksList.h │ ├── IDirect3DDevice9.h │ ├── ImGui │ │ ├── LICENSE │ │ ├── examples │ │ │ ├── directx9_example │ │ │ │ ├── imgui_impl_dx9.cpp │ │ │ │ └── imgui_impl_dx9.h │ │ │ └── directx9_examples │ │ │ │ ├── imgui_impl_dx9.cpp │ │ │ │ └── imgui_impl_dx9.h │ │ ├── imconfig.h │ │ ├── imgui.cpp │ │ ├── imgui.h │ │ ├── imgui_demo.cpp │ │ ├── imgui_draw.cpp │ │ ├── imgui_internal.h │ │ ├── stb_rect_pack.h │ │ ├── stb_textedit.h │ │ └── stb_truetype.h │ ├── InPrediction.h │ ├── Interface.h │ ├── Interfaces.cpp │ ├── Interfaces.h │ ├── IsConnected.h │ ├── IsHltv.h │ ├── ItemDefinitions.h │ ├── LagComp.cpp │ ├── LagComp.h │ ├── LegitBot.cpp │ ├── LegitBot.h │ ├── Listener.h │ ├── Logging.h │ ├── Materials.h │ ├── MathFunctions.cpp │ ├── MathFunctions.h │ ├── Misc.cpp │ ├── Misc.h │ ├── MiscClasses.cpp │ ├── MiscClasses.h │ ├── MiscDefinitions.h │ ├── MiscFunctions.cpp │ ├── MiscFunctions.h │ ├── MovementRecorder.h │ ├── NetVarManager.cpp │ ├── NetVarManager.h │ ├── OnScreenSizeChanged.h │ ├── OverrideView.h │ ├── PaintTraverse.h │ ├── Parser.cpp │ ├── Parser.h │ ├── PlaySound.h │ ├── PredictionSystem.h │ ├── RageBot.cpp │ ├── RageBot.h │ ├── Render.cpp │ ├── Render.h │ ├── Renderer.cpp │ ├── Renderer.h │ ├── Resolver.h │ ├── SDK.h │ ├── SkinChanger.h │ ├── Sounds.h │ ├── SpoofedConvar.cpp │ ├── Strafer.h │ ├── Surface.h │ ├── SvCheatsGetBool.h │ ├── Themes.h │ ├── Utilities.cpp │ ├── Utilities.h │ ├── UtlBuffer.hpp │ ├── UtlMemory.hpp │ ├── UtlString.hpp │ ├── UtlVector.hpp │ ├── Variables.h │ ├── Vector.h │ ├── Vector2D.h │ ├── Visual.cpp │ ├── XorStr.hpp │ ├── bspflags.h │ ├── dropboxes.h │ ├── imguicolorpicker.cpp │ ├── json.hpp │ ├── memesets.cpp │ ├── memesets.h │ ├── recvproxy.cpp │ ├── recvproxy.h │ ├── resource.h │ ├── resource1.h │ ├── sendatagraph.h │ └── singleton.hpp └── Font │ └── insidous_3.ttf └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | *.smod 22 | 23 | # Compiled Static libraries 24 | *.lai 25 | *.la 26 | *.a 27 | *.lib 28 | 29 | # Executables 30 | *.exe 31 | *.out 32 | *.app 33 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25123.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | 7 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FROSTY v2", "FROSTY v2\FROSTY.vcxproj", "{EDEE63E8-381D-470F-90BD-AF33CCAA1E5E}" 8 | EndProject 9 | 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|x64 = Debug|x64 13 | Debug|x86 = Debug|x86 14 | Release|x64 = Release|x64 15 | Release|x86 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {AA664FD2-0F2D-4792-A634-EDBBA97ED3DB}.Debug|x64.ActiveCfg = Debug|x64 19 | {AA664FD2-0F2D-4792-A634-EDBBA97ED3DB}.Debug|x64.Build.0 = Debug|x64 20 | {AA664FD2-0F2D-4792-A634-EDBBA97ED3DB}.Debug|x86.ActiveCfg = Debug|Win32 21 | {AA664FD2-0F2D-4792-A634-EDBBA97ED3DB}.Debug|x86.Build.0 = Debug|Win32 22 | {AA664FD2-0F2D-4792-A634-EDBBA97ED3DB}.Release|x64.ActiveCfg = Release|x64 23 | {AA664FD2-0F2D-4792-A634-EDBBA97ED3DB}.Release|x64.Build.0 = Release|x64 24 | {AA664FD2-0F2D-4792-A634-EDBBA97ED3DB}.Release|x86.ActiveCfg = Release|Win32 25 | {AA664FD2-0F2D-4792-A634-EDBBA97ED3DB}.Release|x86.Build.0 = Release|Win32 26 | {EDEE63E8-381D-470F-90BD-AF33CCAA1E5E}.Debug|x64.ActiveCfg = Debug|x64 27 | {EDEE63E8-381D-470F-90BD-AF33CCAA1E5E}.Debug|x64.Build.0 = Debug|x64 28 | {EDEE63E8-381D-470F-90BD-AF33CCAA1E5E}.Debug|x86.ActiveCfg = Debug|Win32 29 | {EDEE63E8-381D-470F-90BD-AF33CCAA1E5E}.Debug|x86.Build.0 = Debug|Win32 30 | {EDEE63E8-381D-470F-90BD-AF33CCAA1E5E}.Release|x64.ActiveCfg = Release|x64 31 | {EDEE63E8-381D-470F-90BD-AF33CCAA1E5E}.Release|x64.Build.0 = Release|x64 32 | {EDEE63E8-381D-470F-90BD-AF33CCAA1E5E}.Release|x86.ActiveCfg = Release|Win32 33 | {EDEE63E8-381D-470F-90BD-AF33CCAA1E5E}.Release|x86.Build.0 = Release|Win32 34 | {222531BD-34DD-4FB4-92A8-A97709698384}.Debug|x64.ActiveCfg = Debug|x64 35 | {222531BD-34DD-4FB4-92A8-A97709698384}.Debug|x64.Build.0 = Debug|x64 36 | {222531BD-34DD-4FB4-92A8-A97709698384}.Debug|x86.ActiveCfg = Debug|Win32 37 | {222531BD-34DD-4FB4-92A8-A97709698384}.Debug|x86.Build.0 = Debug|Win32 38 | {222531BD-34DD-4FB4-92A8-A97709698384}.Release|x64.ActiveCfg = Release|x64 39 | {222531BD-34DD-4FB4-92A8-A97709698384}.Release|x64.Build.0 = Release|x64 40 | {222531BD-34DD-4FB4-92A8-A97709698384}.Release|x86.ActiveCfg = Release|Win32 41 | {222531BD-34DD-4FB4-92A8-A97709698384}.Release|x86.Build.0 = Release|Win32 42 | EndGlobalSection 43 | GlobalSection(SolutionProperties) = preSolution 44 | HideSolutionNode = FALSE 45 | EndGlobalSection 46 | EndGlobal 47 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Autowall.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "SDK.h" 4 | 5 | struct FireBulletData 6 | { 7 | FireBulletData(const Vector &eye_pos) 8 | : src(eye_pos) 9 | { 10 | } 11 | 12 | Vector src; 13 | trace_t enter_trace; 14 | Vector direction; 15 | CTraceFilter filter; 16 | float trace_length; 17 | float trace_length_remaining; 18 | float current_damage; 19 | int penetrate_count; 20 | }; 21 | 22 | bool CanHit(C_BaseEntity* entity, const Vector &point, float *damage_given); 23 | bool CanWallbang(int &dmg); -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/BaseClient.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MiscDefinitions.h" 4 | 5 | typedef void* (*CreateInterfaceFn)(const char *pName, int *pReturnCode); 6 | typedef void* (*InstantiateInterfaceFn)(); 7 | 8 | 9 | class CGlobalVarsBase; 10 | 11 | 12 | 13 | class IBaseClientDLL 14 | { 15 | public: 16 | 17 | virtual int Connect(CreateInterfaceFn appSystemFactory, CGlobalVarsBase *pGlobals) = 0; 18 | virtual int Disconnect(void) = 0; 19 | virtual int Init(CreateInterfaceFn appSystemFactory, CGlobalVarsBase *pGlobals) = 0; 20 | virtual void PostInit() = 0; 21 | virtual void Shutdown(void) = 0; 22 | virtual void LevelInitPreEntity(char const* pMapName) = 0; 23 | virtual void LevelInitPostEntity() = 0; 24 | virtual void LevelShutdown(void) = 0; 25 | virtual ClientClass* GetAllClasses(void) = 0; 26 | }; 27 | 28 | class CHudChat 29 | { 30 | public: 31 | void ChatPrintf(int iPlayerIndex, int iFilter, const char* fmt, ...) 32 | { 33 | call_vfunc(this, 26)(this, iPlayerIndex, iFilter, fmt); 34 | } 35 | }; -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Chams.cpp: -------------------------------------------------------------------------------- 1 | #include "Chams.h" 2 | #include "SDK.h" 3 | #include "Interfaces.h" 4 | #include 5 | #define RandomInt(nMin, nMax) (rand() % (nMax - nMin + 1) + nMin); 6 | 7 | void InitKeyValues(KeyValues* keyValues, const char* name) 8 | { 9 | static uint8_t* sig1; 10 | if (!sig1) 11 | { 12 | sig1 = U::pattern_scan(GetModuleHandleW(L"client.dll"), "68 ? ? ? ? 8B C8 E8 ? ? ? ? 89 45 FC EB 07 C7 45 ? ? ? ? ? 8B 03 56"); 13 | sig1 += 7; 14 | sig1 = sig1 + *reinterpret_cast(sig1 + 1) + 5; 15 | } 16 | 17 | static auto function = (void(__thiscall*)(KeyValues*, const char*))sig1; 18 | function(keyValues, name); 19 | 20 | } 21 | 22 | void LoadFromBuffer(KeyValues* keyValues, char const* resourceName, const char* pBuffer) 23 | { 24 | static uint8_t* offset; 25 | if (!offset) offset = U::pattern_scan(GetModuleHandleW(L"client.dll"), "55 8B EC 83 E4 F8 83 EC 34 53 8B 5D 0C 89 4C 24 04"); 26 | static auto function = (void(__thiscall*)(KeyValues*, char const*, const char*, void*, const char*, void*))offset; 27 | function(keyValues, resourceName, pBuffer, 0, 0, 0); 28 | } 29 | 30 | IMaterial* CreateMaterial(bool Ignore, bool Lit, bool Wireframe) 31 | { 32 | static int created = 0; 33 | static const char tmp[] = 34 | { 35 | "\"%s\"\ 36 | \n{\ 37 | \n\t\"$basetexture\" \"vgui/white_additive\"\ 38 | \n\t\"$envmap\" \"\"\ 39 | \n\t\"$ignorez\" \"%i\"\ 40 | \n\t\"$model\" \"1\"\ 41 | \n\t\"$flat\" \"1\"\ 42 | \n\t\"$nocull\" \"0\"\ 43 | \n\t\"$selfillum\" \"1\"\ 44 | \n\t\"$halflambert\" \"1\"\ 45 | \n\t\"$nofog\" \"0\"\ 46 | \n\t\"$znearer\" \"0\"\ 47 | \n\t\"$wireframe\" \"%i\"\ 48 | \n}\n" 49 | }; 50 | char* baseType = (Lit == true ? "VertexLitGeneric" : "UnlitGeneric"); 51 | char material[512]; 52 | char name[512]; 53 | sprintf_s(material, sizeof(material), tmp, baseType, (Ignore) ? 1 : 0, (Wireframe) ? 1 : 0); 54 | sprintf_s(name, sizeof(name), "#Aimpulse_Chams_%i.vmt", created); 55 | ++created; 56 | KeyValues* keyValues = static_cast< KeyValues* >(malloc(sizeof(KeyValues))); 57 | InitKeyValues(keyValues, baseType); 58 | LoadFromBuffer(keyValues, name, material); 59 | IMaterial* createdMaterial = g_MaterialSystem->CreateMaterial(name, keyValues); 60 | createdMaterial->IncrementReferenceCount(); 61 | return createdMaterial; 62 | 63 | } 64 | 65 | IMaterial * CreateMaterial(std::string type, std::string texture, bool ignorez, bool nofog, bool model, bool nocull, bool halflambert) 66 | { 67 | return nullptr; 68 | } 69 | 70 | 71 | 72 | 73 | 74 | void ForceMaterial(Color color, IMaterial* material, bool useColor, bool forceMaterial) 75 | { 76 | if (useColor) 77 | { 78 | float temp[3] = 79 | { 80 | (float)color.r(), 81 | (float)color.g(), 82 | (float)color.b() 83 | }; 84 | 85 | temp[0] /= 255.f; 86 | temp[1] /= 255.f; 87 | temp[2] /= 255.f; 88 | 89 | 90 | float alpha = (float)color.a(); 91 | 92 | g_RenderView->SetBlend(1.0f); 93 | g_RenderView->SetColorModulation(temp); 94 | } 95 | 96 | if (forceMaterial) 97 | g_ModelRender->ForcedMaterialOverride(material); 98 | else 99 | g_ModelRender->ForcedMaterialOverride(NULL); 100 | } -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Chams.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "SDK.h" 3 | 4 | void InitKeyValues(KeyValues* keyValues, const char* name); 5 | 6 | void LoadFromBuffer(KeyValues* keyValues, char const* resourceName, const char* pBuffer); 7 | 8 | void ForceMaterial(Color color, IMaterial* material, bool useColor = true, bool forceMaterial = true); 9 | 10 | 11 | IMaterial* CreateMaterial(bool Ignore, bool Lit, bool Wireframe); 12 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/CommonIncludes.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #define _WINSOCKAPI_ 3 | 4 | // Includes 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | 14 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Configuration.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | template 4 | class ConfigItem 5 | { 6 | std::string category, name; 7 | T* value; 8 | public: 9 | ConfigItem(std::string category, std::string name, T* value) 10 | { 11 | this->category = category; 12 | this->name = name; 13 | this->value = value; 14 | } 15 | }; 16 | 17 | template 18 | class ConfigValue 19 | { 20 | public: 21 | ConfigValue(std::string category_, std::string name_, T* value_) 22 | { 23 | category = category_; 24 | name = name_; 25 | value = value_; 26 | } 27 | 28 | std::string category, name; 29 | T* value; 30 | }; 31 | 32 | class CConfig 33 | { 34 | protected: 35 | std::vector*> ints; 36 | std::vector*> bools; 37 | std::vector*> floats; 38 | private: 39 | void SetupValue(int&, int, std::string, std::string); 40 | void SetupValue(bool&, bool, std::string, std::string); 41 | void SetupValue(float&, float, std::string, std::string); 42 | public: 43 | CConfig() 44 | { 45 | Setup(); 46 | } 47 | 48 | void Setup(); 49 | 50 | void Save(); 51 | void Load(); 52 | }; 53 | 54 | extern CConfig* Config; -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/CreateMove.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "HookIncludes.h" 3 | #include "Misc.h" 4 | #include "MovementRecorder.h" 5 | #include "RageBot.h" 6 | #include "LegitBot.h" 7 | #include "GrenadePrediction.h" 8 | #include "LagComp.h" 9 | #include "ESP.h" 10 | 11 | using create_move_t = void(__thiscall *)(IBaseClientDLL *, int, float, bool); 12 | QAngle qLastTickAngles = QAngle(0.0f, 0.0f, 0.0f); 13 | void __stdcall CHLCreateMove(int sequence_number, float input_sample_frametime, bool active, bool& bSendPacket) 14 | { 15 | static auto ofunc = hooks::client.get_original(21); 16 | ofunc(g_CHLClient, sequence_number, input_sample_frametime, active); 17 | C_BaseEntity *local = g_EntityList->GetClientEntity(g_Engine->GetLocalPlayer()); 18 | CInput::CUserCmd *cmd = g_Input->GetUserCmd(0, sequence_number); 19 | if (!cmd) 20 | return; 21 | 22 | static float next_time = 0; 23 | if (!Globals::ySwitch && local->IsAlive() && local->GetVelocity().Length2D() == 0) 24 | { 25 | 26 | float TickStuff = TICKS_TO_TIME(local->GetTickBase()); 27 | 28 | Globals::shouldflip = false; 29 | 30 | bool moveFlip; 31 | 32 | Globals::NextTime = next_time; 33 | 34 | if (next_time - TICKS_TO_TIME(local->GetTickBase()) > 1.1) 35 | { 36 | next_time = 0; 37 | } 38 | 39 | if (local->GetVelocity().Length2D() > 1) 40 | { 41 | moveFlip = true; 42 | } 43 | 44 | if (local->GetVelocity().Length2D() == 0 && !moveFlip) 45 | { 46 | if (TickStuff > next_time + 1.1f) 47 | { 48 | next_time = TickStuff + TICKS_TO_TIME(1); 49 | Globals::shouldflip = true; 50 | } 51 | } 52 | else if (moveFlip && local->GetVelocity().Length2D() == 0) 53 | { 54 | if (TickStuff > next_time + 0.22f) 55 | { 56 | next_time = TickStuff + TICKS_TO_TIME(1); 57 | Globals::shouldflip = true; 58 | moveFlip = false; 59 | } 60 | } 61 | } 62 | 63 | if (!cmd->command_number) 64 | return; 65 | 66 | CInput::CVerifiedUserCmd *verifiedCommands = *(CInput::CVerifiedUserCmd **)(reinterpret_cast< uint32_t >(g_Input) + 0xF0); 67 | CInput::CVerifiedUserCmd *verified = &verifiedCommands[sequence_number % 150]; 68 | if (!verified) 69 | return; 70 | 71 | if (!local) 72 | return; 73 | QAngle oldAngle = cmd->viewangles; 74 | float oldForward = cmd->forwardmove; 75 | float oldSideMove = cmd->sidemove; 76 | 77 | backtracking->legitBackTrack(cmd, local); 78 | 79 | RankReveal(cmd); 80 | 81 | misc::instance().OnCreateMove(cmd, local); 82 | 83 | if (g_Options.Misc.AutoStrafe) 84 | misc::AutoStrafe(cmd, local, cmd->viewangles); 85 | 86 | legitbot::instance().OnCreateMove(cmd, local, bSendPacket); 87 | ragebot::instance().OnCreateMove(cmd, bSendPacket); 88 | 89 | 90 | 91 | grenade_prediction::instance().Tick(cmd->buttons); 92 | 93 | if (!bSendPacket && g_Options.Ragebot.YawFake) qLastTickAngles = cmd->viewangles; 94 | else if (bSendPacket && !g_Options.Ragebot.YawFake) qLastTickAngles = cmd->viewangles; 95 | 96 | if (g_Options.Misc.antiuntrusted) 97 | if (!sanitize_angles(cmd->viewangles)) 98 | return; 99 | 100 | movementfix(oldAngle, cmd); 101 | MovementRecorder(cmd); 102 | 103 | if (g_Options.Misc.antiuntrusted) 104 | clampMovement(cmd); 105 | 106 | verified->m_cmd = *cmd; 107 | verified->m_crc = cmd->GetChecksum(); 108 | 109 | 110 | if (Globals::ySwitch) { 111 | Globals::FakeAngle = cmd->viewangles.y; 112 | } 113 | else { 114 | Globals::RealAngle = cmd->viewangles.y; 115 | } 116 | } 117 | #pragma warning(disable : 4409) 118 | __declspec(naked) void __stdcall hkCreateMove(int sequence_number, float input_sample_frametime, bool active) 119 | { 120 | __asm 121 | { 122 | PUSH EBP 123 | MOV EBP, ESP 124 | PUSH EBX 125 | LEA ECX, [ESP] 126 | PUSH ECX 127 | PUSH active 128 | PUSH input_sample_frametime 129 | PUSH sequence_number 130 | CALL CHLCreateMove 131 | POP EBX 132 | POP EBP 133 | RETN 0xC 134 | } 135 | } -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/DLLMain.cpp: -------------------------------------------------------------------------------- 1 | #include "Interfaces.h" 2 | #include "Hooks.h" 3 | #include "Render.h" 4 | #include "SDK.h" 5 | #include "recvproxy.h" 6 | #include "Misc.h" 7 | 8 | bool unload; 9 | 10 | bool on_dll_attach(void* base) 11 | { 12 | U::SetConsoleColor(255); 13 | //U::OpenConsole("Nassi on homo"); 14 | InitialiseInterfaces(); 15 | g_Netvars->GetNetvars(); 16 | g_Render->SetupFonts(); 17 | hooks::initialize(); 18 | NetvarHook(); 19 | 20 | while (unload == false) 21 | { 22 | Sleep(1000); 23 | } 24 | 25 | 26 | UnloadProxy(); 27 | hooks::cleanup(); 28 | 29 | Sleep(2000); 30 | FreeLibraryAndExitThread((HMODULE)base, 0); 31 | } 32 | 33 | bool on_dll_detach() 34 | { 35 | U::CloseConsole(); 36 | UnloadProxy(); 37 | hooks::cleanup(); 38 | return 1; 39 | } 40 | 41 | BOOL WINAPI DllMain( 42 | _In_ HINSTANCE hinstDll, 43 | _In_ DWORD fdwReason, 44 | _In_opt_ LPVOID lpvReserved 45 | ) 46 | { 47 | switch (fdwReason) { 48 | case DLL_PROCESS_ATTACH: 49 | CreateThread(nullptr, 0, (LPTHREAD_START_ROUTINE)on_dll_attach, hinstDll, 0, nullptr); 50 | break; 51 | case DLL_PROCESS_DETACH: 52 | if (lpvReserved == nullptr) 53 | return on_dll_detach(); 54 | } 55 | return TRUE; 56 | } 57 | 58 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/DoPostScreenSpaceEffects.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "HookIncludes.h" 3 | using do_post_screen_space_effects_t = bool(__thiscall*)(void*, CViewSetup*); 4 | 5 | 6 | 7 | bool _fastcall hkDoPostScreenSpaceEffects(void* ecx, void* edx, CViewSetup* pSetup) 8 | { 9 | static auto ofunc = hooks::clientmode.get_original(44); 10 | 11 | IMaterial *pMatGlowColor = g_MaterialSystem->FindMaterial("dev/glow_color", TEXTURE_GROUP_OTHER, true); 12 | g_ModelRender->ForcedMaterialOverride(pMatGlowColor); 13 | 14 | if (g_GlowObjManager && g_Engine->IsConnected()) 15 | { 16 | auto local = g_EntityList->GetClientEntity(g_Engine->GetLocalPlayer()); 17 | if (local) 18 | { 19 | for (int i = 0; i < g_GlowObjManager->m_GlowObjectDefinitions.Count(); ++i) 20 | { 21 | if (g_GlowObjManager->m_GlowObjectDefinitions[i].IsUnused() || !g_GlowObjManager->m_GlowObjectDefinitions[i].getEnt()) 22 | continue; 23 | 24 | CGlowObjectManager::GlowObjectDefinition_t* glowEnt = &g_GlowObjManager->m_GlowObjectDefinitions[i]; 25 | 26 | switch (glowEnt->getEnt()->GetClientClass()->m_ClassID) 27 | { 28 | default: 29 | if (strstr(glowEnt->getEnt()->GetClientClass()->m_pNetworkName, ("CWeapon")) && g_Options.Visuals.weaponglow) 30 | glowEnt->set(g_Options.Colors.WeaponGlow[0], g_Options.Colors.WeaponGlow[1], g_Options.Colors.WeaponGlow[2], g_Options.Visuals.weaponglowalpha / 255.f); 31 | break; 32 | case 1: 33 | if (g_Options.Visuals.weaponglow) 34 | glowEnt->set(g_Options.Colors.WeaponGlow[0], g_Options.Colors.WeaponGlow[1], g_Options.Colors.WeaponGlow[2], g_Options.Visuals.weaponglowalpha / 255.f); 35 | break; 36 | case 35: 37 | if (g_Options.Visuals.glowplayer) 38 | { 39 | if (!g_Options.Visuals.teamglow && glowEnt->getEnt()->GetTeamNum() == local->GetTeamNum()) 40 | break; 41 | 42 | if (glowEnt->getEnt()->GetTeamNum() == local->GetTeamNum()) 43 | glowEnt->set(g_Options.Colors.TeamGlow[0], g_Options.Colors.TeamGlow[1], g_Options.Colors.TeamGlow[2], g_Options.Visuals.playerglowalpha / 255.f); 44 | else if (glowEnt->getEnt()->GetTeamNum() != local->GetTeamNum()) 45 | glowEnt->set(g_Options.Colors.EnemyGlow[0], g_Options.Colors.EnemyGlow[1], g_Options.Colors.EnemyGlow[2], g_Options.Visuals.playerglowalpha / 255.f); 46 | } 47 | break; 48 | case 39: 49 | if (g_Options.Visuals.weaponglow) 50 | glowEnt->set(g_Options.Colors.WeaponGlow[0], g_Options.Colors.WeaponGlow[1], g_Options.Colors.WeaponGlow[2], g_Options.Visuals.weaponglow / 255.f); 51 | break; 52 | case 29: 53 | if (g_Options.Visuals.bombglow) 54 | glowEnt->set(g_Options.Colors.C4glow[0], g_Options.Colors.C4glow[1], g_Options.Colors.C4glow[2], g_Options.Visuals.bombglowalpha / 255.f); 55 | break; 56 | case 105: 57 | if (g_Options.Visuals.bombglow) 58 | glowEnt->set(g_Options.Colors.C4glow[0], g_Options.Colors.C4glow[1], g_Options.Colors.C4glow[2], g_Options.Visuals.bombglowalpha / 255.f); 59 | 60 | } 61 | } 62 | } 63 | } 64 | return ofunc(ecx, pSetup); 65 | } -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/ESP.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/villeeh/Insidousccpaste/af3cbfc74f3553b58aa88991dc170add9ea0ffb7/Frostyv2/FROSTY v2/ESP.cpp -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/ESP.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "SDK.h" 5 | #include "singleton.hpp" 6 | class visuals 7 | :public singleton 8 | { 9 | public: 10 | visuals(); 11 | void OnPaintTraverse(C_BaseEntity* local); 12 | private: 13 | C_BaseEntity *BombCarrier; 14 | 15 | void DrawBox(RECT rect, Color Col); 16 | void DrawCorners(RECT rect, Color Col); 17 | void ThreeDBox(Vector minin, Vector maxin, Vector pos, Color Col); 18 | void DoEnemyCircle(C_BaseEntity * pLocalPlayer, const Vector & vecDelta, float * flRotation); 19 | void DrawInfo(RECT rect, C_BaseEntity* pPlayer, C_BaseEntity* local); 20 | void BulletTrace(C_BaseEntity* pEntity, Color color); 21 | void Skeleton(C_BaseEntity* pEntity, Color Color); 22 | void DrawSnapLine(Vector to, Color clr); 23 | void DrawHealth(RECT rect, C_BaseEntity* pPlayer); 24 | void DrawAngles(); 25 | void DrawAwall(); 26 | 27 | RECT DynamicBox(C_BaseEntity* pPlayer, bool& PVS, C_BaseEntity* local); 28 | 29 | 30 | void DLight(C_BaseEntity* local, C_BaseEntity* entity); 31 | void Crosshair(C_BaseEntity* local); 32 | void RecoilCrosshair(C_BaseEntity* local); 33 | void NightMode(); 34 | void Hitmarker(); 35 | void SpecList(C_BaseEntity *local); 36 | }; 37 | 38 | inline int flGetDistance(Vector from, Vector to) 39 | { 40 | Vector angle; 41 | angle.x = to.x - from.x; angle.y = to.y - from.y; angle.z = to.z - from.z; 42 | 43 | return floor(sqrt(angle.x*angle.x + angle.y*angle.y + angle.z*angle.z) * 0.0254f); 44 | } 45 | 46 | inline float CSGO_Armor(float flDamage, int ArmorValue) 47 | { 48 | float flArmorRatio = 0.5f; 49 | float flArmorBonus = 0.5f; 50 | if (ArmorValue > 0) { 51 | float flNew = flDamage * flArmorRatio; 52 | float flArmor = (flDamage - flNew) * flArmorBonus; 53 | 54 | if (flArmor > static_cast(ArmorValue)) { 55 | flArmor = static_cast(ArmorValue) * (1.f / flArmorBonus); 56 | flNew = flDamage - flArmor; 57 | } 58 | 59 | flDamage = flNew; 60 | } 61 | return flDamage; 62 | } -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/EngineClient.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "MiscDefinitions.h" 5 | 6 | #define FLOW_OUTGOING 0 7 | #define FLOW_INCOMING 1 8 | 9 | #include "Vector.h" 10 | class INetChannelInfo 11 | { 12 | public: 13 | enum { 14 | GENERIC = 0, // must be first and is default group 15 | LOCALPLAYER, // bytes for local player entity update 16 | OTHERPLAYERS, // bytes for other players update 17 | ENTITIES, // all other entity bytes 18 | SOUNDS, // game sounds 19 | EVENTS, // event messages 20 | USERMESSAGES, // user messages 21 | ENTMESSAGES, // entity messages 22 | VOICE, // voice data 23 | STRINGTABLE, // a stringtable update 24 | MOVE, // client move cmds 25 | STRINGCMD, // string command 26 | SIGNON, // various signondata 27 | TOTAL, // must be last and is not a real group 28 | }; 29 | virtual const char *GetName(void) const = 0; // get channel name 30 | virtual const char *GetAddress(void) const = 0; // get channel IP address as string 31 | virtual float GetTime(void) const = 0; // current net time 32 | virtual float GetTimeConnected(void) const = 0; // get connection time in seconds 33 | virtual int GetBufferSize(void) const = 0; // netchannel packet history size 34 | virtual int GetDataRate(void) const = 0; // send data rate in byte/sec 35 | virtual bool IsLoopback(void) const = 0; // true if loopback channel 36 | virtual bool IsTimingOut(void) const = 0; // true if timing out 37 | virtual bool IsPlayback(void) const = 0; // true if demo playback 38 | virtual float GetLatency(int flow) const = 0; // current latency (RTT), more accurate but jittering 39 | virtual float GetAvgLatency(int flow) const = 0; // average packet latency in seconds 40 | virtual float GetAvgLoss(int flow) const = 0; // avg packet loss[0..1] 41 | virtual float GetAvgChoke(int flow) const = 0; // avg packet choke[0..1] 42 | virtual float GetAvgData(int flow) const = 0; // data flow in bytes/sec 43 | virtual float GetAvgPackets(int flow) const = 0; // avg packets/sec 44 | virtual int GetTotalData(int flow) const = 0; // total flow in/out in bytes 45 | virtual int GetSequenceNr(int flow) const = 0; // last send seq number 46 | virtual bool IsValidPacket(int flow, int frame_number) const = 0; // true if packet was not lost/dropped/chocked/flushed 47 | virtual float GetPacketTime(int flow, int frame_number) const = 0; // time when packet was send 48 | virtual int GetPacketBytes(int flow, int frame_number, int group) const = 0; // group size of this packet 49 | virtual bool GetStreamProgress(int flow, int *received, int *total) const = 0; // TCP progress if transmitting 50 | virtual float GetTimeSinceLastReceived(void) const = 0; // get time since last recieved packet in seconds 51 | virtual float GetCommandInterpolationAmount(int flow, int frame_number) const = 0; 52 | virtual void GetPacketResponseLatency(int flow, int frame_number, int *pnLatencyMsecs, int *pnChoke) const = 0; 53 | virtual void GetRemoteFramerate(float *pflFrameTime, float *pflFrameTimeStdDeviation) const = 0; 54 | virtual float GetTimeoutSeconds() const = 0; 55 | }; 56 | 57 | // EngineClient 58 | class IVEngineClient 59 | { 60 | public: 61 | int GetPlayerForUserID(int UserID) { 62 | using Original = int(__thiscall*)(PVOID, int); 63 | return call_vfunc(this, 9)(this, UserID); 64 | } 65 | void GetScreenSize(int& width, int& height) 66 | { 67 | typedef void(__thiscall* oGetScreenSize)(PVOID, int&, int&); 68 | return call_vfunc< oGetScreenSize >(this, 5)(this, width, height); 69 | } 70 | void ClientCmd(const char *szCmdString) 71 | { 72 | typedef void(__thiscall* oClientCmd)(PVOID, const char*); 73 | return call_vfunc(this, 7)(this, szCmdString); 74 | } 75 | bool GetPlayerInfo(int ent_num, player_info_t *pinfo) 76 | { 77 | typedef bool(__thiscall* oGetPlayerInfo)(PVOID, int, player_info_t*); 78 | return call_vfunc< oGetPlayerInfo >(this, 8)(this, ent_num, pinfo); 79 | } 80 | int GetLocalPlayer() 81 | { 82 | typedef int(__thiscall* oLocal)(PVOID); 83 | return call_vfunc< oLocal >(this, 12)(this); 84 | } 85 | float Time() 86 | { 87 | typedef float(__thiscall* oTime)(PVOID); 88 | return call_vfunc< oTime >(this, 14)(this); 89 | } 90 | void GetViewAngles(Vector& vAngles) 91 | { 92 | typedef void(__thiscall* oSetViewAngles)(PVOID, Vector&); 93 | return call_vfunc< oSetViewAngles >(this, 18)(this, vAngles); 94 | } 95 | void SetViewAngles(Vector& vAngles) 96 | { 97 | typedef void(__thiscall* oSetViewAngles)(PVOID, Vector&); 98 | return call_vfunc< oSetViewAngles >(this, 19)(this, vAngles); 99 | } 100 | int GetMaxClients() 101 | { 102 | typedef bool(__thiscall* oGetMaxClients)(PVOID); 103 | return call_vfunc< oGetMaxClients >(this, 20)(this); 104 | } 105 | bool IsConnected() 106 | { 107 | typedef bool(__thiscall* oGetScreenSize)(PVOID); 108 | return call_vfunc< oGetScreenSize >(this, 27)(this); 109 | } 110 | bool IsInGame() 111 | { 112 | typedef bool(__thiscall* oLocal)(PVOID); 113 | return call_vfunc< oLocal >(this, 26)(this); 114 | } 115 | bool IsHltv() 116 | { 117 | typedef bool(__thiscall* uselles)(PVOID); 118 | return call_vfunc< uselles >(this, 93)(this); 119 | } 120 | const matrix3x4& WorldToScreenMatrix() 121 | { 122 | typedef const matrix3x4& (__thiscall* oWorldToScreenMatrix)(PVOID); 123 | return call_vfunc< oWorldToScreenMatrix >(this, 37)(this); 124 | } 125 | void ClientCmd_Unrestricted(char const* cmd) 126 | { 127 | typedef void(__thiscall* oClientCmdUnres)(PVOID, const char*, char); 128 | return call_vfunc(this, 114)(this, cmd, 0); 129 | } 130 | INetChannelInfo* GetNetChannelInfo() 131 | { 132 | typedef INetChannelInfo*(__thiscall* OriginalFn)(PVOID); 133 | return call_vfunc< OriginalFn >(this, 78)(this); 134 | } 135 | }; -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/EnginePrediction.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "SDK.h" 3 | float m_flOldCurtime; 4 | float m_flOldFrametime; 5 | CMoveData m_MoveData; 6 | 7 | int* m_pPredictionRandomSeed; 8 | 9 | void StartPrediction(CInput::CUserCmd* pCmd) { 10 | C_BaseEntity *pLocal = g_EntityList->GetClientEntity(g_Engine->GetLocalPlayer()); 11 | static bool bInit = false; 12 | if (!bInit) { 13 | m_pPredictionRandomSeed = *(int**)(U::FindPattern("client.dll", (PBYTE)"\x8B\x0D\x00\x00\x00\x00\xBA\x00\x00\x00\x00\xE8\x00\x00\x00\x00\x83\xC4\x04", "xx????x????x????xxx") + 2); 14 | bInit = true; 15 | } 16 | 17 | 18 | *m_pPredictionRandomSeed = pCmd->random_seed; 19 | 20 | 21 | m_flOldCurtime = g_Globals->curtime; 22 | m_flOldFrametime = g_Globals->frametime; 23 | 24 | g_Globals->curtime = pLocal->GetTickBase() * g_Globals->interval_per_tick; 25 | g_Globals->frametime = g_Globals->interval_per_tick; 26 | 27 | g_GameMovement->StartTrackPredictionErrors(pLocal); 28 | 29 | memset(&m_MoveData, 0, sizeof(m_MoveData)); 30 | g_MoveHelper->SetHost(pLocal); 31 | g_Prediction->SetupMove(pLocal, pCmd, g_MoveHelper, &m_MoveData); 32 | g_GameMovement->ProcessMovement(pLocal, &m_MoveData); 33 | g_Prediction->FinishMove(pLocal, pCmd, &m_MoveData); 34 | 35 | } 36 | 37 | void EndPrediction(CInput::CUserCmd* pCmd) { 38 | C_BaseEntity *pLocal = g_EntityList->GetClientEntity(g_Engine->GetLocalPlayer()); 39 | g_GameMovement->FinishTrackPredictionErrors(pLocal); 40 | g_MoveHelper->SetHost(0); 41 | 42 | *m_pPredictionRandomSeed = -1; 43 | 44 | g_Globals->curtime = m_flOldCurtime; 45 | g_Globals->frametime = m_flOldFrametime; 46 | } -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/EnginePrediction.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "SDK.h" 4 | 5 | void StartPrediction(CInput::CUserCmd* pCmd); 6 | void EndPrediction(CInput::CUserCmd* pCmd); 7 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/FROSTY v2.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/villeeh/Insidousccpaste/af3cbfc74f3553b58aa88991dc170add9ea0ffb7/Frostyv2/FROSTY v2/FROSTY v2.aps -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/FROSTY v2.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/villeeh/Insidousccpaste/af3cbfc74f3553b58aa88991dc170add9ea0ffb7/Frostyv2/FROSTY v2/FROSTY v2.rc -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/FROSTY.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | false 5 | 6 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/FindMDL.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "HookIncludes.h" 3 | 4 | #define MP5_WEAPON_MODEL_PATH "models/weapons/v_smg_mp5.mdl" 5 | 6 | typedef MDLHandle_t(__thiscall* tFindMDL)(void*, const char*); 7 | tFindMDL oFindMDL; 8 | 9 | MDLHandle_t __fastcall hkFindMDL(void* ecx, void* edx, const char* pMDLRelativePath) 10 | { 11 | 12 | if (strstr(pMDLRelativePath, "models/player") 13 | && !strstr(pMDLRelativePath, "w_")) 14 | oFindMDL(ecx, "models/player/custom_player/xnet/girl/tokitsukaze/tokitsukaze.mdl");// https://i.imgur.com/EiEMUoV.png 15 | // return oFindMDL(ecx, "models/player/custom_player/kuristaja/trump/trump.mdl");// trump xd 16 | return oFindMDL(ecx, "models/player/custom_player/xnet/girl/noire_swimwear/noire.mdl");// https://i.imgur.com/LyDYMbz.png 17 | // return oFindMDL(ecx, "models/player/custom_player/kuristaja/banana_joe/banana_joe.mdl");// banana xd 18 | 19 | /*if (strstr(pMDLRelativePath, "models/weapons/v_rif_ak47.mdl")) 20 | return oFindMDL(ecx, "models/weapons/v_rif_ak41.mdl");//cs:co ak47 21 | 22 | if (strstr(pMDLRelativePath, "models/weapons/v_rif_m4a1_s.mdl")) 23 | return oFindMDL(ecx, "models/weapons/v_rif_m4a2_s.mdl");//cs:co m4*/ 24 | 25 | //if (strstr(pMDLRelativePath, "models/weapons/v_smg_mp7.mdl")) 26 | //return oFindMDL(ecx, MP5_WEAPON_MODEL_PATH); 27 | 28 | //if (strstr(pMDLRelativePath, "models/weapons/v_models/arms/glove_fingerless/v_glove_fingerless.mdl")) 29 | //return oFindMDL(ecx, "models/navi/ct_arms.mdl"); 30 | 31 | 32 | return oFindMDL(ecx, pMDLRelativePath); 33 | } -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/FireEventClientSide.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "HookIncludes.h" 3 | #include "SkinChanger.h" 4 | typedef bool(__thiscall *FireEventClientSideFn)(PVOID, IGameEvent*); 5 | FireEventClientSideFn oFireEventClientSide; 6 | bool __fastcall hkFireEventClientSide(PVOID ECX, PVOID EDX, IGameEvent *Event); 7 | 8 | int Kills2 = 0; 9 | int Kills = 0; 10 | bool RoundInfo = false; 11 | size_t Delay = 0; 12 | 13 | 14 | 15 | bool __fastcall hkFireEventClientSide(PVOID ECX, PVOID EDX, IGameEvent *Event) { 16 | if (!Event) 17 | return oFireEventClientSide(ECX, Event); 18 | 19 | const char* szEventName = Event->GetName(); 20 | 21 | if (!strcmp(szEventName, "player_death")) 22 | { 23 | int nUserID = Event->GetInt("attacker"); 24 | 25 | if (nUserID && (g_Engine->GetPlayerForUserID(nUserID) == g_Engine->GetLocalPlayer())) 26 | { 27 | const char* szWeapon = Event->GetString("weapon"); 28 | 29 | /*for (auto ReplacementIcon : killIcons) { 30 | // Search for a valid replacement. 31 | if (!strcmp(szWeapon, ReplacementIcon.first)) { 32 | // Replace with user defined value. 33 | Event->SetString("weapon", ReplacementIcon.second); 34 | } 35 | }*/ 36 | } 37 | } 38 | 39 | return oFireEventClientSide(ECX, Event); 40 | } 41 | 42 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/FrameStageNotify.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "SkinChanger.h" 3 | #include "Resolver.h" 4 | #include "HookIncludes.h" 5 | #include "GloveChanger.h" 6 | #include "LagComp.h" 7 | typedef void(__stdcall *fsn_t)(ClientFrameStage_t); 8 | 9 | 10 | void __stdcall hkFrameStageNotify(ClientFrameStage_t curStage) 11 | { 12 | static auto ofunc = hooks::client.get_original(36); 13 | if (g_Engine->IsConnected() && g_Engine->IsInGame()) 14 | { 15 | if (curStage == FRAME_NET_UPDATE_POSTDATAUPDATE_START) { 16 | Resolver3(); 17 | if (g_Options.Skinchanger.Enabled) 18 | { 19 | GloveChanger(); 20 | SkinChanger(); 21 | } 22 | backtracking->Update(g_Globals->tickcount); 23 | } 24 | if (curStage == FRAME_RENDER_START) 25 | { 26 | auto pLocal = g_EntityList->GetClientEntity(g_Engine->GetLocalPlayer()); 27 | auto dwDeadFlag = NetVarManager->GetOffset("DT_CSPlayer", "deadflag"); // int 28 | if (pLocal) 29 | { 30 | *(int*)((uintptr_t)pLocal + 0xA30) = g_Globals->framecount; //we'll skip occlusion checks now 31 | *(int*)((uintptr_t)pLocal + 0xA28) = 0; //clear occlusion flags 32 | 33 | if (pLocal->IsAlive() && g_Input->m_fCameraInThirdPerson) { *reinterpret_cast(reinterpret_cast(pLocal) + dwDeadFlag + 4) = qLastTickAngles; } 34 | } 35 | } 36 | 37 | } 38 | ofunc(curStage); 39 | } 40 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Global.cpp: -------------------------------------------------------------------------------- 1 | #include "SDK.h" 2 | 3 | using msg_t = void(__cdecl*)(const char*, ...); 4 | msg_t G::Msg = reinterpret_cast< msg_t >(GetProcAddress(GetModuleHandleA("tier0.dll"), "Msg")); 5 | bool G::Aimbotting; 6 | bool G::InAntiAim; 7 | bool G::Return; 8 | HMODULE G::Dll; 9 | HWND G::Window; 10 | bool G::PressedKeys[256] = {}; 11 | char G::AnimatedClantag[16]; 12 | bool G::d3dinit = false; 13 | float G::FOV; 14 | int G::ChamMode = -1; 15 | bool G::SendPacket = true; 16 | int G::BestTarget = -1; 17 | char G::buf3[128]; 18 | char G::extra_flags; 19 | bool G::menuon; 20 | float G::hitmarkeralpha; 21 | 22 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Global.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "ImGui\imgui.h" 3 | #include "Logging.h" 4 | 5 | namespace G // Global Stuff 6 | { 7 | extern bool Aimbotting; 8 | extern bool InAntiAim; 9 | extern bool Return; 10 | extern HMODULE Dll; 11 | extern HWND Window; 12 | extern bool PressedKeys[256]; 13 | extern bool d3dinit; 14 | extern float FOV; 15 | extern int ChamMode; 16 | extern char AnimatedClantag[16]; 17 | extern bool SendPacket; 18 | extern int BestTarget; 19 | extern char buf3[128]; 20 | extern char extra_flags; 21 | extern bool menuon; 22 | extern float hitmarkeralpha; 23 | using msg_t = void(__cdecl*)(const char*, ...); 24 | extern msg_t Msg; 25 | 26 | } -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/GrenadePrediction.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "SDK.h" 3 | #include "singleton.hpp" 4 | enum ACT 5 | { 6 | ACT_NONE, 7 | ACT_THROW, 8 | ACT_LOB, 9 | ACT_DROP, 10 | }; 11 | 12 | class grenade_prediction 13 | : public singleton 14 | { 15 | private: 16 | std::vector path; 17 | 18 | int type = 0; 19 | int act = 0; 20 | 21 | void Setup(Vector& vecSrc, Vector& vecThrow, Vector viewangles); 22 | void Simulate(CViewSetup* setup); 23 | 24 | int Step(Vector& vecSrc, Vector& vecThrow, int tick, float interval); 25 | bool CheckDetonate(const Vector& vecThrow, const trace_t& tr, int tick, float interval); 26 | 27 | void TraceHull(Vector& src, Vector& end, trace_t& tr); 28 | void AddGravityMove(Vector& move, Vector& vel, float frametime, bool onground); 29 | void PushEntity(Vector& src, const Vector& move, trace_t& tr); 30 | void ResolveFlyCollisionCustom(trace_t& tr, Vector& vecVelocity, float interval); 31 | int PhysicsClipVelocity(const Vector& in, const Vector& normal, Vector& out, float overbounce); 32 | public: 33 | void Tick(int buttons); 34 | void View(CViewSetup* setup); 35 | void Paint(); 36 | }; -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/HookIncludes.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #define _ONSCREENSIZECHANGED_H_ 3 | #define MakePtr(cast, ptr, addValue) (cast)( (DWORD)(ptr) + (DWORD)(addValue)) 4 | #include "SDK.h" 5 | #include "Hooks.h" 6 | #include "Chams.h" 7 | 8 | #include "Interfaces.h" 9 | #include "Render.h" 10 | #include "Misc.h" 11 | #include 12 | 13 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Hooks.cpp: -------------------------------------------------------------------------------- 1 | #include "HookIncludes.h" 2 | #include "HooksList.h" 3 | #include "Listener.h" 4 | #include "Hooks.h" 5 | 6 | float lineLBY; 7 | float lineRealAngle; 8 | float lineFakeAngle; 9 | 10 | 11 | 12 | namespace hooks 13 | { 14 | vfunc_hook panel; 15 | vfunc_hook client; 16 | vfunc_hook clientmode; 17 | vfunc_hook modelrender; 18 | vfunc_hook prediction; 19 | vfunc_hook surface; 20 | vfunc_hook eventmanager; 21 | vfunc_hook d3d; 22 | vfunc_hook viewrender; 23 | vfunc_hook engine; 24 | vfunc_hook sv_cheats; 25 | vfunc_hook EngineHook; 26 | 27 | void initialize() 28 | { 29 | engine.setup(g_Engine); 30 | engine.hook_index(27, IsConnected); 31 | client.setup(g_CHLClient); 32 | client.hook_index(36, hkFrameStageNotify); 33 | client.hook_index(21, hkCreateMove); 34 | 35 | //prediction.setup(g_Prediction); 36 | //prediction.hook_index(14, hkInPrediction); 37 | 38 | clientmode.setup(g_ClientMode); 39 | clientmode.hook_index(18, hkOverrideView); 40 | clientmode.hook_index(35, hkGetViewModelFOV); 41 | clientmode.hook_index(44, hkDoPostScreenSpaceEffects); 42 | 43 | panel.setup(g_Panel); 44 | panel.hook_index(41, hkPaintTraverse); 45 | 46 | modelrender.setup(g_ModelRender); 47 | modelrender.hook_index(21, hkDrawModelExecute); 48 | 49 | surface.setup(g_Surface); 50 | surface.hook_index(82, hkPlaySound); 51 | 52 | //engine.setup(g_Engine); 53 | //engine.hook_index(27, hkIsConnected); 54 | //engine.hook_index(93, hkIsHltv); 55 | 56 | 57 | 58 | 59 | ConVar* sv_cheats_con = g_CVar->FindVar("sv_cheats"); 60 | sv_cheats.setup(sv_cheats_con); 61 | sv_cheats.hook_index(13, hkSvCheatsGetBool); 62 | 63 | 64 | 65 | m_present = U::pattern_scan(GetModuleHandleW(L"gameoverlayrenderer.dll"), "FF 15 ? ? ? ? 8B F8 85 DB 74 1F") + 0x2;//big ( large ) obs bypass 66 | m_reset = U::pattern_scan(GetModuleHandleW(L"gameoverlayrenderer.dll"), "FF 15 ? ? ? ? 8B F8 85 FF 78 18") + 0x2; //big ( large ) obs bypass 67 | 68 | 69 | 70 | oPresent = **reinterpret_cast(m_present); 71 | oReset = **reinterpret_cast(m_reset); 72 | 73 | **reinterpret_cast(m_present) = reinterpret_cast(&hkPresent); 74 | **reinterpret_cast(m_reset) = reinterpret_cast(&hkReset); 75 | 76 | 77 | 78 | 79 | /*d3d9_device = **reinterpret_cast(U::FindPattern("shaderapidx9.dll", (PBYTE)"\xA1\x00\x00\x00\x00\x50\x8B\x08\xFF\x51\x0C", "x????xxxxxx") + 1); 80 | renderer->Initialize(FindWindowA("Valve001", NULL), d3d9_device); 81 | d3d.Initialize(reinterpret_cast(d3d9_device)); 82 | g_fnOriginalReset = reinterpret_cast(d3d.Hook(reinterpret_cast(hkReset), 16)); 83 | g_fnOriginalEndScene = reinterpret_cast(d3d.Hook(reinterpret_cast(hkEndScene), 42));*/ 84 | 85 | item_purchase::singleton()->initialize(); 86 | } 87 | void cleanup() 88 | { 89 | item_purchase::singleton()->remove(); 90 | client.unhook_all(); 91 | prediction.unhook_all(); 92 | clientmode.unhook_all(); 93 | panel.unhook_all(); 94 | modelrender.unhook_all(); 95 | surface.unhook_all(); 96 | //EventManager.Unhook(); 97 | viewrender.unhook_all(); 98 | //d3d.Unhook(); 99 | sv_cheats.unhook_all(); 100 | engine.unhook_all(); 101 | **reinterpret_cast(m_present) = reinterpret_cast(oPresent); 102 | **reinterpret_cast(m_reset) = reinterpret_cast(oReset); 103 | renderer->~Renderer(); 104 | } 105 | 106 | } -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Hooks.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | extern bool unload; 3 | #include "Utilities.h" 4 | 5 | namespace hooks 6 | { 7 | extern void initialize(); 8 | extern void cleanup(); 9 | 10 | 11 | extern vfunc_hook panel; 12 | extern vfunc_hook client; 13 | extern vfunc_hook clientmode; 14 | extern vfunc_hook modelrender; 15 | extern vfunc_hook prediction; 16 | extern vfunc_hook surface; 17 | extern vfunc_hook eventmanager; 18 | extern vfunc_hook d3d; 19 | extern vfunc_hook viewrender; 20 | extern vfunc_hook engine; 21 | extern vfunc_hook sv_cheats; 22 | }; 23 | 24 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/HooksList.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "CreateMove.h" 3 | #include "FrameStageNotify.h" 4 | #include "DrawModelExecute.h" 5 | #include "PaintTraverse.h" 6 | #include "InPrediction.h" 7 | #include "OverrideView.h" 8 | #include "OnScreenSizeChanged.h" 9 | #include "FireEventClientSide.h" 10 | #include "SvCheatsGetBool.h" 11 | #include "IDirect3DDevice9.h" 12 | #include "PlaySound.h" 13 | #include "DoPostScreenSpaceEffects.h" 14 | #include "FindMDL.h" 15 | #include "IsHltv.h" 16 | #include "IsConnected.h" -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/IDirect3DDevice9.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "HookIncludes.h" 3 | #include "Renderer.h" 4 | #include "Interface.h" 5 | #include "Parser.h" 6 | #include "Variables.h" 7 | #include 8 | uint8_t* m_present; 9 | uint8_t* m_reset; 10 | 11 | IDirect3DDevice9* d3d9_device; 12 | typedef HRESULT(__stdcall *EndScene_t) (IDirect3DDevice9*); 13 | 14 | typedef HRESULT(__stdcall *Reset_t) (IDirect3DDevice9*, D3DPRESENT_PARAMETERS*); 15 | 16 | EndScene_t oEndScene = nullptr; 17 | Reset_t oReset = nullptr; 18 | 19 | int ParseSkins() 20 | { 21 | valve_parser::Document doc; 22 | auto r = doc.Load(".\\csgo\\scripts\\items\\items_game.txt", valve_parser::ENCODING::UTF8); 23 | if (!r) 24 | return 1; 25 | 26 | valve_parser::Document english; 27 | r = english.Load(".\\csgo\\resource\\csgo_english.txt", valve_parser::ENCODING::UTF16_LE); 28 | if (!r) 29 | return 2; 30 | 31 | auto weaponSkinCombo = doc.BreadthFirstSearch("weapon_icons"); 32 | if (!weaponSkinCombo || !weaponSkinCombo->ToObject()) 33 | return 3; 34 | 35 | auto skinDataVec = doc.BreadthFirstSearchMultiple("paint_kits"); 36 | if (!skinDataVec.size()) 37 | return 4; 38 | 39 | auto PaintKitNames = english.BreadthFirstSearch("Tokens"); 40 | if (!PaintKitNames || !PaintKitNames->ToObject()) 41 | return 5; 42 | 43 | //std::unordered_map> G::weaponSkins; 44 | //std::unordered_map G::skinMap; 45 | //std::unordered_map G::skinNames; 46 | 47 | std::vector weaponNames = { 48 | "deagle", 49 | "elite", 50 | "fiveseven", 51 | "glock", 52 | "ak47", 53 | "aug", 54 | "awp", 55 | "famas", 56 | "g3sg1", 57 | "galilar", 58 | "m249", 59 | "m4a1_silencer", //needs to be before m4a1 else silencer doesnt get filtered out :D 60 | "m4a1", 61 | "mac10", 62 | "p90", 63 | "ump45", 64 | "xm1014", 65 | "bizon", 66 | "mag7", 67 | "negev", 68 | "sawedoff", 69 | "tec9", 70 | "hkp2000", 71 | "mp7", 72 | "mp9", 73 | "nova", 74 | "p250", 75 | "scar20", 76 | "sg556", 77 | "ssg08", 78 | "usp_silencer", 79 | "cz75a", 80 | "revolver", 81 | "knife_m9_bayonet", //needs to be before bayonet else knife_m9_bayonet doesnt get filtered out :D 82 | "bayonet", 83 | "knife_flip", 84 | "knife_gut", 85 | "knife_karambit", 86 | "knife_tactical", 87 | "knife_falchion", 88 | "knife_survival_bowie", 89 | "knife_butterfly", 90 | "knife_push", 91 | "studded_bloodhound_gloves", 92 | "sporty_gloves", 93 | "slick_gloves", 94 | "leather_handwraps", 95 | "motorcycle_gloves", 96 | "specialist_gloves", 97 | "hydra_gloves" 98 | 99 | }; 100 | 101 | //populate G::weaponSkins 102 | for (auto child : weaponSkinCombo->children) 103 | { 104 | if (child->ToObject()) 105 | { 106 | for (auto weapon : weaponNames) 107 | { 108 | auto skinName = child->ToObject()->GetKeyByName("icon_path")->ToKeyValue()->Value.toString(); 109 | auto pos = skinName.find(weapon); 110 | //filter out the skinname 111 | if (pos != std::string::npos) 112 | { 113 | auto pos2 = skinName.find_last_of('_'); 114 | g_Options.Skinchanger.weaponSkins[weapon].insert( 115 | skinName.substr(pos + weapon.length() + 1, 116 | pos2 - pos - weapon.length() - 1) 117 | ); 118 | break; 119 | } 120 | } 121 | } 122 | } 123 | 124 | //populate skinData 125 | for (auto skinData : skinDataVec) 126 | { 127 | if (skinData->ToObject()) 128 | { 129 | for (auto skin : skinData->children) 130 | { 131 | if (skin->ToObject()) 132 | { 133 | skinInfo si; 134 | si.paintkit = skin->ToObject()->name.toInt(); 135 | 136 | auto skinName = skin->ToObject()->GetKeyByName("name")->ToKeyValue()->Value.toString(); 137 | auto tagNode = skin->ToObject()->GetKeyByName("description_tag"); 138 | if (tagNode) 139 | { 140 | std::string tag = tagNode->ToKeyValue()->Value.toString(); 141 | tag = tag.substr(1, std::string::npos); //skip # 142 | std::transform(tag.begin(), tag.end(), tag.begin(), towlower); 143 | si.tagName = tag; 144 | } 145 | 146 | auto keyVal = skin->ToObject()->GetKeyByName("seed"); 147 | if (keyVal != nullptr) 148 | si.seed = keyVal->ToKeyValue()->Value.toInt(); 149 | 150 | g_Options.Skinchanger.skinMap[skinName] = si; 151 | } 152 | } 153 | } 154 | } 155 | 156 | //populate G::skinNames 157 | for (auto child : PaintKitNames->children) 158 | { 159 | if (child->ToKeyValue()) 160 | { 161 | std::string key = child->ToKeyValue()->Key.toString(); 162 | std::transform(key.begin(), key.end(), key.begin(), towlower); 163 | if (key.find("paintkit") != std::string::npos && 164 | key.find("tag") != std::string::npos) 165 | { 166 | g_Options.Skinchanger.skinNames[key] = child->ToKeyValue()->Value.toString(); 167 | } 168 | } 169 | } 170 | 171 | return 0; 172 | } 173 | 174 | HRESULT __stdcall hkReset(IDirect3DDevice9* thisptr, D3DPRESENT_PARAMETERS* params) { 175 | 176 | if (!renderer->IsReady()) 177 | return oReset(thisptr, params); 178 | 179 | RenderDefault(thisptr); 180 | ImGui_ImplDX9_InvalidateDeviceObjects(); 181 | renderer->~Renderer(); 182 | 183 | HRESULT result = oReset(thisptr, params); 184 | 185 | ImGui_ImplDX9_CreateDeviceObjects(); 186 | 187 | renderer->Initialize(FindWindowA("Valve001", NULL), thisptr); 188 | g_Render->SetupFonts(); 189 | return result; 190 | } 191 | 192 | typedef HRESULT(_stdcall *Present_T)(void*, const RECT*, RECT*, HWND, RGNDATA*); 193 | Present_T oPresent; 194 | HRESULT _stdcall hkPresent(LPDIRECT3DDEVICE9 pDevice, RECT* pSourceRect, RECT* pDestRect, HWND hDestWindowOverride, RGNDATA* pDirtyRegion) 195 | { 196 | if (!renderer->IsReady()) 197 | { 198 | ParseSkins(); 199 | RenderDefault(pDevice); 200 | renderer->Initialize(FindWindowA("Valve001", NULL), pDevice); 201 | } 202 | static bool mouse_enabled = false; 203 | pDevice->SetRenderState(D3DRS_COLORWRITEENABLE, 0xFFFFFFFF); 204 | bool is_renderer_active = renderer->IsActive(); 205 | 206 | if (is_renderer_active) { 207 | if (mouse_enabled) { 208 | g_Engine->ClientCmd_Unrestricted("cl_mouseenable 0"); 209 | mouse_enabled = false; 210 | G::menuon = true; 211 | g_Options.Menu.iTab = 0; 212 | } 213 | } 214 | else { 215 | if (!mouse_enabled) { 216 | g_Engine->ClientCmd_Unrestricted("cl_mouseenable 1"); 217 | mouse_enabled = true; 218 | G::menuon = false; 219 | } 220 | } 221 | 222 | ImGui::GetIO().MouseDrawCursor = is_renderer_active; 223 | 224 | ImGui_ImplDX9_NewFrame(); 225 | 226 | if (is_renderer_active) 227 | { 228 | RenderInterface(); 229 | } 230 | if (g_Options.Visuals.EventLog) 231 | { 232 | purchase.on_fire_event(nullptr, true); 233 | } 234 | 235 | ImGui::Render(); 236 | 237 | return oPresent(pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion); 238 | } 239 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/ImGui/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2015 Omar Cornut and ImGui contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/ImGui/examples/directx9_example/imgui_impl_dx9.h: -------------------------------------------------------------------------------- 1 | // ImGui Win32 + DirectX9 binding 2 | // In this binding, ImTextureID is used to store a 'LPDIRECT3DTEXTURE9' texture identifier. Read the FAQ about ImTextureID in imgui.cpp. 3 | 4 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 5 | // If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown(). 6 | // If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp. 7 | // https://github.com/ocornut/imgui 8 | 9 | struct IDirect3DDevice9; 10 | 11 | IMGUI_API bool ImGui_ImplDX9_Init(void* hwnd, IDirect3DDevice9* device); 12 | IMGUI_API void ImGui_ImplDX9_Shutdown(); 13 | IMGUI_API void ImGui_ImplDX9_NewFrame(); 14 | 15 | // Use if you want to reset your rendering device without losing ImGui state. 16 | IMGUI_API void ImGui_ImplDX9_InvalidateDeviceObjects(); 17 | IMGUI_API bool ImGui_ImplDX9_CreateDeviceObjects(); 18 | 19 | // Handler for Win32 messages, update mouse/keyboard data. 20 | // You may or not need this for your implementation, but it can serve as reference for handling inputs. 21 | // Commented out to avoid dragging dependencies on types. You can copy the extern declaration in your code. 22 | /* 23 | IMGUI_API LRESULT ImGui_ImplDX9_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); 24 | */ 25 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/ImGui/examples/directx9_examples/imgui_impl_dx9.h: -------------------------------------------------------------------------------- 1 | // ImGui Win32 + DirectX9 binding 2 | // In this binding, ImTextureID is used to store a 'LPDIRECT3DTEXTURE9' texture identifier. Read the FAQ about ImTextureID in imgui.cpp. 3 | 4 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 5 | // If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown(). 6 | // If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp. 7 | // https://github.com/ocornut/imgui 8 | 9 | struct IDirect3DDevice9; 10 | 11 | IMGUI_API bool ImGui_ImplDX9_Init(void* hwnd, IDirect3DDevice9* device); 12 | IMGUI_API void ImGui_ImplDX9_Shutdown(); 13 | IMGUI_API void ImGui_ImplDX9_NewFrame(); 14 | 15 | // Use if you want to reset your rendering device without losing ImGui state. 16 | IMGUI_API void ImGui_ImplDX9_InvalidateDeviceObjects(); 17 | IMGUI_API bool ImGui_ImplDX9_CreateDeviceObjects(); 18 | 19 | // Handler for Win32 messages, update mouse/keyboard data. 20 | // You may or not need this for your implementation, but it can serve as reference for handling inputs. 21 | // Commented out to avoid dragging dependencies on types. You can copy the extern declaration in your code. 22 | /* 23 | IMGUI_API LRESULT ImGui_ImplDX9_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); 24 | */ 25 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/ImGui/imconfig.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // USER IMPLEMENTATION 3 | // This file contains compile-time options for ImGui. 4 | // Other options (memory allocation overrides, callbacks, etc.) can be set at runtime via the ImGuiIO structure - ImGui::GetIO(). 5 | //----------------------------------------------------------------------------- 6 | 7 | #pragma once 8 | 9 | //---- Define assertion handler. Defaults to calling assert(). 10 | //#define IM_ASSERT(_EXPR) MyAssert(_EXPR) 11 | 12 | //---- Define attributes of all API symbols declarations, e.g. for DLL under Windows. 13 | //#define IMGUI_API __declspec( dllexport ) 14 | //#define IMGUI_API __declspec( dllimport ) 15 | 16 | //---- Include imgui_user.h at the end of imgui.h 17 | //#define IMGUI_INCLUDE_IMGUI_USER_H 18 | 19 | //---- Don't implement default handlers for Windows (so as not to link with OpenClipboard() and others Win32 functions) 20 | //#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS 21 | //#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS 22 | 23 | //---- Don't implement help and test window functionality (ShowUserGuide()/ShowStyleEditor()/ShowTestWindow() methods will be empty) 24 | //#define IMGUI_DISABLE_TEST_WINDOWS 25 | 26 | //---- Don't define obsolete functions names 27 | //#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS 28 | 29 | //---- Pack colors to BGRA instead of RGBA (remove need to post process vertex buffer in back ends) 30 | //#define IMGUI_USE_BGRA_PACKED_COLOR 31 | 32 | //---- Implement STB libraries in a namespace to avoid conflicts 33 | //#define IMGUI_STB_NAMESPACE ImGuiStb 34 | 35 | //---- Define constructor and implicit cast operators to convert back<>forth from your math types and ImVec2/ImVec4. 36 | /* 37 | #define IM_VEC2_CLASS_EXTRA \ 38 | ImVec2(const MyVec2& f) { x = f.x; y = f.y; } \ 39 | operator MyVec2() const { return MyVec2(x,y); } 40 | 41 | #define IM_VEC4_CLASS_EXTRA \ 42 | ImVec4(const MyVec4& f) { x = f.x; y = f.y; z = f.z; w = f.w; } \ 43 | operator MyVec4() const { return MyVec4(x,y,z,w); } 44 | */ 45 | 46 | //---- Use 32-bit vertex indices (instead of default: 16-bit) to allow meshes with more than 64K vertices 47 | //#define ImDrawIdx unsigned int 48 | 49 | //---- Tip: You can add extra functions within the ImGui:: namespace, here or in your own headers files. 50 | //---- e.g. create variants of the ImGui::Value() helper for your low-level math types, or your own widgets/helpers. 51 | /* 52 | namespace ImGui 53 | { 54 | void Value(const char* prefix, const MyMatrix44& v, const char* float_format = NULL); 55 | } 56 | */ 57 | 58 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/InPrediction.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "HookIncludes.h" 3 | #include 4 | typedef bool(__thiscall* in_prediction_t)(PVOID); 5 | 6 | bool __stdcall hkInPrediction() 7 | { 8 | static auto sig = U::FindPattern("client.dll", (PBYTE)"\x84\xC0\x75\x08\x57\x8B\xCE\xE8\x00\x00\x00\x00\x8B\x06", "xxxxxxxx????xx"); 9 | bool result; 10 | static auto ofunc = hooks::prediction.get_original(14); 11 | static IPrediction *ecxVal = g_Prediction; 12 | result = ofunc(ecxVal); 13 | if (g_Options.Visuals.NoVisualRecoil && (DWORD)(_ReturnAddress()) == sig) 14 | { 15 | C_BaseEntity* pLocalEntity = NULL; 16 | float* m_LocalViewAngles = NULL; 17 | __asm 18 | { 19 | MOV pLocalEntity, ESI 20 | MOV m_LocalViewAngles, EBX 21 | } 22 | Vector viewPunch = pLocalEntity->localPlayerExclusive()->GetViewPunchAngle(); 23 | Vector aimPunch = pLocalEntity->localPlayerExclusive()->GetAimPunchAngle(); 24 | m_LocalViewAngles[0] -= (viewPunch[0] + (aimPunch[0] * 2 * 0.4499999f)); 25 | m_LocalViewAngles[1] -= (viewPunch[1] + (aimPunch[1] * 2 * 0.4499999f)); 26 | m_LocalViewAngles[2] -= (viewPunch[2] + (aimPunch[2] * 2 * 0.4499999f)); 27 | return true; 28 | } 29 | return result; 30 | } -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Interfaces.cpp: -------------------------------------------------------------------------------- 1 | #include "Interfaces.h" 2 | #include "Utilities.h" 3 | 4 | void InitialiseInterfaces() 5 | { 6 | auto EnginePointer = get_module_factory(GetModuleHandleW(L"engine.dll")); 7 | auto ClientPointer = get_module_factory(GetModuleHandleW(L"client.dll")); 8 | auto VGUISurfacePointer = get_module_factory(GetModuleHandleW(L"vguimatsurface.dll")); 9 | auto VGUI2Pointer = get_module_factory(GetModuleHandleW(L"vgui2.dll")); 10 | auto MaterialPointer = get_module_factory(GetModuleHandleW(L"materialsystem.dll")); 11 | auto PhysicsPointer = get_module_factory(GetModuleHandleW(L"vphysics.dll")); 12 | auto StdPointer = get_module_factory(GetModuleHandleW(L"vstdlib.dll")); 13 | auto CachePointer = get_module_factory(GetModuleHandleW(L"datacache.dll")); 14 | 15 | g_CHLClient = (IBaseClientDLL*)ClientPointer("VClient018", nullptr); 16 | g_Engine = (IVEngineClient*)EnginePointer("VEngineClient014", nullptr); 17 | g_Panel = (IPanel*)VGUI2Pointer("VGUI_Panel009", nullptr); 18 | g_Surface = (ISurface*)VGUISurfacePointer("VGUI_Surface031", nullptr); 19 | g_EntityList = (C_BaseEntityList*)ClientPointer("VClientEntityList003", nullptr); 20 | g_DebugOverlay = (IVDebugOverlay*)EnginePointer("VDebugOverlay004", nullptr); 21 | g_Prediction = (IPrediction*)ClientPointer("VClientPrediction001", nullptr); 22 | g_MaterialSystem = (CMaterialSystem*)MaterialPointer("VMaterialSystem080", nullptr); 23 | g_RenderView = (CVRenderView*)EnginePointer("VEngineRenderView014", nullptr); 24 | g_ModelRender = (IVModelRender*)EnginePointer("VEngineModel016", nullptr); 25 | g_ModelInfo = (CModelInfo*)EnginePointer("VModelInfoClient004", nullptr); 26 | g_EngineTrace = (IEngineTrace*)EnginePointer("EngineTraceClient004", nullptr); 27 | g_PhysProps = (IPhysicsSurfaceProps*)PhysicsPointer("VPhysicsSurfaceProps001", nullptr); 28 | g_CVar = (ICVar*)StdPointer("VEngineCvar007", nullptr); 29 | g_Dlight = (IVEffects*)EnginePointer("VEngineEffects001", nullptr); 30 | g_GameMovement = (IGameMovement*)ClientPointer("GameMovement001", nullptr); 31 | g_MoveHelper = **(IMoveHelper***)(U::FindPattern("client.dll", (PBYTE)"\x8B\x0D\x00\x00\x00\x00\x8B\x46\x08\x68", "xx????xxxx") + 2); 32 | g_EventManager = (IGameEventManager2*)EnginePointer("GAMEEVENTSMANAGER002", nullptr); 33 | g_GameConsole = (IGameConsole*)ClientPointer("GameConsole004", nullptr); 34 | g_Input = *(CInput**)((*reinterpret_cast(g_CHLClient))[15] + 0x1); // A1 ? ? ? ? B9 ? ? ? ? FF 60 5C + 1 35 | g_ViewRender = *(IViewRender**)(U::FindPattern("client.dll", (PBYTE)"\xA1\x00\x00\x00\x00\xB9\x00\x00\x00\x00\xC7\x05\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x10", "x????x????xx????????xx") + 1); 36 | g_PlayerResource = **(C_CSPlayerResource***)(U::FindPattern("client.dll", (PBYTE)"\x8B\x3D\x00\x00\x00\x00\x85\xFF\x0F\x84\x00\x00\x00\x00\x81\xC7", "xx????xxxx????xx") + 2); 37 | g_GameRules = **(C_CSGameRules***)(U::FindPattern("client.dll", (PBYTE)"\xA1\x00\x00\x00\x00\x8B\x0D\x00\x00\x00\x00\x6A\x00\x68\x00\x00\x00\x00\xC6\x80", "x????xx????xxx????xx") + 1); 38 | g_MdlCache = (IMDLCache*)CachePointer("MDLCache004", nullptr); 39 | g_ChatElement = FindHudElement("CHudChat"); 40 | g_ClientMode = **(IClientMode***)((*(DWORD**)g_CHLClient)[10] + 0x5); 41 | g_Globals = **(CGlobalVarsBase***)((*(DWORD**)g_CHLClient)[0] + 0x1B); 42 | g_GlowObjManager = *(CGlowObjectManager**)(U::pattern_scan(GetModuleHandleW(L"client.dll"), "0F 11 05 ? ? ? ? 83 C8 01 C7 05 ? ? ? ? 00 00 00 00") + 3); 43 | 44 | } 45 | 46 | 47 | IBaseClientDLL* g_CHLClient; 48 | IVEngineClient* g_Engine; 49 | IPanel* g_Panel; 50 | C_BaseEntityList* g_EntityList; 51 | ISurface* g_Surface; 52 | IVDebugOverlay* g_DebugOverlay; 53 | IClientMode* g_ClientMode; 54 | CGlobalVarsBase* g_Globals; 55 | IPrediction *g_Prediction; 56 | CMaterialSystem* g_MaterialSystem; 57 | CVRenderView* g_RenderView; 58 | IVModelRender* g_ModelRender; 59 | CModelInfo* g_ModelInfo; 60 | IEngineTrace* g_EngineTrace; 61 | IPhysicsSurfaceProps* g_PhysProps; 62 | ICVar* g_CVar; 63 | IVEffects* g_Dlight; 64 | IMoveHelper* g_MoveHelper; 65 | IGameMovement* g_GameMovement; 66 | CInput* g_Input; 67 | IGameEventManager2* g_EventManager; 68 | C_CSPlayerResource* g_PlayerResource; 69 | C_CSGameRules* g_GameRules; 70 | IViewRender* g_ViewRender; 71 | IGameConsole* g_GameConsole; 72 | IMDLCache* g_MdlCache; 73 | CHudChat* g_ChatElement; 74 | CGlowObjectManager* g_GlowObjManager; 75 | 76 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Interfaces.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CommonIncludes.h" 4 | #include "SDK.h" 5 | #include 6 | #include "Utilities.h" 7 | 8 | extern void InitialiseInterfaces(); 9 | 10 | 11 | extern IBaseClientDLL* g_CHLClient; 12 | extern IVEngineClient* g_Engine; 13 | extern IPanel* g_Panel; 14 | extern C_BaseEntityList* g_EntityList; 15 | extern ISurface* g_Surface; 16 | extern IVDebugOverlay* g_DebugOverlay; 17 | extern IClientMode* g_ClientMode; 18 | extern CGlobalVarsBase* g_Globals; 19 | extern IPrediction *g_Prediction; 20 | extern CMaterialSystem* g_MaterialSystem; 21 | extern CVRenderView* g_RenderView; 22 | extern IVModelRender* g_ModelRender; 23 | extern CModelInfo* g_ModelInfo; 24 | extern IEngineTrace* g_EngineTrace; 25 | extern IPhysicsSurfaceProps* g_PhysProps; 26 | extern ICVar* g_CVar; 27 | extern IVEffects* g_Dlight; 28 | extern IMoveHelper* g_MoveHelper; 29 | extern IGameMovement* g_GameMovement; 30 | extern CInput* g_Input; 31 | extern IGameEventManager2* g_EventManager; 32 | extern C_CSPlayerResource* g_PlayerResource; 33 | extern C_CSGameRules* g_GameRules; 34 | extern IViewRender* g_ViewRender; 35 | extern IGameConsole* g_GameConsole; 36 | extern IMDLCache* g_MdlCache; 37 | extern CHudChat* g_ChatElement; 38 | extern CGlowObjectManager* g_GlowObjManager; 39 | 40 | template 41 | static T* FindHudElement(const char* name) 42 | { 43 | static auto pThis = *reinterpret_cast(U::pattern_scan(GetModuleHandleW(L"client.dll"), "B9 ? ? ? ? E8 ? ? ? ? 83 7D F8 ?") + 1); 44 | 45 | static auto find_hud_element = reinterpret_cast(U::pattern_scan(GetModuleHandleW(L"client.dll"), "55 8B EC 53 8B 5D 08 56 57 8B F9 33 F6 39 77 28")); 46 | return (T*)find_hud_element(pThis, name); 47 | } 48 | typedef void* (__cdecl* CreateInterface_t)(const char*, int*); 49 | typedef void* (*CreateInterfaceFn)(const char* pName, int* pReturnCode); 50 | inline CreateInterfaceFn get_module_factory(HMODULE module) 51 | { 52 | return reinterpret_cast(GetProcAddress(module, "CreateInterface")); 53 | } 54 | 55 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/IsConnected.h: -------------------------------------------------------------------------------- 1 | #include "HookIncludes.h" 2 | using is_connected_t = bool(__thiscall*)(IVEngineClient*); 3 | bool __stdcall IsConnected() 4 | { 5 | auto ofunc = hooks::engine.get_original(27); 6 | static void* unk = U::pattern_scan(GetModuleHandleA("client.dll"), "75 04 B0 01 5F") - 2; 7 | if (_ReturnAddress() == unk && g_Options.Misc.inventoryalwayson) 8 | { 9 | return false; 10 | } 11 | return ofunc(g_Engine); 12 | } -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/IsHltv.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "HookIncludes.h" 3 | #include 4 | using is_hltv_t = bool(__thiscall*)(void*); 5 | 6 | bool __fastcall hkIsHltv(void* ecx, void* edx) 7 | { 8 | static auto ofunc = hooks::engine.get_original(93); 9 | uintptr_t pvs_entity; 10 | __asm 11 | { 12 | mov pvs_entity, edi 13 | } 14 | 15 | 16 | void* returna = _ReturnAddress(); 17 | static auto v1 = (DWORD)U::pattern_scan(GetModuleHandleW(L"client.dll"), "84 C0 0F 85 ? ? ? ? A1 ? ? ? ? 8B B7"); 18 | if (reinterpret_cast(returna) == (v1)) 19 | { 20 | if (pvs_entity) 21 | { 22 | *(int*)(pvs_entity + 0xA24) = -1; 23 | *(int*)(pvs_entity + 0xA2C) = *(int *)(pvs_entity + 0xA28); 24 | *(int*)(pvs_entity + 0xA28) = 0; 25 | return true; 26 | } 27 | } 28 | return ofunc(ecx); 29 | } -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/ItemDefinitions.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | struct Item_t { 6 | Item_t(const char* display_name, const char* entity_name, const char* model, const char* killicon = nullptr) { 7 | this->display_name = display_name; 8 | this->entity_name = entity_name; 9 | this->model = model; 10 | this->killicon = killicon; 11 | } 12 | 13 | const char* display_name = nullptr; 14 | const char* entity_name = nullptr; 15 | const char* model = nullptr; 16 | const char* killicon = nullptr; 17 | }; 18 | 19 | const std::unordered_map ItemDefinitionIndex = { 20 | { 1,{ "Desert Eagle", "WEAPON_DEAGLE", "models/weapons/v_pist_deagle.mdl", "deagle" } }, 21 | { 2,{ "Dual Berettas", "WEAPON_ELITE", "models/weapons/v_pist_elite.mdl", "elite" } }, 22 | { 3,{ "Five-SeveN", "WEAPON_FIVESEVEN", "models/weapons/v_pist_fiveseven.mdl", "fiveseven" } }, 23 | { 4,{ "Glock-18", "WEAPON_GLOCK", "models/weapons/v_pist_glock18.mdl", "glock" } }, 24 | { 7,{ "AK-47", "WEAPON_AK47", "models/weapons/v_rif_ak47.mdl", "ak47" } }, 25 | { 8,{ "AUG", "WEAPON_AUG", "models/weapons/v_rif_aug.mdl", "aug" } }, 26 | { 9,{ "AWP", "WEAPON_AWP", "models/weapons/v_snip_awp.mdl", "awp" } }, 27 | { 10,{ "FAMAS", "WEAPON_FAMAS", "models/weapons/v_rif_famas.mdl", "famas" } }, 28 | { 11,{ "G3SG1", "WEAPON_G3SG1", "models/weapons/v_snip_g3sg1.mdl", "g3sg1" } }, 29 | { 13,{ "Galil AR", "WEAPON_GALILAR", "models/weapons/v_rif_galilar.mdl", "galilar" } }, 30 | { 14,{ "M249", "WEAPON_M249", "models/weapons/v_mach_m249para.mdl", "m249" } }, 31 | { 16,{ "M4A4", "WEAPON_M4A1", "models/weapons/v_rif_m4a1.mdl", "m4a1" } }, 32 | { 17,{ "MAC-10", "WEAPON_MAC10", "models/weapons/v_smg_mac10.mdl", "mac10" } }, 33 | { 19,{ "P90", "WEAPON_P90", "models/weapons/v_smg_p90.mdl", "p90" } }, 34 | { 24,{ "UMP-45", "WEAPON_UMP45", "models/weapons/v_smg_ump45.mdl", "ump45" } }, 35 | { 25,{ "XM1014", "WEAPON_XM1014", "models/weapons/v_shot_xm1014.mdl", "xm1014" } }, 36 | { 26,{ "PP-Bizon", "WEAPON_BIZON", "models/weapons/v_smg_bizon.mdl", "bizon" } }, 37 | { 27,{ "MAG-7", "WEAPON_MAG7", "models/weapons/v_shot_mag7.mdl", "mag7" } }, 38 | { 28,{ "Negev", "WEAPON_NEGEV", "models/weapons/v_mach_negev.mdl", "negev" } }, 39 | { 29,{ "Sawed-Off", "WEAPON_SAWEDOFF", "models/weapons/v_shot_sawedoff.mdl", "sawedoff" } }, 40 | { 30,{ "Tec-9", "WEAPON_TEC9", "models/weapons/v_pist_tec9.mdl", "tec9" } }, 41 | { 31,{ "Zeus x27", "WEAPON_TASER", "models/weapons/v_eq_taser.mdl", "taser" } }, 42 | { 32,{ "P2000", "WEAPON_HKP2000", "models/weapons/v_pist_hkp2000.mdl", "hkp2000" } }, 43 | { 33,{ "MP7", "WEAPON_MP7", "models/weapons/v_smg_mp7.mdl", "mp7" } }, 44 | { 34,{ "MP9", "WEAPON_MP9", "models/weapons/v_smg_mp9.mdl", "mp9" } }, 45 | { 35,{ "Nova", "WEAPON_NOVA", "models/weapons/v_shot_nova.mdl", "nova" } }, 46 | { 36,{ "P250", "WEAPON_P250", "models/weapons/v_pist_p250.mdl", "p250" } }, 47 | { 38,{ "SCAR-20", "WEAPON_SCAR20", "models/weapons/v_snip_scar20.mdl", "scar20" } }, 48 | { 39,{ "SG 553", "WEAPON_SG556", "models/weapons/v_rif_sg556.mdl", "sg556" } }, 49 | { 40,{ "SSG 08", "WEAPON_SSG08", "models/weapons/v_snip_ssg08.mdl", "ssg08" } }, 50 | { 42,{ "Knife (Counter-Terrorists)", "WEAPON_KNIFE", "models/weapons/v_knife_default_ct.mdl", "knife_default_ct" } }, 51 | { 43,{ "Flashbang", "WEAPON_FLASHBANG", "models/weapons/v_eq_flashbang.mdl", "flashbang" } }, 52 | { 44,{ "HE Grenade", "WEAPON_HEGRENADE", "models/weapons/v_eq_fraggrenade.mdl", "hegrenade" } }, 53 | { 45,{ "Smoke Grenade", "WEAPON_SMOKEGRENADE", "models/weapons/v_eq_smokegrenade.mdl", "smokegrenade" } }, 54 | { 46,{ "Molotov", "WEAPON_MOLOTOV", "models/weapons/v_eq_molotov.mdl", "inferno" } }, 55 | { 47,{ "Decoy Grenade", "WEAPON_DECOY", "models/weapons/v_eq_decoy.mdl", "decoy" } }, 56 | { 48,{ "Incendiary Grenade", "WEAPON_INCGRENADE", "models/weapons/v_eq_incendiarygrenade.mdl", "inferno" } }, 57 | { 49,{ "C4 Explosive", "WEAPON_C4", "models/weapons/v_ied.mdl" } }, 58 | { 59,{ "Knife (Terrorists)", "WEAPON_KNIFE_T", "models/weapons/v_knife_default_t.mdl", "knife_t" } }, 59 | { 60,{ "M4A1-S", "WEAPON_M4A1_SILENCER", "models/weapons/v_rif_m4a1_s.mdl", "m4a1_silencer" } }, 60 | { 61,{ "USP-S", "WEAPON_USP_SILENCER", "models/weapons/v_pist_223.mdl", "usp_silencer" } }, 61 | { 63,{ "CZ75 Auto", "WEAPON_CZ75A", "models/weapons/v_pist_cz_75.mdl", "cz75a" } }, 62 | { 64,{ "R8 Revolver", "WEAPON_REVOLVER", "models/weapons/v_pist_revolver.mdl", "revolver" } }, 63 | { 500,{ "Bayonet", "WEAPON_KNIFE_BAYONET", "models/weapons/v_knife_bayonet.mdl", "bayonet" } }, 64 | { 505,{ "Flip Knife", "WEAPON_KNIFE_FLIP", "models/weapons/v_knife_flip.mdl", "knife_flip" } }, 65 | { 506,{ "Gut Knife", "WEAPON_KNIFE_GUT", "models/weapons/v_knife_gut.mdl", "knife_gut" } }, 66 | { 507,{ "Karambit", "WEAPON_KNIFE_KARAMBIT", "models/weapons/v_knife_karam.mdl", "knife_karambit" } }, 67 | { 508,{ "M9 Bayonet", "WEAPON_KNIFE_M9_BAYONET", "models/weapons/v_knife_m9_bay.mdl", "knife_m9_bayonet" } }, 68 | { 509,{ "Huntsman Knife", "WEAPON_KNIFE_TACTICAL", "models/weapons/v_knife_tactical.mdl", "knife_tactical" } }, 69 | { 512,{ "Falchion Knife", "WEAPON_KNIFE_FALCHION", "models/weapons/v_knife_falchion_advanced.mdl", "knife_falchion" } }, 70 | { 514,{ "Bowie Knife", "WEAPON_KNIFE_SURVIVAL_BOWIE", "models/weapons/v_knife_survival_bowie.mdl", "knife_survival_bowie" } }, 71 | { 515,{ "Butterfly Knife", "WEAPON_KNIFE_BUTTERFLY", "models/weapons/v_knife_butterfly.mdl", "knife_butterfly" } }, 72 | { 516,{ "Shadow Daggers", "WEAPON_KNIFE_PUSH", "models/weapons/v_knife_push.mdl", "knife_push" } } 73 | }; 74 | 75 | // Currently unused -- only here for reference. 76 | const std::unordered_map EntityQuality = { 77 | { 0, "Normal" }, 78 | { 1, "Genuine" }, 79 | { 2, "Vintage" }, 80 | { 3, "Unusual" }, 81 | { 5, "Community" }, 82 | { 6, "Developer" }, 83 | { 7, "Self-Made" }, 84 | { 8, "Customized" }, 85 | { 9, "Strange" }, 86 | { 10, "Completed" }, 87 | { 12, "Tournament" } 88 | }; -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/LagComp.cpp: -------------------------------------------------------------------------------- 1 | #include "LagComp.h" 2 | #include "RageBot.h" 3 | void BackTrack::Update(int tick_count) 4 | { 5 | if (!g_Options.Ragebot.FakeLagFix) 6 | return; 7 | 8 | latest_tick = tick_count; 9 | for (int i = 0; i < 64; i++) 10 | { 11 | UpdateRecord(i); 12 | } 13 | } 14 | 15 | bool BackTrack::IsTickValid(int tick) 16 | { 17 | int delta = latest_tick - tick; 18 | float deltaTime = delta * g_Globals->interval_per_tick; 19 | return (fabs(deltaTime) <= 0.2f); 20 | } 21 | 22 | void BackTrack::UpdateRecord(int i) 23 | { 24 | C_BaseEntity* pEntity = g_EntityList->GetClientEntity(i); 25 | if (pEntity && pEntity->IsAlive() && !pEntity->IsDormant()) 26 | { 27 | float lby = pEntity->GetLowerBodyYaw(); 28 | if (lby != records[i].lby) 29 | { 30 | records[i].tick_count = latest_tick; 31 | records[i].lby = lby; 32 | records[i].headPosition = GetHitboxPosition(pEntity, 0); 33 | } 34 | } 35 | else 36 | { 37 | records[i].tick_count = 0; 38 | } 39 | } 40 | 41 | bool BackTrack::RunLBYBackTrack(int i, CInput::CUserCmd* cmd, Vector& aimPoint) 42 | { 43 | if (IsTickValid(records[i].tick_count)) 44 | { 45 | aimPoint = records[i].headPosition; 46 | cmd->tick_count = records[i].tick_count; 47 | return true; 48 | } 49 | return false; 50 | } 51 | 52 | void BackTrack::legitBackTrack(CInput::CUserCmd* cmd, C_BaseEntity* pLocal) 53 | { 54 | if (g_Options.Legitbot.backtrack) 55 | { 56 | int bestTargetIndex = -1; 57 | float bestFov = FLT_MAX; 58 | player_info_t info; 59 | if (!pLocal->IsAlive()) 60 | return; 61 | 62 | for (int i = 0; i < g_Engine->GetMaxClients(); i++) 63 | { 64 | auto entity = (C_BaseEntity*)g_EntityList->GetClientEntity(i); 65 | 66 | if (!entity || !pLocal) 67 | continue; 68 | 69 | if (entity == pLocal) 70 | continue; 71 | 72 | if (!g_Engine->GetPlayerInfo(i, &info)) 73 | continue; 74 | 75 | if (entity->IsDormant()) 76 | continue; 77 | 78 | if (entity->GetTeamNum() == pLocal->GetTeamNum()) 79 | continue; 80 | 81 | if (entity->IsAlive()) 82 | { 83 | 84 | float simtime = entity->GetSimulationTime(); 85 | Vector hitboxPos = GetHitboxPosition(entity, 0); 86 | 87 | headPositions[i][cmd->command_number % 13] = backtrackData{ simtime, hitboxPos }; 88 | Vector ViewDir = angle_vector(cmd->viewangles + (pLocal->localPlayerExclusive()->GetAimPunchAngle() * 2.f)); 89 | float FOVDistance = distance_point_to_line(hitboxPos, pLocal->GetEyePosition(), ViewDir); 90 | 91 | if (bestFov > FOVDistance) 92 | { 93 | bestFov = FOVDistance; 94 | bestTargetIndex = i; 95 | } 96 | } 97 | } 98 | 99 | float bestTargetSimTime; 100 | if (bestTargetIndex != -1) 101 | { 102 | float tempFloat = FLT_MAX; 103 | Vector ViewDir = angle_vector(cmd->viewangles + (pLocal->localPlayerExclusive()->GetAimPunchAngle() * 2.f)); 104 | for (int t = 0; t < g_Options.Legitbot.backtrackTicks; ++t) 105 | { 106 | float tempFOVDistance = distance_point_to_line(headPositions[bestTargetIndex][t].hitboxPos, pLocal->GetEyePosition(), ViewDir); 107 | if (tempFloat > tempFOVDistance && headPositions[bestTargetIndex][t].simtime > pLocal->GetSimulationTime() - 1) 108 | { 109 | tempFloat = tempFOVDistance; 110 | bestTargetSimTime = headPositions[bestTargetIndex][t].simtime; 111 | } 112 | } 113 | 114 | cmd->tick_count = TIME_TO_TICKS(bestTargetSimTime); 115 | } 116 | } 117 | } 118 | 119 | void BackTrack::RageBackTrack(CInput::CUserCmd* cmd, C_BaseEntity* pLocal) 120 | { 121 | if (g_Options.Ragebot.PosAdjust) 122 | { 123 | int bestTargetIndex = -1; 124 | float bestFov = FLT_MAX; 125 | player_info_t info; 126 | if (!pLocal->IsAlive()) 127 | return; 128 | 129 | for (int i = 0; i < g_Engine->GetMaxClients(); i++) 130 | { 131 | auto entity = (C_BaseEntity*)g_EntityList->GetClientEntity(i); 132 | 133 | if (!entity || !pLocal) 134 | continue; 135 | 136 | if (entity == pLocal) 137 | continue; 138 | 139 | if (!g_Engine->GetPlayerInfo(i, &info)) 140 | continue; 141 | 142 | if (entity->IsDormant()) 143 | continue; 144 | 145 | if (entity->GetTeamNum() == pLocal->GetTeamNum()) 146 | continue; 147 | 148 | if (entity->IsAlive()) 149 | { 150 | 151 | float simtime = entity->GetSimulationTime(); 152 | Vector hitboxPos = Globals::AimPoint; 153 | 154 | headPositions[i][cmd->command_number % 13] = backtrackData{ simtime, hitboxPos }; 155 | Vector ViewDir = angle_vector(cmd->viewangles + (pLocal->localPlayerExclusive()->GetAimPunchAngle() * 2.f)); 156 | float FOVDistance = distance_point_to_line(hitboxPos, pLocal->GetEyePosition(), ViewDir); 157 | 158 | if (bestFov > FOVDistance) 159 | { 160 | bestFov = FOVDistance; 161 | bestTargetIndex = i; 162 | } 163 | } 164 | } 165 | 166 | float bestTargetSimTime; 167 | if (bestTargetIndex != -1) 168 | { 169 | float tempFloat = FLT_MAX; 170 | Vector ViewDir = angle_vector(cmd->viewangles + (pLocal->localPlayerExclusive()->GetAimPunchAngle() * 2.f)); 171 | for (int t = 0; t < 12; ++t) 172 | { 173 | float tempFOVDistance = distance_point_to_line(headPositions[bestTargetIndex][t].hitboxPos, pLocal->GetEyePosition(), ViewDir); 174 | if (tempFloat > tempFOVDistance && headPositions[bestTargetIndex][t].simtime > pLocal->GetSimulationTime() - 1) 175 | { 176 | tempFloat = tempFOVDistance; 177 | bestTargetSimTime = headPositions[bestTargetIndex][t].simtime; 178 | } 179 | } 180 | 181 | cmd->tick_count = TIME_TO_TICKS(bestTargetSimTime); 182 | 183 | } 184 | } 185 | } 186 | static std::dequesequences; 187 | 188 | //Adds latency to the local player 189 | void BackTrack::AddLatencyToNetchan(INetChannel *netchan, float Latency) 190 | { 191 | for (auto& seq : sequences) 192 | { 193 | if (g_Globals->realtime - seq.curtime >= Latency) 194 | { 195 | netchan->m_nInReliableState = seq.inreliablestate; 196 | //netchan->m_nOutReliableState = seq.outreliablestate; 197 | netchan->m_nInSequenceNr = seq.sequencenr; 198 | break; 199 | } 200 | } 201 | } 202 | BackTrack* backtracking = new BackTrack(); 203 | backtrackData headPositions[64][12]; -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/LagComp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "SDK.h" 3 | 4 | #define FAKE_LATENCY_AMOUNT 0.046875f //here fake latecy 5 | #define LAG_COMPENSATION_EPS_SQR ( 0.1f * 0.1f ) 6 | #define LAG_COMPENSATION_ERROR_EPS_SQR ( 4.0f * 4.0f ) 7 | 8 | struct CIncomingSequence 9 | { 10 | CIncomingSequence::CIncomingSequence(int instate, int outstate, int seqnr, float time) 11 | { 12 | inreliablestate = instate; 13 | outreliablestate = outstate; 14 | sequencenr = seqnr; 15 | curtime = time; 16 | } 17 | int inreliablestate; 18 | int outreliablestate; 19 | int sequencenr; 20 | float curtime; 21 | }; 22 | 23 | struct lbyRecords 24 | { 25 | int tick_count; 26 | float lby; 27 | Vector headPosition; 28 | }; 29 | struct backtrackData 30 | { 31 | float simtime; 32 | Vector hitboxPos; 33 | }; 34 | 35 | class BackTrack 36 | { 37 | int latest_tick; 38 | bool IsTickValid(int tick); 39 | void UpdateRecord(int i); 40 | public: 41 | lbyRecords records[64]; 42 | bool RunLBYBackTrack(int i, CInput::CUserCmd* cmd, Vector& aimPoint); 43 | void Update(int tick_count); 44 | void legitBackTrack(CInput::CUserCmd* cmd, C_BaseEntity* pLocal); 45 | void RageBackTrack(CInput::CUserCmd* cmd, C_BaseEntity* pLocal); 46 | void AddLatencyToNetchan(INetChannel * netchan, float Latency); 47 | }; 48 | 49 | extern backtrackData headPositions[64][12]; 50 | 51 | extern BackTrack* backtracking; 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/LegitBot.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #pragma once 5 | 6 | #include "SDK.h" 7 | #include "singleton.hpp" 8 | 9 | 10 | class legitbot 11 | : public singleton 12 | { 13 | public: 14 | legitbot(); 15 | void OnCreateMove(CInput::CUserCmd *pCmd, C_BaseEntity *local, bool& bSendPacket); 16 | void LegitAA(CInput::CUserCmd * pCmd, bool & bSendPacket); 17 | private: 18 | // Targetting 19 | 20 | void weapon_settings(CBaseCombatWeapon* pWeapon); 21 | bool hit_chance(C_BaseEntity* local, CInput::CUserCmd* cmd, CBaseCombatWeapon* pWeapon, C_BaseEntity* 22 | target); 23 | bool AimAtPoint(C_BaseEntity* pLocal, Vector point, CInput::CUserCmd *pCmd); 24 | bool IsLocked; 25 | 26 | void do_aimbot(C_BaseEntity *local, CBaseCombatWeapon *pWeapon, CInput::CUserCmd *cmd); 27 | QAngle get_randomized_recoil(C_BaseEntity* local); 28 | QAngle get_randomized_angles(C_BaseEntity* local); 29 | void triggerbot(CInput::CUserCmd* cmd, C_BaseEntity* local, CBaseCombatWeapon* pWeapon); 30 | 31 | 32 | // Functionality 33 | bool get_hitbox(C_BaseEntity *local, C_BaseEntity *entity, Vector &destination); 34 | int get_target(C_BaseEntity *local, CBaseCombatWeapon *pWeapon, CInput::CUserCmd *cmd, Vector &destination); 35 | 36 | // Aimbot 37 | int best_target; 38 | 39 | QAngle view_angle; 40 | QAngle aim_angle; 41 | QAngle delta_angle; 42 | QAngle final_angle; 43 | 44 | Vector hitbox_position; 45 | 46 | int aim_key; 47 | float aim_smooth; 48 | float aim_fov; 49 | float randomized_smooth; 50 | float recoil_min; 51 | float recoil_max; 52 | float randomized_angle; 53 | int hitbox; 54 | bool shoot; 55 | 56 | 57 | }; 58 | 59 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Listener.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "singleton.hpp" 3 | #include "MiscClasses.h" 4 | #include "Interfaces.h" 5 | #include "Interface.h" 6 | #include "Sounds.h" 7 | #include "Logging.h" 8 | 9 | #pragma comment(lib, "winmm.lib") 10 | 11 | 12 | char* HitgroupToName(int hitgroup) 13 | { 14 | switch (hitgroup) 15 | { 16 | case 1: 17 | return "head"; 18 | case 6: 19 | return "arm"; 20 | case 7: 21 | return "leg"; 22 | case 3: 23 | return "stomach"; 24 | default: 25 | return "body"; 26 | } 27 | } 28 | class item_purchase 29 | 30 | : public singleton 31 | { 32 | class item_purchase_listener 33 | : public IGameEventListener2 34 | { 35 | public: 36 | void start() 37 | { 38 | g_EventManager->AddListener(this, "item_purchase", false); 39 | g_EventManager->AddListener(this, "player_hurt", false); 40 | } 41 | void stop() 42 | { 43 | g_EventManager->RemoveListener(this); 44 | } 45 | void FireGameEvent(IGameEvent *event) override 46 | { 47 | singleton()->on_fire_event(event, false); 48 | } 49 | int GetEventDebugID(void) override 50 | { 51 | return 42 /*0x2A*/; 52 | } 53 | }; 54 | 55 | public: 56 | 57 | static item_purchase* singleton() 58 | { 59 | static item_purchase* instance = new item_purchase; 60 | return instance; 61 | } 62 | 63 | void initialize() 64 | { 65 | listener.start(); 66 | } 67 | 68 | void remove() 69 | { 70 | listener.stop(); 71 | } 72 | 73 | void on_fire_event(IGameEvent* event, bool drawing) 74 | { 75 | static AppLog log; 76 | if (drawing) 77 | { 78 | log.Draw("Console"); 79 | } 80 | 81 | if (!drawing) 82 | { 83 | C_BaseEntity* local = g_EntityList->GetClientEntity(g_Engine->GetLocalPlayer()); 84 | if (!strcmp(event->GetName(), "item_purchase")) 85 | { 86 | auto buyer = event->GetInt("userid"); 87 | std::string gun = event->GetString("weapon"); 88 | 89 | if (strstr(gun.c_str(), "kevlar") 90 | || strstr(gun.c_str(), "decoy") 91 | || strstr(gun.c_str(), "suit") 92 | || strstr(gun.c_str(), "vest") 93 | || strstr(gun.c_str(), "cutter") 94 | || strstr(gun.c_str(), "defuse") 95 | ) return; 96 | auto player_index = g_Engine->GetPlayerForUserID(buyer); 97 | C_BaseEntity* player = (C_BaseEntity*)g_EntityList->GetClientEntity(player_index); 98 | player_info_t pinfo; 99 | 100 | if (g_Options.Misc.PurchaseInfo) 101 | if (player && local && g_Engine->GetPlayerInfo(player_index, &pinfo)) 102 | { 103 | gun.erase(gun.find("weapon_"), 7); 104 | if (player->GetTeamNum() == local->GetTeamNum()) 105 | { 106 | 107 | } 108 | else 109 | { 110 | g_CVar->ConsoleColorPrintf(Color::Purple(), "[insidous]", pinfo.name, gun.c_str()); 111 | G::Msg(" ""\x04""%s bought %s\n", pinfo.name, gun.c_str()); 112 | } 113 | 114 | } 115 | } 116 | 117 | if (!strcmp(event->GetName(), "player_hurt")) 118 | { 119 | int deadfag = event->GetInt("userid"); 120 | int attackingfag = event->GetInt("attacker"); 121 | C_BaseEntity* pLocal = g_EntityList->GetClientEntity(g_Engine->GetLocalPlayer()); 122 | if (g_Engine->GetPlayerForUserID(deadfag) != g_Engine->GetLocalPlayer() && g_Engine->GetPlayerForUserID(attackingfag) == g_Engine->GetLocalPlayer()) 123 | { 124 | C_BaseEntity* hittedplayer = (C_BaseEntity*)(g_Engine->GetPlayerForUserID(deadfag)); 125 | int hit = event->GetInt("hitgroup"); 126 | if (hit >= 0 && hittedplayer && deadfag && attackingfag) 127 | { 128 | Globals::missedshots++; 129 | } 130 | else 131 | { 132 | Globals::missedshots++; 133 | } 134 | } 135 | } 136 | 137 | if (!strcmp(event->GetName(), "player_hurt")) 138 | { 139 | auto bitch = event->GetInt("userid"); 140 | auto coolguy49 = event->GetInt("attacker"); 141 | int dmg = event->GetInt("dmg_health"); 142 | int health = event->GetInt("health"); 143 | 144 | 145 | auto bitch_index = g_Engine->GetPlayerForUserID(bitch); 146 | auto coolguy49_index = g_Engine->GetPlayerForUserID(coolguy49); 147 | C_BaseEntity* bitch_ = (C_BaseEntity*)g_EntityList->GetClientEntity(bitch_index); 148 | C_BaseEntity* coolguy49_ = (C_BaseEntity*)g_EntityList->GetClientEntity(coolguy49_index); 149 | player_info_t bitch_info; 150 | player_info_t coolguy49_info; 151 | 152 | if (coolguy49_ == local) 153 | { 154 | G::hitmarkeralpha = 1.f; 155 | switch (g_Options.Visuals.Hitsound) 156 | { 157 | case 0: break; 158 | case 1: PlaySoundA(rawData, NULL, SND_ASYNC | SND_MEMORY); break; // Default 159 | case 2: PlaySoundA(roblox, NULL, SND_ASYNC | SND_MEMORY); break; // Anime 160 | case 3: PlaySoundA(china, NULL, SND_ASYNC | SND_MEMORY); break; // CHINA 161 | case 4: PlaySoundA(skeethitmarker_wav, NULL, SND_ASYNC | SND_MEMORY); break; // Skeet 162 | case 5: PlaySoundA(hitler_wav, NULL, SND_ASYNC | SND_MEMORY); break; // German 163 | } 164 | 165 | } 166 | } 167 | if (!strcmp(event->GetName(), "player_hurt") && g_Options.Misc.DmgInfo) 168 | { 169 | 170 | int iAttacker = g_Engine->GetPlayerForUserID(event->GetInt("attacker")); 171 | int iVictim = g_Engine->GetPlayerForUserID(event->GetInt("userid")); 172 | 173 | if (iAttacker == g_Engine->GetLocalPlayer() && iVictim != g_Engine->GetLocalPlayer()) 174 | { 175 | 176 | auto pVictim = reinterpret_cast(g_EntityList->GetClientEntity(iVictim)); 177 | player_info_t pinfo; 178 | g_Engine->GetPlayerInfo(iVictim, &pinfo); 179 | 180 | g_CVar->ConsoleColorPrintf(Color(200, 255, 0, 255), "[insidous.cc]"); 181 | G::Msg("Hit %s in the %s for %d (%d health remaining) \n", pinfo.name, HitgroupToName(event->GetInt("hitgroup")), event->GetInt("dmg_health"), event->GetInt("health")); 182 | 183 | } 184 | } 185 | } 186 | } 187 | private: 188 | item_purchase_listener listener; 189 | }; 190 | 191 | item_purchase purchase; 192 | 193 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Logging.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "ImGui/imgui.h" 3 | 4 | 5 | struct AppLog 6 | { 7 | ImGuiTextBuffer Buf; 8 | ImVector LineOffsets; 9 | 10 | bool ScrollToBottom; 11 | void Clear() { Buf.clear(); LineOffsets.clear(); } 12 | 13 | void AddLog(const char* fmt, ...) 14 | { 15 | 16 | 17 | int old_size = Buf.size(); 18 | va_list args; 19 | va_start(args, fmt); 20 | Buf.appendv(fmt, args); 21 | va_end(args); 22 | for (int new_size = Buf.size(); old_size < new_size; old_size++) 23 | if (Buf[old_size] == '\n') 24 | LineOffsets.push_back(old_size); 25 | ScrollToBottom = true; 26 | } 27 | 28 | void Draw(const char* title, bool p_open = true) 29 | { 30 | ImGui::Begin(title, &p_open, ImVec2(400, 250), 0.3f); 31 | 32 | ImGui::TextUnformatted(Buf.begin()); 33 | 34 | ImGui::End(); 35 | } 36 | }; -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/MathFunctions.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "Vector.h" 4 | #include "MathFunctions.h" 5 | #include "CommonIncludes.h" 6 | #define M_PI 3.14159265358979323846 7 | void AngleVectors(const Vector &angles, Vector *forward) 8 | { 9 | Assert(s_bMathlibInitialized); 10 | Assert(forward); 11 | 12 | float sp, sy, cp, cy; 13 | 14 | sy = sin(DEG2RAD(angles[1])); 15 | cy = cos(DEG2RAD(angles[1])); 16 | 17 | sp = sin(DEG2RAD(angles[0])); 18 | cp = cos(DEG2RAD(angles[0])); 19 | 20 | forward->x = cp*cy; 21 | forward->y = cp*sy; 22 | forward->z = -sp; 23 | } 24 | 25 | void AngleVectors2(const Vector& qAngles, Vector& vecForward) 26 | { 27 | float sp, sy, cp, cy; 28 | SinCos((float)(qAngles[1] * (M_PI / 180.f)), &sy, &cy); 29 | SinCos((float)(qAngles[0] * (M_PI / 180.f)), &sp, &cp); 30 | 31 | vecForward[0] = cp*cy; 32 | vecForward[1] = cp*sy; 33 | vecForward[2] = -sp; 34 | } 35 | 36 | void VectorTransform(const Vector in1, float in2[3][4], Vector &out) 37 | { 38 | out[0] = DotProduct(in1, Vector(in2[0][0], in2[0][1], in2[0][2])) + in2[0][3]; 39 | out[1] = DotProduct(in1, Vector(in2[1][0], in2[1][1], in2[1][2])) + in2[1][3]; 40 | out[2] = DotProduct(in1, Vector(in2[2][0], in2[2][1], in2[2][2])) + in2[2][3]; 41 | } 42 | 43 | void SinCos(float a, float* s, float*c) 44 | { 45 | *s = sin(a); 46 | *c = cos(a); 47 | } 48 | 49 | void VectorAngles(Vector forward, Vector &angles) 50 | { 51 | float tmp, yaw, pitch; 52 | 53 | yaw = (atan2(forward[1], forward[0]) * 180 / PI); 54 | tmp = sqrt(forward[0] * forward[0] + forward[1] * forward[1]); 55 | pitch = (atan2(-forward[2], tmp) * 180 / PI); 56 | 57 | 58 | while (yaw <= -180) yaw += 360; 59 | while (yaw > 180) yaw -= 360; 60 | while (pitch <= -180) pitch += 360; 61 | while (pitch > 180) pitch -= 360; 62 | 63 | 64 | if (pitch > 89.0f) 65 | pitch = 89.0f; 66 | else if (pitch < -89.0f) 67 | pitch = -89.0f; 68 | 69 | if (yaw > 179.99999f) 70 | yaw = 179.99999f; 71 | else if (yaw < -179.99999f) 72 | yaw = -179.99999f; 73 | 74 | angles[0] = pitch; 75 | angles[1] = yaw; 76 | angles[2] = 0; 77 | } 78 | 79 | void AngleVectors(const Vector &angles, Vector *forward, Vector *right, Vector *up) 80 | { 81 | float sr, sp, sy, cr, cp, cy; 82 | 83 | SinCos(DEG2RAD(angles[1]), &sy, &cy); 84 | SinCos(DEG2RAD(angles[0]), &sp, &cp); 85 | SinCos(DEG2RAD(angles[2]), &sr, &cr); 86 | 87 | if (forward) 88 | { 89 | forward->x = cp*cy; 90 | forward->y = cp*sy; 91 | forward->z = -sp; 92 | } 93 | 94 | if (right) 95 | { 96 | right->x = (-1 * sr*sp*cy + -1 * cr*-sy); 97 | right->y = (-1 * sr*sp*sy + -1 * cr*cy); 98 | right->z = -1 * sr*cp; 99 | } 100 | 101 | if (up) 102 | { 103 | up->x = (cr*sp*cy + -sr*-sy); 104 | up->y = (cr*sp*sy + -sr*cy); 105 | up->z = cr*cp; 106 | } 107 | } 108 | 109 | void Normalize(Vector &vIn, Vector &vOut) 110 | { 111 | float flLen = vIn.Length(); 112 | if (flLen == 0) { 113 | vOut.Init(0, 0, 1); 114 | return; 115 | } 116 | flLen = 1 / flLen; 117 | vOut.Init(vIn.x * flLen, vIn.y * flLen, vIn.z * flLen); 118 | } 119 | 120 | 121 | void CalcAngle(Vector src, Vector dst, Vector &angles) 122 | { 123 | Vector delta = src - dst; 124 | double hyp = delta.Length2D(); 125 | angles.y = (atan(delta.y / delta.x) * 57.295779513082f); 126 | angles.x = (vec_t)(atan(delta.z / hyp) * 57.295779513082f); 127 | angles[2] = 0.00; 128 | 129 | if (delta.x >= 0.0) 130 | angles.y += 180.0f; 131 | } 132 | 133 | 134 | 135 | void AverageDifference(const Vector& a, const Vector& b, float& result) 136 | { 137 | Vector calcvec; 138 | calcvec.x = abs(a.x - b.x); 139 | calcvec.y = abs(a.y - b.y); 140 | calcvec.z = abs(a.y - b.y); 141 | 142 | result = (calcvec.x + calcvec.y + calcvec.z) / 3.f; 143 | } 144 | 145 | Vector CalcAngle(Vector& src, Vector& dst) 146 | { 147 | Vector vAngle; 148 | Vector delta((src.x - dst.x), (src.y - dst.y), (src.z - dst.z)); 149 | double hyp = sqrt(delta.x*delta.x + delta.y*delta.y); 150 | 151 | vAngle.x = float(atanf(float(delta.z / hyp)) * 57.295779513082f); 152 | vAngle.y = float(atanf(float(delta.y / delta.x)) * 57.295779513082f); 153 | vAngle.z = 0.0f; 154 | 155 | if (delta.x >= 0.0) 156 | vAngle.y += 180.0f; 157 | 158 | return vAngle; 159 | } 160 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/MathFunctions.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #pragma once 5 | 6 | #include "Vector.h" 7 | #include 8 | #include 9 | #define PI 3.14159265358979323846f 10 | #define DEG2RAD( x ) ( ( float )( x ) * ( float )( ( float )( PI ) / 180.0f ) ) 11 | #define RAD2DEG( x ) ( ( float )( x ) * ( float )( 180.0f / ( float )( PI ) ) ) 12 | #define RADPI 57.295779513082f 13 | 14 | void AngleVectors(const Vector &angles, Vector *forward); 15 | void VectorTransform(const Vector in1, float in2[3][4], Vector &out); 16 | void SinCos(float a, float* s, float*c); 17 | void VectorAngles(Vector forward, Vector &angles); 18 | void AngleVectors(const Vector &angles, Vector *forward, Vector *right, Vector *up); 19 | void Normalize(Vector &vIn, Vector &vOut); 20 | void CalcAngle(Vector src, Vector dst, Vector &angles); 21 | void AngleVectors2(const Vector& qAngles, Vector& vecForward); 22 | void ClampAngles(Vector& inputangle); 23 | void AverageDifference(const Vector& a, const Vector& b, float& result); 24 | Vector CalcAngle(Vector& src, Vector& dst); 25 | #define M_RADPI 57.295779513082f 26 | inline void compute_angle(const Vector &source, const Vector &destination, QAngle& angles) 27 | { 28 | Vector delta = source - destination; 29 | angles.x = static_cast< float >(asin(delta.z / delta.Length()) * M_RADPI); 30 | angles.y = static_cast< float >(atan(delta.y / delta.x) * M_RADPI); 31 | angles.z = 0.0f; 32 | 33 | if (delta.x >= 0.0f) 34 | angles.y += 180.0f; 35 | } 36 | inline QAngle compute_angle(const Vector &source, const Vector &destination) 37 | { 38 | QAngle angles; 39 | 40 | Vector delta = source - destination; 41 | angles.x = static_cast< float >(asin(delta.z / delta.Length()) * M_RADPI); 42 | angles.y = static_cast< float >(atan(delta.y / delta.x) * M_RADPI); 43 | angles.z = 0.0f; 44 | 45 | if (delta.x >= 0.0f) 46 | angles.y += 180.0f; 47 | 48 | return angles; 49 | } 50 | inline float get_distance(const Vector &start, const Vector &end) 51 | { 52 | float distance = sqrt((start - end).Length()); 53 | 54 | if (distance < 1.0f) 55 | distance = 1.0f; 56 | 57 | return distance; 58 | } 59 | inline void clamp_angles(QAngle& angles) 60 | { 61 | if (angles.x > 89.0f) angles.x = 89.0f; 62 | else if (angles.x < -89.0f) angles.x = -89.0f; 63 | 64 | if (angles.y > 180.0f) angles.y = 180.0f; 65 | else if (angles.y < -180.0f) angles.y = -180.0f; 66 | 67 | angles.z = 0; 68 | } 69 | inline void normalize_angles(QAngle& angles) 70 | { 71 | for (auto i = 0; i < 3; i++) { 72 | while (angles[i] < -180.0f) angles[i] += 360.0f; 73 | while (angles[i] > 180.0f) angles[i] -= 360.0f; 74 | } 75 | } 76 | inline bool sanitize_angles(QAngle &angles) 77 | { 78 | QAngle temp = angles; 79 | normalize_angles(temp); 80 | clamp_angles(temp); 81 | 82 | if (!isfinite(temp.x) || 83 | !isfinite(temp.y) || 84 | !isfinite(temp.z)) 85 | return false; 86 | 87 | angles = temp; 88 | 89 | return true; 90 | } 91 | 92 | inline Vector angle_vector(Vector meme) 93 | { 94 | auto sy = sin(meme.y / 180.f * static_cast(PI)); 95 | auto cy = cos(meme.y / 180.f * static_cast(PI)); 96 | 97 | auto sp = sin(meme.x / 180.f * static_cast(PI)); 98 | auto cp = cos(meme.x / 180.f* static_cast(PI)); 99 | 100 | return Vector(cp*cy, cp*sy, -sp); 101 | } 102 | inline float distance_point_to_line(Vector Point, Vector LineOrigin, Vector Dir) 103 | { 104 | auto PointDir = Point - LineOrigin; 105 | 106 | auto TempOffset = PointDir.Dot(Dir) / (Dir.x*Dir.x + Dir.y*Dir.y + Dir.z*Dir.z); 107 | if (TempOffset < 0.000001f) 108 | return FLT_MAX; 109 | 110 | auto PerpendicularPoint = LineOrigin + (Dir * TempOffset); 111 | 112 | return (Point - PerpendicularPoint).Length(); 113 | } 114 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Misc.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #pragma once 4 | 5 | #include "entities.h" 6 | #include "SDK.h" 7 | #include "singleton.hpp" 8 | 9 | Vector GetAutostrafeView(); 10 | 11 | class misc 12 | : public singleton 13 | { 14 | public: 15 | void OnCreateMove(CInput::CUserCmd *cmd, C_BaseEntity *local); 16 | void logsrun(); 17 | void logsrun2(); 18 | void LeftKnife(); 19 | void OnCreateMove(CInput::CUserCmd * cmd, C_BaseEntity * local, bool & bSendPacket); 20 | static void AutoStrafe(CInput::CUserCmd *cmd, C_BaseEntity *local, QAngle oldangles); 21 | 22 | void FakeLag(bool & bSendPacket); 23 | 24 | void FakeWalk(CUserCmd * pCmd, bool & bSendPacket); 25 | 26 | static Vector Normalize(Vector& angs) 27 | { 28 | while (angs.y < -180.0f) 29 | angs.y += 360.0f; 30 | while (angs.y > 180.0f) 31 | angs.y -= 360.0f; 32 | if (angs.x > 89.0f) 33 | angs.x = 89.0f; 34 | if (angs.x < -89.0f) 35 | angs.x = -89.0f; 36 | angs.z = 0; 37 | return angs; 38 | } 39 | 40 | 41 | }; 42 | 43 | template 44 | inline T clamp(T in, U low, U high) 45 | { 46 | if (in <= low) 47 | return low; 48 | else if (in >= high) 49 | return high; 50 | else 51 | return in; 52 | } 53 | 54 | inline float bitsToFloat(unsigned long i) 55 | { 56 | return *reinterpret_cast(&i); 57 | } 58 | 59 | 60 | inline float FloatNegate(float f) 61 | { 62 | return bitsToFloat(FloatBits(f) ^ 0x80000000); 63 | } 64 | 65 | inline void SetName(const char* new_name) 66 | { 67 | static auto name = g_CVar->FindVar("name"); 68 | 69 | name->SetValue(new_name); 70 | *reinterpret_cast(uintptr_t(&name->fnChangeCallback) + 0xC) = 0; 71 | } 72 | inline void setclantag(const char* tag) 73 | { 74 | static auto ClanTagOffset = U::FindPattern("engine.dll", (PBYTE)"\x53\x56\x57\x8B\xDA\x8B\xF9\xFF\x15", "xxxxxxxxx"); 75 | if (ClanTagOffset) 76 | { 77 | auto tag_ = std::string(tag); 78 | if (strlen(tag) > 0) { 79 | auto newline = tag_.find("\\n"); 80 | auto tab = tag_.find("\\t"); 81 | if (newline != std::string::npos) { 82 | tag_.replace(newline, newline + 2, "\n"); 83 | } 84 | if (tab != std::string::npos) { 85 | tag_.replace(tab, tab + 2, "\t"); 86 | } 87 | } 88 | static auto dankesttSetClanTag = reinterpret_cast(ClanTagOffset); 89 | dankesttSetClanTag(tag_.data(), tag_.data()); 90 | } 91 | } 92 | inline void RankReveal(CInput::CUserCmd* cmd) 93 | { 94 | if (cmd->buttons & IN_SCORE) 95 | { 96 | static auto ServerRankRevealAll = (bool(__cdecl*)(int*))((PDWORD)U::FindPattern("client.dll", (PBYTE)"\x55\x8B\xEC\x8B\x0D\x00\x00\x00\x00\x68\x00\x00\x00\x00", "xxxxx????x????")); 97 | if (g_Options.Misc.ServerRankRevealAll) 98 | { 99 | static int fArray[3] = { 0,0,0 }; 100 | ServerRankRevealAll(fArray); 101 | } 102 | } 103 | } 104 | 105 | char* const tuxlist[] = 106 | { 107 | "BETA", 108 | 109 | }; 110 | char* const ezfragslist[] = 111 | { 112 | "Register NOW on Insidous.cc", 113 | "Get huge bonuses and advantages", 114 | "Join our giveaway and register", 115 | "And you have a chance to win", 116 | "A prize is free lifetime Insidous.cc", 117 | "And access to BETA Insidious", 118 | "Insidous.cc", 119 | 120 | }; 121 | char* const phooklist[] = 122 | { 123 | "BETA", 124 | 125 | }; 126 | 127 | char* const skybox_models[] = 128 | { 129 | "cs_baggage_skybox_", 130 | "cs_tibet", 131 | "embassy", 132 | "italy", 133 | "jungle", 134 | "nukeblank", 135 | "office", 136 | "sky_cs15_daylight01_hdr", 137 | "sky_cs15_daylight02_hdr", 138 | "sky_cs15_daylight03_hdr", 139 | "sky_cs15_daylight04_hdr", 140 | "sky_csgo_cloudy01", 141 | "sky_csgo_night02", 142 | "sky_csgo_night02b", 143 | "sky_csgo_night_flat", 144 | "sky_day02_05_hdr", 145 | "sky_day02_05", 146 | "sky_venice", 147 | "sky_dust", 148 | "sky_l4d_rural02_ldr", 149 | "vertigo_hdr", 150 | "vertigoblue_hdr", 151 | "vertigo", 152 | "vietnam" 153 | }; 154 | 155 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/MiscClasses.cpp: -------------------------------------------------------------------------------- 1 | #include "MiscClasses.h" 2 | 3 | void CClientState::ForceFullUpdate() 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/MiscFunctions.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "SDK.h" 5 | 6 | namespace MiscFunctions 7 | { 8 | void NormaliseViewAngle(Vector &angle); 9 | bool IsVisible(C_BaseEntity* pLocal, C_BaseEntity* pEntity, int BoneID); 10 | bool IsKnife(void* weapon); 11 | bool IsPistol(void* weapon); 12 | bool IsSniper(void* weapon); 13 | bool IsGrenade(void* weapon); 14 | bool IsRifle(void* weapon); 15 | bool IsSmg(void* weapon); 16 | bool IsHeavy(void* weapon); 17 | bool IsRevolver(void* weapon); 18 | // int GetPlayerCompRank(C_BaseEntity* pEntity); 19 | }; 20 | 21 | // Trace Line Memes 22 | void UTIL_TraceLine(const Vector& vecAbsStart, const Vector& vecAbsEnd, unsigned int mask, 23 | C_BaseEntity *ignore, int collisionGroup, trace_t *ptr); 24 | 25 | void UTIL_ClipTraceToPlayers(C_BaseEntity* pEntity, Vector start, Vector end, unsigned int mask, ITraceFilter* filter, trace_t* tr); 26 | 27 | bool IsBreakableEntity(C_BaseEntity* ent); 28 | 29 | bool TraceToExit(Vector& end, trace_t& tr, Vector start, Vector vEnd, trace_t* trace); 30 | 31 | void SayInChat(const char *text); 32 | 33 | Vector GetHitboxPosition(C_BaseEntity* pEntity, int Hitbox); 34 | Vector GetHitboxPositionFromMatrix(C_BaseEntity* pEntity, matrix3x4 matrix[128], int Hitbox); 35 | 36 | void ForceUpdate(); 37 | 38 | 39 | inline void clampMovement(CInput::CUserCmd* cmd) 40 | { 41 | if (cmd->forwardmove >= 450) cmd->forwardmove = 450; 42 | if (cmd->sidemove >= 450) cmd->sidemove = 450; 43 | if (cmd->upmove >= 450) cmd->upmove = 450; 44 | if (cmd->forwardmove <= -450) cmd->forwardmove = -450; 45 | if (cmd->sidemove <= -450) cmd->sidemove = -450; 46 | if (cmd->upmove <= -450) cmd->upmove = -450; 47 | } 48 | #define PI 3.14159265358979323846f 49 | #define DEG2RAD( x ) ( ( float )( x ) * ( float )( ( float )( PI ) / 180.0f ) ) 50 | #define RAD2DEG( x ) ( ( float )( x ) * ( float )( 180.0f / ( float )( PI ) ) ) 51 | #define RADPI 57.295779513082f 52 | 53 | inline float sseSqrt(float x) 54 | { 55 | float root = 0.0f; 56 | 57 | __asm 58 | { 59 | sqrtss xmm0, x 60 | movss root, xmm0 61 | } 62 | 63 | return root; 64 | } 65 | #define square( x ) ( x * x ) 66 | inline void vectorAnglesVec(Vector forward, Vector& angles) 67 | { 68 | if (forward[1] == 0.0f && forward[0] == 0.0f) 69 | { 70 | angles[0] = (forward[2] > 0.0f) ? 270.0f : 90.0f; 71 | angles[1] = 0.0f; 72 | } 73 | else 74 | { 75 | float len2d = sseSqrt(square(forward[0]) + square(forward[1])); 76 | 77 | angles[0] = RAD2DEG(atan2f(-forward[2], len2d)); 78 | angles[1] = RAD2DEG(atan2f(forward[1], forward[0])); 79 | 80 | if (angles[0] < 0.0f) 81 | angles[0] += 360.0f; 82 | if (angles[1] < 0.0f) 83 | angles[1] += 360.0f; 84 | } 85 | } 86 | 87 | inline static Vector Normalizekek(Vector& angs) 88 | { 89 | while (angs.y < -180.0f) 90 | angs.y += 360.0f; 91 | while (angs.y > 180.0f) 92 | angs.y -= 360.0f; 93 | if (angs.x > 89.0f) 94 | angs.x = 89.0f; 95 | if (angs.x < -89.0f) 96 | angs.x = -89.0f; 97 | angs.z = 0; 98 | return angs; 99 | } 100 | 101 | inline void movementfix(QAngle realvec, CInput::CUserCmd* cmd) 102 | { 103 | Vector vMove(cmd->forwardmove, cmd->sidemove, cmd->upmove); 104 | float flSpeed = sqrt(vMove.x * vMove.x + vMove.y * vMove.y), flYaw; 105 | Vector vMove2; 106 | vectorAnglesVec(vMove, vMove2); 107 | Normalizekek(vMove2); 108 | flYaw = DEG2RAD(cmd->viewangles.y - realvec.y + vMove2.y); 109 | cmd->forwardmove = cos(flYaw) * flSpeed; 110 | cmd->sidemove = sin(flYaw) * flSpeed; 111 | if (90 < abs(cmd->viewangles.x) && 180 > abs(cmd->viewangles.x)) 112 | cmd->forwardmove *= -1; 113 | } -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/MovementRecorder.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "HookIncludes.h" 3 | #include "Render.h" 4 | #include "Variables.h" 5 | struct Recording_t 6 | { 7 | QAngle m_ViewAngles; 8 | Vector m_RecordedWaypoints; 9 | float m_ForwardMove; 10 | float m_SideMove; 11 | float m_UpMove; 12 | int m_Buttons; 13 | bool m_bShouldJump = false; 14 | bool m_IsInitialized = false; 15 | }; 16 | 17 | int m_iRecordFrame = 0; 18 | int m_iReplayFrame = 0; 19 | 20 | Recording_t m_RecordWaypoints[100000]; 21 | #define VMD_PI 3.14159265358979323846 22 | #define DEGTORAD(a) (a*VMD_PI/180.0) 23 | bool m_bIsRecording; 24 | bool m_bIsReplaying; 25 | int m_iOldTickCount; 26 | 27 | void RotateMovement(CInput::CUserCmd* pCmd, float rotation) 28 | { 29 | rotation = (float)(DEGTORAD(rotation)); 30 | 31 | float cos_rot = cos(rotation); 32 | float sin_rot = sin(rotation); 33 | 34 | float new_forwardmove = (cos_rot * pCmd->forwardmove) - (sin_rot * pCmd->sidemove); 35 | float new_sidemove = (sin_rot * pCmd->forwardmove) + (cos_rot * pCmd->sidemove); 36 | 37 | pCmd->forwardmove = new_forwardmove; 38 | pCmd->sidemove = new_sidemove; 39 | } 40 | 41 | static void MovementRecorder(CInput::CUserCmd *cmd) 42 | { 43 | C_BaseEntity *pLocalPlayer = g_EntityList->GetClientEntity(g_Engine->GetLocalPlayer()); 44 | 45 | if (g_Options.Misc.isRecording && !m_bIsRecording && !(g_Options.Misc.isReplaying)) 46 | { 47 | m_bIsRecording = true; 48 | 49 | memset(m_RecordWaypoints, 0, sizeof(m_RecordWaypoints)); 50 | } 51 | else if (!(g_Options.Misc.isRecording && m_bIsRecording)) 52 | { 53 | m_bIsRecording = false; 54 | 55 | m_iRecordFrame = 0; 56 | } 57 | 58 | if (g_Options.Misc.isReplaying && !m_bIsReplaying && !g_Options.Misc.isRecording) 59 | { 60 | m_bIsReplaying = true; 61 | } 62 | else if (!g_Options.Misc.isReplaying) 63 | { 64 | m_bIsReplaying = false; 65 | 66 | m_iReplayFrame = 0; 67 | } 68 | 69 | if (m_bIsRecording) 70 | { 71 | 72 | 73 | m_RecordWaypoints[m_iRecordFrame].m_RecordedWaypoints = pLocalPlayer->GetOrigin(); 74 | m_RecordWaypoints[m_iRecordFrame].m_ForwardMove = cmd->forwardmove; 75 | m_RecordWaypoints[m_iRecordFrame].m_SideMove = cmd->sidemove; 76 | m_RecordWaypoints[m_iRecordFrame].m_UpMove = cmd->upmove; 77 | m_RecordWaypoints[m_iRecordFrame].m_ViewAngles = cmd->viewangles; 78 | m_RecordWaypoints[m_iRecordFrame].m_Buttons = cmd->buttons; 79 | m_RecordWaypoints[m_iRecordFrame].m_IsInitialized = true; 80 | 81 | //if (cmd->buttons & IN_JUMP) 82 | //m_RecordWaypoints[m_iRecordFrame].m_bShouldJump = true; 83 | 84 | m_iRecordFrame++; 85 | 86 | m_iOldTickCount = cmd->tick_count; 87 | } 88 | 89 | 90 | if (m_bIsReplaying) 91 | { 92 | if (m_iReplayFrame == 0) 93 | { 94 | float Diff; 95 | AverageDifference(pLocalPlayer->GetOrigin(), m_RecordWaypoints[0].m_RecordedWaypoints, Diff); 96 | 97 | if (Diff > 1.f) 98 | { 99 | Vector Dest = CalcAngle(pLocalPlayer->GetEyePosition(), m_RecordWaypoints[0].m_RecordedWaypoints); 100 | 101 | 102 | if (Diff < 30.f) 103 | cmd->forwardmove = Diff; 104 | else 105 | cmd->forwardmove = 450.f; 106 | 107 | float flYawDelta = cmd->viewangles.y - Dest.y; 108 | RotateMovement(cmd, flYawDelta); 109 | } 110 | else 111 | { 112 | m_iReplayFrame++; 113 | } 114 | } 115 | else 116 | { 117 | //test 118 | g_Engine->SetViewAngles(m_RecordWaypoints[m_iReplayFrame].m_ViewAngles); 119 | cmd->sidemove = m_RecordWaypoints[m_iReplayFrame].m_SideMove; 120 | cmd->forwardmove = m_RecordWaypoints[m_iReplayFrame].m_ForwardMove; 121 | cmd->upmove = m_RecordWaypoints[m_iReplayFrame].m_UpMove; 122 | cmd->buttons = m_RecordWaypoints[m_iReplayFrame].m_Buttons; 123 | 124 | 125 | m_iReplayFrame++; 126 | 127 | if (!m_RecordWaypoints[m_iReplayFrame].m_IsInitialized) 128 | m_iReplayFrame = 0; 129 | } 130 | 131 | m_iOldTickCount = cmd->tick_count; 132 | } 133 | } 134 | 135 | void DrawMovementRecorder() 136 | { 137 | for (int i = 0; i < 99999; i++) 138 | { 139 | if (!m_RecordWaypoints[i].m_IsInitialized) 140 | break; 141 | 142 | if (i - 1 <= 0) 143 | continue; 144 | //test 145 | Color col = i > m_iReplayFrame ? Color(255, 0, 0) : Color(0, 255, 0); 146 | 147 | Vector m_Point, m_Point1; 148 | int sex = i % 4; 149 | switch (sex) 150 | { 151 | case 1: 152 | { 153 | if (g_Render->WorldToScreen(Vector(m_RecordWaypoints[i].m_RecordedWaypoints.x, m_RecordWaypoints[i].m_RecordedWaypoints.y, m_RecordWaypoints[i].m_RecordedWaypoints.z), m_Point)) 154 | { 155 | if (g_Render->WorldToScreen(Vector(m_RecordWaypoints[i].m_RecordedWaypoints.x, m_RecordWaypoints[i].m_RecordedWaypoints.y, m_RecordWaypoints[i].m_RecordedWaypoints.z + 4), m_Point1)) 156 | { 157 | g_Render->Line(m_Point.x, m_Point.y, m_Point1.x, m_Point1.y, Color(255, 255, 255)); 158 | } 159 | 160 | } 161 | break; 162 | } 163 | default: 164 | { 165 | break; 166 | } 167 | } 168 | } 169 | } -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/NetVarManager.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "SDK.h" 3 | #include "CommonIncludes.h" 4 | 5 | void CNetVarManager::Initialize() 6 | { 7 | m_tables.clear(); 8 | 9 | ClientClass *clientClass = g_CHLClient->GetAllClasses(); 10 | if (!clientClass) 11 | return; 12 | 13 | while (clientClass) 14 | { 15 | RecvTable *recvTable = clientClass->m_pRecvTable; 16 | m_tables.push_back(recvTable); 17 | 18 | clientClass = clientClass->m_pNext; 19 | } 20 | } 21 | 22 | int CNetVarManager::GetOffset(const char *tableName, const char *propName) 23 | { 24 | int offset = Get_Prop(tableName, propName); 25 | if (!offset) 26 | { 27 | return 0; 28 | } 29 | return offset; 30 | } 31 | 32 | bool CNetVarManager::HookProp(const char *tableName, const char *propName, RecvVarProxyFn fun) 33 | { 34 | RecvProp *recvProp = 0; 35 | Get_Prop(tableName, propName, &recvProp); 36 | if (!recvProp) 37 | return false; 38 | 39 | recvProp->m_ProxyFn = fun; 40 | 41 | return true; 42 | } 43 | DWORD CNetVarManager::hookProp(const char* tableName, const char* propName, void* hkFunc, void* oldFn) 44 | { 45 | RecvProp* recvProp; 46 | Get_Prop(tableName, propName, &recvProp); 47 | 48 | if (!recvProp) 49 | return false; 50 | 51 | DWORD old = (DWORD)recvProp->m_ProxyFn; 52 | recvProp->m_ProxyFn = (RecvVarProxyFn)hkFunc; 53 | return old; 54 | } 55 | int CNetVarManager::Get_Prop(const char *tableName, const char *propName, RecvProp **prop) 56 | { 57 | RecvTable *recvTable = GetTable(tableName); 58 | if (!recvTable) 59 | return 0; 60 | 61 | int offset = Get_Prop(recvTable, propName, prop); 62 | if (!offset) 63 | return 0; 64 | 65 | return offset; 66 | } 67 | 68 | int CNetVarManager::Get_Prop(RecvTable *recvTable, const char *propName, RecvProp **prop) 69 | { 70 | int extraOffset = 0; 71 | for (int i = 0; i < recvTable->m_nProps; ++i) 72 | { 73 | RecvProp *recvProp = &recvTable->m_pProps[i]; 74 | RecvTable *child = recvProp->m_pDataTable; 75 | 76 | if (child && (child->m_nProps > 0)) 77 | { 78 | int tmp = Get_Prop(child, propName, prop); 79 | if (tmp) 80 | extraOffset += (recvProp->m_Offset + tmp); 81 | } 82 | 83 | if (_stricmp(recvProp->m_pVarName, propName)) 84 | continue; 85 | 86 | if (prop) 87 | *prop = recvProp; 88 | 89 | return (recvProp->m_Offset + extraOffset); 90 | } 91 | 92 | return extraOffset; 93 | } 94 | 95 | RecvTable *CNetVarManager::GetTable(const char *tableName) 96 | { 97 | if (m_tables.empty()) 98 | return 0; 99 | 100 | for each (RecvTable *table in m_tables) 101 | { 102 | if (!table) 103 | continue; 104 | 105 | if (_stricmp(table->m_pNetTableName, tableName) == 0) 106 | return table; 107 | } 108 | 109 | return 0; 110 | } 111 | 112 | 113 | CNetVarManager* NetVarManager = new CNetVarManager; -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/NetVarManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class CNetVarManager 4 | { 5 | public: 6 | void Initialize(); 7 | void GrabOffsets(); 8 | int GetOffset(const char *tableName, const char *propName); 9 | bool HookProp(const char *tableName, const char *propName, RecvVarProxyFn fun); 10 | DWORD hookProp(const char* tableName, const char* propName, void* hkFunc, void* oldFn = 0); 11 | private: 12 | int Get_Prop(const char *tableName, const char *propName, RecvProp **prop = 0); 13 | int Get_Prop(RecvTable *recvTable, const char *propName, RecvProp **prop = 0); 14 | 15 | RecvTable *GetTable(const char *tableName); 16 | std::vector m_tables; 17 | void DumpTable(RecvTable *table, int depth); 18 | }; 19 | 20 | extern CNetVarManager* NetVarManager; -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/OnScreenSizeChanged.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "HookIncludes.h" 3 | 4 | typedef void(__thiscall *OnScreenSizeChangedFn)(ISurface *, int, int); 5 | OnScreenSizeChangedFn oOnScreenSizeChanged; 6 | void __stdcall OnScreenSizeChanged(int oldWidth, int oldHeight); 7 | 8 | void __stdcall OnScreenSizeChanged(int oldWidth, int oldHeight) 9 | { 10 | oOnScreenSizeChanged(g_Surface, oldWidth, oldHeight); 11 | 12 | g_Render->SetupFonts(); 13 | } 14 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/OverrideView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "HookIncludes.h" 3 | 4 | typedef void(__thiscall *override_view_t)(void* _this, CViewSetup* setup); 5 | typedef float(__thiscall *get_fov_t)(void*); 6 | 7 | 8 | 9 | float __fastcall hkGetViewModelFOV(void* ecx, void* edx) 10 | { 11 | static auto ofunc = hooks::clientmode.get_original(35); 12 | float viewmodelFOV = ofunc(ecx); 13 | return g_Options.Visuals.viewmodelChanger; 14 | } 15 | 16 | void __fastcall hkOverrideView(void* _this, void* _edx, CViewSetup* setup) 17 | { 18 | static auto ofunc = hooks::clientmode.get_original(18); 19 | C_BaseEntity *pLocal = g_EntityList->GetClientEntity(g_Engine->GetLocalPlayer()); 20 | if (pLocal && g_Engine->IsInGame()) 21 | { 22 | if (g_Options.Visuals.NoVisualRecoil) 23 | { 24 | setup->angles.x -= ((pLocal->localPlayerExclusive()->GetViewPunchAngle().x * 2) * 0.45); 25 | setup->angles.y -= ((pLocal->localPlayerExclusive()->GetViewPunchAngle().y * 2) * 0.45); 26 | } 27 | if (!pLocal->IsScoped()) 28 | setup->fov += g_Options.Visuals.FOVChanger; 29 | 30 | static bool enabledtp = false; 31 | static bool check = false; 32 | if (GetAsyncKeyState(g_Options.Visuals.TPKey)) 33 | { 34 | if (!check) 35 | enabledtp = !enabledtp; 36 | check = true; 37 | } 38 | else 39 | check = false; 40 | 41 | if (g_Options.Visuals.ThirdPerson && pLocal->IsAlive() && enabledtp) 42 | { 43 | if (!g_Input->m_fCameraInThirdPerson) 44 | { 45 | g_Input->m_fCameraInThirdPerson = true; 46 | } 47 | g_Input->m_vecCameraOffset.z = g_Options.Visuals.tpdist; 48 | } 49 | else 50 | { 51 | g_Input->m_fCameraInThirdPerson = false; 52 | } 53 | } 54 | grenade_prediction::instance().View(setup); 55 | ofunc(_this, setup); 56 | } -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/PaintTraverse.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "HookIncludes.h" 3 | #include "Interfaces.h" 4 | #include 5 | #include "ESP.h" 6 | #include "MovementRecorder.h" 7 | 8 | 9 | 10 | 11 | typedef void(__thiscall* paint_traverse_t)(PVOID, unsigned int, bool, bool); 12 | 13 | 14 | bool once = true; 15 | bool once1 = false; 16 | int width1 = 0; 17 | int height1 = 0; 18 | void __fastcall hkPaintTraverse(PVOID pPanels, int edx, unsigned int vguiPanel, bool forceRepaint, bool allowForce) 19 | { 20 | static auto ofunc = hooks::panel.get_original(41); 21 | C_BaseEntity* local = g_EntityList->GetClientEntity(g_Engine->GetLocalPlayer()); 22 | if (local != nullptr && local->IsAlive() && g_Options.Visuals.noscopeborder && !strcmp("HudZoom", g_Panel->GetName(vguiPanel))) 23 | { 24 | return; 25 | } 26 | ofunc(pPanels, vguiPanel, forceRepaint, allowForce); 27 | static unsigned int FocusOverlayPanel = 0; 28 | static bool FoundPanel = false; 29 | if (!FoundPanel) 30 | { 31 | PCHAR szPanelName = (PCHAR)g_Panel->GetName(vguiPanel); 32 | if (strstr(szPanelName, "FocusOverlayPanel")) 33 | { 34 | FocusOverlayPanel = vguiPanel; 35 | FoundPanel = true; 36 | } 37 | } 38 | else if (FocusOverlayPanel == vguiPanel) 39 | { 40 | if (G::menuon) 41 | { 42 | int width = 0; 43 | int height = 0; 44 | g_Engine->GetScreenSize(width, height); 45 | g_Render->Clear(0, 0, width, height, Color(50, 50, 50, 100)); 46 | } 47 | if (g_Engine->IsConnected() && g_Engine->IsInGame()) 48 | { 49 | static auto linegoesthrusmoke = U::FindPattern("client.dll", (PBYTE)"\x55\x8B\xEC\x83\xEC\x08\x8B\x15\x00\x00\x00\x00\x0F\x57\xC0", "xxxxxxxx????xxx"); 50 | static auto smokecout = *(DWORD*)(linegoesthrusmoke + 0x8); 51 | if (g_Options.Visuals.NoSmoke) *(int*)(smokecout) = 0; 52 | 53 | visuals::instance().OnPaintTraverse(local); 54 | 55 | auto m_flFlashDuration = NetVarManager->GetOffset("DT_CSPlayer", "m_flFlashDuration"); 56 | auto m_flFlashMaxAlpha = NetVarManager->GetOffset("DT_CSPlayer", "m_flFlashMaxAlpha"); 57 | if (local != nullptr) 58 | { 59 | CBaseCombatWeapon* pWeapon = (CBaseCombatWeapon*)g_EntityList->GetClientEntityFromHandle(local->GetActiveWeaponHandle()); 60 | if (g_Options.Visuals.NoFlash) 61 | { 62 | *MakePtr(float*, local, m_flFlashDuration) = 0.f; 63 | *MakePtr(float*, local, m_flFlashMaxAlpha) = 0.f; 64 | } 65 | if (local && local->IsScoped() && g_Options.Visuals.noscopeborder && MiscFunctions::IsSniper(pWeapon)) 66 | { 67 | int width = 0; 68 | int height = 0; 69 | g_Engine->GetScreenSize(width, height); 70 | 71 | int centerX = static_cast(width * 0.5f); 72 | int centerY = static_cast(height * 0.5f); 73 | g_Render->Line(0, centerY, width, centerY, Color(0, 0, 0, 255)); 74 | g_Render->Line(centerX, 0, centerX, height, Color(0, 0, 0, 255)); 75 | } 76 | } 77 | } 78 | if (!g_Engine->IsInGame()) { 79 | g_Options.Misc.NameChangerFix = false; 80 | g_Options.Misc.NameSpammer = 0; 81 | g_Options.Misc.NoName = false; 82 | g_Options.Misc.ChatSpamMode = false; 83 | } 84 | if (g_Options.Ragebot.MainSwitch && !once) 85 | { 86 | g_Options.Legitbot.MainSwitch = false; 87 | once = !once; 88 | } 89 | if (g_Options.Legitbot.MainSwitch && once) 90 | { 91 | g_Options.Ragebot.MainSwitch = false; 92 | once = !once; 93 | } 94 | if (g_Options.Visuals.Time) 95 | { 96 | std::time_t result = std::time(nullptr); 97 | g_Render->Text(10, 6, Color(255, 255, 255, 255), g_Render->font.ESP, std::asctime(std::localtime(&result))); 98 | } 99 | 100 | } 101 | } 102 | 103 | 104 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Parser.cpp: -------------------------------------------------------------------------------- 1 | #include "Parser.h" 2 | 3 | namespace valve_parser 4 | { 5 | Object::Object(Document* doc) : Node(doc) {} 6 | 7 | Object* Object::ToObject() 8 | { 9 | return this; 10 | } 11 | 12 | std::shared_ptr Object::GetKeyByName(char* name) 13 | { 14 | for (auto& child : children) 15 | { 16 | if (child->ToKeyValue()) 17 | { 18 | if (Util::StrEqu(child->ToKeyValue()->Key, name)) 19 | return child; 20 | } 21 | } 22 | 23 | return 0; 24 | } 25 | 26 | bool Object::Parse() 27 | { 28 | std::shared_ptr n; 29 | 30 | while (*_doc->p) 31 | { 32 | //check for object close 33 | auto string_begin = Str::ParseTextExpectedTag(_doc->p, STRING, true); 34 | if (!string_begin) 35 | { 36 | auto obj_close = Str::ParseTextExpectedTag(_doc->p, OBJECT_CLOSE, true); 37 | if (obj_close) 38 | { 39 | _doc->p = obj_close + 1; 40 | return true; 41 | } 42 | else 43 | return false; 44 | } 45 | 46 | if (!_doc->identify(n)) 47 | return false; 48 | 49 | if (n->ToKeyValue()) 50 | { 51 | this->children.push_back(n); 52 | } 53 | 54 | if (n->ToObject()) 55 | { 56 | this->children.push_back(n); 57 | Object* obj = n->ToObject(); 58 | if (!obj->Parse()) 59 | return false; 60 | } 61 | } 62 | 63 | return false; 64 | } 65 | 66 | bool Node::Parse() 67 | { 68 | std::shared_ptr n; 69 | 70 | while (*_doc->p) 71 | { 72 | if (!_doc->identify(n)) 73 | { 74 | if (!Str::EndReached(_doc->p, OBJECT_OPEN) && 75 | !Str::EndReached(_doc->p, OBJECT_CLOSE) && 76 | !Str::EndReached(_doc->p, STRING)) 77 | return true; 78 | else 79 | return false; 80 | } 81 | 82 | if (n->ToKeyValue()) 83 | { 84 | this->children.push_back(n); 85 | } 86 | 87 | if (n->ToObject()) 88 | { 89 | this->children.push_back(n); 90 | Object* obj = n->ToObject(); 91 | if (!obj->Parse()) 92 | return false; 93 | } 94 | } 95 | 96 | return false; 97 | } 98 | } -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Parser.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/villeeh/Insidousccpaste/af3cbfc74f3553b58aa88991dc170add9ea0ffb7/Frostyv2/FROSTY v2/Parser.h -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/PlaySound.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "HookIncludes.h" 3 | typedef void(__thiscall* play_sound_t)(void*, const char*); 4 | 5 | void __stdcall hkPlaySound(const char* szFileName) 6 | { 7 | static auto ofunc = hooks::surface.get_original(82); 8 | //Call original PlaySound 9 | ofunc(g_Surface, szFileName); 10 | 11 | if (g_Engine->IsInGame()) return; 12 | 13 | if (g_Options.Misc.AutoAccept && (strstr(szFileName, "UI/competitive_accept_beep.wav"))) 14 | { 15 | 16 | static auto CServerConfirmedReservationCheckCallback__IsReady 17 | = (void(__cdecl*)(void))U::pattern_scan( 18 | GetModuleHandleW(L"client.dll"), 19 | "55 8B EC 83 E4 F8 83 EC 08 56 8B 35 ? ? ? ? 57 83 BE" 20 | ); 21 | CServerConfirmedReservationCheckCallback__IsReady(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/PredictionSystem.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class CPredictionSystem { 4 | public: 5 | void StartPrediction(); 6 | void EndPrediction(); 7 | 8 | private: 9 | float m_flOldCurtime; 10 | float m_flOldFrametime; 11 | CMoveData m_MoveData; 12 | 13 | int* m_pPredictionRandomSeed; 14 | }; -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/RageBot.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "SDK.h" 5 | #include "singleton.hpp" 6 | 7 | class ragebot 8 | : public singleton 9 | { 10 | public: 11 | 12 | ragebot(); 13 | 14 | void OnCreateMove(CInput::CUserCmd *pCmd, bool& bSendPacket); 15 | bool hit_chance(C_BaseEntity* local, CInput::CUserCmd* cmd, CBaseCombatWeapon* weapon, C_BaseEntity* target); 16 | private: 17 | float FovToPlayer(Vector ViewOffSet, Vector View, C_BaseEntity* pEntity, int aHitBox); 18 | int GetTargetCrosshair(); 19 | bool TargetMeetsRequirements(C_BaseEntity* pEntity); 20 | int HitScan(C_BaseEntity* pEntity); 21 | void DoNoRecoil(CInput::CUserCmd* pCmd); 22 | bool AimAtPoint(C_BaseEntity* pLocal, Vector point, CInput::CUserCmd *pCmd); 23 | void DoAimbot(CInput::CUserCmd *pCmd, bool& bSendPacket); 24 | void DoAntiAim(CInput::CUserCmd *pCmd, bool& bSendPacket); 25 | void FakeLag(CInput::CUserCmd* cmd); 26 | void ManualAA(CUserCmd *pCmd); 27 | void PositionAdjustment(CInput::CUserCmd* pCmd); 28 | private: 29 | bool IsLocked; 30 | int TargetID; 31 | int HitBox; 32 | Vector AimPoint; 33 | C_BaseEntity* pTarget; 34 | }; 35 | 36 | inline bool CanAttack() 37 | { 38 | auto local = g_EntityList->GetClientEntity(g_Engine->GetLocalPlayer()); 39 | 40 | if (local && local->IsAlive()) 41 | { 42 | CBaseCombatWeapon* weapon = (CBaseCombatWeapon*)g_EntityList->GetClientEntityFromHandle(local->GetActiveWeaponHandle()); 43 | if (weapon) 44 | { 45 | if (weapon->ammo() < 1 && !MiscFunctions::IsKnife(weapon)) 46 | return false; 47 | 48 | bool revolver_can_shoot = true; 49 | if (weapon->m_AttributeManager()->m_Item()->GetItemDefinitionIndex() == 64) 50 | { 51 | float time_to_shoot = weapon->m_flPostponeFireReadyTime() - local->GetTickBase() * g_Globals->interval_per_tick; 52 | revolver_can_shoot = time_to_shoot <= g_Globals->absoluteframetime; 53 | } 54 | 55 | float time = local->GetTickBase() * g_Globals->interval_per_tick; 56 | float next_attack = weapon->GetNextPrimaryAttack(); 57 | return revolver_can_shoot && !(next_attack > time); 58 | } 59 | } 60 | 61 | return false; 62 | } -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Render.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Interfaces.h" 5 | 6 | #include "Vector2D.h" 7 | 8 | void Quad(); 9 | 10 | 11 | class Render 12 | { 13 | public: 14 | void SetupFonts(); 15 | 16 | // Normal Drawing functions 17 | void Clear(int x, int y, int w, int h, Color color); 18 | void DrawOutlinedRect(int x, int y, int w, int h, Color col); 19 | void Outline(int x, int y, int w, int h, Color color); 20 | void DrawString2(DWORD font, int x, int y, Color color, DWORD alignment, const char* msg, ...); 21 | void OutlineRainbow(int x, int y, int w, int h, float flSpeed, float &flRainbow); 22 | void Line(int x, int y, int x2, int y2, Color color); 23 | void PolyLine(int *x, int *y, int count, Color color); 24 | void Polygon(int count, Vertex_t* Vertexs, Color color); 25 | void PolygonOutline(int count, Vertex_t* Vertexs, Color color, Color colorLine); 26 | void PolyLine(int count, Vertex_t* Vertexs, Color colorLine); 27 | void OutlineCircle(int x, int y, int r, int seg, Color color); 28 | void Pixel(int x, int y, Color col); 29 | 30 | // Gradient Functions 31 | void GradientV(int x, int y, int w, int h, Color c1, Color c2); 32 | void GradientH(int x, int y, int w, int h, Color c1, Color c2); 33 | 34 | // Text functions 35 | 36 | 37 | void Text(int x, int y, Color color, DWORD font, const char* text, ...); 38 | void Textf(int x, int y, Color color, DWORD font, const char* fmt, ...); 39 | void Text(int x, int y, Color color, DWORD font, const wchar_t* text); 40 | void Text(int x, int y, DWORD font, const wchar_t* text); 41 | RECT GetTextSize(DWORD font, const char* text); 42 | 43 | // Other rendering functions 44 | bool WorldToScreen(Vector &in, Vector &out); 45 | RECT GetViewport(); 46 | class Fonts 47 | { 48 | public: 49 | DWORD Default; 50 | DWORD ESP; 51 | DWORD ESPMini; 52 | DWORD Defuse; 53 | DWORD DroppedGuns; 54 | DWORD undefeated_0; 55 | DWORD LBY; 56 | DWORD Watermark; 57 | } font; 58 | 59 | 60 | }; 61 | 62 | extern Render* g_Render; -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Renderer.cpp: -------------------------------------------------------------------------------- 1 | #include "Renderer.h" 2 | 3 | // Allow us to directly call the ImGui WndProc function. 4 | extern LRESULT ImGui_ImplDX9_WndProcHandler(HWND, UINT, WPARAM, LPARAM); 5 | 6 | // The original WndProc function. 7 | WNDPROC game_wndproc = nullptr; 8 | 9 | // Hooked WndProc function to process all incoming input messages. 10 | LRESULT __stdcall hkWndProc(HWND window, UINT message_type, WPARAM w_param, LPARAM l_param) { 11 | switch (message_type) { 12 | case WM_LBUTTONDOWN: 13 | G::PressedKeys[VK_LBUTTON] = true; 14 | break; 15 | case WM_LBUTTONUP: 16 | G::PressedKeys[VK_LBUTTON] = false; 17 | break; 18 | case WM_RBUTTONDOWN: 19 | G::PressedKeys[VK_RBUTTON] = true; 20 | break; 21 | case WM_RBUTTONUP: 22 | G::PressedKeys[VK_RBUTTON] = false; 23 | break; 24 | case WM_MBUTTONDOWN: 25 | G::PressedKeys[VK_MBUTTON] = true; 26 | break; 27 | case WM_MBUTTONUP: 28 | G::PressedKeys[VK_MBUTTON] = false; 29 | break; 30 | case WM_XBUTTONDOWN: 31 | { 32 | UINT button = GET_XBUTTON_WPARAM(w_param); 33 | if (button == XBUTTON1) 34 | { 35 | G::PressedKeys[VK_XBUTTON1] = true; 36 | } 37 | else if (button == XBUTTON2) 38 | { 39 | G::PressedKeys[VK_XBUTTON2] = true; 40 | } 41 | break; 42 | } 43 | case WM_XBUTTONUP: 44 | { 45 | UINT button = GET_XBUTTON_WPARAM(w_param); 46 | if (button == XBUTTON1) 47 | { 48 | G::PressedKeys[VK_XBUTTON1] = false; 49 | } 50 | else if (button == XBUTTON2) 51 | { 52 | G::PressedKeys[VK_XBUTTON2] = false; 53 | } 54 | break; 55 | } 56 | case WM_KEYDOWN: 57 | G::PressedKeys[w_param] = true; 58 | break; 59 | case WM_KEYUP: 60 | G::PressedKeys[w_param] = false; 61 | break; 62 | default: break; 63 | } 64 | // Let the renderer decide whether we should pass this input message to the game. 65 | if (renderer->HandleInputMessage(message_type, w_param, l_param)) 66 | return true; 67 | 68 | 69 | // The GUI is inactive so pass the input to the game. 70 | return CallWindowProc(game_wndproc, window, message_type, w_param, l_param); 71 | }; 72 | 73 | Renderer::~Renderer() { 74 | // Restore the original WndProc function. 75 | SetWindowLongPtr(this->window, GWLP_WNDPROC, LONG_PTR(game_wndproc)); 76 | } 77 | 78 | bool Renderer::IsReady() const { 79 | // Whether 'Initialize' has been called successfully yet. 80 | return this->ready; 81 | } 82 | 83 | bool Renderer::IsActive() const { 84 | // Whether the GUI is accepting input and should be drawn. 85 | return this->ready && this->active; 86 | } 87 | 88 | bool Renderer::Initialize(HWND window, IDirect3DDevice9* device) { 89 | 90 | this->window = window; 91 | 92 | 93 | game_wndproc = reinterpret_cast(SetWindowLongPtr(window, GWLP_WNDPROC, LONG_PTR(hkWndProc))); 94 | 95 | 96 | if (ImGui_ImplDX9_Init(window, device)) 97 | this->ready = true; 98 | 99 | return this->ready; 100 | } 101 | 102 | bool Renderer::HandleInputMessage(UINT message_type, WPARAM w_param, LPARAM l_param) { 103 | // Toggle the menu when INSERT is pressed. 104 | if (message_type == WM_KEYUP && w_param == VK_INSERT) 105 | this->active = !this->active; 106 | 107 | // When the GUI is active ImGui can handle input by itself. 108 | if (this->active) 109 | ImGui_ImplDX9_WndProcHandler(this->window, message_type, w_param, l_param); 110 | 111 | return this->active; 112 | } 113 | 114 | Renderer* renderer = new Renderer; -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Renderer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include "global.h" 5 | #include "imgui/imgui.h" 6 | #include "imgui/examples/directx9_example/imgui_impl_dx9.h" 7 | 8 | class Renderer { 9 | private: 10 | bool ready = false; 11 | bool active = false; 12 | HWND window = nullptr; 13 | public: 14 | ~Renderer(); 15 | 16 | bool IsReady() const; 17 | bool IsActive() const; 18 | bool Initialize(HWND, IDirect3DDevice9*); 19 | bool HandleInputMessage(UINT, WPARAM, LPARAM); 20 | }; 21 | 22 | extern Renderer* renderer; -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Resolver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "HookIncludes.h" 3 | 4 | 5 | int GetEstimatedServerTickCount(float latency) 6 | { 7 | return (int)floorf(float((float)((float)(latency) / (float)((uintptr_t)&g_Globals->interval_per_tick)) + 0.5) + 1 + (int)((uintptr_t)&g_Globals->tickcount)); 8 | } 9 | 10 | float NormalizeYaw(float value) 11 | { 12 | while (value > 180) 13 | value -= 360.f; 14 | 15 | while (value < -180) 16 | value += 360.f; 17 | return value; 18 | } 19 | 20 | namespace Globals 21 | { 22 | int Shots; 23 | int missedshots; 24 | float RealAngle; 25 | float FakeAngle; 26 | extern float FakeAngles2; 27 | extern float g_pEngine; 28 | Vector AimPoint; 29 | bool shouldflip; 30 | bool ySwitch; 31 | float NextTime; 32 | int resolvemode = 1; 33 | float fakeAngle; 34 | extern float FakeAngles2; 35 | extern float g_pEngine; 36 | float OldSimulationTime[65]; 37 | bool error; 38 | } 39 | 40 | /*void Resolver3() 41 | { 42 | C_BaseEntity *pLocal = g_EntityList->GetClientEntity(g_Engine->GetLocalPlayer()); 43 | 44 | for (auto i = 0; i < g_EntityList->GetHighestEntityIndex(); i++) 45 | { 46 | C_BaseEntity* pEnt = g_EntityList->GetClientEntity(i); 47 | if (!pEnt) continue; 48 | 49 | if ((pEnt == pLocal)) continue; 50 | 51 | if (pEnt->IsDormant()) continue; 52 | 53 | player_info_t pTemp; 54 | 55 | if (!g_Engine->GetPlayerInfo(i, &pTemp)) 56 | continue; 57 | auto FYaw = pEnt->GetLowerBodyYaw(); 58 | auto pitch = pEnt->GetEyeAngles()->x; 59 | if (menu.Ragebot.Resolver) 60 | { 61 | pEnt->GetEyeAngles()->y = FYaw; 62 | float PlayerIsMoving = abs(pEnt->GetVelocity().Length2D()); 63 | bool bLowerBodyUpdated = false; 64 | bool IsUsingFakeAngles = false; 65 | 66 | if (oldlowerbodyyaw != FYaw) 67 | { 68 | bLowerBodyUpdated = true; 69 | } 70 | float bodyeyedelta = fabs(pEnt->GetEyeAngles()->y - pEnt->GetLowerBodyYaw()); 71 | if (PlayerIsMoving || bLowerBodyUpdated)// || LastUpdatedNetVars->eyeangles.x != CurrentNetVars->eyeangles.x || LastUpdatedNetVars->eyeyaw != CurrentNetVars->eyeangles.y) 72 | { 73 | pEnt->GetEyeAngles()->y = FYaw; 74 | oldlowerbodyyaw = pEnt->GetEyeAngles()->y; 75 | 76 | IsUsingFakeAngles = false; 77 | } 78 | else 79 | { 80 | if (bodyeyedelta > 35.0f) 81 | { 82 | pEnt->GetEyeAngles()->y = oldlowerbodyyaw; 83 | IsUsingFakeAngles = true; 84 | } 85 | else 86 | { 87 | IsUsingFakeAngles = false; 88 | } 89 | } 90 | if (IsUsingFakeAngles) 91 | { 92 | 93 | pEnt->GetEyeAngles()->y += 45; 94 | 95 | 96 | } 97 | } 98 | } 99 | 100 | }*/ 101 | inline float ClampYaw(float yaw) { 102 | while (yaw > 180.f) 103 | yaw -= 360.f; 104 | while (yaw < -180.f) 105 | yaw += 360.f; 106 | return yaw; 107 | } 108 | 109 | void Resolver3() 110 | { 111 | 112 | 113 | 114 | if (g_Options.Ragebot.Resolver) 115 | { 116 | C_BaseEntity *pLocal = g_EntityList->GetClientEntity(g_Engine->GetLocalPlayer()); 117 | { 118 | for (auto i = 0; i < g_EntityList->GetHighestEntityIndex(); i++) 119 | { 120 | C_BaseEntity* pEnt = g_EntityList->GetClientEntity(i); 121 | 122 | if (!pEnt) continue; 123 | 124 | if (pEnt == pLocal) continue; 125 | 126 | if (pEnt->IsDormant()) continue; 127 | 128 | player_info_t pTemp; 129 | 130 | if (!g_Engine->GetPlayerInfo(i, &pTemp)) 131 | continue; 132 | 133 | if (pEnt->GetTeamNum() == pLocal->GetTeamNum()) continue; 134 | 135 | auto FYaw = pEnt->GetLowerBodyYaw(); 136 | auto pitch = pEnt->GetEyeAngles()->x; 137 | 138 | pEnt->GetEyeAngles()->y = FYaw; 139 | float PlayerIsMoving = abs(pEnt->GetVelocity().Length2D()); 140 | bool bLowerBodyUpdated = false; 141 | bool IsBreakingLBY = false; 142 | 143 | bool isFakeHeading = false; 144 | 145 | float oldLBY = pEnt->GetLowerBodyYaw(); 146 | 147 | 148 | if (oldLBY != pEnt->GetLowerBodyYaw()) 149 | { 150 | bLowerBodyUpdated = true; 151 | } 152 | else 153 | { 154 | bLowerBodyUpdated = false; 155 | } 156 | 157 | if (pEnt->GetEyeAngles()->y - pEnt->GetLowerBodyYaw() > 35) 158 | { 159 | isFakeHeading = true; 160 | } 161 | else 162 | { 163 | isFakeHeading = false; 164 | } 165 | 166 | float bodyeyedelta = fabs(pEnt->GetEyeAngles()->y - pEnt->GetLowerBodyYaw()); 167 | if (PlayerIsMoving || bLowerBodyUpdated)// || LastUpdatedNetVars->eyeangles.x != CurrentNetVars->eyeangles.x || LastUpdatedNetVars->eyeyaw != CurrentNetVars->eyeangles.y) 168 | { 169 | Globals::resolvemode = 3; 170 | 171 | pEnt->GetEyeAngles()->y = FYaw; 172 | oldLBY = pEnt->GetEyeAngles()->y; 173 | 174 | IsBreakingLBY = false; 175 | } 176 | else 177 | { 178 | Globals::resolvemode = 1; 179 | 180 | if (bodyeyedelta == 0.f && pEnt->GetVelocity().Length2D() >= 0 && pEnt->GetVelocity().Length2D() < 36) 181 | { 182 | pEnt->GetEyeAngles()->y = oldLBY; 183 | IsBreakingLBY = true; 184 | } 185 | else 186 | { 187 | IsBreakingLBY = false; 188 | } 189 | } 190 | 191 | if (IsBreakingLBY) 192 | { 193 | Globals::resolvemode = 2; 194 | 195 | pEnt->GetEyeAngles()->y = oldLBY; 196 | 197 | switch (Globals::Shots % 3) 198 | { 199 | case 1: pEnt->GetEyeAngles()->y = 180; break; 200 | case 2: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() + rand() % 180; 201 | case 3: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() + pEnt->GetEyeAngles()->y + rand() % 35; 202 | } 203 | } 204 | else if (!IsBreakingLBY && !isFakeHeading) 205 | { 206 | Globals::resolvemode = 3; 207 | 208 | pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw(); 209 | 210 | switch (Globals::Shots % 4) 211 | { 212 | case 1: pEnt->GetEyeAngles()->y = 45 + rand() % 180; 213 | case 2: pEnt->GetEyeAngles()->y = oldLBY + rand() % 90; 214 | case 3: pEnt->GetEyeAngles()->y = 180 + rand() % 90; 215 | case 4: pEnt->GetEyeAngles()->y = oldLBY + pEnt->GetEyeAngles()->y + rand() % 45; 216 | } 217 | } 218 | else if (isFakeHeading) 219 | { 220 | Globals::resolvemode = 2; 221 | 222 | pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() - pEnt->GetEyeAngles()->y; 223 | 224 | switch (Globals::Shots % 2) 225 | { 226 | case 1: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() + rand() % 90; break; 227 | case 2: pEnt->GetEyeAngles()->y = pEnt->GetEyeAngles()->y + rand() % 360; break; 228 | } 229 | } 230 | else if (Globals::Shots >= g_Options.Ragebot.bruteAfterX && g_Options.Ragebot.bruteAfterX != 0) 231 | { 232 | Globals::resolvemode = 2; 233 | 234 | pEnt->GetEyeAngles()->y = 180; 235 | 236 | switch (Globals::Shots % 4) 237 | { 238 | case 1: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw(); break; 239 | case 2: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() + rand() % 90; break; 240 | case 3: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() + rand() % 180; break; 241 | case 4: pEnt->GetEyeAngles()->y = oldLBY + rand() % 45; break; 242 | } 243 | } 244 | else 245 | { 246 | Globals::resolvemode = 1; 247 | 248 | pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() + rand() % 180; 249 | 250 | switch (Globals::Shots % 13) 251 | { 252 | case 1: pEnt->GetEyeAngles()->y = 180; break; 253 | case 2: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() + rand() % 180; 254 | case 3: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() + pEnt->GetEyeAngles()->y + rand() % 35; 255 | case 4: pEnt->GetEyeAngles()->y = 45 + rand() % 180; 256 | case 5: pEnt->GetEyeAngles()->y = oldLBY + rand() % 90; 257 | case 6: pEnt->GetEyeAngles()->y = 180 + rand() % 90; 258 | case 7: pEnt->GetEyeAngles()->y = oldLBY + pEnt->GetEyeAngles()->y + rand() % 45; 259 | case 8: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw(); break; 260 | case 9: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() + rand() % 90; break; 261 | case 10: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() + rand() % 180; break; 262 | case 11: pEnt->GetEyeAngles()->y = oldLBY + rand() % 45; break; 263 | case 12: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() + rand() % 90; break; 264 | case 13: pEnt->GetEyeAngles()->y = pEnt->GetEyeAngles()->y + rand() % 360; break; 265 | } 266 | } 267 | } 268 | } 269 | } 270 | } -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/SDK.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Entities.h" 3 | 4 | #include "BaseClient.h" 5 | #include "EngineClient.h" 6 | #include "MiscClasses.h" 7 | #include "Surface.h" 8 | #include "Materials.h" 9 | #include "NetVarManager.h" 10 | #include "Vector.h" 11 | #include "Vector2D.h" 12 | #include "bspflags.h" 13 | #include "Interfaces.h" 14 | #include "MiscFunctions.h" 15 | #include "MathFunctions.h" 16 | #include "Variables.h" 17 | #include "Global.h" 18 | #include "XorStr.hpp" 19 | #define Vector3 20 | #pragma warning(disable : 4020) 21 | #define M_PI 3.14159265358979323846 22 | inline float RandomFloat(float min, float max) 23 | { 24 | static auto fn = (decltype(&RandomFloat))(GetProcAddress(GetModuleHandle("vstdlib.dll"), "RandomFloat")); 25 | return fn(min, max); 26 | } 27 | 28 | namespace Globals 29 | { 30 | extern int Shots; 31 | extern int missedshots; 32 | extern float RealAngle; 33 | extern float FakeAngle; 34 | extern float FakeAngles2; 35 | extern float g_pEngine; 36 | extern float g_pModelRender; 37 | extern Vector AimPoint; 38 | extern bool shouldflip; 39 | extern bool ySwitch; 40 | extern float NextTime; 41 | extern int resolvemode; 42 | extern float fakeAngle; 43 | extern float g_pEngine; 44 | extern float FakeAngles2; 45 | extern float OldSimulationTime[65]; 46 | extern bool error; 47 | } 48 | 49 | inline void RandomSeed(int seed) 50 | { 51 | static auto fn = (decltype(&RandomSeed))(GetProcAddress(GetModuleHandle("vstdlib.dll"), "RandomSeed")); 52 | 53 | return fn(seed); 54 | } 55 | 56 | #define XM_2PI 6.283185307f 57 | #include 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/SkinChanger.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "HookIncludes.h" 3 | #define RandomInt(nMin, nMax) (rand() % (nMax - nMin + 1) + nMin); 4 | std::unordered_map killIcons = {}; 5 | #define INVALID_EHANDLE_INDEX 0xFFFFFFFF 6 | HANDLE worldmodel_handle; 7 | CBaseCombatWeapon* worldmodel; 8 | 9 | int GetKnifeDefinitionIndex(int si) 10 | { 11 | // 0 - Bayonet, 1 - Flip, 2 - Gut, 3 - Karambit, 4 - M9Bayonet, 5 - Huntsman, 6 - Falchion, 7 - Bowie, 8 - Butterfly, 9 - Daggers, 10 - Golden 12 | switch (si) 13 | { 14 | case 0: 15 | return 500; 16 | case 1: 17 | return 505; 18 | case 2: 19 | return 506; 20 | case 3: 21 | return 507; 22 | case 4: 23 | return 508; 24 | case 5: 25 | return 509; 26 | case 6: 27 | return 512; 28 | case 7: 29 | return 514; 30 | case 8: 31 | return 515; 32 | case 9: 33 | return 516; 34 | default: 35 | return -1; 36 | } 37 | } 38 | 39 | int GetCurrentKnifeModel(int currentKnife) 40 | { 41 | // 0 - Bayonet, 1 - Flip, 2 - Gut, 3 - Karambit, 4 - M9Bayonet, 5 - Huntsman, 6 - Falchion, 7 - Bowie, 8 - Butterfly, 9 - Daggers, 10 - Golden 42 | switch (currentKnife) 43 | { 44 | case 0: 45 | return g_ModelInfo->GetModelIndex("models/weapons/v_knife_bayonet.mdl"); //Bayo 46 | case 1: 47 | return g_ModelInfo->GetModelIndex("models/weapons/v_knife_flip.mdl"); //Flip 48 | case 2: 49 | return g_ModelInfo->GetModelIndex("models/weapons/v_knife_gut.mdl"); //Gut 50 | case 3: 51 | return g_ModelInfo->GetModelIndex("models/weapons/v_knife_karam.mdl"); //Karambit 52 | case 4: 53 | return g_ModelInfo->GetModelIndex("models/weapons/v_knife_m9_bay.mdl"); //M9 Bayo 54 | case 5: 55 | return g_ModelInfo->GetModelIndex("models/weapons/v_knife_tactical.mdl"); //Huntsman 56 | case 6: 57 | return g_ModelInfo->GetModelIndex("models/weapons/v_knife_falchion_advanced.mdl"); //Falchion 58 | case 7: 59 | return g_ModelInfo->GetModelIndex("models/weapons/v_knife_survival_bowie.mdl"); //Bowie 60 | case 8: 61 | return g_ModelInfo->GetModelIndex("models/weapons/v_knife_butterfly.mdl"); //Butterfly 62 | case 9: 63 | return g_ModelInfo->GetModelIndex("models/weapons/v_knife_push.mdl"); //Daggers 64 | case 10: 65 | return g_ModelInfo->GetModelIndex("models/weapons/v_knife_gg.mdl"); //GunGame 66 | default: 67 | return 0; 68 | } 69 | } 70 | 71 | void SkinChanger() { 72 | C_BaseEntity *pLocal = g_EntityList->GetClientEntity(g_Engine->GetLocalPlayer()); 73 | auto weapons = pLocal->m_hMyWeapons(); 74 | for (size_t i = 0; weapons[i] != INVALID_EHANDLE_INDEX; i++) 75 | { 76 | C_BaseEntity *pEntity = g_EntityList->GetClientEntityFromHandle(weapons[i]); 77 | if (pEntity) 78 | { 79 | CBaseCombatWeapon* pWeapon = (CBaseCombatWeapon*)pEntity; 80 | if (g_Options.Skinchanger.Enabled) 81 | { 82 | 83 | int weapon = *pWeapon->m_AttributeManager()->m_Item()->ItemDefinitionIndex(); 84 | if (weapon) 85 | { 86 | if (g_Options.Skinchanger.W[weapon].ChangerSkin != 0) 87 | *pWeapon->FallbackPaintKit() = g_Options.Skinchanger.W[weapon].ChangerSkin; 88 | } 89 | if (g_Options.Skinchanger.knifemodel > 0) 90 | { 91 | if (pEntity->GetClientClass()->m_ClassID) 92 | { 93 | if (pEntity->GetClientClass()->m_ClassID == (int)ClassID::CKnife) 94 | { 95 | worldmodel_handle = pWeapon->m_hWeaponWorldModel(); 96 | if (worldmodel_handle) worldmodel = (CBaseCombatWeapon*)g_EntityList->GetClientEntityFromHandle(worldmodel_handle); 97 | 98 | 99 | *pWeapon->GetEntityQuality() = 3; 100 | 101 | *pWeapon->ModelIndex() = GetCurrentKnifeModel(g_Options.Skinchanger.knifemodel - 1); // m_nModelIndex 102 | *pWeapon->ViewModelIndex() = GetCurrentKnifeModel(g_Options.Skinchanger.knifemodel - 1); 103 | if (worldmodel) *worldmodel->ModelIndex() = GetCurrentKnifeModel(g_Options.Skinchanger.knifemodel - 1) + 1; 104 | *pWeapon->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = GetKnifeDefinitionIndex(g_Options.Skinchanger.knifemodel - 1); 105 | 106 | killIcons.clear(); 107 | killIcons["knife_default_ct"] = "bayonet"; 108 | killIcons["knife_t"] = "bayonet"; 109 | 110 | *pWeapon->FallbackPaintKit() = g_Options.Skinchanger.W[GetKnifeDefinitionIndex(g_Options.Skinchanger.knifemodel - 1)].ChangerSkin; // Lore 111 | } 112 | } 113 | } 114 | 115 | 116 | *pWeapon->OwnerXuidLow() = 0; 117 | *pWeapon->OwnerXuidHigh() = 0; 118 | *pWeapon->FallbackWear() = 0.001f; 119 | //*pWeapon->FallbackStatTrak() = 3; 120 | if (g_Options.Skinchanger.StattrakOn) 121 | { 122 | *pWeapon->FallbackStatTrak() = 666; 123 | } 124 | else 125 | { 126 | *pWeapon->FallbackStatTrak() = -1; 127 | } 128 | //snprintf(pWeapon->GetCustomName(), 32, "www.insidous.cc"); 129 | if (g_Options.Skinchanger.WeaponTags) 130 | { 131 | 132 | } 133 | else 134 | { 135 | snprintf(pWeapon->GetCustomName(), 32, "insidous.cc" ); 136 | } 137 | *pWeapon->m_AttributeManager()->m_Item()->ItemIDHigh() = 1; 138 | } 139 | } 140 | 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/SpoofedConvar.cpp: -------------------------------------------------------------------------------- 1 | #include "SDK.h" 2 | #include "MiscClasses.h" 3 | 4 | template 5 | inline void MinspecCvar::SetValue(T value) 6 | { 7 | m_pConVar->SetValue(T); 8 | } 9 | MinspecCvar::MinspecCvar(const char* szCVar, char* newname, float newvalue) : m_pConVar(nullptr) 10 | { 11 | m_pConVar = g_CVar->FindVar(szCVar); 12 | m_newvalue = newvalue; 13 | m_szReplacementName = newname; 14 | Spoof(); 15 | } 16 | 17 | MinspecCvar::~MinspecCvar() 18 | { 19 | if (ValidCvar()) 20 | { 21 | g_CVar->UnregisterConCommand(m_pConVar); 22 | m_pConVar->pszName = m_szOriginalName; 23 | m_pConVar->SetValue(m_OriginalValue); 24 | g_CVar->RegisterConCommand(m_pConVar); 25 | } 26 | } 27 | 28 | bool MinspecCvar::ValidCvar() 29 | { 30 | return m_pConVar != nullptr; 31 | } 32 | void MinspecCvar::Spoof() 33 | { 34 | if (ValidCvar()) 35 | { 36 | g_CVar->UnregisterConCommand(m_pConVar); 37 | m_szOriginalName = m_pConVar->pszName; 38 | m_OriginalValue = m_pConVar->GetFloat(); 39 | 40 | m_pConVar->pszName = m_szReplacementName; 41 | g_CVar->RegisterConCommand(m_pConVar); 42 | m_pConVar->SetValue(m_newvalue); 43 | } 44 | } 45 | 46 | int MinspecCvar::GetInt() 47 | { 48 | if (ValidCvar()) { 49 | return m_pConVar->GetInt(); 50 | } 51 | return 0; 52 | } 53 | 54 | float MinspecCvar::GetFloat() 55 | { 56 | if (ValidCvar()) { 57 | return m_pConVar->GetFloat(); 58 | } 59 | return 0.0f; 60 | } 61 | 62 | const char* MinspecCvar::GetString() 63 | { 64 | if (ValidCvar()) { 65 | return m_pConVar->GetString(); 66 | } 67 | return nullptr; 68 | } 69 | 70 | SpoofedConvar::SpoofedConvar(const char* szCVar) { 71 | m_pOriginalCVar = g_CVar->FindVar(szCVar); 72 | Spoof(); 73 | } 74 | SpoofedConvar::SpoofedConvar(ConVar* pCVar, char* newname) { 75 | m_pOriginalCVar = pCVar; 76 | m_szReplacementName = newname; 77 | Spoof(); 78 | } 79 | SpoofedConvar::~SpoofedConvar() { 80 | if (IsSpoofed()) { 81 | DWORD dwOld; 82 | 83 | SetFlags(m_iOriginalFlags); 84 | SetString(m_szOriginalValue); 85 | 86 | VirtualProtect((LPVOID)m_pOriginalCVar->pszName, 128, PAGE_READWRITE, &dwOld); 87 | strcpy((char*)m_pOriginalCVar->pszName, m_szOriginalName); 88 | VirtualProtect((LPVOID)m_pOriginalCVar->pszName, 128, dwOld, &dwOld); 89 | 90 | //Unregister dummy cvar 91 | g_CVar->UnregisterConCommand(m_pDummyCVar); 92 | free(m_pDummyCVar); 93 | m_pDummyCVar = NULL; 94 | } 95 | } 96 | bool SpoofedConvar::IsSpoofed() { 97 | return m_pDummyCVar != NULL; 98 | } 99 | void SpoofedConvar::Spoof() { 100 | if (!IsSpoofed() && m_pOriginalCVar) { 101 | //Save old name value and flags so we can restore the cvar lates if needed 102 | m_iOriginalFlags = m_pOriginalCVar->nFlags; 103 | strcpy(m_szOriginalName, m_pOriginalCVar->pszName); 104 | strcpy(m_szOriginalValue, m_pOriginalCVar->pszDefaultValue); 105 | 106 | sprintf_s(m_szDummyName, 128, "%s", m_szReplacementName); 107 | 108 | //Create the dummy cvar 109 | m_pDummyCVar = (ConVar*)malloc(sizeof(ConVar)); 110 | if (!m_pDummyCVar) return; 111 | memcpy(m_pDummyCVar, m_pOriginalCVar, sizeof(ConVar)); 112 | 113 | m_pDummyCVar->pNext = NULL; 114 | //Register it 115 | g_CVar->RegisterConCommand(m_pDummyCVar); 116 | 117 | //Fix "write access violation" bullshit 118 | DWORD dwOld; 119 | VirtualProtect((LPVOID)m_pOriginalCVar->pszName, 128, PAGE_READWRITE, &dwOld); 120 | 121 | //Rename the cvar 122 | strcpy((char*)m_pOriginalCVar->pszName, m_szDummyName); 123 | 124 | VirtualProtect((LPVOID)m_pOriginalCVar->pszName, 128, dwOld, &dwOld); 125 | 126 | SetFlags(FCVAR_NONE); 127 | } 128 | } 129 | void SpoofedConvar::SetFlags(int flags) { 130 | if (IsSpoofed()) { 131 | m_pOriginalCVar->nFlags = flags; 132 | } 133 | } 134 | int SpoofedConvar::GetFlags() { 135 | return m_pOriginalCVar->nFlags; 136 | } 137 | void SpoofedConvar::SetInt(int iValue) { 138 | if (IsSpoofed()) { 139 | m_pOriginalCVar->SetValue(iValue); 140 | } 141 | } 142 | void SpoofedConvar::SetBool(bool bValue) { 143 | if (IsSpoofed()) { 144 | m_pOriginalCVar->SetValue(bValue); 145 | } 146 | } 147 | void SpoofedConvar::SetFloat(float flValue) { 148 | if (IsSpoofed()) { 149 | m_pOriginalCVar->SetValue(flValue); 150 | } 151 | } 152 | void SpoofedConvar::SetString(const char* szValue) { 153 | if (IsSpoofed()) { 154 | m_pOriginalCVar->SetValue(szValue); 155 | } 156 | } -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Strafer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #pragma once 3 | #include 4 | #define PI 3.14159265358979323846f 5 | const double M_U_DEG = 360.0 / 65536; 6 | const double M_U_RAD = PI / 32768; 7 | #define PI_2 PI/2 8 | #define PI_4 PI/4 9 | 10 | class AutoStrafer 11 | { 12 | double anglemod_deg(double a) 13 | { 14 | return M_U_DEG * ((int)(a / M_U_DEG) & 0xffff); 15 | } 16 | 17 | double anglemod_rad(double a) 18 | { 19 | return M_U_RAD * ((int)(a / M_U_RAD) & 0xffff); 20 | } 21 | 22 | double point2line_distsq(const double pos[2], 23 | const double line_origin[2], 24 | const double line_dir[2]) 25 | { 26 | double tmp[2] = { line_origin[0] - pos[0], line_origin[1] - pos[1] }; 27 | double dotprod = line_dir[0] * tmp[0] + line_dir[1] * tmp[1]; 28 | tmp[0] -= line_dir[0] * dotprod; 29 | tmp[1] -= line_dir[1] * dotprod; 30 | return tmp[0] * tmp[0] + tmp[1] * tmp[1]; 31 | } 32 | 33 | double strafe_theta_opt(double speed, double L, double tauMA) 34 | { 35 | double tmp = L - tauMA; 36 | if (tmp <= 0) 37 | return PI_2; 38 | if (tmp < speed) 39 | return std::acos(tmp / speed); 40 | return 0; 41 | } 42 | 43 | double strafe_theta_const(double speed, double nofric_speed, double L, 44 | double tauMA) 45 | { 46 | double sqdiff = nofric_speed * nofric_speed - speed * speed; 47 | double tmp = sqdiff / tauMA; 48 | if (tmp + tauMA < 2 * L && 2 * speed >= std::fabs(tmp - tauMA)) 49 | return std::acos((tmp - tauMA) / (2 * speed)); 50 | tmp = std::sqrt(L * L - sqdiff); 51 | if (tauMA - L > tmp && speed >= tmp) 52 | return std::acos(-tmp / speed); 53 | return strafe_theta_opt(speed, L, tauMA); 54 | } 55 | 56 | void strafe_fme_vec(double vel[2], const double avec[2], double L, 57 | double tauMA) 58 | { 59 | double tmp = L - vel[0] * avec[0] - vel[1] * avec[1]; 60 | if (tmp < 0) 61 | return; 62 | if (tauMA < tmp) 63 | tmp = tauMA; 64 | vel[0] += avec[0] * tmp; 65 | vel[1] += avec[1] * tmp; 66 | } 67 | 68 | void strafe_fric(double vel[2], double E, double ktau) 69 | { 70 | double speed = std::hypot(vel[0], vel[1]); 71 | if (speed >= E) 72 | { 73 | vel[0] *= 1 - ktau; 74 | vel[1] *= 1 - ktau; 75 | return; 76 | } 77 | 78 | double tmp = E * ktau; 79 | if (speed > tmp) 80 | { 81 | tmp /= speed; 82 | vel[0] -= tmp * vel[0]; 83 | vel[1] -= tmp * vel[1]; 84 | return; 85 | } 86 | 87 | vel[0] = 0; 88 | vel[1] = 0; 89 | } 90 | 91 | double strafe_fric_spd(double spd, double E, double ktau) 92 | { 93 | if (spd >= E) 94 | return spd * (1 - ktau); 95 | double tmp = E * ktau; 96 | if (spd > tmp) 97 | return spd - tmp; 98 | return 0; 99 | } 100 | 101 | void strafe_side(double& yaw, int& Sdir, int& Fdir, double vel[2], 102 | double theta, double L, double tauMA, int dir) 103 | { 104 | double phi; 105 | // This is to reduce the overall shaking. 106 | if (theta >= PI_2 * 0.75) 107 | { 108 | Sdir = dir; 109 | Fdir = 0; 110 | phi = std::copysign(PI_2, dir); 111 | } 112 | else if (PI_2 * 0.25 <= theta && theta <= PI_2 * 0.75) 113 | { 114 | Sdir = dir; 115 | Fdir = 1; 116 | phi = std::copysign(PI_4, dir); 117 | } 118 | else 119 | { 120 | Sdir = 0; 121 | Fdir = 1; 122 | phi = 0; 123 | } 124 | 125 | if (std::fabs(vel[0]) > 0.1 || std::fabs(vel[1]) > 0.1) 126 | yaw = std::atan2(vel[1], vel[0]); 127 | yaw += phi - std::copysign(theta, dir); 128 | double yawcand[2] = { 129 | anglemod_rad(yaw), anglemod_rad(yaw + std::copysign(M_U_RAD, yaw)) 130 | }; 131 | double avec[2] = { std::cos(yawcand[0] - phi), std::sin(yawcand[0] - phi) }; 132 | double tmpvel[2] = { vel[0], vel[1] }; 133 | strafe_fme_vec(vel, avec, L, tauMA); 134 | avec[0] = std::cos(yawcand[1] - phi); 135 | avec[1] = std::sin(yawcand[1] - phi); 136 | strafe_fme_vec(tmpvel, avec, L, tauMA); 137 | 138 | if (tmpvel[0] * tmpvel[0] + tmpvel[1] * tmpvel[1] > 139 | vel[0] * vel[0] + vel[1] * vel[1]) 140 | { 141 | vel[0] = tmpvel[0]; 142 | vel[1] = tmpvel[1]; 143 | yaw = yawcand[1]; 144 | } 145 | else 146 | yaw = yawcand[0]; 147 | } 148 | 149 | public: 150 | void strafe_side_opt(double& yaw, int& Sdir, int& Fdir, double* vel, 151 | double L, double tauMA, int dir) 152 | { 153 | double speed = std::hypot(vel[0], vel[1]); 154 | double theta = strafe_theta_opt(speed, L, tauMA); 155 | strafe_side(yaw, Sdir, Fdir, vel, theta, L, tauMA, dir); 156 | } 157 | 158 | void strafe_side_const(double& yaw, int& Sdir, int& Fdir, double vel[2], 159 | double nofricspd, double L, double tauMA, int dir) 160 | { 161 | double speed = std::hypot(vel[0], vel[1]); 162 | double theta = strafe_theta_const(speed, nofricspd, L, tauMA); 163 | strafe_side(yaw, Sdir, Fdir, vel, theta, L, tauMA, dir); 164 | } 165 | 166 | void strafe_line_opt(double& yaw, int& Sdir, int& Fdir, double vel[2], 167 | double pos[2], double L, double tau, double MA, 168 | double line_origin[2], double line_dir[2]) 169 | { 170 | double tauMA = tau * MA; 171 | double speed = std::hypot(vel[0], vel[1]); 172 | double theta = strafe_theta_opt(speed, L, tauMA); 173 | double ct = std::cos(theta); 174 | double tmp = L - speed * ct; 175 | if (tmp < 0) 176 | { 177 | strafe_side(yaw, Sdir, Fdir, vel, theta, L, tauMA, 1); 178 | return; 179 | } 180 | 181 | if (tauMA < tmp) 182 | tmp = tauMA; 183 | tmp /= speed; 184 | double st = std::sin(theta); 185 | double newpos_right[2], newpos_left[2]; 186 | double avec[2]; 187 | 188 | avec[0] = (vel[0] * ct + vel[1] * st) * tmp; 189 | avec[1] = (-vel[0] * st + vel[1] * ct) * tmp; 190 | newpos_right[0] = pos[0] + tau * (vel[0] + avec[0]); 191 | newpos_right[1] = pos[1] + tau * (vel[1] + avec[1]); 192 | 193 | avec[0] = (vel[0] * ct - vel[1] * st) * tmp; 194 | avec[1] = (vel[0] * st + vel[1] * ct) * tmp; 195 | newpos_left[0] = pos[0] + tau * (vel[0] + avec[0]); 196 | newpos_left[1] = pos[1] + tau * (vel[1] + avec[1]); 197 | 198 | bool rightgt = point2line_distsq(newpos_right, line_origin, line_dir) < 199 | point2line_distsq(newpos_left, line_origin, line_dir); 200 | strafe_side(yaw, Sdir, Fdir, vel, theta, L, tauMA, rightgt ? 1 : -1); 201 | } 202 | 203 | void strafe_back(double& yaw, int& Sdir, int& Fdir, double vel[2], 204 | double tauMA) 205 | { 206 | Sdir = 0; 207 | Fdir = -1; 208 | 209 | yaw = std::atan2(vel[1], vel[0]); 210 | float frac = yaw / M_U_RAD; 211 | frac -= std::trunc(frac); 212 | if (frac > 0.5) 213 | yaw += M_U_RAD; 214 | else if (frac < -0.5) 215 | yaw -= M_U_RAD; 216 | yaw = anglemod_rad(yaw); 217 | 218 | double avec[2] = { std::cos(yaw), std::sin(yaw) }; 219 | vel[0] -= tauMA * avec[0]; 220 | vel[1] -= tauMA * avec[1]; 221 | } 222 | 223 | double strafe_opt_spd(double spd, double L, double tauMA) 224 | { 225 | double tmp = L - tauMA; 226 | if (tmp < 0) 227 | return std::sqrt(spd * spd + L * L); 228 | if (tmp < spd) 229 | return std::sqrt(spd * spd + tauMA * (L + tmp)); 230 | return spd + tauMA; 231 | } 232 | }; 233 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Surface.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MiscDefinitions.h" 4 | 5 | #include "Vector.h" 6 | #include "MiscClasses.h" 7 | #include "Vector2D.h" 8 | 9 | struct Vertex_t 10 | { 11 | Vector2D m_Position; 12 | Vector2D m_TexCoord; 13 | 14 | Vertex_t() 15 | { 16 | } 17 | 18 | Vertex_t(const Vector2D& pos, const Vector2D& coord = Vector2D(0, 0)) 19 | { 20 | m_Position = pos; 21 | m_TexCoord = coord; 22 | } 23 | 24 | void Init(const Vector2D& pos, const Vector2D& coord = Vector2D(0, 0)) 25 | { 26 | m_Position = pos; 27 | m_TexCoord = coord; 28 | } 29 | }; 30 | 31 | typedef Vertex_t FontVertex_t; 32 | 33 | // Surface Drawing 34 | class ISurface 35 | { 36 | public: 37 | void DrawSetColor(Color col) 38 | { 39 | typedef void (__thiscall* oDrawSetColor)(PVOID, Color); 40 | return call_vfunc(this, 14)(this, col); 41 | } 42 | 43 | void DrawSetColor(int r, int g, int b, int a) 44 | { 45 | typedef void (__thiscall* OriginalFn)(PVOID, int, int, int, int); 46 | call_vfunc(this, 15)(this, r, g, b, a); 47 | } 48 | 49 | void DrawFilledRect(int x0, int y0, int x1, int y1) 50 | { 51 | typedef void (__thiscall* OriginalFn)(PVOID, int, int, int, int); 52 | call_vfunc(this, 16)(this, x0, y0, x1, y1); 53 | } 54 | 55 | void DrawOutlinedRect(int x0, int y0, int x1, int y1) 56 | { 57 | typedef void (__thiscall* OriginalFn)(PVOID, int, int, int, int); 58 | call_vfunc(this, 18)(this, x0, y0, x1, y1); 59 | } 60 | 61 | void DrawLine(int x0, int y0, int x1, int y1) 62 | { 63 | typedef void (__thiscall* OriginalFn)(PVOID, int, int, int, int); 64 | call_vfunc(this, 19)(this, x0, y0, x1, y1); 65 | } 66 | 67 | void DrawPolyLine(int* x, int* y, int count) 68 | { 69 | typedef void (__thiscall* OriginalFn)(PVOID, int*, int*, int); 70 | call_vfunc(this, 19 + 1)(this, x, y, count); 71 | } 72 | 73 | void DrawSetTextFont(unsigned long font) 74 | { 75 | typedef void (__thiscall* OriginalFn)(PVOID, unsigned long); 76 | call_vfunc(this, 23)(this, font); 77 | } 78 | 79 | void DrawSetTextColor(int r, int g, int b, int a) 80 | { 81 | typedef void (__thiscall* OriginalFn)(PVOID, int, int, int, int); 82 | call_vfunc(this, 25)(this, r, g, b, a); 83 | } 84 | 85 | void DrawSetTextColor(Color col) 86 | { 87 | typedef void (__thiscall* oDrawSetTextColor)(PVOID, Color); 88 | return call_vfunc(this, 24)(this, col); 89 | } 90 | 91 | void DrawSetTextPos(int x, int y) 92 | { 93 | typedef void (__thiscall* OriginalFn)(PVOID, int, int); 94 | call_vfunc(this, 26)(this, x, y); 95 | } 96 | 97 | void DrawPrintText(const wchar_t* text, int textLen) 98 | { 99 | typedef void (__thiscall* OriginalFn)(PVOID, const wchar_t*, int, int); 100 | call_vfunc(this, 28)(this, text, textLen, 0); 101 | } 102 | 103 | void DrawSetTexture(int textureID) 104 | { 105 | typedef void (__thiscall* oDrawSetTextColor)(PVOID, int); 106 | return call_vfunc(this, 38)(this, textureID); 107 | } 108 | 109 | void DrawTexturedRect(int x0, int y0, int x1, int y1) 110 | { 111 | typedef void (__thiscall* oDrawSetTextColor)(PVOID, int, int, int, int); 112 | return call_vfunc(this, 37 + 4)(this, x0, y0, x1, y1); 113 | } 114 | 115 | bool IsTextureIDValid(int textureID) 116 | { 117 | typedef bool (__thiscall* oDrawSetTextColor)(PVOID, int); 118 | return call_vfunc(this, 37 + 5)(this, textureID); 119 | } 120 | 121 | void DrawSetTextureRGBA(int textureID, unsigned char const* colors, int w, int h) 122 | { 123 | typedef void (__thiscall* oDrawSetTextColor)(PVOID, int, unsigned char const*, int, int); 124 | return call_vfunc(this, 37)(this, textureID, colors, w, h); 125 | } 126 | 127 | int CreateNewTextureID(bool procedural) 128 | { 129 | typedef int (__thiscall* oDrawSetTextColor)(PVOID, bool); 130 | return call_vfunc(this, 43)(this, procedural); 131 | } 132 | 133 | void DrawTexturedPolygon(int vtxCount, FontVertex_t* vtx, bool bClipVertices = true) 134 | { 135 | typedef void (__thiscall* oDrawSetTextColor)(PVOID, int, FontVertex_t*, bool); 136 | return call_vfunc(this, 106)(this, vtxCount, vtx, bClipVertices); 137 | } 138 | 139 | unsigned long FontCreate() 140 | { 141 | typedef unsigned int (__thiscall* OriginalFn)(PVOID); 142 | return call_vfunc(this, 71)(this); 143 | } 144 | 145 | void SetFontGlyphSet(unsigned long font, const char* windowsFontName, int tall, int weight, int blur, int scanlines, int flags) 146 | { 147 | typedef void (__thiscall* OriginalFn)(PVOID, unsigned long, const char*, int, int, int, int, int, int, int); 148 | call_vfunc(this, 72)(this, font, windowsFontName, tall, weight, blur, scanlines, flags, 0, 0); 149 | } 150 | 151 | void GetTextSize(unsigned long font, const wchar_t* text, int& wide, int& tall) 152 | { 153 | typedef void(__thiscall* OriginalFn)(PVOID, unsigned long, const wchar_t*, int&, int&); 154 | call_vfunc< OriginalFn >(this, 79)(this, font, text, wide, tall); 155 | } 156 | 157 | void DrawOutlinedCircle(int x, int y, int r, int seg) 158 | { 159 | typedef void (__thiscall* oDrawOutlinedCircle)(PVOID, int, int, int, int); 160 | return call_vfunc(this, 103)(this, x, y, r, seg); 161 | } 162 | 163 | void SurfaceGetCursorPos(int& x, int& y) 164 | { 165 | typedef void (__thiscall* oSurfaceGetCursorPos)(PVOID, int&, int&); 166 | return call_vfunc(this, 66)(this, x, y); 167 | } 168 | }; 169 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/SvCheatsGetBool.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "HookIncludes.h" 3 | #include 4 | typedef bool(__thiscall *svc_get_bool_t)(PVOID); 5 | 6 | 7 | 8 | 9 | auto dwCAM_Think = U::pattern_scan(GetModuleHandleW(L"client.dll"), "85 C0 75 30 38 86"); 10 | 11 | bool __fastcall hkSvCheatsGetBool(PVOID pConVar, void* edx) 12 | { 13 | static auto ofunc = hooks::sv_cheats.get_original(13); 14 | if (!ofunc) 15 | return false; 16 | 17 | if (reinterpret_cast(_ReturnAddress()) == reinterpret_cast(dwCAM_Think)) 18 | return true; 19 | return ofunc(pConVar); 20 | } -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Themes.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Interface.h" 3 | #include 4 | #include "Global.h" 5 | #include "PaintTraverse.h" 6 | 7 | ImFont* fDefault; 8 | ImFont* fkek; 9 | ImFont* fTabs; 10 | ImFont* Myfont; 11 | ImFont* insidous_3; 12 | ImFont* soulLotion_1; 13 | ImFont* Icons1; 14 | ImFont* Icons2; 15 | ImFont* Icons3; 16 | 17 | 18 | 19 | void RenderDefault(IDirect3DDevice9* pDevice) 20 | { 21 | ImGuiIO& io = ImGui::GetIO(); 22 | io.DeltaTime = 1.f / 60.f; 23 | D3DDEVICE_CREATION_PARAMETERS d3dcp{ 0 }; 24 | pDevice->GetCreationParameters(&d3dcp); 25 | 26 | auto& style = ImGui::GetStyle(); 27 | 28 | fDefault = io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\Tahoma.ttf", 16.0f); 29 | insidous_3 = io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\insidous3.ttf", 62.0f); 30 | soulLotion_1 = io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\soulLotion_1.ttf", 16.0f); 31 | Icons1 = io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\csgo_icons_outline.ttf", 16.0f); 32 | Icons2 = io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\csgo_icons.ttf", 16.0f); 33 | Icons3 = io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\undefeated_0.ttf", 30.0f); 34 | 35 | static int hue = 140; 36 | 37 | ImVec4 col_text = ImColor::HSV(hue / 255.f, 20.f / 255.f, 235.f / 255.f); 38 | ImVec4 col_theme = ImColor(130, 177, 255); 39 | ImVec4 col_main = ImColor(9, 82, 128); 40 | ImVec4 col_back = ImColor(31, 44, 54); 41 | ImVec4 col_area = ImColor(4, 32, 41); 42 | 43 | style.Colors[ImGuiCol_Text] = ImVec4(0.98f, 0.98f, 0.98f, 1.00f); 44 | style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f); 45 | style.Colors[ImGuiCol_WindowBg] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f); 46 | style.Colors[ImGuiCol_ChildWindowBg] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f); 47 | style.Colors[ImGuiCol_PopupBg] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f); 48 | style.Colors[ImGuiCol_Border] = ImVec4(0.80f, 0.80f, 0.83f, 0.88f); 49 | style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.92f, 0.91f, 0.88f, 0.00f); 50 | style.Colors[ImGuiCol_FrameBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); 51 | style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f); 52 | style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f); 53 | style.Colors[ImGuiCol_TitleBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); 54 | style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(1.00f, 0.98f, 0.95f, 0.75f); 55 | style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f); 56 | style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.f, 0.f, 0.80f, 1); 57 | style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); 58 | style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f); 59 | style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f); 60 | style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f); 61 | style.Colors[ImGuiCol_ComboBg] = ImVec4(0.19f, 0.18f, 0.21f, 1.00f); 62 | style.Colors[ImGuiCol_CheckMark] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f); 63 | style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.80f, 0, 0, 1); 64 | style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(g_Options.Colors.Border[0], g_Options.Colors.Border[1], g_Options.Colors.Border[2], g_Options.Colors.Border[3]); 65 | style.Colors[ImGuiCol_Button] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); 66 | style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f); 67 | style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f); 68 | style.Colors[ImGuiCol_Header] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); 69 | style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f); 70 | style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f); 71 | style.Colors[ImGuiCol_Column] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f); 72 | style.Colors[ImGuiCol_ColumnHovered] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f); 73 | style.Colors[ImGuiCol_ColumnActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f); 74 | style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); 75 | style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f); 76 | style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f); 77 | style.Colors[ImGuiCol_CloseButton] = ImVec4(0.40f, 0.39f, 0.38f, 0.16f); 78 | style.Colors[ImGuiCol_CloseButtonHovered] = ImVec4(0.40f, 0.39f, 0.38f, 0.39f); 79 | style.Colors[ImGuiCol_CloseButtonActive] = ImVec4(0.40f, 0.39f, 0.38f, 1.00f); 80 | style.Colors[ImGuiCol_PlotLines] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f); 81 | style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f); 82 | style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f); 83 | style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f); 84 | style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.25f, 1.00f, 0.00f, 0.43f); 85 | style.Colors[ImGuiCol_ModalWindowDarkening] = ImVec4(1.00f, 0.98f, 0.95f, 0.73f); 86 | 87 | style.Alpha = 1.0f; 88 | style.WindowPadding = ImVec2(8, 8); 89 | style.WindowMinSize = ImVec2(32, 32); 90 | style.WindowRounding = 0.5f; 91 | style.WindowTitleAlign = ImVec2(0.5f, 0.5f); 92 | style.ChildWindowRounding = 0.0f; 93 | style.FramePadding = ImVec2(4, 2); 94 | style.FrameRounding = 0.0f; 95 | style.ItemSpacing = ImVec2(8, 4); 96 | style.ItemInnerSpacing = ImVec2(4, 4); 97 | style.TouchExtraPadding = ImVec2(0, 0); 98 | style.IndentSpacing = 21.0f; 99 | style.ColumnsMinSpacing = 3.0f; 100 | style.ScrollbarSize = 12.0f; 101 | style.ScrollbarRounding = 0.0f; 102 | style.GrabMinSize = 0.1f; 103 | style.GrabRounding = 0.0f; 104 | style.ButtonTextAlign = ImVec2(0.5f, 0.5f); 105 | style.DisplayWindowPadding = ImVec2(22, 22); 106 | style.DisplaySafeAreaPadding = ImVec2(4, 4); 107 | style.AntiAliasedLines = true; 108 | style.AntiAliasedShapes = true; 109 | style.CurveTessellationTol = 1.25f; 110 | } 111 | 112 | 113 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Utilities.cpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | 4 | // Includes 5 | #include "Utilities.h" 6 | #include 7 | #include 8 | 9 | bool FileLog = false; 10 | std::ofstream logFile; 11 | 12 | // -------- U Core ------------ // 13 | // Opens a debug console 14 | void U::OpenConsole(std::string Title) 15 | { 16 | AllocConsole(); 17 | freopen("CONIN$", "r", stdin); 18 | freopen("CONOUT$", "w", stdout); 19 | freopen("CONOUT$", "w", stderr); 20 | 21 | SetConsoleTitle(Title.c_str()); 22 | } 23 | 24 | // Closes the debug console 25 | void U::CloseConsole() 26 | { 27 | FreeConsole(); 28 | } 29 | 30 | // Outputs text to the console 31 | void U::Log(const char *fmt, ...) 32 | { 33 | if (!fmt) return; //if the passed string is null return 34 | if (strlen(fmt) < 2) return; 35 | 36 | //Set up va_list and buffer to hold the params 37 | va_list va_alist; 38 | char logBuf[256] = { 0 }; 39 | 40 | //Do sprintf with the parameters 41 | va_start(va_alist, fmt); 42 | _vsnprintf(logBuf + strlen(logBuf), sizeof(logBuf) - strlen(logBuf), fmt, va_alist); 43 | va_end(va_alist); 44 | 45 | //Output to console 46 | if (logBuf[0] != '\0') 47 | { 48 | SetConsoleColor(FOREGROUND_INTENSE_RED); 49 | printf("[%s]", GetTimeString().c_str()); 50 | SetConsoleColor(FOREGROUND_WHITE); 51 | printf(": %s\n", logBuf); 52 | } 53 | 54 | if (FileLog) 55 | { 56 | logFile << logBuf << std::endl; 57 | } 58 | } 59 | 60 | // Gets the current time as a string 61 | std::string U::GetTimeString() 62 | { 63 | //Time related variables 64 | time_t current_time; 65 | struct tm *time_info; 66 | static char timeString[10]; 67 | 68 | //Get current time 69 | time(¤t_time); 70 | time_info = localtime(¤t_time); 71 | 72 | //Get current time as string 73 | strftime(timeString, sizeof(timeString), "%I:%M%p", time_info); 74 | return timeString; 75 | } 76 | 77 | // Sets the console color for upcoming text 78 | void U::SetConsoleColor(WORD color) 79 | { 80 | SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), color); 81 | } 82 | 83 | // Enables writing all log calls to a file 84 | void U::EnableLogFile(std::string filename) 85 | { 86 | logFile.open(filename.c_str()); 87 | if (logFile.is_open()) 88 | FileLog = true; 89 | } 90 | 91 | 92 | // -------- U Memory ------------ // 93 | 94 | DWORD U::WaitOnModuleHandle(std::string moduleName) 95 | { 96 | DWORD ModuleHandle = NULL; 97 | while (!ModuleHandle) 98 | { 99 | ModuleHandle = (DWORD)GetModuleHandle(moduleName.c_str()); 100 | if (!ModuleHandle) 101 | Sleep(50); 102 | } 103 | return ModuleHandle; 104 | } 105 | 106 | bool bCompare(const BYTE* Data, const BYTE* Mask, const char* szMask) 107 | { 108 | for (; *szMask; ++szMask, ++Mask, ++Data) 109 | { 110 | if (*szMask == 'x' && *Mask != *Data) 111 | { 112 | return false; 113 | } 114 | } 115 | return (*szMask) == 0; 116 | } 117 | 118 | 119 | DWORD U::FindPattern(std::string moduleName, BYTE* Mask, char* szMask) 120 | { 121 | DWORD Address = WaitOnModuleHandle(moduleName.c_str()); 122 | MODULEINFO ModInfo; GetModuleInformation(GetCurrentProcess(), (HMODULE)Address, &ModInfo, sizeof(MODULEINFO)); 123 | DWORD Length = ModInfo.SizeOfImage; 124 | for (DWORD c = 0; c < Length; c += 1) 125 | { 126 | if (bCompare((BYTE*)(Address + c), Mask, szMask)) 127 | { 128 | return DWORD(Address + c); 129 | } 130 | } 131 | return 0; 132 | } 133 | 134 | DWORD U::FindTextPattern(std::string moduleName, char* string) 135 | { 136 | DWORD Address = WaitOnModuleHandle(moduleName.c_str()); 137 | MODULEINFO ModInfo; GetModuleInformation(GetCurrentProcess(), (HMODULE)Address, &ModInfo, sizeof(MODULEINFO)); 138 | DWORD Length = ModInfo.SizeOfImage; 139 | 140 | int len = strlen(string); 141 | char* szMask = new char[len + 1]; 142 | for (int i = 0; i < len; i++) 143 | { 144 | szMask[i] = 'x'; 145 | } 146 | szMask[len] = '\0'; 147 | 148 | for (DWORD c = 0; c < Length; c += 1) 149 | { 150 | if (bCompare((BYTE*)(Address + c), (BYTE*)string, szMask)) 151 | { 152 | return (DWORD)(Address + c); 153 | } 154 | } 155 | return 0; 156 | } 157 | 158 | #pragma warning( disable : 4018 ) 159 | #pragma warning( disable : 4348 ) 160 | 161 | bool U::bin_match(uint8_t *code, std::vector< uint8_t > &pattern) 162 | { 163 | for (int j = 0; j < pattern.size(); j++) 164 | { 165 | if (!pattern[j] && code[j] != pattern[j]) 166 | { 167 | return false; 168 | } 169 | } 170 | 171 | return true; 172 | } 173 | 174 | template< typename T = uintptr_t > static T U::first_match(uintptr_t start, std::string sig, size_t len) 175 | { 176 | std::istringstream iss(sig); 177 | std::vector< std::string > tokens{ std::istream_iterator< std::string >{ iss }, std::istream_iterator< std::string >{} }; 178 | std::vector< uint8_t > sig_bytes; 179 | 180 | for (auto hex_byte : tokens) 181 | { 182 | sig_bytes.push_back(std::strtoul(hex_byte.c_str(), nullptr, 16)); 183 | } 184 | 185 | if (sig_bytes.empty() || sig_bytes.size() < 2) 186 | { 187 | return T{}; 188 | } 189 | 190 | for (size_t i{}; i < len; i++) 191 | { 192 | uint8_t *code_ptr = reinterpret_cast< uint8_t * >(start + i); 193 | 194 | if (code_ptr[0] != sig_bytes.at(0)) 195 | { 196 | continue; 197 | } 198 | 199 | if (bin_match(code_ptr, sig_bytes)) 200 | { 201 | return((T)(start + i)); 202 | } 203 | } 204 | 205 | return T{}; 206 | } 207 | 208 | template< typename T = uintptr_t > static T U::first_code_match(HMODULE start, std::string sig) 209 | { 210 | auto ntoskrnl = reinterpret_cast< PIMAGE_DOS_HEADER >(start); 211 | 212 | if (ntoskrnl->e_magic != 0x5a4d) 213 | { 214 | return T{}; 215 | } 216 | 217 | auto nt_hdrs = reinterpret_cast< PIMAGE_NT_HEADERS >(reinterpret_cast< uintptr_t >(ntoskrnl) + ntoskrnl->e_lfanew); 218 | 219 | return first_match< T >(reinterpret_cast< uintptr_t >(ntoskrnl) + nt_hdrs->OptionalHeader.BaseOfCode, sig, nt_hdrs->OptionalHeader.SizeOfCode); 220 | } 221 | 222 | std::uint8_t* U::pattern_scan(void* module, const char* signature) 223 | { 224 | static auto pattern_to_byte = [](const char* pattern) { 225 | auto bytes = std::vector{}; 226 | auto start = const_cast(pattern); 227 | auto end = const_cast(pattern) + strlen(pattern); 228 | 229 | for (auto current = start; current < end; ++current) { 230 | if (*current == '?') { 231 | ++current; 232 | if (*current == '?') 233 | ++current; 234 | bytes.push_back(-1); 235 | } 236 | else { 237 | bytes.push_back(strtoul(current, ¤t, 16)); 238 | } 239 | } 240 | return bytes; 241 | }; 242 | 243 | auto dosHeader = (PIMAGE_DOS_HEADER)module; 244 | auto ntHeaders = (PIMAGE_NT_HEADERS)((std::uint8_t*)module + dosHeader->e_lfanew); 245 | 246 | auto sizeOfImage = ntHeaders->OptionalHeader.SizeOfImage; 247 | auto patternBytes = pattern_to_byte(signature); 248 | auto scanBytes = reinterpret_cast(module); 249 | 250 | auto s = patternBytes.size(); 251 | auto d = patternBytes.data(); 252 | 253 | for (auto i = 0ul; i < sizeOfImage - s; ++i) { 254 | bool found = true; 255 | for (auto j = 0ul; j < s; ++j) { 256 | if (scanBytes[i + j] != d[j] && d[j] != -1) { 257 | found = false; 258 | break; 259 | } 260 | } 261 | if (found) { 262 | return &scanBytes[i]; 263 | } 264 | } 265 | return nullptr; 266 | } 267 | 268 | 269 | 270 | vfunc_hook::vfunc_hook() 271 | : class_base(nullptr), vftbl_len(0), new_vftbl(nullptr), old_vftbl(nullptr) 272 | { 273 | } 274 | vfunc_hook::vfunc_hook(void* base) 275 | : class_base(base), vftbl_len(0), new_vftbl(nullptr), old_vftbl(nullptr) 276 | { 277 | } 278 | vfunc_hook::~vfunc_hook() 279 | { 280 | unhook_all(); 281 | 282 | delete[] new_vftbl; 283 | } 284 | 285 | 286 | bool vfunc_hook::setup(void* base /*= nullptr*/) 287 | { 288 | if (base != nullptr) 289 | class_base = base; 290 | 291 | if (class_base == nullptr) 292 | return false; 293 | 294 | old_vftbl = *(std::uintptr_t**)class_base; 295 | vftbl_len = estimate_vftbl_length(old_vftbl); 296 | 297 | if (vftbl_len == 0) 298 | return false; 299 | 300 | new_vftbl = new std::uintptr_t[vftbl_len + 1](); 301 | 302 | std::memcpy(&new_vftbl[1], old_vftbl, vftbl_len * sizeof(std::uintptr_t)); 303 | 304 | 305 | try { 306 | auto guard = detail::protect_guard{ class_base, sizeof(std::uintptr_t), PAGE_READWRITE }; 307 | new_vftbl[0] = old_vftbl[-1]; 308 | *(std::uintptr_t**)class_base = &new_vftbl[1]; 309 | } 310 | catch (...) { 311 | delete[] new_vftbl; 312 | return false; 313 | } 314 | 315 | return true; 316 | } 317 | std::size_t vfunc_hook::estimate_vftbl_length(std::uintptr_t* vftbl_start) 318 | { 319 | auto len = std::size_t{}; 320 | 321 | while (vftbl_start[len] >= 0x00010000 && 322 | vftbl_start[len] < 0xFFF00000 && 323 | len < 512 /* Hard coded value. Can cause problems, beware.*/) { 324 | len++; 325 | } 326 | 327 | return len; 328 | } -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Utilities.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Includes 4 | #include "CommonIncludes.h" 5 | #include 6 | 7 | // Colors for the console 8 | //Define extra colours 9 | #define FOREGROUND_WHITE (FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_GREEN) 10 | #define FOREGROUND_YELLOW (FOREGROUND_RED | FOREGROUND_GREEN) 11 | #define FOREGROUND_CYAN (FOREGROUND_BLUE | FOREGROUND_GREEN) 12 | #define FOREGROUND_MAGENTA (FOREGROUND_RED | FOREGROUND_BLUE) 13 | #define FOREGROUND_BLACK 0 14 | 15 | #define FOREGROUND_INTENSE_RED (FOREGROUND_RED | FOREGROUND_INTENSITY) 16 | #define FOREGROUND_INTENSE_GREEN (FOREGROUND_GREEN | FOREGROUND_INTENSITY) 17 | #define FOREGROUND_INTENSE_BLUE (FOREGROUND_BLUE | FOREGROUND_INTENSITY) 18 | #define FOREGROUND_INTENSE_WHITE (FOREGROUND_WHITE | FOREGROUND_INTENSITY) 19 | #define FOREGROUND_INTENSE_YELLOW (FOREGROUND_YELLOW | FOREGROUND_INTENSITY) 20 | #define FOREGROUND_INTENSE_CYAN (FOREGROUND_CYAN | FOREGROUND_INTENSITY) 21 | #define FOREGROUND_INTENSE_MAGENTA (FOREGROUND_MAGENTA | FOREGROUND_INTENSITY) 22 | 23 | // U Namespace 24 | // Purpose: Contains misc functionality for memory related functionality 25 | namespace U 26 | { 27 | // Debug console controls 28 | void OpenConsole(std::string Title); 29 | void CloseConsole(); 30 | void Log(const char *fmt, ...); 31 | 32 | void EnableLogFile(std::string filename); 33 | 34 | void SetConsoleColor(WORD color); 35 | 36 | // Misc Shizz 37 | std::string GetTimeString(); 38 | 39 | // Memory utils 40 | // Purpose: Provides memeory related functionality (pattern scanning ect) 41 | 42 | // Waits for a module to be available, before returning it's base address 43 | DWORD WaitOnModuleHandle(std::string moduleName); 44 | 45 | // Attempts to locate the given signature and mask in a memory range 46 | // Returns the address at which it has been found 47 | DWORD FindPattern(std::string moduleName, BYTE* Mask, char* szMask); 48 | 49 | DWORD_PTR GetPatternOffset(std::string moduleName, PBYTE pattern, std::string mask, DWORD_PTR codeBase, DWORD_PTR codeSize); 50 | // Attempts to locate the given text in a memory range 51 | // Returns the address at which it has been found 52 | DWORD FindTextPattern(std::string moduleName, char* string); 53 | std::uint8_t* pattern_scan(void* module, const char* signature); 54 | DWORD FindPatternV2(std::string moduleName, std::string pattern); 55 | template 56 | T* CaptureInterface(std::string strModule, std::string strInterface) 57 | { 58 | typedef T* (*CreateInterfaceFn)(const char* szName, int iReturn); 59 | CreateInterfaceFn CreateInterface = (CreateInterfaceFn)GetProcAddress(GetModuleHandleA(strModule.c_str()), "CreateInterface"); 60 | 61 | return CreateInterface(strInterface.c_str(), 0); 62 | } 63 | 64 | bool bin_match(uint8_t *code, std::vector< uint8_t > &pattern); 65 | template< typename T = uintptr_t > static T first_match(uintptr_t start, std::string sig, size_t len); 66 | template< typename T = uintptr_t > static T first_code_match(HMODULE start, std::string sig); 67 | 68 | }; 69 | namespace detail 70 | { 71 | class protect_guard 72 | { 73 | public: 74 | protect_guard(void* base, size_t len, std::uint32_t flags) 75 | { 76 | _base = base; 77 | _length = len; 78 | if (!VirtualProtect(base, len, flags, (PDWORD)&_old)) 79 | throw std::runtime_error("Failed to protect region."); 80 | } 81 | ~protect_guard() 82 | { 83 | VirtualProtect(_base, _length, _old, (PDWORD)&_old); 84 | } 85 | 86 | private: 87 | void* _base; 88 | size_t _length; 89 | std::uint32_t _old; 90 | }; 91 | } 92 | class vfunc_hook 93 | { 94 | public: 95 | vfunc_hook(); 96 | vfunc_hook(void* base); 97 | ~vfunc_hook(); 98 | 99 | bool setup(void* class_base = nullptr); 100 | 101 | template 102 | void hook_index(int index, T fun) 103 | { 104 | assert(index >= 0 && index <= (int)vftbl_len); 105 | new_vftbl[index + 1] = reinterpret_cast(fun); 106 | } 107 | void unhook_index(int index) 108 | { 109 | new_vftbl[index] = old_vftbl[index]; 110 | } 111 | void unhook_all() 112 | { 113 | try { 114 | if (old_vftbl != nullptr) { 115 | auto guard = detail::protect_guard{ class_base, sizeof(std::uintptr_t), PAGE_READWRITE }; 116 | *(std::uintptr_t**)class_base = old_vftbl; 117 | old_vftbl = nullptr; 118 | } 119 | } 120 | catch (...) { 121 | } 122 | } 123 | 124 | template 125 | T get_original(int index) 126 | { 127 | return (T)old_vftbl[index]; 128 | } 129 | 130 | private: 131 | static inline std::size_t estimate_vftbl_length(std::uintptr_t* vftbl_start); 132 | 133 | void* class_base; 134 | std::size_t vftbl_len; 135 | std::uintptr_t* new_vftbl; 136 | std::uintptr_t* old_vftbl; 137 | }; 138 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/UtlBuffer.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/villeeh/Insidousccpaste/af3cbfc74f3553b58aa88991dc170add9ea0ffb7/Frostyv2/FROSTY v2/UtlBuffer.hpp -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/UtlString.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "UtlMemory.hpp" 7 | 8 | class CUtlBinaryBlock 9 | { 10 | public: 11 | CUtlBinaryBlock(int growSize = 0, int initSize = 0); 12 | 13 | // NOTE: nInitialLength indicates how much of the buffer starts full 14 | CUtlBinaryBlock(void* pMemory, int nSizeInBytes, int nInitialLength); 15 | CUtlBinaryBlock(const void* pMemory, int nSizeInBytes); 16 | CUtlBinaryBlock(const CUtlBinaryBlock& src); 17 | 18 | void Get(void *pValue, int nMaxLen) const; 19 | void Set(const void *pValue, int nLen); 20 | const void *Get() const; 21 | void *Get(); 22 | 23 | unsigned char& operator[](int i); 24 | const unsigned char& operator[](int i) const; 25 | 26 | int Length() const; 27 | void SetLength(int nLength); // Undefined memory will result 28 | bool IsEmpty() const; 29 | void Clear(); 30 | void Purge(); 31 | 32 | bool IsReadOnly() const; 33 | 34 | CUtlBinaryBlock &operator=(const CUtlBinaryBlock &src); 35 | 36 | // Test for equality 37 | bool operator==(const CUtlBinaryBlock &src) const; 38 | 39 | private: 40 | CUtlMemory m_Memory; 41 | int m_nActualLength; 42 | }; 43 | 44 | 45 | //----------------------------------------------------------------------------- 46 | // class inlines 47 | //----------------------------------------------------------------------------- 48 | inline const void *CUtlBinaryBlock::Get() const 49 | { 50 | return m_Memory.Base(); 51 | } 52 | 53 | inline void *CUtlBinaryBlock::Get() 54 | { 55 | return m_Memory.Base(); 56 | } 57 | 58 | inline int CUtlBinaryBlock::Length() const 59 | { 60 | return m_nActualLength; 61 | } 62 | 63 | inline unsigned char& CUtlBinaryBlock::operator[](int i) 64 | { 65 | return m_Memory[i]; 66 | } 67 | 68 | inline const unsigned char& CUtlBinaryBlock::operator[](int i) const 69 | { 70 | return m_Memory[i]; 71 | } 72 | 73 | inline bool CUtlBinaryBlock::IsReadOnly() const 74 | { 75 | return m_Memory.IsReadOnly(); 76 | } 77 | 78 | inline bool CUtlBinaryBlock::IsEmpty() const 79 | { 80 | return Length() == 0; 81 | } 82 | 83 | inline void CUtlBinaryBlock::Clear() 84 | { 85 | SetLength(0); 86 | } 87 | 88 | inline void CUtlBinaryBlock::Purge() 89 | { 90 | SetLength(0); 91 | m_Memory.Purge(); 92 | } 93 | 94 | //----------------------------------------------------------------------------- 95 | // Simple string class. 96 | // NOTE: This is *not* optimal! Use in tools, but not runtime code 97 | //----------------------------------------------------------------------------- 98 | class CUtlString 99 | { 100 | public: 101 | CUtlString(); 102 | CUtlString(const char *pString); 103 | CUtlString(const CUtlString& string); 104 | 105 | // Attaches the string to external memory. Useful for avoiding a copy 106 | CUtlString(void* pMemory, int nSizeInBytes, int nInitialLength); 107 | CUtlString(const void* pMemory, int nSizeInBytes); 108 | 109 | const char *Get() const; 110 | void Set(const char *pValue); 111 | 112 | // Set directly and don't look for a null terminator in pValue. 113 | void SetDirect(const char *pValue, int nChars); 114 | 115 | // Converts to c-strings 116 | operator const char*() const; 117 | 118 | // for compatibility switching items from UtlSymbol 119 | const char *String() const { return Get(); } 120 | 121 | // Returns strlen 122 | int Length() const; 123 | bool IsEmpty() const; 124 | 125 | // Sets the length (used to serialize into the buffer ) 126 | // Note: If nLen != 0, then this adds an extra byte for a null-terminator. 127 | void SetLength(int nLen); 128 | char *Get(); 129 | void Clear(); 130 | void Purge(); 131 | 132 | // Strips the trailing slash 133 | void StripTrailingSlash(); 134 | 135 | CUtlString &operator=(const CUtlString &src); 136 | CUtlString &operator=(const char *src); 137 | 138 | // Test for equality 139 | bool operator==(const CUtlString &src) const; 140 | bool operator==(const char *src) const; 141 | bool operator!=(const CUtlString &src) const { return !operator==(src); } 142 | bool operator!=(const char *src) const { return !operator==(src); } 143 | 144 | CUtlString &operator+=(const CUtlString &rhs); 145 | CUtlString &operator+=(const char *rhs); 146 | CUtlString &operator+=(char c); 147 | CUtlString &operator+=(int rhs); 148 | CUtlString &operator+=(double rhs); 149 | 150 | CUtlString operator+(const char *pOther); 151 | CUtlString operator+(int rhs); 152 | 153 | int Format(const char *pFormat, ...); 154 | 155 | // Take a piece out of the string. 156 | // If you only specify nStart, it'll go from nStart to the end. 157 | // You can use negative numbers and it'll wrap around to the start. 158 | CUtlString Slice(int32_t nStart = 0, int32_t nEnd = INT32_MAX); 159 | 160 | // Grab a substring starting from the left or the right side. 161 | CUtlString Left(int32_t nChars); 162 | CUtlString Right(int32_t nChars); 163 | 164 | // Replace all instances of one character with another. 165 | CUtlString Replace(char cFrom, char cTo); 166 | 167 | // Calls right through to V_MakeAbsolutePath. 168 | CUtlString AbsPath(const char *pStartingDir = NULL); 169 | 170 | // Gets the filename (everything except the path.. c:\a\b\c\somefile.txt -> somefile.txt). 171 | CUtlString UnqualifiedFilename(); 172 | 173 | // Strips off one directory. Uses V_StripLastDir but strips the last slash also! 174 | CUtlString DirName(); 175 | 176 | // Works like V_ComposeFileName. 177 | static CUtlString PathJoin(const char *pStr1, const char *pStr2); 178 | 179 | // These can be used for utlvector sorts. 180 | static int __cdecl SortCaseInsensitive(const CUtlString *pString1, const CUtlString *pString2); 181 | static int __cdecl SortCaseSensitive(const CUtlString *pString1, const CUtlString *pString2); 182 | 183 | private: 184 | CUtlBinaryBlock m_Storage; 185 | }; 186 | 187 | 188 | //----------------------------------------------------------------------------- 189 | // Inline methods 190 | //----------------------------------------------------------------------------- 191 | inline bool CUtlString::IsEmpty() const 192 | { 193 | return Length() == 0; 194 | } 195 | 196 | inline int __cdecl CUtlString::SortCaseInsensitive(const CUtlString *pString1, const CUtlString *pString2) 197 | { 198 | return _stricmp(pString1->String(), pString2->String()); 199 | } 200 | 201 | inline int __cdecl CUtlString::SortCaseSensitive(const CUtlString *pString1, const CUtlString *pString2) 202 | { 203 | return strcmp(pString1->String(), pString2->String()); 204 | } 205 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Variables.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | 6 | extern void RenderInterface(); 7 | 8 | struct skinInfo 9 | { 10 | int seed = -1; 11 | int paintkit; 12 | std::string tagName; 13 | }; 14 | 15 | 16 | struct Variables 17 | { 18 | Variables() 19 | { 20 | 21 | } 22 | 23 | struct Ragebot_s 24 | { 25 | bool MainSwitch; 26 | bool Enabled; 27 | bool AutoFire; 28 | float FOV; 29 | bool Silent; 30 | bool AutoPistol; 31 | int KeyPress; 32 | bool AimStep; 33 | 34 | //AA Builder 35 | bool BuilderAAs; 36 | bool Jitter; 37 | bool FJitter; 38 | bool LBYBreaker; 39 | float BuilderReal; 40 | float BuilderFake; 41 | float BuilderPitch; 42 | float JitterRange; 43 | float FJitterRange; 44 | 45 | 46 | bool EnabledAntiAim; 47 | int SubAATabs; 48 | bool PreAAs; 49 | int Pitch; 50 | int YawTrue; 51 | int YawFake; 52 | int YawTrueMove; 53 | float PitchAdder; 54 | float YawTrueAdder; 55 | float YawFakeAdder; 56 | float YawFakeMove; 57 | bool AtTarget; 58 | bool Edge; 59 | bool KnifeAA; 60 | bool FakeLag; 61 | int FakeLagAmt; 62 | 63 | 64 | bool FriendlyFire; 65 | int Hitbox; 66 | int Hitscan; 67 | float Pointscale; 68 | bool Multipoint; 69 | float Multipoints; 70 | 71 | bool AntiRecoil; 72 | bool AutoWall; 73 | bool AutoStop; 74 | bool AutoCrouch; 75 | bool AutoScope; 76 | float MinimumDamageSniper; 77 | float MinimumDamageRifle; 78 | float MinimumDamagePistol; 79 | float MinimumDamageHeavy; 80 | float MinimumDamageSmg; 81 | float MinimumDamageRevolver; 82 | bool Hitchance; 83 | float HitchanceSniper; 84 | float HitchancePistol; 85 | float HitchanceRifle; 86 | float HitchanceHeavy; 87 | float HitchanceSmgs; 88 | float HitchanceRevolver; 89 | bool Resolver; 90 | bool FakeLagFix; 91 | bool PosAdjust; 92 | bool playerlist; 93 | int BAIMkey; 94 | float bruteAfterX; 95 | bool MovingAA; 96 | } Ragebot; 97 | 98 | struct 99 | { 100 | bool MainSwitch; 101 | bool backtrack; 102 | float backtrackTicks; 103 | bool godwalk; 104 | bool Silent2; 105 | struct 106 | { 107 | bool Enabled; 108 | bool AutoPistol; 109 | bool Resolver; 110 | 111 | } Aimbot; 112 | 113 | int hitboxrifle; 114 | bool AutoPistol; 115 | int MainKey = 1; 116 | float MainSmooth; 117 | float Mainfov; 118 | float main_random_smooth; 119 | float main_recoil_min; 120 | float main_recoil_max; 121 | float main_randomized_angle; 122 | 123 | 124 | int hitboxpistol; 125 | int PistolKey = 6; 126 | float Pistolfov; 127 | float PistolSmooth; 128 | float pistol_random_smooth; 129 | float pistol_recoil_min; 130 | float pistol_recoil_max; 131 | float pistol_randomized_angle; 132 | 133 | int hitboxsmg; 134 | int SmgKey = 6; 135 | float SmgFov; 136 | float SmgSmooth; 137 | float Smg_random_smooth; 138 | float Smg_recoil_min; 139 | float Smg_recoil_max; 140 | float Smg_randomized_angle; 141 | 142 | 143 | int hitboxSniper; 144 | int hitboxPistol; 145 | int hitboxRifle; 146 | int hitboxSmg; 147 | int SniperKey = 6; 148 | float Sniperfov; 149 | float SniperSmooth; 150 | float sniper_random_smooth; 151 | float sniper_recoil_min; 152 | float sniper_recoil_max; 153 | float sniper_randomized_angle; 154 | bool LAA; 155 | bool LegitAA; 156 | bool DrawFov; 157 | int SwitchAA; 158 | bool SmokeCheck; 159 | bool RnbwSliders; 160 | 161 | struct 162 | { 163 | bool Head; 164 | bool Arms; 165 | bool Chest; 166 | bool Stomach; 167 | bool Legs; 168 | }Filter; 169 | 170 | struct 171 | { 172 | bool Enabled; 173 | float Delay; 174 | int Key = 6; 175 | float hitchance; 176 | struct 177 | { 178 | bool Head; 179 | bool Arms; 180 | bool Chest; 181 | bool Stomach; 182 | bool Legs; 183 | } Filter; 184 | 185 | } Triggerbot; 186 | 187 | } Legitbot; 188 | 189 | struct 190 | { 191 | bool MainSwitch; 192 | bool Enabled; 193 | bool TeamESP; 194 | bool Box; 195 | int BoxType; 196 | bool health; 197 | bool Armor; 198 | bool Money; 199 | bool VisCheck; 200 | bool Name; 201 | bool Distance; 202 | bool speclist; 203 | bool Skeleton; 204 | bool Callout; 205 | bool Weapon; 206 | int wpnmode; 207 | bool Flashed; 208 | bool Scoped; 209 | bool Reloading; 210 | bool Defusing; 211 | bool AimLine; 212 | bool Bomb; 213 | bool angleLines; 214 | bool LagCompensation; 215 | bool DrawAwall; 216 | bool backtrackline; 217 | 218 | 219 | bool Droppedguns; 220 | bool Grenades; 221 | 222 | int chamsubtab = 0; 223 | 224 | bool Chams; 225 | int matierial; 226 | bool outline; 227 | bool Teamchams; 228 | int champlayeralpha; 229 | 230 | bool Chamweapon; 231 | bool XQZ; 232 | 233 | bool handcham; 234 | int chamhandalpha; 235 | bool weaponviewcham; 236 | 237 | int weaponmat; 238 | int handmat; 239 | int weaponhandalpha; 240 | 241 | bool Crosshair; 242 | bool RecoilCrosshair; 243 | bool xSpread; 244 | bool xRecoil; 245 | 246 | bool Hitmarker = true; 247 | int Hitsound = 4; 248 | 249 | bool EventLog; 250 | 251 | bool NoVisualRecoil; 252 | bool showBacktrack; 253 | float FOVChanger; 254 | float viewmodelChanger = 68; 255 | bool NoFlash; 256 | bool NoSmoke; 257 | int TPKey; 258 | float tpdist = 200; 259 | bool ThirdPerson; 260 | bool Time = true; 261 | 262 | bool noscopeborder; 263 | bool GrenadePrediction; 264 | 265 | int glowsubtab = 0; 266 | bool glowplayer; 267 | int playerglowalpha; 268 | bool teamglow; 269 | 270 | bool weaponglow; 271 | int weaponglowalpha; 272 | 273 | bool bombglow; 274 | int bombglowalpha; 275 | 276 | bool GrenadePred; 277 | bool DLight; 278 | bool radar; 279 | int BoxHotkey;; 280 | int SkeleHotkey; 281 | int RadarHotkey; 282 | 283 | 284 | 285 | } Visuals; 286 | 287 | struct 288 | { 289 | bool MainSwitch; 290 | bool antiuntrusted = true; 291 | bool silentstealer; 292 | bool ChromeWorld; 293 | int ragequit; 294 | bool Bhop; 295 | bool AutoStrafe; 296 | float MinVel; 297 | float FakeLag; 298 | bool AdaptiveFakeLag; 299 | bool nightMode; 300 | int NameSpammer; 301 | bool NameChangerFix; 302 | bool NoName; 303 | int ChatSpamMode; 304 | bool ClantagChanger; 305 | int clantags; 306 | bool clantagsxd; 307 | int syncclantags; 308 | int ClanTagSpeed; 309 | bool FPSBooster; 310 | int SkyBoxChanger; 311 | int Skybox; 312 | bool namespam; 313 | int spammer; 314 | bool Spam; 315 | bool isRecording; 316 | bool isReplaying; 317 | bool RecordPath; 318 | bool AutoAccept; 319 | bool ServerRankRevealAll; 320 | bool SpoofConfirmation = false; 321 | bool animatedclantag = false; 322 | int customtab; 323 | int Slowmo; 324 | bool MoonWalk; 325 | bool crack; 326 | bool Gray; 327 | bool fps; 328 | bool FakePing; 329 | int FakePing2; 330 | bool PurchaseInfo; 331 | bool DmgInfo; 332 | bool DmgInfo2; 333 | bool BacktrackExploitChk; 334 | bool KnifeHand; 335 | bool skyboxTest; 336 | bool spofff; 337 | bool lAA; 338 | bool LegitAA; 339 | bool legitBhop; 340 | int FakePingAmt; 341 | bool BrdrClr; 342 | bool inventoryalwayson; 343 | 344 | 345 | } Misc; 346 | struct 347 | { 348 | bool Enabled; 349 | 350 | int knifemodel; 351 | 352 | int glove; 353 | int gloeskin; 354 | 355 | 356 | struct 357 | { 358 | bool ChangerEnabled = false; 359 | int ChangerSkin = 0; 360 | char ChangerName[32] = ""; 361 | int ChangerStatTrak = 0; 362 | int ChangerSeed = 0; 363 | float ChangerWear = 0; 364 | 365 | } W[519]; // CHANGE HERE 366 | 367 | std::unordered_map> weaponSkins; 368 | std::unordered_map skinMap; 369 | std::unordered_map skinNames; 370 | bool WeaponTags; 371 | bool StattrakOn; 372 | int SkinNamesxd; 373 | std::vector weaponNames; 374 | } Skinchanger; 375 | 376 | struct 377 | { 378 | bool Opened = true; 379 | int Key; 380 | int rageSubtab; 381 | int ConfigFile = 0; 382 | int Theme = 0; 383 | int iTab; 384 | bool bShowTabs; 385 | float flMainAlpha; 386 | float flTabsAlpha; 387 | int currentWeapon; 388 | } Menu; 389 | 390 | struct 391 | { 392 | float TeamESP[3] = { 0, 1.f, 0 }; 393 | float EnemyESP[3] = { 1.f, 0, 0 }; 394 | float TeamDLights[3] = { 0, 1.f, 0 }; 395 | float EnemyDLights[3] = { 1.f, 0, 0 }; 396 | float EnemyGlow[3] = { 1.f, 0, 0 }; 397 | float TeamGlow[3] = { 0, 1.f, 0 }; 398 | float WeaponGlow[3] = { 1.f, 0, 0 }; 399 | float C4glow[3] = { 1.f, 0, 0 }; 400 | float EnemyChamsVis[3] = { 1.f, 0, 0 }; 401 | float EnemyChamsNVis[3] = { 1.f, 0, 0 }; 402 | float TeamChamsVis[3] = { 0, 1.f, 0 }; 403 | float TeamChamsNVis[3] = { 0, 1.f, 0 }; 404 | float WeaponCham[3] = { 1.f, 0, 0 }; 405 | float HandCham[3] = { 1.f, 0, 0 }; 406 | float WeaponViewCham[3] = { 1.f, 0, 0 }; 407 | float color_skeleton[3] = { 1.f, 1.f, 1.f }; 408 | float backtrackdots_color[3] = { 1.f, 0, 0 }; 409 | float tracer_color[3] = { 1.f, 0, 0 }; 410 | float hitmark_color[3] = { 0, 0, 1.f }; 411 | float color_spread[3] = { 0, 1.f, 0 }; 412 | float color_recoil[3] = { 0, 0, 1.f }; 413 | float dlight_color[3] = { 0, 1.f, 0 }; 414 | float MolotovC[3] = { 0, 1.f, 0 }; 415 | float Incendiary[3] = { 0, 1.f, 0 }; 416 | float Decoy[3] = { 0, 1.f, 0 }; 417 | float Flash[3] = { 1.f, 0, 0 }; 418 | float HeG[3] = { 0, 0, 1.f }; 419 | float Smoke[3] = { 0, 1.f, 0 }; 420 | float GrenadePredEnd[3] = { 0, 1.f, 1.f }; 421 | float backtrackdotsR_color[3] = { 1.f, 0, 1.f }; 422 | float Border[3] = { 1.f, 1.f, 1.f }; 423 | float HandsColor[3] = { 0.f, 0.f, 1.f }; 424 | }Colors; 425 | }; 426 | 427 | extern Variables g_Options; -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/Visual.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/XorStr.hpp: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------- 2 | //-- XorCompileTime.hpp 3 | // 4 | // Author: frk 5 | // Date: 12.12.2015 6 | // 7 | //-------------------------------------------------------------------------------- 8 | 9 | #pragma once 10 | #include 11 | #include 12 | #include 13 | 14 | #define BEGIN_NAMESPACE( x ) namespace x { 15 | #define END_NAMESPACE } 16 | 17 | BEGIN_NAMESPACE(XorCompileTime) 18 | 19 | constexpr auto time = __TIME__; 20 | constexpr auto seed = static_cast< int >(time[7]) + static_cast< int >(time[6]) * 10 + static_cast< int >(time[4]) * 60 + static_cast< int >(time[3]) * 600 + static_cast< int >(time[1]) * 3600 + static_cast< int >(time[0]) * 36000; 21 | 22 | // 1988, Stephen Park and Keith Miller 23 | // "Random Number Generators: Good Ones Are Hard To Find", considered as "minimal standard" 24 | // Park-Miller 31 bit pseudo-random number generator, implemented with G. Carta's optimisation: 25 | // with 32-bit math and without division 26 | 27 | template < int N > 28 | struct RandomGenerator 29 | { 30 | private: 31 | static constexpr unsigned a = 16807; // 7^5 32 | static constexpr unsigned m = 2147483647; // 2^31 - 1 33 | 34 | static constexpr unsigned s = RandomGenerator< N - 1 >::value; 35 | static constexpr unsigned lo = a * (s & 0xFFFF); // Multiply lower 16 bits by 16807 36 | static constexpr unsigned hi = a * (s >> 16); // Multiply higher 16 bits by 16807 37 | static constexpr unsigned lo2 = lo + ((hi & 0x7FFF) << 16); // Combine lower 15 bits of hi with lo's upper bits 38 | static constexpr unsigned hi2 = hi >> 15; // Discard lower 15 bits of hi 39 | static constexpr unsigned lo3 = lo2 + hi; 40 | 41 | public: 42 | static constexpr unsigned max = m; 43 | static constexpr unsigned value = lo3 > m ? lo3 - m : lo3; 44 | }; 45 | 46 | template <> 47 | struct RandomGenerator< 0 > 48 | { 49 | static constexpr unsigned value = seed; 50 | }; 51 | 52 | template < int N, int M > 53 | struct RandomInt 54 | { 55 | static constexpr auto value = RandomGenerator< N + 1 >::value % M; 56 | }; 57 | 58 | template < int N > 59 | struct RandomChar 60 | { 61 | static const char value = static_cast< char >(1 + RandomInt< N, 0x7F - 1 >::value); 62 | }; 63 | 64 | template < size_t N, int K > 65 | struct XorString 66 | { 67 | private: 68 | const char _key; 69 | std::array< char, N + 1 > _encrypted; 70 | 71 | constexpr char enc(char c) const 72 | { 73 | return c ^ _key; 74 | } 75 | 76 | char dec(char c) const 77 | { 78 | return c ^ _key; 79 | } 80 | 81 | public: 82 | template < size_t... Is > 83 | constexpr __forceinline XorString(const char* str, std::index_sequence< Is... >) : _key(RandomChar< K >::value), _encrypted{enc(str[Is])...} 84 | { 85 | } 86 | 87 | __forceinline decltype(auto) decrypt(void) 88 | { 89 | for(size_t i = 0; i < N; ++i) { 90 | _encrypted[i] = dec(_encrypted[i]); 91 | } 92 | _encrypted[N] = '\0'; 93 | return _encrypted.data(); 94 | } 95 | }; 96 | 97 | //-------------------------------------------------------------------------------- 98 | //-- Note: XorStr will __NOT__ work directly with functions like printf. 99 | // To work with them you need a wrapper function that takes a const char* 100 | // as parameter and passes it to printf and alike. 101 | // 102 | // The Microsoft Compiler/Linker is not working correctly with variadic 103 | // templates! 104 | // 105 | // Use the functions below or use std::cout (and similar)! 106 | //-------------------------------------------------------------------------------- 107 | 108 | static auto w_printf = [](const char* fmt, ...) { 109 | va_list args; 110 | va_start(args, fmt); 111 | vprintf_s(fmt, args); 112 | va_end(args); 113 | }; 114 | 115 | static auto w_printf_s = [](const char* fmt, ...) { 116 | va_list args; 117 | va_start(args, fmt); 118 | vprintf_s(fmt, args); 119 | va_end(args); 120 | }; 121 | 122 | static auto w_sprintf = [](char* buf, const char* fmt, ...) { 123 | va_list args; 124 | va_start(args, fmt); 125 | vsprintf(buf, fmt, args); 126 | va_end(args); 127 | }; 128 | 129 | static auto w_sprintf_s = [](char* buf, size_t buf_size, const char* fmt, ...) { 130 | va_list args; 131 | va_start(args, fmt); 132 | vsprintf_s(buf, buf_size, fmt, args); 133 | va_end(args); 134 | }; 135 | 136 | #ifdef NDEBUG 137 | #define XorStr( s ) ( XorCompileTime::XorString< sizeof( s ) - 1, __COUNTER__ >( s, std::make_index_sequence< sizeof( s ) - 1>() ).decrypt() ) 138 | #else 139 | #define XorStr( s ) ( s ) 140 | #endif 141 | 142 | END_NAMESPACE -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/bspflags.h: -------------------------------------------------------------------------------- 1 | //========= Copyright Valve Corporation, All rights reserved. ============// 2 | // 3 | // Purpose: 4 | // 5 | // $Workfile: $ 6 | // $Date: $ 7 | // $NoKeywords: $ 8 | //=============================================================================// 9 | 10 | #ifndef BSPFLAGS_H 11 | #define BSPFLAGS_H 12 | 13 | #ifdef _WIN32 14 | #pragma once 15 | #endif 16 | 17 | // contents flags are seperate bits 18 | // a given brush can contribute multiple content bits 19 | // multiple brushes can be in a single leaf 20 | 21 | // these definitions also need to be in q_shared.h! 22 | 23 | // lower bits are stronger, and will eat weaker brushes completely 24 | #define CONTENTS_EMPTY 0 // No contents 25 | 26 | #define CONTENTS_SOLID 0x1 // an eye is never valid in a solid 27 | #define CONTENTS_WINDOW 0x2 // translucent, but not watery (glass) 28 | #define CONTENTS_AUX 0x4 29 | #define CONTENTS_GRATE 0x8 // alpha-tested "grate" textures. Bullets/sight pass through, but solids don't 30 | #define CONTENTS_SLIME 0x10 31 | #define CONTENTS_WATER 0x20 32 | #define CONTENTS_BLOCKLOS 0x40 // block AI line of sight 33 | #define CONTENTS_OPAQUE 0x80 // things that cannot be seen through (may be non-solid though) 34 | #define LAST_VISIBLE_CONTENTS 0x80 35 | 36 | #define ALL_VISIBLE_CONTENTS (LAST_VISIBLE_CONTENTS | (LAST_VISIBLE_CONTENTS-1)) 37 | 38 | #define CONTENTS_TESTFOGVOLUME 0x100 39 | #define CONTENTS_UNUSED 0x200 40 | 41 | // unused 42 | // NOTE: If it's visible, grab from the top + update LAST_VISIBLE_CONTENTS 43 | // if not visible, then grab from the bottom. 44 | #define CONTENTS_UNUSED6 0x400 45 | 46 | #define CONTENTS_TEAM1 0x800 // per team contents used to differentiate collisions 47 | #define CONTENTS_TEAM2 0x1000 // between players and objects on different teams 48 | 49 | // ignore CONTENTS_OPAQUE on surfaces that have SURF_NODRAW 50 | #define CONTENTS_IGNORE_NODRAW_OPAQUE 0x2000 51 | 52 | // hits entities which are MOVETYPE_PUSH (doors, plats, etc.) 53 | #define CONTENTS_MOVEABLE 0x4000 54 | 55 | // remaining contents are non-visible, and don't eat brushes 56 | #define CONTENTS_AREAPORTAL 0x8000 57 | 58 | #define CONTENTS_PLAYERCLIP 0x10000 59 | #define CONTENTS_MONSTERCLIP 0x20000 60 | 61 | // currents can be added to any other contents, and may be mixed 62 | #define CONTENTS_CURRENT_0 0x40000 63 | #define CONTENTS_CURRENT_90 0x80000 64 | #define CONTENTS_CURRENT_180 0x100000 65 | #define CONTENTS_CURRENT_270 0x200000 66 | #define CONTENTS_CURRENT_UP 0x400000 67 | #define CONTENTS_CURRENT_DOWN 0x800000 68 | 69 | #define CONTENTS_ORIGIN 0x1000000 // removed before bsping an entity 70 | 71 | #define CONTENTS_MONSTER 0x2000000 // should never be on a brush, only in game 72 | #define CONTENTS_DEBRIS 0x4000000 73 | #define CONTENTS_DETAIL 0x8000000 // brushes to be added after vis leafs 74 | #define CONTENTS_TRANSLUCENT 0x10000000 // auto set if any surface has trans 75 | #define CONTENTS_LADDER 0x20000000 76 | #define CONTENTS_HITBOX 0x40000000 // use accurate hitboxes on trace 77 | 78 | 79 | // NOTE: These are stored in a short in the engine now. Don't use more than 16 bits 80 | #define SURF_LIGHT 0x0001 // value will hold the light strength 81 | #define SURF_SKY2D 0x0002 // don't draw, indicates we should skylight + draw 2d sky but not draw the 3D skybox 82 | #define SURF_SKY 0x0004 // don't draw, but add to skybox 83 | #define SURF_WARP 0x0008 // turbulent water warp 84 | #define SURF_TRANS 0x0010 85 | #define SURF_NOPORTAL 0x0020 // the surface can not have a portal placed on it 86 | #define SURF_TRIGGER 0x0040 // FIXME: This is an xbox hack to work around elimination of trigger surfaces, which breaks occluders 87 | #define SURF_NODRAW 0x0080 // don't bother referencing the texture 88 | 89 | #define SURF_HINT 0x0100 // make a primary bsp splitter 90 | 91 | #define SURF_SKIP 0x0200 // completely ignore, allowing non-closed brushes 92 | #define SURF_NOLIGHT 0x0400 // Don't calculate light 93 | #define SURF_BUMPLIGHT 0x0800 // calculate three lightmaps for the surface for bumpmapping 94 | #define SURF_NOSHADOWS 0x1000 // Don't receive shadows 95 | #define SURF_NODECALS 0x2000 // Don't receive decals 96 | #define SURF_NOCHOP 0x4000 // Don't subdivide patches on this surface 97 | #define SURF_HITBOX 0x8000 // surface is part of a hitbox 98 | 99 | 100 | // ----------------------------------------------------- 101 | // spatial content masks - used for spatial queries (traceline,etc.) 102 | // ----------------------------------------------------- 103 | #define MASK_ALL (0xFFFFFFFF) 104 | // everything that is normally solid 105 | #define MASK_SOLID (CONTENTS_SOLID|CONTENTS_MOVEABLE|CONTENTS_WINDOW|CONTENTS_MONSTER|CONTENTS_GRATE) 106 | // everything that blocks player movement 107 | #define MASK_PLAYERSOLID (CONTENTS_SOLID|CONTENTS_MOVEABLE|CONTENTS_PLAYERCLIP|CONTENTS_WINDOW|CONTENTS_MONSTER|CONTENTS_GRATE) 108 | // blocks npc movement 109 | #define MASK_NPCSOLID (CONTENTS_SOLID|CONTENTS_MOVEABLE|CONTENTS_MONSTERCLIP|CONTENTS_WINDOW|CONTENTS_MONSTER|CONTENTS_GRATE) 110 | // water physics in these contents 111 | #define MASK_WATER (CONTENTS_WATER|CONTENTS_MOVEABLE|CONTENTS_SLIME) 112 | // everything that blocks lighting 113 | #define MASK_OPAQUE (CONTENTS_SOLID|CONTENTS_MOVEABLE|CONTENTS_OPAQUE) 114 | // everything that blocks lighting, but with monsters added. 115 | #define MASK_OPAQUE_AND_NPCS (MASK_OPAQUE|CONTENTS_MONSTER) 116 | // everything that blocks line of sight for AI 117 | #define MASK_BLOCKLOS (CONTENTS_SOLID|CONTENTS_MOVEABLE|CONTENTS_BLOCKLOS) 118 | // everything that blocks line of sight for AI plus NPCs 119 | #define MASK_BLOCKLOS_AND_NPCS (MASK_BLOCKLOS|CONTENTS_MONSTER) 120 | // everything that blocks line of sight for players 121 | #define MASK_VISIBLE (MASK_OPAQUE|CONTENTS_IGNORE_NODRAW_OPAQUE) 122 | // everything that blocks line of sight for players, but with monsters added. 123 | #define MASK_VISIBLE_AND_NPCS (MASK_OPAQUE_AND_NPCS|CONTENTS_IGNORE_NODRAW_OPAQUE) 124 | // bullets see these as solid 125 | #define MASK_SHOT (CONTENTS_SOLID|CONTENTS_MOVEABLE|CONTENTS_MONSTER|CONTENTS_WINDOW|CONTENTS_DEBRIS|CONTENTS_HITBOX) 126 | // non-raycasted weapons see this as solid (includes grates) 127 | #define MASK_SHOT_HULL (CONTENTS_SOLID|CONTENTS_MOVEABLE|CONTENTS_MONSTER|CONTENTS_WINDOW|CONTENTS_DEBRIS|CONTENTS_GRATE) 128 | // hits solids (not grates) and passes through everything else 129 | #define MASK_SHOT_PORTAL (CONTENTS_SOLID|CONTENTS_MOVEABLE|CONTENTS_WINDOW|CONTENTS_MONSTER) 130 | // everything normally solid, except monsters (world+brush only) 131 | #define MASK_SOLID_BRUSHONLY (CONTENTS_SOLID|CONTENTS_MOVEABLE|CONTENTS_WINDOW|CONTENTS_GRATE) 132 | // everything normally solid for player movement, except monsters (world+brush only) 133 | #define MASK_PLAYERSOLID_BRUSHONLY (CONTENTS_SOLID|CONTENTS_MOVEABLE|CONTENTS_WINDOW|CONTENTS_PLAYERCLIP|CONTENTS_GRATE) 134 | // everything normally solid for npc movement, except monsters (world+brush only) 135 | #define MASK_NPCSOLID_BRUSHONLY (CONTENTS_SOLID|CONTENTS_MOVEABLE|CONTENTS_WINDOW|CONTENTS_MONSTERCLIP|CONTENTS_GRATE) 136 | // just the world, used for route rebuilding 137 | #define MASK_NPCWORLDSTATIC (CONTENTS_SOLID|CONTENTS_WINDOW|CONTENTS_MONSTERCLIP|CONTENTS_GRATE) 138 | // These are things that can split areaportals 139 | #define MASK_SPLITAREAPORTAL (CONTENTS_WATER|CONTENTS_SLIME) 140 | 141 | // UNDONE: This is untested, any moving water 142 | #define MASK_CURRENT (CONTENTS_CURRENT_0|CONTENTS_CURRENT_90|CONTENTS_CURRENT_180|CONTENTS_CURRENT_270|CONTENTS_CURRENT_UP|CONTENTS_CURRENT_DOWN) 143 | 144 | // everything that blocks corpse movement 145 | // UNDONE: Not used yet / may be deleted 146 | #define MASK_DEADSOLID (CONTENTS_SOLID|CONTENTS_PLAYERCLIP|CONTENTS_WINDOW|CONTENTS_GRATE) 147 | 148 | #endif // BSPFLAGS_H 149 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/memesets.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "CommonIncludes.h" 3 | 4 | 5 | struct COffsetz 6 | { 7 | struct 8 | { 9 | std::ptrdiff_t m_Local; 10 | std::ptrdiff_t m_aimPunchAngle; 11 | std::ptrdiff_t m_aimPunchAngleVel; 12 | std::ptrdiff_t m_viewPunchAngle; 13 | std::ptrdiff_t m_vecViewOffset; 14 | std::ptrdiff_t m_nTickBase; 15 | std::ptrdiff_t m_vecVelocity; 16 | std::ptrdiff_t m_iHealth; 17 | std::ptrdiff_t m_iMaxHealth; 18 | std::ptrdiff_t m_lifeState; 19 | std::ptrdiff_t m_fFlags; 20 | std::ptrdiff_t m_iObserverMode; 21 | std::ptrdiff_t m_hObserverTarget; 22 | std::ptrdiff_t m_hViewModel; 23 | std::ptrdiff_t m_szLastPlaceName; 24 | std::ptrdiff_t deadflag; 25 | } DT_BasePlayer; 26 | 27 | struct 28 | { 29 | std::ptrdiff_t m_flAnimTime; 30 | std::ptrdiff_t m_flSimulationTime; 31 | std::ptrdiff_t m_vecOrigin; 32 | std::ptrdiff_t m_hOwner; 33 | std::ptrdiff_t m_angRotation; 34 | std::ptrdiff_t m_nRenderMode; 35 | std::ptrdiff_t m_iTeamNum; 36 | std::ptrdiff_t m_MoveType; 37 | std::ptrdiff_t m_Collision; 38 | std::ptrdiff_t m_bSpotted; 39 | std::ptrdiff_t m_vecMins; 40 | std::ptrdiff_t m_vecMaxs; 41 | std::ptrdiff_t m_nSolidType; 42 | std::ptrdiff_t m_usSolidFlags; 43 | std::ptrdiff_t m_nSurroundType; 44 | } DT_BaseEntity; 45 | 46 | struct 47 | { 48 | std::ptrdiff_t m_nHitboxSet; 49 | } DT_BaseAnimating; 50 | 51 | struct 52 | { 53 | std::ptrdiff_t m_hActiveWeapon; 54 | std::ptrdiff_t m_hMyWeapons; 55 | std::ptrdiff_t m_hMyWearables; 56 | } DT_BaseCombatCharacter; 57 | 58 | struct 59 | { 60 | std::ptrdiff_t m_iPing; 61 | std::ptrdiff_t m_iKills; 62 | std::ptrdiff_t m_iAssists; 63 | std::ptrdiff_t m_iDeaths; 64 | std::ptrdiff_t m_bConnected; 65 | std::ptrdiff_t m_iTeam; 66 | std::ptrdiff_t m_iPendingTeam; 67 | std::ptrdiff_t m_bAlive; 68 | std::ptrdiff_t m_iHealth; 69 | } DT_PlayerResource; 70 | 71 | struct 72 | { 73 | std::ptrdiff_t m_iPlayerC4; 74 | std::ptrdiff_t m_iPlayerVIP; 75 | std::ptrdiff_t m_bHostageAlive; 76 | std::ptrdiff_t m_isHostageFollowingSomeone; 77 | std::ptrdiff_t m_iHostageEntityIDs; 78 | std::ptrdiff_t m_bombsiteCenterB; 79 | std::ptrdiff_t m_hostageRescueX; 80 | std::ptrdiff_t m_hostageRescueY; 81 | std::ptrdiff_t m_hostageRescueZ; 82 | std::ptrdiff_t m_iMVPs; 83 | std::ptrdiff_t m_iArmor; 84 | std::ptrdiff_t m_bHasHelmet; 85 | std::ptrdiff_t m_bHasDefuser; 86 | std::ptrdiff_t m_iScore; 87 | std::ptrdiff_t m_iCompetitiveRanking; 88 | std::ptrdiff_t m_iCompetitiveWins; 89 | std::ptrdiff_t m_iCompTeammateColor; 90 | std::ptrdiff_t m_bControllingBot; 91 | std::ptrdiff_t m_iControlledPlayer; 92 | std::ptrdiff_t m_iControlledByPlayer; 93 | std::ptrdiff_t m_iBotDifficulty; 94 | std::ptrdiff_t m_szClan; 95 | std::ptrdiff_t m_iTotalCashSpent; 96 | std::ptrdiff_t m_iCashSpentThisRound; 97 | std::ptrdiff_t m_nEndMatchNextMapVotes; 98 | std::ptrdiff_t m_bEndMatchNextMapAllVoted; 99 | std::ptrdiff_t m_nActiveCoinRank; 100 | std::ptrdiff_t m_nMusicID; 101 | std::ptrdiff_t m_nPersonaDataPublicLevel; 102 | std::ptrdiff_t m_nPersonaDataPublicCommendsLeader; 103 | std::ptrdiff_t m_nPersonaDataPublicCommendsTeacher; 104 | std::ptrdiff_t m_nPersonaDataPublicCommendsFriendly; 105 | } DT_CSPlayerResource; 106 | 107 | struct 108 | { 109 | std::ptrdiff_t m_bBombTicking; 110 | std::ptrdiff_t m_flC4Blow; 111 | std::ptrdiff_t m_bBombDefused; 112 | std::ptrdiff_t m_hBombDefuser; 113 | std::ptrdiff_t m_flDefuseCountDown; 114 | } DT_PlantedC4; 115 | 116 | struct 117 | { 118 | std::ptrdiff_t m_iShotsFired; 119 | std::ptrdiff_t m_angEyeAngles[2]; 120 | std::ptrdiff_t m_iAccount; 121 | std::ptrdiff_t m_totalHitsOnServer; 122 | std::ptrdiff_t m_ArmorValue; 123 | std::ptrdiff_t m_bHasDefuser; 124 | std::ptrdiff_t m_bIsDefusing; 125 | std::ptrdiff_t m_bIsGrabbingHostage; 126 | std::ptrdiff_t m_bIsScoped; 127 | std::ptrdiff_t m_bGunGameImmunity; 128 | std::ptrdiff_t m_bIsRescuing; 129 | std::ptrdiff_t m_bHasHelmet; 130 | std::ptrdiff_t m_flFlashDuration; 131 | std::ptrdiff_t m_flFlashMaxAlpha; 132 | std::ptrdiff_t m_flLowerBodyYawTarget; 133 | std::ptrdiff_t m_bHasHeavyArmor; 134 | std::ptrdiff_t m_iGunGameProgressiveWeaponIndex; 135 | } DT_CSPlayer; 136 | 137 | struct 138 | { 139 | std::ptrdiff_t m_iItemDefinitionIndex; 140 | std::ptrdiff_t m_iAccountID; 141 | std::ptrdiff_t m_iEntityQuality; 142 | std::ptrdiff_t m_szCustomName; 143 | std::ptrdiff_t m_nFallbackPaintKit; 144 | std::ptrdiff_t m_nFallbackSeed; 145 | std::ptrdiff_t m_flFallbackWear; 146 | std::ptrdiff_t m_nFallbackStatTrak; 147 | std::ptrdiff_t m_OriginalOwnerXuidLow; 148 | std::ptrdiff_t m_OriginalOwnerXuidHigh; 149 | } DT_BaseAttributableItem; 150 | 151 | struct 152 | { 153 | std::ptrdiff_t m_nModelIndex; 154 | std::ptrdiff_t m_hWeapon; 155 | std::ptrdiff_t m_hOwner; 156 | } DT_BaseViewModel; 157 | 158 | struct 159 | { 160 | std::ptrdiff_t m_fAccuracyPenalty; 161 | std::ptrdiff_t m_flPostponeFireReadyTime; 162 | } DT_WeaponCSBase; 163 | 164 | struct 165 | { 166 | std::ptrdiff_t m_bStartedArming; 167 | } DT_WeaponC4; 168 | 169 | struct 170 | { 171 | std::ptrdiff_t m_bRedraw; 172 | std::ptrdiff_t m_bIsHeldByPlayer; 173 | std::ptrdiff_t m_bPinPulled; 174 | std::ptrdiff_t m_fThrowTime; 175 | std::ptrdiff_t m_bLoopingSoundPlaying; 176 | std::ptrdiff_t m_flThrowStrength; 177 | } DT_BaseCSGrenade; 178 | 179 | struct 180 | { 181 | std::ptrdiff_t m_flNextPrimaryAttack; 182 | std::ptrdiff_t m_hOwner; 183 | std::ptrdiff_t m_iClip1; 184 | std::ptrdiff_t m_iReserve; 185 | std::ptrdiff_t m_bInReload; 186 | std::ptrdiff_t m_iViewModelIndex; 187 | std::ptrdiff_t m_iWorldModelIndex; 188 | std::ptrdiff_t m_hWeaponWorldModel; 189 | } DT_BaseCombatWeapon; 190 | 191 | struct 192 | { 193 | std::ptrdiff_t m_bShouldGlow; 194 | } DT_DynamicProp; 195 | 196 | struct 197 | { 198 | std::ptrdiff_t m_bFreezePeriod; 199 | std::ptrdiff_t m_bMatchWaitingForResume; 200 | std::ptrdiff_t m_bWarmupPeriod; 201 | std::ptrdiff_t m_fWarmupPeriodEnd; 202 | std::ptrdiff_t m_fWarmupPeriodStart; 203 | std::ptrdiff_t m_bTerroristTimeOutActive; 204 | std::ptrdiff_t m_bCTTimeOutActive; 205 | std::ptrdiff_t m_flTerroristTimeOutRemaining; 206 | std::ptrdiff_t m_flCTTimeOutRemaining; 207 | std::ptrdiff_t m_nTerroristTimeOuts; 208 | std::ptrdiff_t m_nCTTimeOuts; 209 | std::ptrdiff_t m_iRoundTime; 210 | std::ptrdiff_t m_gamePhase; 211 | std::ptrdiff_t m_totalRoundsPlayed; 212 | std::ptrdiff_t m_nOvertimePlaying; 213 | std::ptrdiff_t m_timeUntilNextPhaseStarts; 214 | std::ptrdiff_t m_flCMMItemDropRevealStartTime; 215 | std::ptrdiff_t m_flCMMItemDropRevealEndTime; 216 | std::ptrdiff_t m_fRoundStartTime; 217 | std::ptrdiff_t m_bGameRestart; 218 | std::ptrdiff_t m_flRestartRoundTime; 219 | std::ptrdiff_t m_flGameStartTime; 220 | std::ptrdiff_t m_iHostagesRemaining; 221 | std::ptrdiff_t m_bAnyHostageReached; 222 | std::ptrdiff_t m_bMapHasBombTarget; 223 | std::ptrdiff_t m_bMapHasRescueZone; 224 | std::ptrdiff_t m_bMapHasBuyZone; 225 | std::ptrdiff_t m_bIsQueuedMatchmaking; 226 | std::ptrdiff_t m_bIsValveDS; 227 | std::ptrdiff_t m_bIsQuestEligible; 228 | std::ptrdiff_t m_bLogoMap; 229 | std::ptrdiff_t m_iNumGunGameProgressiveWeaponsCT; 230 | std::ptrdiff_t m_iNumGunGameProgressiveWeaponsT; 231 | std::ptrdiff_t m_iSpectatorSlotCount; 232 | std::ptrdiff_t m_bBombDropped; 233 | std::ptrdiff_t m_bBombPlanted; 234 | std::ptrdiff_t m_iRoundWinStatus; 235 | std::ptrdiff_t m_eRoundWinReason; 236 | std::ptrdiff_t m_flDMBonusStartTime; 237 | std::ptrdiff_t m_flDMBonusTimeLength; 238 | std::ptrdiff_t m_unDMBonusWeaponLoadoutSlot; 239 | std::ptrdiff_t m_bDMBonusActive; 240 | std::ptrdiff_t m_bTCantBuy; 241 | std::ptrdiff_t m_bCTCantBuy; 242 | std::ptrdiff_t m_flGuardianBuyUntilTime; 243 | std::ptrdiff_t m_iMatchStats_RoundResults; 244 | std::ptrdiff_t m_iMatchStats_PlayersAlive_T; 245 | std::ptrdiff_t m_iMatchStats_PlayersAlive_CT; 246 | std::ptrdiff_t m_GGProgressiveWeaponOrderC; 247 | std::ptrdiff_t m_GGProgressiveWeaponOrderT; 248 | std::ptrdiff_t m_GGProgressiveWeaponKillUpgradeOrderCT; 249 | std::ptrdiff_t m_GGProgressiveWeaponKillUpgradeOrderT; 250 | std::ptrdiff_t m_MatchDevice; 251 | std::ptrdiff_t m_bHasMatchStarted; 252 | std::ptrdiff_t m_TeamRespawnWaveTimes; 253 | std::ptrdiff_t m_flNextRespawnWave; 254 | std::ptrdiff_t m_nNextMapInMapgroup; 255 | std::ptrdiff_t m_nEndMatchMapGroupVoteOptions; 256 | std::ptrdiff_t m_bIsDroppingItems; 257 | std::ptrdiff_t m_iActiveAssassinationTargetMissionID; 258 | std::ptrdiff_t m_fMatchStartTime; 259 | std::ptrdiff_t m_szTournamentEventName; 260 | std::ptrdiff_t m_szTournamentEventStage; 261 | std::ptrdiff_t m_szTournamentPredictionsTxt; 262 | std::ptrdiff_t m_nTournamentPredictionsPct; 263 | std::ptrdiff_t m_szMatchStatTxt; 264 | std::ptrdiff_t m_nGuardianModeWaveNumber; 265 | std::ptrdiff_t m_nGuardianModeSpecialKillsRemaining; 266 | std::ptrdiff_t m_nGuardianModeSpecialWeaponNeeded; 267 | std::ptrdiff_t m_nHalloweenMaskListSeed; 268 | std::ptrdiff_t m_numGlobalGiftsGiven; 269 | std::ptrdiff_t m_numGlobalGifters; 270 | std::ptrdiff_t m_numGlobalGiftsPeriodSeconds; 271 | std::ptrdiff_t m_arrFeaturedGiftersAccounts; 272 | std::ptrdiff_t m_arrFeaturedGiftersGifts; 273 | std::ptrdiff_t m_arrTournamentActiveCasterAccounts; 274 | } DT_CSGameRulesProxy; 275 | }; 276 | 277 | class Offsetz 278 | { 279 | public: 280 | void GetNetvars(); 281 | }; 282 | 283 | extern Offsetz* g_Netvars; 284 | 285 | extern COffsetz offsetz; -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/recvproxy.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | // Credits to Valve and Shad0w 4 | #pragma once 5 | 6 | void NetvarHook(); 7 | void UnloadProxy(); -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/villeeh/Insidousccpaste/af3cbfc74f3553b58aa88991dc170add9ea0ffb7/Frostyv2/FROSTY v2/resource.h -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/resource1.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by FROSTY v2.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/sendatagraph.h: -------------------------------------------------------------------------------- 1 | #include "sdk.h" 2 | #include "HookIncludes.h" 3 | #include "LagComp.h" 4 | 5 | 6 | using SendDatagramFn = int(__thiscall*)(void*, void *); 7 | 8 | extern SendDatagramFn oSendDatagram; 9 | 10 | SendDatagramFn oSendDatagram = NULL; 11 | 12 | 13 | void FuckTheFuckingPitch(INetChannel* chan) 14 | { 15 | C_BaseEntity *pLocal = g_EntityList->GetClientEntity(g_Engine->GetLocalPlayer()); 16 | 17 | if (!Globals::Shots) 18 | { 19 | chan->m_nInSequenceNr += 15000; 20 | //chan->m_nChokedPackets = 255; 21 | chan->m_nOutSequenceNr += 50000; 22 | } 23 | Globals::Shots = false; 24 | } 25 | 26 | int __fastcall SendDatagram(void* netchan, void*, void *datagram) 27 | { 28 | //VMP_BEGINMUTILATION("SD") 29 | INetChannel* chan = (INetChannel*)netchan; 30 | bf_write* data = (bf_write*)datagram; 31 | 32 | if (g_Options.Misc.BacktrackExploitChk || datagram) 33 | { 34 | oSendDatagram(chan, data); 35 | } 36 | 37 | int instate = chan->m_nInReliableState; 38 | int insequencenr = chan->m_nInSequenceNr; 39 | 40 | //int choked = chan->m_nChokedPackets; 41 | //int outsequencenr = chan->m_nOutSequenceNr; 42 | #ifndef FUCK 43 | backtracking->AddLatencyToNetchan(chan, FAKE_LATENCY_AMOUNT); 44 | #else 45 | FuckTheFuckingPitch(chan); 46 | #endif 47 | 48 | int ret = oSendDatagram(chan, data); 49 | 50 | //chan->m_nOutSequenceNr = outsequencenr; 51 | 52 | //chan->m_nChokedPackets = choked; 53 | 54 | chan->m_nInReliableState = instate; 55 | chan->m_nInSequenceNr = insequencenr; 56 | 57 | #if 0 58 | netchan->m_nInSequenceNr = LocalPlayer.Original_m_nInSequenceNr; 59 | 60 | if (LocalPlayer.ModifiedSequenceNr) 61 | { 62 | if (ReturnAddress == (void*)SendDatagramCL_MoveReturnAdr) 63 | { 64 | netchan->m_nInSequenceNr = LocalPlayer.Original_m_nInSequenceNr; 65 | LocalPlayer.ModifiedSequenceNr = false; 66 | } 67 | } 68 | #endif 69 | return ret; 70 | //VMP_END 71 | } 72 | 73 | #if 0 74 | __declspec (naked) int __stdcall Hooks::SendDatagram(void* netchan, void *datagram) 75 | { 76 | __asm 77 | { 78 | push dword ptr ss : [esp] 79 | push[esp + 8] 80 | push ecx 81 | call hSendDatagram 82 | retn 4 83 | } 84 | } 85 | #endif -------------------------------------------------------------------------------- /Frostyv2/FROSTY v2/singleton.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | template 4 | class singleton 5 | { 6 | protected: 7 | singleton() {} 8 | ~singleton() {} 9 | 10 | singleton(const singleton&) = delete; 11 | singleton& operator=(const singleton&) = delete; 12 | 13 | singleton(singleton&&) = delete; 14 | singleton& operator=(singleton&&) = delete; 15 | public: 16 | static T& instance() 17 | { 18 | static T inst{}; 19 | return inst; 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /Frostyv2/Font/insidous_3.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/villeeh/Insidousccpaste/af3cbfc74f3553b58aa88991dc170add9ea0ffb7/Frostyv2/Font/insidous_3.ttf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Frosty paste. Legit cheat mostly 2 | --------------------------------------------------------------------------------