//
// CustomSongWidget::dCustomSongWidget from 0x140168f60 to 0x140169054 (244 bytes)
//
// 2 xrefs:
// > ??> @ 0x140744918
// > ??> @ 0x14091805c
//
// 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:28 +0000
//
// Hidden C++ exception states: #wind=1
char *__fastcall CustomSongWidget::dCustomSongWidget(char *Block, char a2)
{
__int64 v4; // rcx
void *v5; // rax
cocos2d::CCObject *v6; // rcx
*(_QWORD *)Block = &CustomSongWidget::`vftable';
*((_QWORD *)Block + 40) = &CustomSongWidget::`vftable';
*((_QWORD *)Block + 41) = &CustomSongWidget::`vftable';
v4 = qword_14090C070;
if ( !qword_14090C070 )
{
v5 = operator new(0x3D0u);
qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v5);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);
v4 = qword_14090C070;
}
MusicDownloadManager::removeMusicDownloadDelegate(v4, Block + 320);
v6 = *((cocos2d::CCObject **)Block + 42);
if ( v6 )
cocos2d::CCObject::release(v6);
sub_1400BD560((void **)Block + 77, (__int64)(Block + 616));
sub_1400C6AA0((__int64)(Block + 584));
sub_140080450((void **)Block + 71);
sub_140080450((void **)Block + 69);
cocos2d::CCNode::~CCNode((cocos2d::CCNode *)Block);
if ( (a2 & 1) != 0 )
j_j_free(Block);
return Block;
}