//
// sub_1800BA200 from 0x1800ba200 to 0x1800ba28f (143 bytes)
//
// 2 xrefs:
// > ??> @ 0x18010d4b8
// > ??> @ 0x1801c2e74
//
// 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 11:22:23 +0000
//
// Hidden C++ exception states: #wind=2
cocos2d::CCObject *__fastcall sub_1800BA200(cocos2d::CCObject *this, char a2)
{
_QWORD *v4; // rax
*(_QWORD *)this = &cocos2d::CCTouchScriptHandlerEntry::`vftable';
if ( *((_DWORD *)this + 14) )
{
v4 = qword_1801B3B78;
if ( !qword_1801B3B78 )
{
v4 = (_QWORD *)sub_1800E4AC0(8u);
if ( v4 )
*v4 = 0;
qword_1801B3B78 = v4;
}
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*v4 + 24LL))(*v4, *((unsigned int *)this + 14));
*((_DWORD *)this + 14) = 0;
}
*(_QWORD *)this = &cocos2d::CCScriptHandlerEntry::`vftable';
cocos2d::CCObject::~CCObject(this);
if ( (a2 & 1) != 0 )
j_j_free_0(this);
return this;
}