//
// GameLevelManager::getLengthStr from 0x4b606c to 0x4b61be (338 bytes)
//
// 1 xrefs:
// > LevelSearchLayer::getLevelLenKey @ 0x496540
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:50:08 +0000
//
GameLevelManager *__fastcall GameLevelManager::getLengthStr(
GameLevelManager *this,
bool a2,
int a3,
_BOOL4 a4,
bool a5,
bool a6,
bool a7,
char a8)
{
int v10; // r6
int v11; // r5
const char *v12; // r1
_BOOL4 v13; // r3
cocos2d::CCString *v14; // r0
char *CString; // r0
cocos2d::CCString *v16; // r0
const char *v17; // r0
const char *v18; // r6
size_t v19; // r0
const char *v20; // r1
size_t v21; // r2
int *v22; // r0
_BOOL4 v23; // r6
int v24; // r0
int v25; // r1
int v26; // r2
int v29; // [sp+1Ch] [bp-20h] BYREF
int v30; // [sp+20h] [bp-1Ch]
int v31; // [sp+24h] [bp-18h]
int v32[3]; // [sp+28h] [bp-14h] BYREF
v10 = 1;
v11 = 0;
v29 = 0;
v30 = 0;
v31 = 0;
std::string::__init(&v29, &unk_B6B226, 0);
v12 = nullptr;
while ( 2 )
{
switch ( v10 )
{
case 2:
v13 = a4;
goto LABEL_22;
case 3:
v13 = a5;
goto LABEL_22;
case 4:
v13 = a6;
goto LABEL_22;
case 5:
v13 = a7;
LABEL_22:
if ( !v13 )
goto LABEL_10;
goto LABEL_6;
case 6:
if ( !a8 )
goto LABEL_12;
goto LABEL_6;
default:
if ( a3 )
{
LABEL_6:
if ( v11 )
std::string::append(&v29, ",");
v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)(v10 - 1));
CString = (char *)cocos2d::CCString::getCString(v14);
std::string::append(&v29, CString);
++v11;
v12 = (const char *)(v10 - 1);
}
if ( v10 != 6 )
{
LABEL_10:
++v10;
continue;
}
LABEL_12:
if ( v11 == 1 )
{
v16 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v12);
v17 = (const char *)cocos2d::CCString::getCString(v16);
*(_DWORD *)this = 0;
*((_DWORD *)this + 1) = 0;
v18 = v17;
*((_DWORD *)this + 2) = 0;
v19 = strlen(v17);
v20 = v18;
v21 = v19;
v22 = (int *)this;
goto LABEL_17;
}
memset(v32, 0, sizeof(v32));
std::string::__init(v32, &unk_B6B226, 0);
v23 = sub_4A9CC4((unsigned __int8 *)&v29, (unsigned __int8 *)v32);
std::string::~string((int)v32);
if ( v23 )
{
v22 = (int *)this;
v21 = 1;
v20 = "-";
*(_DWORD *)this = 0;
*((_DWORD *)this + 1) = 0;
*((_DWORD *)this + 2) = 0;
LABEL_17:
std::string::__init(v22, v20, v21);
}
else
{
v24 = v29;
v25 = v30;
v26 = v31;
v29 = 0;
v30 = 0;
v31 = 0;
*(_DWORD *)this = v24;
*((_DWORD *)this + 1) = v25;
*((_DWORD *)this + 2) = v26;
}
std::string::~string((int)&v29);
return this;
}
}
}