//
// GameLevelManager::invalidateRequests from 0x80a06c to 0x80a27c (528 bytes)
//
// 7 xrefs:
// > GameLevelManager::onDeleteFriendRequestCompleted @ 0x80e3c8
// > FRequestProfilePage::onUpdate @ 0xa4c52c
// > ProfilePage::onUpdate @ 0xa54a2c
// > ProfilePage::onUpdate @ 0xa54a3c
// > ProfilePage::init @ 0xa5c4fc
// > ProfilePage::init @ 0xa5c50c
// > ??> @ 0xae2f8
//
// 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:47 +0000
//
__int64 __fastcall GameLevelManager::invalidateRequests(GameLevelManager *this, unsigned __int8 a2, unsigned __int8 a3)
{
unsigned int v3; // w25
int v5; // w23
int v6; // w27
const char *FriendRequestKey; // x0
const char *v8; // x28
size_t v9; // x0
size_t v10; // x20
char *v11; // x3
const char *v12; // x1
unsigned __int64 v13; // x22
__int64 v14; // x0
__int64 v16; // [xsp+68h] [xbp+68h] BYREF
size_t v17; // [xsp+70h] [xbp+70h]
void *v18; // [xsp+78h] [xbp+78h]
_QWORD v19[2]; // [xsp+80h] [xbp+80h] BYREF
void *v20; // [xsp+90h] [xbp+90h]
v3 = a2;
v5 = 1;
v6 = a3;
while ( 1 )
{
v19[0] = 0;
v19[1] = 0;
v20 = nullptr;
FriendRequestKey = (const char *)GameLevelManager::getFriendRequestKey(
(__int64)this,
v3,
v5 - 1,
(unsigned __int8 *)v19,
0);
v16 = 0;
v8 = FriendRequestKey;
v17 = 0;
v18 = nullptr;
v9 = strlen(FriendRequestKey);
v10 = v9;
if ( v9 > 0xFFFFFFFFFFFFFFEFLL )
sub_62C79C();
if ( v9 > 0x16 )
{
v13 = (v9 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v11 = (char *)operator new(v13);
v18 = v11;
v17 = v10;
v16 = v13 | 1;
LABEL_12:
*((_BYTE *)memcpy(v11, v8, v10) + v10) = 0;
if ( (v19[0] & 1) == 0 )
goto LABEL_6;
goto LABEL_13;
}
LOBYTE(v16) = 2 * v9;
v11 = (char *)&v16 + 1;
if ( v9 )
goto LABEL_12;
BYTE1(v16) = 0;
if ( (v19[0] & 1) == 0 )
goto LABEL_6;
LABEL_13:
operator delete(v20);
LABEL_6:
v12 = (char *)&v16 + 1;
if ( (v16 & 1) != 0 )
v12 = (const char *)v18;
if ( !GameLevelManager::getStoredOnlineLevels(this, v12) )
break;
cocos2d::CCDictionary::removeObjectForKey(*((_QWORD *)this + 130), &v16);
++v5;
if ( (v16 & 1) != 0 )
operator delete(v18);
}
if ( (v16 & 1) != 0 )
{
operator delete(v18);
GameLevelManager::purgeFriendRequestSearchCache((cocos2d::CCDictionary **)this, v3, 0);
if ( v3 )
goto LABEL_16;
LABEL_22:
GameLevelManager::dropIgnoredRequestLists((cocos2d::CCDictionary **)this);
goto LABEL_16;
}
GameLevelManager::purgeFriendRequestSearchCache((cocos2d::CCDictionary **)this, v3, 0);
if ( !v3 )
goto LABEL_22;
LABEL_16:
if ( v6 )
{
v14 = *((_QWORD *)this + 172);
if ( v14 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v14 + 24LL))(v14, v3);
}
return _stack_chk_guard;
}