{"type": "func", "start": 13359640, "end": 13359784, "name": "EditorSFXActionConfigLayer::onEditSound", "pseudocode": "// \n// EditorSFXActionConfigLayer::onEditSound from 0xcbda18 to 0xcbdaa8 (144 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x6cb08\n// > EditorSFXActionConfigLayer::refreshRows @ 0xcbe708\n// > <???> @ 0x1542ae0\n// \n// This function is hookable on this platform (idp: arm, 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 13:06:15 +0000\n// \n\ncocos2d::CCArray *__fastcall EditorSFXActionConfigLayer::onEditSound(\n        EditorSFXActionConfigLayer *this,\n        cocos2d::CCObject *a2)\n{\n  EditorSFXManager *v3; // x0\n  int v4; // w19\n  EditorSFXManager *v5; // x0\n  signed int v6; // w19\n  cocos2d::CCArray *result; // x0\n  cocos2d::CCArray *v8; // x20\n\n  v3 = (EditorSFXManager *)((*(unsigned int (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2) - 1000);\n  if ( (int)v3 >= 0 )\n    v4 = (int)v3;\n  else\n    v4 = (_DWORD)v3 + 7;\n  v5 = (EditorSFXManager *)EditorSFXManager::sharedState(v3);\n  v6 = v4 >> 3;\n  result = (cocos2d::CCArray *)EditorSFXManager::soundsForAction(v5, *((_DWORD *)this + 256));\n  v8 = result;\n  if ( (v6 & 0x80000000) == 0 )\n  {\n    if ( result )\n    {\n      result = (cocos2d::CCArray *)cocos2d::CCArray::count(result);\n      if ( (int)result > v6 )\n      {\n        result = (cocos2d::CCArray *)cocos2d::CCArray::objectAtIndex(v8, v6);\n        if ( result )\n        {\n          result = (cocos2d::CCArray *)SetupSFXPopup::create(\n                                         result,\n                                         nullptr,\n                                         (cocos2d::CCArray *)((char *)&dword_0 + 1));\n          if ( result )\n            return (cocos2d::CCArray *)(*(__int64 (__fastcall **)(cocos2d::CCArray *))(*(_QWORD *)result + 1312LL))(result);\n        }\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditorSFXActionConfigLayer::onEditSound from 0xcbda18 to 0xcbdaa8 (144 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x6cb08\n; > EditorSFXActionConfigLayer::refreshRows @ 0xcbe708\n; > <???> @ 0x1542ae0\n; \n; This function is hookable on this platform (idp: arm, 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 13:06:15 +0000\n; \nSTP             X29, X30, [SP,#-0x20+var_s0]!                          ; +0x0, 0xcbda18\nMOV             X29, SP                                                ; +0x4, 0xcbda1c\nSTP             X19, X20, [SP,#var_s10]                                ; +0x8, 0xcbda20\nMOV             X20, X0                                                ; +0xc, 0xcbda24\nMOV             X0, X1                                                 ; +0x10, 0xcbda28\nLDR             X1, [X1]                                               ; +0x14, 0xcbda2c\nLDR             X1, [X1,#0x40]                                         ; +0x18, 0xcbda30\nBLR             X1                                                     ; +0x1c, 0xcbda34\nSUB             W0, W0, #0x3E8; this                                   ; +0x20, 0xcbda38\nCMP             W0, WZR                                                ; +0x24, 0xcbda3c\nADD             W1, W0, #7                                             ; +0x28, 0xcbda40\nCSEL            W19, W1, W0, LT                                        ; +0x2c, 0xcbda44\nBL              _ZN16EditorSFXManager11sharedStateEv; EditorSFXManager::sharedState(void) ; +0x30, 0xcbda48\nASR             W19, W19, #3                                           ; +0x34, 0xcbda4c\nLDR             W1, [X20,#0x400]; int                                  ; +0x38, 0xcbda50\nBL              _ZN16EditorSFXManager15soundsForActionEi; EditorSFXManager::soundsForAction(int) ; +0x3c, 0xcbda54\nMOV             X20, X0                                                ; +0x40, 0xcbda58\nTBNZ            W19, #0x1F, loc_CBDA9C                                 ; +0x44, 0xcbda5c\nCBZ             X0, loc_CBDA9C                                         ; +0x48, 0xcbda60\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x4c, 0xcbda64\nCMP             W0, W19                                                ; +0x50, 0xcbda68\nB.LE            loc_CBDA9C                                             ; +0x54, 0xcbda6c\nMOV             X0, X20; this                                          ; +0x58, 0xcbda70\nMOV             W1, W19; unsigned int                                  ; +0x5c, 0xcbda74\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x60, 0xcbda78\nCBZ             X0, loc_CBDA9C                                         ; +0x64, 0xcbda7c\nMOV             X1, #0; SFXTriggerGameObject *                         ; +0x68, 0xcbda80\nMOV             W2, #(dword_0+1); cocos2d::CCArray *                   ; +0x6c, 0xcbda84\nBL              _ZN13SetupSFXPopup6createEP20SFXTriggerGameObjectPN7cocos2d7CCArrayEi; SetupSFXPopup::create(SFXTriggerGameObject *,cocos2d::CCArray *,int) ; +0x70, 0xcbda88\nCBZ             X0, loc_CBDA9C                                         ; +0x74, 0xcbda8c\nLDR             X1, [X0]                                               ; +0x78, 0xcbda90\nLDR             X1, [X1,#0x520]                                        ; +0x7c, 0xcbda94\nBLR             X1                                                     ; +0x80, 0xcbda98\nLDP             X19, X20, [SP,#var_s10]                                ; +0x84, 0xcbda9c\nLDP             X29, X30, [SP+var_s0],#0x20                            ; +0x88, 0xcbdaa0\nRET                                                                    ; +0x8c, 0xcbdaa4", "xrefs": ["<???> @ 0x6cb08", "EditorSFXActionConfigLayer::refreshRows @ 0xcbe708", "<???> @ 0x1542ae0"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "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"}