//
// sub_10039E684 from 0x10039e684 to 0x10039e744 (192 bytes)
//
// 4 xrefs:
// > GJGarageLayer::dGJGarageLayer @ 0x10039e748
// > sub_10039E74C @ 0x10039e750
// > sub_10039E754 @ 0x10039e75c
// > sub_10039E768 @ 0x10039e774
//
// 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:03:45 +0000
//
__int64 __fastcall sub_10039E684(__int64 a1)
{
_DWORD *v2; // x0
_DWORD *v3; // x0
__int64 v4; // x0
*(_QWORD *)a1 = off_100943DB8;
*(_QWORD *)(a1 + 320) = off_100944298;
*(_QWORD *)(a1 + 328) = &off_100944308;
*(_QWORD *)(a1 + 336) = off_100944320;
*(_QWORD *)(a1 + 344) = &off_100944340;
*(_QWORD *)(a1 + 352) = off_100944368;
*(_QWORD *)(a1 + 408) = off_100944398;
*(_QWORD *)(a1 + 416) = &off_1009443E0;
*(_QWORD *)(a1 + 424) = &off_1009443F8;
*(_QWORD *)(a1 + 432) = &off_100944410;
*(_QWORD *)(a1 + 440) = &off_100944428;
*(_QWORD *)(a1 + 448) = off_100944440;
*(_QWORD *)(a1 + 456) = off_100944460;
*(_QWORD *)(GameManager::sharedState(a1) + 936) = 0;
v2 = *(_DWORD **)(a1 + 480);
if ( v2 )
cocos2d::CCObject::release(v2);
v3 = *(_DWORD **)(a1 + 488);
if ( v3 )
v3 = cocos2d::CCObject::release(v3);
v4 = GameManager::sharedState(v3);
if ( *(_QWORD *)(v4 + 1296) == a1 + 456 )
*(_QWORD *)(GameManager::sharedState(v4) + 1296) = 0;
sub_1000187C4(a1 + 520, *(_QWORD **)(a1 + 528));
return cocos2d::CCLayer::dCCLayer((_QWORD *)a1);
}