//
// cocos2d::extension::WebSocket::onSubThreadLoop from 0x18001a240 to 0x18001a288 (72 bytes)
//
// 3 xrefs:
// > ??> @ 0x18002b6f0
// > ??> @ 0x180032408
// > ??> @ 0x18004cc50
//
// 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
//
__int64 __fastcall cocos2d::extension::WebSocket::onSubThreadLoop(cocos2d::extension::WebSocket *this)
{
int v1; // eax
__int64 v2; // rcx
v1 = *((_DWORD *)this + 2);
if ( v1 == 3 || v1 == 2 )
{
lws_context_destroy(*((_QWORD *)this + 13));
return 1;
}
else
{
v2 = *((_QWORD *)this + 13);
if ( v2 )
lws_service(v2, 0);
Sleep(0x32u);
return 0;
}
}