//
// GJUserCell::onUnblockUser from 0x60c234 to 0x60c4c8 (660 bytes)
//
// 3 xrefs:
// > ??> @ 0x55980
// > GJUserCell::loadFromScore @ 0x61baf4
// > ??> @ 0x122ac20
//
// 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 GJUserCell::onUnblockUser(GJUserCell *a1, cocos2d::CCObject *a2)
{
int v2; // w20
GJUserScore *m_userScore; // x1
double v4; // d0
cocos2d::CCString *v5; // x0
char *CString; // x0
char *v7; // x0
FLAlertLayer *v8; // x20
char *v9; // x0
char *v10; // x0
unsigned int *v11; // x20
int v12; // w1
unsigned int *v13; // x1
int v14; // w2
unsigned int *v15; // x1
int v16; // w2
char *v17; // [xsp+58h] [xbp+58h] BYREF
char *v18; // [xsp+60h] [xbp+60h] BYREF
v2 = (int)a1;
m_userScore = a1->m_userScore;
if ( m_userScore && m_userScore->m_accountID > 0 )
{
*(_QWORD *)&v4 = sub_D18D28(&v18, &m_userScore->m_userName).n128_u64[0];
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Are you sure you want to unblock %s?",
v18,
v4);
CString = (char *)cocos2d::CCString::getCString(v5);
sub_D153B8((int)&v17, CString);
v7 = v18 - 24;
if ( v18 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v13 = (unsigned int *)(v18 - 8);
do
v14 = __ldaxr(v13);
while ( __stlxr(v14 - 1, v13) );
}
else
{
v14 = *((_DWORD *)v18 - 2);
*((_DWORD *)v18 - 2) = v14 - 1;
}
if ( v14 <= 0 )
operator delete(v7);
}
sub_D153B8((int)&v18, v17);
v8 = FLAlertLayer::create(v2 + 536, (__int64)"Unblock user", (__int64)&v18);
v9 = v18 - 24;
if ( v18 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v15 = (unsigned int *)(v18 - 8);
do
v16 = __ldaxr(v15);
while ( __stlxr(v16 - 1, v15) );
}
else
{
v16 = *((_DWORD *)v18 - 2);
*((_DWORD *)v18 - 2) = v16 - 1;
}
if ( v16 <= 0 )
operator delete(v9);
}
v8->setTag(v8, 1);
ButtonSprite::updateBGImage(v8->m_button2, "GJ_button_05.png");
v8->show(v8);
v10 = v17 - 24;
if ( v17 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v11 = (unsigned int *)(v17 - 8);
do
v12 = __ldaxr(v11);
while ( __stlxr(v12 - 1, v11) );
}
else
{
v12 = *((_DWORD *)v17 - 2);
*((_DWORD *)v17 - 2) = v12 - 1;
}
if ( v12 <= 0 )
operator delete(v10);
}
}
}