//
// cocos2d::extension::WebSocket::onUIThreadReceiveMessage from 0xaad734 to 0xaad838 (260 bytes)
//
// 2 xrefs:
// > ??> @ 0x89af0
// > ??> @ 0x11fafb8
//
// 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::onUIThreadReceiveMessage(__int64 a1, __int64 a2)
{
__int64 *v3; // x0
__int64 v4; // x3
void **v6; // x20
int v7; // [xsp+24h] [xbp+24h] BYREF
switch ( *(_DWORD *)a2 )
{
case 2:
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 64) + 16LL))(*(_QWORD *)(a1 + 64), a1);
break;
case 3:
v6 = *(void ***)(a2 + 8);
(*(void (__fastcall **)(_QWORD, __int64, void **))(**(_QWORD **)(a1 + 64) + 24LL))(*(_QWORD *)(a1 + 64), a1, v6);
if ( *v6 )
{
operator delete[](*v6);
*v6 = nullptr;
}
operator delete(v6);
break;
case 4:
v3 = *(__int64 **)(a1 + 64);
v4 = *v3;
v7 = 1;
(*(void (__fastcall **)(__int64 *, __int64, int *))(v4 + 40))(v3, a1, &v7);
break;
case 5:
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 64) + 32LL))(*(_QWORD *)(a1 + 64), a1);
break;
default:
return _stack_chk_guard;
}
return _stack_chk_guard;
}