{"type": "func", "start": 5369840320, "end": 5369840480, "name": "EditorUI::repositionObjectsToCenter", "pseudocode": "// \n// EditorUI::repositionObjectsToCenter from 0x1401142c0 to 0x140114360 (160 bytes)\n// \n// 10 xrefs:\n// > EditorUI::spriteFromObjectString @ 0x14010e0f8\n// > EditorUI::onCreateObject @ 0x14010fd1a\n// > EditorUI::doPasteObjects @ 0x140113573\n// > EditorUI::createSmartObjectsFromTemplate @ 0x140117453\n// > EditorUI::createSmartObjectsFromTemplate @ 0x1401174d1\n// > EditorUI::createPrefab @ 0x140117d1a\n// > SetupSmartBlockLayer::onPasteTemplate @ 0x140458042\n// > <???> @ 0x14066f460\n// > <???> @ 0x14066f470\n// > <???> @ 0x1406c90b4\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  unsigned int i; // ebx\n  GameObject *v8; // rdi\n  cocos2d::CCPoint v9; // rax\n  _BYTE v10[40]; // [rsp+20h] [rbp-28h] BYREF\n\n  EditorUI::getGroupCenter(a1, (cocos2d::CCArray *)v10, (bool)a2);\n  ((void (__fastcall *)(_QWORD, _QWORD, _QWORD))cocos2d::CCPoint::operator-)(a3, &v10[8], v10);\n  for ( i = 0; i < cocos2d::CCArray::count(a2); ++i )\n  {\n    v8 = (GameObject *)cocos2d::CCArray::objectAtIndex(a2, i);\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v10[16], (const struct cocos2d::CCPoint *)&v10[8]);\n    EditorUI::moveObject(a1, v8, v9);\n  }\n}", "assembly": "; \n; EditorUI::repositionObjectsToCenter from 0x1401142c0 to 0x140114360 (160 bytes)\n; \n; 10 xrefs:\n; > EditorUI::spriteFromObjectString @ 0x14010e0f8\n; > EditorUI::onCreateObject @ 0x14010fd1a\n; > EditorUI::doPasteObjects @ 0x140113573\n; > EditorUI::createSmartObjectsFromTemplate @ 0x140117453\n; > EditorUI::createSmartObjectsFromTemplate @ 0x1401174d1\n; > EditorUI::createPrefab @ 0x140117d1a\n; > SetupSmartBlockLayer::onPasteTemplate @ 0x140458042\n; > <???> @ 0x14066f460\n; > <???> @ 0x14066f470\n; > <???> @ 0x1406c90b4\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1401142c0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1401142c5\npush    rsi                                                            ; +0xa, 0x1401142ca\nsub     rsp, 40h                                                       ; +0xb, 0x1401142cb\nmov     rbx, r8                                                        ; +0xf, 0x1401142cf\nmov     rsi, rdx                                                       ; +0x12, 0x1401142d2\nmov     r8, rdx                                                        ; +0x15, 0x1401142d5\nmov     rbp, rcx                                                       ; +0x18, 0x1401142d8\nlea     rdx, [rsp+48h+var_28]                                          ; +0x1b, 0x1401142db\ncall    EditorUI__getGroupCenter                                       ; +0x20, 0x1401142e0\nlea     r8, [rsp+48h+var_28]                                           ; +0x25, 0x1401142e5\nmov     rcx, rbx                                                       ; +0x2a, 0x1401142ea\nlea     rdx, [rsp+48h+var_20]                                          ; +0x2d, 0x1401142ed\ncall    cs:??GCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator-(cocos2d::CCPoint const &) ; +0x32, 0x1401142f2\nmov     rcx, rsi                                                       ; +0x38, 0x1401142f8\nxor     ebx, ebx                                                       ; +0x3b, 0x1401142fb\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x3d, 0x1401142fd\ntest    eax, eax                                                       ; +0x43, 0x140114303\njz      short loc_140114350                                            ; +0x45, 0x140114305\nmov     [rsp+48h+arg_0], rdi                                           ; +0x47, 0x140114307\nnop     dword ptr [rax+00h]                                            ; +0x4c, 0x14011430c\nmov     edx, ebx                                                       ; +0x50, 0x140114310\nmov     rcx, rsi                                                       ; +0x52, 0x140114312\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x55, 0x140114315\nlea     rdx, [rsp+48h+var_20]                                          ; +0x5b, 0x14011431b\nmov     rdi, rax                                                       ; +0x60, 0x140114320\nlea     rcx, [rsp+48h+var_18]                                          ; +0x63, 0x140114323\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x68, 0x140114328\nmov     rdx, rdi                                                       ; +0x6e, 0x14011432e\nmov     rcx, rbp                                                       ; +0x71, 0x140114331\nmov     r8, rax                                                        ; +0x74, 0x140114334\ncall    EditorUI__moveObject                                           ; +0x77, 0x140114337\nmov     rcx, rsi                                                       ; +0x7c, 0x14011433c\ninc     ebx                                                            ; +0x7f, 0x14011433f\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x81, 0x140114341\ncmp     ebx, eax                                                       ; +0x87, 0x140114347\njb      short loc_140114310                                            ; +0x89, 0x140114349\nmov     rdi, [rsp+48h+arg_0]                                           ; +0x8b, 0x14011434b\nmov     rbx, [rsp+48h+arg_8]                                           ; +0x90, 0x140114350\nmov     rbp, [rsp+48h+arg_10]                                          ; +0x95, 0x140114355\nadd     rsp, 40h                                                       ; +0x9a, 0x14011435a\npop     rsi                                                            ; +0x9e, 0x14011435e\nretn                                                                   ; +0x9f, 0x14011435f", "xrefs": ["EditorUI::spriteFromObjectString @ 0x14010e0f8", "EditorUI::onCreateObject @ 0x14010fd1a", "EditorUI::doPasteObjects @ 0x140113573", "EditorUI::createSmartObjectsFromTemplate @ 0x140117453", "EditorUI::createSmartObjectsFromTemplate @ 0x1401174d1", "EditorUI::createPrefab @ 0x140117d1a", "SetupSmartBlockLayer::onPasteTemplate @ 0x140458042", "<???> @ 0x14066f460", "<???> @ 0x14066f470", "<???> @ 0x1406c90b4"], "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"}