//
// cocos2d::extension::WebSocket::send from 0x5ad186 to 0x5ad1d8 (82 bytes)
//
// 0 xrefs:
//
// 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
//
int __fastcall cocos2d::extension::WebSocket::send(int this, const unsigned __int8 *a2, unsigned int a3)
{
int v3; // r8
_DWORD *v6; // r5
int v7; // r4
void *v8; // r0
int v9; // r0
v3 = this;
if ( *(_DWORD *)(this + 4) == 1 )
{
v6 = (_DWORD *)operator new(8u);
*v6 = 1;
v6[1] = 0;
v7 = operator new(0xCu);
*(_DWORD *)v7 = 0;
*(_DWORD *)(v7 + 4) = 0;
*(_BYTE *)(v7 + 8) = 0;
v8 = (void *)operator new[](a3);
*(_DWORD *)v7 = v8;
memcpy(v8, a2, a3);
*(_DWORD *)(v7 + 4) = a3;
v9 = *(_DWORD *)(v3 + 20);
v6[1] = v7;
return cocos2d::extension::WsThreadHelper::sendMessageToSubThread(v9, (int)v6);
}
return this;
}