Jump to content
Welcome, Guest
Existing user? Sign In

Sign In



Sign Up
The MatriX
  • Welcome To Ghbsys
  • CS GO Streaming Version is released. Have fun streaming while cheating!
  • Have a Payment Issue? Send us a Support ticket.
  • Make a thread if you need support or join our discord for live support.
  • Have Suggestions? Make a thread and you'll earn Ghbsys Points for implemented suggestions.
  • Join our discord to stay well connected! Don't forget to integrate your discord to the site
  • Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum

    Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of [GHB] - GAmEhAcKbAsTaRdS Forum by signing in or creating an account.
    • Start new topics and reply to others
    • Subscribe to topics and forums to get email updates
    • Get your own profile page and make new friends
    • Send personal messages to other members.

    First d3d crashed after 10 sec.


    Lazeboy
     Share

    Recommended Posts

    Hello,

    i am patrick and i start my first d3d8 hack for warrock.

    i have the problem that my d3d hack crashed after 10 sec..

     

    thats is my main

     

    CD3DFont *UW	= NULL;
    
    void Kasten(LPDIRECT3DDEVICE8 pDevice, int x, int y, int w, int h, D3DCOLOR color)
    {
    D3DRECT rec;
    rec.x1 = x;
    rec.x2 = x + w;
    rec.y1 = y;
    rec.y2 = y + h;
    pDevice->Clear(1, &rec, D3DCLEAR_TARGET, color, 0, 0);
    }
    void Umrandung(LPDIRECT3DDEVICE8 pDevice,int x, int y, int w, int h,D3DCOLOR color)
    {
    Kasten(pDevice,x,y,w,3,color);//oben
    Kasten(pDevice,(x+w),y,3,h,color);//rechts
    Kasten(pDevice,x,y,3,h,color);//links
    Kasten(pDevice,x,(y+h),(w+3),3,color);//unten
    }
    
    void KastenU(LPDIRECT3DDEVICE8 pDevice, int x, int y, int w, int h, D3DCOLOR color)
    {
    Kasten(pDevice,x, y,w, h,color);
    Umrandung(pDevice,x,y,w,h,txtGrün);
    }
    
    
    
    void Text(char *text, int x, int y, DWORD farbe,CD3DFont *font)//text zeichenn
    {
    if (font==0)  font=UW;
    if (!text)	  return;
    if (font==0)  return;
    font->DrawText((float)x, (float)y, farbe, text);
    }
    
    
    HRESULT PreReset()
    {
    UW->InvalidateDeviceObjects();
    UW->DeleteDeviceObjects();
    UW = NULL;
    
    return S_OK;
    }
    HRESULT PostReset(LPDIRECT3DDEVICE8 pDevice)
    {
    UW = new CD3DFont("Arial", 8, D3DFONT_BOLD);
    UW->InitDeviceObjects(pDevice);
    UW->RestoreDeviceObjects();
    
    return S_OK;
    }
    
    HRESULT WINAPI HackMain ( LPDIRECT3DDEVICE8 pDevice, CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion )
    {
      PostReset(pDevice);
    
      if(visible)
    {
    
    KastenU(pDevice,50,30,140,30,txtgrau);
    KastenU(pDevice,50,70,140,290,txtgrau);
    KastenU(pDevice,200,10,150,50,txtSchwarz); 
     Text("D3D Hack",65,15,txtGrün,0);
    
    
    
      }
    
    
    
    if(GetAsyncKeyState(VK_INSERT)&1)visible=!visible;
    if(GetAsyncKeyState(VK_LEFT)&1)Funktion[Auswahl]--;
    if(GetAsyncKeyState(VK_RIGHT)&1)Funktion[Auswahl]++;
    if(GetAsyncKeyState(VK_UP)&1)Auswahl++;
    if(GetAsyncKeyState(VK_DOWN)&1)Auswahl--;
    
    if(Auswahl>5)Auswahl=0;
    if(Auswahl<0)Auswahl=5;
    
    
    PreReset(); 
    
    return pEndScene( pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion );
    }
    
    
    int HOOK()
    {
    HMODULE D3DMODUL = NULL;
    while(D3DMODUL == NULL)
    {
    D3DMODUL = LoadLibrary("d3d8.dll");
    Sleep(100);
    }
    DWORD* VTableS = 0;				  
    DWORD hD3D8 = (DWORD)GetModuleHandle("d3d8.dll");
    DWORD table = dwFindPattern(hD3D8, 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", "xx????xx????xx");
    memcpy(&VTableS, (void*)(table+2), 4);
    DWORD dwEndScene	= VTableS[15];
    pEndScene = (oPresent)DetourFunc((PBYTE)dwEndScene, (PBYTE)HackMain, 7);
    
    return 0;
    }
    
    
    
    
    int WINAPI DllMain (HINSTANCE hModul, DWORD Ergebnis, LPVOID lp_Rev)
    {
    switch (Ergebnis)
    {
    case DLL_PROCESS_ATTACH:
    MessageBox(0,"Injektion OK","Injektion",MB_OK);
    CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)HOOK, NULL, NULL, NULL);
    break;
    
    case DLL_PROCESS_DETACH:
    break;
    }
    return TRUE;
    }

     

     

    and thats is my Detour function

     

    void *DetourFunc(BYTE *src, const BYTE *dst, const int len)
    {
    BYTE *jmp = (BYTE*)malloc(len+5);
    DWORD dwBack;
    VirtualProtect(src, len, PAGE_READWRITE, &dwBack);
    memcpy(jmp, src, len);	
    jmp += len;
    jmp[0] = 0xE9;
    *(DWORD*)(jmp+1) = (DWORD)(src+len - jmp) - 5;
    src[0] = 0x50;
    src[1] = 0x58;
    src[2] = 0xE9;
    *(DWORD*)(&src[3]) = (DWORD)(dst - src) - 7;
    for (int i=7; i<len; i++)  src[i] = 0x90;
    VirtualProtect(src, len, dwBack, &dwBack);
    return (jmp-len);
    }

     

    sry for my bad english

    Patrick

    Link to comment
    Share on other sites

    Guest
    This topic is now closed to further replies.
     Share

    • Recently Browsing   0 members

      • No registered users viewing this page.
    ×
    ×
    • Create New...