Results 1 to 7 of 7
  1. #1
    Coder.Fail's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Posts
    91
    Reputation
    43
    Thanks
    490

    EndScene 23/12/2014

    I will post a simple method EndScene for League of Legends..



    Code:
    #include <windows.h>
    #include <d3d9.h>
    #include <d3dx9.h>
    #pragma comment(lib, "d3d9.lib")
    #pragma comment(lib, "d3dx9.lib")
    
    DWORD dwEndscene_hook = NULL;
    DWORD dwEndscene_ret = NULL;
    DWORD *VTable;
    
    LPD3DXFONT pFont;
    
    int text;
    
    VOID WriteText( LPDIRECT3DDEVICE9 pDevice, INT x, INT y, DWORD color, CHAR *text )
    {    
        RECT rect;
        SetRect( &rect, x, y, x, y );
        pFont->DrawText( NULL, text, -1, &rect, DT_NOCLIP | DT_LEFT, color );
    }
    
    void WriteMemory(void *address, void *bytes, int byteSize)
    {
            DWORD NewProtection;
    
                VirtualProtect(address, byteSize, PAGE_EXECUTE_READWRITE, &NewProtection);
                memcpy(address, bytes, byteSize);
                VirtualProtect(address, byteSize, NewProtection, &NewProtection);
    }
    
    VOID WINAPI EndScene(LPDIRECT3DDEVICE9 pDevice)
    {
        if( pFont )
        {
            pFont->Release();
            pFont = NULL;
        }
        if( !pFont )
        {
            D3DXCreateFont( pDevice, 14,0,FW_BOLD,1,0,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH | FF_DONTCARE,"Arial",&pFont );
        }
    
        if (GetAsyncKeyState(VK_INSERT)&1)
            text =! text;
        if( text )
            WriteText( pDevice, 15, 15, D3DCOLOR_ARGB(255,255,000,000), "MPGH Coder.Fail" );
    
    }
    
    __declspec(naked) void MyEndscene( )
    {
    
        static LPDIRECT3DDEVICE9 pDevice;
    
        __asm
        {
            mov dword ptr ss:[ebp - 10], esp;
            mov esi, dword ptr ss:[ebp + 0x8];
            mov pDevice, esi;
        }
    
        EndScene(pDevice);
    
        __asm
        {
            jmp dwEndscene_ret;//jump back to normal endscene
        }
     
    }
    
    bool Mask(const BYTE* pData, const BYTE* bMask, const char* szMask)
    {
        for(;*szMask;++szMask,++pData,++bMask)
            if(*szMask=='x' && *pData!=*bMask ) 
                return false;
        return (*szMask) == NULL;
    }
    
    DWORD FindPattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask)
    {
        for(DWORD i=0; i<dwLen; i++)
            if(Mask((BYTE*)(dwAddress + i), bMask, szMask))
                return (DWORD)(dwAddress+i);
        return 0;
    }
    
    void Detour(BYTE *pAddress, DWORD dwJumpTo, DWORD dwLen)
    {
        DWORD dwOldProtect, dwBkup, dwRelAddr;
        VirtualProtect(pAddress, dwLen, PAGE_EXECUTE_READWRITE, &dwOldProtect);
        dwRelAddr = (DWORD) (dwJumpTo - (DWORD) pAddress) - 5;
        *pAddress = 0xE9;
        *((DWORD *)(pAddress + 0x1)) = dwRelAddr;
        for(DWORD x = 0x5; x < dwLen; x++) *(pAddress + x) = 0x90;
        VirtualProtect(pAddress, dwLen, dwOldProtect, &dwBkup);
        return;
    }
    
    void MyHook( void )
    {
        DWORD hD3D = NULL;
        while (!hD3D) hD3D = (DWORD)GetModuleHandle("d3d9.dll");
        DWORD PPPDevice = FindPattern(hD3D, 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", "xx????xx????xx");
        WriteMemory( &VTable, (void *)(PPPDevice + 2), 4);
        dwEndscene_hook = VTable[42] + 0x2A;
        dwEndscene_ret = dwEndscene_hook + 0x6;
    
        Detour((PBYTE)dwEndscene_hook, (DWORD)MyEndscene, 0x6);
    }
    
    BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpvReserved)
    {
        if (dwReason == DLL_PROCESS_ATTACH)
        {
            DisableThreadLibraryCalls(hModule);
            CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)MyHook, NULL, NULL, NULL);
        }
        return TRUE;
    }
    Credits

    ZeaS
    Coder.Fail
    Shad0w_
    Last edited by Hunter; 02-02-2016 at 10:09 AM.
    Skype : luislokao98

  2. The Following 3 Users Say Thank You to Coder.Fail For This Useful Post:

    cmc5414 (12-24-2014),jamescarl15 (12-24-2014),[MPGH]Mayion (12-25-2014)

  3. #2
    chanman1101's Avatar
    Join Date
    May 2008
    Gender
    male
    Location
    United States, Dallas, Texas
    Posts
    228
    Reputation
    10
    Thanks
    68
    My Mood
    Mellow
    What does this even do?

  4. The Following User Says Thank You to chanman1101 For This Useful Post:

    Democritus (12-23-2014)

  5. #3
    Coder.Fail's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Posts
    91
    Reputation
    43
    Thanks
    490
    Quote Originally Posted by chanman1101 View Post
    What does this even do?
    You can make a hacker, If you hack League of Legends and find adress, you can make a menu
    Skype : luislokao98

  6. #4
    ekosins's Avatar
    Join Date
    Jul 2014
    Gender
    male
    Posts
    33
    Reputation
    10
    Thanks
    3
    u wot, i couldnt really understand what you said lol

  7. #5
    Mayion's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    Bed
    Posts
    13,504
    Reputation
    4018
    Thanks
    8,372
    My Mood
    Twisted
    It just writes text on the client.
    I do not use any type of messenger outside of MPGH.
    Inactive but you can reach me through VM/PM.










     

    Donator - 30 August 2013
    Battlefield Minion - 26 October 2013

    Blackshot Minion - 14 January 2014/16 September 2014
    Minecraft Minion - 7 February 2014/16 September 2014
    WarRock Minion - 23 February 2014
    League of Legends Minion - 21 March 2014

    Minion+ - 15 May 2014
    Other Semi-Popular First Person Shooter Minion - 8 August 2014
    CrossFire Minion - 23 October 2014
    Programming Section Minion - 13 November 2014
    Marketplace Minion - 7 December 2014

    Official Middleman - 7 December 2014 - 27 June 2015
    Moderator - 29 December 2014
    Project Blackout Minion - 10 January 2015
    News Force Interviewer - January 2015
    Steam Games Minion - 21 March 2015
    Dragon Nest Minion - 31 March 2015
    Publicist - April 2015 - 21 September 2015
    Global Moderator - 25 August 2015
    Super User - 13 August 2016



  8. #6
    steven1578's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Location
    CShell.dll
    Posts
    699
    Reputation
    1
    Thanks
    944
    My Mood
    Busy
    Quote Originally Posted by ekosins View Post
    u wot, i couldnt really understand what you said lol
    He just made a hook for league of legends which enables you to draw stuff over the game UI.
    And the adress part is about something like cooldown, when you disable a cooldown adress, maybe you can have a no-cooldown hack.
    But i believe cooldown is serversided so dont mind trying or asking.
    R.I.P Grandma! 3-17-2012

  9. The Following User Says Thank You to steven1578 For This Useful Post:

    ekosins (12-26-2014)

  10. #7
    blackgamingthesecond's Avatar
    Join Date
    Aug 2013
    Gender
    male
    Posts
    43
    Reputation
    10
    Thanks
    57
    Great Leech! I mean work
    Actually, you could use VTable to hook DirectX Functions.

    This is pretty useless, but still great leech! I mean work.

    Cheers
    ~BlackGaming
    Last edited by blackgamingthesecond; 12-30-2014 at 07:21 AM.

Similar Threads

  1. [Question] About EndScene.
    By ppl2pass in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 9
    Last Post: 08-06-2010, 03:45 AM
  2. Endscene?
    By mastermods in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 4
    Last Post: 07-25-2010, 05:29 AM
  3. Endscene?
    By mastermods in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 21
    Last Post: 07-24-2010, 01:56 PM
  4. D3D EndScene Hook dont work
    By inmate in forum C++/C Programming
    Replies: 8
    Last Post: 07-20-2010, 06:10 AM
  5. Hook EndScene
    By inmate in forum C++/C Programming
    Replies: 1
    Last Post: 07-18-2010, 05:24 AM