Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static int _CPlaneConstructorJMP = AddressByVersion(0x54B210, 0x54B390, 0x54B340);
- void __declspec(naked) patch__CPlaneConstructor()
- {
- __asm
- {
- mov al, [ebx+51h]
- and al, 0FEh
- or al, 1
- mov [ebx+51h], al
- }
- _asm jmp _CPlaneConstructorJMP
- }
- static int UpdateRwFrame__7CEntityFv = AddressByVersion(0x474330, 0x474330, 0x474330);
- static int RemoveAndAdd__9CPhysicalFv = AddressByVersion(0x495540, 0x495600, 0x495590);
- static int _CPlaneProcessControlJMP = AddressByVersion(0x54DD49, 0x54DEC9, 0x54DE79);
- void __declspec(naked) patch__CPlaneProcessControl()
- {
- __asm
- {
- mov ecx, ebp
- call UpdateRwFrame__7CEntityFv
- mov ecx, ebp
- call RemoveAndAdd__9CPhysicalFv
- }
- _asm jmp _CPlaneProcessControlJMP
- }
- BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID lpReserved)
- {
- if(reason == DLL_PROCESS_ATTACH)
- {
- CPatch::RedirectJump(AddressByVersion(0x54B208, 0x54B388, 0x54B338), patch__CPlaneConstructor);
- CPatch::RedirectJump(AddressByVersion(0x54DD42, 0x54DEC2, 0x54DE72), patch__CPlaneProcessControl);
- }
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment