{"type": "func", "start": 5369901632, "end": 5369901885, "name": "EditorUI::findSnapObject", "pseudocode": "// \n// EditorUI::findSnapObject from 0x140123240 to 0x14012333d (253 bytes)\n// \n// 5 xrefs:\n// > EditorUI::ccTouchBegan @ 0x140123b2f\n// > EditorUI::ccTouchBegan @ 0x140123c85\n// > <???> @ 0x1406705b8\n// > <???> @ 0x1406705c8\n// > <???> @ 0x1406c9954\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::CCPoint a2, float a3)\n{\n  __int64 v5; // rcx\n  unsigned int v6; // ebx\n  cocos2d::CCArray *i; // rbp\n  GameObject *v8; // rsi\n  bool v9; // r9\n  bool v10; // r9\n  cocos2d::CCRect *ObjectRect; // rax\n  bool v12; // [rsp+20h] [rbp-48h]\n  bool v13; // [rsp+20h] [rbp-48h]\n  char v14; // [rsp+30h] [rbp-38h] BYREF\n  char v15; // [rsp+40h] [rbp-28h] BYREF\n\n  if ( cocos2d::CCArray::count(a1->m_selectedObjects) )\n  {\n    v6 = 0;\n    for ( i = (cocos2d::CCArray *)cocos2d::CCArray::create(v5); v6 < cocos2d::CCArray::count(a1->m_selectedObjects); ++v6 )\n    {\n      v8 = (GameObject *)cocos2d::CCArray::objectAtIndex(a1->m_selectedObjects, v6);\n      LevelEditorLayer::getObjectRect((cocos2d::CCRect *)a1->m_editorLayer, (LevelEditorLayer *)&v14, v8, v9, v12);\n      ObjectRect = LevelEditorLayer::getObjectRect(\n                     (cocos2d::CCRect *)a1->m_editorLayer,\n                     (LevelEditorLayer *)&v15,\n                     v8,\n                     v10,\n                     v13);\n      if ( cocos2d::CCRect::containsPoint(ObjectRect, *(const struct cocos2d::CCPoint **)&a2) )\n        cocos2d::CCArray::addObject(i, v8);\n    }\n  }\n  else\n  {\n    i = nullptr;\n  }\n  EditorUI::findSnapObject_1(a1, i, a3);\n}", "assembly": "; \n; EditorUI::findSnapObject from 0x140123240 to 0x14012333d (253 bytes)\n; \n; 5 xrefs:\n; > EditorUI::ccTouchBegan @ 0x140123b2f\n; > EditorUI::ccTouchBegan @ 0x140123c85\n; > <???> @ 0x1406705b8\n; > <???> @ 0x1406705c8\n; > <???> @ 0x1406c9954\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, 0x140123240\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x140123245\nmov     [rsp+arg_18], rdi                                              ; +0xa, 0x14012324a\npush    r14                                                            ; +0xf, 0x14012324f\nsub     rsp, 60h                                                       ; +0x11, 0x140123251\nmov     rdi, rcx                                                       ; +0x15, 0x140123255\nmovaps  [rsp+68h+var_18], xmm6                                         ; +0x18, 0x140123258\nmov     rcx, [rcx+340h]                                                ; +0x1d, 0x14012325d\nmovaps  xmm6, xmm2                                                     ; +0x24, 0x140123264\nmov     r14, rdx                                                       ; +0x27, 0x140123267\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x2a, 0x14012326a\ntest    eax, eax                                                       ; +0x30, 0x140123270\njz      loc_140123310                                                  ; +0x32, 0x140123272\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x38, 0x140123278\nmov     rcx, [rdi+340h]                                                ; +0x3e, 0x14012327e\nxor     ebx, ebx                                                       ; +0x45, 0x140123285\nmov     rbp, rax                                                       ; +0x47, 0x140123287\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x4a, 0x14012328a\ntest    eax, eax                                                       ; +0x50, 0x140123290\njz      loc_140123314                                                  ; +0x52, 0x140123292\nmov     [rsp+68h+arg_0], rsi                                           ; +0x58, 0x140123298\nnop     dword ptr [rax]                                                ; +0x5d, 0x14012329d\nmov     rcx, [rdi+340h]                                                ; +0x60, 0x1401232a0\nmov     edx, ebx                                                       ; +0x67, 0x1401232a7\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x69, 0x1401232a9\nmov     rcx, [rdi+500h]                                                ; +0x6f, 0x1401232af\nlea     rdx, [rsp+68h+var_38]                                          ; +0x76, 0x1401232b6\nmov     r8, rax                                                        ; +0x7b, 0x1401232bb\nmov     rsi, rax                                                       ; +0x7e, 0x1401232be\ncall    LevelEditorLayer__getObjectRect                                ; +0x81, 0x1401232c1\nmov     rcx, [rdi+500h]                                                ; +0x86, 0x1401232c6\nlea     rdx, [rsp+68h+var_28]                                          ; +0x8d, 0x1401232cd\nmov     r8, rsi                                                        ; +0x92, 0x1401232d2\ncall    LevelEditorLayer__getObjectRect                                ; +0x95, 0x1401232d5\nmov     rcx, rax                                                       ; +0x9a, 0x1401232da\nmov     rdx, r14                                                       ; +0x9d, 0x1401232dd\ncall    cs:?containsPoint@CCRect@cocos2d@@QEBA_NAEBVCCPoint@2@@Z; cocos2d::CCRect::containsPoint(cocos2d::CCPoint const &) ; +0xa0, 0x1401232e0\ntest    al, al                                                         ; +0xa6, 0x1401232e6\njz      short loc_1401232F6                                            ; +0xa8, 0x1401232e8\nmov     rdx, rsi                                                       ; +0xaa, 0x1401232ea\nmov     rcx, rbp                                                       ; +0xad, 0x1401232ed\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0xb0, 0x1401232f0\nmov     rcx, [rdi+340h]                                                ; +0xb6, 0x1401232f6\ninc     ebx                                                            ; +0xbd, 0x1401232fd\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xbf, 0x1401232ff\ncmp     ebx, eax                                                       ; +0xc5, 0x140123305\njb      short loc_1401232A0                                            ; +0xc7, 0x140123307\nmov     rsi, [rsp+68h+arg_0]                                           ; +0xc9, 0x140123309\njmp     short loc_140123314                                            ; +0xce, 0x14012330e\nxor     ebx, ebx                                                       ; +0xd0, 0x140123310\nmov     ebp, ebx                                                       ; +0xd2, 0x140123312\nmovaps  xmm2, xmm6                                                     ; +0xd4, 0x140123314\nmov     rdx, rbp                                                       ; +0xd7, 0x140123317\nmov     rcx, rdi                                                       ; +0xda, 0x14012331a\nmovaps  xmm6, [rsp+68h+var_18]                                         ; +0xdd, 0x14012331d\nlea     r11, [rsp+68h+var_8]                                           ; +0xe2, 0x140123322\nmov     rbx, [r11+18h]                                                 ; +0xe7, 0x140123327\nmov     rbp, [r11+20h]                                                 ; +0xeb, 0x14012332b\nmov     rdi, [r11+28h]                                                 ; +0xef, 0x14012332f\nmov     rsp, r11                                                       ; +0xf3, 0x140123333\npop     r14                                                            ; +0xf6, 0x140123336\njmp     EditorUI__findSnapObject_1                                     ; +0xf8, 0x140123338", "xrefs": ["EditorUI::ccTouchBegan @ 0x140123b2f", "EditorUI::ccTouchBegan @ 0x140123c85", "<???> @ 0x1406705b8", "<???> @ 0x1406705c8", "<???> @ 0x1406c9954"], "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"}