{"type": "func", "start": 4299083672, "end": 4299084188, "name": "EditorUI::getGroupCenter", "pseudocode": "// \n// EditorUI::getGroupCenter from 0x1003ecf98 to 0x1003ed19c (516 bytes)\n// \n// 11 xrefs:\n// > KeyframeGameObject::updateShadowObjects @ 0x10038b1d0\n// > EditorUI::repositionObjectsToCenter @ 0x1003eae28\n// > EditorUI::onCreateObject @ 0x1003eb77c\n// > EditorUI::rotateObjects @ 0x1003ed1f4\n// > EditorUI::activateRotationControl @ 0x1003ee404\n// > EditorUI::copyObjectsDetailed @ 0x1003ee948\n// > EditorUI::activateScaleControl @ 0x1003ef1d8\n// > EditorUI::scaleObjects @ 0x1003efa44\n// > EditorUI::activateTransformControl @ 0x1003efe34\n// > EditorUI::transformObjects @ 0x1003f0220\n// > EditorUI::alignObjects @ 0x1003f7a54\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\ncocos2d::CCPoint __fastcall EditorUI::getGroupCenter(EditorUI *a1, cocos2d::CCArray *a2, bool a3)\n{\n  __int64 *v3; // x8\n  __int64 *v6; // x19\n  GameObject *v7; // x20\n  __int64 *v8; // x0\n  __n128 v11; // q0\n  __n128 v12; // q1\n  GameObject *v13; // x22\n  unsigned int v14; // w23\n  float v15; // s11\n  float v16; // s12\n  float v17; // s13\n  float v18; // s14\n  GameObject *v19; // x24\n  float v20; // s8\n  float v21; // s9\n  float v22; // s10\n  float v23; // s0\n  GameObject *v26; // x10\n  _QWORD v27[2]; // [xsp+0h] [xbp-80h] BYREF\n  cocos2d::CCPoint result; // 0:s0.4,4:s1.4\n\n  v6 = v3;\n  if ( (unsigned int)sub_10024A36C((__int64)a2) == 1 )\n  {\n    v7 = (GameObject *)sub_10024A388((__int64)a2, 0);\n    GameObject::updateStartPos(v7);\n    v8 = (__int64 *)((__int64 (__fastcall *)(GameObject *))v7->getPosition)(v7);\n    result.x = sub_1000229B8(v6, v8);\n    return result;\n  }\n  if ( (unsigned int)sub_10024A36C((__int64)a2) )\n  {\n    v13 = nullptr;\n    v14 = 0;\n    v15 = 1000000.0;\n    v16 = -1000000.0;\n    v17 = -1000000.0;\n    v18 = 1000000.0;\n    do\n    {\n      v19 = (GameObject *)sub_10024A388((__int64)a2, v14);\n      GameObject::updateStartPos(v19);\n      ((void (__fastcall *)(_QWORD *__return_ptr, GameObject *, float, float))v19->getObjectRect_0)(v27, v19, 1.0, 1.0);\n      v20 = sub_100022C30((float *)v27);\n      v21 = sub_100022C40((__int64)v27);\n      v22 = sub_100022C48((__int64)v27);\n      v23 = sub_100022C58((__int64)v27);\n      if ( v20 > v16 )\n        v16 = v20;\n      if ( v21 < v15 || v15 == 0.0 )\n        v15 = v21;\n      if ( v22 > v17 )\n        v17 = v22;\n      if ( v23 < v18 || v18 == 0.0 )\n        v18 = v23;\n      if ( v13 )\n        v26 = v13;\n      else\n        v26 = v19;\n      if ( v19->m_hasGroupParent )\n      {\n        a3 |= v13 != nullptr;\n        v13 = v26;\n      }\n      ++v14;\n    }\n    while ( v14 < (unsigned int)sub_10024A36C((__int64)a2) );\n    if ( v13 != nullptr && !a3 )\n    {\n      ((void (__fastcall *)(GameObject *))v13->getRealPosition)(v13);\n      return result;\n    }\n  }\n  else\n  {\n    v15 = 1000000.0;\n    v16 = -1000000.0;\n    v17 = -1000000.0;\n    v18 = 1000000.0;\n  }\n  v11.n128_f32[0] = v15 + (float)((float)(v16 - v15) * 0.5);\n  v12.n128_f32[0] = v18 + (float)((float)(v17 - v18) * 0.5);\n  sub_100022980(v11, v12, v6);\n  return result;\n}", "assembly": "; \n; EditorUI::getGroupCenter from 0x1003ecf98 to 0x1003ed19c (516 bytes)\n; \n; 11 xrefs:\n; > KeyframeGameObject::updateShadowObjects @ 0x10038b1d0\n; > EditorUI::repositionObjectsToCenter @ 0x1003eae28\n; > EditorUI::onCreateObject @ 0x1003eb77c\n; > EditorUI::rotateObjects @ 0x1003ed1f4\n; > EditorUI::activateRotationControl @ 0x1003ee404\n; > EditorUI::copyObjectsDetailed @ 0x1003ee948\n; > EditorUI::activateScaleControl @ 0x1003ef1d8\n; > EditorUI::scaleObjects @ 0x1003efa44\n; > EditorUI::activateTransformControl @ 0x1003efe34\n; > EditorUI::transformObjects @ 0x1003f0220\n; > EditorUI::alignObjects @ 0x1003f7a54\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSUB             SP, SP, #0x90                                          ; +0x0, 0x1003ecf98\nSTP             D15, D14, [SP,#0x80+var_70]                            ; +0x4, 0x1003ecf9c\nSTP             D13, D12, [SP,#0x80+var_60]                            ; +0x8, 0x1003ecfa0\nSTP             D11, D10, [SP,#0x80+var_50]                            ; +0xc, 0x1003ecfa4\nSTP             D9, D8, [SP,#0x80+var_40]                              ; +0x10, 0x1003ecfa8\nSTP             X24, X23, [SP,#0x80+var_30]                            ; +0x14, 0x1003ecfac\nSTP             X22, X21, [SP,#0x80+var_20]                            ; +0x18, 0x1003ecfb0\nSTP             X20, X19, [SP,#0x80+var_10]                            ; +0x1c, 0x1003ecfb4\nSTP             X29, X30, [SP,#0x80+var_s0]                            ; +0x20, 0x1003ecfb8\nADD             X29, SP, #0x80                                         ; +0x24, 0x1003ecfbc\nMOV             X20, X2                                                ; +0x28, 0x1003ecfc0\nMOV             X21, X1                                                ; +0x2c, 0x1003ecfc4\nMOV             X19, X8                                                ; +0x30, 0x1003ecfc8\nMOV             X0, X1                                                 ; +0x34, 0x1003ecfcc\nBL              sub_10024A36C                                          ; +0x38, 0x1003ecfd0\nCMP             W0, #1                                                 ; +0x3c, 0x1003ecfd4\nB.NE            loc_1003ED030                                          ; +0x40, 0x1003ecfd8\nMOV             X0, X21                                                ; +0x44, 0x1003ecfdc\nMOV             W1, #0                                                 ; +0x48, 0x1003ecfe0\nBL              sub_10024A388                                          ; +0x4c, 0x1003ecfe4\nMOV             X20, X0                                                ; +0x50, 0x1003ecfe8\nBL              GameObject__updateStartPos                             ; +0x54, 0x1003ecfec\nLDR             X8, [X20]                                              ; +0x58, 0x1003ecff0\nLDR             X8, [X8,#0xC0]                                         ; +0x5c, 0x1003ecff4\nMOV             X0, X20                                                ; +0x60, 0x1003ecff8\nBLR             X8                                                     ; +0x64, 0x1003ecffc\nMOV             X1, X0                                                 ; +0x68, 0x1003ed000\nMOV             X0, X19                                                ; +0x6c, 0x1003ed004\nLDP             X29, X30, [SP,#0x80+var_s0]                            ; +0x70, 0x1003ed008\nLDP             X20, X19, [SP,#0x80+var_10]                            ; +0x74, 0x1003ed00c\nLDP             X22, X21, [SP,#0x80+var_20]                            ; +0x78, 0x1003ed010\nLDP             X24, X23, [SP,#0x80+var_30]                            ; +0x7c, 0x1003ed014\nLDP             D9, D8, [SP,#0x80+var_40]                              ; +0x80, 0x1003ed018\nLDP             D11, D10, [SP,#0x80+var_50]                            ; +0x84, 0x1003ed01c\nLDP             D13, D12, [SP,#0x80+var_60]                            ; +0x88, 0x1003ed020\nLDP             D15, D14, [SP,#0x80+var_70]                            ; +0x8c, 0x1003ed024\nADD             SP, SP, #0x90                                          ; +0x90, 0x1003ed028\nB               sub_1000229B8                                          ; +0x94, 0x1003ed02c\nMOV             X0, X21                                                ; +0x98, 0x1003ed030\nBL              sub_10024A36C                                          ; +0x9c, 0x1003ed034\nADRP            X9, #dword_1006462C8@PAGE                              ; +0xa0, 0x1003ed038\nADRP            X8, #dword_1006462CC@PAGE                              ; +0xa4, 0x1003ed03c\nCBZ             W0, loc_1003ED140                                      ; +0xa8, 0x1003ed040\nMOV             X22, #0                                                ; +0xac, 0x1003ed044\nMOV             W23, #0                                                ; +0xb0, 0x1003ed048\nLDR             S11, [X9,#dword_1006462C8@PAGEOFF]                     ; +0xb4, 0x1003ed04c\nLDR             S12, [X8,#dword_1006462CC@PAGEOFF]                     ; +0xb8, 0x1003ed050\nFMOV            S15, WZR                                               ; +0xbc, 0x1003ed054\nFMOV            S13, S12                                               ; +0xc0, 0x1003ed058\nFMOV            S14, S11                                               ; +0xc4, 0x1003ed05c\nMOV             X0, X21                                                ; +0xc8, 0x1003ed060\nMOV             X1, X23                                                ; +0xcc, 0x1003ed064\nBL              sub_10024A388                                          ; +0xd0, 0x1003ed068\nMOV             X24, X0                                                ; +0xd4, 0x1003ed06c\nBL              GameObject__updateStartPos                             ; +0xd8, 0x1003ed070\nLDR             X8, [X24]                                              ; +0xdc, 0x1003ed074\nLDR             X9, [X8,#0x528]                                        ; +0xe0, 0x1003ed078\nMOV             X8, SP                                                 ; +0xe4, 0x1003ed07c\nFMOV            S0, #1.0                                               ; +0xe8, 0x1003ed080\nFMOV            S1, #1.0                                               ; +0xec, 0x1003ed084\nMOV             X0, X24                                                ; +0xf0, 0x1003ed088\nBLR             X9                                                     ; +0xf4, 0x1003ed08c\nMOV             X0, SP                                                 ; +0xf8, 0x1003ed090\nBL              sub_100022C30                                          ; +0xfc, 0x1003ed094\nFMOV            S8, S0                                                 ; +0x100, 0x1003ed098\nMOV             X0, SP                                                 ; +0x104, 0x1003ed09c\nBL              sub_100022C40                                          ; +0x108, 0x1003ed0a0\nFMOV            S9, S0                                                 ; +0x10c, 0x1003ed0a4\nMOV             X0, SP                                                 ; +0x110, 0x1003ed0a8\nBL              sub_100022C48                                          ; +0x114, 0x1003ed0ac\nFMOV            S10, S0                                                ; +0x118, 0x1003ed0b0\nMOV             X0, SP                                                 ; +0x11c, 0x1003ed0b4\nBL              sub_100022C58                                          ; +0x120, 0x1003ed0b8\nFCMP            S8, S12                                                ; +0x124, 0x1003ed0bc\nFCSEL           S12, S8, S12, GT                                       ; +0x128, 0x1003ed0c0\nFCMP            S9, S11                                                ; +0x12c, 0x1003ed0c4\nFCCMP           S11, S15, #4, PL                                       ; +0x130, 0x1003ed0c8\nFCSEL           S11, S9, S11, EQ                                       ; +0x134, 0x1003ed0cc\nFCMP            S10, S13                                               ; +0x138, 0x1003ed0d0\nFCSEL           S13, S10, S13, GT                                      ; +0x13c, 0x1003ed0d4\nFCMP            S0, S14                                                ; +0x140, 0x1003ed0d8\nFCCMP           S14, S15, #4, PL                                       ; +0x144, 0x1003ed0dc\nFCSEL           S14, S0, S14, EQ                                       ; +0x148, 0x1003ed0e0\nLDRB            W8, [X24,#0x47E]                                       ; +0x14c, 0x1003ed0e4\nCMP             X22, #0                                                ; +0x150, 0x1003ed0e8\nCSET            W9, NE                                                 ; +0x154, 0x1003ed0ec\nORR             W9, W9, W20                                            ; +0x158, 0x1003ed0f0\nCSEL            X10, X22, X24, NE                                      ; +0x15c, 0x1003ed0f4\nCMP             W8, #1                                                 ; +0x160, 0x1003ed0f8\nCSEL            W20, W20, W9, NE                                       ; +0x164, 0x1003ed0fc\nCSEL            X22, X22, X10, NE                                      ; +0x168, 0x1003ed100\nADD             W23, W23, #1                                           ; +0x16c, 0x1003ed104\nMOV             X0, X21                                                ; +0x170, 0x1003ed108\nBL              sub_10024A36C                                          ; +0x174, 0x1003ed10c\nCMP             W23, W0                                                ; +0x178, 0x1003ed110\nB.CC            loc_1003ED060                                          ; +0x17c, 0x1003ed114\nCMP             X22, #0                                                ; +0x180, 0x1003ed118\nCSET            W8, EQ                                                 ; +0x184, 0x1003ed11c\nORR             W8, W8, W20                                            ; +0x188, 0x1003ed120\nTBNZ            W8, #0, loc_1003ED150                                  ; +0x18c, 0x1003ed124\nLDR             X8, [X22]                                              ; +0x190, 0x1003ed128\nLDR             X9, [X8,#0x540]                                        ; +0x194, 0x1003ed12c\nMOV             X8, X19                                                ; +0x198, 0x1003ed130\nMOV             X0, X22                                                ; +0x19c, 0x1003ed134\nBLR             X9                                                     ; +0x1a0, 0x1003ed138\nB               loc_1003ED174                                          ; +0x1a4, 0x1003ed13c\nLDR             S11, [X9,#dword_1006462C8@PAGEOFF]                     ; +0x1a8, 0x1003ed140\nLDR             S12, [X8,#dword_1006462CC@PAGEOFF]                     ; +0x1ac, 0x1003ed144\nFMOV            S13, S12                                               ; +0x1b0, 0x1003ed148\nFMOV            S14, S11                                               ; +0x1b4, 0x1003ed14c\nFSUB            S0, S12, S11                                           ; +0x1b8, 0x1003ed150\nFMOV            S1, #0.5                                               ; +0x1bc, 0x1003ed154\nFMUL            S0, S0, S1                                             ; +0x1c0, 0x1003ed158\nFADD            S0, S11, S0                                            ; +0x1c4, 0x1003ed15c\nFSUB            S2, S13, S14                                           ; +0x1c8, 0x1003ed160\nFMUL            S1, S2, S1                                             ; +0x1cc, 0x1003ed164\nFADD            S1, S14, S1                                            ; +0x1d0, 0x1003ed168\nMOV             X0, X19                                                ; +0x1d4, 0x1003ed16c\nBL              sub_100022980                                          ; +0x1d8, 0x1003ed170\nLDP             X29, X30, [SP,#0x80+var_s0]                            ; +0x1dc, 0x1003ed174\nLDP             X20, X19, [SP,#0x80+var_10]                            ; +0x1e0, 0x1003ed178\nLDP             X22, X21, [SP,#0x80+var_20]                            ; +0x1e4, 0x1003ed17c\nLDP             X24, X23, [SP,#0x80+var_30]                            ; +0x1e8, 0x1003ed180\nLDP             D9, D8, [SP,#0x80+var_40]                              ; +0x1ec, 0x1003ed184\nLDP             D11, D10, [SP,#0x80+var_50]                            ; +0x1f0, 0x1003ed188\nLDP             D13, D12, [SP,#0x80+var_60]                            ; +0x1f4, 0x1003ed18c\nLDP             D15, D14, [SP,#0x80+var_70]                            ; +0x1f8, 0x1003ed190\nADD             SP, SP, #0x90                                          ; +0x1fc, 0x1003ed194\nRET                                                                    ; +0x200, 0x1003ed198", "xrefs": ["KeyframeGameObject::updateShadowObjects @ 0x10038b1d0", "EditorUI::repositionObjectsToCenter @ 0x1003eae28", "EditorUI::onCreateObject @ 0x1003eb77c", "EditorUI::rotateObjects @ 0x1003ed1f4", "EditorUI::activateRotationControl @ 0x1003ee404", "EditorUI::copyObjectsDetailed @ 0x1003ee948", "EditorUI::activateScaleControl @ 0x1003ef1d8", "EditorUI::scaleObjects @ 0x1003efa44", "EditorUI::activateTransformControl @ 0x1003efe34", "EditorUI::transformObjects @ 0x1003f0220", "EditorUI::alignObjects @ 0x1003f7a54"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}