//
// cocos2d::CCLayer::registerWithTouchDispatcher from 0xd5be88 to 0xd5bf04 (124 bytes)
//
// 89 xrefs:
// > LevelBrowserLayer::registerWithTouchDispatcher @ 0x7fd0d0
// > ??> @ 0xc3d90
// > ??> @ 0x1411c28
// > ??> @ 0x1412288
// > ??> @ 0x1412818
// > ??> @ 0x14133f8
// > ??> @ 0x1414628
// > ??> @ 0x14180f8
// > ??> @ 0x14193f8
// > ??> @ 0x141e7b8
// > ??> @ 0x141ed68
// > ??> @ 0x14226a8
// > ??> @ 0x1422fe8
// > ??> @ 0x1424f98
// > ??> @ 0x1426f28
// > ??> @ 0x1427598
// > ??> @ 0x1428808
// > ??> @ 0x142ade8
// > ??> @ 0x142b448
// > ??> @ 0x142b9d8
// > ??> @ 0x142bf68
// > ??> @ 0x142c4f8
// > ??> @ 0x142ca88
// > ??> @ 0x142d018
// > ??> @ 0x142d5f8
// > ??> @ 0x142dc38
// > ??> @ 0x142e218
// > ??> @ 0x142e7a8
// > ??> @ 0x142ed38
// > ??> @ 0x142f308
// > ??> @ 0x142f8b8
// > ??> @ 0x142fe48
// > ??> @ 0x14303d8
// > ??> @ 0x1430968
// > ??> @ 0x1430ef8
// > ??> @ 0x1431988
// > ??> @ 0x1431f38
// > ??> @ 0x1432538
// > ??> @ 0x1432ac8
// > ??> @ 0x1433058
// > ??> @ 0x1435d68
// > ??> @ 0x14365d8
// > ??> @ 0x1439d18
// > ??> @ 0x143a978
// > ??> @ 0x143c018
// > ??> @ 0x143c878
// > ??> @ 0x1441c58
// > ??> @ 0x145a248
// > ??> @ 0x145aab8
// > ??> @ 0x145cc58
// > ??> @ 0x145d818
// > ??> @ 0x145f148
// > ??> @ 0x1468768
// > ??> @ 0x1468d18
// > ??> @ 0x14692c8
// > ??> @ 0x146a438
// > ??> @ 0x1475638
// > ??> @ 0x1476158
// > ??> @ 0x1476898
// > ??> @ 0x147c628
// > ??> @ 0x148ed48
// > ??> @ 0x1491678
// > ??> @ 0x1493628
// > ??> @ 0x14943d8
// > ??> @ 0x1499bf8
// > ??> @ 0x149a228
// > ??> @ 0x149a7b8
// > ??> @ 0x149b158
// > ??> @ 0x14a31e8
// > ??> @ 0x14af3c8
// > ??> @ 0x14b0948
// > ??> @ 0x14b10d8
// > ??> @ 0x14b6f58
// > ??> @ 0x14c24d8
// > ??> @ 0x14c2a88
// > ??> @ 0x14d9228
// > ??> @ 0x14dfe08
// > ??> @ 0x14e0468
// > ??> @ 0x14e09f8
// > ??> @ 0x14e1d28
// > ??> @ 0x14e22b8
// > ??> @ 0x14e2848
// > ??> @ 0x14fe528
// > ??> @ 0x1507af8
// > ??> @ 0x15194c8
// > ??> @ 0x1519a58
// > ??> @ 0x151a0d8
// > ??> @ 0x151a7a8
// > ??> @ 0x151aee8
//
// 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:07:47 +0000
//
__int64 __fastcall cocos2d::CCLayer::registerWithTouchDispatcher(cocos2d::CCLayer *this)
{
__int64 v2; // x0
cocos2d::CCTouchDispatcher *v3; // x0
__int64 v4; // x3
int v6; // w2
cocos2d::CCTouchDelegate *v7; // x1
char v8; // w3
v2 = cocos2d::CCDirector::sharedDirector(this);
v3 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 160LL))(v2);
v4 = *((_QWORD *)this + 46);
if ( v4 )
{
if ( *(_BYTE *)(v4 + 64) )
return cocos2d::CCTouchDispatcher::addStandardDelegate(v3, (cocos2d::CCLayer *)((char *)this + 320), nullptr);
v6 = *(_DWORD *)(v4 + 68);
v7 = (cocos2d::CCLayer *)((char *)this + 320);
v8 = *(_BYTE *)(v4 + 72);
}
else
{
if ( !*((_DWORD *)this + 99) )
return cocos2d::CCTouchDispatcher::addStandardDelegate(v3, (cocos2d::CCLayer *)((char *)this + 320), nullptr);
v6 = *((_DWORD *)this + 98);
v7 = (cocos2d::CCLayer *)((char *)this + 320);
v8 = 1;
}
return cocos2d::CCTouchDispatcher::addTargetedDelegate(v3, v7, v6, v8);
}