//
// CustomSongLayer::onCreateLines from 0x140165200 to 0x1401652e8 (232 bytes)
//
// 3 xrefs:
// > CustomSongLayer::init @ 0x14016425a
// > ??> @ 0x140917e88
// > ??> @ 0x140917e94
//
// 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
//
// Hidden C++ exception states: #wind=3
__int64 __fastcall CustomSongLayer::onCreateLines(__int64 a1)
{
_QWORD *v2; // rbx
__int64 v3; // rcx
__int64 v4; // rdi
__int64 GuidelinesLayer; // rax
cocos2d::CCObject *v6; // rbx
void *v8; // [rsp+30h] [rbp+8h]
void *v9; // [rsp+30h] [rbp+8h]
v2 = (_QWORD *)qword_14090BF60;
if ( !qword_14090BF60 )
{
v8 = operator new(0x8A8u);
qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v8);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);
v2 = (_QWORD *)qword_14090BF60;
}
v3 = v2[69];
if ( v3 )
FMOD::ChannelControl::stop(v3);
sub_14003EB60(v2 + 137);
sub_14003EB60(v2 + 145);
sub_14003EB60(v2 + 153);
v4 = *(_QWORD *)(a1 + 680);
v9 = operator new(0x300u);
GuidelinesLayer = CreateGuidelinesLayer::CreateGuidelinesLayer((__int64)v9);
v6 = (cocos2d::CCObject *)GuidelinesLayer;
if ( GuidelinesLayer )
{
if ( CreateGuidelinesLayer::init(GuidelinesLayer, v4, 0) )
{
cocos2d::CCObject::autorelease(v6);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v6 + 8LL))(v6, 1);
v6 = nullptr;
}
}
return (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v6 + 1064LL))(v6);
}