//
// cocos2d::extension::WebSocket::onUIThreadReceiveMessage from 0x18001a860 to 0x18001a906 (166 bytes)
//
// 3 xrefs:
// > ??> @ 0x18002b700
// > ??> @ 0x180032408
// > ??> @ 0x18004cc8c
//
// 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::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;
}
if ( v5 )
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;
}
}