//
// MoreOptionsLayer::onClose from 0x1403768a0 to 0x1403769fb (347 bytes)
//
// 3 xrefs:
// > MoreOptionsLayer::keyBackClicked @ 0x140376a09
// > MoreOptionsLayer::init @ 0x140374838
// > ??> @ 0x1406d5bdc
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=2
void MoreOptionsLayer::onClose(MoreOptionsLayer *a1, cocos2d::CCObject *a2)
{
cocos2d::CCLabelProtocol *v3; // rcx
const char *v4; // rax
size_t v5; // r8
const char *v6; // rsi
__int64 v7; // rdi
char *v8; // rcx
_BOOL8 v9; // rdx
FMODAudioEngine *v10; // [rsp+20h] [rbp-38h]
char *String[2]; // [rsp+28h] [rbp-30h] BYREF
__int64 v12; // [rsp+38h] [rbp-20h]
unsigned __int64 v13; // [rsp+40h] [rbp-18h]
a1->m_offsetInput->onClickTrackNode(a1->m_offsetInput, 0);
v3 = &a1->m_offsetInput->m_textField->cocos2d::CCLabelProtocol;
v4 = v3->getString(v3);
*(_OWORD *)String = 0;
v12 = 0;
v13 = 0;
v5 = -1;
do
++v5;
while ( v4[v5] );
sub_14003A930(String, v4, v5);
v6 = (const char *)String;
if ( v13 > 0xF )
v6 = String[0];
v7 = qword_1406C2E88;
if ( !qword_1406C2E88 )
{
v10 = (FMODAudioEngine *)operator new(0x888u);
qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);
v7 = qword_1406C2E88;
}
*(_DWORD *)(v7 + 612) = atoi(v6);
if ( v13 > 0xF )
{
v8 = String[0];
if ( v13 + 1 >= 0x1000 )
{
v8 = *((char **)String[0] - 1);
if ( (unsigned __int64)(String[0] - v8 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v8);
}
a1->setKeypadEnabled(a1, 0);
LOBYTE(v9) = 1;
a1->removeFromParentAndCleanup(a1, v9);
}