//
// sub_10040BF50 from 0x10040bf50 to 0x10040c066 (278 bytes)
//
// 4 xrefs:
// > sub_10040C070 @ 0x10040c075
// > sub_10040C080 @ 0x10040c08c
// > sub_10040C0A0 @ 0x10040c0a9
// > sub_10040C0C0 @ 0x10040c0d3
//
// This function is hookable on this platform (idp: pc, 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:30:07 +0000
//
__int64 __fastcall sub_10040BF50(_QWORD *a1)
{
__int64 v2; // rdi
*a1 = off_100B3E0C8;
a1[40] = off_100B3E630;
a1[41] = &off_100B3E6A0;
a1[42] = off_100B3E6B8;
a1[43] = off_100B3E6D8;
a1[44] = off_100B3E700;
a1[51] = off_100B3E730;
a1[54] = off_100B3E7B0;
a1[68] = off_100B3E7D0;
a1[83] = &off_100B3E818;
a1[84] = &off_100B3E830;
a1[85] = off_100B3E848;
v2 = a1[86];
if ( v2 )
cocos2d::CCObject::release(v2);
if ( *(_QWORD **)(GameManager::sharedState() + 944) == a1 + 84 )
*(_QWORD *)(GameManager::sharedState() + 944) = 0;
if ( *(_QWORD **)(GameManager::sharedState() + 1296) == a1 + 85 )
*(_QWORD *)(GameManager::sharedState() + 1296) = 0;
return sub_1004936F0(a1);
}