//
// GameLevelManager::getLengthStr from 0x10009d098 to 0x10009d258 (448 bytes)
//
// 1 xrefs:
// > LevelSearchLayer::getLevelLenKey @ 0x100055078
//
// 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
//
void __usercall GameLevelManager::getLengthStr(
int a1@,
char a2@,
char a3@,
char a4@,
char a5@,
char a6@,
std::string *a7@)
{
int v13; // w19
int v14; // w8
int v15; // w28
cocos2d::CCString *v16; // x0
const char *CString; // x0
cocos2d::CCString *v18; // x0
char *v19; // x0
_BOOL4 v20; // w0
_BOOL4 v21; // w20
void *__p[2]; // [xsp+10h] [xbp-80h] BYREF
char v24; // [xsp+27h] [xbp-69h]
std::string v25; // [xsp+28h] [xbp-68h] BYREF
sub_100009900(&v25, "");
v13 = 0;
v14 = 0;
v15 = 0;
do
{
if ( v13 > 2 )
{
if ( v13 == 3 )
{
if ( (a4 & 1) == 0 )
goto LABEL_21;
}
else if ( v13 == 4 )
{
if ( (a5 & 1) == 0 )
goto LABEL_21;
}
else if ( (a6 & 1) == 0 )
{
break;
}
}
else if ( v13 )
{
if ( v13 == 1 )
{
if ( (a2 & 1) == 0 )
goto LABEL_21;
}
else if ( (a3 & 1) == 0 )
{
goto LABEL_21;
}
}
else if ( !a1 )
{
goto LABEL_21;
}
if ( v15 >= 1 )
std::string::append(&v25, ",");
v16 = (cocos2d::CCString *)sub_100268F4C("%i", v13);
CString = cocos2d::CCString::getCString(v16);
std::string::append(&v25, CString);
++v15;
v14 = v13;
LABEL_21:
++v13;
}
while ( v13 != 6 );
if ( v15 == 1 )
{
v18 = (cocos2d::CCString *)sub_100268F4C("%i", v14);
v19 = (char *)cocos2d::CCString::getCString(v18);
sub_100009900(a7, v19);
goto LABEL_29;
}
sub_100009900(__p, "");
v20 = sub_1000045BC(&v25, __p);
v21 = v20;
if ( v24 < 0 )
{
operator delete(__p[0]);
if ( !v21 )
goto LABEL_28;
LABEL_26:
sub_100009900(a7, "-");
}
else
{
if ( v20 )
goto LABEL_26;
LABEL_28:
*a7 = v25;
memset(&v25, 0, sizeof(v25));
}
LABEL_29:
if ( SHIBYTE(v25.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v25.__r_.__value_.__l.__data_);
}