{"type": "func", "start": 5370301232, "end": 5370301383, "name": "EditorSFXActionConfigLayer::onEditSound", "pseudocode": "// \n// EditorSFXActionConfigLayer::onEditSound from 0x140184b30 to 0x140184bc7 (151 bytes)\n// \n// 2 xrefs:\n// > EditorSFXActionConfigLayer::refreshRows @ 0x14018453b\n// > <???> @ 0x140918d64\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\nint __fastcall EditorSFXActionConfigLayer::onEditSound(__int64 a1, __int64 a2)\n{\n  int v3; // eax\n  signed int v4; // edi\n  __int64 v5; // rax\n  cocos2d::CCArray **Binding; // rax\n  cocos2d::CCArray *v7; // rbx\n\n  v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);\n  LODWORD(a1) = *(_DWORD *)(a1 + 1008);\n  v4 = (v3 - 1000) / 8;\n  v5 = EditorSFXManager::sharedState();\n  Binding = (cocos2d::CCArray **)EditorSFXManager::findBinding(v5, (unsigned int)a1);\n  if ( Binding )\n  {\n    v7 = *Binding;\n    if ( *Binding )\n    {\n      if ( v4 >= 0 )\n      {\n        LODWORD(Binding) = cocos2d::CCArray::count(*Binding);\n        if ( v4 < (int)Binding )\n        {\n          Binding = (cocos2d::CCArray **)cocos2d::CCArray::objectAtIndex(v7, v4);\n          if ( Binding )\n          {\n            Binding = (cocos2d::CCArray **)SetupSFXPopup::create(Binding, 0, 1);\n            if ( Binding )\n              LODWORD(Binding) = (*((__int64 (__fastcall **)(cocos2d::CCArray **))*Binding + 133))(Binding);\n          }\n        }\n      }\n    }\n  }\n  return (int)Binding;\n}", "assembly": "; \n; EditorSFXActionConfigLayer::onEditSound from 0x140184b30 to 0x140184bc7 (151 bytes)\n; \n; 2 xrefs:\n; > EditorSFXActionConfigLayer::refreshRows @ 0x14018453b\n; > <???> @ 0x140918d64\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_0], rbx                                               ; +0x0, 0x140184b30\npush    rdi                                                            ; +0x5, 0x140184b35\nsub     rsp, 20h                                                       ; +0x6, 0x140184b36\nmov     rax, [rdx]                                                     ; +0xa, 0x140184b3a\nmov     rbx, rcx                                                       ; +0xd, 0x140184b3d\nmov     rcx, rdx                                                       ; +0x10, 0x140184b40\ncall    qword ptr [rax+38h]                                            ; +0x13, 0x140184b43\nmov     ebx, [rbx+3F0h]                                                ; +0x16, 0x140184b46\nsub     eax, 3E8h                                                      ; +0x1c, 0x140184b4c\ncdq                                                                    ; +0x21, 0x140184b51\nand     edx, 7                                                         ; +0x22, 0x140184b52\nlea     edi, [rdx+rax]                                                 ; +0x25, 0x140184b55\nsar     edi, 3                                                         ; +0x28, 0x140184b58\ncall    EditorSFXManager__sharedState                                  ; +0x2b, 0x140184b5b\nmov     edx, ebx                                                       ; +0x30, 0x140184b60\nmov     rcx, rax                                                       ; +0x32, 0x140184b62\ncall    EditorSFXManager__findBinding                                  ; +0x35, 0x140184b65\ntest    rax, rax                                                       ; +0x3a, 0x140184b6a\njz      short loc_140184BBC                                            ; +0x3d, 0x140184b6d\nmov     rbx, [rax]                                                     ; +0x3f, 0x140184b6f\ntest    rbx, rbx                                                       ; +0x42, 0x140184b72\njz      short loc_140184BBC                                            ; +0x45, 0x140184b75\ntest    edi, edi                                                       ; +0x47, 0x140184b77\njs      short loc_140184BBC                                            ; +0x49, 0x140184b79\nmov     rcx, rbx                                                       ; +0x4b, 0x140184b7b\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x4e, 0x140184b7e\ncmp     edi, eax                                                       ; +0x54, 0x140184b84\njge     short loc_140184BBC                                            ; +0x56, 0x140184b86\nmov     edx, edi                                                       ; +0x58, 0x140184b88\nmov     rcx, rbx                                                       ; +0x5a, 0x140184b8a\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x5d, 0x140184b8d\ntest    rax, rax                                                       ; +0x63, 0x140184b93\njz      short loc_140184BBC                                            ; +0x66, 0x140184b96\nxor     edx, edx                                                       ; +0x68, 0x140184b98\nmov     r8d, 1                                                         ; +0x6a, 0x140184b9a\nmov     rcx, rax                                                       ; +0x70, 0x140184ba0\ncall    SetupSFXPopup__create                                          ; +0x73, 0x140184ba3\ntest    rax, rax                                                       ; +0x78, 0x140184ba8\njz      short loc_140184BBC                                            ; +0x7b, 0x140184bab\nmov     rcx, [rax]                                                     ; +0x7d, 0x140184bad\nmov     rdx, [rcx+428h]                                                ; +0x80, 0x140184bb0\nmov     rcx, rax                                                       ; +0x87, 0x140184bb7\ncall    rdx                                                            ; +0x8a, 0x140184bba\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x8c, 0x140184bbc\nadd     rsp, 20h                                                       ; +0x91, 0x140184bc1\npop     rdi                                                            ; +0x95, 0x140184bc5\nretn                                                                   ; +0x96, 0x140184bc6", "xrefs": ["EditorSFXActionConfigLayer::refreshRows @ 0x14018453b", "<???> @ 0x140918d64"], "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"}