{"type": "func", "start": 7846646, "end": 7846734, "name": "EditorSFXActionConfigLayer::onEditSound", "pseudocode": "// \n// EditorSFXActionConfigLayer::onEditSound from 0x77baf6 to 0x77bb4e (88 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\nSetupTriggerPopup *__fastcall EditorSFXActionConfigLayer::onEditSound(\n        EditorSFXActionConfigLayer *this,\n        cocos2d::CCObject *a2)\n{\n  EditorSFXManager *v3; // r0\n  int v4; // r4\n  EditorSFXManager *v5; // r0\n  SetupTriggerPopup *result; // r0\n  signed int v7; // r4\n  cocos2d::CCArray *v8; // r5\n  int v9; // r3\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 = (SetupTriggerPopup *)EditorSFXManager::soundsForAction(v5, *((_DWORD *)this + 179));\n  v7 = v4 >> 3;\n  v8 = result;\n  if ( result )\n  {\n    if ( v7 >= 0 )\n    {\n      result = (SetupTriggerPopup *)cocos2d::CCArray::count(result);\n      if ( v7 < (int)result )\n      {\n        result = (SetupTriggerPopup *)cocos2d::CCArray::objectAtIndex(v8, v7);\n        if ( result )\n        {\n          result = SetupSFXPopup::create(result, nullptr, (cocos2d::CCArray *)((char *)&dword_0 + 1), v9);\n          if ( result )\n            return (SetupTriggerPopup *)(*(int (__fastcall **)(SetupTriggerPopup *))(*(_DWORD *)result + 656))(result);\n        }\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditorSFXActionConfigLayer::onEditSound from 0x77baf6 to 0x77bb4e (88 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            {R4-R6,LR}                                             ; +0x0, 0x77baf6\nMOV             R5, R0                                                 ; +0x2, 0x77baf8\nLDR             R3, [R1]                                               ; +0x4, 0x77bafa\nMOV             R0, R1                                                 ; +0x6, 0x77bafc\nLDR             R3, [R3,#0x20]                                         ; +0x8, 0x77bafe\nBLX             R3                                                     ; +0xa, 0x77bb00\nSUBS.W          R4, R0, #0x3E8                                         ; +0xc, 0x77bb02\nITT MI                                                                 ; +0x10, 0x77bb06\nMOVMI           R3, #0xFFFFFC1F                                        ; +0x12, 0x77bb08\nADDMI           R4, R0, R3                                             ; +0x16, 0x77bb0c\nBL              _ZN16EditorSFXManager11sharedStateEv; EditorSFXManager::sharedState(void) ; +0x18, 0x77bb0e\nLDR.W           R1, [R5,#0x2CC]; int                                   ; +0x1c, 0x77bb12\nBL              _ZN16EditorSFXManager15soundsForActionEi; EditorSFXManager::soundsForAction(int) ; +0x20, 0x77bb16\nASRS            R4, R4, #3                                             ; +0x24, 0x77bb1a\nMOV             R5, R0                                                 ; +0x26, 0x77bb1c\nCBZ             R0, locret_77BB4C                                      ; +0x28, 0x77bb1e\nCMP             R4, #0                                                 ; +0x2a, 0x77bb20\nBLT             locret_77BB4C                                          ; +0x2c, 0x77bb22\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x2e, 0x77bb24\nCMP             R4, R0                                                 ; +0x32, 0x77bb28\nBGE             locret_77BB4C                                          ; +0x34, 0x77bb2a\nMOV             R0, R5; this                                           ; +0x36, 0x77bb2c\nMOV             R1, R4; unsigned int                                   ; +0x38, 0x77bb2e\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x3a, 0x77bb30\nCBZ             R0, locret_77BB4C                                      ; +0x3e, 0x77bb34\nMOVS            R1, #0; SFXTriggerGameObject *                         ; +0x40, 0x77bb36\nMOVS            R2, #(dword_0+1); cocos2d::CCArray *                   ; +0x42, 0x77bb38\nBL              _ZN13SetupSFXPopup6createEP20SFXTriggerGameObjectPN7cocos2d7CCArrayEi; SetupSFXPopup::create(SFXTriggerGameObject *,cocos2d::CCArray *,int) ; +0x44, 0x77bb3a\nCBZ             R0, locret_77BB4C                                      ; +0x48, 0x77bb3e\nLDR             R3, [R0]                                               ; +0x4a, 0x77bb40\nPOP.W           {R4-R6,LR}                                             ; +0x4c, 0x77bb42\nLDR.W           R3, [R3,#0x290]                                        ; +0x50, 0x77bb46\nBX              R3                                                     ; +0x54, 0x77bb4a\nPOP             {R4-R6,PC}                                             ; +0x56, 0x77bb4c", "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"}