//
// sub_100513C28 from 0x100513c28 to 0x100513d08 (224 bytes)
//
// 2 xrefs:
// > ThreadDescPopup::threadUpdateFinished @ 0x100513de8
// > ThreadDescPopup::threadUpdateFinished @ 0x100513e20
//
// 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:04 +0000
//
__int64 __fastcall sub_100513C28(__int64 a1, char *a2)
{
__int64 v4; // x20
_QWORD *v5; // x0
__int64 v6; // x0
__int64 v7; // x8
__int64 v8; // x8
void *__p[2]; // [xsp+0h] [xbp-50h] BYREF
char v11; // [xsp+17h] [xbp-39h]
void *v12[2]; // [xsp+18h] [xbp-38h] BYREF
char v13; // [xsp+2Fh] [xbp-21h]
*(_BYTE *)(a1 + 1113) = 0;
v4 = *(_QWORD *)(cocos2d::CCDirector::sharedDirector() + 272);
sub_100009900(v12, a2);
sub_100009900(__p, "");
v5 = TextAlertPopup::create((__int64)v12, 150, (__int64)__p, 0.5, 0.6);
(*(void (__fastcall **)(__int64, _QWORD *, __int64))(*(_QWORD *)v4 + 464LL))(v4, v5, 1000);
if ( v11 < 0 )
operator delete(__p[0]);
if ( v13 < 0 )
operator delete(v12[0]);
if ( *(_QWORD *)(a1 + 1040) )
{
v6 = GameLevelManager::sharedState();
v7 = *(_QWORD *)(a1 + 1040);
if ( v7 )
v8 = v7 + 672;
else
v8 = 0;
*(_QWORD *)(v6 + 1264) = v8;
}
return (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1368LL))(a1, 0);
}