//
// cocos2d::extension::WebSocket::send from 0x18001a040 to 0x18001a10a (202 bytes)
//
// 5 xrefs:
// > ??> @ 0x180031b5c
// > ??> @ 0x180031b78
// > ??> @ 0x180031b88
// > ??> @ 0x180032408
// > ??> @ 0x18004cbf0
//
// This function is hookable on this platform (idp: pc, 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 12:15:43 +0000
//
void __fastcall cocos2d::extension::WebSocket::send(__int64 a1, _QWORD *a2)
{
__int64 v4; // r14
_DWORD *v5; // r15
__int64 v6; // rdi
__int64 v7; // rax
__int64 v8; // rcx
char v9; // al
if ( *(_DWORD *)(a1 + 8) == 1 )
{
v4 = sub_18001F040(0x10u);
*(_QWORD *)(v4 + 8) = 0;
*(_DWORD *)v4 = 0;
v5 = a2 + 2;
v6 = sub_18001F040(0x10u);
*(_QWORD *)v6 = 0;
*(_DWORD *)(v6 + 8) = 0;
*(_BYTE *)(v6 + 12) = 0;
v7 = sub_18001F33C(a2[2] + 1LL);
*(_QWORD *)v6 = v7;
if ( a2[3] > 0xFu )
a2 = (_QWORD *)*a2;
v8 = v7 - (_QWORD)a2;
do
{
v9 = *(_BYTE *)a2;
*((_BYTE *)a2 + v8) = *(_BYTE *)a2;
a2 = (_QWORD *)((char *)a2 + 1);
}
while ( v9 );
*(_DWORD *)(v6 + 8) = *v5;
*(_QWORD *)(v4 + 8) = v6;
sub_180019620(*(_QWORD *)(a1 + 88), v4);
}
}