//
// CustomSongLayer::dropDownLayerWillClose from 0x1401652f0 to 0x1401653c5 (213 bytes)
//
// 4 xrefs:
// > ??> @ 0x140742f30
// > ??> @ 0x14089bf4c
// > ??> @ 0x14089bf5c
// > ??> @ 0x140917ea0
//
// 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 11:27:26 +0000
//
void __fastcall CustomSongLayer::dropDownLayerWillClose(__int64 a1, __int64 a2)
{
unsigned int v3; // eax
__int64 v4; // rax
__int64 v5; // rbx
cocos2d::CCObject *v6; // rdi
__int64 v7; // rcx
cocos2d::CCObject *v8; // rax
cocos2d::CCObject *v9; // rcx
int v10; // ecx
if ( *(_BYTE *)(a2 + 632) )
{
(***(void (__fastcall ****)(_QWORD, _QWORD))(a1 + 16))(*(_QWORD *)(a1 + 16), *(unsigned int *)(a2 + 628));
v3 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 16) + 8LL))(*(_QWORD *)(a1 + 16));
v4 = SongInfoObject::create_1(v3);
v5 = *(_QWORD *)(a1 + 32);
v6 = (cocos2d::CCObject *)v4;
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v5 + 376) + 336LL))(*(_QWORD *)(v5 + 376), 0);
v7 = *(_QWORD *)(v5 + 480);
if ( v7 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v7 + 336LL))(v7, 0);
v8 = *(cocos2d::CCObject **)(v5 + 336);
if ( v8 != v6 )
{
if ( v6 )
cocos2d::CCObject::retain(v6);
v9 = *(cocos2d::CCObject **)(v5 + 336);
if ( v9 )
cocos2d::CCObject::release(v9);
*(_QWORD *)(v5 + 336) = v6;
v8 = v6;
}
if ( v8 )
v10 = *((_DWORD *)v8 + 80);
else
v10 = 0;
*(_DWORD *)(v5 + 504) = v10;
CustomSongWidget::updateSongInfo(v5);
}
}