//
// CommentCell::onLike from 0x735ab8 to 0x735c20 (360 bytes)
//
// 3 xrefs:
// > ??> @ 0x78d30
// > CommentCell::loadFromComment @ 0x74b67c
// > ??> @ 0x1543140
//
// 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 12:52:39 +0000
//
__int64 __fastcall CommentCell::onLike(unsigned int **this, cocos2d::CCObject *a2)
{
__int64 v3; // x0
GJAccountManager *v4; // x0
GameLevelManager *v5; // x0
int v6; // w1
unsigned int v7; // w21
unsigned int v8; // w20
__int64 v9; // x0
__int64 result; // x0
GameManager *v11; // x0
int v12; // w22
__int64 v13; // x0
unsigned int *v14; // x0
unsigned int v15; // w22
__int64 *v16; // x0
__int64 v17; // x2
__int64 v18; // x0
GJAccountManager *v19; // x0
__int64 v20; // x0
v3 = GJAccountManager::sharedState((GJAccountManager *)this);
v4 = (GJAccountManager *)(unsigned int)(*(_DWORD *)(v3 + 352) - *(_DWORD *)(v3 + 356));
if ( (int)v4 <= 0 )
{
v19 = (GJAccountManager *)GJAccountManager::sharedState(v4);
return GJAccountManager::showAccountNeededAlert(v19, "like comments");
}
v5 = (GameLevelManager *)*(this + 73);
if ( v5 )
{
v6 = *((_DWORD *)v5 + 109);
if ( v6 == 3 )
{
v8 = 0;
v7 = 6;
goto LABEL_12;
}
if ( v6 == 4 )
{
v7 = 7;
goto LABEL_15;
}
v7 = 8;
if ( v6 == 5 )
goto LABEL_15;
}
v7 = 2;
if ( !*((_BYTE *)this + 592) )
{
LABEL_15:
v8 = *((_DWORD *)v5 + 95);
LABEL_12:
v18 = GameLevelManager::sharedState(v5);
result = (unsigned __int8)GameLevelManager::hasLikedItemFullCheck(v18, v7, (*(this + 73))[92], v8);
if ( (_BYTE)result )
return result;
goto LABEL_8;
}
v8 = *((_DWORD *)v5 + 97);
v9 = GameLevelManager::sharedState(v5);
v7 = 3;
result = (unsigned __int8)GameLevelManager::hasLikedItemFullCheck(v9, 3, (*(this + 73))[92], v8);
if ( (_BYTE)result )
return result;
LABEL_8:
v11 = (GameManager *)*(this + 73);
v12 = *((_DWORD *)v11 + 93);
v13 = GameManager::sharedState(v11);
result = (unsigned int)(*(_DWORD *)(v13 + 660) - *(_DWORD *)(v13 + 664));
if ( v12 != (_DWORD)result )
{
v14 = *(this + 73);
v15 = v14[97];
if ( !v15 )
{
LABEL_10:
v16 = (__int64 *)LikeItemLayer::create(v7, v14[92], v8);
v17 = *v16;
v16[84] = (__int64)(this + 69);
return (*(__int64 (**)(void))(v17 + 1312))();
}
v20 = GJAccountManager::sharedState((GJAccountManager *)v14);
result = (unsigned int)(*(_DWORD *)(v20 + 352) - *(_DWORD *)(v20 + 356));
if ( v15 != (_DWORD)result )
{
v14 = *(this + 73);
goto LABEL_10;
}
}
return result;
}