//
// cocos2d::CCTouchDispatcher::registerForcePrio from 0x1004c7300 to 0x1004c7451 (337 bytes)
//
// 13 xrefs:
// > DailyLevelNode::init @ 0x100216e8b
// > SlideInLayer::init @ 0x100279c77
// > GJCommentListLayer::init @ 0x10028912e
// > GJShopLayer::init @ 0x10030e6d7
// > DialogLayer::init @ 0x1003b086e
// > LevelBrowserLayer::init @ 0x1004806e6
// > FLAlertLayer::init @ 0x100493f20
// > FLAlertLayer::init_1 @ 0x100494994
// > FLAlertLayer::incrementForcePrio @ 0x100494a3d
// > CCBlockLayer::init @ 0x100518f37
// > CCBlockLayer::incrementForcePrio @ 0x100518fde
// > GJDropDownLayer::init @ 0x1006bb5ad
// > sub_10093BDC0 @ 0x10093bee3
//
// 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 12:31:08 +0000
//
__int64 __fastcall cocos2d::CCTouchDispatcher::registerForcePrio(__int64 a1, __int64 a2, int a3, int a4)
{
__int64 result; // rax
int v6; // r15d
__int64 v7; // r15
int v8; // r12d
_DWORD *v9; // r14
_DWORD *v10; // r14
__int64 v11; // r12
_DWORD *v12; // r14
if ( a2 )
{
v6 = a3;
*(_DWORD *)(a1 + 160) += a3;
*(_DWORD *)(a1 + 128) -= a3;
result = cocos2d::CCDictionary::objectForKey_1(*(_QWORD *)(a1 + 136), *(unsigned int *)(a2 + 8));
if ( result )
{
v6 += *(_DWORD *)(result + 56);
if ( !a4 )
return result;
}
else
{
v10 = operator new(0x40u);
cocos2d::CCObject::CCObject((__int64)v10);
*(_QWORD *)v10 = off_100ABB920;
v10[14] = v6;
cocos2d::CCObject::autorelease((__int64)v10);
result = cocos2d::CCDictionary::setObject_1(*(_QWORD *)(a1 + 136), (__int64)v10, *(unsigned int *)(a2 + 8));
if ( !a4 )
return result;
}
if ( a4 == 1 )
{
v7 = *(_QWORD *)(a1 + 144);
v8 = *(_DWORD *)(a1 + 128);
v9 = operator new(0x40u);
cocos2d::CCObject::CCObject((__int64)v9);
*(_QWORD *)v9 = off_100ABB920;
v9[14] = v8;
cocos2d::CCObject::autorelease((__int64)v9);
return cocos2d::CCDictionary::setObject_1(v7, (__int64)v9, *(unsigned int *)(a2 + 8));
}
else
{
v11 = *(_QWORD *)(a1 + 152);
v12 = operator new(0x40u);
cocos2d::CCObject::CCObject((__int64)v12);
*(_QWORD *)v12 = off_100ABB920;
v12[14] = v6;
cocos2d::CCObject::autorelease((__int64)v12);
return cocos2d::CCDictionary::setObject_1(v11, (__int64)v12, *(unsigned int *)(a2 + 8));
}
}
return result;
}