{"type": "func", "start": 5369512880, "end": 5369513085, "name": "CustomSongLayer::onClose", "pseudocode": "// \n// CustomSongLayer::onClose from 0x1400c43b0 to 0x1400c447d (205 bytes)\n// \n// 4 xrefs:\n// > CustomSongLayer::keyBackClicked @ 0x1400c4489\n// > CustomSongLayer::init @ 0x1400c2e6c\n// > <???> @ 0x1406c80d0\n// > <???> @ 0x1406c80dc\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\n// Hidden C++ exception states: #wind=2\nvoid CustomSongLayer::onClose(CustomSongLayer *a1, cocos2d::CCObject *a2)\n{\n  CustomSongLayerDelegate *m_delegate; // rcx\n  __int64 v4; // rbx\n  _BOOL8 v5; // rdx\n  FMODAudioEngine *v6; // [rsp+30h] [rbp+8h]\n\n  m_delegate = a1->m_delegate;\n  if ( m_delegate )\n    ((void (__fastcall *)(CustomSongLayerDelegate *, cocos2d::CCObject *))m_delegate->customSongLayerClosed)(\n      m_delegate,\n      a2);\n  a1->m_songIDInput->onClickTrackNode(a1->m_songIDInput, 0);\n  v4 = qword_1406C2E88;\n  if ( !qword_1406C2E88 )\n  {\n    v6 = (FMODAudioEngine *)operator new(0x888u);\n    qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v6);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);\n    v4 = qword_1406C2E88;\n  }\n  if ( *(_QWORD *)(v4 + 552) )\n    FMOD::ChannelControl::stop(*(FMOD::ChannelControl **)(v4 + 552));\n  sub_14005E0D0((_QWORD *)(v4 + 1064));\n  sub_14005E0D0((_QWORD *)(v4 + 1128));\n  sub_14005E0D0((_QWORD *)(v4 + 1192));\n  a1->setKeypadEnabled(a1, 0);\n  LOBYTE(v5) = 1;\n  a1->removeFromParentAndCleanup(a1, v5);\n}", "assembly": "; \n; CustomSongLayer::onClose from 0x1400c43b0 to 0x1400c447d (205 bytes)\n; \n; 4 xrefs:\n; > CustomSongLayer::keyBackClicked @ 0x1400c4489\n; > CustomSongLayer::init @ 0x1400c2e6c\n; > <???> @ 0x1406c80d0\n; > <???> @ 0x1406c80dc\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1400c43b0\npush    rdi                                                            ; +0x5, 0x1400c43b5\nsub     rsp, 20h                                                       ; +0x6, 0x1400c43b6\nmov     rdi, rcx                                                       ; +0xa, 0x1400c43ba\nmov     rcx, [rcx+2A8h]                                                ; +0xd, 0x1400c43bd\ntest    rcx, rcx                                                       ; +0x14, 0x1400c43c4\njz      short loc_1400C43CE                                            ; +0x17, 0x1400c43c7\nmov     rax, [rcx]                                                     ; +0x19, 0x1400c43c9\ncall    qword ptr [rax]                                                ; +0x1c, 0x1400c43cc\nmov     rcx, [rdi+298h]                                                ; +0x1e, 0x1400c43ce\nmov     rax, [rcx]                                                     ; +0x25, 0x1400c43d5\nxor     edx, edx                                                       ; +0x28, 0x1400c43d8\ncall    qword ptr [rax+3F8h]                                           ; +0x2a, 0x1400c43da\nmov     rbx, cs:qword_1406C2E88                                        ; +0x30, 0x1400c43e0\ntest    rbx, rbx                                                       ; +0x37, 0x1400c43e7\njnz     short loc_1400C441B                                            ; +0x3a, 0x1400c43ea\nmov     ecx, 888h; Size                                                ; +0x3c, 0x1400c43ec\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x41, 0x1400c43f1\nmov     [rsp+28h+arg_0], rax                                           ; +0x46, 0x1400c43f6\nmov     rcx, rax                                                       ; +0x4b, 0x1400c43fb\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0x4e, 0x1400c43fe\nnop                                                                    ; +0x53, 0x1400c4403\nmov     cs:qword_1406C2E88, rax                                        ; +0x54, 0x1400c4404\nmov     rdx, [rax]                                                     ; +0x5b, 0x1400c440b\nmov     rcx, rax                                                       ; +0x5e, 0x1400c440e\ncall    qword ptr [rdx+48h]                                            ; +0x61, 0x1400c4411\nmov     rbx, cs:qword_1406C2E88                                        ; +0x64, 0x1400c4414\ncmp     qword ptr [rbx+228h], 0                                        ; +0x6b, 0x1400c441b\njz      short loc_1400C4432                                            ; +0x73, 0x1400c4423\nmov     rcx, [rbx+228h]                                                ; +0x75, 0x1400c4425\ncall    cs:?stop@ChannelControl@FMOD@@QEAA?AW4FMOD_RESULT@@XZ; FMOD::ChannelControl::stop(void) ; +0x7c, 0x1400c442c\nlea     rcx, [rbx+428h]                                                ; +0x82, 0x1400c4432\ncall    sub_14005E0D0                                                  ; +0x89, 0x1400c4439\nlea     rcx, [rbx+468h]                                                ; +0x8e, 0x1400c443e\ncall    sub_14005E0D0                                                  ; +0x95, 0x1400c4445\nlea     rcx, [rbx+4A8h]                                                ; +0x9a, 0x1400c444a\ncall    sub_14005E0D0                                                  ; +0xa1, 0x1400c4451\nmov     rax, [rdi]                                                     ; +0xa6, 0x1400c4456\nxor     edx, edx                                                       ; +0xa9, 0x1400c4459\nmov     rcx, rdi                                                       ; +0xab, 0x1400c445b\ncall    qword ptr [rax+3D0h]                                           ; +0xae, 0x1400c445e\nmov     rax, [rdi]                                                     ; +0xb4, 0x1400c4464\nmov     dl, 1                                                          ; +0xb7, 0x1400c4467\nmov     rcx, rdi                                                       ; +0xb9, 0x1400c4469\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xbc, 0x1400c446c\nadd     rsp, 20h                                                       ; +0xc1, 0x1400c4471\npop     rdi                                                            ; +0xc5, 0x1400c4475\njmp     qword ptr [rax+1F8h]                                           ; +0xc6, 0x1400c4476", "xrefs": ["CustomSongLayer::keyBackClicked @ 0x1400c4489", "CustomSongLayer::init @ 0x1400c2e6c", "<???> @ 0x1406c80d0", "<???> @ 0x1406c80dc"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}