; ; EditorUI::getSmartNeighbor from 0x1401186c0 to 0x1401187de (286 bytes) ; ; 18 xrefs: ; > EditorUI::addObjectsToSmartTemplate @ 0x140115efe ; > EditorUI::addObjectsToSmartTemplate @ 0x140115f2d ; > EditorUI::addObjectsToSmartTemplate @ 0x140115f59 ; > EditorUI::addObjectsToSmartTemplate @ 0x140115f85 ; > EditorUI::addObjectsToSmartTemplate @ 0x140115fb1 ; > EditorUI::addObjectsToSmartTemplate @ 0x140115fdd ; > EditorUI::addObjectsToSmartTemplate @ 0x140116009 ; > EditorUI::addObjectsToSmartTemplate @ 0x140116035 ; > EditorUI::createSmartObjectsFromTemplate @ 0x140117134 ; > EditorUI::createSmartObjectsFromTemplate @ 0x140117161 ; > EditorUI::createSmartObjectsFromTemplate @ 0x140117189 ; > EditorUI::createSmartObjectsFromTemplate @ 0x1401171b1 ; > EditorUI::createSmartObjectsFromTemplate @ 0x1401171d9 ; > EditorUI::createSmartObjectsFromTemplate @ 0x140117205 ; > EditorUI::createSmartObjectsFromTemplate @ 0x14011722d ; > EditorUI::createSmartObjectsFromTemplate @ 0x140117256 ; > @ 0x1406c9390 ; > @ 0x1406c939c ; ; This function is hookable on this platform! ; ; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA ; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings ; mov [rsp+arg_18], rbx ; +0x0, 0x1401186c0 mov [rsp+arg_0], rcx ; +0x5, 0x1401186c5 push rbp ; +0xa, 0x1401186ca push rsi ; +0xb, 0x1401186cb push r14 ; +0xc, 0x1401186cc sub rsp, 50h ; +0xe, 0x1401186ce xor r14d, r14d ; +0x12, 0x1401186d2 mov rbx, r8 ; +0x15, 0x1401186d5 test rdx, rdx ; +0x18, 0x1401186d8 jz short loc_1401186E5 ; +0x1b, 0x1401186db mov ebp, [rdx+39Ch] ; +0x1d, 0x1401186dd jmp short loc_1401186E8 ; +0x23, 0x1401186e3 mov ebp, r14d ; +0x25, 0x1401186e5 xor r8d, r8d ; +0x28, 0x1401186e8 mov [rsp+68h+arg_10], rdi ; +0x2b, 0x1401186eb mov edx, r9d ; +0x33, 0x1401186f3 lea rcx, [rsp+68h+arg_8] ; +0x36, 0x1401186f6 call GJSmartTemplate__offsetForDir ; +0x3b, 0x1401186fb mov r8, rax ; +0x40, 0x140118700 lea rdx, [rsp+68h+arg_0] ; +0x43, 0x140118703 mov rcx, rbx ; +0x48, 0x140118708 call cs:??HCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator+(cocos2d::CCPoint const &) ; +0x4b, 0x14011870b movss xmm2, dword ptr [rsp+68h+arg_0+4] ; +0x51, 0x140118711 lea rcx, [rsp+68h+var_28] ; +0x57, 0x140118717 movss xmm1, dword ptr [rsp+68h+arg_0] ; +0x5c, 0x14011871c movss xmm3, cs:width ; +0x62, 0x140118722 subss xmm2, cs:flt_140622C24 ; +0x6a, 0x14011872a subss xmm1, cs:flt_140622C24 ; +0x72, 0x140118732 movss [rsp+68h+var_48], xmm3 ; +0x7a, 0x14011873a call cs:??0CCRect@cocos2d@@QEAA@MMMM@Z; cocos2d::CCRect::CCRect(float,float,float,float) ; +0x80, 0x140118740 mov rsi, [rsp+68h+arg_20] ; +0x86, 0x140118746 mov ebx, r14d ; +0x8e, 0x14011874e mov rcx, rsi ; +0x91, 0x140118751 call cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x94, 0x140118754 test eax, eax ; +0x9a, 0x14011875a jz short loc_1401187B3 ; +0x9c, 0x14011875c xchg ax, ax ; +0x9e, 0x14011875e mov edx, ebx ; +0xa0, 0x140118760 mov rcx, rsi ; +0xa2, 0x140118762 call cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xa5, 0x140118765 mov rdi, rax ; +0xab, 0x14011876b cmp [rax+39Ch], ebp ; +0xae, 0x14011876e jz short loc_1401187A4 ; +0xb4, 0x140118774 mov rdx, [rax] ; +0xb6, 0x140118776 mov rcx, rax ; +0xb9, 0x140118779 call qword ptr [rdx+490h] ; +0xbc, 0x14011877c mov rdx, rax ; +0xc2, 0x140118782 lea rcx, [rsp+68h+var_38] ; +0xc5, 0x140118785 call cs:??0CCRect@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCRect::CCRect(cocos2d::CCRect const &) ; +0xca, 0x14011878a lea rdx, [rsp+68h+var_38] ; +0xd0, 0x140118790 lea rcx, [rsp+68h+var_28] ; +0xd5, 0x140118795 call cs:?intersectsRect@CCRect@cocos2d@@QEBA_NAEBV12@@Z; cocos2d::CCRect::intersectsRect(cocos2d::CCRect const &) ; +0xda, 0x14011879a test al, al ; +0xe0, 0x1401187a0 jnz short loc_1401187CE ; +0xe2, 0x1401187a2 mov rcx, rsi ; +0xe4, 0x1401187a4 inc ebx ; +0xe7, 0x1401187a7 call cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xe9, 0x1401187a9 cmp ebx, eax ; +0xef, 0x1401187af jb short loc_140118760 ; +0xf1, 0x1401187b1 xor eax, eax ; +0xf3, 0x1401187b3 mov rdi, [rsp+68h+arg_10] ; +0xf5, 0x1401187b5 mov rbx, [rsp+68h+arg_18] ; +0xfd, 0x1401187bd add rsp, 50h ; +0x105, 0x1401187c5 pop r14 ; +0x109, 0x1401187c9 pop rsi ; +0x10b, 0x1401187cb pop rbp ; +0x10c, 0x1401187cc retn ; +0x10d, 0x1401187cd cmp dword ptr [rdi+4E8h], 5 ; +0x10e, 0x1401187ce cmovz r14, rdi ; +0x115, 0x1401187d5 mov rax, r14 ; +0x119, 0x1401187d9 jmp short loc_1401187B5 ; +0x11c, 0x1401187dc