//
// cocos2d::extension::WebSocket::send from 0xd1f9bc to 0xd1fa7c (192 bytes)
//
// 1 xrefs:
// > ??> @ 0xf5c38
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:07:11 +0000
//
__int64 __fastcall cocos2d::extension::WebSocket::send(__int64 result, __int64 a2)
{
__int64 v2; // x19
__int64 v4; // x22
__int64 v5; // x0
__int64 v6; // x20
__int64 v7; // x0
char *v8; // x0
const char *v9; // x1
__int64 v10; // x1
if ( *(_DWORD *)(result + 8) == 1 )
{
v2 = result;
v4 = operator new(0x10u);
*(_DWORD *)v4 = 0;
*(_QWORD *)(v4 + 8) = 0;
v5 = operator new(0x10u);
*(_QWORD *)v5 = 0;
*(_DWORD *)(v5 + 8) = 0;
v6 = v5;
*(_BYTE *)(v5 + 12) = 0;
v7 = *(_BYTE *)a2 >> 1;
if ( (*(_BYTE *)a2 & 1) != 0 )
v7 = *(_QWORD *)(a2 + 8);
v8 = (char *)operator new[](v7 + 1);
*(_QWORD *)v6 = v8;
v9 = (const char *)(a2 + 1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v9 = *(const char **)(a2 + 16);
strcpy(v8, v9);
LODWORD(v10) = *(_BYTE *)a2 >> 1;
if ( (*(_BYTE *)a2 & 1) != 0 )
v10 = *(_QWORD *)(a2 + 8);
*(_DWORD *)(v6 + 8) = v10;
*(_QWORD *)(v4 + 8) = v6;
return cocos2d::extension::WsThreadHelper::sendMessageToSubThread(*(_QWORD *)(v2 + 72), v4);
}
return result;
}