{"type": "func", "start": 4295288464, "end": 4295288734, "name": "EditorUI::findSnapObject", "pseudocode": "// \n// EditorUI::findSnapObject from 0x10004e690 to 0x10004e79e (270 bytes)\n// \n// 2 xrefs:\n// > EditorUI::ccTouchBegan @ 0x10004f196\n// > EditorUI::ccTouchBegan @ 0x10004f29d\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 __fastcall EditorUI::findSnapObject(EditorUI *a1, cocos2d::CCPoint a2, float a3)\n{\n  __int64 v3; // rsi\n  cocos2d::CCArray *m_selectedObjects; // rdi\n  unsigned int v6; // r12d\n  __int64 v7; // r15\n  _BYTE v8[16]; // [rsp+8h] [rbp-48h] BYREF\n  cocos2d::CCArray *v9; // [rsp+18h] [rbp-38h]\n  float x; // [rsp+24h] [rbp-2Ch]\n  cocos2d::CCRect ObjectRect; // 0:kr10_16.16\n\n  x = a2.x;\n  m_selectedObjects = a1->m_selectedObjects;\n  if ( (unsigned int)sub_100720070(m_selectedObjects) )\n  {\n    v9 = (cocos2d::CCArray *)sub_10071F9E0(m_selectedObjects, v3);\n    if ( (unsigned int)sub_100720070(a1->m_selectedObjects) )\n    {\n      v6 = 0;\n      do\n      {\n        v7 = sub_1007200C0(a1->m_selectedObjects, v6);\n        LevelEditorLayer::getObjectRect((LevelEditorLayer *)v8, (GameObject *)a1->m_editorLayer, v7, 0);\n        ObjectRect = LevelEditorLayer::getObjectRect((LevelEditorLayer *)v8, (GameObject *)a1->m_editorLayer, v7, 0);\n        if ( (unsigned __int8)sub_10028D2D0(v8, v3, COERCE_DOUBLE(ObjectRect.origin), COERCE_DOUBLE(ObjectRect.size)) )\n          sub_10071FCD0(v9, v7);\n        ++v6;\n      }\n      while ( v6 < (unsigned int)sub_100720070(a1->m_selectedObjects) );\n    }\n    EditorUI::findSnapObject_1(a1, v9, x);\n  }\n  else\n  {\n    EditorUI::findSnapObject_1(a1, nullptr, x);\n  }\n}", "assembly": "; \n; EditorUI::findSnapObject from 0x10004e690 to 0x10004e79e (270 bytes)\n; \n; 2 xrefs:\n; > EditorUI::ccTouchBegan @ 0x10004f196\n; > EditorUI::ccTouchBegan @ 0x10004f29d\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    rbp                                                            ; +0x0, 0x10004e690\nmov     rbp, rsp                                                       ; +0x1, 0x10004e691\npush    r15                                                            ; +0x4, 0x10004e694\npush    r14                                                            ; +0x6, 0x10004e696\npush    r13                                                            ; +0x8, 0x10004e698\npush    r12                                                            ; +0xa, 0x10004e69a\npush    rbx                                                            ; +0xc, 0x10004e69c\nsub     rsp, 28h                                                       ; +0xd, 0x10004e69d\nmovss   [rbp+var_2C], xmm0                                             ; +0x11, 0x10004e6a1\nmov     r14, rsi                                                       ; +0x16, 0x10004e6a6\nmov     rbx, rdi                                                       ; +0x19, 0x10004e6a9\nmov     rdi, [rdi+328h]                                                ; +0x1c, 0x10004e6ac\ncall    sub_100720070                                                  ; +0x23, 0x10004e6b3\ntest    eax, eax                                                       ; +0x28, 0x10004e6b8\njz      loc_10004E781                                                  ; +0x2a, 0x10004e6ba\ncall    sub_10071F9E0                                                  ; +0x30, 0x10004e6c0\nmov     [rbp+var_38], rax                                              ; +0x35, 0x10004e6c5\nmov     rdi, [rbx+328h]                                                ; +0x39, 0x10004e6c9\ncall    sub_100720070                                                  ; +0x40, 0x10004e6d0\ntest    eax, eax                                                       ; +0x45, 0x10004e6d5\njz      loc_10004E761                                                  ; +0x47, 0x10004e6d7\nxor     r12d, r12d                                                     ; +0x4d, 0x10004e6dd\nlea     r13, [rbp+var_48]                                              ; +0x50, 0x10004e6e0\njmp     short loc_10004E704                                            ; +0x54, 0x10004e6e4\nalign 10h                                                              ; +0x56, 0x10004e6e6\ninc     r12d                                                           ; +0x60, 0x10004e6f0\nmov     rdi, [rbx+328h]                                                ; +0x63, 0x10004e6f3\ncall    sub_100720070                                                  ; +0x6a, 0x10004e6fa\ncmp     r12d, eax                                                      ; +0x6f, 0x10004e6ff\njnb     short loc_10004E761                                            ; +0x72, 0x10004e702\nmov     rdi, [rbx+328h]                                                ; +0x74, 0x10004e704\nmov     esi, r12d                                                      ; +0x7b, 0x10004e70b\ncall    sub_1007200C0                                                  ; +0x7e, 0x10004e70e\nmov     r15, rax                                                       ; +0x83, 0x10004e713\nmov     rsi, [rbx+4E8h]                                                ; +0x86, 0x10004e716\nmov     rdi, r13                                                       ; +0x8d, 0x10004e71d\nmov     rdx, rax                                                       ; +0x90, 0x10004e720\nxor     ecx, ecx                                                       ; +0x93, 0x10004e723\nxor     r8d, r8d                                                       ; +0x95, 0x10004e725\ncall    LevelEditorLayer__getObjectRect                                ; +0x98, 0x10004e728\nmov     rsi, [rbx+4E8h]                                                ; +0x9d, 0x10004e72d\nmov     rdi, r13                                                       ; +0xa4, 0x10004e734\nmov     rdx, r15                                                       ; +0xa7, 0x10004e737\nxor     ecx, ecx                                                       ; +0xaa, 0x10004e73a\nxor     r8d, r8d                                                       ; +0xac, 0x10004e73c\ncall    LevelEditorLayer__getObjectRect                                ; +0xaf, 0x10004e73f\nmov     rdi, r13                                                       ; +0xb4, 0x10004e744\nmov     rsi, r14                                                       ; +0xb7, 0x10004e747\ncall    sub_10028D2D0                                                  ; +0xba, 0x10004e74a\ntest    al, al                                                         ; +0xbf, 0x10004e74f\njz      short loc_10004E6F0                                            ; +0xc1, 0x10004e751\nmov     rdi, [rbp+var_38]                                              ; +0xc3, 0x10004e753\nmov     rsi, r15                                                       ; +0xc7, 0x10004e757\ncall    sub_10071FCD0                                                  ; +0xca, 0x10004e75a\njmp     short loc_10004E6F0                                            ; +0xcf, 0x10004e75f\nmov     rdi, rbx                                                       ; +0xd1, 0x10004e761\nmov     rsi, [rbp+var_38]                                              ; +0xd4, 0x10004e764\nmovss   xmm0, [rbp+var_2C]                                             ; +0xd8, 0x10004e768\ncall    EditorUI__findSnapObject_1                                     ; +0xdd, 0x10004e76d\nadd     rsp, 28h                                                       ; +0xe2, 0x10004e772\npop     rbx                                                            ; +0xe6, 0x10004e776\npop     r12                                                            ; +0xe7, 0x10004e777\npop     r13                                                            ; +0xe9, 0x10004e779\npop     r14                                                            ; +0xeb, 0x10004e77b\npop     r15                                                            ; +0xed, 0x10004e77d\npop     rbp                                                            ; +0xef, 0x10004e77f\nretn                                                                   ; +0xf0, 0x10004e780\nmov     rdi, rbx                                                       ; +0xf1, 0x10004e781\nxor     esi, esi                                                       ; +0xf4, 0x10004e784\nmovss   xmm0, [rbp+var_2C]                                             ; +0xf6, 0x10004e786\nadd     rsp, 28h                                                       ; +0xfb, 0x10004e78b\npop     rbx                                                            ; +0xff, 0x10004e78f\npop     r12                                                            ; +0x100, 0x10004e790\npop     r13                                                            ; +0x102, 0x10004e792\npop     r14                                                            ; +0x104, 0x10004e794\npop     r15                                                            ; +0x106, 0x10004e796\npop     rbp                                                            ; +0x108, 0x10004e798\njmp     EditorUI__findSnapObject_1                                     ; +0x109, 0x10004e799", "xrefs": ["EditorUI::ccTouchBegan @ 0x10004f196", "EditorUI::ccTouchBegan @ 0x10004f29d"], "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"}