//
// sub_1004CB404 from 0x1004cb404 to 0x1004cb5a8 (420 bytes)
//
// 1 xrefs:
// > EditorSoundConfigInfoLayer::FLAlert_Clicked @ 0x1004d3d58
//
// 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 11:06:25 +0000
//
__int64 __fastcall sub_1004CB404(__int64 a1, __int64 a2)
{
__int64 v4; // x0
_QWORD *v5; // x0
__int64 v6; // x21
__int64 v7; // x0
int v8; // w8
std::string __p; // [xsp+0h] [xbp-80h] BYREF
std::string __dst; // [xsp+20h] [xbp-60h] BYREF
std::string __str; // [xsp+40h] [xbp-40h] BYREF
if ( !a2 )
return 0;
v4 = *(_QWORD *)(a1 + 152);
if ( !v4 )
{
v5 = sub_1002E736C();
*(_QWORD *)(a1 + 152) = v5;
cocos2d::CCObject::retain((__int64)v5);
v4 = *(_QWORD *)(a1 + 152);
}
if ( (unsigned int)sub_1002E757C(v4) > 0x31 )
return 0;
v7 = GJEditorSoundConfig::create_1();
v6 = v7;
if ( v7 )
{
v8 = *(_DWORD *)(a1 + 160);
*(_DWORD *)(a1 + 160) = v8 + 1;
*(_DWORD *)(v7 + 320) = v8;
*(_BYTE *)(v7 + 324) = 1;
*(_DWORD *)(v7 + 316) = 0;
*(_DWORD *)(v7 + 336) = *(_DWORD *)(a2 + 316);
*(_DWORD *)(v7 + 340) = *(_DWORD *)(a2 + 340);
if ( *(char *)(a2 + 399) < 0 )
sub_1000097D0(&__str, *(void **)(a2 + 376), *(_QWORD *)(a2 + 384));
else
__str = *(std::string *)(a2 + 376);
std::string::operator=((std::string *)(v6 + 376), &__str);
if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__str.__r_.__value_.__l.__data_);
if ( *(char *)(a2 + 423) < 0 )
sub_1000097D0(&__dst, *(void **)(a2 + 400), *(_QWORD *)(a2 + 408));
else
__dst = *(std::string *)(a2 + 400);
std::string::operator=((std::string *)(v6 + 400), &__dst);
if ( SHIBYTE(__dst.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__dst.__r_.__value_.__l.__data_);
*(_DWORD *)(v6 + 360) = *(_DWORD *)(a2 + 360);
*(_QWORD *)(v6 + 328) = 1;
*(_QWORD *)(v6 + 352) = *(_QWORD *)(a2 + 352);
if ( *(char *)(a2 + 495) < 0 )
sub_1000097D0(&__p, *(void **)(a2 + 472), *(_QWORD *)(a2 + 480));
else
__p = *(std::string *)(a2 + 472);
std::string::operator=((std::string *)(v6 + 472), &__p);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
*(_BYTE *)(v6 + 496) = *(_BYTE *)(a2 + 496);
sub_1002E7640(*(_QWORD *)(a1 + 152));
}
return v6;
}