//
// MPLobbyLayer::onComment from 0x9ca44c to 0x9ca600 (436 bytes)
//
// 1 xrefs:
// > ??> @ 0x31c80
//
// 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
//
void MPLobbyLayer::onComment(MPLobbyLayer *a1, cocos2d::CCObject *a2)
{
__int64 v3; // x22
void *v4; // x0
void *v5; // x0
unsigned int *v6; // x1
int v7; // w2
unsigned int *v8; // x1
int v9; // w2
__int64 v10; // [xsp+48h] [xbp+48h] BYREF
__int64 v11; // [xsp+50h] [xbp+50h] BYREF
sub_D153B8((int)&v10, "Add Comment");
LODWORD(a1) = a1->m_lobbyID;
sub_D153B8((int)&v11, &byte_F288A0);
v3 = ShareCommentLayer::create((__int64)&v10, 100, 3, (int)a1);
v4 = (void *)(v11 - 24);
if ( (__int64 *)(v11 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v6 = (unsigned int *)(v11 - 8);
do
v7 = __ldaxr(v6);
while ( __stlxr(v7 - 1, v6) );
}
else
{
v7 = *(_DWORD *)(v11 - 8);
*(_DWORD *)(v11 - 8) = v7 - 1;
}
if ( v7 <= 0 )
operator delete(v4);
}
v5 = (void *)(v10 - 24);
if ( (__int64 *)(v10 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v8 = (unsigned int *)(v10 - 8);
do
v9 = __ldaxr(v8);
while ( __stlxr(v9 - 1, v8) );
}
else
{
v9 = *(_DWORD *)(v10 - 8);
*(_DWORD *)(v10 - 8) = v9 - 1;
}
if ( v9 <= 0 )
operator delete(v5);
}
(*(void (__fastcall **)(__int64))(*(_QWORD *)v3 + 1288LL))(v3);
}