//
// sub_1005018F0 from 0x1005018f0 to 0x1005019e0 (240 bytes)
//
// 2 xrefs:
// > sub_100502260 @ 0x10050228c
// > ThreadMessageOptionsPopup::FLAlert_Clicked @ 0x1005023b8
//
// 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:06:54 +0000
//
void __fastcall sub_1005018F0(__int64 a1, __int64 a2)
{
int v4; // w23
__int64 v5; // x21
int v6; // w22
char v7; // w0
void *v8; // x0
char *CString; // x0
char v10; // w21
void *__p[2]; // [xsp+8h] [xbp-48h] BYREF
char v12; // [xsp+1Fh] [xbp-31h]
if ( a2 >= 1 && !*(_QWORD *)(a1 + 1096) )
{
v4 = *(unsigned __int8 *)(a1 + 791);
v5 = GameLevelManager::sharedState();
v6 = *(_DWORD *)(*(_QWORD *)(a1 + 752) + 56LL);
if ( v4 == 1 )
{
sub_100009900(__p, "deleteMessage");
v7 = sub_1000C4290(v5, v6, (const char *)__p, a2);
}
else
{
v8 = sub_1003065B0("%lli", a2);
CString = (char *)cocos2d::CCString::getCString((__int64)v8);
sub_100009900(__p, CString);
v7 = sub_1000C8838(v5, v6, 12, (__int64)__p);
}
v10 = v7;
if ( v12 < 0 )
{
operator delete(__p[0]);
if ( (v10 & 1) == 0 )
return;
}
else if ( (v7 & 1) == 0 )
{
return;
}
*(_QWORD *)(a1 + 1096) = a2;
*(_QWORD *)(GameLevelManager::sharedState() + 1264) = a1 + 672;
}
}