{"type": "func", "start": 7846556, "end": 7846646, "name": "EditorSFXActionConfigLayer::onPreviewSound", "pseudocode": "// \n// EditorSFXActionConfigLayer::onPreviewSound from 0x77ba9c to 0x77baf6 (90 bytes)\n// \n// 0 xrefs:\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:59:23 +0000\n// \n\nint *__fastcall EditorSFXActionConfigLayer::onPreviewSound(EditorSFXActionConfigLayer *this, cocos2d::CCObject *a2)\n{\n  EditorSFXManager *v3; // r0\n  int v4; // r4\n  EditorSFXManager *v5; // r0\n  int *result; // r0\n  signed int v7; // r4\n  cocos2d::CCArray *v8; // r5\n  SFXTriggerGameObject *v9; // r4\n  GameManager *v10; // r0\n\n  v3 = (EditorSFXManager *)(*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2);\n  v4 = (int)v3 - 1000;\n  if ( (int)v3 - 1000 < 0 )\n    v4 = (int)v3 - 993;\n  v5 = (EditorSFXManager *)EditorSFXManager::sharedState(v3);\n  result = (int *)EditorSFXManager::soundsForAction(v5, *((_DWORD *)this + 179));\n  v7 = v4 >> 3;\n  v8 = (cocos2d::CCArray *)result;\n  if ( result )\n  {\n    if ( v7 >= 0 )\n    {\n      result = (int *)cocos2d::CCArray::count((cocos2d::CCArray *)result);\n      if ( v7 < (int)result )\n      {\n        result = (int *)cocos2d::CCArray::objectAtIndex(v8, v7);\n        v9 = (SFXTriggerGameObject *)result;\n        if ( result )\n        {\n          if ( result[415] > 0 )\n          {\n            v10 = (GameManager *)GameManager::sharedState((GameManager *)result);\n            return (int *)GameManager::playSFXTrigger(v10, v9);\n          }\n        }\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditorSFXActionConfigLayer::onPreviewSound from 0x77ba9c to 0x77baf6 (90 bytes)\n; \n; 0 xrefs:\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:59:23 +0000\n; \nPUSH            {R3-R5,LR}                                             ; +0x0, 0x77ba9c\nMOV             R5, R0                                                 ; +0x2, 0x77ba9e\nLDR             R3, [R1]                                               ; +0x4, 0x77baa0\nMOV             R0, R1                                                 ; +0x6, 0x77baa2\nLDR             R3, [R3,#0x20]                                         ; +0x8, 0x77baa4\nBLX             R3                                                     ; +0xa, 0x77baa6\nSUBS.W          R4, R0, #0x3E8                                         ; +0xc, 0x77baa8\nITT MI                                                                 ; +0x10, 0x77baac\nMOVMI           R3, #0xFFFFFC1F                                        ; +0x12, 0x77baae\nADDMI           R4, R0, R3                                             ; +0x16, 0x77bab2\nBL              _ZN16EditorSFXManager11sharedStateEv; EditorSFXManager::sharedState(void) ; +0x18, 0x77bab4\nLDR.W           R1, [R5,#0x2CC]; int                                   ; +0x1c, 0x77bab8\nBL              _ZN16EditorSFXManager15soundsForActionEi; EditorSFXManager::soundsForAction(int) ; +0x20, 0x77babc\nASRS            R4, R4, #3                                             ; +0x24, 0x77bac0\nMOV             R5, R0                                                 ; +0x26, 0x77bac2\nCBZ             R0, locret_77BAF4                                      ; +0x28, 0x77bac4\nCMP             R4, #0                                                 ; +0x2a, 0x77bac6\nBLT             locret_77BAF4                                          ; +0x2c, 0x77bac8\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x2e, 0x77baca\nCMP             R4, R0                                                 ; +0x32, 0x77bace\nBGE             locret_77BAF4                                          ; +0x34, 0x77bad0\nMOV             R1, R4; unsigned int                                   ; +0x36, 0x77bad2\nMOV             R0, R5; this                                           ; +0x38, 0x77bad4\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x3a, 0x77bad6\nMOV             R4, R0                                                 ; +0x3e, 0x77bada\nCBZ             R0, locret_77BAF4                                      ; +0x40, 0x77badc\nLDR.W           R3, [R4,#0x67C]                                        ; +0x42, 0x77bade\nCMP             R3, #0                                                 ; +0x46, 0x77bae2\nBLE             locret_77BAF4                                          ; +0x48, 0x77bae4\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x4a, 0x77bae6\nMOV             R1, R4; SFXTriggerGameObject *                         ; +0x4e, 0x77baea\nPOP.W           {R3-R5,LR}                                             ; +0x50, 0x77baec\nB.W             _ZN11GameManager14playSFXTriggerEP20SFXTriggerGameObject; GameManager::playSFXTrigger(SFXTriggerGameObject *) ; +0x54, 0x77baf0\nPOP             {R3-R5,PC}                                             ; +0x58, 0x77baf4", "xrefs": [], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}