{"type": "func", "start": 6857048, "end": 6857324, "name": "EditorUI::getNeighbor", "pseudocode": "// \n// EditorUI::getNeighbor from 0x68a158 to 0x68a26c (276 bytes)\n// \n// 14 xrefs:\n// > EditorUI::processSmartObjectsFromType @ 0x68a380\n// > EditorUI::convertKeyBasedOnNeighbors @ 0x9cb8a0\n// > EditorUI::convertKeyBasedOnNeighbors @ 0x9cb8cc\n// > EditorUI::convertKeyBasedOnNeighbors @ 0x9cb8f8\n// > EditorUI::convertKeyBasedOnNeighbors @ 0x9cb924\n// > EditorUI::createOutlines @ 0x9ccf08\n// > EditorUI::createOutlines @ 0x9ccf30\n// > EditorUI::createOutlines @ 0x9ccf58\n// > EditorUI::createOutlines @ 0x9ccf80\n// > EditorUI::createOutlines @ 0x9ccfa8\n// > EditorUI::createOutlines @ 0x9ccfd0\n// > EditorUI::createOutlines @ 0x9ccff8\n// > EditorUI::createOutlines @ 0x9cd020\n// > <???> @ 0x844b0\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\n// local variable allocation has failed, the output may be wrong!\ncocos2d::CCNode *EditorUI::getNeighbor(\n        EditorUI *a1,\n        int a2,\n        cocos2d::CCPoint a3,\n        GJSmartDirection a4,\n        cocos2d::CCArray *a5)\n{\n  cocos2d::CCArray *v5; // x4\n  cocos2d::CCArray *v6; // x22\n  unsigned int v7; // w20\n  int v8; // w25\n  int v9; // w23\n  cocos2d::CCNode *v10; // x19\n  int x; // w21\n  __int64 v13; // [xsp+58h] [xbp+58h]\n  __int64 v14; // [xsp+68h] [xbp+68h] BYREF\n  _BYTE v15[8]; // [xsp+70h] [xbp+70h] BYREF\n\n  v13 = *(_QWORD *)&a4;\n  v6 = v5;\n  v7 = 0;\n  GJSmartTemplate::offsetForDir((GJSmartDirection)a5, a2);\n  cocos2d::CCPoint::operator+(&v14, v13, v15);\n  v8 = (int)*(float *)&v14;\n  v9 = (int)*((float *)&v14 + 1);\n  if ( !(unsigned int)cocos2d::CCArray::count(v6) )\n    return nullptr;\n  while ( 1 )\n  {\n    v10 = (cocos2d::CCNode *)cocos2d::CCArray::objectAtIndex(v6, v7);\n    x = (int)v10->getPosition(v10)->x;\n    if ( v9 == (int)v10->getPosition(v10)->y && v8 == x )\n      break;\n    if ( ++v7 >= (unsigned int)cocos2d::CCArray::count(v6) )\n      return nullptr;\n  }\n  return v10;\n}", "assembly": "; \n; EditorUI::getNeighbor from 0x68a158 to 0x68a26c (276 bytes)\n; \n; 14 xrefs:\n; > EditorUI::processSmartObjectsFromType @ 0x68a380\n; > EditorUI::convertKeyBasedOnNeighbors @ 0x9cb8a0\n; > EditorUI::convertKeyBasedOnNeighbors @ 0x9cb8cc\n; > EditorUI::convertKeyBasedOnNeighbors @ 0x9cb8f8\n; > EditorUI::convertKeyBasedOnNeighbors @ 0x9cb924\n; > EditorUI::createOutlines @ 0x9ccf08\n; > EditorUI::createOutlines @ 0x9ccf30\n; > EditorUI::createOutlines @ 0x9ccf58\n; > EditorUI::createOutlines @ 0x9ccf80\n; > EditorUI::createOutlines @ 0x9ccfa8\n; > EditorUI::createOutlines @ 0x9ccfd0\n; > EditorUI::createOutlines @ 0x9ccff8\n; > EditorUI::createOutlines @ 0x9cd020\n; > <???> @ 0x844b0\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_80]!                                ; +0x0, 0x68a158\nMOV             W0, W3                                                 ; +0x4, 0x68a15c\nMOV             X29, SP                                                ; +0x8, 0x68a160\nSTP             X23, X24, [SP,#0x80+var_50]                            ; +0xc, 0x68a164\nADRP            X24, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x68a168\nSTR             X25, [SP,#0x80+var_40]                                 ; +0x14, 0x68a16c\nSTP             X19, X20, [SP,#0x80+var_70]                            ; +0x18, 0x68a170\nADD             X19, X29, #0x80+var_10                                 ; +0x1c, 0x68a174\nSTR             X2, [X29,#0x80+var_28]                                 ; +0x20, 0x68a178\nLDR             X3, [X24,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x24, 0x68a17c\nMOV             X8, X19                                                ; +0x28, 0x68a180\nSTP             X21, X22, [SP,#0x80+var_60]                            ; +0x2c, 0x68a184\nMOV             X22, X4                                                ; +0x30, 0x68a188\nMOV             W20, #0                                                ; +0x34, 0x68a18c\nLDR             X3, [X3]                                               ; +0x38, 0x68a190\nSTR             X3, [X29,#0x80+var_8]                                  ; +0x3c, 0x68a194\nBL              _ZN15GJSmartTemplate12offsetForDirE16GJSmartDirectioni; GJSmartTemplate::offsetForDir(GJSmartDirection,int) ; +0x40, 0x68a198\nLDR             X2, [X29,#0x80+var_28]                                 ; +0x44, 0x68a19c\nADD             X8, X29, #0x80+var_18                                  ; +0x48, 0x68a1a0\nMOV             X1, X19                                                ; +0x4c, 0x68a1a4\nMOV             X0, X2                                                 ; +0x50, 0x68a1a8\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0x54, 0x68a1ac\nLDR             S2, [X29,#0x80+var_18]                                 ; +0x58, 0x68a1b0\nMOV             X0, X22; this                                          ; +0x5c, 0x68a1b4\nFCVTZS          W25, S2                                                ; +0x60, 0x68a1b8\nLDR             S2, [X29,#0x80+var_14]                                 ; +0x64, 0x68a1bc\nFCVTZS          W23, S2                                                ; +0x68, 0x68a1c0\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x6c, 0x68a1c4\nCMP             W20, W0                                                ; +0x70, 0x68a1c8\nB.CS            loc_68A230                                             ; +0x74, 0x68a1cc\nMOV             W1, W20; unsigned int                                  ; +0x78, 0x68a1d0\nMOV             X0, X22; this                                          ; +0x7c, 0x68a1d4\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x80, 0x68a1d8\nLDR             X1, [X0]                                               ; +0x84, 0x68a1dc\nMOV             X19, X0                                                ; +0x88, 0x68a1e0\nLDR             X1, [X1,#0xC0]                                         ; +0x8c, 0x68a1e4\nBLR             X1                                                     ; +0x90, 0x68a1e8\nLDR             X1, [X19]                                              ; +0x94, 0x68a1ec\nLDR             S1, [X0]                                               ; +0x98, 0x68a1f0\nMOV             X0, X19                                                ; +0x9c, 0x68a1f4\nLDR             X1, [X1,#0xC0]                                         ; +0xa0, 0x68a1f8\nFCVTZS          W21, S1                                                ; +0xa4, 0x68a1fc\nBLR             X1                                                     ; +0xa8, 0x68a200\nLDR             S0, [X0,#4]                                            ; +0xac, 0x68a204\nFCVTZS          W0, S0                                                 ; +0xb0, 0x68a208\nCMP             W23, W0                                                ; +0xb4, 0x68a20c\nB.NE            loc_68A21C                                             ; +0xb8, 0x68a210\nCMP             W25, W21                                               ; +0xbc, 0x68a214\nB.EQ            loc_68A260                                             ; +0xc0, 0x68a218\nMOV             X0, X22; this                                          ; +0xc4, 0x68a21c\nADD             W20, W20, #1                                           ; +0xc8, 0x68a220\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xcc, 0x68a224\nCMP             W20, W0                                                ; +0xd0, 0x68a228\nB.CC            loc_68A1D0                                             ; +0xd4, 0x68a22c\nMOV             X0, #0                                                 ; +0xd8, 0x68a230\nLDR             X24, [X24,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xdc, 0x68a234\nLDR             X2, [X29,#0x80+var_8]                                  ; +0xe0, 0x68a238\nLDR             X1, [X24]                                              ; +0xe4, 0x68a23c\nCMP             X2, X1                                                 ; +0xe8, 0x68a240\nB.NE            loc_68A268                                             ; +0xec, 0x68a244\nLDP             X19, X20, [SP,#0x80+var_70]                            ; +0xf0, 0x68a248\nLDP             X21, X22, [SP,#0x80+var_60]                            ; +0xf4, 0x68a24c\nLDP             X23, X24, [SP,#0x80+var_50]                            ; +0xf8, 0x68a250\nLDR             X25, [SP,#0x80+var_40]                                 ; +0xfc, 0x68a254\nLDP             X29, X30, [SP+0x80+var_80],#0x80                       ; +0x100, 0x68a258\nRET                                                                    ; +0x104, 0x68a25c\nMOV             X0, X19                                                ; +0x108, 0x68a260\nB               loc_68A234                                             ; +0x10c, 0x68a264\nBL              .__stack_chk_fail                                      ; +0x110, 0x68a268", "xrefs": ["EditorUI::processSmartObjectsFromType @ 0x68a380", "EditorUI::convertKeyBasedOnNeighbors @ 0x9cb8a0", "EditorUI::convertKeyBasedOnNeighbors @ 0x9cb8cc", "EditorUI::convertKeyBasedOnNeighbors @ 0x9cb8f8", "EditorUI::convertKeyBasedOnNeighbors @ 0x9cb924", "EditorUI::createOutlines @ 0x9ccf08", "EditorUI::createOutlines @ 0x9ccf30", "EditorUI::createOutlines @ 0x9ccf58", "EditorUI::createOutlines @ 0x9ccf80", "EditorUI::createOutlines @ 0x9ccfa8", "EditorUI::createOutlines @ 0x9ccfd0", "EditorUI::createOutlines @ 0x9ccff8", "EditorUI::createOutlines @ 0x9cd020", "<???> @ 0x844b0"], "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"}