{"type": "func", "start": 4729212, "end": 4729378, "name": "EditorUI::getNeighbor", "pseudocode": "// \n// EditorUI::getNeighbor from 0x48297c to 0x482a22 (166 bytes)\n// \n// 13 xrefs:\n// > EditorUI::processSmartObjectsFromType @ 0x482ab0\n// > EditorUI::convertKeyBasedOnNeighbors @ 0x66b5ec\n// > EditorUI::convertKeyBasedOnNeighbors @ 0x66b612\n// > EditorUI::convertKeyBasedOnNeighbors @ 0x66b630\n// > EditorUI::convertKeyBasedOnNeighbors @ 0x66b64e\n// > EditorUI::createOutlines @ 0x66c2c8\n// > EditorUI::createOutlines @ 0x66c2e4\n// > EditorUI::createOutlines @ 0x66c300\n// > EditorUI::createOutlines @ 0x66c320\n// > EditorUI::createOutlines @ 0x66c33e\n// > EditorUI::createOutlines @ 0x66c35c\n// > EditorUI::createOutlines @ 0x66c37a\n// > EditorUI::createOutlines @ 0x66c398\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:49:23 +0000\n// \n\nint __fastcall EditorUI::getNeighbor(int a1, int a2, int a3, int a4, cocos2d::CCArray *a5)\n{\n  unsigned int v6; // r5\n  int v7; // r7\n  int v8; // r8\n  int v9; // r4\n  int v10; // r10\n  float v11; // s15\n  float v13[2]; // [sp+4h] [bp-14h] BYREF\n  _BYTE v14[8]; // [sp+Ch] [bp-Ch] BYREF\n\n  GJSmartTemplate::offsetForDir(v14, a4, a2);\n  cocos2d::CCPoint::operator+(v13, a3, v14);\n  v6 = 0;\n  v7 = (int)v13[0];\n  v8 = (int)v13[1];\n  while ( 1 )\n  {\n    if ( v6 >= cocos2d::CCArray::count(a5) )\n      return 0;\n    v9 = cocos2d::CCArray::objectAtIndex(a5, v6);\n    v10 = (int)*(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v9 + 96))(v9);\n    v11 = *(float *)((*(int (__fastcall **)(int))(*(_DWORD *)v9 + 96))(v9) + 4);\n    if ( v7 == v10 && v8 == (int)v11 )\n      break;\n    ++v6;\n  }\n  return v9;\n}", "assembly": "; \n; EditorUI::getNeighbor from 0x48297c to 0x482a22 (166 bytes)\n; \n; 13 xrefs:\n; > EditorUI::processSmartObjectsFromType @ 0x482ab0\n; > EditorUI::convertKeyBasedOnNeighbors @ 0x66b5ec\n; > EditorUI::convertKeyBasedOnNeighbors @ 0x66b612\n; > EditorUI::convertKeyBasedOnNeighbors @ 0x66b630\n; > EditorUI::convertKeyBasedOnNeighbors @ 0x66b64e\n; > EditorUI::createOutlines @ 0x66c2c8\n; > EditorUI::createOutlines @ 0x66c2e4\n; > EditorUI::createOutlines @ 0x66c300\n; > EditorUI::createOutlines @ 0x66c320\n; > EditorUI::createOutlines @ 0x66c33e\n; > EditorUI::createOutlines @ 0x66c35c\n; > EditorUI::createOutlines @ 0x66c37a\n; > EditorUI::createOutlines @ 0x66c398\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:49:23 +0000\n; \nPUSH.W          {R4-R10,LR}                                            ; +0x0, 0x48297c\nMOV             R5, R2                                                 ; +0x4, 0x482980\nLDR             R6, =(__stack_chk_guard_ptr - 0x48298E)                ; +0x6, 0x482982\nSUB             SP, SP, #0x18                                          ; +0x8, 0x482984\nADD             R4, SP, #0x18+var_C                                    ; +0xa, 0x482986\nMOV             R7, R1                                                 ; +0xc, 0x482988\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xe, 0x48298a\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x10, 0x48298c\nMOV             R1, R3                                                 ; +0x12, 0x48298e\nMOV             R0, R4                                                 ; +0x14, 0x482990\nLDR.W           R9, [SP,#0x18+arg_0]                                   ; +0x16, 0x482992\nLDR             R2, [R6]                                               ; +0x1a, 0x482996\nSTR             R2, [SP,#0x18+var_4]                                   ; +0x1c, 0x482998\nMOV             R2, R7                                                 ; +0x1e, 0x48299a\nBL              _ZN15GJSmartTemplate12offsetForDirE16GJSmartDirectioni; GJSmartTemplate::offsetForDir(GJSmartDirection,int) ; +0x20, 0x48299c\nMOV             R1, R5                                                 ; +0x24, 0x4829a0\nADD             R0, SP, #0x18+var_14                                   ; +0x26, 0x4829a2\nMOV             R2, R4                                                 ; +0x28, 0x4829a4\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0x2a, 0x4829a6\nVLDR            S15, [SP,#0x18+var_14]                                 ; +0x2e, 0x4829aa\nMOVS            R5, #0                                                 ; +0x32, 0x4829ae\nVCVT.S32.F32    S15, S15                                               ; +0x34, 0x4829b0\nVMOV            R7, S15                                                ; +0x38, 0x4829b4\nVLDR            S15, [SP,#0x18+var_10]                                 ; +0x3c, 0x4829b8\nVCVT.S32.F32    S15, S15                                               ; +0x40, 0x4829bc\nVMOV            R8, S15                                                ; +0x44, 0x4829c0\nMOV             R0, R9; this                                           ; +0x48, 0x4829c4\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x4a, 0x4829c6\nCMP             R5, R0                                                 ; +0x4e, 0x4829ca\nBCS             loc_482A0A                                             ; +0x50, 0x4829cc\nMOV             R1, R5; unsigned int                                   ; +0x52, 0x4829ce\nMOV             R0, R9; this                                           ; +0x54, 0x4829d0\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x56, 0x4829d2\nLDR             R3, [R0]                                               ; +0x5a, 0x4829d6\nMOV             R4, R0                                                 ; +0x5c, 0x4829d8\nLDR             R3, [R3,#0x60]                                         ; +0x5e, 0x4829da\nBLX             R3                                                     ; +0x60, 0x4829dc\nLDR             R3, [R4]                                               ; +0x62, 0x4829de\nLDR             R3, [R3,#0x60]                                         ; +0x64, 0x4829e0\nVLDR            S14, [R0]                                              ; +0x66, 0x4829e2\nMOV             R0, R4                                                 ; +0x6a, 0x4829e6\nVCVT.S32.F32    S15, S14                                               ; +0x6c, 0x4829e8\nVMOV            R10, S15                                               ; +0x70, 0x4829ec\nBLX             R3                                                     ; +0x74, 0x4829f0\nCMP             R7, R10                                                ; +0x76, 0x4829f2\nVLDR            S15, [R0,#4]                                           ; +0x78, 0x4829f4\nBNE             loc_482A06                                             ; +0x7c, 0x4829f8\nVCVT.S32.F32    S15, S15                                               ; +0x7e, 0x4829fa\nVMOV            R3, S15                                                ; +0x82, 0x4829fe\nCMP             R8, R3                                                 ; +0x86, 0x482a02\nBEQ             loc_482A0E                                             ; +0x88, 0x482a04\nADDS            R5, #1                                                 ; +0x8a, 0x482a06\nB               loc_4829C4                                             ; +0x8c, 0x482a08\nMOVS            R0, #0                                                 ; +0x8e, 0x482a0a\nB               loc_482A10                                             ; +0x90, 0x482a0c\nMOV             R0, R4                                                 ; +0x92, 0x482a0e\nLDR             R2, [SP,#0x18+var_4]                                   ; +0x94, 0x482a10\nLDR             R3, [R6]                                               ; +0x96, 0x482a12\nCMP             R2, R3                                                 ; +0x98, 0x482a14\nBEQ             loc_482A1C                                             ; +0x9a, 0x482a16\nBLX             __stack_chk_fail                                       ; +0x9c, 0x482a18\nADD             SP, SP, #0x18                                          ; +0xa0, 0x482a1c\nPOP.W           {R4-R10,PC}                                            ; +0xa2, 0x482a1e", "xrefs": ["EditorUI::processSmartObjectsFromType @ 0x482ab0", "EditorUI::convertKeyBasedOnNeighbors @ 0x66b5ec", "EditorUI::convertKeyBasedOnNeighbors @ 0x66b612", "EditorUI::convertKeyBasedOnNeighbors @ 0x66b630", "EditorUI::convertKeyBasedOnNeighbors @ 0x66b64e", "EditorUI::createOutlines @ 0x66c2c8", "EditorUI::createOutlines @ 0x66c2e4", "EditorUI::createOutlines @ 0x66c300", "EditorUI::createOutlines @ 0x66c320", "EditorUI::createOutlines @ 0x66c33e", "EditorUI::createOutlines @ 0x66c35c", "EditorUI::createOutlines @ 0x66c37a", "EditorUI::createOutlines @ 0x66c398"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "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"}