{"type": "func", "start": 12584420, "end": 12584952, "name": "EditorUI::getGroupCenter", "pseudocode": "// \n// EditorUI::getGroupCenter from 0xc005e4 to 0xc007f8 (532 bytes)\n// \n// 15 xrefs:\n// > EditorUI::onCreateObject @ 0x7ca48c\n// > KeyframeGameObject::updateShadowObjects @ 0x888e90\n// > EditorUI::handleEditorAction @ 0xbd7318\n// > EditorUI::repositionObjectsToCenter @ 0xbd8d28\n// > EditorUI::copyObjectsDetailed @ 0xbd92fc\n// > EditorUI::findObject @ 0xbdd878\n// > EditorUI::rotateObjects @ 0xc00d8c\n// > EditorUI::showTransformControl @ 0xc022a0\n// > EditorUI::activateRotationControl @ 0xc02468\n// > EditorUI::activateScaleControl @ 0xc02984\n// > EditorUI::alignObjectsOnAxis @ 0xc02dc8\n// > EditorUI::alignObjects @ 0xc0342c\n// > EditorUI::scaleObjects @ 0xc03900\n// > EditorUI::transformObjects @ 0xc03fb4\n// > <???> @ 0xb1778\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:03:48 +0000\n// \n\ncocos2d::CCPoint *__usercall EditorUI::getGroupCenter@<X0>(\n        cocos2d::CCPoint *__return_ptr a1@<X8>,\n        cocos2d::CCArray *a2@<X1>,\n        unsigned __int8 a3@<W2>)\n{\n  unsigned int v6; // w24\n  float v7; // s9\n  unsigned int v8; // w20\n  float v9; // s13\n  GameObject *v10; // x23\n  float v11; // s10\n  float v12; // s14\n  GameObject *v13; // x21\n  float v14; // s0\n  float v15; // s12\n  float v16; // s0\n  float v17; // s8\n  float v18; // s0\n  float v19; // s11\n  float v20; // s0\n  GameObject *v22; // x19\n  const cocos2d::CCPoint *v23; // x0\n  _BYTE v24[16]; // [xsp+A8h] [xbp+A8h] BYREF\n\n  v6 = a3;\n  if ( (unsigned int)cocos2d::CCArray::count(a2) == 1 )\n  {\n    v22 = (GameObject *)cocos2d::CCArray::objectAtIndex(a2, 0);\n    GameObject::updateStartPos(v22);\n    v23 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(GameObject *))(*(_QWORD *)v22 + 192LL))(v22);\n    cocos2d::CCPoint::CCPoint(a1, v23);\n  }\n  else\n  {\n    v7 = 1000000.0;\n    v8 = 0;\n    v9 = -1000000.0;\n    v10 = nullptr;\n    v11 = 1000000.0;\n    v12 = -1000000.0;\n    while ( v8 < (unsigned int)cocos2d::CCArray::count(a2) )\n    {\n      v13 = (GameObject *)cocos2d::CCArray::objectAtIndex(a2, v8);\n      GameObject::updateStartPos(v13);\n      (*(void (__fastcall **)(GameObject *, float, float))(*(_QWORD *)v13 + 1336LL))(v13, 1.0, 1.0);\n      cocos2d::CCRect::getMaxX((cocos2d::CCRect *)v24);\n      v15 = v14;\n      cocos2d::CCRect::getMinX((cocos2d::CCRect *)v24);\n      v17 = v16;\n      cocos2d::CCRect::getMaxY((cocos2d::CCRect *)v24);\n      v19 = v18;\n      cocos2d::CCRect::getMinY((cocos2d::CCRect *)v24);\n      if ( v12 < v15 )\n        v12 = v15;\n      if ( v11 <= v17 && v11 != 0.0 )\n        v17 = v11;\n      if ( v9 < v19 )\n        v9 = v19;\n      if ( v7 <= v20 && v7 != 0.0 )\n        v20 = v7;\n      if ( *((_BYTE *)v13 + 1150) )\n      {\n        if ( v10 )\n          v6 = 1;\n        else\n          v10 = v13;\n      }\n      v7 = v20;\n      ++v8;\n      v11 = v17;\n    }\n    if ( (v10 != nullptr) > v6 )\n    {\n      (*(void (__fastcall **)(GameObject *))(*(_QWORD *)v10 + 1360LL))(v10);\n    }\n    else\n    {\n      cocos2d::CCPoint::CCPoint(\n        (cocos2d::CCPoint *)v24,\n        v11 + (float)((float)(v12 - v11) * 0.5),\n        v7 + (float)((float)(v9 - v7) * 0.5));\n      cocos2d::CCPoint::CCPoint(a1, (const cocos2d::CCPoint *)v24);\n    }\n  }\n  return a1;\n}", "assembly": "; \n; EditorUI::getGroupCenter from 0xc005e4 to 0xc007f8 (532 bytes)\n; \n; 15 xrefs:\n; > EditorUI::onCreateObject @ 0x7ca48c\n; > KeyframeGameObject::updateShadowObjects @ 0x888e90\n; > EditorUI::handleEditorAction @ 0xbd7318\n; > EditorUI::repositionObjectsToCenter @ 0xbd8d28\n; > EditorUI::copyObjectsDetailed @ 0xbd92fc\n; > EditorUI::findObject @ 0xbdd878\n; > EditorUI::rotateObjects @ 0xc00d8c\n; > EditorUI::showTransformControl @ 0xc022a0\n; > EditorUI::activateRotationControl @ 0xc02468\n; > EditorUI::activateScaleControl @ 0xc02984\n; > EditorUI::alignObjectsOnAxis @ 0xc02dc8\n; > EditorUI::alignObjects @ 0xc0342c\n; > EditorUI::scaleObjects @ 0xc03900\n; > EditorUI::transformObjects @ 0xc03fb4\n; > <???> @ 0xb1778\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:03:48 +0000\n; \nSTP             X29, X30, [SP,#var_C0]!                                ; +0x0, 0xc005e4\nMOV             X0, X1; this                                           ; +0x4, 0xc005e8\nMOV             X29, SP                                                ; +0x8, 0xc005ec\nSTP             X25, X26, [SP,#0xC0+var_80]                            ; +0xc, 0xc005f0\nSTP             D8, D9, [SP,#0xC0+var_70]                              ; +0x10, 0xc005f4\nADRP            X25, #__stack_chk_guard_ptr@PAGE                       ; +0x14, 0xc005f8\nSTP             D10, D11, [SP,#0xC0+var_60]                            ; +0x18, 0xc005fc\nSTP             D12, D13, [SP,#0xC0+var_50]                            ; +0x1c, 0xc00600\nSTP             X21, X22, [SP,#0xC0+var_A0]                            ; +0x20, 0xc00604\nMOV             X22, X1                                                ; +0x24, 0xc00608\nMOV             X26, X8                                                ; +0x28, 0xc0060c\nLDR             X1, [X25,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x2c, 0xc00610\nSTP             X23, X24, [SP,#0xC0+var_90]                            ; +0x30, 0xc00614\nSTP             X19, X20, [SP,#0xC0+var_B0]                            ; +0x34, 0xc00618\nSTR             D14, [SP,#0xC0+var_40]                                 ; +0x38, 0xc0061c\nUXTB            W24, W2                                                ; +0x3c, 0xc00620\nLDR             X1, [X1]                                               ; +0x40, 0xc00624\nSTR             X1, [X29,#0xC0+var_8]                                  ; +0x44, 0xc00628\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x48, 0xc0062c\nCMP             W0, #1                                                 ; +0x4c, 0xc00630\nB.EQ            loc_C007C0                                             ; +0x50, 0xc00634\nLDR             S9, =0x497423F0                                        ; +0x54, 0xc00638\nMOV             W20, #0                                                ; +0x58, 0xc0063c\nLDR             S13, =0xC97423F0                                       ; +0x5c, 0xc00640\nMOV             X23, #0                                                ; +0x60, 0xc00644\nADD             X19, X29, #0xC0+var_18                                 ; +0x64, 0xc00648\nFMOV            S10, S9                                                ; +0x68, 0xc0064c\nFMOV            S14, S13                                               ; +0x6c, 0xc00650\nB               loc_C00710                                             ; +0x70, 0xc00654\nMOV             W1, W20; unsigned int                                  ; +0x74, 0xc00658\nMOV             X0, X22; this                                          ; +0x78, 0xc0065c\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x7c, 0xc00660\nMOV             X21, X0                                                ; +0x80, 0xc00664\nBL              _ZN10GameObject14updateStartPosEv; GameObject::updateStartPos(void) ; +0x84, 0xc00668\nFMOV            S0, #1.0                                               ; +0x88, 0xc0066c\nMOV             X8, X19                                                ; +0x8c, 0xc00670\nLDR             X1, [X21]                                              ; +0x90, 0xc00674\nMOV             X0, X21                                                ; +0x94, 0xc00678\nFMOV            S1, S0                                                 ; +0x98, 0xc0067c\nLDR             X1, [X1,#0x538]                                        ; +0x9c, 0xc00680\nBLR             X1                                                     ; +0xa0, 0xc00684\nMOV             X0, X19; this                                          ; +0xa4, 0xc00688\nBL              _ZNK7cocos2d6CCRect7getMaxXEv; cocos2d::CCRect::getMaxX(void) ; +0xa8, 0xc0068c\nFMOV            S12, S0                                                ; +0xac, 0xc00690\nMOV             X0, X19; this                                          ; +0xb0, 0xc00694\nBL              _ZNK7cocos2d6CCRect7getMinXEv; cocos2d::CCRect::getMinX(void) ; +0xb4, 0xc00698\nFMOV            S8, S0                                                 ; +0xb8, 0xc0069c\nMOV             X0, X19; this                                          ; +0xbc, 0xc006a0\nBL              _ZNK7cocos2d6CCRect7getMaxYEv; cocos2d::CCRect::getMaxY(void) ; +0xc0, 0xc006a4\nFMOV            S11, S0                                                ; +0xc4, 0xc006a8\nMOV             X0, X19; this                                          ; +0xc8, 0xc006ac\nBL              _ZNK7cocos2d6CCRect7getMinYEv; cocos2d::CCRect::getMinY(void) ; +0xcc, 0xc006b0\nFCMPE           S14, S12                                               ; +0xd0, 0xc006b4\nB.PL            loc_C006C0                                             ; +0xd4, 0xc006b8\nFMOV            S14, S12                                               ; +0xd8, 0xc006bc\nFCMPE           S10, S8                                                ; +0xdc, 0xc006c0\nB.GT            loc_C006D4                                             ; +0xe0, 0xc006c4\nFCMP            S10, #0.0                                              ; +0xe4, 0xc006c8\nB.EQ            loc_C006D4                                             ; +0xe8, 0xc006cc\nFMOV            S8, S10                                                ; +0xec, 0xc006d0\nFCMPE           S13, S11                                               ; +0xf0, 0xc006d4\nB.PL            loc_C006E0                                             ; +0xf4, 0xc006d8\nFMOV            S13, S11                                               ; +0xf8, 0xc006dc\nFCMPE           S9, S0                                                 ; +0xfc, 0xc006e0\nB.GT            loc_C006F4                                             ; +0x100, 0xc006e4\nFCMP            S9, #0.0                                               ; +0x104, 0xc006e8\nB.EQ            loc_C006F4                                             ; +0x108, 0xc006ec\nFMOV            S0, S9                                                 ; +0x10c, 0xc006f0\nLDRB            W0, [X21,#0x47E]                                       ; +0x110, 0xc006f4\nCBZ             W0, loc_C00704                                         ; +0x114, 0xc006f8\nCBZ             X23, loc_C007A0                                        ; +0x118, 0xc006fc\nMOV             W24, #1                                                ; +0x11c, 0xc00700\nFMOV            S9, S0                                                 ; +0x120, 0xc00704\nADD             W20, W20, #1                                           ; +0x124, 0xc00708\nFMOV            S10, S8                                                ; +0x128, 0xc0070c\nMOV             X0, X22; this                                          ; +0x12c, 0xc00710\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x130, 0xc00714\nCMP             W20, W0                                                ; +0x134, 0xc00718\nB.CC            loc_C00658                                             ; +0x138, 0xc0071c\nCMP             X23, XZR                                               ; +0x13c, 0xc00720\nCSET            W0, NE                                                 ; +0x140, 0xc00724\nCMP             W0, W24                                                ; +0x144, 0xc00728\nB.HI            loc_C007A8                                             ; +0x148, 0xc0072c\nFSUB            S0, S14, S10                                           ; +0x14c, 0xc00730\nADD             X1, X29, #0xC0+var_18                                  ; +0x150, 0xc00734\nFSUB            S13, S13, S9                                           ; +0x154, 0xc00738\nMOV             X0, X1; this                                           ; +0x158, 0xc0073c\nFMOV            S1, #0.5                                               ; +0x15c, 0xc00740\nSTR             X1, [X29,#0xC0+var_28]                                 ; +0x160, 0xc00744\nFMADD           S0, S0, S1, S10; float                                 ; +0x164, 0xc00748\nFMADD           S1, S13, S1, S9; float                                 ; +0x168, 0xc0074c\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x16c, 0xc00750\nLDR             X1, [X29,#0xC0+var_28]; cocos2d::CCPoint *             ; +0x170, 0xc00754\nMOV             X0, X26; this                                          ; +0x174, 0xc00758\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x178, 0xc0075c\nLDR             X25, [X25,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x17c, 0xc00760\nMOV             X0, X26                                                ; +0x180, 0xc00764\nLDR             X2, [X29,#0xC0+var_8]                                  ; +0x184, 0xc00768\nLDR             X1, [X25]                                              ; +0x188, 0xc0076c\nCMP             X2, X1                                                 ; +0x18c, 0xc00770\nB.NE            loc_C007F4                                             ; +0x190, 0xc00774\nLDP             X19, X20, [SP,#0xC0+var_B0]                            ; +0x194, 0xc00778\nLDP             D8, D9, [SP,#0xC0+var_70]                              ; +0x198, 0xc0077c\nLDP             X21, X22, [SP,#0xC0+var_A0]                            ; +0x19c, 0xc00780\nLDP             D10, D11, [SP,#0xC0+var_60]                            ; +0x1a0, 0xc00784\nLDP             X23, X24, [SP,#0xC0+var_90]                            ; +0x1a4, 0xc00788\nLDP             D12, D13, [SP,#0xC0+var_50]                            ; +0x1a8, 0xc0078c\nLDP             X25, X26, [SP,#0xC0+var_80]                            ; +0x1ac, 0xc00790\nLDR             D14, [SP,#0xC0+var_40]                                 ; +0x1b0, 0xc00794\nLDP             X29, X30, [SP+0xC0+var_C0],#0xC0                       ; +0x1b4, 0xc00798\nRET                                                                    ; +0x1b8, 0xc0079c\nMOV             X23, X21                                               ; +0x1bc, 0xc007a0\nB               loc_C00704                                             ; +0x1c0, 0xc007a4\nLDR             X1, [X23]                                              ; +0x1c4, 0xc007a8\nMOV             X8, X26                                                ; +0x1c8, 0xc007ac\nMOV             X0, X23                                                ; +0x1cc, 0xc007b0\nLDR             X1, [X1,#0x550]                                        ; +0x1d0, 0xc007b4\nBLR             X1                                                     ; +0x1d4, 0xc007b8\nB               loc_C00760                                             ; +0x1d8, 0xc007bc\nMOV             W1, #0; unsigned int                                   ; +0x1dc, 0xc007c0\nMOV             X0, X22; this                                          ; +0x1e0, 0xc007c4\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x1e4, 0xc007c8\nMOV             X19, X0                                                ; +0x1e8, 0xc007cc\nBL              _ZN10GameObject14updateStartPosEv; GameObject::updateStartPos(void) ; +0x1ec, 0xc007d0\nMOV             X0, X19                                                ; +0x1f0, 0xc007d4\nLDR             X1, [X19]                                              ; +0x1f4, 0xc007d8\nLDR             X1, [X1,#0xC0]                                         ; +0x1f8, 0xc007dc\nBLR             X1                                                     ; +0x1fc, 0xc007e0\nMOV             X1, X0; cocos2d::CCPoint *                             ; +0x200, 0xc007e4\nMOV             X0, X26; this                                          ; +0x204, 0xc007e8\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x208, 0xc007ec\nB               loc_C00760                                             ; +0x20c, 0xc007f0\nBL              .__stack_chk_fail                                      ; +0x210, 0xc007f4", "xrefs": ["EditorUI::onCreateObject @ 0x7ca48c", "KeyframeGameObject::updateShadowObjects @ 0x888e90", "EditorUI::handleEditorAction @ 0xbd7318", "EditorUI::repositionObjectsToCenter @ 0xbd8d28", "EditorUI::copyObjectsDetailed @ 0xbd92fc", "EditorUI::findObject @ 0xbdd878", "EditorUI::rotateObjects @ 0xc00d8c", "EditorUI::showTransformControl @ 0xc022a0", "EditorUI::activateRotationControl @ 0xc02468", "EditorUI::activateScaleControl @ 0xc02984", "EditorUI::alignObjectsOnAxis @ 0xc02dc8", "EditorUI::alignObjects @ 0xc0342c", "EditorUI::scaleObjects @ 0xc03900", "EditorUI::transformObjects @ 0xc03fb4", "<???> @ 0xb1778"], "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"}