//
// GameLevelManager::onDeleteUserMessagesCompleted from 0x14015b920 to 0x14015bae1 (449 bytes)
//
// 2 xrefs:
// > GameLevelManager::handleIt @ 0x140143936
// > ??> @ 0x1406caa40
//
// 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=3
void __fastcall GameLevelManager::onDeleteUserMessagesCompleted(GameLevelManager *a1, const void **a2, _QWORD *a3)
{
_BYTE *v6; // rbx
size_t v7; // r8
GameLevelManager *v8; // rcx
void *v9; // rcx
unsigned int SplitIntFromKey; // ebp
GameLevelManager *v11; // rcx
bool v12; // r15
const void *v13; // rcx
unsigned __int64 v14; // rbx
size_t v15; // r8
UploadActionDelegate *v16; // rcx
UploadActionDelegate *m_uploadActionDelegate; // rcx
void *Block[2]; // [rsp+30h] [rbp-68h] BYREF
__int128 v19; // [rsp+40h] [rbp-58h]
v6 = a3;
if ( a3[3] > 0xFu )
v6 = (_BYTE *)*a3;
*(_OWORD *)Block = 0;
v19 = 0;
v7 = -1;
do
++v7;
while ( v6[v7] );
sub_14003A930(Block, v6, v7);
cocos2d::CCDictionary::removeObjectForKey(a1->m_friendReqAndUserBlocks, Block);
if ( *((_QWORD *)&v19 + 1) > 0xFu )
{
v9 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v19 + 1) + 1LL) >= 0x1000 )
{
v9 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v9 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v9);
}
SplitIntFromKey = GameLevelManager::getSplitIntFromKey(v8, v6, 1);
v12 = GameLevelManager::getSplitIntFromKey(v11, v6, 2) != 0;
*(_OWORD *)Block = 0;
*(_QWORD *)&v19 = 2;
*((_QWORD *)&v19 + 1) = 15;
strcpy((char *)Block, "-1");
v13 = a2;
if ( (unsigned __int64)a2[3] > 0xF )
v13 = *a2;
v14 = (unsigned __int64)a2[2];
v15 = v14;
if ( v14 > 2 )
v15 = 2;
if ( !memcmp(v13, Block, v15) && v14 == 2 )
{
m_uploadActionDelegate = a1->m_uploadActionDelegate;
if ( m_uploadActionDelegate )
m_uploadActionDelegate->uploadActionFailed(m_uploadActionDelegate, SplitIntFromKey, 39);
}
else
{
v16 = a1->m_uploadActionDelegate;
if ( v16 )
v16->uploadActionFinished(v16, SplitIntFromKey, 39);
if ( SplitIntFromKey == -1 )
GameLevelManager::invalidateMessages(a1, v12, 1);
else
GameLevelManager::messageWasRemoved(a1, SplitIntFromKey, v12);
}
sub_14003A830((__int64)a2);
sub_14003A830((__int64)a3);
}