//
// cocos2d::CCKeyboardHandler::handlerWithDelegate from 0x10042bcd0 to 0x10042bd3b (107 bytes)
//
// 3 xrefs:
// > cocos2d::CCKeyboardDispatcher::addDelegate @ 0x1001e5d26
// > cocos2d::CCKeyboardDispatcher::forceAddDelegate @ 0x1001e5d5c
// > sub_1001E6710 @ 0x1001e6836
//
// 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:30:20 +0000
//
_QWORD *__fastcall cocos2d::CCKeyboardHandler::handlerWithDelegate(void *lpsrc)
{
_QWORD *v1; // rbx
void *v2; // rdi
v1 = operator new(0x40u);
cocos2d::CCObject::CCObject(v1);
*v1 = off_100B41EF8;
v1[7] = lpsrc;
if ( lpsrc )
v2 = __dynamic_cast(
lpsrc,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCKeyboardDelegate,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
-2);
else
v2 = nullptr;
cocos2d::CCObject::retain(v2);
cocos2d::CCObject::autorelease(v1);
return v1;
}