{"type": "func", "start": 5370382784, "end": 5370383256, "name": "EditorSoundConfigInfoLayer::onClose", "pseudocode": "// \n// EditorSoundConfigInfoLayer::onClose from 0x1401989c0 to 0x140198b98 (472 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x14074e520\n// > <???> @ 0x1409195f8\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:46 +0000\n// \n\n// Hidden C++ exception states: #wind=8\n__int64 __fastcall EditorSoundConfigInfoLayer::onClose(__int64 a1, __int64 a2)\n{\n  _QWORD *v4; // rcx\n  __int64 v5; // rdi\n  __int64 v6; // rax\n  __int64 v7; // rax\n  __int64 v8; // rdi\n  __int64 v9; // rcx\n  __int64 v10; // rax\n  __int64 v11; // rcx\n  __int64 v12; // rcx\n  int v13; // eax\n  void *v15; // [rsp+30h] [rbp+8h]\n  void *v16; // [rsp+30h] [rbp+8h]\n  void *v17; // [rsp+30h] [rbp+8h]\n\n  v4 = *(_QWORD **)&qword_14090BFB0;\n  if ( *(_QWORD *)&qword_14090BFB0\n    || (v15 = operator new(0x690u),\n        *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v15),\n        (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0),\n        (v4 = *(_QWORD **)&qword_14090BFB0) != nullptr) )\n  {\n    v5 = a1 + 1000;\n    if ( !a1 )\n      v5 = 0;\n    if ( !v4 )\n    {\n      v16 = operator new(0x690u);\n      *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v16);\n      (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n      v4 = *(_QWORD **)&qword_14090BFB0;\n    }\n    if ( v4[183] == v5 )\n      v4[183] = 0;\n    v6 = a1 + 1008;\n    if ( !a1 )\n      v6 = 0;\n    if ( v4[184] == v6 )\n      v4[184] = 0;\n    v7 = a1 + 1048;\n    if ( !a1 )\n      v7 = 0;\n    if ( v4[186] == v7 )\n      v4[186] = 0;\n  }\n  v8 = a1 + 1064;\n  if ( !a1 )\n    v8 = 0;\n  v9 = qword_14090C070;\n  if ( !qword_14090C070 )\n  {\n    v17 = operator new(0x3D0u);\n    qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v17);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);\n    v9 = qword_14090C070;\n  }\n  MusicDownloadManager::removeMusicDownloadDelegate(v9, v8);\n  v10 = *(_QWORD *)(a1 + 1216);\n  if ( v10 )\n  {\n    *(_QWORD *)(v10 + 600) = 0;\n    (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 1216) + 1032LL))(*(_QWORD *)(a1 + 1216), 0);\n    *(_QWORD *)(a1 + 1216) = 0;\n  }\n  v11 = *(_QWORD *)(a1 + 1096);\n  if ( v11 )\n    LoadingCircle::fadeAndRemove(v11);\n  *(_QWORD *)(a1 + 1096) = 0;\n  v12 = *(_QWORD *)(a1 + 1088);\n  if ( v12 )\n  {\n    v13 = *(_DWORD *)(a1 + 1080);\n    if ( v13 == 2 || v13 == 1 )\n      cocos2d::CCNode::scheduleOnce(v12, FLAlertLayer::rebuildContentDeferred);\n  }\n  return SetupTriggerPopup::onClose(a1, a2);\n}", "assembly": "; \n; EditorSoundConfigInfoLayer::onClose from 0x1401989c0 to 0x140198b98 (472 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x14074e520\n; > <???> @ 0x1409195f8\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:46 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1401989c0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1401989c5\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x1401989ca\npush    rdi                                                            ; +0xf, 0x1401989cf\nsub     rsp, 20h                                                       ; +0x10, 0x1401989d0\nmov     rsi, rdx                                                       ; +0x14, 0x1401989d4\nmov     rbx, rcx                                                       ; +0x17, 0x1401989d7\nxor     ebp, ebp                                                       ; +0x1a, 0x1401989da\nmov     rcx, cs:qword_14090BFB0                                        ; +0x1c, 0x1401989dc\ntest    rcx, rcx                                                       ; +0x23, 0x1401989e3\njnz     short loc_140198A23                                            ; +0x26, 0x1401989e6\nmov     ecx, 690h; Size                                                ; +0x28, 0x1401989e8\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2d, 0x1401989ed\nmov     [rsp+28h+arg_0], rax                                           ; +0x32, 0x1401989f2\nmov     rcx, rax                                                       ; +0x37, 0x1401989f7\ncall    GameLevelManager__GameLevelManager                             ; +0x3a, 0x1401989fa\nnop                                                                    ; +0x3f, 0x1401989ff\nmov     cs:qword_14090BFB0, rax                                        ; +0x40, 0x140198a00\nmov     rcx, [rax]                                                     ; +0x47, 0x140198a07\nmov     rdx, [rcx+48h]                                                 ; +0x4a, 0x140198a0a\nmov     rcx, rax                                                       ; +0x4e, 0x140198a0e\ncall    rdx                                                            ; +0x51, 0x140198a11\nmov     rcx, cs:qword_14090BFB0                                        ; +0x53, 0x140198a13\ntest    rcx, rcx                                                       ; +0x5a, 0x140198a1a\njz      loc_140198AB4                                                  ; +0x5d, 0x140198a1d\nlea     rdi, [rbx+3E8h]                                                ; +0x63, 0x140198a23\ntest    rbx, rbx                                                       ; +0x6a, 0x140198a2a\ncmovz   rdi, rbp                                                       ; +0x6d, 0x140198a2d\ntest    rcx, rcx                                                       ; +0x71, 0x140198a31\njnz     short loc_140198A68                                            ; +0x74, 0x140198a34\nmov     ecx, 690h; Size                                                ; +0x76, 0x140198a36\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x7b, 0x140198a3b\nmov     [rsp+28h+arg_0], rax                                           ; +0x80, 0x140198a40\nmov     rcx, rax                                                       ; +0x85, 0x140198a45\ncall    GameLevelManager__GameLevelManager                             ; +0x88, 0x140198a48\nnop                                                                    ; +0x8d, 0x140198a4d\nmov     cs:qword_14090BFB0, rax                                        ; +0x8e, 0x140198a4e\nmov     rcx, [rax]                                                     ; +0x95, 0x140198a55\nmov     rdx, [rcx+48h]                                                 ; +0x98, 0x140198a58\nmov     rcx, rax                                                       ; +0x9c, 0x140198a5c\ncall    rdx                                                            ; +0x9f, 0x140198a5f\nmov     rcx, cs:qword_14090BFB0                                        ; +0xa1, 0x140198a61\ncmp     [rcx+5B8h], rdi                                                ; +0xa8, 0x140198a68\njnz     short loc_140198A78                                            ; +0xaf, 0x140198a6f\nmov     [rcx+5B8h], rbp                                                ; +0xb1, 0x140198a71\nlea     rax, [rbx+3F0h]                                                ; +0xb8, 0x140198a78\ntest    rbx, rbx                                                       ; +0xbf, 0x140198a7f\ncmovz   rax, rbp                                                       ; +0xc2, 0x140198a82\ncmp     [rcx+5C0h], rax                                                ; +0xc6, 0x140198a86\njnz     short loc_140198A96                                            ; +0xcd, 0x140198a8d\nmov     [rcx+5C0h], rbp                                                ; +0xcf, 0x140198a8f\nlea     rax, [rbx+418h]                                                ; +0xd6, 0x140198a96\ntest    rbx, rbx                                                       ; +0xdd, 0x140198a9d\ncmovz   rax, rbp                                                       ; +0xe0, 0x140198aa0\ncmp     [rcx+5D0h], rax                                                ; +0xe4, 0x140198aa4\njnz     short loc_140198AB4                                            ; +0xeb, 0x140198aab\nmov     [rcx+5D0h], rbp                                                ; +0xed, 0x140198aad\nlea     rdi, [rbx+428h]                                                ; +0xf4, 0x140198ab4\ntest    rbx, rbx                                                       ; +0xfb, 0x140198abb\ncmovz   rdi, rbp                                                       ; +0xfe, 0x140198abe\nmov     rcx, cs:qword_14090C070                                        ; +0x102, 0x140198ac2\ntest    rcx, rcx                                                       ; +0x109, 0x140198ac9\njnz     short loc_140198B01                                            ; +0x10c, 0x140198acc\nmov     ecx, 3D0h; Size                                                ; +0x10e, 0x140198ace\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x113, 0x140198ad3\nmov     [rsp+28h+arg_0], rax                                           ; +0x118, 0x140198ad8\nmov     rcx, rax                                                       ; +0x11d, 0x140198add\ncall    MusicDownloadManager__MusicDownloadManager                     ; +0x120, 0x140198ae0\nnop                                                                    ; +0x125, 0x140198ae5\nmov     cs:qword_14090C070, rax                                        ; +0x126, 0x140198ae6\nmov     rcx, [rax]                                                     ; +0x12d, 0x140198aed\nmov     r8, [rcx+48h]                                                  ; +0x130, 0x140198af0\nmov     rcx, rax                                                       ; +0x134, 0x140198af4\ncall    r8                                                             ; +0x137, 0x140198af7\nmov     rcx, cs:qword_14090C070                                        ; +0x13a, 0x140198afa\nmov     rdx, rdi                                                       ; +0x141, 0x140198b01\ncall    MusicDownloadManager__removeMusicDownloadDelegate              ; +0x144, 0x140198b04\nmov     rax, [rbx+4C0h]                                                ; +0x149, 0x140198b09\ntest    rax, rax                                                       ; +0x150, 0x140198b10\njz      short loc_140198B35                                            ; +0x153, 0x140198b13\nmov     [rax+258h], rbp                                                ; +0x155, 0x140198b15\nmov     rcx, [rbx+4C0h]                                                ; +0x15c, 0x140198b1c\nmov     rax, [rcx]                                                     ; +0x163, 0x140198b23\nxor     edx, edx                                                       ; +0x166, 0x140198b26\ncall    qword ptr [rax+408h]                                           ; +0x168, 0x140198b28\nmov     [rbx+4C0h], rbp                                                ; +0x16e, 0x140198b2e\nmov     rcx, [rbx+448h]                                                ; +0x175, 0x140198b35\ntest    rcx, rcx                                                       ; +0x17c, 0x140198b3c\njz      short loc_140198B46                                            ; +0x17f, 0x140198b3f\ncall    LoadingCircle__fadeAndRemove                                   ; +0x181, 0x140198b41\nmov     [rbx+448h], rbp                                                ; +0x186, 0x140198b46\nmov     rcx, [rbx+440h]                                                ; +0x18d, 0x140198b4d\ntest    rcx, rcx                                                       ; +0x194, 0x140198b54\njz      short loc_140198B79                                            ; +0x197, 0x140198b57\nmov     eax, [rbx+438h]                                                ; +0x199, 0x140198b59\ncmp     eax, 2                                                         ; +0x19f, 0x140198b5f\njz      short loc_140198B69                                            ; +0x1a2, 0x140198b62\ncmp     eax, 1                                                         ; +0x1a4, 0x140198b64\njnz     short loc_140198B79                                            ; +0x1a7, 0x140198b67\nxorps   xmm2, xmm2                                                     ; +0x1a9, 0x140198b69\nlea     rdx, FLAlertLayer__rebuildContentDeferred                      ; +0x1ac, 0x140198b6c\ncall    cs:?scheduleOnce@CCNode@cocos2d@@QEAAXP8CCObject@2@EAAXM@ZM@Z; cocos2d::CCNode::scheduleOnce(void (cocos2d::CCObject::*)(float),float) ; +0x1b3, 0x140198b73\nmov     rdx, rsi                                                       ; +0x1b9, 0x140198b79\nmov     rcx, rbx                                                       ; +0x1bc, 0x140198b7c\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x1bf, 0x140198b7f\nmov     rbp, [rsp+28h+arg_10]                                          ; +0x1c4, 0x140198b84\nmov     rsi, [rsp+28h+arg_18]                                          ; +0x1c9, 0x140198b89\nadd     rsp, 20h                                                       ; +0x1ce, 0x140198b8e\npop     rdi                                                            ; +0x1d2, 0x140198b92\njmp     SetupTriggerPopup__onClose                                     ; +0x1d3, 0x140198b93", "xrefs": ["<???> @ 0x14074e520", "<???> @ 0x1409195f8"], "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"}