Thread: AVA CHAMS ! ! !

Results 1 to 10 of 10
  1. #1
    _Anonymous_'s Avatar
    Join Date
    Nov 2012
    Gender
    male
    Location
    (Not Applicable)
    Posts
    71
    Reputation
    10
    Thanks
    1,028
    My Mood
    Drunk

    AVA CHAMS ! ! !

    AVA CHAMS C++ SOURCE CODE REVEAL
    Code:
    #include <windows.h>
    
    #include <d3d9.h>
    #pragma comment(lib, "d3d9.lib")
    
    #include <d3dx9.h>
    #pragma comment(lib, "d3dx9.lib")
    #include <time.h>
    #include <stdlib.h>
    #include <fstream>
    #include <vector>    
    #include <D3dx9tex.h>
    #include <stdio.h> 
    #include <time.h>
    #include <tchar.h>
    #include <iostream>
    
    //-----------//
    bool fCall = true;
    bool Chams = false;
    IDirect3DPixelShader9 *Front,
                          *Back;
    //----------//
    
    
    
    
    HRESULT CreateMyShader(IDirect3DPixelShader9 **pShader, IDirect3DDevice9 *Device, float red, float green, float blue, float alpha )
    {
        ID3DXBuffer *MyBuffer = NULL;
        char MyShader[ 256 ];
        sprintf( MyShader, "ps.1.1\ndef c0, %f, %f, %f, %f\nmov r0,c0", red/255, green/255, blue/255, alpha/255 );
        D3DXAssembleShader( MyShader, sizeof( MyShader ), NULL, NULL, 0, &MyBuffer , NULL );
        if( FAILED( Device->CreatePixelShader((const DWORD*)MyBuffer ->GetBufferPointer(), pShader)) )return E_FAIL;
        return S_OK;
    }
    
    //=====================================================================================
    
    typedef HRESULT (WINAPI* CreateDevice_Prototype)        (LPDIRECT3D9, UINT, D3DDEVTYPE, HWND, DWORD, D3DPRESENT_PARAMETERS*, LPDIRECT3DDEVICE9*);
    typedef HRESULT (WINAPI* Reset_Prototype)               (LPDIRECT3DDEVICE9, D3DPRESENT_PARAMETERS*);
    typedef HRESULT (WINAPI* EndScene_Prototype)            (LPDIRECT3DDEVICE9);
    typedef HRESULT (WINAPI* DrawIndexedPrimitive_Prototype)(LPDIRECT3DDEVICE9, D3DPRIMITIVETYPE, INT, UINT, UINT, UINT, UINT);
    
    CreateDevice_Prototype         CreateDevice_Pointer         = NULL;
    Reset_Prototype                Reset_Pointer                = NULL;
    EndScene_Prototype             EndScene_Pointer             = NULL;
    DrawIndexedPrimitive_Prototype DrawIndexedPrimitive_Pointer = NULL;
    
    HRESULT WINAPI Direct3DCreate9_VMTable    (VOID);
    HRESULT WINAPI CreateDevice_Detour        (LPDIRECT3D9, UINT, D3DDEVTYPE, HWND, DWORD, D3DPRESENT_PARAMETERS*, LPDIRECT3DDEVICE9*);
    HRESULT WINAPI Reset_Detour               (LPDIRECT3DDEVICE9, D3DPRESENT_PARAMETERS*);
    HRESULT WINAPI EndScene_Detour            (LPDIRECT3DDEVICE9);
    HRESULT WINAPI DrawIndexedPrimitive_Detour(LPDIRECT3DDEVICE9, D3DPRIMITIVETYPE, INT, UINT, UINT, UINT, UINT);
    
    DWORD WINAPI VirtualMethodTableRepatchingLoopToCounterExtensionRepatching(LPVOID);
    PDWORD Direct3D_VMTable = NULL;
    
    //=====================================================================================
    
    BOOL WINAPI DllMain(HINSTANCE hinstModule, DWORD dwReason, LPVOID lpvReserved)
    {
      if(dwReason == DLL_PROCESS_ATTACH)
      {
        DisableThreadLibraryCalls(hinstModule);
    
        if(Direct3DCreate9_VMTable() == D3D_OK)
        return TRUE;
      }
    
      return FALSE;
    }
    
    //=====================================================================================
    
    HRESULT WINAPI Direct3DCreate9_VMTable(VOID)
    {
      LPDIRECT3D9 Direct3D_Object = Direct3DCreate9(D3D_SDK_VERSION);
    
      if(Direct3D_Object == NULL)
      return D3DERR_INVALIDCALL;
      
      Direct3D_VMTable = (PDWORD)*(PDWORD)Direct3D_Object;
      Direct3D_Object->Release();
    
      DWORD dwProtect;
    
      if(VirtualProtect(&Direct3D_VMTable[16], sizeof(DWORD), PAGE_READWRITE, &dwProtect) != 0)
      {
        *(PDWORD)&CreateDevice_Pointer = Direct3D_VMTable[16];
        *(PDWORD)&Direct3D_VMTable[16] = (DWORD)CreateDevice_Detour;
    
        if(VirtualProtect(&Direct3D_VMTable[16], sizeof(DWORD), dwProtect, &dwProtect) == 0)
        return D3DERR_INVALIDCALL;
      }
      else
      return D3DERR_INVALIDCALL;
    
      return D3D_OK;
    }
    
    //=====================================================================================
    
    HRESULT WINAPI CreateDevice_Detour(LPDIRECT3D9 Direct3D_Object, UINT Adapter, D3DDEVTYPE DeviceType, HWND FocusWindow, 
                        DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* PresentationParameters, 
                        LPDIRECT3DDEVICE9* Returned_Device_Interface)
    {
      HRESULT Returned_Result = CreateDevice_Pointer(Direct3D_Object, Adapter, DeviceType, FocusWindow, BehaviorFlags, 
                                                  PresentationParameters, Returned_Device_Interface);
       
      DWORD dwProtect;
    
      if(VirtualProtect(&Direct3D_VMTable[16], sizeof(DWORD), PAGE_READWRITE, &dwProtect) != 0)
      {
        *(PDWORD)&Direct3D_VMTable[16] = *(PDWORD)&CreateDevice_Pointer;
        CreateDevice_Pointer           = NULL;
    
        if(VirtualProtect(&Direct3D_VMTable[16], sizeof(DWORD), dwProtect, &dwProtect) == 0)
        return D3DERR_INVALIDCALL;
      }
      else
      return D3DERR_INVALIDCALL;
    
      if(Returned_Result == D3D_OK)
      {
        Direct3D_VMTable = (PDWORD)*(PDWORD)*Returned_Device_Interface;
    
        *(PDWORD)&Reset_Pointer                = (DWORD)Direct3D_VMTable[16];
        *(PDWORD)&EndScene_Pointer             = (DWORD)Direct3D_VMTable[42];
        *(PDWORD)&DrawIndexedPrimitive_Pointer = (DWORD)Direct3D_VMTable[82];
    
        if(CreateThread(NULL, 0, VirtualMethodTableRepatchingLoopToCounterExtensionRepatching, NULL, 0, NULL) == NULL)
        return D3DERR_INVALIDCALL;
      }
        
      return Returned_Result;
    }
    
    //=====================================================================================
    
    HRESULT WINAPI Reset_Detour(LPDIRECT3DDEVICE9 Device_Interface, D3DPRESENT_PARAMETERS* PresentationParameters)
    {
      return Reset_Pointer(Device_Interface, PresentationParameters);
    }
    
    //=====================================================================================
    
    HRESULT WINAPI EndScene_Detour(LPDIRECT3DDEVICE9 Device_Interface)
    {
      return EndScene_Pointer(Device_Interface);
    }
    
    //=====================================================================================
    
    HRESULT WINAPI DrawIndexedPrimitive_Detour(LPDIRECT3DDEVICE9 Device_Interface, D3DPRIMITIVETYPE Type, INT BaseIndex, 
                                               UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount)
    {
      LPDIRECT3DVERTEXBUFFER9 Stream_Data;
      UINT Offset = 0;
      UINT Stride = 0;
    
      if(Device_Interface->GetStreamSource(0, &Stream_Data, &Offset, &Stride) == D3D_OK)
      Stream_Data->Release();
    
      if(fCall)
      {
      CreateMyShader( &Front, Device_Interface,    255,     0,   0,   255 );
      CreateMyShader( &Back,  Device_Interface,    255,   255,   0,   255 );
      fCall = false;
      }
    
      if ( GetAsyncKeyState ( VK_NUMPAD1 ) &1 )
        {
             Chams = !Chams;
        }  
    
      if(Chams && (Stride == 32 && StartIndex == 0))
      {
            DWORD dwOldZEnable = D3DZB_TRUE; 
            Device_Interface->GetRenderState(D3DRS_ZENABLE, &dwOldZEnable); 
            Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
            Device_Interface->SetPixelShader( Front );
            DrawIndexedPrimitive_Pointer(Device_Interface, Type, BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
            Device_Interface->SetRenderState(D3DRS_ZENABLE, dwOldZEnable);
            Device_Interface->SetPixelShader( Back );
      }
    
      return DrawIndexedPrimitive_Pointer(Device_Interface, Type, BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
    }
    
    //=====================================================================================
    
    DWORD WINAPI VirtualMethodTableRepatchingLoopToCounterExtensionRepatching(LPVOID Param)
    {
      UNREFERENCED_PARAMETER(Param); 
    
      while(1)
      {
        Sleep(100);
    
        *(PDWORD)&Direct3D_VMTable[42] = (DWORD)EndScene_Detour;
        *(PDWORD)&Direct3D_VMTable[82] = (DWORD)DrawIndexedPrimitive_Detour;
        *(PDWORD)&Direct3D_VMTable[16] = (DWORD)Reset_Detour;
      }
    
      return 1;
    }
    Last edited by _Anonymous_; 04-06-2013 at 09:51 PM.

  2. The Following User Says Thank You to _Anonymous_ For This Useful Post:

    S.W.A.T. (04-12-2013)

  3. #2
    devilaim's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    519
    Reputation
    10
    Thanks
    1,587
    My Mood
    Devilish
    wow that is so great

  4. #3
    PPCINJ's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    NRF
    Posts
    317
    Reputation
    10
    Thanks
    1,674
    My Mood
    Innocent
    Unluckily I'm not an C++ Coder, but maybe I can do something with this.

  5. #4
    ferrarifan99's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Location
    Holland
    Posts
    107
    Reputation
    43
    Thanks
    6
    My Mood
    Angelic
    do i need a compiler for this?

  6. #5
    PPCINJ's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    NRF
    Posts
    317
    Reputation
    10
    Thanks
    1,674
    My Mood
    Innocent
    Quote Originally Posted by ferrarifan99 View Post
    do i need a compiler for this?
    I expect you aren't coder.

  7. The Following User Says Thank You to PPCINJ For This Useful Post:

    S.W.A.T. (04-12-2013)

  8. #6
    ferrarifan99's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Location
    Holland
    Posts
    107
    Reputation
    43
    Thanks
    6
    My Mood
    Angelic
    true... is vb good enough?

  9. #7
    zZzeta/S's Avatar
    Join Date
    Apr 2012
    Gender
    male
    Location
    Germany
    Posts
    1,061
    Reputation
    43
    Thanks
    2,082
    Will fail Simple Detous hooks arent undetectet
    Quote Originally Posted by Jabberwo0ck View Post
    Quote Originally Posted by uNrEaL View Post
    Cool, thanks!
    Ccman has gone too low. I've known for a long time he was sneaky.
    >top lel much crack many get so download wow

  10. The Following User Says Thank You to zZzeta/S For This Useful Post:

    Riddick (04-07-2013)

  11. #8
    _Anonymous_'s Avatar
    Join Date
    Nov 2012
    Gender
    male
    Location
    (Not Applicable)
    Posts
    71
    Reputation
    10
    Thanks
    1,028
    My Mood
    Drunk
    Note that this is not completed it needs SDK, and this is the main hack only but you need a code to complete it, so this is still a code snippet that needs to develop with some coders.

  12. The Following User Says Thank You to _Anonymous_ For This Useful Post:

    Riddick (04-08-2013)

  13. #9
    zZzeta/S's Avatar
    Join Date
    Apr 2012
    Gender
    male
    Location
    Germany
    Posts
    1,061
    Reputation
    43
    Thanks
    2,082
    Stop simulating coolnes

    Btw this is leeched orig. creators are Roverturbo,s0beit..etc

    This code got thrown together by CallMeEclipse some years ago..
    Quote Originally Posted by Jabberwo0ck View Post
    Quote Originally Posted by uNrEaL View Post
    Cool, thanks!
    Ccman has gone too low. I've known for a long time he was sneaky.
    >top lel much crack many get so download wow

  14. The Following 2 Users Say Thank You to zZzeta/S For This Useful Post:

    Cipres (04-09-2013),Riddick (04-09-2013)

  15. #10
    Jabberwock's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    1,655
    Reputation
    191
    Thanks
    14,466
    My Mood
    Relaxed
    From what I see this doesn't need a SDK like you have stated and no this won't work on our AVA. Xigncode isn't THAT stupid.

    So yeah, I think you have leeched it from somewhere.
    Even familiar landscapes will
    reveal a different kind of beauty
    if you change your viewpoint.
    Where these new encounters
    and new bonds will lead you...
    Such dazzling golden days.
    I, too, look forward to
    what I might behold.

    Everything depends on you friend. Be strong don't give up. Don't let the sadness hurt you. Be strong and prevail!

  16. The Following 2 Users Say Thank You to Jabberwock For This Useful Post:

    Riddick (04-10-2013),theorc (04-17-2013)

Similar Threads

  1. [Solved] AVA Chams DLL
    By haloman128 in forum Alliance of Valiant Arms (AVA) Help
    Replies: 3
    Last Post: 04-06-2013, 06:24 AM
  2. [Info] AVA Chams 1-23-13 newst update!!
    By AznNicholas1314 in forum Alliance of Valiant Arms (AVA) Discussions
    Replies: 10
    Last Post: 01-23-2013, 03:19 PM
  3. [Kinda Release]AVA Chams Source Code
    By noleash in forum Alliance of Valiant Arms (AVA) Coding / Source Code
    Replies: 14
    Last Post: 11-30-2010, 03:14 PM
  4. Injector For AVA Chams (Doubt)
    By warrior65 in forum Alliance of Valiant Arms (AVA) Hacks & Cheats
    Replies: 14
    Last Post: 04-24-2010, 10:24 AM
  5. [PATCHED] Realease-AVA chams
    By custombuyers in forum Alliance of Valiant Arms (AVA) Hacks & Cheats
    Replies: 17
    Last Post: 11-22-2009, 04:24 PM