Well, aIW shutting down within a week, so i dont see any point in keeping it private.
Below I just basically hook aIW's hooking function to prevent placing hooks which cause cheat detections and keep the usefull hooks.
You must inject the DLL as soon as the game starts, use some injector with auto inject e.g. perX.
This will also allow you to use CoMPMStR's xuid spoofer again, if you have a static ip and your ip is banned, patch the Hello LSP function ( address below ) to RETN and it will allow you to play dedicated servers.
I also have recently noticed that the recent aIW update not everyone's game updated and some people can play fine 1.2-304 so ill leave the offsets for that too.
Have fun till it lasts
If you dont know how to use this, dont bother asking.
Code:
// aIW 1.2-411
#define cInitiliazeStomp 0x20002790
#define cInitiliazeCall 0x20002700
//aIW 1.2-304
#define cInitiliazeStomp 0x20002620
#define cInitiliazeCall 0x20002590
#define cLSPHello 0x4EE6C0
Code:
void ( *oInitiliazeStompHook ) ( int Size, int HookLoc );
void ( *oInitiliazeCallHook ) ( int HookLoc );
void hInitiliazeStompHook( int Size, int HookLoc )
{
__asm PUSHAD;
/*
Log From IW4M1 1.2-304
Size: 5 HookLoc: 50DEA3 Return: 20007CCB NoBorder Hook
Size: 5 HookLoc: 50BE70 Return: 20006B45 RegisterFont Hook
Size: 5 HookLoc: 510710 Return: 20006B6A DrawText Hook
Size: 5 HookLoc: 496710 Return: 20006B90 DrawText Hook
Size: 7 HookLoc: 476A10 Return: 2000308F UIFeederCount Hook
Size: 7 HookLoc: 46FCB0 Return: 200030B5 UIFeederItemText Hook
Size: 6 HookLoc: 497040 Return: 200030DB UIFeederSelection Hook
Size: 6 HookLoc: 468EC2 Return: 20007FF2 No Idea
Size: 5 HookLoc: 570769 Return: 200075EF GetTagPos
Size: 5 HookLoc: 1000A732 Return: 20001B55 No Idea
Size: 5 HookLoc: 5AABE5 Return: 20006EAD Recoil Hook
Size: 5 HookLoc: 6BD2D4 Return: 20006ED7 No Idea, "fastzero_I" name given by IDA
Size: 6 HookLoc: 510163 Return: 20007215 CG_DrawPic Hook
Size: 6 HookLoc: 510273 Return: 2000723F CG_DrawPic Hook
*/
bool Remove = ( HookLoc == 0x50BE70 || HookLoc == 0x510710 || HookLoc == 0x496710 || HookLoc == 0x570769 ||
HookLoc == 0x510163 || HookLoc == 0x510273 );
if( Remove )
HookLoc = (DWORD)malloc(0x20);
__asm POPAD;
oInitiliazeStompHook( Size, HookLoc );
}
void hInitiliazeCallHook( int HookLoc )
{
__asm PUSHAD;
/*
Log From IW4M1 1.2-304
HookLoc: 681B1D Return: 20005BB2 LSP Hook
HookLoc: 4C6810 Return: 200030FE Com_Error Hook
HookLoc: 5AE119 Return: 2000314B GSR Compare Hook
HookLoc: 4CDB28 Return: 20007E95 No Idea
HookLoc: 4C17B2 Return: 20007EB7 CL_Disconnect ? not sure
HookLoc: 62B527 Return: 20007FCE No Idea
HookLoc: 5998EA Return: 20005C18 No Idea
HookLoc: 60C00D Return: 20005CF3 exec Command hook
HookLoc: 48A675 Return: 20005D14 Console Hook, used for stuff like engine xuid spoofing detecting, dvar blocks.
HookLoc: 4CF6A1 Return: 20006E85 unknown
HookLoc: 5A739F Return: 20007155 CG_Trace Hook
HookLoc: 58821A Return: 2000717B IsVisible Hook
HookLoc: 433C2F Return: 200071A1 GetTagPos Internal Hook
HookLoc: 57073D Return: 200071C7 GetTagPos Hook
HookLoc: 493FC3 Return: 200071ED RegisterFont Internal Hook
*/
bool Remove = ( HookLoc == 0x48A675 || HookLoc == 0x5A739F || HookLoc == 0x58821A || HookLoc == 0x433C2F ||
HookLoc == 0x57073D || HookLoc == 0x493FC3 || HookLoc == 0x4CDB28 );
if( Remove )
HookLoc = (DWORD)malloc(0x20);
__asm POPAD;
oInitiliazeCallHook( HookLoc );
}
BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls( hModule );
PatchBytes(cLSPHello, "\xC3\x90\x90\x90\x90\x90", 6);
DetourFunction( ( PBYTE ) cInitiliazeStomp, ( PBYTE ) &hInitiliazeStompHook );
__asm mov oInitiliazeStompHook, eax
DetourFunction( ( PBYTE ) cInitiliazeCall, ( PBYTE ) &hInitiliazeCallHook );
__asm mov oInitiliazeCallHook, eax
}
return true;
}