//
// sub_100508DF8 from 0x100508df8 to 0x100508eec (244 bytes)
//
// 4 xrefs:
// > NewThreadPopup::dNewThreadPopup @ 0x100508ef0
// > sub_100508EF4 @ 0x100508ef8
// > sub_100508EFC @ 0x100508f04
// > sub_100508F10 @ 0x100508f1c
//
// 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:58 +0000
//
__int64 __fastcall sub_100508DF8(__int64 a1)
{
__int64 v2; // x8
__int64 v3; // x8
_DWORD *v4; // x0
*(_QWORD *)a1 = off_1009984C0;
*(_QWORD *)(a1 + 320) = off_100998A78;
*(_QWORD *)(a1 + 328) = &off_100998AE8;
*(_QWORD *)(a1 + 336) = off_100998B00;
*(_QWORD *)(a1 + 344) = off_100998B20;
*(_QWORD *)(a1 + 352) = off_100998B48;
*(_QWORD *)(a1 + 408) = off_100998B78;
*(_QWORD *)(a1 + 432) = off_100998BF8;
*(_QWORD *)(a1 + 544) = off_100998C18;
*(_QWORD *)(a1 + 664) = off_100998C60;
*(_QWORD *)(a1 + 672) = off_100998CE0;
*(_QWORD *)(a1 + 680) = off_100998D38;
*(_QWORD *)(a1 + 688) = off_100998D60;
if ( *(_QWORD *)(GameLevelManager::sharedState() + 1264) == a1 + 664 )
*(_QWORD *)(GameLevelManager::sharedState() + 1264) = 0;
v2 = *(_QWORD *)(a1 + 880);
if ( v2 )
*(_QWORD *)(v2 + 584) = 0;
v3 = *(_QWORD *)(a1 + 888);
if ( v3 )
*(_QWORD *)(v3 + 584) = 0;
v4 = *(_DWORD **)(a1 + 728);
if ( v4 )
cocos2d::CCObject::release(v4);
if ( *(char *)(a1 + 935) < 0 )
operator delete(*(void **)(a1 + 912));
if ( *(char *)(a1 + 807) < 0 )
operator delete(*(void **)(a1 + 784));
if ( *(char *)(a1 + 727) < 0 )
operator delete(*(void **)(a1 + 704));
return sub_10034A834(a1);
}