//
// SoundPackDescPopup::onSave from 0xcce2d8 to 0xcce468 (400 bytes)
//
// 3 xrefs:
// > ??> @ 0x54250
// > SoundPackDescPopup::init @ 0xcd0004
// > ??> @ 0x1541d68
//
// This function is hookable on this platform (idp: arm, 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 13:06:25 +0000
//
__int64 __fastcall SoundPackDescPopup::onSave(SoundPackDescPopup *this, cocos2d::CCObject *a2)
{
CCTextInputNode *v3; // x0
EmoteSprite *String; // x0
int v5; // w0
cocos2d::CCDirector *v6; // x0
__int64 v7; // x0
__int64 v9; // x0
cocos2d::CCTouchDispatcher *v10; // x0
void (__fastcall ***v11)(_QWORD, __int64 *, char *); // x0
__int64 v12[2]; // [xsp+38h] [xbp+38h] BYREF
void *v13; // [xsp+48h] [xbp+48h]
__int64 v14[2]; // [xsp+50h] [xbp+50h] BYREF
void *v15; // [xsp+60h] [xbp+60h]
v3 = *((CCTextInputNode **)this + 129);
if ( v3 )
{
String = (EmoteSprite *)CCTextInputNode::getString(v3, v12);
}
else
{
v12[0] = 0;
v12[1] = 0;
v13 = nullptr;
String = (EmoteSprite *)std::string::__init(v12, &byte_11B8890, 0);
}
v5 = EmoteSprite::maxEmotesComment(String);
v6 = (cocos2d::CCDirector *)EmoteSprite::effectiveLength((char *)v12, v5);
if ( (int)v6 <= 140 )
{
v9 = cocos2d::CCDirector::sharedDirector(v6);
v10 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 160LL))(v9);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v10, this);
v11 = *((void (__fastcall ****)(_QWORD, __int64 *, char *))this + 128);
if ( v11 )
(**v11)(v11, v12, (char *)this + 1048);
(*(void (__fastcall **)(SoundPackDescPopup *, _QWORD))(*(_QWORD *)this + 1368LL))(this, 0);
}
else
{
v14[0] = 0;
v14[1] = 0;
v15 = nullptr;
std::string::__init(v14, "Description is too long.", 0x18u);
v7 = FLAlertLayer::create(0, (cocos2d::CCLabelBMFont *)"Description", (char *)v14, (ButtonSprite *)"OK", nullptr);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 1312LL))(v7);
if ( (v14[0] & 1) != 0 )
operator delete(v15);
}
if ( (v12[0] & 1) != 0 )
operator delete(v13);
return _stack_chk_guard;
}