{"type": "func", "start": 13359484, "end": 13359640, "name": "EditorSFXActionConfigLayer::onPreviewSound", "pseudocode": "// \n// EditorSFXActionConfigLayer::onPreviewSound from 0xcbd97c to 0xcbda18 (156 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x100960\n// > EditorSFXActionConfigLayer::refreshRows @ 0xcbe7b0\n// > <???> @ 0x1547d48\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\n__int64 __fastcall EditorSFXActionConfigLayer::onPreviewSound(EditorSFXActionConfigLayer *this, cocos2d::CCObject *a2)\n{\n  EditorSFXManager *v3; // x0\n  int v4; // w19\n  EditorSFXManager *v5; // x0\n  signed int v6; // w19\n  __int64 result; // x0\n  cocos2d::CCArray *v8; // x20\n  __int64 v9; // x1\n  GameManager *v10; // x0\n  SFXTriggerGameObject *v11; // [xsp+28h] [xbp+28h]\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 = EditorSFXManager::soundsForAction(v5, *((_DWORD *)this + 256));\n  v8 = (cocos2d::CCArray *)result;\n  if ( (v6 & 0x80000000) == 0 )\n  {\n    if ( result )\n    {\n      result = cocos2d::CCArray::count((cocos2d::CCArray *)result);\n      if ( (int)result > v6 )\n      {\n        result = cocos2d::CCArray::objectAtIndex(v8, v6);\n        v9 = result;\n        if ( result )\n        {\n          result = *(unsigned int *)(result + 1864);\n          v11 = (SFXTriggerGameObject *)v9;\n          if ( (int)result > 0 )\n          {\n            v10 = (GameManager *)GameManager::sharedState((GameManager *)result);\n            return GameManager::playSFXTrigger(v10, v11);\n          }\n        }\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditorSFXActionConfigLayer::onPreviewSound from 0xcbd97c to 0xcbda18 (156 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x100960\n; > EditorSFXActionConfigLayer::refreshRows @ 0xcbe7b0\n; > <???> @ 0x1547d48\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,#var_30]!                                ; +0x0, 0xcbd97c\nMOV             X29, SP                                                ; +0x4, 0xcbd980\nSTP             X19, X20, [SP,#0x30+var_20]                            ; +0x8, 0xcbd984\nMOV             X20, X0                                                ; +0xc, 0xcbd988\nMOV             X0, X1                                                 ; +0x10, 0xcbd98c\nLDR             X1, [X1]                                               ; +0x14, 0xcbd990\nLDR             X1, [X1,#0x40]                                         ; +0x18, 0xcbd994\nBLR             X1                                                     ; +0x1c, 0xcbd998\nSUB             W0, W0, #0x3E8; this                                   ; +0x20, 0xcbd99c\nCMP             W0, WZR                                                ; +0x24, 0xcbd9a0\nADD             W1, W0, #7                                             ; +0x28, 0xcbd9a4\nCSEL            W19, W1, W0, LT                                        ; +0x2c, 0xcbd9a8\nBL              _ZN16EditorSFXManager11sharedStateEv; EditorSFXManager::sharedState(void) ; +0x30, 0xcbd9ac\nASR             W19, W19, #3                                           ; +0x34, 0xcbd9b0\nLDR             W1, [X20,#0x400]; int                                  ; +0x38, 0xcbd9b4\nBL              _ZN16EditorSFXManager15soundsForActionEi; EditorSFXManager::soundsForAction(int) ; +0x3c, 0xcbd9b8\nMOV             X20, X0                                                ; +0x40, 0xcbd9bc\nTBNZ            W19, #0x1F, loc_CBDA0C                                 ; +0x44, 0xcbd9c0\nCBZ             X0, loc_CBDA0C                                         ; +0x48, 0xcbd9c4\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x4c, 0xcbd9c8\nCMP             W0, W19                                                ; +0x50, 0xcbd9cc\nB.LE            loc_CBDA0C                                             ; +0x54, 0xcbd9d0\nMOV             W1, W19; unsigned int                                  ; +0x58, 0xcbd9d4\nMOV             X0, X20; this                                          ; +0x5c, 0xcbd9d8\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x60, 0xcbd9dc\nMOV             X1, X0                                                 ; +0x64, 0xcbd9e0\nCBZ             X0, loc_CBDA0C                                         ; +0x68, 0xcbd9e4\nLDR             W0, [X1,#0x748]; this                                  ; +0x6c, 0xcbd9e8\nSTR             X1, [X29,#0x30+var_8]                                  ; +0x70, 0xcbd9ec\nCMP             W0, WZR                                                ; +0x74, 0xcbd9f0\nB.LE            loc_CBDA0C                                             ; +0x78, 0xcbd9f4\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x7c, 0xcbd9f8\nLDR             X1, [X29,#0x30+var_8]; SFXTriggerGameObject *          ; +0x80, 0xcbd9fc\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x84, 0xcbda00\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x88, 0xcbda04\nB               _ZN11GameManager14playSFXTriggerEP20SFXTriggerGameObject; GameManager::playSFXTrigger(SFXTriggerGameObject *) ; +0x8c, 0xcbda08\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x90, 0xcbda0c\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x94, 0xcbda10\nRET                                                                    ; +0x98, 0xcbda14", "xrefs": ["<???> @ 0x100960", "EditorSFXActionConfigLayer::refreshRows @ 0xcbe7b0", "<???> @ 0x1547d48"], "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"}