//
// GameLevelManager::hasLikedAccountItem from 0x140164e10 to 0x140164eeb (219 bytes)
//
// 9 xrefs:
// > GameLevelManager::hasLikedItemFullCheck @ 0x140164dab
// > GameLevelManager::hasLikedItemFullCheck @ 0x140164dc3
// > GameLevelManager::hasLikedItemFullCheck @ 0x140164dcf
// > GameLevelManager::hasLikedItemFullCheck @ 0x140164de9
// > LevelInfoLayer::updateSideButtons @ 0x1402fea76
// > LevelInfoLayer::updateSideButtons @ 0x1402fea94
// > LevelListLayer::updateSideButtons @ 0x140307c2e
// > LevelListLayer::updateSideButtons @ 0x140307c4c
// > ??> @ 0x1406cacb0
//
// 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
//
// Hidden C++ exception states: #wind=1
bool GameLevelManager::hasLikedAccountItem(GameLevelManager *a1, LikeItemType a2, int a3, bool a4, int a5)
{
cocos2d::CCString *v6; // rax
const char *CString; // rax
size_t v8; // r8
bool v9; // bl
void *v10; // rcx
void *Block[2]; // [rsp+30h] [rbp-38h] BYREF
__int128 v14; // [rsp+40h] [rbp-28h]
v6 = cocos2d::CCString::createWithFormat("like_%i_%i_%i_%i", a2, a3, a4, a5);
CString = cocos2d::CCString::getCString(v6);
*(_OWORD *)Block = 0;
v14 = 0;
v8 = -1;
do
++v8;
while ( CString[v8] );
sub_14003A930(Block, CString, v8);
v9 = cocos2d::CCDictionary::objectForKey(a1->m_likedLevels, Block) != 0;
if ( *((_QWORD *)&v14 + 1) > 0xFu )
{
v10 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v14 + 1) + 1LL) >= 0x1000 )
{
v10 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v10 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v10);
}
return v9;
}