//
// cocos2d::extension::WebSocket::send from 0x18001a420 to 0x18001a4c9 (169 bytes)
//
// 4 xrefs:
// > ??> @ 0x18002f5b0
// > ??> @ 0x18002f5c0
// > ??> @ 0x18002fdf8
// > ??> @ 0x18004acbc
//
// 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
//
void __fastcall cocos2d::extension::WebSocket::send(
cocos2d::extension::WebSocket *this,
const unsigned __int8 *a2,
unsigned int a3)
{
_QWORD *v6; // rsi
_DWORD *v7; // rdi
void *v8; // rax
if ( *((_DWORD *)this + 2) == 1 )
{
v6 = operator new(0x10u);
v6[1] = 0;
*(_DWORD *)v6 = 1;
v7 = operator new(0x10u);
*(_QWORD *)v7 = 0;
v7[2] = 0;
*((_BYTE *)v7 + 12) = 0;
v8 = operator new(a3);
*(_QWORD *)v7 = v8;
memcpy(v8, a2, a3);
v7[2] = a3;
v6[1] = v7;
sub_180019780(*((_QWORD *)this + 11), (__int64)v6);
}
}