//
// sub_100264D44 from 0x100264d44 to 0x100264ecc (392 bytes)
//
// 2 xrefs:
// > MessagesProfilePage::FLAlert_Clicked @ 0x100264f20
// > sub_100264F30 @ 0x100264f68
//
// 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 11:01:40 +0000
//
__int64 __fastcall sub_100264D44(__int64 a1)
{
__int64 v2; // x0
char *v3; // x1
__int64 result; // x0
__int64 v5; // x21
__int64 v6; // x20
unsigned int *v7; // x9
__int64 v8; // x8
int v9; // w22
_QWORD *v10; // x23
unsigned __int64 v11; // x24
__int64 v12; // x21
__int64 v13; // x0
__int64 v14; // x0
__int64 v15; // x20
__int64 v16; // x0
__int64 v17; // x0
void *__p[2]; // [xsp+8h] [xbp-58h] BYREF
char v19; // [xsp+1Fh] [xbp-41h]
v2 = GameLevelManager::sharedState();
v3 = (char *)(a1 + 704);
if ( *(char *)(a1 + 727) < 0 )
v3 = *(char **)v3;
result = GameLevelManager::getStoredOnlineLevels(v2, v3);
if ( result )
{
v5 = result;
v6 = sub_1002E736C(result);
v7 = *(unsigned int **)(v5 + 56);
v8 = *v7;
if ( (_DWORD)v8 )
{
v9 = 0;
v10 = *((_QWORD **)v7 + 2);
v11 = (unsigned __int64)&v10[v8 - 1];
do
{
v12 = *v10;
if ( !*v10 )
break;
if ( *(_BYTE *)(v12 + 426) == 1 )
{
sub_1002E74E0(v6, *v10);
if ( (*(_BYTE *)(v12 + 424) & 1) == 0 )
{
*(_BYTE *)(v12 + 424) = 1;
++v9;
}
}
++v10;
}
while ( (unsigned __int64)v10 <= v11 );
}
else
{
v9 = 0;
}
result = sub_1002E757C(v6);
if ( (_DWORD)result )
{
*(_QWORD *)(GameLevelManager::sharedState() + 1384) = a1 + 688;
*(_QWORD *)(GameLevelManager::sharedState() + 1360) = a1 + 672;
v13 = GameLevelManager::sharedState();
if ( (unsigned int)sub_1000BF83C(v13, 0, v6, *(unsigned __int8 *)(a1 + 696)) )
{
sub_100009900(__p, "Deleting Messages...");
v14 = UploadActionPopup::create(a1 + 680, __p);
*(_QWORD *)(a1 + 760) = v14;
if ( v19 < 0 )
{
operator delete(__p[0]);
v14 = *(_QWORD *)(a1 + 760);
}
(*(void (__fastcall **)(__int64))(*(_QWORD *)v14 + 1312LL))(v14);
}
if ( v9 >= 1 )
{
v15 = GameLevelManager::sharedState();
v16 = GJAccountManager::sharedState(v15);
v17 = GameLevelManager::userInfoForAccountID(v15, *(_DWORD *)(v16 + 352) - *(_DWORD *)(v16 + 356));
if ( v17 )
*(_DWORD *)(v17 + 692) = (*(_DWORD *)(v17 + 692) - v9) & ~((*(_DWORD *)(v17 + 692) - v9) >> 31);
}
return sub_100264984(a1);
}
}
return result;
}