{"type": "func", "start": 8157276, "end": 8157592, "name": "EditorUI::findSnapObject", "pseudocode": "// \n// EditorUI::findSnapObject from 0x7c785c to 0x7c7998 (316 bytes)\n// \n// 3 xrefs:\n// > EditorUI::startFreeMoveTouch @ 0xbd5170\n// > EditorUI::startFreeMoveTouch @ 0xbd51a8\n// > <???> @ 0xb4928\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\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 12:54:09 +0000\n// \n\n__int64 __fastcall EditorUI::findSnapObject(GameObject **a1, const cocos2d::CCPoint *a2, float a3)\n{\n  cocos2d::CCArray *v6; // x0\n  cocos2d::CCArray *v7; // x26\n  unsigned int i; // w20\n  GameObject *v9; // x21\n  _BYTE v11[24]; // [xsp+60h] [xbp+60h] BYREF\n  _BYTE v12[16]; // [xsp+78h] [xbp+78h] BYREF\n\n  v6 = (cocos2d::CCArray *)cocos2d::CCArray::count(a1[112]);\n  if ( (_DWORD)v6 )\n  {\n    v7 = (cocos2d::CCArray *)cocos2d::CCArray::create(v6);\n    for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(a1[112]); ++i )\n    {\n      v9 = (GameObject *)cocos2d::CCArray::objectAtIndex(a1[112], i);\n      LevelEditorLayer::getObjectRect(a1[180], v9, 0, 0, (cocos2d::CCRect *)v11);\n      LevelEditorLayer::getObjectRect(a1[180], v9, 0, 0, (cocos2d::CCRect *)v12);\n      if ( (unsigned __int8)cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v12, 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  return _stack_chk_guard;\n}", "assembly": "; \n; EditorUI::findSnapObject from 0x7c785c to 0x7c7998 (316 bytes)\n; \n; 3 xrefs:\n; > EditorUI::startFreeMoveTouch @ 0xbd5170\n; > EditorUI::startFreeMoveTouch @ 0xbd51a8\n; > <???> @ 0xb4928\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\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 12:54:09 +0000\n; \nSTP             X29, X30, [SP,#var_90]!                                ; +0x0, 0x7c785c\nMOV             X29, SP                                                ; +0x4, 0x7c7860\nSTP             X25, X26, [SP,#0x90+var_50]                            ; +0x8, 0x7c7864\nADRP            X25, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x7c7868\nSTP             X23, X24, [SP,#0x90+var_60]                            ; +0x10, 0x7c786c\nMOV             X23, X1                                                ; +0x14, 0x7c7870\nLDR             X1, [X25,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x18, 0x7c7874\nSTP             X19, X20, [SP,#0x90+var_80]                            ; +0x1c, 0x7c7878\nSTP             X21, X22, [SP,#0x90+var_70]                            ; +0x20, 0x7c787c\nSTR             D8, [SP,#0x90+var_40]                                  ; +0x24, 0x7c7880\nMOV             X19, X0                                                ; +0x28, 0x7c7884\nFMOV            S8, S0                                                 ; +0x2c, 0x7c7888\nLDR             X1, [X1]                                               ; +0x30, 0x7c788c\nLDR             X0, [X0,#0x380]; this                                  ; +0x34, 0x7c7890\nSTR             X1, [X29,#0x90+var_8]                                  ; +0x38, 0x7c7894\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x3c, 0x7c7898\nCBZ             W0, loc_7C7980                                         ; +0x40, 0x7c789c\nBL              _ZN7cocos2d7CCArray6createEv; cocos2d::CCArray::create(void) ; +0x44, 0x7c78a0\nMOV             X26, X0                                                ; +0x48, 0x7c78a4\nLDR             X0, [X19,#0x380]; this                                 ; +0x4c, 0x7c78a8\nMOV             W20, #0                                                ; +0x50, 0x7c78ac\nADD             X24, X29, #0x90+var_30                                 ; +0x54, 0x7c78b0\nADD             X22, X29, #0x90+var_18                                 ; +0x58, 0x7c78b4\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x5c, 0x7c78b8\nCMP             W20, W0                                                ; +0x60, 0x7c78bc\nB.CS            loc_7C792C                                             ; +0x64, 0x7c78c0\nLDR             X0, [X19,#0x380]; this                                 ; +0x68, 0x7c78c4\nMOV             W1, W20; unsigned int                                  ; +0x6c, 0x7c78c8\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x70, 0x7c78cc\nMOV             X21, X0                                                ; +0x74, 0x7c78d0\nLDR             X0, [X19,#0x5A0]; this                                 ; +0x78, 0x7c78d4\nMOV             X8, X24                                                ; +0x7c, 0x7c78d8\nMOV             X1, X21; GameObject *                                  ; +0x80, 0x7c78dc\nMOV             W2, #0; bool                                           ; +0x84, 0x7c78e0\nMOV             W3, #0; bool                                           ; +0x88, 0x7c78e4\nBL              _ZN16LevelEditorLayer13getObjectRectEP10GameObjectbb; LevelEditorLayer::getObjectRect(GameObject *,bool,bool) ; +0x8c, 0x7c78e8\nLDR             X0, [X19,#0x5A0]; this                                 ; +0x90, 0x7c78ec\nMOV             X8, X22                                                ; +0x94, 0x7c78f0\nMOV             W2, #0; bool                                           ; +0x98, 0x7c78f4\nMOV             W3, #0; bool                                           ; +0x9c, 0x7c78f8\nMOV             X1, X21; GameObject *                                  ; +0xa0, 0x7c78fc\nBL              _ZN16LevelEditorLayer13getObjectRectEP10GameObjectbb; LevelEditorLayer::getObjectRect(GameObject *,bool,bool) ; +0xa4, 0x7c7900\nMOV             X0, X22; this                                          ; +0xa8, 0x7c7904\nMOV             X1, X23; cocos2d::CCPoint *                            ; +0xac, 0x7c7908\nBL              _ZNK7cocos2d6CCRect13containsPointERKNS_7CCPointE; cocos2d::CCRect::containsPoint(cocos2d::CCPoint const&) ; +0xb0, 0x7c790c\nUXTB            W0, W0                                                 ; +0xb4, 0x7c7910\nCBNZ            W0, loc_7C796C                                         ; +0xb8, 0x7c7914\nADD             W20, W20, #1                                           ; +0xbc, 0x7c7918\nLDR             X0, [X19,#0x380]; this                                 ; +0xc0, 0x7c791c\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xc4, 0x7c7920\nCMP             W20, W0                                                ; +0xc8, 0x7c7924\nB.CC            loc_7C78C4                                             ; +0xcc, 0x7c7928\nFMOV            S0, S8; float                                          ; +0xd0, 0x7c792c\nMOV             X0, X19; this                                          ; +0xd4, 0x7c7930\nMOV             X1, X26; cocos2d::CCArray *                            ; +0xd8, 0x7c7934\nBL              _ZN8EditorUI14findSnapObjectEPN7cocos2d7CCArrayEf; EditorUI::findSnapObject(cocos2d::CCArray *,float) ; +0xdc, 0x7c7938\nLDR             X25, [X25,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xe0, 0x7c793c\nLDR             X1, [X29,#0x90+var_8]                                  ; +0xe4, 0x7c7940\nLDR             X0, [X25]                                              ; +0xe8, 0x7c7944\nCMP             X1, X0                                                 ; +0xec, 0x7c7948\nB.NE            loc_7C7994                                             ; +0xf0, 0x7c794c\nLDP             X19, X20, [SP,#0x90+var_80]                            ; +0xf4, 0x7c7950\nLDP             X21, X22, [SP,#0x90+var_70]                            ; +0xf8, 0x7c7954\nLDP             X23, X24, [SP,#0x90+var_60]                            ; +0xfc, 0x7c7958\nLDP             X25, X26, [SP,#0x90+var_50]                            ; +0x100, 0x7c795c\nLDR             D8, [SP,#0x90+var_40]                                  ; +0x104, 0x7c7960\nLDP             X29, X30, [SP+0x90+var_90],#0x90                       ; +0x108, 0x7c7964\nRET                                                                    ; +0x10c, 0x7c7968\nMOV             X0, X26; this                                          ; +0x110, 0x7c796c\nMOV             X1, X21; cocos2d::CCObject *                           ; +0x114, 0x7c7970\nADD             W20, W20, #1                                           ; +0x118, 0x7c7974\nBL              _ZN7cocos2d7CCArray9addObjectEPNS_8CCObjectE; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x11c, 0x7c7978\nB               loc_7C791C                                             ; +0x120, 0x7c797c\nFMOV            S0, S8; float                                          ; +0x124, 0x7c7980\nMOV             X0, X19; this                                          ; +0x128, 0x7c7984\nMOV             X1, #0; cocos2d::CCArray *                             ; +0x12c, 0x7c7988\nBL              _ZN8EditorUI14findSnapObjectEPN7cocos2d7CCArrayEf; EditorUI::findSnapObject(cocos2d::CCArray *,float) ; +0x130, 0x7c798c\nB               loc_7C793C                                             ; +0x134, 0x7c7990\nBL              .__stack_chk_fail                                      ; +0x138, 0x7c7994", "xrefs": ["EditorUI::startFreeMoveTouch @ 0xbd5170", "EditorUI::startFreeMoveTouch @ 0xbd51a8", "<???> @ 0xb4928"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "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"}