//
// SetupReverbPopup::updateReverbLabel from 0x140446f60 to 0x1404470aa (330 bytes)
//
// 3 xrefs:
// > SetupReverbPopup::init @ 0x140446ce0
// > SetupReverbPopup::onReverb @ 0x140446f4e
// > ??> @ 0x1406da61c
//
// 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 SetupReverbPopup::updateReverbLabel(SetupReverbPopup *a1)
{
int v2; // edi
__int64 v3; // rax
void **v4; // rdx
void *v5; // rcx
FMODAudioEngine *v6; // [rsp+20h] [rbp-58h]
void *Block[2]; // [rsp+28h] [rbp-50h] BYREF
__int128 v8; // [rsp+38h] [rbp-40h]
_BYTE v9[32]; // [rsp+48h] [rbp-30h] BYREF
v2 = (int)a1->getValue(a1, 502);
if ( !qword_1406C2E88 )
{
v6 = (FMODAudioEngine *)operator new(0x888u);
qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v6);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);
}
v3 = FMODAudioEngine::reverbToString((__int64)v9, v2);
*(_OWORD *)Block = 0;
v8 = 0u;
*(_OWORD *)Block = *(_OWORD *)v3;
v8 = *(_OWORD *)(v3 + 16);
*(_QWORD *)(v3 + 16) = 0;
*(_QWORD *)(v3 + 24) = 15;
*(_BYTE *)v3 = 0;
sub_14003A830((__int64)v9);
v4 = Block;
if ( *((_QWORD *)&v8 + 1) > 0xFu )
v4 = (void **)Block[0];
a1->m_reverbLabel->setString(&a1->m_reverbLabel->cocos2d::CCLabelProtocol, (const char *)v4);
cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_reverbLabel, 150.0, 0.80000001, 0.0);
if ( *((_QWORD *)&v8 + 1) > 0xFu )
{
v5 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v8 + 1) + 1LL) >= 0x1000 )
{
v5 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v5 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v5);
}
}