{"type": "func", "start": 5370301040, "end": 5370301228, "name": "EditorSFXActionConfigLayer::onPreviewSound", "pseudocode": "// \n// EditorSFXActionConfigLayer::onPreviewSound from 0x140184a70 to 0x140184b2c (188 bytes)\n// \n// 2 xrefs:\n// > EditorSFXActionConfigLayer::refreshRows @ 0x1401845c3\n// > <???> @ 0x140918d58\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:38 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nint __fastcall EditorSFXActionConfigLayer::onPreviewSound(__int64 a1, __int64 a2)\n{\n  signed int v3; // edi\n  __int64 v4; // rax\n  struct cocos2d::CCObject *Binding; // rax\n  cocos2d::CCArray *v6; // rbx\n  __int64 v7; // rcx\n  struct cocos2d::CCObject *v8; // rbx\n  void *v10; // [rsp+30h] [rbp+8h]\n\n  v3 = (int)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2) - 1000) / 8;\n  LODWORD(a1) = *(_DWORD *)(a1 + 1008);\n  v4 = EditorSFXManager::sharedState();\n  Binding = (struct cocos2d::CCObject *)EditorSFXManager::findBinding(v4, (unsigned int)a1);\n  if ( Binding )\n  {\n    v6 = *(cocos2d::CCArray **)Binding;\n    if ( *(_QWORD *)Binding )\n    {\n      if ( v3 >= 0 )\n      {\n        LODWORD(Binding) = cocos2d::CCArray::count(*(cocos2d::CCArray **)Binding);\n        if ( v3 < (int)Binding )\n        {\n          Binding = cocos2d::CCArray::objectAtIndex(v6, v3);\n          v8 = Binding;\n          if ( Binding )\n          {\n            if ( *((int *)Binding + 472) > 0 )\n            {\n              if ( !qword_14090BFD0 )\n              {\n                v10 = operator new(0x6E8u);\n                qword_14090BFD0 = GameManager::GameManager(v10);\n                (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n              }\n              LODWORD(Binding) = GameManager::playSFXTrigger(v7, v8);\n            }\n          }\n        }\n      }\n    }\n  }\n  return (int)Binding;\n}", "assembly": "; \n; EditorSFXActionConfigLayer::onPreviewSound from 0x140184a70 to 0x140184b2c (188 bytes)\n; \n; 2 xrefs:\n; > EditorSFXActionConfigLayer::refreshRows @ 0x1401845c3\n; > <???> @ 0x140918d58\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:38 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140184a70\npush    rdi                                                            ; +0x5, 0x140184a75\nsub     rsp, 20h                                                       ; +0x6, 0x140184a76\nmov     rbx, rcx                                                       ; +0xa, 0x140184a7a\nmov     rax, [rdx]                                                     ; +0xd, 0x140184a7d\nmov     rcx, rdx                                                       ; +0x10, 0x140184a80\ncall    qword ptr [rax+38h]                                            ; +0x13, 0x140184a83\nadd     eax, 0FFFFFC18h                                                ; +0x16, 0x140184a86\ncdq                                                                    ; +0x1b, 0x140184a8b\nand     edx, 7                                                         ; +0x1c, 0x140184a8c\nlea     edi, [rdx+rax]                                                 ; +0x1f, 0x140184a8f\nsar     edi, 3                                                         ; +0x22, 0x140184a92\nmov     ebx, [rbx+3F0h]                                                ; +0x25, 0x140184a95\ncall    EditorSFXManager__sharedState                                  ; +0x2b, 0x140184a9b\nmov     edx, ebx                                                       ; +0x30, 0x140184aa0\nmov     rcx, rax                                                       ; +0x32, 0x140184aa2\ncall    EditorSFXManager__findBinding                                  ; +0x35, 0x140184aa5\ntest    rax, rax                                                       ; +0x3a, 0x140184aaa\njz      short loc_140184B21                                            ; +0x3d, 0x140184aad\nmov     rbx, [rax]                                                     ; +0x3f, 0x140184aaf\ntest    rbx, rbx                                                       ; +0x42, 0x140184ab2\njz      short loc_140184B21                                            ; +0x45, 0x140184ab5\ntest    edi, edi                                                       ; +0x47, 0x140184ab7\njs      short loc_140184B21                                            ; +0x49, 0x140184ab9\nmov     rcx, rbx                                                       ; +0x4b, 0x140184abb\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x4e, 0x140184abe\ncmp     edi, eax                                                       ; +0x54, 0x140184ac4\njge     short loc_140184B21                                            ; +0x56, 0x140184ac6\nmov     edx, edi                                                       ; +0x58, 0x140184ac8\nmov     rcx, rbx                                                       ; +0x5a, 0x140184aca\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x5d, 0x140184acd\nmov     rbx, rax                                                       ; +0x63, 0x140184ad3\ntest    rax, rax                                                       ; +0x66, 0x140184ad6\njz      short loc_140184B21                                            ; +0x69, 0x140184ad9\ncmp     dword ptr [rax+760h], 0                                        ; +0x6b, 0x140184adb\njle     short loc_140184B21                                            ; +0x72, 0x140184ae2\ncmp     cs:qword_14090BFD0, 0                                          ; +0x74, 0x140184ae4\njnz     short loc_140184B19                                            ; +0x7c, 0x140184aec\nmov     ecx, 6E8h; Size                                                ; +0x7e, 0x140184aee\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x83, 0x140184af3\nmov     [rsp+28h+arg_0], rax                                           ; +0x88, 0x140184af8\nmov     rcx, rax                                                       ; +0x8d, 0x140184afd\ncall    GameManager__GameManager                                       ; +0x90, 0x140184b00\nnop                                                                    ; +0x95, 0x140184b05\nmov     cs:qword_14090BFD0, rax                                        ; +0x96, 0x140184b06\nmov     rcx, [rax]                                                     ; +0x9d, 0x140184b0d\nmov     rdx, [rcx+48h]                                                 ; +0xa0, 0x140184b10\nmov     rcx, rax                                                       ; +0xa4, 0x140184b14\ncall    rdx                                                            ; +0xa7, 0x140184b17\nmov     rdx, rbx                                                       ; +0xa9, 0x140184b19\ncall    GameManager__playSFXTrigger                                    ; +0xac, 0x140184b1c\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xb1, 0x140184b21\nadd     rsp, 20h                                                       ; +0xb6, 0x140184b26\npop     rdi                                                            ; +0xba, 0x140184b2a\nretn                                                                   ; +0xbb, 0x140184b2b", "xrefs": ["EditorSFXActionConfigLayer::refreshRows @ 0x1401845c3", "<???> @ 0x140918d58"], "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"}