//
// sub_1009A58B0 from 0x1009a58b0 to 0x1009a5997 (231 bytes)
//
// 1 xrefs:
// > sub_1009A4C50 @ 0x1009a5626
//
// 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:39:18 +0000
//
void __fastcall sub_1009A58B0(__int64 a1)
{
__int64 v1; // rsi
__int64 v2; // rax
__int64 v3; // rax
void (__fastcall ***v4)(_QWORD, _QWORD, void **, __int128 *); // r14
unsigned int v5; // r15d
void *__p[3]; // [rsp+8h] [rbp-48h] BYREF
__int128 v7; // [rsp+20h] [rbp-30h] BYREF
void *v8; // [rsp+30h] [rbp-20h]
v1 = *(_QWORD *)(a1 + 1056);
if ( v1 )
{
CCTextInputNode::getString(&v7, v1);
}
else if ( (*(_BYTE *)(a1 + 1032) & 1) != 0 )
{
sub_10001AD30(&v7, *(const void **)(a1 + 1048), *(_QWORD *)(a1 + 1040));
}
else
{
v8 = *(void **)(a1 + 1048);
v7 = *(_OWORD *)(a1 + 1032);
}
v2 = cocos2d::CCDirector::sharedDirector();
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 160LL))(v2);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v3, a1);
v4 = *(void (__fastcall ****)(_QWORD, _QWORD, void **, __int128 *))(a1 + 1016);
if ( v4 )
{
v5 = *(_DWORD *)(a1 + 1024);
sub_1009A5BF0(__p, a1);
(**v4)(v4, v5, __p, &v7);
if ( __p[0] )
{
__p[1] = __p[0];
operator delete(__p[0]);
}
}
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1368LL))(a1, 0);
if ( (v7 & 1) != 0 )
operator delete(v8);
}