//
// cocos2d::CCKeyboardDispatcher::removeDelegate from 0x1002033f0 to 0x10020349d (173 bytes)
//
// 2 xrefs:
// > cocos2d::CCLayer::setKeyboardEnabled @ 0x1004b0c6b
// > cocos2d::CCLayer::onExit @ 0x1004b10b1
//
// 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
//
void __fastcall cocos2d::CCKeyboardDispatcher::removeDelegate(
cocos2d::CCKeyboardDispatcher *a1,
cocos2d::CCKeyboardDelegate *a2)
{
cocos2d::CCArray *m_pDelegates; // rax
cocos2d::ccArray *data; // rax
cocos2d::CCKeyboardHandler **arr; // r12
unsigned __int64 v5; // r13
cocos2d::CCKeyboardHandler *v6; // r15
if ( a2 )
{
if ( a1->m_bUnknown38 )
{
sub_100668440(a1->m_pUnknown40, a2);
a1->m_bUnknown3a = 1;
}
else
{
m_pDelegates = a1->m_pDelegates;
if ( m_pDelegates )
{
data = m_pDelegates->data;
if ( data->num )
{
arr = (cocos2d::CCKeyboardHandler **)data->arr;
v5 = (unsigned __int64)&arr[data->num - 1];
do
{
v6 = *arr;
if ( !*arr )
break;
if ( cocos2d::CCKeyboardHandler::getDelegate(*arr) == a2 )
{
sub_100720220(a1->m_pDelegates, v6, 1);
return;
}
++arr;
}
while ( (unsigned __int64)arr <= v5 );
}
}
}
}
}