//
// GameLevelManager::messageWasRemoved from 0x3c178c to 0x3c1858 (204 bytes)
//
// 1 xrefs:
// > GameLevelManager::onDeleteUserMessagesCompleted @ 0x3c1d92
//
// 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 GameLevelManager::messageWasRemoved(GameLevelManager *a1, int a2, bool a3)
{
int v6; // r8
char *MessagesKey; // r9
cocos2d::CCArray *StoredOnlineLevels; // r4
int v9; // r3
unsigned int i; // r6
int v11; // r6
MessageListDelegate *m_messageListDelegate; // r0
cocos2d::CCDictionary *m_storedLevels; // [sp+4h] [bp-18h]
_BYTE v14[4]; // [sp+10h] [bp-Ch] BYREF
v6 = 0;
do
{
MessagesKey = (char *)GameLevelManager::getMessagesKey(a1, a3, v6);
StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(a1, MessagesKey);
if ( StoredOnlineLevels )
{
for ( i = 0; i < cocos2d::CCArray::count(StoredOnlineLevels); ++i )
{
if ( *(_DWORD *)(cocos2d::CCArray::objectAtIndex(StoredOnlineLevels, i) + 264) == a2 )
{
cocos2d::CCArray::removeObjectAtIndex(StoredOnlineLevels, i, 1);
v9 = 1;
goto LABEL_8;
}
}
v9 = 0;
v11 = 1;
}
else
{
v9 = 0;
LABEL_8:
v11 = 0;
}
++v6;
if ( v9 )
{
m_messageListDelegate = a1->m_messageListDelegate;
if ( m_messageListDelegate )
{
m_messageListDelegate->loadMessagesFinished(
m_messageListDelegate,
StoredOnlineLevels,
(const unsigned __int8 *)MessagesKey);
if ( !cocos2d::CCArray::count(StoredOnlineLevels) )
{
m_storedLevels = a1->m_storedLevels;
sub_776584((int)v14, MessagesKey);
cocos2d::CCDictionary::removeObjectForKey(m_storedLevels);
sub_774008(v14);
}
}
}
}
while ( v11 );
}