//
// cocos2d::extension::WsThreadHelper::sendMessageToSubThread from 0xd1f8b8 to 0xd1f920 (104 bytes)
//
// 3 xrefs:
// > cocos2d::extension::WebSocket::send @ 0xd1fa78
// > cocos2d::extension::WebSocket::send @ 0xd1fb20
// > ??> @ 0x4aea8
//
// 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
//
__int64 __fastcall cocos2d::extension::WsThreadHelper::sendMessageToSubThread(__int64 a1, __int64 a2)
{
pthread_mutex_t *v2; // x20
__int64 *v4; // x19
__int64 *v5; // x0
__int64 v6; // x1
v2 = (pthread_mutex_t *)(a1 + 112);
pthread_mutex_lock((pthread_mutex_t *)(a1 + 112));
v4 = *(__int64 **)(a1 + 64);
v5 = (__int64 *)operator new(0x18u);
v5[2] = a2;
v5[1] = (__int64)v4;
v6 = *v4;
*v5 = *v4;
*(_QWORD *)(v6 + 8) = v5;
*v4 = (__int64)v5;
++v4[2];
return pthread_mutex_unlock(v2);
}