//
// cocos2d::extension::WebSocket::onSubThreadLoop from 0x18001a550 to 0x18001a592 (66 bytes)
//
// 3 xrefs:
// > ??> @ 0x180029038
// > ??> @ 0x18002fdf8
// > ??> @ 0x18004acec
//
// 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::onSubThreadLoop(cocos2d::extension::WebSocket *this)
{
int v1; // eax
__int64 v2; // rcx
v1 = *((_DWORD *)this + 2);
v2 = *((_QWORD *)this + 13);
if ( (unsigned int)(v1 - 2) <= 1 )
{
lws_context_destroy(v2);
return 1;
}
else
{
if ( v2 )
lws_service(v2, 0);
Sleep(0x32u);
return 0;
}
}