//
// GameLevelManager::responseToDict from 0x8102b4 to 0x8104a8 (500 bytes)
//
// 21 xrefs:
// > GameLevelManager::createAndGetEditorSoundConfigs @ 0x8105d0
// > GameLevelManager::onGetTopArtistsCompleted @ 0x8109a4
// > GameLevelManager::onDownloadEditorSoundCompleted @ 0x811b9c
// > GameLevelManager::createAndGetMapPacks @ 0x81ae18
// > GameLevelManager::createAndGetLevelLists @ 0x81c6e4
// > GameLevelManager::onGetNotificationsCompleted @ 0x838e04
// > GameLevelManager::onDownloadUserMessageCompleted @ 0x83f484
// > GameLevelManager::createAndGetLevels @ 0x844e44
// > GameLevelManager::createAndGetScores @ 0x84947c
// > GameLevelManager::onGetGJUserInfoCompleted @ 0x84a2e8
// > GameLevelManager::onGetUserMessagesCompleted @ 0x84a6f4
// > GameLevelManager::createAndGetCommentsFull @ 0x84ab54
// > GameLevelManager::createAndGetCommentsFull @ 0x84acb4
// > GameLevelManager::createAndGetCommentsFull @ 0x84acf4
// > GameLevelManager::storeThreadManifest @ 0x84cdd4
// > GameLevelManager::onGetUserSearchCompleted @ 0x84e764
// > GameLevelManager::onGetFriendRequestsCompleted @ 0x84ebf8
// > GameLevelManager::onGetUserListCompleted @ 0x84f1c4
// > GameLevelManager::processOnDownloadLevelCompleted @ 0x859158
// > GJMultiplayerManager::addComment @ 0xac582c
// > ??> @ 0x42100
//
// 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 12:54:49 +0000
//
__int64 __fastcall GameLevelManager::responseToDict(__int64 a1, unsigned __int8 a2)
{
int v3; // w20
__int64 v4; // x24
const char *v5; // x1
size_t v6; // x0
cocos2d::CCArray *v7; // x21
unsigned int v8; // w19
unsigned int v9; // w20
cocos2d::CCString *v10; // x0
char *CString; // x22
__int64 v12; // x0
cocos2d::CCObject *v13; // x20
size_t v15; // x0
size_t v16; // x0
char *v17; // [xsp+58h] [xbp+58h]
char *v18; // [xsp+58h] [xbp+58h]
__int64 v19; // [xsp+60h] [xbp+60h] BYREF
__int64 v20; // [xsp+68h] [xbp+68h]
void *v21; // [xsp+70h] [xbp+70h]
v3 = a2;
v4 = cocos2d::CCDictionary::create(_stack_chk_guard);
v5 = (const char *)(a1 + 1);
if ( !v3 )
{
if ( (*(_BYTE *)a1 & 1) != 0 )
v5 = *(const char **)(a1 + 16);
v17 = (char *)v5;
v19 = 0;
v20 = 0;
v21 = nullptr;
v6 = strlen(v5);
std::string::__init(&v19, v17, v6);
v7 = sub_80CFCC((unsigned __int8 *)&v19, ":");
if ( (v19 & 1) == 0 )
goto LABEL_5;
LABEL_16:
operator delete(v21);
goto LABEL_5;
}
if ( (*(_BYTE *)a1 & 1) != 0 )
v5 = *(const char **)(a1 + 16);
v18 = (char *)v5;
v19 = 0;
v20 = 0;
v21 = nullptr;
v16 = strlen(v5);
std::string::__init(&v19, v18, v16);
v7 = sub_80CFCC((unsigned __int8 *)&v19, "~");
if ( (v19 & 1) != 0 )
goto LABEL_16;
LABEL_5:
v8 = 0;
v9 = 1;
if ( (unsigned int)cocos2d::CCArray::count(v7) > 1 )
{
do
{
v10 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v7, v8);
CString = (char *)cocos2d::CCString::getCString(v10);
v12 = cocos2d::CCArray::objectAtIndex(v7, v9);
v13 = (cocos2d::CCObject *)v12;
if ( CString
&& v12
&& (v19 = 0,
v20 = 0,
v21 = nullptr,
v15 = strlen(CString),
std::string::__init(&v19, CString, v15),
cocos2d::CCDictionary::setObject(v4, v13),
(v19 & 1) != 0) )
{
v8 += 2;
operator delete(v21);
}
else
{
v8 += 2;
}
v9 = v8 + 1;
}
while ( (unsigned int)cocos2d::CCArray::count(v7) > v8 + 1 );
}
return v4;
}