//
// cocos2d::extension::WebSocket::~WebSocket from 0xd1fb90 to 0xd1fc4c (188 bytes)
//
// 4 xrefs:
// > cocos2d::extension::WebSocket::~WebSocket @ 0xd1fc5c
// > ??> @ 0x8ba98
// > ??> @ 0x1028b0
// > ??> @ 0x15108a0
//
// 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
//
// Alternative name is '_ZN7cocos2d9extension9WebSocketD2Ev'
void __fastcall cocos2d::extension::WebSocket::~WebSocket(cocos2d::extension::WebSocket *this)
{
cocos2d::CCObject *v2; // x0
void **v3; // x2
__int64 v4; // x19
void **v5; // x1
char v6; // w0
void **v7; // x20
*(_QWORD *)this = off_15108A0;
cocos2d::extension::WebSocket::close((cocos2d::CCObject **)this);
v2 = *((cocos2d::CCObject **)this + 9);
if ( v2 )
{
cocos2d::CCObject::release(v2);
*((_QWORD *)this + 9) = 0;
}
v3 = *((void ***)this + 14);
v4 = 0;
v5 = v3;
if ( !v3[1] )
goto LABEL_8;
do
{
if ( *v5 )
{
operator delete[](*v5);
*(_QWORD *)(*((_QWORD *)this + 14) + v4 * 8) = 0;
v3 = *((void ***)this + 14);
}
v4 += 6;
v5 = &v3[v4];
}
while ( v3[v4 + 1] );
if ( v3 )
{
LABEL_8:
operator delete[](v3);
*((_QWORD *)this + 14) = 0;
}
if ( (*((_BYTE *)this + 48) & 1) != 0 )
operator delete(*((void **)this + 8));
v6 = *((_BYTE *)this + 16);
v7 = (void **)((char *)this + 16);
if ( (v6 & 1) != 0 )
operator delete(v7[2]);
}