//
// sub_1008FAA30 from 0x1008faa30 to 0x1008fab3f (271 bytes)
//
// 1 xrefs:
// > SoundPackDescPopup::init @ 0x1008fa6c2
//
// 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:38:00 +0000
//
void __fastcall sub_1008FAA30(void **a1)
{
void **v1; // rbx
__int64 v2; // rsi
__int64 v3; // rsi
__int64 v4; // rax
__int64 v5; // rax
__int64 v6; // rax
void (__fastcall ***v7)(_QWORD, void **, __int64); // rdi
void *v8[3]; // [rsp+8h] [rbp-38h] BYREF
__int128 v9; // [rsp+20h] [rbp-20h] BYREF
void *__p; // [rsp+30h] [rbp-10h]
v1 = a1;
v2 = (__int64)a1[129];
if ( v2 )
{
a1 = v8;
CCTextInputNode::getString(v8, v2);
}
else
{
LOWORD(v8[0]) = 0;
}
v3 = (unsigned int)EmoteSprite::maxEmotesComment(a1, v2);
if ( (int)EmoteSprite::effectiveLength(v8, v3) < 141 )
{
v5 = cocos2d::CCDirector::sharedDirector();
v6 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 160LL))(v5);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v6, (__int64)v1);
v7 = (void (__fastcall ***)(_QWORD, void **, __int64))v1[128];
if ( v7 )
(**v7)(v7, v8, (__int64)(v1 + 131));
(*((void (__fastcall **)(void **, _QWORD))*v1 + 171))(v1, 0);
}
else
{
__p = operator new(0x20u);
*(_QWORD *)&v9 = 33;
*((_QWORD *)&v9 + 1) = 24;
strcpy((char *)__p, "Description is too long.");
v4 = sub_100493AB0(0, (__int64)"Description", &v9, (__int64)"OK", 0);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v4 + 1312LL))(v4);
if ( (v9 & 1) != 0 )
operator delete(__p);
}
if ( ((__int64)v8[0] & 1) != 0 )
operator delete(v8[2]);
}