//
// cocos2d::CCMouseDispatcher::forceRemoveDelegate from 0x10039ab60 to 0x10039abf4 (148 bytes)
//
// 1 xrefs:
// > cocos2d::CCMouseDispatcher::removeDelegate @ 0x10039ab5c
//
// 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 11:03:43 +0000
//
__int64 __fastcall cocos2d::CCMouseDispatcher::forceRemoveDelegate(__int64 result, __int64 a2)
{
__int64 v2; // x8
unsigned int *v3; // x9
__int64 v4; // x8
__int64 v6; // x19
__int64 *v7; // x22
unsigned __int64 v8; // x23
v2 = *(_QWORD *)(result + 56);
if ( v2 )
{
v3 = *(unsigned int **)(v2 + 56);
v4 = *v3;
if ( (_DWORD)v4 )
{
v6 = result;
v7 = *((__int64 **)v3 + 2);
v8 = (unsigned __int64)&v7[v4 - 1];
while ( *v7 )
{
result = cocos2d::CCMouseHandler::getDelegate(*v7);
if ( result == a2 )
return sub_1002E765C(*(_QWORD *)(v6 + 56));
if ( (unsigned __int64)++v7 > v8 )
return result;
}
}
}
return result;
}