DaVilka,
Код:
char payload[] = { 0xC9, 0x29, 0x13, 0x10, 0x02, 0x00, 0x00, 0x00 };
HMODULE hCore = GetModuleHandleA("Core.dll");
FMalloc* pMalloc = (FMalloc*)GetProcAddress(hCore, "?GMalloc@@3PAVFMalloc@@A");
NetworkPacket* packet = (NetworkPacket*)pMalloc->Allocate(sizeof(NetworkPacket), 0);
packet->Buffer = (uint8_t*)pMalloc->Allocate(sizeof(payload), 0);
std::memcpy(packet->Buffer, payload, sizeof(payload));
packet->Id = 0x27;
packet->Id2 = 0xFF;
packet->Size = sizeof(payload);
//do stuff