//
// cocos2d::extension::CCControl::removeTargetWithActionForControlEvent from 0x1003522a0 to 0x100352436 (406 bytes)
//
// 9 xrefs:
// > cocos2d::extension::CCControl::removeTargetWithActionForControlEvents @ 0x100352182
// > cocos2d::extension::CCControl::removeTargetWithActionForControlEvents @ 0x10035219f
// > cocos2d::extension::CCControl::removeTargetWithActionForControlEvents @ 0x1003521c0
// > cocos2d::extension::CCControl::removeTargetWithActionForControlEvents @ 0x1003521e1
// > cocos2d::extension::CCControl::removeTargetWithActionForControlEvents @ 0x100352202
// > cocos2d::extension::CCControl::removeTargetWithActionForControlEvents @ 0x100352223
// > cocos2d::extension::CCControl::removeTargetWithActionForControlEvents @ 0x100352244
// > cocos2d::extension::CCControl::removeTargetWithActionForControlEvents @ 0x100352264
// > cocos2d::extension::CCControl::removeTargetWithActionForControlEvents @ 0x100352296
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
cocos2d::CCObject_vtbl *__fastcall cocos2d::extension::CCControl::removeTargetWithActionForControlEvent(
__int64 a1,
__int64 a2,
__int64 a3,
unsigned int *a4,
unsigned int a5)
{
cocos2d::CCObject *v8; // rbx
cocos2d::CCObject_vtbl *result; // rax
void (__cdecl *v10)(cocos2d::CCObject *__hidden); // r14
unsigned __int64 v11; // r13
_QWORD *v12; // rsi
_QWORD *v13; // rsi
_QWORD *v14; // rsi
v8 = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(a1 + 440), (int)a5);
if ( !v8 )
{
v8 = (cocos2d::CCObject *)sub_10071FD00(1);
cocos2d::CCDictionary::setObject(*(cocos2d::CCDictionary **)(a1 + 440), v8, a5);
result = (cocos2d::CCObject_vtbl *)(a3 | a2);
if ( a3 | a2 )
goto LABEL_3;
return (cocos2d::CCObject_vtbl *)sub_100720270(v8);
}
result = (cocos2d::CCObject_vtbl *)(a3 | a2);
if ( !(a3 | a2) )
return (cocos2d::CCObject_vtbl *)sub_100720270(v8);
LABEL_3:
if ( v8 )
{
result = v8[1].__vftable;
if ( LODWORD(result->copyWithZone) )
{
v10 = result->~CCObject_0;
v11 = (unsigned __int64)v10 + 8 * LODWORD(result->copyWithZone) - 8;
if ( a3 )
{
if ( a2 )
{
do
{
v12 = *(_QWORD **)v10;
if ( !*(_QWORD *)v10 )
break;
if ( v12[9] == a2 && v12[7] == a3 )
{
result = (cocos2d::CCObject_vtbl *)a4;
if ( (unsigned int *)v12[8] == a4 )
result = (cocos2d::CCObject_vtbl *)sub_100720220(v8, v12, 1);
}
v10 = (void (__cdecl *)(cocos2d::CCObject *__hidden))((char *)v10 + 8);
}
while ( (unsigned __int64)v10 <= v11 );
}
else
{
do
{
v13 = *(_QWORD **)v10;
if ( !*(_QWORD *)v10 )
break;
if ( v13[7] == a3 )
{
result = (cocos2d::CCObject_vtbl *)a4;
if ( (unsigned int *)v13[8] == a4 )
result = (cocos2d::CCObject_vtbl *)sub_100720220(v8, v13, 1);
}
v10 = (void (__cdecl *)(cocos2d::CCObject *__hidden))((char *)v10 + 8);
}
while ( (unsigned __int64)v10 <= v11 );
}
}
else if ( a2 )
{
do
{
v14 = *(_QWORD **)v10;
if ( !*(_QWORD *)v10 )
break;
if ( v14[9] == a2 )
result = (cocos2d::CCObject_vtbl *)sub_100720220(v8, v14, 1);
v10 = (void (__cdecl *)(cocos2d::CCObject *__hidden))((char *)v10 + 8);
}
while ( (unsigned __int64)v10 <= v11 );
}
else
{
do
{
if ( !*(_QWORD *)v10 )
break;
result = (cocos2d::CCObject_vtbl *)sub_100720220(v8, *(_QWORD *)v10, 1);
v10 = (void (__cdecl *)(cocos2d::CCObject *__hidden))((char *)v10 + 8);
}
while ( (unsigned __int64)v10 <= v11 );
}
}
}
return result;
}