//
// cocos2d::extension::WebSocket::send from 0xaae404 to 0xaae4ac (168 bytes)
//
// 1 xrefs:
// > ??> @ 0x41e68
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall cocos2d::extension::WebSocket::send(__int64 this, const unsigned __int8 *a2, unsigned int a3)
{
__int64 v3; // x19
unsigned __int64 v4; // x23
__int64 v5; // x22
__int64 v6; // x20
void *v7; // x0
__int64 v8; // x0
if ( *(_DWORD *)(this + 8) == 1 )
{
v3 = this;
v4 = a3;
v5 = operator new(0x10u);
*(_DWORD *)v5 = 1;
*(_QWORD *)(v5 + 8) = 0;
v6 = operator new(0x10u);
*(_QWORD *)v6 = 0;
*(_DWORD *)(v6 + 8) = 0;
*(_BYTE *)(v6 + 12) = 0;
v7 = (void *)operator new[](v4);
*(_QWORD *)v6 = v7;
memcpy(v7, a2, v4);
*(_DWORD *)(v6 + 8) = v4;
v8 = *(_QWORD *)(v3 + 40);
*(_QWORD *)(v5 + 8) = v6;
return cocos2d::extension::WsThreadHelper::sendMessageToSubThread(v8, v5);
}
return this;
}