//
// cocos2d::extension::WebSocket::onUIThreadReceiveMessage from 0x18001ab40 to 0x18001abe1 (161 bytes)
//
// 3 xrefs:
// > ??> @ 0x180029048
// > ??> @ 0x18002fdf8
// > ??> @ 0x18004ad40
//
// 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::onUIThreadReceiveMessage(
cocos2d::extension::WebSocket *this,
struct cocos2d::extension::WsMessage *a2)
{
__int64 v4; // rcx
void **v5; // rbx
int v6; // [rsp+38h] [rbp+10h] BYREF
switch ( *(_DWORD *)a2 )
{
case 2:
(*(void (__fastcall **)(_QWORD, cocos2d::extension::WebSocket *, _QWORD))(**((_QWORD **)this + 14) + 8LL))(
*((_QWORD *)this + 14),
this,
(unsigned int)(*(_DWORD *)a2 - 2));
break;
case 3:
v5 = *((void ***)a2 + 1);
(*(void (__fastcall **)(_QWORD, cocos2d::extension::WebSocket *, void **))(**((_QWORD **)this + 14) + 16LL))(
*((_QWORD *)this + 14),
this,
v5);
if ( *v5 )
{
j_j_free(*v5);
*v5 = nullptr;
}
j_j_free(v5);
break;
case 4:
v4 = *((_QWORD *)this + 14);
v6 = 1;
(*(void (__fastcall **)(__int64, cocos2d::extension::WebSocket *, int *))(*(_QWORD *)v4 + 32LL))(v4, this, &v6);
break;
case 5:
(*(void (__fastcall **)(_QWORD, cocos2d::extension::WebSocket *))(**((_QWORD **)this + 14) + 24LL))(
*((_QWORD *)this + 14),
this);
break;
}
}