//
// cocos2d::extension::WebSocket::close from 0x7b2e8c to 0x7b2ec2 (54 bytes)
//
// 1 xrefs:
// > cocos2d::extension::WebSocket::~WebSocket @ 0x7b2ed6
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:00:08 +0000
//
int __fastcall cocos2d::extension::WebSocket::close(cocos2d::CCObject **this)
{
int v2; // r0
cocos2d::CCScheduler *v3; // r0
int result; // r0
void *v5; // r1
pthread_t *v6; // r0
v2 = cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)this);
v3 = (cocos2d::CCScheduler *)(*(int (__fastcall **)(int))(*(_DWORD *)v2 + 64))(v2);
result = cocos2d::CCScheduler::unscheduleAllForTarget(v3, *(this + 9));
if ( (unsigned int)*(this + 1) - 2 > 1 )
{
v6 = (pthread_t *)*(this + 9);
*(this + 1) = (cocos2d::CCObject *)(&dword_0 + 3);
cocos2d::extension::WsThreadHelper::joinSubThread(v6, v5);
return (*(int (__fastcall **)(_DWORD, cocos2d::CCObject **))(*(_DWORD *)*(this + 12) + 16))(*(this + 12), this);
}
return result;
}