{"type": "func", "start": 6898432, "end": 6898748, "name": "EditorUI::findSnapObject", "pseudocode": "// \n// EditorUI::findSnapObject from 0x694300 to 0x69443c (316 bytes)\n// \n// 3 xrefs:\n// > EditorUI::ccTouchBegan @ 0x6c553c\n// > EditorUI::ccTouchBegan @ 0x6c5574\n// > <???> @ 0x88248\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::findSnapObject(EditorUI *a1, cocos2d::CCArray *a2, float a3)\n{\n  cocos2d::CCArray *v6; // x0\n  cocos2d::CCArray *v7; // x26\n  unsigned int i; // w20\n  GameObject *v9; // x21\n  cocos2d::CCRect v10; // [xsp+78h] [xbp+78h] BYREF\n\n  v6 = (cocos2d::CCArray *)cocos2d::CCArray::count(a1->m_selectedObjects);\n  if ( (_DWORD)v6 )\n  {\n    v7 = (cocos2d::CCArray *)cocos2d::CCArray::create(v6);\n    for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(a1->m_selectedObjects); ++i )\n    {\n      v9 = (GameObject *)cocos2d::CCArray::objectAtIndex(a1->m_selectedObjects, i);\n      LevelEditorLayer::getObjectRect(a1->m_editorLayer, v9, 0, 0);\n      LevelEditorLayer::getObjectRect(a1->m_editorLayer, v9, 0, 0);\n      if ( (unsigned __int8)cocos2d::CCRect::containsPoint(&v10, (const cocos2d::CCPoint *)a2) )\n        cocos2d::CCArray::addObject(v7, v9);\n    }\n    EditorUI::findSnapObject(a1, v7, a3);\n  }\n  else\n  {\n    EditorUI::findSnapObject(a1, nullptr, a3);\n  }\n}", "assembly": "; \n; EditorUI::findSnapObject from 0x694300 to 0x69443c (316 bytes)\n; \n; 3 xrefs:\n; > EditorUI::ccTouchBegan @ 0x6c553c\n; > EditorUI::ccTouchBegan @ 0x6c5574\n; > <???> @ 0x88248\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\nSTP             X29, X30, [SP,#var_90]!                                ; +0x0, 0x694300\nMOV             X29, SP                                                ; +0x4, 0x694304\nSTP             X25, X26, [SP,#0x90+var_50]                            ; +0x8, 0x694308\nADRP            X25, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x69430c\nSTP             X23, X24, [SP,#0x90+var_60]                            ; +0x10, 0x694310\nMOV             X23, X1                                                ; +0x14, 0x694314\nLDR             X1, [X25,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x18, 0x694318\nSTR             D8, [SP,#0x90+var_40]                                  ; +0x1c, 0x69431c\nFMOV            S8, S0                                                 ; +0x20, 0x694320\nSTP             X19, X20, [SP,#0x90+var_80]                            ; +0x24, 0x694324\nLDR             X1, [X1]                                               ; +0x28, 0x694328\nMOV             X19, X0                                                ; +0x2c, 0x69432c\nLDR             X0, [X0,#0x338]; this                                  ; +0x30, 0x694330\nSTP             X21, X22, [SP,#0x90+var_70]                            ; +0x34, 0x694334\nSTR             X1, [X29,#0x90+var_8]                                  ; +0x38, 0x694338\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x3c, 0x69433c\nCBZ             W0, loc_694424                                         ; +0x40, 0x694340\nBL              _ZN7cocos2d7CCArray6createEv; cocos2d::CCArray::create(void) ; +0x44, 0x694344\nMOV             X26, X0                                                ; +0x48, 0x694348\nLDR             X0, [X19,#0x338]; this                                 ; +0x4c, 0x69434c\nMOV             W20, #0                                                ; +0x50, 0x694350\nADD             X24, X29, #0x90+var_30                                 ; +0x54, 0x694354\nADD             X22, X29, #0x90+var_18                                 ; +0x58, 0x694358\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x5c, 0x69435c\nCMP             W20, W0                                                ; +0x60, 0x694360\nB.CS            loc_6943D0                                             ; +0x64, 0x694364\nLDR             X0, [X19,#0x338]; this                                 ; +0x68, 0x694368\nMOV             W1, W20; unsigned int                                  ; +0x6c, 0x69436c\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x70, 0x694370\nMOV             X21, X0                                                ; +0x74, 0x694374\nLDR             X0, [X19,#0x4F8]; this                                 ; +0x78, 0x694378\nMOV             X8, X24                                                ; +0x7c, 0x69437c\nMOV             X1, X21; GameObject *                                  ; +0x80, 0x694380\nMOV             W2, #0; bool                                           ; +0x84, 0x694384\nMOV             W3, #0; bool                                           ; +0x88, 0x694388\nBL              _ZN16LevelEditorLayer13getObjectRectEP10GameObjectbb; LevelEditorLayer::getObjectRect(GameObject *,bool,bool) ; +0x8c, 0x69438c\nLDR             X0, [X19,#0x4F8]; this                                 ; +0x90, 0x694390\nMOV             X8, X22                                                ; +0x94, 0x694394\nMOV             W2, #0; bool                                           ; +0x98, 0x694398\nMOV             W3, #0; bool                                           ; +0x9c, 0x69439c\nMOV             X1, X21; GameObject *                                  ; +0xa0, 0x6943a0\nBL              _ZN16LevelEditorLayer13getObjectRectEP10GameObjectbb; LevelEditorLayer::getObjectRect(GameObject *,bool,bool) ; +0xa4, 0x6943a4\nMOV             X0, X22; this                                          ; +0xa8, 0x6943a8\nMOV             X1, X23; cocos2d::CCPoint *                            ; +0xac, 0x6943ac\nBL              _ZNK7cocos2d6CCRect13containsPointERKNS_7CCPointE; cocos2d::CCRect::containsPoint(cocos2d::CCPoint const&) ; +0xb0, 0x6943b0\nUXTB            W0, W0                                                 ; +0xb4, 0x6943b4\nCBNZ            W0, loc_694410                                         ; +0xb8, 0x6943b8\nADD             W20, W20, #1                                           ; +0xbc, 0x6943bc\nLDR             X0, [X19,#0x338]; this                                 ; +0xc0, 0x6943c0\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xc4, 0x6943c4\nCMP             W20, W0                                                ; +0xc8, 0x6943c8\nB.CC            loc_694368                                             ; +0xcc, 0x6943cc\nFMOV            S0, S8; float                                          ; +0xd0, 0x6943d0\nMOV             X0, X19; this                                          ; +0xd4, 0x6943d4\nMOV             X1, X26; cocos2d::CCArray *                            ; +0xd8, 0x6943d8\nBL              _ZN8EditorUI14findSnapObjectEPN7cocos2d7CCArrayEf; EditorUI::findSnapObject(cocos2d::CCArray *,float) ; +0xdc, 0x6943dc\nLDR             X25, [X25,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xe0, 0x6943e0\nLDR             X1, [X29,#0x90+var_8]                                  ; +0xe4, 0x6943e4\nLDR             X0, [X25]                                              ; +0xe8, 0x6943e8\nCMP             X1, X0                                                 ; +0xec, 0x6943ec\nB.NE            loc_694438                                             ; +0xf0, 0x6943f0\nLDP             X19, X20, [SP,#0x90+var_80]                            ; +0xf4, 0x6943f4\nLDP             X21, X22, [SP,#0x90+var_70]                            ; +0xf8, 0x6943f8\nLDP             X23, X24, [SP,#0x90+var_60]                            ; +0xfc, 0x6943fc\nLDP             X25, X26, [SP,#0x90+var_50]                            ; +0x100, 0x694400\nLDR             D8, [SP,#0x90+var_40]                                  ; +0x104, 0x694404\nLDP             X29, X30, [SP+0x90+var_90],#0x90                       ; +0x108, 0x694408\nRET                                                                    ; +0x10c, 0x69440c\nMOV             X0, X26; this                                          ; +0x110, 0x694410\nMOV             X1, X21; cocos2d::CCObject *                           ; +0x114, 0x694414\nADD             W20, W20, #1                                           ; +0x118, 0x694418\nBL              _ZN7cocos2d7CCArray9addObjectEPNS_8CCObjectE; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x11c, 0x69441c\nB               loc_6943C0                                             ; +0x120, 0x694420\nFMOV            S0, S8; float                                          ; +0x124, 0x694424\nMOV             X0, X19; this                                          ; +0x128, 0x694428\nMOV             X1, #0; cocos2d::CCArray *                             ; +0x12c, 0x69442c\nBL              _ZN8EditorUI14findSnapObjectEPN7cocos2d7CCArrayEf; EditorUI::findSnapObject(cocos2d::CCArray *,float) ; +0x130, 0x694430\nB               loc_6943E0                                             ; +0x134, 0x694434\nBL              .__stack_chk_fail                                      ; +0x138, 0x694438", "xrefs": ["EditorUI::ccTouchBegan @ 0x6c553c", "EditorUI::ccTouchBegan @ 0x6c5574", "<???> @ 0x88248"], "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"}