{"type": "func", "start": 5370511648, "end": 5370511857, "name": "EditorUI::getNeighbor", "pseudocode": "// \n// EditorUI::getNeighbor from 0x1401b8120 to 0x1401b81f1 (209 bytes)\n// \n// 14 xrefs:\n// > EditorUI::processSmartObjectsFromType @ 0x1401b7dfd\n// > EditorUI::convertKeyBasedOnNeighbors @ 0x1401f996e\n// > EditorUI::convertKeyBasedOnNeighbors @ 0x1401f9994\n// > EditorUI::convertKeyBasedOnNeighbors @ 0x1401f99ba\n// > EditorUI::convertKeyBasedOnNeighbors @ 0x1401f99e0\n// > EditorUI::createOutlines @ 0x1401fab92\n// > EditorUI::createOutlines @ 0x1401fabcc\n// > EditorUI::createOutlines @ 0x1401fac06\n// > EditorUI::createOutlines @ 0x1401fac40\n// > EditorUI::createOutlines @ 0x1401fac7a\n// > EditorUI::createOutlines @ 0x1401facb4\n// > EditorUI::createOutlines @ 0x1401facee\n// > EditorUI::createOutlines @ 0x1401fad25\n// > <???> @ 0x14091a2f4\n// \n// This function is hookable on this platform (idp: pc, 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 11:27:58 +0000\n// \n\nstruct cocos2d::CCObject *__fastcall EditorUI::getNeighbor(\n        __int64 a1,\n        unsigned int a2,\n        __int64 a3,\n        unsigned int a4,\n        cocos2d::CCArray *a5)\n{\n  __int64 v6; // rax\n  cocos2d::CCArray *v7; // rbp\n  unsigned int v8; // edi\n  int v9; // r15d\n  int v10; // r14d\n  struct cocos2d::CCObject *v11; // rsi\n  int v12; // ebx\n  int v13; // ecx\n  _BYTE v15[40]; // [rsp+20h] [rbp-28h] BYREF\n  __int64 v16; // [rsp+50h] [rbp+8h] BYREF\n\n  v16 = a1;\n  v6 = GJSmartTemplate::offsetForDir(v15, a4, a2);\n  cocos2d::CCPoint::operator+(a3, &v16, v6);\n  v7 = a5;\n  v8 = 0;\n  v9 = (int)*(float *)&v16;\n  v10 = (int)*((float *)&v16 + 1);\n  if ( !cocos2d::CCArray::count(a5) )\n    return nullptr;\n  while ( 1 )\n  {\n    v11 = cocos2d::CCArray::objectAtIndex(v7, v8);\n    v12 = (int)*(float *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v11 + 200LL))(v11);\n    v13 = (int)*(float *)((*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v11 + 200LL))(v11) + 4);\n    if ( v9 == v12 && v10 == v13 )\n      break;\n    if ( ++v8 >= cocos2d::CCArray::count(v7) )\n      return nullptr;\n  }\n  return v11;\n}", "assembly": "; \n; EditorUI::getNeighbor from 0x1401b8120 to 0x1401b81f1 (209 bytes)\n; \n; 14 xrefs:\n; > EditorUI::processSmartObjectsFromType @ 0x1401b7dfd\n; > EditorUI::convertKeyBasedOnNeighbors @ 0x1401f996e\n; > EditorUI::convertKeyBasedOnNeighbors @ 0x1401f9994\n; > EditorUI::convertKeyBasedOnNeighbors @ 0x1401f99ba\n; > EditorUI::convertKeyBasedOnNeighbors @ 0x1401f99e0\n; > EditorUI::createOutlines @ 0x1401fab92\n; > EditorUI::createOutlines @ 0x1401fabcc\n; > EditorUI::createOutlines @ 0x1401fac06\n; > EditorUI::createOutlines @ 0x1401fac40\n; > EditorUI::createOutlines @ 0x1401fac7a\n; > EditorUI::createOutlines @ 0x1401facb4\n; > EditorUI::createOutlines @ 0x1401facee\n; > EditorUI::createOutlines @ 0x1401fad25\n; > <???> @ 0x14091a2f4\n; \n; This function is hookable on this platform (idp: pc, 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 11:27:58 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1401b8120\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1401b8125\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x1401b812a\nmov     [rsp+arg_0], rcx                                               ; +0xf, 0x1401b812f\npush    rdi                                                            ; +0x14, 0x1401b8134\npush    r14                                                            ; +0x15, 0x1401b8135\npush    r15                                                            ; +0x17, 0x1401b8137\nsub     rsp, 30h                                                       ; +0x19, 0x1401b8139\nmov     rbx, r8                                                        ; +0x1d, 0x1401b813d\nlea     rcx, [rsp+48h+var_28]                                          ; +0x20, 0x1401b8140\nmov     r8d, edx                                                       ; +0x25, 0x1401b8145\nmov     edx, r9d                                                       ; +0x28, 0x1401b8148\ncall    GJSmartTemplate__offsetForDir                                  ; +0x2b, 0x1401b814b\nmov     r8, rax                                                        ; +0x30, 0x1401b8150\nlea     rdx, [rsp+48h+arg_0]                                           ; +0x33, 0x1401b8153\nmov     rcx, rbx                                                       ; +0x38, 0x1401b8158\ncall    cs:??HCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator+(cocos2d::CCPoint const &) ; +0x3b, 0x1401b815b\nmov     rbp, [rsp+48h+arg_20]                                          ; +0x41, 0x1401b8161\nxor     edi, edi                                                       ; +0x46, 0x1401b8166\ncvttss2si r15d, dword ptr [rsp+48h+arg_0]                              ; +0x48, 0x1401b8168\nmov     rcx, rbp                                                       ; +0x4f, 0x1401b816f\ncvttss2si r14d, dword ptr [rsp+48h+arg_0+4]                            ; +0x52, 0x1401b8172\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x59, 0x1401b8179\ntest    eax, eax                                                       ; +0x5f, 0x1401b817f\njz      short loc_1401B81D1                                            ; +0x61, 0x1401b8181\nmov     edx, edi                                                       ; +0x63, 0x1401b8183\nmov     rcx, rbp                                                       ; +0x65, 0x1401b8185\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x68, 0x1401b8188\nmov     rsi, rax                                                       ; +0x6e, 0x1401b818e\nmov     rcx, [rax]                                                     ; +0x71, 0x1401b8191\nmov     rdx, [rcx+0C8h]                                                ; +0x74, 0x1401b8194\nmov     rcx, rax                                                       ; +0x7b, 0x1401b819b\ncall    rdx                                                            ; +0x7e, 0x1401b819e\nmov     rcx, [rsi]                                                     ; +0x80, 0x1401b81a0\ncvttss2si ebx, dword ptr [rax]                                         ; +0x83, 0x1401b81a3\nmov     rdx, [rcx+0C8h]                                                ; +0x87, 0x1401b81a7\nmov     rcx, rsi                                                       ; +0x8e, 0x1401b81ae\ncall    rdx                                                            ; +0x91, 0x1401b81b1\ncvttss2si ecx, dword ptr [rax+4]                                       ; +0x93, 0x1401b81b3\ncmp     r15d, ebx                                                      ; +0x98, 0x1401b81b8\njnz     short loc_1401B81C2                                            ; +0x9b, 0x1401b81bb\ncmp     r14d, ecx                                                      ; +0x9d, 0x1401b81bd\njz      short loc_1401B81EC                                            ; +0xa0, 0x1401b81c0\nmov     rcx, rbp                                                       ; +0xa2, 0x1401b81c2\ninc     edi                                                            ; +0xa5, 0x1401b81c5\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xa7, 0x1401b81c7\ncmp     edi, eax                                                       ; +0xad, 0x1401b81cd\njb      short loc_1401B8183                                            ; +0xaf, 0x1401b81cf\nxor     eax, eax                                                       ; +0xb1, 0x1401b81d1\nmov     rbx, [rsp+48h+arg_8]                                           ; +0xb3, 0x1401b81d3\nmov     rbp, [rsp+48h+arg_10]                                          ; +0xb8, 0x1401b81d8\nmov     rsi, [rsp+48h+arg_18]                                          ; +0xbd, 0x1401b81dd\nadd     rsp, 30h                                                       ; +0xc2, 0x1401b81e2\npop     r15                                                            ; +0xc6, 0x1401b81e6\npop     r14                                                            ; +0xc8, 0x1401b81e8\npop     rdi                                                            ; +0xca, 0x1401b81ea\nretn                                                                   ; +0xcb, 0x1401b81eb\nmov     rax, rsi                                                       ; +0xcc, 0x1401b81ec\njmp     short loc_1401B81D3                                            ; +0xcf, 0x1401b81ef", "xrefs": ["EditorUI::processSmartObjectsFromType @ 0x1401b7dfd", "EditorUI::convertKeyBasedOnNeighbors @ 0x1401f996e", "EditorUI::convertKeyBasedOnNeighbors @ 0x1401f9994", "EditorUI::convertKeyBasedOnNeighbors @ 0x1401f99ba", "EditorUI::convertKeyBasedOnNeighbors @ 0x1401f99e0", "EditorUI::createOutlines @ 0x1401fab92", "EditorUI::createOutlines @ 0x1401fabcc", "EditorUI::createOutlines @ 0x1401fac06", "EditorUI::createOutlines @ 0x1401fac40", "EditorUI::createOutlines @ 0x1401fac7a", "EditorUI::createOutlines @ 0x1401facb4", "EditorUI::createOutlines @ 0x1401facee", "EditorUI::createOutlines @ 0x1401fad25", "<???> @ 0x14091a2f4"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}