-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Код:
typedef void* (*FNC_CryCrtMalloc)(size_t size);
typedef void*(*FNC_CryRealloc)(void* memblock, size_t size, size_t& allocated, size_t& oldsize, size_t alignment);
typedef size_t(*FNC_CryCrtFree)(void* p);
typedef size_t(*FNC_CryCrtSize)(void* p);
typedef void(*FNC_CryGetIMemoryManagerInterface)(void** p);
class _CryMemoryManagerPoolHelper
{
public:
FNC_CryCrtMalloc _CryCrtMalloc; //0x0000
FNC_CryCrtFree _CryCrtFree; //0x0004
FNC_CryRealloc _CryCrtRealloc; //0x0008
FNC_CryCrtSize _CryCrtSize; //0x000C
FNC_CryGetIMemoryManagerInterface _CryGetIMemoryManagerInterface; //0x0010
int m_bInitialized; //0x0014
}; //Size=0x0018
#define CryMemoryManagerPoolHelper ((_CryMemoryManagerPoolHelper*)0x019266BC)
extern "C" int __cdecl _purecall()
{
return 1;
}
void* __cdecl operator new(size_t size)
{
return CryMemoryManagerPoolHelper->_CryCrtMalloc(size);
}
void* __cdecl operator new[](size_t size)
{
return CryMemoryManagerPoolHelper->_CryCrtMalloc(size);
}
void __cdecl operator delete(void* p)
{
CryMemoryManagerPoolHelper->_CryCrtFree(p);
}
void __cdecl operator delete[](void* p)
{
CryMemoryManagerPoolHelper->_CryCrtFree(p);
}