//
// sub_1005045C0 from 0x1005045c0 to 0x100504730 (368 bytes)
//
// 4 xrefs:
// > GJRateLevelLayer::dGJRateLevelLayer @ 0x100504745
// > sub_100504750 @ 0x10050475c
// > sub_100504770 @ 0x100504779
// > sub_100504790 @ 0x1005047a3
//
// 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:31:31 +0000
//
__int64 __fastcall sub_1005045C0(_QWORD *a1, double a2)
{
_DWORD *v3; // rdi
_DWORD *v4; // rdi
_DWORD *v5; // rdi
*a1 = off_100B65348;
a1[40] = off_100B65968;
a1[41] = &off_100B659D8;
a1[42] = off_100B659F0;
a1[43] = off_100B65A10;
a1[44] = off_100B65A38;
a1[51] = off_100B65A68;
a1[54] = off_100B65AE8;
a1[68] = off_100B65B08;
a1[83] = &off_100B65B50;
a1[84] = off_100B65B68;
a1[127] = &off_100B65B88;
a1[128] = off_100B65BA0;
a1[129] = off_100B65BC0;
a1[130] = &off_100B65BE0;
if ( *(_QWORD **)(GameLevelManager::sharedState(a2) + 1360) == a1 + 128 )
*(_QWORD *)(GameLevelManager::sharedState(a2) + 1360) = 0;
if ( *(_QWORD **)(GameLevelManager::sharedState(a2) + 1464) == a1 + 129 )
{
*(_QWORD *)(GameLevelManager::sharedState(a2) + 1464) = 0;
v3 = (_DWORD *)a1[134];
if ( !v3 )
goto LABEL_8;
goto LABEL_7;
}
v3 = (_DWORD *)a1[134];
if ( v3 )
LABEL_7:
cocos2d::CCObject::release(v3);
LABEL_8:
v4 = (_DWORD *)a1[131];
if ( v4 )
cocos2d::CCObject::release(v4);
v5 = (_DWORD *)a1[140];
if ( v5 )
cocos2d::CCObject::release(v5);
return SetupTriggerPopup::dSetupTriggerPopup((__int64)a1);
}