//
// cocos2d::CCTouchDispatcher::findHandler from 0x1800b66e0 to 0x1800b67a6 (198 bytes)
//
// 3 xrefs:
// > cocos2d::CCTouchDispatcher::setPriority @ 0x1800b6e47
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c2910
//
// 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:22:21 +0000
//
struct cocos2d::CCTouchHandler *__fastcall cocos2d::CCTouchDispatcher::findHandler(
cocos2d::CCTouchDispatcher *this,
struct cocos2d::CCTouchDelegate *a2)
{
__int64 v2; // rax
unsigned int *v5; // rbx
__int64 v6; // rax
cocos2d::CCNotificationObserver **v7; // rbx
cocos2d::CCNotificationObserver **i; // rsi
cocos2d::CCNotificationObserver *v9; // rdi
__int64 v10; // rax
unsigned int *v11; // rbx
__int64 v12; // rax
cocos2d::CCNotificationObserver **v13; // rbx
cocos2d::CCNotificationObserver **j; // rsi
v2 = *((_QWORD *)this + 8);
if ( v2 )
{
v5 = *(unsigned int **)(v2 + 56);
v6 = *v5;
if ( (_DWORD)v6 )
{
v7 = *((cocos2d::CCNotificationObserver ***)v5 + 2);
for ( i = &v7[v6 - 1]; v7 <= i; ++v7 )
{
v9 = *v7;
if ( !*v7 )
break;
if ( cocos2d::CCNotificationObserver::getTarget(*v7) == a2 )
return v9;
}
}
}
v10 = *((_QWORD *)this + 9);
if ( v10 )
{
v11 = *(unsigned int **)(v10 + 56);
v12 = *v11;
if ( (_DWORD)v12 )
{
v13 = *((cocos2d::CCNotificationObserver ***)v11 + 2);
for ( j = &v13[v12 - 1]; v13 <= j; ++v13 )
{
v9 = *v13;
if ( !*v13 )
break;
if ( cocos2d::CCNotificationObserver::getTarget(*v13) == a2 )
return v9;
}
}
}
return nullptr;
}