//
// cocos2d::CCTouchDispatcher::ownerLevelOf from 0xdb153c to 0xdb16a8 (364 bytes)
//
// 6 xrefs:
// > FLAlertLayer::ownedTouchPrio @ 0x699e34
// > ProfilePage::setupCommentsBrowser @ 0xa54810
// > MessageThreadsPage::setupThreadBrowser @ 0xc6562c
// > cocos2d::CCTouchDispatcher::ownerLevelOf @ 0xdb1648
// > cocos2d::CCTouchDispatcher::ownerLevelFor @ 0xdb16f4
// > ??> @ 0x7b028
//
// This function is hookable on this platform (idp: arm, 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 13:08:39 +0000
//
__int64 __fastcall cocos2d::CCTouchDispatcher::ownerLevelOf(cocos2d::CCDictionary **this, cocos2d::CCNode *a2, int *a3)
{
__int64 v6; // x2
__int64 v7; // x0
unsigned int v8; // w22
int v10; // w24
cocos2d::CCNode *v11; // x0
unsigned __int8 v12; // w0
int v13; // w24
cocos2d::CCDictionary *v14; // x23
cocos2d::CCObject *v15; // x20
int v16; // [xsp+54h] [xbp+54h] BYREF
if ( (unsigned int)cocos2d::CCDictionary::count(*(this + 18)) && a2 )
{
while ( 1 )
{
v7 = cocos2d::CCDictionary::objectForKey(*(this + 18), *((unsigned int *)a2 + 2));
if ( v7 )
{
v8 = 1;
*a3 = *(_DWORD *)(v7 + 56);
return v8;
}
v6 = cocos2d::CCDictionary::objectForKey(*(this + 19), *((unsigned int *)a2 + 2));
if ( v6 )
break;
if ( !cocos2d::CCDictionary::objectForKey(*(this + 17), *((unsigned int *)a2 + 2)) )
{
a2 = (cocos2d::CCNode *)(*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)a2 + 512LL))(a2);
if ( a2 )
continue;
}
return 0;
}
v10 = *(_DWORD *)(v6 + 56);
cocos2d::CCDictionary::removeObjectForKey(*(this + 19), *((unsigned int *)a2 + 2));
v16 = 0;
v11 = (cocos2d::CCNode *)(*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)a2 + 512LL))(a2);
v12 = cocos2d::CCTouchDispatcher::ownerLevelOf((cocos2d::CCTouchDispatcher *)this, v11, &v16);
v8 = v12;
if ( v12 )
{
v13 = v16 - v10;
*a3 = v13;
v14 = *(this + 18);
v15 = (cocos2d::CCObject *)operator new(0x40u);
cocos2d::CCObject::CCObject((__int64)v15);
*((_DWORD *)v15 + 14) = v13;
*(_QWORD *)v15 = &off_1428350;
cocos2d::CCObject::autorelease(v15);
cocos2d::CCDictionary::setObject(v14, v15, *((unsigned int *)a2 + 2));
}
}
else
{
return 0;
}
return v8;
}