//
// sub_10054AF84 from 0x10054af84 to 0x10054b0d4 (336 bytes)
//
// 2 xrefs:
// > AccountReviewPopup::FLAlert_Clicked @ 0x10054ab84
// > AccountReviewPopup::FLAlert_Clicked @ 0x10054ac90
//
// 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:07:50 +0000
//
__int64 __fastcall sub_10054AF84(__int64 a1, signed int a2)
{
__int64 result; // x0
__int64 v5; // x0
__int64 v6; // x19
int v7; // w8
int v9; // w20
__int64 v10; // x0
__int64 v11; // x21
int v12; // w22
char v13; // w21
int v14; // w2
void *__p[2]; // [xsp+8h] [xbp-38h] BYREF
char v16; // [xsp+1Fh] [xbp-21h]
if ( *(_DWORD *)(a1 + 1236) )
return 0;
result = 0;
if ( (a2 & 0x80000000) == 0 && *(_QWORD *)(a1 + 1312) )
{
if ( (int)sub_1002E757C(*(_QWORD *)(a1 + 1312)) > a2 )
{
v5 = sub_1002E75A0(*(_QWORD *)(a1 + 1312), a2);
if ( *(_BYTE *)(v5 + 104) == 1 )
{
v6 = v5;
v7 = *(_DWORD *)(v5 + 56);
if ( (unsigned int)(v7 - 3) < 2 || v7 == 7 )
{
*(_QWORD *)(GameLevelManager::sharedState() + 1248) = a1 + 784;
v9 = *(_DWORD *)(v6 + 56);
v10 = GameLevelManager::sharedState();
if ( v9 == 4 )
{
sub_1000C25A8(v10, *(_DWORD *)(v6 + 64), *(_DWORD *)(v6 + 60));
}
else
{
if ( *(_DWORD *)(v6 + 56) == 7 )
v14 = 6;
else
v14 = 0;
sub_1000C2180(v10, *(_DWORD *)(v6 + 60), v14, *(_DWORD *)(v6 + 64));
}
}
else
{
if ( v7 != 8 || *(__int64 *)(v5 + 168) < 1 )
return 0;
v11 = GameLevelManager::sharedState();
v12 = *(_DWORD *)(v6 + 60);
sub_100009900(__p, "deleteMessage");
v13 = sub_1000C4290(v11, v12, (const char *)__p, *(_QWORD *)(v6 + 168));
if ( v16 < 0 )
operator delete(__p[0]);
if ( (v13 & 1) == 0 )
return 0;
*(_QWORD *)(GameLevelManager::sharedState() + 1264) = a1 + 832;
++*(_DWORD *)(a1 + 1260);
}
*(_BYTE *)(v6 + 104) = 0;
return 1;
}
}
return 0;
}
return result;
}