{"type": "func", "start": 3676368, "end": 3676482, "name": "EditorUI::repositionObjectsToCenter", "pseudocode": "// \n// EditorUI::repositionObjectsToCenter from 0x3818d0 to 0x381942 (114 bytes)\n// \n// 7 xrefs:\n// > EditorUI::spriteFromObjectString @ 0x387ad2\n// > EditorUI::onCreateObject @ 0x3a3e5c\n// > EditorUI::createPrefab @ 0x3a42b4\n// > EditorUI::createSmartObjectsFromTemplate @ 0x3a5374\n// > EditorUI::createSmartObjectsFromTemplate @ 0x3a53d6\n// > EditorUI::doPasteObjects @ 0x3a5f44\n// > SetupSmartBlockLayer::onPasteTemplate @ 0x53d49e\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\nvoid EditorUI::repositionObjectsToCenter(EditorUI *a1, cocos2d::CCArray *a2, cocos2d::CCPoint a3, bool a4)\n{\n  float x; // r9\n  unsigned int v7; // r5\n  GameObject *v8; // r0\n  GameObject *v9; // r10\n  cocos2d::CCPoint v10; // r2\n  cocos2d::CCPoint v11; // [sp+4h] [bp-1Ch] BYREF\n  cocos2d::CCPoint v12; // [sp+Ch] [bp-14h] BYREF\n  cocos2d::CCPoint v13; // [sp+14h] [bp-Ch] BYREF\n\n  x = a3.x;\n  EditorUI::getGroupCenter(&v11, a1, a2, SLOBYTE(a3.y));\n  cocos2d::CCPoint::operator-(&v12, LODWORD(x), &v11);\n  v7 = 0;\n  while ( v7 < cocos2d::CCArray::count(a2) )\n  {\n    v8 = (GameObject *)cocos2d::CCArray::objectAtIndex(a2, v7++);\n    v9 = v8;\n    cocos2d::CCPoint::CCPoint(&v13, &v12);\n    LODWORD(v10.x) = &v13;\n    EditorUI::moveObject(a1, v9, v10);\n  }\n}", "assembly": "; \n; EditorUI::repositionObjectsToCenter from 0x3818d0 to 0x381942 (114 bytes)\n; \n; 7 xrefs:\n; > EditorUI::spriteFromObjectString @ 0x387ad2\n; > EditorUI::onCreateObject @ 0x3a3e5c\n; > EditorUI::createPrefab @ 0x3a42b4\n; > EditorUI::createSmartObjectsFromTemplate @ 0x3a5374\n; > EditorUI::createSmartObjectsFromTemplate @ 0x3a53d6\n; > EditorUI::doPasteObjects @ 0x3a5f44\n; > SetupSmartBlockLayer::onPasteTemplate @ 0x53d49e\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\nPUSH.W          {R4-R10,LR}                                            ; +0x0, 0x3818d0\nMOV             R9, R2                                                 ; +0x4, 0x3818d4\nLDR             R4, =(__stack_chk_guard_ptr - 0x3818E2)                ; +0x6, 0x3818d6\nSUB             SP, SP, #0x20                                          ; +0x8, 0x3818d8\nADD             R5, SP, #0x20+var_1C                                   ; +0xa, 0x3818da\nMOV             R7, R0                                                 ; +0xc, 0x3818dc\nADD             R4, PC; __stack_chk_guard_ptr                          ; +0xe, 0x3818de\nLDR             R4, [R4]; __stack_chk_guard                            ; +0x10, 0x3818e0\nMOV             R6, R1                                                 ; +0x12, 0x3818e2\nADD.W           R8, SP, #0x20+var_14                                   ; +0x14, 0x3818e4\nMOV             R0, R5; this                                           ; +0x18, 0x3818e8\nLDR             R2, [R4]                                               ; +0x1a, 0x3818ea\nMOV             R1, R7; cocos2d::CCArray *                             ; +0x1c, 0x3818ec\nSTR             R2, [SP,#0x20+var_4]                                   ; +0x1e, 0x3818ee\nMOV             R2, R6; cocos2d::CCArray *                             ; +0x20, 0x3818f0\nBL              _ZN8EditorUI14getGroupCenterEPN7cocos2d7CCArrayEb; EditorUI::getGroupCenter(cocos2d::CCArray *,bool) ; +0x22, 0x3818f2\nMOV             R1, R9                                                 ; +0x26, 0x3818f6\nMOV             R2, R5                                                 ; +0x28, 0x3818f8\nMOV             R0, R8                                                 ; +0x2a, 0x3818fa\nBL              _ZNK7cocos2d7CCPointmiERKS0_; cocos2d::CCPoint::operator-(cocos2d::CCPoint const&) ; +0x2c, 0x3818fc\nADD.W           R9, SP, #0x20+var_C                                    ; +0x30, 0x381900\nMOVS            R5, #0                                                 ; +0x34, 0x381904\nMOV             R0, R6; this                                           ; +0x36, 0x381906\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x38, 0x381908\nCMP             R5, R0                                                 ; +0x3c, 0x38190c\nBCS             loc_381930                                             ; +0x3e, 0x38190e\nMOV             R1, R5; unsigned int                                   ; +0x40, 0x381910\nMOV             R0, R6; this                                           ; +0x42, 0x381912\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x44, 0x381914\nMOV             R1, R8; cocos2d::CCPoint *                             ; +0x48, 0x381918\nADDS            R5, #1                                                 ; +0x4a, 0x38191a\nMOV             R10, R0                                                ; +0x4c, 0x38191c\nMOV             R0, R9; this                                           ; +0x4e, 0x38191e\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x50, 0x381920\nMOV             R0, R7                                                 ; +0x54, 0x381924\nMOV             R1, R10                                                ; +0x56, 0x381926\nMOV             R2, R9                                                 ; +0x58, 0x381928\nBL              _ZN8EditorUI10moveObjectEP10GameObjectN7cocos2d7CCPointE; EditorUI::moveObject(GameObject *,cocos2d::CCPoint) ; +0x5a, 0x38192a\nB               loc_381906                                             ; +0x5e, 0x38192e\nLDR             R2, [SP,#0x20+var_4]                                   ; +0x60, 0x381930\nLDR             R3, [R4]                                               ; +0x62, 0x381932\nCMP             R2, R3                                                 ; +0x64, 0x381934\nBEQ             loc_38193C                                             ; +0x66, 0x381936\nBLX             __stack_chk_fail                                       ; +0x68, 0x381938\nADD             SP, SP, #0x20 ; ' '                                    ; +0x6c, 0x38193c\nPOP.W           {R4-R10,PC}                                            ; +0x6e, 0x38193e", "xrefs": ["EditorUI::spriteFromObjectString @ 0x387ad2", "EditorUI::onCreateObject @ 0x3a3e5c", "EditorUI::createPrefab @ 0x3a42b4", "EditorUI::createSmartObjectsFromTemplate @ 0x3a5374", "EditorUI::createSmartObjectsFromTemplate @ 0x3a53d6", "EditorUI::doPasteObjects @ 0x3a5f44", "SetupSmartBlockLayer::onPasteTemplate @ 0x53d49e"], "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"}