//
// SFXInfoObject::create from 0x100652660 to 0x1006527ab (331 bytes)
//
// 3 xrefs:
// > MusicDownloadManager::createCustomSFXPlacement @ 0x1006525c6
// > sub_1006527D0 @ 0x1006528a5
// > MusicDownloadManager::parseSFXLibrary @ 0x10065feeb
//
// 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:34:49 +0000
//
char *__fastcall SFXInfoObject::create(int a1, std::string *a2, int a3, int a4, int a5)
{
char *v7; // rbx
_BYTE *v8; // r14
unsigned int v9; // r15d
__int64 v10; // r15
__int64 i; // r13
char *v12; // rax
char v13; // al
char *v14; // rcx
std::string __str; // [rsp+0h] [rbp-50h] BYREF
int v17; // [rsp+24h] [rbp-2Ch]
v17 = a5;
v7 = (char *)operator new(0x98u);
cocos2d::CCObject::CCObject((__int64)v7);
*(_QWORD *)v7 = off_100B83148;
*(_OWORD *)(v7 + 56) = 0;
*((_WORD *)v7 + 36) = 0;
*(_OWORD *)(v7 + 76) = 0;
*(_OWORD *)(v7 + 92) = 0;
*(_OWORD *)(v7 + 108) = 0;
*(_OWORD *)(v7 + 124) = 0;
*(_OWORD *)(v7 + 136) = 0;
if ( (*(_BYTE *)&a2->__r_.__value_.__s.0 & 1) != 0 )
sub_10001AD30(&__str, a2->__r_.__value_.__l.__data_, a2->__r_.__value_.__l.__size_);
else
__str = *a2;
*((_DWORD *)v7 + 14) = a1;
std::string::operator=((std::string *)(v7 + 80), &__str);
*((_DWORD *)v7 + 15) = a3;
*((_DWORD *)v7 + 16) = a4;
*((_DWORD *)v7 + 17) = v17;
v7[72] = 0;
v8 = v7 + 104;
std::string::operator=((std::string *)(v7 + 104), (const std::string *)(v7 + 80));
v9 = (unsigned __int8)v7[104];
if ( (v9 & 1) != 0 )
{
v10 = *((_QWORD *)v7 + 14);
if ( !v10 )
goto LABEL_14;
}
else
{
v10 = v9 >> 1;
if ( !v10 )
goto LABEL_14;
}
for ( i = 0; i != v10; ++i )
{
v12 = v7 + 105;
if ( (*v8 & 1) != 0 )
v12 = *((char **)v7 + 15);
v13 = __tolower((unsigned __int8)v12[i]);
v14 = v7 + 105;
if ( (*v8 & 1) != 0 )
v14 = *((char **)v7 + 15);
v14[i] = v13;
}
LABEL_14:
if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__str.__r_.__value_.__l.__data_);
cocos2d::CCObject::autorelease((__int64)v7);
return v7;
}