How To: Punkbuster Clean Screenshots :D

c, c++, php, html, sql ..etc discussion. also includes codes and source codes.

How To: Punkbuster Clean Screenshots :D

Postby DaBeppe » Sun Jan 17, 2010 8:16 pm

Here you go :D

Credits: deadnesser,me,rcontool,gamedeception

Code: Select all
//Punkbuster used GetSystemTimeAsFileTime for PBSS you know

.idata:0045D0E4 ; void __stdcall GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime)
.idata:0045D0E4                 extrn GetSystemTimeAsFileTime:dword ; CODE XREF: _time+9p

void CleanVisuals( LPFILETIME lpSystemTimeAsFileTime )
{   

cvar.on=0;//Clean out visuals
cvar.pbmade=false;//Punkbuster Screenshoot notifications

    Sleep(2000);//2 Sek Time before visuals goes back On

cvar.pbmade=true;//Punkbuster Screenshoot notifications
cvar.on=1;//Clean out visuals

}

void (WINAPI*orig_PunkbusterClean_Screenshoots)( LPFILETIME lpSystemTimeAsFileTime );
void WINAPI hook_PunkbusterClean_Screenshoots( LPFILETIME lpSystemTimeAsFileTime )
{
    _beginthread((void (__cdecl *)(void *))CleanVisuals, 0, lpSystemTimeAsFileTime );
   
    orig_PunkbusterClean_Screenshoots( lpSystemTimeAsFileTime );
}

       
detour it

DetourFunction( ( PBYTE )GetSystemTimeAsFileTime, ( PBYTE )&hook_PunkbusterClean_Screenshoots );
__asm mov [ orig_PunkbusterClean_Screenshoots ], eax;


Or:

Code: Select all
void CleanVisuals( LPFILETIME lpSystemTimeAsFileTime )
{   

cvar.on=0;//Clean out visuals
cvar.pbmade=false;//Punkbuster Screenshoot notifications

    Sleep(2000);//2 Sek Time before visuals goes back On

cvar.pbmade=true;//Punkbuster Screenshoot notifications
cvar.on=1;//Clean out visuals

}
DETOUR_TRAMPOLINE(DWORD WINAPI orig_PunkbusterClean_Screenshoots( LPFILETIME lpSystemTimeAsFileTime ), GetSystemTimeAsFileTime);
void WINAPI hook_PunkbusterClean_Screenshoots( LPFILETIME lpSystemTimeAsFileTime )
{
    _beginthread((void (__cdecl *)(void *))CleanVisuals, 0, lpSystemTimeAsFileTime );
   
    orig_PunkbusterClean_Screenshoots( lpSystemTimeAsFileTime );
}

DetourFunctionWithTrampoline((PBYTE)orig_PunkbusterClean_Screenshoots, (PBYTE)hook_PunkbusterClean_Screenshoots);


Check my other topic on how to bypass vac2:

viewtopic.php?f=39&t=596&p=3386
DaBeppe
Allie
Allie
 
Posts: 41
Joined: Sun Jan 17, 2010 4:12 pm

Return to Programming / Coding / Debugging

Who is online

Users browsing this forum: No registered users and 2 guests

cron