; ; EditorUI::findSnapObject_1 from 0x1401bf500 to 0x1401bf807 (775 bytes) ; ; 4 xrefs: ; > EditorUI::findSnapObject @ 0x1401bf4f8 ; > @ 0x1408a25cc ; > @ 0x1408a260c ; > @ 0x14091a5dc ; ; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True! ; ; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA ; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings ; Generated at Fri, 27 Nov 2026 11:28:02 +0000 ; mov [rsp-8+arg_10], rbx ; +0x0, 0x1401bf500 push rbp ; +0x5, 0x1401bf505 push rsi ; +0x6, 0x1401bf506 push r14 ; +0x7, 0x1401bf507 lea rbp, [rsp-47h] ; +0x9, 0x1401bf509 sub rsp, 0B0h ; +0xe, 0x1401bf50e movaps [rsp+0C0h+var_40], xmm8 ; +0x15, 0x1401bf515 movaps xmm8, xmm2 ; +0x1e, 0x1401bf51e mov r14, rdx ; +0x22, 0x1401bf522 mov rsi, rcx ; +0x25, 0x1401bf525 test rdx, rdx ; +0x28, 0x1401bf528 jz loc_1401BF6F0 ; +0x2b, 0x1401bf52b mov rcx, rdx ; +0x31, 0x1401bf531 call cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x34, 0x1401bf534 test eax, eax ; +0x3a, 0x1401bf53a jz loc_1401BF6F0 ; +0x3c, 0x1401bf53c movaps [rsp+0C0h+var_30], xmm7 ; +0x42, 0x1401bf542 mov rcx, r14 ; +0x4a, 0x1401bf54a movss xmm7, cs:dword_140835AA0 ; +0x4d, 0x1401bf54d xor ebx, ebx ; +0x55, 0x1401bf555 call cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x57, 0x1401bf557 test eax, eax ; +0x5d, 0x1401bf55d jz loc_1401BF6CF ; +0x5f, 0x1401bf55f mov [rsp+0C0h+arg_0], rdi ; +0x65, 0x1401bf565 movaps [rsp+0C0h+var_20], xmm6 ; +0x6d, 0x1401bf56d movaps [rsp+0C0h+var_50], xmm9 ; +0x75, 0x1401bf575 xorps xmm9, xmm9 ; +0x7b, 0x1401bf57b movaps [rsp+0C0h+var_60], xmm10 ; +0x7f, 0x1401bf57f movdqa xmm10, cs:xmmword_140836C90 ; +0x85, 0x1401bf585 xchg ax, ax ; +0x8e, 0x1401bf58e mov edx, ebx ; +0x90, 0x1401bf590 mov rcx, r14 ; +0x92, 0x1401bf592 call cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x95, 0x1401bf595 mov rcx, rax ; +0x9b, 0x1401bf59b mov rdi, rax ; +0x9e, 0x1401bf59e call GameObject__updateStartPos ; +0xa1, 0x1401bf5a1 mov edx, [rdi+40Ch] ; +0xa6, 0x1401bf5a6 lea rcx, [rbp+57h+var_80] ; +0xac, 0x1401bf5ac call offsetForKey ; +0xb0, 0x1401bf5b0 mov r8, rax ; +0xb5, 0x1401bf5b5 lea rcx, [rbp+57h+var_90] ; +0xb8, 0x1401bf5b8 mov rdx, rdi ; +0xbc, 0x1401bf5bc call GameToolbox__getRelativeOffset ; +0xbf, 0x1401bf5bf mov rcx, [rdi] ; +0xc4, 0x1401bf5c4 mov rdx, [rcx+0C8h] ; +0xc7, 0x1401bf5c7 mov rcx, rdi ; +0xce, 0x1401bf5ce call rdx ; +0xd1, 0x1401bf5d1 lea r8, [rbp+57h+var_90] ; +0xd3, 0x1401bf5d3 mov rcx, rax ; +0xd7, 0x1401bf5d7 lea rdx, [rbp+57h+var_88] ; +0xda, 0x1401bf5da call cs:??GCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator-(cocos2d::CCPoint const &) ; +0xde, 0x1401bf5de lea rdx, dword_14090A6E8 ; +0xe4, 0x1401bf5e4 lea rcx, [rbp+57h+var_78] ; +0xeb, 0x1401bf5eb call cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xef, 0x1401bf5ef mov r9, rdi ; +0xf5, 0x1401bf5f5 lea r8, [rbp+57h+var_88] ; +0xf8, 0x1401bf5f8 lea rdx, [rbp+57h+arg_8] ; +0xfc, 0x1401bf5fc mov [rsp+0C0h+var_A0], rax ; +0x100, 0x1401bf600 mov rcx, rsi ; +0x105, 0x1401bf605 call EditorUI__applySpecialOffset ; +0x108, 0x1401bf608 lea rdx, [rbp+57h+arg_8] ; +0x10d, 0x1401bf60d lea rcx, [rbp+57h+var_70] ; +0x111, 0x1401bf611 call cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x115, 0x1401bf615 lea rdx, [rbp+57h+arg_18] ; +0x11b, 0x1401bf61b mov rcx, rsi ; +0x11f, 0x1401bf61f mov r8, rax ; +0x122, 0x1401bf622 call EditorUI__getGridSnappedPos ; +0x125, 0x1401bf625 comiss xmm9, xmm8 ; +0x12a, 0x1401bf62a movss xmm0, [rbp+57h+arg_18] ; +0x12e, 0x1401bf62e movss xmm6, [rbp+57h+arg_1C] ; +0x133, 0x1401bf633 subss xmm0, [rbp+57h+arg_8] ; +0x13b, 0x1401bf63b subss xmm6, [rbp+57h+arg_C] ; +0x140, 0x1401bf640 andps xmm0, xmm10 ; +0x145, 0x1401bf645 andps xmm6, xmm10 ; +0x149, 0x1401bf649 jnb short loc_1401BF65B ; +0x14d, 0x1401bf64d comiss xmm8, xmm0 ; +0x14f, 0x1401bf64f jb short loc_1401BF698 ; +0x153, 0x1401bf653 comiss xmm8, xmm6 ; +0x155, 0x1401bf655 jb short loc_1401BF698 ; +0x159, 0x1401bf659 addss xmm6, xmm0 ; +0x15b, 0x1401bf65b comiss xmm7, xmm6 ; +0x15f, 0x1401bf65f jbe short loc_1401BF698 ; +0x162, 0x1401bf662 mov [rsi+628h], rdi ; +0x164, 0x1401bf664 mov rcx, rdi ; +0x16b, 0x1401bf66b mov rax, [rdi] ; +0x16e, 0x1401bf66e call qword ptr [rax+168h] ; +0x171, 0x1401bf671 cvttss2si ecx, xmm0 ; +0x177, 0x1401bf677 mov eax, 0B60B60B7h ; +0x17b, 0x1401bf67b imul ecx ; +0x180, 0x1401bf680 add edx, ecx ; +0x182, 0x1401bf682 sar edx, 6 ; +0x184, 0x1401bf684 mov eax, edx ; +0x187, 0x1401bf687 shr eax, 1Fh ; +0x189, 0x1401bf689 add edx, eax ; +0x18c, 0x1401bf68c imul eax, edx, 5Ah ; 'Z' ; +0x18e, 0x1401bf68e cmp ecx, eax ; +0x191, 0x1401bf691 jnz short loc_1401BF698 ; +0x193, 0x1401bf693 movaps xmm7, xmm6 ; +0x195, 0x1401bf695 ucomiss xmm7, xmm9 ; +0x198, 0x1401bf698 jp short loc_1401BF6A0 ; +0x19c, 0x1401bf69c jz short loc_1401BF6B3 ; +0x19e, 0x1401bf69e mov rcx, r14 ; +0x1a0, 0x1401bf6a0 inc ebx ; +0x1a3, 0x1401bf6a3 call cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x1a5, 0x1401bf6a5 cmp ebx, eax ; +0x1ab, 0x1401bf6ab jb loc_1401BF590 ; +0x1ad, 0x1401bf6ad movaps xmm9, [rsp+0C0h+var_50] ; +0x1b3, 0x1401bf6b3 mov rdi, [rsp+0C0h+arg_0] ; +0x1b9, 0x1401bf6b9 movaps xmm6, [rsp+0C0h+var_20] ; +0x1c1, 0x1401bf6c1 movaps xmm10, [rsp+0C0h+var_60] ; +0x1c9, 0x1401bf6c9 movaps xmm7, [rsp+0C0h+var_30] ; +0x1cf, 0x1401bf6cf lea r11, [rsp+0C0h+var_10] ; +0x1d7, 0x1401bf6d7 mov rbx, [r11+30h] ; +0x1df, 0x1401bf6df movaps xmm8, xmmword ptr [r11-30h] ; +0x1e3, 0x1401bf6e3 mov rsp, r11 ; +0x1e8, 0x1401bf6e8 pop r14 ; +0x1eb, 0x1401bf6eb pop rsi ; +0x1ed, 0x1401bf6ed pop rbp ; +0x1ee, 0x1401bf6ee retn ; +0x1ef, 0x1401bf6ef mov rcx, [rsi+620h] ; +0x1f0, 0x1401bf6f0 test rcx, rcx ; +0x1f7, 0x1401bf6f7 jz short loc_1401BF6D7 ; +0x1fa, 0x1401bf6fa mov rax, [rcx] ; +0x1fc, 0x1401bf6fc call qword ptr [rax+168h] ; +0x1ff, 0x1401bf6ff cvttss2si ecx, xmm0 ; +0x205, 0x1401bf705 mov eax, 0B60B60B7h ; +0x209, 0x1401bf709 imul ecx ; +0x20e, 0x1401bf70e add edx, ecx ; +0x210, 0x1401bf710 sar edx, 6 ; +0x212, 0x1401bf712 mov eax, edx ; +0x215, 0x1401bf715 shr eax, 1Fh ; +0x217, 0x1401bf717 add edx, eax ; +0x21a, 0x1401bf71a imul eax, edx, 5Ah ; 'Z' ; +0x21c, 0x1401bf71c cmp ecx, eax ; +0x21f, 0x1401bf71f jnz short loc_1401BF6D7 ; +0x221, 0x1401bf721 mov rbx, [rsi+620h] ; +0x223, 0x1401bf723 lea rcx, [rbp+57h+var_70] ; +0x22a, 0x1401bf72a mov edx, [rbx+40Ch] ; +0x22e, 0x1401bf72e call offsetForKey ; +0x234, 0x1401bf734 mov r8, rax ; +0x239, 0x1401bf739 lea rcx, [rbp+57h+var_88] ; +0x23c, 0x1401bf73c mov rdx, rbx ; +0x240, 0x1401bf740 call GameToolbox__getRelativeOffset ; +0x243, 0x1401bf743 mov rax, [rbx] ; +0x248, 0x1401bf748 mov rcx, rbx ; +0x24b, 0x1401bf74b call qword ptr [rax+0C8h] ; +0x24e, 0x1401bf74e mov rcx, rax ; +0x254, 0x1401bf754 lea r8, [rbp+57h+var_88] ; +0x257, 0x1401bf757 lea rdx, [rbp+57h+var_90] ; +0x25b, 0x1401bf75b call cs:??GCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator-(cocos2d::CCPoint const &) ; +0x25f, 0x1401bf75f mov rbx, [rsi+620h] ; +0x265, 0x1401bf765 lea rdx, dword_14090A6E8 ; +0x26c, 0x1401bf76c lea rcx, [rbp+57h+var_78] ; +0x273, 0x1401bf773 call cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x277, 0x1401bf777 mov r9, rbx ; +0x27d, 0x1401bf77d lea r8, [rbp+57h+var_90] ; +0x280, 0x1401bf780 lea rdx, [rbp+57h+arg_8] ; +0x284, 0x1401bf784 mov [rsp+0C0h+var_A0], rax ; +0x288, 0x1401bf788 mov rcx, rsi ; +0x28d, 0x1401bf78d call EditorUI__applySpecialOffset ; +0x290, 0x1401bf790 lea rdx, [rbp+57h+arg_8] ; +0x295, 0x1401bf795 lea rcx, [rbp+57h+var_70] ; +0x299, 0x1401bf799 call cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x29d, 0x1401bf79d lea rdx, [rbp+57h+arg_18] ; +0x2a3, 0x1401bf7a3 mov rcx, rsi ; +0x2a7, 0x1401bf7a7 mov r8, rax ; +0x2aa, 0x1401bf7aa call EditorUI__getGridSnappedPos ; +0x2ad, 0x1401bf7ad xorps xmm0, xmm0 ; +0x2b2, 0x1401bf7b2 comiss xmm0, xmm8 ; +0x2b5, 0x1401bf7b5 jnb short loc_1401BF7F4 ; +0x2b9, 0x1401bf7b9 movss xmm0, [rbp+57h+arg_18] ; +0x2bb, 0x1401bf7bb subss xmm0, [rbp+57h+arg_8] ; +0x2c0, 0x1401bf7c0 movdqa xmm1, cs:xmmword_140836C90 ; +0x2c5, 0x1401bf7c5 andps xmm0, xmm1 ; +0x2cd, 0x1401bf7cd comiss xmm8, xmm0 ; +0x2d0, 0x1401bf7d0 jb loc_1401BF6D7 ; +0x2d4, 0x1401bf7d4 movss xmm0, [rbp+57h+arg_1C] ; +0x2da, 0x1401bf7da subss xmm0, [rbp+57h+arg_C] ; +0x2e2, 0x1401bf7e2 andps xmm0, xmm1 ; +0x2e7, 0x1401bf7e7 comiss xmm8, xmm0 ; +0x2ea, 0x1401bf7ea jb loc_1401BF6D7 ; +0x2ee, 0x1401bf7ee mov rax, [rsi+620h] ; +0x2f4, 0x1401bf7f4 mov [rsi+628h], rax ; +0x2fb, 0x1401bf7fb jmp loc_1401BF6D7 ; +0x302, 0x1401bf802