MOV [pPlayerClient + 4 * i], -56 MOV DWORD PTR [pPlayerClient + 4 * i], -56 MOV DWORD PTR SS:[pPlayerClient + 4 * i], -56 and so on...
int addr = 0xABCDEF; mov eax, [ addr ] mov ecx, [ eax ] ; mov [ ecx ], some_shit
#define MAX_INDEX 25 xor esi, esi _label: mov [ pPlayerClient + esi * 4 ], FFFFFFAAh inc esi cmp esi, MAX_INDEX jnz _label
MOV EAX, pPlayerClient MOV ESI, i MOV DWORD PTR [EAX+ESI*4], -56
#define ADDR_LTCLIENTSHELL 0x0115B4D4
__declspec( noinline ) void WTWAssembly( void )
{
char *strCShell = ( char * ) "CShell.dll";
float fWTWValue = -56.0f;
__asm
{
push strCShell
call [ GetModuleHandleA ]
mov eax, [ eax + ADDR_LTCLIENTSHELL ]
mov ecx, [ eax + 70h ]
test ecx, ecx
jz _return
fld [ fWTWValue ]
fstp [ ecx + 580h ]
fld [ fWTWValue ]
fstp [ ecx + 584h ]
fld [ fWTWValue ]
fstp [ ecx + 588h ]
_return:
xor eax, eax
}
}
#define ADDR_LTCLIENTSHELL 0x0115B4D4
__declspec( naked ) DWORD WINAPI WTWAssembly( void * )
{
static char *strCShell = ( char * ) "CShell.dll";
static float fWTWValue = -56.0f;
__asm
{
_loop:
push strCShell
call [ GetModuleHandleA ]
test eax, eax
jz _return
mov eax, [ eax + ADDR_LTCLIENTSHELL ]
test eax, eax
jz _return
mov ecx, [ eax + 70h ]
test ecx, ecx
jz _return
fld [ fWTWValue ]
fstp [ ecx + 580h ]
fld [ fWTWValue ]
fstp [ ecx + 584h ]
fld [ fWTWValue ]
fstp [ ecx + 588h ]
_return:
push 6Ah
call [ Sleep ]
jmp _loop
}
}
BOOL WINAPI DllMain( HMODULE hModule, DWORD dwReason, LPVOID lpReserved )
{
if( dwReason == DLL_PROCESS_ATTACH )
CreateThread( 0, 0, &WTWAssembly, 0, 0, 0 );
return 1;
}