//
// GameLevelManager::writeSpecialFilters from 0x3c0aa4 to 0x3c0c0e (362 bytes)
//
// 2 xrefs:
// > GameLevelManager::getLevelLists @ 0x3d4646
// > GameLevelManager::getOnlineLevels @ 0x3d49a8
//
// 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
//
GameLevelManager *__fastcall GameLevelManager::writeSpecialFilters(GameLevelManager *this, GJSearchObject *a2, int a3)
{
GameLevelManager *v5; // r0
char *v6; // r1
int v7; // r3
unsigned int v8; // r3
int v9; // r9
GameLevelManager *v10; // r0
cocos2d::CCArray *v11; // r9
unsigned int i; // r8
cocos2d::CCString *v13; // r0
int v14; // r11
int v16; // [sp+0h] [bp-14h] BYREF
char *v17; // [sp+4h] [bp-10h] BYREF
GameToolbox v18; // [sp+8h] [bp-Ch] BYREF
sub_776584((int)this, (char *)&unk_939830);
sub_774544((int)this, "&diff=");
sub_775C20(&v16, a3 + 272);
sub_77441C(this, &v16);
sub_774008(&v16);
if ( *(_BYTE *)(a3 + 284) )
{
v5 = this;
v6 = "&star=1";
LABEL_3:
sub_774544((int)v5, v6);
goto LABEL_4;
}
if ( *(_BYTE *)(a3 + 285) )
{
v5 = this;
v6 = "&noStar=1";
goto LABEL_3;
}
LABEL_4:
v7 = *(_DWORD *)(a3 + 304);
if ( v7 > 0 )
{
v8 = v7 - 6;
if ( v8 > 4 )
v9 = 0;
else
v9 = a0123456789abcd_1[v8 + 64];
sub_774544((int)this, "&demonFilter=");
GameToolbox::intToString((GameToolbox *)&v17, v9);
sub_77441C(this, &v17);
sub_774008(&v17);
}
if ( *(_DWORD *)(a3 + 264) == 12 )
{
sub_776584((int)&v17, (char *)&unk_939830);
v10 = GameLevelManager::sharedState();
v11 = cocos2d::CCDictionary::allKeys(v10->m_followedCreators);
for ( i = 0; i < cocos2d::CCArray::count(v11); ++i )
{
v13 = cocos2d::CCArray::stringAtIndex(v11, i);
v14 = cocos2d::CCString::intValue(v13);
if ( i )
sub_774544((int)&v17, ",");
GameToolbox::intToString(&v18, v14);
sub_77441C(&v17, &v18);
sub_774008(&v18);
}
sub_774544((int)this, "&followed=");
sub_774544((int)this, v17);
sub_774008(&v17);
}
return this;
}