Welcome to Ramleague,

Ramleague - the best site for pinoy chat, games chat and mobiles chat,

Sign Up
  1. Hello guest Guest , Are you tired from Ads? to remove some ads you need to register and be active. :D

[Source Code] Cyber Hunter Reversal,Structs and Offsets

Discussion in 'Other FPS Games' started by zNova, Aug 19, 2019.

  1. zNova True God Gamer
    Member Lvl2

    zNova
    Joined:
    Oct 7, 2017
    Posts:
    915
    Reputation:
    52
    Thanks:
    213
    Psychedelic

    Cyber Hunter Reversal,Structs and Offsets

    WorldToScreen
    Code:
    static bool W2S(D3DXVECTOR3 pos, D3DXVECTOR3& screen, D3DXMATRIX matrix)
    {
        D3DXVECTOR4 clipCoords;
        clipCoords.x = pos.x * matrix[0] + pos.y * matrix[4] + pos.z * matrix[8] + matrix[12];
        clipCoords.y = pos.x * matrix[1] + pos.y * matrix[5] + pos.z * matrix[9] + matrix[13];
        clipCoords.z = pos.x * matrix[2] + pos.y * matrix[6] + pos.z * matrix[10] + matrix[14];
        clipCoords.w = pos.x * matrix[3] + pos.y * matrix[7] + pos.z * matrix[11] + matrix[15];
        if (clipCoords.w < 0.1f)
            return false;
        D3DXVECTOR3 NDC;
        NDC.x = clipCoords.x / clipCoords.w;
        NDC.y = clipCoords.y / clipCoords.w;
        NDC.z = clipCoords.z / clipCoords.w;
        screen.x = (Viewport.Width / 2 * NDC.x) + (NDC.x + Viewport.Width / 2);
        screen.y = -(Viewport.Height / 2 * NDC.y) + (NDC.y + Viewport.Height / 2);
        screen.z = NDC.z;
        return true;
    }
    Code:
    GameBase + 0x4359468 -> 0x1C8 = LocalPos
    D3DXVECTOR3 EnemyPos = *reinterpret_cast<D3DXVECTOR3*>(CurObject + 0x90);//Not really enemypos rather object position all models
    
    ESP Distance :
    Code:
    static int GetDistance(D3DXVECTOR3 local, D3DXVECTOR3 enemy, int Divide)
    {
        D3DXVECTOR3 vector3;
        vector3.x = local.x - enemy.x;
        vector3.y = local.y - enemy.y;
        vector3.z = local.z - enemy.z;
        return (int)sqrt(pow((double)vector3.x, 2.0) + pow((double)vector3.y, 2.0) + pow((double)vector3.z, 2.0)) / Divide;
    }
    //Main Loop
                       
                            if (W2S(EnemyPos, vScreen, DrawMatix))
                            {
                                if (EnemyPos.x != NULL && EnemyPos.y != NULL && EnemyPos.z != NULL)
                                {
                                    int pDistance = GetDistance(EnemyPos, MyPos, 10);
                                    if (strcmp(pEnt->m_ObjectType->m_Type, "untitled_obj") != 0 && strcmp(pEnt->m_ObjectType->m_Type, "ocean_plane_100") != 0)
                                    {
                                        char dist[MAX_PATH];
                                        sprintf(dist, " [ %d m]", pDistance);
                                        AddText(ImVec2(vScreen.x, vScreen.y + 10), Colors::FLOAT4TOD3DCOLOR(Colors::espdistplayer),dist);
                                    }
                                }
                            }
    My Full Class
    Code:
    class m_pView
    {
    public:
        D3DXMATRIX ViewMatrix; //0x0000
    }; //Size: 0x0040
    class m_pProjectionMat
    {
    public:
        D3DXMATRIX ProjectionMatrix; //0x0000
    }; //Size: 0x0040
    class CameraBase
    {
    public:
        char pad_0000[4]; //0x0000
        m_pView* PtrView; //0x0004
        char pad_0008[4]; //0x0008
        m_pProjectionMat* PtrProj; //0x000C
    }; //Size: 0x0010
    class SceneContext
    {
    public:
        char pad_0000[4]; //0x0000
        CameraBase* pCamerBase; //0x0004
    }; //Size: 0x0008
    class World
    {
    public:
        char pad_0000[4]; //0x0000
        SceneContext* pScene; //0x0004
    }; //Size: 0x0008
    class WorldInstance
    {
    public:
        World* pWorld; //0x0000
        static WorldInstance* GetWorld()
        {
            auto uBase = reinterpret_cast<uintptr_t>(GetModuleHandle(NULL));
            return (WorldInstance*)(uBase + 0x44669F0);//8B 0D ? ? ? ? 8B 01 FF 50 0C 85 C0 74 1A
        }
    }; //Size: 0x0004
    class ObjectType
    {
    public:
        char pad_0000[4]; //0x0000
        char* m_Type; //0x0004
    }; //Size: 0x0008
    class ObjectClass
    {
    public:
        char pad_0000[8]; //0x0000
        class ObjectType* m_ObjectType; //0x0008
        char pad_000C[132]; //0x000C
        D3DXVECTOR3 Position; //0x0090
    }; //Size: 0x009C
    Code:
    void DrawAABB(D3DXVECTOR3 org, D3DXVECTOR3 vMin, D3DXVECTOR3 vMax,D3DXMATRIX DrawMat,D3DCOLOR color)
    {
        D3DXVECTOR3 _min = org + vMin;
        D3DXVECTOR3 _max = org + vMax;
        D3DXVECTOR3 crnr2 = D3DXVECTOR3(_max.x, _min.y, _min.z);
        D3DXVECTOR3 crnr3 = D3DXVECTOR3(_max.x, _min.y, _max.z);
        D3DXVECTOR3 crnr4 = D3DXVECTOR3(_min.x, _min.y, _max.z);
        D3DXVECTOR3 crnr5 = D3DXVECTOR3(_min.x, _max.y, _max.z);
        D3DXVECTOR3 crnr6 = D3DXVECTOR3(_min.x, _max.y, _min.z);
        D3DXVECTOR3 crnr7 = D3DXVECTOR3(_max.x, _max.y, _min.z);
        if (W2S(_min, _min, DrawMat) &&
            W2S(_max, _max, DrawMat) &&
            W2S(crnr2,crnr2, DrawMat) &&
            W2S(crnr3, crnr3, DrawMat) &&
            W2S(crnr4, crnr4, DrawMat) &&
            W2S(crnr5, crnr5, DrawMat) &&
            W2S(crnr6, crnr6, DrawMat) &&
            W2S(crnr7, crnr7, DrawMat))
        {
            ImGui::GetWindowDrawList()->AddLine(ImVec2(_min.x, _min.y), ImVec2(crnr2.x, crnr2.y), color);
            ImGui::GetWindowDrawList()->AddLine(ImVec2(_min.x, _min.y), ImVec2(crnr4.x, crnr4.y), color);
            ImGui::GetWindowDrawList()->AddLine(ImVec2(_min.x, _min.y), ImVec2(crnr6.x, crnr6.y), color);
            ImGui::GetWindowDrawList()->AddLine(ImVec2(_max.x, _max.y), ImVec2(crnr5.x, crnr5.y), color);
            ImGui::GetWindowDrawList()->AddLine(ImVec2(_max.x, _max.y), ImVec2(crnr7.x, crnr7.y), color);
            ImGui::GetWindowDrawList()->AddLine(ImVec2(_max.x, _max.y), ImVec2(crnr3.x, crnr3.y), color);
            ImGui::GetWindowDrawList()->AddLine(ImVec2(crnr2.x, crnr2.y), ImVec2(crnr7.x, crnr7.y), color);
            ImGui::GetWindowDrawList()->AddLine(ImVec2(crnr2.x, crnr2.y), ImVec2(crnr3.x, crnr3.y), color);
            ImGui::GetWindowDrawList()->AddLine(ImVec2(crnr4.x, crnr4.y), ImVec2(crnr5.x, crnr5.y), color);
            ImGui::GetWindowDrawList()->AddLine(ImVec2(crnr4.x, crnr4.y), ImVec2(crnr3.x, crnr3.y), color);
            ImGui::GetWindowDrawList()->AddLine(ImVec2(crnr6.x, crnr6.y), ImVec2(crnr5.x, crnr5.y), color);
            ImGui::GetWindowDrawList()->AddLine(ImVec2(crnr6.x, crnr6.y), ImVec2(crnr7.x, crnr7.y), color);
        }
    }
    //Main Loop
    if (EnemyPos.x != NULL && EnemyPos.y != NULL && EnemyPos.z != NULL)
    {
            DWORD SpaceNode = *reinterpret_cast<uintptr_t*>(CurObject + 0xC);
        AABB GetAABB = *reinterpret_cast<AABB*>(SpaceNode + 0x1E0);
        DrawAABB(EnemyPos,GetAABB.Min,GetAABB.Max,DrawMatix,Colors::FLOAT4TOD3DCOLOR(Colors::esp3dbox));
    }
    --- Last post, Aug 25, 2019, Original Post Date: Aug 19, 2019 ---
    Just reversed the game again :
    How to get pDevice :
    Code:
    constexpr DWORD Renderer = 0x4345614;
    
    class D3D9SwapChain
    {
    public:
        char pad_0x0000[24]; //0x0000
        __int32 iWidth; //0x0018
        __int32 iHeight; //0x001C
        char pad_0x0020[0x30]; //0x0020
        LPDIRECT3DDEVICE9 m_pDevice; //0x0050
        char pad_0x0054[0x0050]; //0x0054
    }; //Size: 0x006C
    
    class D3D9Device
    {
    public:
        char pad_0x0000[0xC4]; //0x0000
        D3D9SwapChain* pSwapChain; //0x00C4
        char pad_0x00C8[0xB4]; //0x00C8
    }; //Size: 0x00C8
    
    
    class Render
    {
    public:
        char pad_0x0000[0x8]; //0x0000
        D3D9Device* pD3D; //0x0008
        char pad_0x000C[0x38]; //0x000C
    
        static Render* Instance()
        {
            auto uBase = reinterpret_cast<uintptr_t>(GetModuleHandle(NULL));
            return *reinterpret_cast<Render**>(uBase + Renderer);
        }
    };
    Result :
    [​IMG]
     
    • BE A GAMER - RAMLeague
  2. Jei
    Member Lvl3

    Jei
    Joined:
    Apr 8, 2018
    Gender:
    Male
    Posts:
    1,855
    Reputation:
    160
    Thanks:
    236
    Location:
    ( ‾ ʖ̫ ‾)
    Spaced
    Thailand
    jeeeeeiiii
  3. zNova True God Gamer
    Member Lvl2

    zNova
    Joined:
    Oct 7, 2017
    Posts:
    915
    Reputation:
    52
    Thanks:
    213
    Psychedelic
    This shit is still updated not shifted. Figure it out how would you filter the models since all models are effected.
    Tip :
    You can aim to the player AABB (HEAD), yes all player have head AABB simply calculate the mid point then you get working aim.


    For the DynamicScene(Raycast,dynamic character,npquery and etc)
    CurScene -> 0x1668 = DynamicScene

    you can make noclip,speedhack using the character rotation and x y z position from dynamiccharacter.
     
  4. p3ps! F.T.B Gaming
    Donator Member Lvl1

    p3ps!
    Joined:
    Oct 25, 2014
    Gender:
    Male
    Posts:
    419
    Reputation:
    37
    Thanks:
    145
    Location:
    Region IV - A
    Busy
    Philippines
    Oy. Bakit paps :) cge try ko yan Busy pa kasi heheheh
     
  5. Jei
    Member Lvl3

    Jei
    Joined:
    Apr 8, 2018
    Gender:
    Male
    Posts:
    1,855
    Reputation:
    160
    Thanks:
    236
    Location:
    ( ‾ ʖ̫ ‾)
    Spaced
    Thailand
    jeeeeeiiii




    excitingggggg, thank you!
     
Loading...

Advertisement

Similar Threads Forum Date
Cyber Hunter Hack FREE 2020 - ESP, Superloot, SpeedHack, No Recoil Cyber Hunter Sep 19, 2020
Cyber Hunter Section is now available! Rules of Survival Nov 3, 2019
ExiledCyber For CyberHunter V2.1 - 11/02/2019 Cyber Hunter Nov 2, 2019
ExiledCyber For CyberHunter V2.0 - 11/1/2019 Cyber Hunter Nov 1, 2019
ExiledCyber For CyberHunter V1.0 - 10/30/2019 Cyber Hunter Oct 30, 2019
CYBER HUNTER HACK Rules of Survival Sep 29, 2019

Tags for this Thread

:

Share This Page