//
// sub_180019620 from 0x180019620 to 0x1800196bc (156 bytes)
//
// 3 xrefs:
// > cocos2d::extension::WebSocket::send @ 0x18001a0ef
// > cocos2d::extension::WebSocket::send @ 0x18001a19d
// > ??> @ 0x18004cbc0
//
// 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:42 +0000
//
__int64 __fastcall sub_180019620(__int64 a1, __int64 a2)
{
__int64 v4; // rsi
__int64 *v5; // rbx
__int64 v6; // rdi
_QWORD *v7; // rax
_QWORD *v8; // rdx
v4 = a1 + 80;
pthread_mutex_lock(a1 + 80);
v5 = *(__int64 **)(a1 + 64);
v6 = *v5;
if ( v5[1] == 0xAAAAAAAAAAAAAAALL )
std::_Xlength_error("list too long");
v7 = (_QWORD *)sub_18001F040(0x18u);
v7[2] = a2;
++v5[1];
v8 = *(_QWORD **)(v6 + 8);
*v7 = v6;
v7[1] = v8;
*(_QWORD *)(v6 + 8) = v7;
*v8 = v7;
return pthread_mutex_unlock(v4);
}