; ; cocos2d::CCMenu::itemForTouch from 0x18005b650 to 0x18005b856 (518 bytes) ; ; 8 xrefs: ; > cocos2d::CCMenu::ccTouchBegan @ 0x18005afd3 ; > cocos2d::CCMenu::ccTouchBegan @ 0x18005afe9 ; > cocos2d::CCMenu::ccTouchMoved @ 0x18005b0c4 ; > cocos2d::CCMenu::ccTouchMoved @ 0x18005b0de ; > cocos2d::CCMenu::itemForTouch @ 0x18005b623 ; > cocos2d::CCMenu::itemForTouch @ 0x18005b636 ; > @ 0x18014cf68 ; > @ 0x1801bcdfc ; ; 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:21:49 +0000 ; mov r11, rsp ; +0x0, 0x18005b650 mov [r11+10h], rbx ; +0x3, 0x18005b653 mov [r11+18h], rbp ; +0x7, 0x18005b657 push rsi ; +0xb, 0x18005b65b push rdi ; +0xc, 0x18005b65c push r14 ; +0xd, 0x18005b65d sub rsp, 70h ; +0xf, 0x18005b65f mov rax, rdx ; +0x13, 0x18005b663 movaps [rsp+88h+var_28], xmm6 ; +0x16, 0x18005b666 mov rbx, rcx ; +0x1b, 0x18005b66b movaps [rsp+88h+var_38], xmm7 ; +0x1e, 0x18005b66e mov rcx, rax ; +0x23, 0x18005b673 movaps xmmword ptr [r11-48h], xmm8 ; +0x26, 0x18005b676 lea rdx, [r11+8] ; +0x2b, 0x18005b67b movzx ebp, r8b ; +0x2f, 0x18005b67f call ?getLocation@CCTouch@cocos2d@@QEBA?AVCCPoint@2@XZ; cocos2d::CCTouch::getLocation(void) ; +0x33, 0x18005b683 mov rcx, [rbx+0D0h]; this ; +0x38, 0x18005b688 test rcx, rcx ; +0x3f, 0x18005b68f jz loc_18005B82B ; +0x42, 0x18005b692 call ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x48, 0x18005b698 test eax, eax ; +0x4d, 0x18005b69d jz loc_18005B82B ; +0x4f, 0x18005b69f mov rax, [rbx+0D0h] ; +0x55, 0x18005b6a5 test rax, rax ; +0x5c, 0x18005b6ac jz loc_18005B82B ; +0x5f, 0x18005b6af mov rdi, [rax+38h] ; +0x65, 0x18005b6b5 mov eax, [rdi] ; +0x69, 0x18005b6b9 test eax, eax ; +0x6b, 0x18005b6bb jz loc_18005B82B ; +0x6d, 0x18005b6bd mov rdi, [rdi+10h] ; +0x73, 0x18005b6c3 lea rsi, [rax-1] ; +0x77, 0x18005b6c7 lea rsi, [rdi+rsi*8] ; +0x7b, 0x18005b6cb cmp rdi, rsi ; +0x7f, 0x18005b6cf ja loc_18005B82B ; +0x82, 0x18005b6d2 movss xmm6, cs:flt_1800EC208 ; +0x88, 0x18005b6d8 xor r14d, r14d ; +0x90, 0x18005b6e0 movsd xmm8, cs:depth ; +0x93, 0x18005b6e3 movsd xmm7, cs:qword_1800EC5B8 ; +0x9c, 0x18005b6ec mov rcx, [rdi] ; +0xa4, 0x18005b6f4 test rcx, rcx ; +0xa7, 0x18005b6f7 jz loc_18005B82B ; +0xaa, 0x18005b6fa lea r9, ??_R0?AVCCMenuItem@cocos2d@@@8; cocos2d::CCMenuItem `RTTI Type Descriptor' ; +0xb0, 0x18005b700 mov [rsp+88h+var_68], r14d ; +0xb7, 0x18005b707 lea r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0xbc, 0x18005b70c xor edx, edx ; +0xc3, 0x18005b713 call __RTDynamicCast ; +0xc5, 0x18005b715 mov rbx, rax ; +0xca, 0x18005b71a test rax, rax ; +0xcd, 0x18005b71d jz loc_18005B81E ; +0xd0, 0x18005b720 mov rcx, [rax] ; +0xd6, 0x18005b726 mov rdx, [rcx+158h] ; +0xd9, 0x18005b729 mov rcx, rax ; +0xe0, 0x18005b730 call rdx ; +0xe3, 0x18005b733 test al, al ; +0xe5, 0x18005b735 jz loc_18005B81E ; +0xe7, 0x18005b737 mov rcx, [rbx] ; +0xed, 0x18005b73d mov rdx, [rcx+3A0h] ; +0xf0, 0x18005b740 mov rcx, rbx ; +0xf7, 0x18005b747 call rdx ; +0xfa, 0x18005b74a test al, al ; +0xfc, 0x18005b74c jz loc_18005B81E ; +0xfe, 0x18005b74e lea r8, [rsp+88h+arg_0] ; +0x104, 0x18005b754 mov rcx, rbx ; +0x10c, 0x18005b75c lea rdx, [rsp+88h+arg_18] ; +0x10f, 0x18005b75f call ?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0x117, 0x18005b767 lea rdx, [rsp+88h+var_58] ; +0x11c, 0x18005b76c mov rcx, rbx ; +0x121, 0x18005b771 call ?rect@CCMenuItem@cocos2d@@QEAA?AVCCRect@2@XZ; cocos2d::CCMenuItem::rect(void) ; +0x124, 0x18005b774 lea rdx, dword_1801B23F8 ; +0x129, 0x18005b779 lea rcx, [rsp+88h+var_58] ; +0x130, 0x18005b780 call ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x135, 0x18005b785 test bpl, bpl ; +0x13a, 0x18005b78a jz short loc_18005B808 ; +0x13d, 0x18005b78d movss xmm5, dword ptr [rbx+174h] ; +0x13f, 0x18005b78f comiss xmm5, xmm6 ; +0x147, 0x18005b797 jbe short loc_18005B808 ; +0x14a, 0x18005b79a movss xmm4, [rsp+88h+var_50] ; +0x14c, 0x18005b79c movss xmm1, [rsp+88h+var_58] ; +0x152, 0x18005b7a2 movss xmm2, [rsp+88h+var_54] ; +0x158, 0x18005b7a8 cvtps2pd xmm1, xmm1 ; +0x15e, 0x18005b7ae cvtps2pd xmm0, xmm4 ; +0x161, 0x18005b7b1 cvtps2pd xmm3, xmm5 ; +0x164, 0x18005b7b4 cvtps2pd xmm2, xmm2 ; +0x167, 0x18005b7b7 subsd xmm3, xmm8 ; +0x16a, 0x18005b7ba mulss xmm4, xmm5 ; +0x16f, 0x18005b7bf movss [rsp+88h+var_50], xmm4 ; +0x173, 0x18005b7c3 mulsd xmm0, xmm3 ; +0x179, 0x18005b7c9 mulsd xmm0, xmm7 ; +0x17d, 0x18005b7cd subsd xmm1, xmm0 ; +0x181, 0x18005b7d1 cvtpd2ps xmm0, xmm1 ; +0x185, 0x18005b7d5 movss xmm1, [rsp+88h+var_4C] ; +0x189, 0x18005b7d9 movss [rsp+88h+var_58], xmm0 ; +0x18f, 0x18005b7df cvtps2pd xmm0, xmm1 ; +0x195, 0x18005b7e5 mulss xmm1, xmm5 ; +0x198, 0x18005b7e8 mulsd xmm0, xmm3 ; +0x19c, 0x18005b7ec movss [rsp+88h+var_4C], xmm1 ; +0x1a0, 0x18005b7f0 mulsd xmm0, xmm7 ; +0x1a6, 0x18005b7f6 subsd xmm2, xmm0 ; +0x1aa, 0x18005b7fa cvtpd2ps xmm0, xmm2 ; +0x1ae, 0x18005b7fe movss [rsp+88h+var_54], xmm0 ; +0x1b2, 0x18005b802 lea rdx, [rsp+88h+arg_18]; struct cocos2d::CCPoint * ; +0x1b8, 0x18005b808 lea rcx, [rsp+88h+var_58]; this ; +0x1c0, 0x18005b810 call ?containsPoint@CCRect@cocos2d@@QEBA_NAEBVCCPoint@2@@Z; cocos2d::CCRect::containsPoint(cocos2d::CCPoint const &) ; +0x1c5, 0x18005b815 test al, al ; +0x1ca, 0x18005b81a jnz short loc_18005B851 ; +0x1cc, 0x18005b81c add rdi, 8 ; +0x1ce, 0x18005b81e cmp rdi, rsi ; +0x1d2, 0x18005b822 jbe loc_18005B6F4 ; +0x1d5, 0x18005b825 xor eax, eax ; +0x1db, 0x18005b82b movaps xmm6, [rsp+88h+var_28] ; +0x1dd, 0x18005b82d lea r11, [rsp+88h+var_18] ; +0x1e2, 0x18005b832 mov rbx, [r11+28h] ; +0x1e7, 0x18005b837 mov rbp, [r11+30h] ; +0x1eb, 0x18005b83b movaps xmm8, xmmword ptr [r11-30h] ; +0x1ef, 0x18005b83f movaps xmm7, [rsp+88h+var_38] ; +0x1f4, 0x18005b844 mov rsp, r11 ; +0x1f9, 0x18005b849 pop r14 ; +0x1fc, 0x18005b84c pop rdi ; +0x1fe, 0x18005b84e pop rsi ; +0x1ff, 0x18005b84f retn ; +0x200, 0x18005b850 mov rax, rbx ; +0x201, 0x18005b851 jmp short loc_18005B82D ; +0x204, 0x18005b854