{"type": "func", "start": 7395136, "end": 7395504, "name": "EditorUI::getGroupCenter", "pseudocode": "// \n// EditorUI::getGroupCenter from 0x70d740 to 0x70d8b0 (368 bytes)\n// \n// 14 xrefs:\n// > EditorUI::onCreateObject @ 0x4875f0\n// > KeyframeGameObject::updateShadowObjects @ 0x4ec71c\n// > EditorUI::handleEditorAction @ 0x6f205e\n// > EditorUI::repositionObjectsToCenter @ 0x6f2976\n// > EditorUI::copyObjectsDetailed @ 0x6f2c34\n// > EditorUI::findObject @ 0x6f4d40\n// > EditorUI::rotateObjects @ 0x70dca2\n// > EditorUI::showTransformControl @ 0x70ea98\n// > EditorUI::activateRotationControl @ 0x70ebdc\n// > EditorUI::activateScaleControl @ 0x70eefc\n// > EditorUI::alignObjectsOnAxis @ 0x70f136\n// > EditorUI::alignObjects @ 0x70f434\n// > EditorUI::scaleObjects @ 0x70f89c\n// > EditorUI::transformObjects @ 0x70fba0\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:57:42 +0000\n// \n\nEditorUI *__fastcall EditorUI::getGroupCenter(EditorUI *this, cocos2d::CCArray *a2, cocos2d::CCArray *a3, int a4)\n{\n  float v7; // s16\n  unsigned int v8; // r6\n  GameObject *v9; // r5\n  float v10; // s17\n  float v11; // s18\n  float v12; // s19\n  GameObject *v13; // r5\n  float v14; // r1\n  float v15; // r2\n  int v16; // r3\n  const cocos2d::CCPoint *v17; // r1\n  cocos2d::CCPoint *v18; // r0\n  GameObject *v19; // r10\n  float v20; // r1\n  float v21; // r2\n  int v22; // r3\n  float v23; // s22\n  float v24; // s20\n  float v25; // s21\n  float v26; // r0\n  float v27; // s15\n  _BYTE v29[16]; // [sp+4h] [bp-18h] BYREF\n\n  if ( cocos2d::CCArray::count(a3) == 1 )\n  {\n    v13 = (GameObject *)cocos2d::CCArray::objectAtIndex(a3, 0);\n    GameObject::updateStartPos(v13, v14, v15, v16);\n    v17 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(GameObject *))(*(_DWORD *)v13 + 96))(v13);\n    v18 = this;\nLABEL_25:\n    cocos2d::CCPoint::CCPoint(v18, v17);\n    return this;\n  }\n  v7 = 1000000.0;\n  v8 = 0;\n  v9 = nullptr;\n  v10 = -1000000.0;\n  v11 = 1000000.0;\n  v12 = -1000000.0;\n  while ( v8 < cocos2d::CCArray::count(a3) )\n  {\n    v19 = (GameObject *)cocos2d::CCArray::objectAtIndex(a3, v8);\n    GameObject::updateStartPos(v19, v20, v21, v22);\n    (*(void (__fastcall **)(_BYTE *, GameObject *, int, int))(*(_DWORD *)v19 + 668))(v29, v19, 1065353216, 1065353216);\n    v23 = COERCE_FLOAT(cocos2d::CCRect::getMaxX((cocos2d::CCRect *)v29));\n    v24 = COERCE_FLOAT(cocos2d::CCRect::getMinX((cocos2d::CCRect *)v29));\n    v25 = COERCE_FLOAT(cocos2d::CCRect::getMaxY((cocos2d::CCRect *)v29));\n    v26 = COERCE_FLOAT(cocos2d::CCRect::getMinY((cocos2d::CCRect *)v29));\n    if ( v23 > v12 )\n      v12 = v23;\n    v27 = v26;\n    if ( v24 >= v11 && v11 != 0.0 )\n      v24 = v11;\n    if ( v25 > v10 )\n      v10 = v25;\n    if ( v26 >= v7 && v7 != 0.0 )\n      v27 = v7;\n    if ( *((_BYTE *)v19 + 1006) )\n    {\n      if ( v9 )\n        a4 = 1;\n      else\n        v9 = v19;\n    }\n    v7 = v27;\n    ++v8;\n    v11 = v24;\n  }\n  if ( !v9 || a4 )\n  {\n    cocos2d::CCPoint::CCPoint(\n      (cocos2d::CCPoint *)v29,\n      v11 + (float)((float)(v12 - v11) * 0.5),\n      v7 + (float)((float)(v10 - v7) * 0.5));\n    v18 = this;\n    v17 = (const cocos2d::CCPoint *)v29;\n    goto LABEL_25;\n  }\n  (*(void (__fastcall **)(EditorUI *, GameObject *))(*(_DWORD *)v9 + 680))(this, v9);\n  return this;\n}", "assembly": "; \n; EditorUI::getGroupCenter from 0x70d740 to 0x70d8b0 (368 bytes)\n; \n; 14 xrefs:\n; > EditorUI::onCreateObject @ 0x4875f0\n; > KeyframeGameObject::updateShadowObjects @ 0x4ec71c\n; > EditorUI::handleEditorAction @ 0x6f205e\n; > EditorUI::repositionObjectsToCenter @ 0x6f2976\n; > EditorUI::copyObjectsDetailed @ 0x6f2c34\n; > EditorUI::findObject @ 0x6f4d40\n; > EditorUI::rotateObjects @ 0x70dca2\n; > EditorUI::showTransformControl @ 0x70ea98\n; > EditorUI::activateRotationControl @ 0x70ebdc\n; > EditorUI::activateScaleControl @ 0x70eefc\n; > EditorUI::alignObjectsOnAxis @ 0x70f136\n; > EditorUI::alignObjects @ 0x70f434\n; > EditorUI::scaleObjects @ 0x70f89c\n; > EditorUI::transformObjects @ 0x70fba0\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:57:42 +0000\n; \nPUSH.W          {R4-R11,LR}                                            ; +0x0, 0x70d740\nMOV             R11, R3                                                ; +0x4, 0x70d744\nVPUSH           {D8-D11}                                               ; +0x6, 0x70d746\nMOV             R8, R0                                                 ; +0xa, 0x70d74a\nLDR             R4, =(__stack_chk_guard_ptr - 0x70D756)                ; +0xc, 0x70d74c\nMOV             R0, R2; this                                           ; +0xe, 0x70d74e\nMOV             R9, R2                                                 ; +0x10, 0x70d750\nADD             R4, PC; __stack_chk_guard_ptr                          ; +0x12, 0x70d752\nLDR             R4, [R4]; __stack_chk_guard                            ; +0x14, 0x70d754\nSUB             SP, SP, #0x1C                                          ; +0x16, 0x70d756\nLDR             R3, [R4]                                               ; +0x18, 0x70d758\nSTR             R3, [SP,#0x1C+var_8]                                   ; +0x1a, 0x70d75a\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x1c, 0x70d75c\nCMP             R0, #1                                                 ; +0x20, 0x70d760\nBEQ             loc_70D77C                                             ; +0x22, 0x70d762\nVLDR            S16, =1000000.0                                        ; +0x24, 0x70d764\nMOVS            R6, #0                                                 ; +0x28, 0x70d768\nMOV             R5, R6                                                 ; +0x2a, 0x70d76a\nADD             R7, SP, #0x1C+var_18                                   ; +0x2c, 0x70d76c\nVLDR            S17, =-1000000.0                                       ; +0x2e, 0x70d76e\nVMOV.F32        S18, S16                                               ; +0x32, 0x70d772\nVMOV.F32        S19, S17                                               ; +0x36, 0x70d776\nB               loc_70D83E                                             ; +0x3a, 0x70d77a\nMOVS            R1, #0; unsigned int                                   ; +0x3c, 0x70d77c\nMOV             R0, R9; this                                           ; +0x3e, 0x70d77e\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x40, 0x70d780\nMOV             R5, R0                                                 ; +0x44, 0x70d784\nBL              _ZN10GameObject14updateStartPosEv; GameObject::updateStartPos(void) ; +0x46, 0x70d786\nLDR             R3, [R5]                                               ; +0x4a, 0x70d78a\nMOV             R0, R5                                                 ; +0x4c, 0x70d78c\nLDR             R3, [R3,#0x60]                                         ; +0x4e, 0x70d78e\nBLX             R3                                                     ; +0x50, 0x70d790\nMOV             R1, R0                                                 ; +0x52, 0x70d792\nMOV             R0, R8                                                 ; +0x54, 0x70d794\nB               loc_70D894                                             ; +0x56, 0x70d796\nMOV             R1, R6; unsigned int                                   ; +0x58, 0x70d798\nMOV             R0, R9; this                                           ; +0x5a, 0x70d79a\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x5c, 0x70d79c\nMOV             R10, R0                                                ; +0x60, 0x70d7a0\nBL              _ZN10GameObject14updateStartPosEv; GameObject::updateStartPos(void) ; +0x62, 0x70d7a2\nLDR.W           R3, [R10]                                              ; +0x66, 0x70d7a6\nMOV.W           R2, #0x3F800000                                        ; +0x6a, 0x70d7aa\nMOV             R1, R10                                                ; +0x6e, 0x70d7ae\nMOV             R0, R7                                                 ; +0x70, 0x70d7b0\nLDR.W           R12, [R3,#0x29C]                                       ; +0x72, 0x70d7b2\nMOV             R3, R2                                                 ; +0x76, 0x70d7b6\nBLX             R12                                                    ; +0x78, 0x70d7b8\nMOV             R0, R7; this                                           ; +0x7a, 0x70d7ba\nBL              _ZNK7cocos2d6CCRect7getMaxXEv; cocos2d::CCRect::getMaxX(void) ; +0x7c, 0x70d7bc\nVMOV            S22, R0                                                ; +0x80, 0x70d7c0\nMOV             R0, R7; this                                           ; +0x84, 0x70d7c4\nBL              _ZNK7cocos2d6CCRect7getMinXEv; cocos2d::CCRect::getMinX(void) ; +0x86, 0x70d7c6\nVMOV            S20, R0                                                ; +0x8a, 0x70d7ca\nMOV             R0, R7; this                                           ; +0x8e, 0x70d7ce\nBL              _ZNK7cocos2d6CCRect7getMaxYEv; cocos2d::CCRect::getMaxY(void) ; +0x90, 0x70d7d0\nVMOV            S21, R0                                                ; +0x94, 0x70d7d4\nMOV             R0, R7; this                                           ; +0x98, 0x70d7d8\nBL              _ZNK7cocos2d6CCRect7getMinYEv; cocos2d::CCRect::getMinY(void) ; +0x9a, 0x70d7da\nVCMP.F32        S22, S19                                               ; +0x9e, 0x70d7de\nVMRS            APSR_nzcv, FPSCR                                       ; +0xa2, 0x70d7e2\nVCMPE.F32       S20, S18                                               ; +0xa6, 0x70d7e6\nIT GT                                                                  ; +0xaa, 0x70d7ea\nVMOVGT.F32      S19, S22                                               ; +0xac, 0x70d7ec\nVMRS            APSR_nzcv, FPSCR                                       ; +0xb0, 0x70d7f0\nVMOV            S15, R0                                                ; +0xb4, 0x70d7f4\nBMI             loc_70D808                                             ; +0xb8, 0x70d7f8\nVCMP.F32        S18, #0.0                                              ; +0xba, 0x70d7fa\nVMRS            APSR_nzcv, FPSCR                                       ; +0xbe, 0x70d7fe\nIT NE                                                                  ; +0xc2, 0x70d802\nVMOVNE.F32      S20, S18                                               ; +0xc4, 0x70d804\nVCMP.F32        S21, S17                                               ; +0xc8, 0x70d808\nVMRS            APSR_nzcv, FPSCR                                       ; +0xcc, 0x70d80c\nVCMPE.F32       S15, S16                                               ; +0xd0, 0x70d810\nIT GT                                                                  ; +0xd4, 0x70d814\nVMOVGT.F32      S17, S21                                               ; +0xd6, 0x70d816\nVMRS            APSR_nzcv, FPSCR                                       ; +0xda, 0x70d81a\nBMI             loc_70D82E                                             ; +0xde, 0x70d81e\nVCMP.F32        S16, #0.0                                              ; +0xe0, 0x70d820\nVMRS            APSR_nzcv, FPSCR                                       ; +0xe4, 0x70d824\nIT NE                                                                  ; +0xe8, 0x70d828\nVMOVNE.F32      S15, S16                                               ; +0xea, 0x70d82a\nLDRB.W          R3, [R10,#0x3EE]                                       ; +0xee, 0x70d82e\nCBNZ            R3, loc_70D84A                                         ; +0xf2, 0x70d832\nVMOV.F32        S16, S15                                               ; +0xf4, 0x70d834\nADDS            R6, #1                                                 ; +0xf8, 0x70d838\nVMOV.F32        S18, S20                                               ; +0xfa, 0x70d83a\nMOV             R0, R9; this                                           ; +0xfe, 0x70d83e\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x100, 0x70d840\nCMP             R6, R0                                                 ; +0x104, 0x70d844\nBCC             loc_70D798                                             ; +0x106, 0x70d846\nB               loc_70D856                                             ; +0x108, 0x70d848\nCBNZ            R5, loc_70D850                                         ; +0x10a, 0x70d84a\nMOV             R5, R10                                                ; +0x10c, 0x70d84c\nB               loc_70D834                                             ; +0x10e, 0x70d84e\nMOV.W           R11, #1                                                ; +0x110, 0x70d850\nB               loc_70D834                                             ; +0x114, 0x70d854\nCBZ             R5, loc_70D86C                                         ; +0x116, 0x70d856\nCMP.W           R11, #0                                                ; +0x118, 0x70d858\nBNE             loc_70D86C                                             ; +0x11c, 0x70d85c\nLDR             R3, [R5]                                               ; +0x11e, 0x70d85e\nMOV             R0, R8                                                 ; +0x120, 0x70d860\nMOV             R1, R5                                                 ; +0x122, 0x70d862\nLDR.W           R3, [R3,#0x2A8]                                        ; +0x124, 0x70d864\nBLX             R3                                                     ; +0x128, 0x70d868\nB               loc_70D898                                             ; +0x12a, 0x70d86a\nVMOV.F32        S15, #0.5                                              ; +0x12c, 0x70d86c\nADD             R5, SP, #0x1C+var_18                                   ; +0x130, 0x70d870\nMOV             R0, R5; this                                           ; +0x132, 0x70d872\nVSUB.F32        S19, S19, S18                                          ; +0x134, 0x70d874\nVSUB.F32        S17, S17, S16                                          ; +0x138, 0x70d878\nVMLA.F32        S18, S19, S15                                          ; +0x13c, 0x70d87c\nVMLA.F32        S16, S17, S15                                          ; +0x140, 0x70d880\nVMOV            R1, S18; float                                         ; +0x144, 0x70d884\nVMOV            R2, S16; float                                         ; +0x148, 0x70d888\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x14c, 0x70d88c\nMOV             R0, R8; this                                           ; +0x150, 0x70d890\nMOV             R1, R5; cocos2d::CCPoint *                             ; +0x152, 0x70d892\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x154, 0x70d894\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0x158, 0x70d898\nMOV             R0, R8                                                 ; +0x15a, 0x70d89a\nLDR             R3, [R4]                                               ; +0x15c, 0x70d89c\nCMP             R2, R3                                                 ; +0x15e, 0x70d89e\nBEQ             loc_70D8A6                                             ; +0x160, 0x70d8a0\nBLX             __stack_chk_fail                                       ; +0x162, 0x70d8a2\nADD             SP, SP, #0x1C                                          ; +0x166, 0x70d8a6\nVPOP            {D8-D11}                                               ; +0x168, 0x70d8a8\nPOP.W           {R4-R11,PC}                                            ; +0x16c, 0x70d8ac", "xrefs": ["EditorUI::onCreateObject @ 0x4875f0", "KeyframeGameObject::updateShadowObjects @ 0x4ec71c", "EditorUI::handleEditorAction @ 0x6f205e", "EditorUI::repositionObjectsToCenter @ 0x6f2976", "EditorUI::copyObjectsDetailed @ 0x6f2c34", "EditorUI::findObject @ 0x6f4d40", "EditorUI::rotateObjects @ 0x70dca2", "EditorUI::showTransformControl @ 0x70ea98", "EditorUI::activateRotationControl @ 0x70ebdc", "EditorUI::activateScaleControl @ 0x70eefc", "EditorUI::alignObjectsOnAxis @ 0x70f136", "EditorUI::alignObjects @ 0x70f434", "EditorUI::scaleObjects @ 0x70f89c", "EditorUI::transformObjects @ 0x70fba0"], "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"}