{"type": "func", "start": 3662224, "end": 3662390, "name": "EditorUI::getNeighbor", "pseudocode": "// \n// EditorUI::getNeighbor from 0x37e190 to 0x37e236 (166 bytes)\n// \n// 13 xrefs:\n// > EditorUI::processSmartObjectsFromType @ 0x37e2c4\n// > EditorUI::convertKeyBasedOnNeighbors @ 0x53649c\n// > EditorUI::convertKeyBasedOnNeighbors @ 0x5364c2\n// > EditorUI::convertKeyBasedOnNeighbors @ 0x5364e0\n// > EditorUI::convertKeyBasedOnNeighbors @ 0x5364fe\n// > EditorUI::createOutlines @ 0x537178\n// > EditorUI::createOutlines @ 0x537194\n// > EditorUI::createOutlines @ 0x5371b0\n// > EditorUI::createOutlines @ 0x5371d0\n// > EditorUI::createOutlines @ 0x5371ee\n// > EditorUI::createOutlines @ 0x53720c\n// > EditorUI::createOutlines @ 0x53722a\n// > EditorUI::createOutlines @ 0x537248\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\ncocos2d::CCNode *EditorUI::getNeighbor(\n        EditorUI *a1,\n        int a2,\n        cocos2d::CCPoint a3,\n        GJSmartDirection a4,\n        cocos2d::CCArray *a5)\n{\n  float x; // r5\n  unsigned int v6; // r5\n  int v7; // r7\n  int v8; // r8\n  cocos2d::CCNode *v9; // r4\n  int v10; // r10\n  float y; // s15\n  float v13[2]; // [sp+4h] [bp-14h] BYREF\n  cocos2d::CCPoint v14; // [sp+Ch] [bp-Ch] BYREF\n\n  x = a3.x;\n  GJSmartTemplate::offsetForDir(&v14, SLODWORD(a3.y), a2);\n  cocos2d::CCPoint::operator+(v13, LODWORD(x), &v14);\n  v6 = 0;\n  v7 = (int)v13[0];\n  v8 = (int)v13[1];\n  while ( 1 )\n  {\n    if ( v6 >= cocos2d::CCArray::count((cocos2d::CCArray *)a4) )\n      return nullptr;\n    v9 = (cocos2d::CCNode *)cocos2d::CCArray::objectAtIndex((cocos2d::CCArray *)a4, v6);\n    v10 = (int)v9->getPosition(v9)->x;\n    y = v9->getPosition(v9)->y;\n    if ( v7 == v10 && v8 == (int)y )\n      break;\n    ++v6;\n  }\n  return v9;\n}", "assembly": "; \n; EditorUI::getNeighbor from 0x37e190 to 0x37e236 (166 bytes)\n; \n; 13 xrefs:\n; > EditorUI::processSmartObjectsFromType @ 0x37e2c4\n; > EditorUI::convertKeyBasedOnNeighbors @ 0x53649c\n; > EditorUI::convertKeyBasedOnNeighbors @ 0x5364c2\n; > EditorUI::convertKeyBasedOnNeighbors @ 0x5364e0\n; > EditorUI::convertKeyBasedOnNeighbors @ 0x5364fe\n; > EditorUI::createOutlines @ 0x537178\n; > EditorUI::createOutlines @ 0x537194\n; > EditorUI::createOutlines @ 0x5371b0\n; > EditorUI::createOutlines @ 0x5371d0\n; > EditorUI::createOutlines @ 0x5371ee\n; > EditorUI::createOutlines @ 0x53720c\n; > EditorUI::createOutlines @ 0x53722a\n; > EditorUI::createOutlines @ 0x537248\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.W          {R4-R10,LR}                                            ; +0x0, 0x37e190\nMOV             R5, R2                                                 ; +0x4, 0x37e194\nLDR             R6, =(__stack_chk_guard_ptr - 0x37E1A2)                ; +0x6, 0x37e196\nSUB             SP, SP, #0x18                                          ; +0x8, 0x37e198\nADD             R4, SP, #0x18+var_C                                    ; +0xa, 0x37e19a\nMOV             R7, R1                                                 ; +0xc, 0x37e19c\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xe, 0x37e19e\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x10, 0x37e1a0\nMOV             R1, R3                                                 ; +0x12, 0x37e1a2\nMOV             R0, R4                                                 ; +0x14, 0x37e1a4\nLDR.W           R9, [SP,#0x18+arg_0]                                   ; +0x16, 0x37e1a6\nLDR             R2, [R6]                                               ; +0x1a, 0x37e1aa\nSTR             R2, [SP,#0x18+var_4]                                   ; +0x1c, 0x37e1ac\nMOV             R2, R7                                                 ; +0x1e, 0x37e1ae\nBL              _ZN15GJSmartTemplate12offsetForDirE16GJSmartDirectioni; GJSmartTemplate::offsetForDir(GJSmartDirection,int) ; +0x20, 0x37e1b0\nMOV             R1, R5                                                 ; +0x24, 0x37e1b4\nADD             R0, SP, #0x18+var_14                                   ; +0x26, 0x37e1b6\nMOV             R2, R4                                                 ; +0x28, 0x37e1b8\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0x2a, 0x37e1ba\nVLDR            S15, [SP,#0x18+var_14]                                 ; +0x2e, 0x37e1be\nMOVS            R5, #0                                                 ; +0x32, 0x37e1c2\nVCVT.S32.F32    S15, S15                                               ; +0x34, 0x37e1c4\nVMOV            R7, S15                                                ; +0x38, 0x37e1c8\nVLDR            S15, [SP,#0x18+var_10]                                 ; +0x3c, 0x37e1cc\nVCVT.S32.F32    S15, S15                                               ; +0x40, 0x37e1d0\nVMOV            R8, S15                                                ; +0x44, 0x37e1d4\nMOV             R0, R9; this                                           ; +0x48, 0x37e1d8\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x4a, 0x37e1da\nCMP             R5, R0                                                 ; +0x4e, 0x37e1de\nBCS             loc_37E21E                                             ; +0x50, 0x37e1e0\nMOV             R1, R5; unsigned int                                   ; +0x52, 0x37e1e2\nMOV             R0, R9; this                                           ; +0x54, 0x37e1e4\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x56, 0x37e1e6\nLDR             R3, [R0]                                               ; +0x5a, 0x37e1ea\nMOV             R4, R0                                                 ; +0x5c, 0x37e1ec\nLDR             R3, [R3,#0x60]                                         ; +0x5e, 0x37e1ee\nBLX             R3                                                     ; +0x60, 0x37e1f0\nLDR             R3, [R4]                                               ; +0x62, 0x37e1f2\nLDR             R3, [R3,#0x60]                                         ; +0x64, 0x37e1f4\nVLDR            S14, [R0]                                              ; +0x66, 0x37e1f6\nMOV             R0, R4                                                 ; +0x6a, 0x37e1fa\nVCVT.S32.F32    S15, S14                                               ; +0x6c, 0x37e1fc\nVMOV            R10, S15                                               ; +0x70, 0x37e200\nBLX             R3                                                     ; +0x74, 0x37e204\nCMP             R7, R10                                                ; +0x76, 0x37e206\nVLDR            S15, [R0,#4]                                           ; +0x78, 0x37e208\nBNE             loc_37E21A                                             ; +0x7c, 0x37e20c\nVCVT.S32.F32    S15, S15                                               ; +0x7e, 0x37e20e\nVMOV            R3, S15                                                ; +0x82, 0x37e212\nCMP             R8, R3                                                 ; +0x86, 0x37e216\nBEQ             loc_37E222                                             ; +0x88, 0x37e218\nADDS            R5, #1                                                 ; +0x8a, 0x37e21a\nB               loc_37E1D8                                             ; +0x8c, 0x37e21c\nMOVS            R0, #0                                                 ; +0x8e, 0x37e21e\nB               loc_37E224                                             ; +0x90, 0x37e220\nMOV             R0, R4                                                 ; +0x92, 0x37e222\nLDR             R2, [SP,#0x18+var_4]                                   ; +0x94, 0x37e224\nLDR             R3, [R6]                                               ; +0x96, 0x37e226\nCMP             R2, R3                                                 ; +0x98, 0x37e228\nBEQ             loc_37E230                                             ; +0x9a, 0x37e22a\nBLX             __stack_chk_fail                                       ; +0x9c, 0x37e22c\nADD             SP, SP, #0x18                                          ; +0xa0, 0x37e230\nPOP.W           {R4-R10,PC}                                            ; +0xa2, 0x37e232", "xrefs": ["EditorUI::processSmartObjectsFromType @ 0x37e2c4", "EditorUI::convertKeyBasedOnNeighbors @ 0x53649c", "EditorUI::convertKeyBasedOnNeighbors @ 0x5364c2", "EditorUI::convertKeyBasedOnNeighbors @ 0x5364e0", "EditorUI::convertKeyBasedOnNeighbors @ 0x5364fe", "EditorUI::createOutlines @ 0x537178", "EditorUI::createOutlines @ 0x537194", "EditorUI::createOutlines @ 0x5371b0", "EditorUI::createOutlines @ 0x5371d0", "EditorUI::createOutlines @ 0x5371ee", "EditorUI::createOutlines @ 0x53720c", "EditorUI::createOutlines @ 0x53722a", "EditorUI::createOutlines @ 0x537248"], "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"}