//
// sub_100597C20 from 0x100597c20 to 0x100597cae (142 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b714c0
//
// 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:32:29 +0000
//
void __fastcall sub_100597C20(__int64 a1)
{
__int64 v1; // rax
__int64 v2; // rax
*(_QWORD *)(a1 - 320) = off_100B71028;
*(_QWORD *)a1 = off_100B714B8;
*(_QWORD *)(a1 + 8) = &off_100B71528;
*(_QWORD *)(a1 + 16) = off_100B71540;
*(_QWORD *)(a1 + 24) = off_100B71560;
*(_QWORD *)(a1 + 32) = off_100B71588;
v1 = cocos2d::CCDirector::sharedDirector();
v2 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v1 + 160LL))(v1);
cocos2d::CCTouchDispatcher::removeDelegate(v2, (unsigned int *)a1);
cocos2d::CCLayer::onExit(a1 - 320);
sub_1004A9420((_QWORD *)(a1 - 320));
operator delete((void *)(a1 - 320));
}