{"type": "func", "start": 5370172592, "end": 5370172795, "name": "CustomSongLayer::onClose", "pseudocode": "// \n// CustomSongLayer::onClose from 0x1401654b0 to 0x14016557b (203 bytes)\n// \n// 3 xrefs:\n// > CustomSongLayer::keyBackClicked @ 0x140165589\n// > CustomSongLayer::init @ 0x140163ecf\n// > <???> @ 0x140917ee8\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:27:26 +0000\n// \n\n// Hidden C++ exception states: #wind=2\n__int64 __fastcall CustomSongLayer::onClose(__int64 a1)\n{\n  void (__fastcall ***v2)(_QWORD); // rcx\n  _QWORD *v3; // rbx\n  __int64 v4; // rcx\n  __int64 v5; // rdx\n  void *v7; // [rsp+30h] [rbp+8h]\n\n  v2 = *(void (__fastcall ****)(_QWORD))(a1 + 704);\n  if ( v2 )\n    (**v2)(v2);\n  (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 688) + 1032LL))(*(_QWORD *)(a1 + 688), 0);\n  v3 = (_QWORD *)qword_14090BF60;\n  if ( !qword_14090BF60 )\n  {\n    v7 = operator new(0x8A8u);\n    qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v7);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);\n    v3 = (_QWORD *)qword_14090BF60;\n  }\n  v4 = v3[69];\n  if ( v4 )\n    FMOD::ChannelControl::stop(v4);\n  sub_14003EB60(v3 + 137);\n  sub_14003EB60(v3 + 145);\n  sub_14003EB60(v3 + 153);\n  (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 992LL))(a1, 0);\n  LOBYTE(v5) = 1;\n  return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 520LL))(a1, v5);\n}", "assembly": "; \n; CustomSongLayer::onClose from 0x1401654b0 to 0x14016557b (203 bytes)\n; \n; 3 xrefs:\n; > CustomSongLayer::keyBackClicked @ 0x140165589\n; > CustomSongLayer::init @ 0x140163ecf\n; > <???> @ 0x140917ee8\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:27:26 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1401654b0\npush    rdi                                                            ; +0x5, 0x1401654b5\nsub     rsp, 20h                                                       ; +0x6, 0x1401654b6\nmov     rdi, rcx                                                       ; +0xa, 0x1401654ba\nmov     rcx, [rcx+2C0h]                                                ; +0xd, 0x1401654bd\ntest    rcx, rcx                                                       ; +0x14, 0x1401654c4\njz      short loc_1401654CE                                            ; +0x17, 0x1401654c7\nmov     rax, [rcx]                                                     ; +0x19, 0x1401654c9\ncall    qword ptr [rax]                                                ; +0x1c, 0x1401654cc\nmov     rcx, [rdi+2B0h]                                                ; +0x1e, 0x1401654ce\nmov     rax, [rcx]                                                     ; +0x25, 0x1401654d5\nxor     edx, edx                                                       ; +0x28, 0x1401654d8\ncall    qword ptr [rax+408h]                                           ; +0x2a, 0x1401654da\nmov     rbx, cs:qword_14090BF60                                        ; +0x30, 0x1401654e0\ntest    rbx, rbx                                                       ; +0x37, 0x1401654e7\njnz     short loc_14016551E                                            ; +0x3a, 0x1401654ea\nmov     ecx, 8A8h; Size                                                ; +0x3c, 0x1401654ec\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x41, 0x1401654f1\nmov     [rsp+28h+arg_0], rax                                           ; +0x46, 0x1401654f6\nmov     rcx, rax                                                       ; +0x4b, 0x1401654fb\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0x4e, 0x1401654fe\nnop                                                                    ; +0x53, 0x140165503\nmov     cs:qword_14090BF60, rax                                        ; +0x54, 0x140165504\nmov     rcx, [rax]                                                     ; +0x5b, 0x14016550b\nmov     rdx, [rcx+48h]                                                 ; +0x5e, 0x14016550e\nmov     rcx, rax                                                       ; +0x62, 0x140165512\ncall    rdx                                                            ; +0x65, 0x140165515\nmov     rbx, cs:qword_14090BF60                                        ; +0x67, 0x140165517\nmov     rcx, [rbx+228h]                                                ; +0x6e, 0x14016551e\ntest    rcx, rcx                                                       ; +0x75, 0x140165525\njz      short loc_140165530                                            ; +0x78, 0x140165528\ncall    cs:?stop@ChannelControl@FMOD@@QEAA?AW4FMOD_RESULT@@XZ; FMOD::ChannelControl::stop(void) ; +0x7a, 0x14016552a\nlea     rcx, [rbx+448h]                                                ; +0x80, 0x140165530\ncall    sub_14003EB60                                                  ; +0x87, 0x140165537\nlea     rcx, [rbx+488h]                                                ; +0x8c, 0x14016553c\ncall    sub_14003EB60                                                  ; +0x93, 0x140165543\nlea     rcx, [rbx+4C8h]                                                ; +0x98, 0x140165548\ncall    sub_14003EB60                                                  ; +0x9f, 0x14016554f\nmov     rax, [rdi]                                                     ; +0xa4, 0x140165554\nxor     edx, edx                                                       ; +0xa7, 0x140165557\nmov     rcx, rdi                                                       ; +0xa9, 0x140165559\ncall    qword ptr [rax+3E0h]                                           ; +0xac, 0x14016555c\nmov     rax, [rdi]                                                     ; +0xb2, 0x140165562\nmov     dl, 1                                                          ; +0xb5, 0x140165565\nmov     rcx, rdi                                                       ; +0xb7, 0x140165567\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xba, 0x14016556a\nadd     rsp, 20h                                                       ; +0xbf, 0x14016556f\npop     rdi                                                            ; +0xc3, 0x140165573\njmp     qword ptr [rax+208h]                                           ; +0xc4, 0x140165574", "xrefs": ["CustomSongLayer::keyBackClicked @ 0x140165589", "CustomSongLayer::init @ 0x140163ecf", "<???> @ 0x140917ee8"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}