//
// GameLevelManager::messageWasRemoved from 0x80905c to 0x8091c8 (364 bytes)
//
// 2 xrefs:
// > GameLevelManager::onDeleteUserMessagesCompleted @ 0x80dd24
// > ??> @ 0xf0988
//
// 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:54:46 +0000
//
__int64 __fastcall GameLevelManager::messageWasRemoved(GameLevelManager *this, int a2, unsigned __int8 a3)
{
int v6; // w24
char *MessagesKey; // x23
cocos2d::CCArray *StoredOnlineLevels; // x20
unsigned int i; // w19
void (__fastcall ***v10)(_QWORD, cocos2d::CCArray *, char *); // x0
size_t v12; // x0
__int64 v13; // x20
__int64 v14[2]; // [xsp+50h] [xbp+50h] BYREF
void *v15; // [xsp+60h] [xbp+60h]
v6 = 0;
LABEL_2:
MessagesKey = (char *)GameLevelManager::getMessagesKey(this, a3);
StoredOnlineLevels = (cocos2d::CCArray *)GameLevelManager::getStoredOnlineLevels(this, MessagesKey);
if ( StoredOnlineLevels )
{
for ( i = 0; ; ++i )
{
if ( i >= (unsigned int)cocos2d::CCArray::count(StoredOnlineLevels) )
{
++v6;
goto LABEL_2;
}
if ( *(_DWORD *)(cocos2d::CCArray::objectAtIndex(StoredOnlineLevels, i) + 316) == a2 )
break;
}
cocos2d::CCArray::removeObjectAtIndex(StoredOnlineLevels, i, 1);
v10 = *((void (__fastcall ****)(_QWORD, cocos2d::CCArray *, char *))this + 173);
if ( v10 )
{
(**v10)(v10, StoredOnlineLevels, MessagesKey);
if ( !(unsigned int)cocos2d::CCArray::count(StoredOnlineLevels) )
{
v14[0] = 0;
v14[1] = 0;
v15 = nullptr;
v12 = strlen(MessagesKey);
v13 = *((_QWORD *)this + 130);
std::string::__init(v14, MessagesKey, v12);
cocos2d::CCDictionary::removeObjectForKey(v13, v14);
if ( (v14[0] & 1) != 0 )
operator delete(v15);
}
}
}
return _stack_chk_guard;
}