Crazy Game Fun Times – Deer Hunter Tournament and JFK Reloaded

I decided to write some trainers for dumbass games for dumbass fun, why not?

JFK Reloaded Rapid Fire

 C++ |  copy code |? 
01
02
// This evades the hard-coded bullet record limit (basically, the ballistics screen and replay might fuck up and crash because you shot too many bullets)
03
DWORD WINAPI lpBallisticSanityThread(LPVOID lpParam) {
04
    while(true) {
05
        unsigned long* pdwShotsFired = ( unsigned long* )0x006162AC;
06
 
07
        if( *pdwShotsFired > 0x26 ) {
08
            *pdwShotsFired = 0x24;
09
        }
10
 
11
        Sleep(100);
12
    }
13
 
14
    return 0;
15
}
16
 
17
__declspec( noinline ) VOID InstallPatches() {
18
    memset_s( ( unsigned char* )0x5A1CF8, 0xEB, 1 );
19
    memset_s( ( unsigned char* )0x59F1FA, 0x90, 2 );
20
}
21
 
22
BOOL APIENTRY DllMain( HMODULE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved )
23
{
24
    if(ul_reason_for_call == DLL_PROCESS_ATTACH) {
25
        InstallPatches();
26
 
27
        CreateThread(0, 0, lpBallisticSanityThread, 0, 0, 0);
28
    }
29
 
30
    return TRUE;
31
}  
32


Deer Hunter Tournament – Rapid Fire/Perfect Shooting/Infinite Ammo/No Illegal Kills

 C++ |  copy code |? 
01
02
class CScriptValue 
03
{ 
04
public: 
05
    virtual void unk0() = 0; 
06
    virtual char* name() = 0; 
07
}; 
08
 
09
typedef signed int (__thiscall* setInt32Value_t)(CScriptValue* pthis, int value); 
10
typedef signed int (__thiscall* setFloatValue_t)(CScriptValue* pthis, float value); 
11
 
12
setInt32Value_t psetInt32Value = NULL; 
13
setFloatValue_t psetFloatValue = NULL; 
14
 
15
signed int __fastcall new_setInt32Value(CScriptValue* pthis, void* _EBX, int value) { 
16
    if(strcmp(pthis->name(), "NumBullets") == 0) { 
17
        return psetInt32Value(pthis, 99); 
18
    } 
19
 
20
    return psetInt32Value(pthis, value); 
21
} 
22
 
23
signed int __fastcall new_setFloatValue(CScriptValue* pthis, float value) { 
24
    if( 
25
        strcmp(pthis->name(), "RecoilMinTime") == 0 ||  
26
        strcmp(pthis->name(), "RecoilMaxTime") == 0 ||  
27
        strcmp(pthis->name(), "SpreadAngle") == 0 || 
28
        strcmp(pthis->name(), "RecoilStrength") == 0 || 
29
        strcmp(pthis->name(), "UseLatency") == 0 ||  
30
        strcmp(pthis->name(), "DryLatency") == 0) { 
31
        return psetFloatValue(pthis, 0.0f); 
32
    } 
33
 
34
    return psetFloatValue(pthis, value); 
35
} 
36
 
37
__declspec( noinline ) VOID InstallPatches() { 
38
    psetInt32Value = (setInt32Value_t) DetourFunction((BYTE*)0x00402060, (BYTE*)new_setInt32Value); 
39
    psetFloatValue = (setFloatValue_t) DetourFunction((BYTE*)0x00402760, (BYTE*)new_setFloatValue); 
40
 
41
    memset_s((unsigned char*) 0x00674670, 0xFF, 1); //No Illegal Kills 
42
} 
43
 
44
BOOL APIENTRY DllMain( HMODULE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved ) { 
45
    if(ul_reason_for_call == DLL_PROCESS_ATTACH) { 
46
        InstallPatches(); 
47
    } 
48
 
49
    return TRUE; 
50
}  
51