//
// GameLevelManager::onGetNotificationsCompleted from 0x838b6c to 0x839754 (3048 bytes)
//
// 2 xrefs:
// > GameLevelManager::handleIt @ 0x85a960
// > ??> @ 0x827f8
//
// 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:55:13 +0000
//
__int64 __fastcall GameLevelManager::onGetNotificationsCompleted(GameLevelManager *a1, __int64 a2, char *a3)
{
const char *v4; // x3
char *v5; // x21
_BOOL4 v6; // w21
const char *v7; // x0
int v8; // w21
int v9; // w2
const char *v10; // x1
size_t v11; // x0
cocos2d::CCArray *v12; // x20
cocos2d::CCString *v13; // x0
const char *CString; // x0
size_t v15; // x0
cocos2d::CCArray *v16; // x21
cocos2d::CCArray *v17; // x0
cocos2d::CCString *v18; // x0
const char *v19; // x0
size_t v20; // x0
unsigned int v21; // w28
cocos2d::CCString *v22; // x0
const char *v23; // x0
size_t v24; // x0
__int64 v25; // x21
_QWORD *v26; // x20
cocos2d::CCString *v27; // x0
int v28; // w0
cocos2d::CCString *v29; // x0
cocos2d::CCString *v30; // x0
char *v31; // x0
cocos2d::CCString *v32; // x0
size_t v33; // x0
__int64 v34; // x1
cocos2d::CCString *v35; // x0
size_t v36; // x0
__int64 v37; // x1
cocos2d::CCString *v38; // x0
char *v39; // x0
cocos2d::CCString *v40; // x0
cocos2d::CCString *v41; // x0
cocos2d::CCString *v42; // x0
cocos2d::CCString *v43; // x0
char *v44; // x0
cocos2d::CCString *v45; // x0
cocos2d::CCString *v46; // x0
cocos2d::CCString *v47; // x0
cocos2d::CCString *v48; // x0
cocos2d::CCString *v49; // x0
cocos2d::CCString *v50; // x0
char *v51; // x0
GameStatsManager *v52; // x0
GameStatsManager *v53; // x21
cocos2d::CCString *v54; // x0
const char *v55; // x0
GameManager *v56; // x0
__int64 v57; // x1
void (__fastcall ***v58)(_QWORD, cocos2d::CCArray *, _QWORD, _QWORD, _QWORD); // x0
__int64 v60; // x0
cocos2d::CCArray **v61; // x19
void (__fastcall *v62)(cocos2d::CCArray **, __int64, _QWORD, _QWORD, __int64); // x20
__int64 v63; // x0
GameManager *v64; // x0
char *v65; // x1
__int64 v66; // x0
__int64 v67; // x0
__int64 v68; // x0
cocos2d::CCString *v69; // x0
cocos2d::CCString *v70; // x0
unsigned int v71; // [xsp+64h] [xbp+64h]
unsigned int v72; // [xsp+68h] [xbp+68h]
unsigned int v73; // [xsp+6Ch] [xbp+6Ch]
cocos2d::CCArray *v75; // [xsp+88h] [xbp+88h]
char *v76; // [xsp+98h] [xbp+98h]
char *v77; // [xsp+98h] [xbp+98h]
char *v78; // [xsp+A0h] [xbp+A0h]
cocos2d::CCArray *v80; // [xsp+A8h] [xbp+A8h]
cocos2d::CCArray *v81; // [xsp+A8h] [xbp+A8h]
cocos2d::CCArray *v82; // [xsp+A8h] [xbp+A8h]
cocos2d::CCArray *v83; // [xsp+A8h] [xbp+A8h]
__int64 v84; // [xsp+B0h] [xbp+B0h] BYREF
__int64 v85; // [xsp+B8h] [xbp+B8h]
void *v86; // [xsp+C0h] [xbp+C0h]
__int64 v87; // [xsp+C8h] [xbp+C8h] BYREF
__int64 v88; // [xsp+D0h] [xbp+D0h]
void *v89; // [xsp+D8h] [xbp+D8h]
__int64 v90; // [xsp+E0h] [xbp+E0h] BYREF
__int64 v91; // [xsp+E8h] [xbp+E8h]
char *v92; // [xsp+F0h] [xbp+F0h]
v4 = a3 + 1;
if ( (*a3 & 1) != 0 )
v4 = *((const char **)a3 + 2);
GameLevelManager::removeDLFromActive(a1, v4);
std::string::basic_string(&v90, (__int64)a3, 0xEu, 0xFFFFFFFFFFFFFFFFLL);
if ( (v90 & 1) != 0 )
{
v5 = v92;
v73 = atoi(v92);
operator delete(v5);
}
else
{
v73 = atoi((const char *)&v90 + 1);
}
v90 = 0;
v91 = 0;
v92 = nullptr;
std::string::__init(&v90, &word_117CE08, 2u);
v6 = sub_7FEA60(a2, (__int64)&v90);
if ( (v90 & 1) != 0 )
operator delete(v92);
if ( v6 )
goto LABEL_78;
v7 = (const char *)(a2 + 1);
v8 = *(_BYTE *)a2 & 1;
if ( (*(_BYTE *)a2 & 1) != 0 )
v7 = *(const char **)(a2 + 16);
v9 = atoi(v7);
if ( v9 == -2 )
{
v61 = *((cocos2d::CCArray ***)a1 + 57);
if ( v61 )
{
v62 = *(void (__fastcall **)(cocos2d::CCArray **, __int64, _QWORD, _QWORD, __int64))*v61;
v63 = cocos2d::CCArray::create(*v61);
v62(v61, v63, v73, 0, 10);
}
return _stack_chk_guard;
}
if ( v9 < 0 )
{
v66 = *((_QWORD *)a1 + 57);
if ( v66 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v66 + 8LL))(v66, v73);
return _stack_chk_guard;
}
v10 = (const char *)(a2 + 1);
if ( v8 )
v10 = *(const char **)(a2 + 16);
v80 = (cocos2d::CCArray *)v10;
v90 = 0;
v91 = 0;
v92 = nullptr;
v11 = strlen(v10);
std::string::__init(&v90, v80, v11);
v12 = sub_80CFCC((unsigned __int8 *)&v90, "#");
if ( (v90 & 1) != 0 )
operator delete(v92);
if ( (unsigned int)cocos2d::CCArray::count(v12) <= 1 )
{
LABEL_78:
v60 = *((_QWORD *)a1 + 57);
if ( v60 )
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)v60 + 8LL))(v60, v73, 0xFFFFFFFFLL);
return _stack_chk_guard;
}
v13 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v12, 1u);
CString = (const char *)cocos2d::CCString::getCString(v13);
v90 = 0;
v81 = (cocos2d::CCArray *)CString;
v91 = 0;
v92 = nullptr;
v15 = strlen(CString);
std::string::__init(&v90, v81, v15);
v16 = sub_80CFCC((unsigned __int8 *)&v90, ":");
if ( (v90 & 1) != 0 )
operator delete(v92);
v72 = 0;
if ( (unsigned int)cocos2d::CCArray::count(v16) )
{
v70 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v16, 0);
v72 = cocos2d::CCString::intValue(v70);
}
v71 = 10;
v17 = (cocos2d::CCArray *)cocos2d::CCArray::count(v16);
if ( (unsigned int)v17 > 2 )
{
v69 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v16, 2u);
v17 = (cocos2d::CCArray *)cocos2d::CCString::intValue(v69);
v71 = (unsigned int)v17;
}
v75 = (cocos2d::CCArray *)cocos2d::CCArray::create(v17);
v18 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v12, 0);
v19 = (const char *)cocos2d::CCString::getCString(v18);
v90 = 0;
v82 = (cocos2d::CCArray *)v19;
v91 = 0;
v92 = nullptr;
v20 = strlen(v19);
std::string::__init(&v90, v82, v20);
v83 = sub_80CFCC((unsigned __int8 *)&v90, "|");
if ( (v90 & 1) != 0 )
operator delete(v92);
v21 = 0;
while ( v21 < (unsigned int)cocos2d::CCArray::count(v83) )
{
v22 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v83, v21);
v23 = (const char *)cocos2d::CCString::getCString(v22);
v90 = 0;
v91 = 0;
v92 = nullptr;
v78 = (char *)v23;
v24 = strlen(v23);
std::string::__init(&v90, v78, v24);
v25 = GameLevelManager::responseToDict((__int64)&v90, 0);
if ( (v90 & 1) != 0 )
operator delete(v92);
v26 = (_QWORD *)operator new(0xF8u);
memset(v26, 0, 0xF8u);
cocos2d::CCObject::CCObject((cocos2d::CCObject *)v26);
*((_DWORD *)v26 + 14) = 0;
*((_DWORD *)v26 + 15) = 1;
v26[8] = 0;
*v26 = &off_143F460;
v26[9] = 0;
v26[10] = 0;
v26[11] = 0;
v26[12] = 0;
v26[13] = 0;
v26[14] = 0;
v26[15] = 0;
v26[16] = 0;
v26[17] = 0;
v26[18] = 0;
v26[19] = 0;
*((_BYTE *)v26 + 160) = 0;
*((_DWORD *)v26 + 41) = 0;
*((_DWORD *)v26 + 42) = 0;
v26[22] = 0;
v26[23] = 0;
v26[24] = 0;
*((_DWORD *)v26 + 50) = 0;
*((_DWORD *)v26 + 51) = 0;
*((_DWORD *)v26 + 52) = 0;
*((_DWORD *)v26 + 53) = 0;
*((_DWORD *)v26 + 54) = 0;
v26[28] = 0;
v26[29] = 0;
v26[30] = 0;
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v26);
v90 = 0;
v91 = 0;
v92 = nullptr;
std::string::__init(&v90, "1", 1u);
v27 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v25, &v90);
v28 = cocos2d::CCString::intValue(v27);
*((_DWORD *)v26 + 14) = v28;
if ( (v90 & 1) != 0 )
{
operator delete(v92);
v28 = *((_DWORD *)v26 + 14);
}
if ( v28 <= 0 )
goto LABEL_72;
v90 = 0;
v91 = 0;
v92 = nullptr;
std::string::__init(&v90, &byte_120A098, 1u);
v29 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v25, &v90);
*((_DWORD *)v26 + 15) = cocos2d::CCString::intValue(v29);
if ( (v90 & 1) != 0 )
operator delete(v92);
v90 = 0;
v91 = 0;
v92 = nullptr;
std::string::__init(&v90, "3", 1u);
v30 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v25, &v90);
v31 = (char *)cocos2d::CCString::getCString(v30);
std::string::assign(v26 + 8, v31);
if ( (v90 & 1) != 0 )
operator delete(v92);
v84 = 0;
v85 = 0;
v86 = nullptr;
std::string::__init(&v84, &byte_11BCA00, 1u);
v32 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v25, &v84);
v76 = (char *)cocos2d::CCString::getCString(v32);
v87 = 0;
v88 = 0;
v89 = nullptr;
v33 = strlen(v76);
std::string::__init(&v87, v76, v33);
LevelTools::base64DecodeString((__int64)&v87, &v90);
if ( (v26[11] & 1) != 0 )
{
*(_BYTE *)v26[13] = 0;
v26[12] = 0;
}
else
{
*((_BYTE *)v26 + 89) = 0;
*((_BYTE *)v26 + 88) = 0;
}
std::string::reserve(v26 + 11, 0);
v34 = v91;
v26[11] = v90;
v26[12] = v34;
v26[13] = v92;
if ( (v87 & 1) != 0 )
operator delete(v89);
if ( (v84 & 1) != 0 )
operator delete(v86);
v84 = 0;
v85 = 0;
v86 = nullptr;
std::string::__init(&v84, "5", 1u);
v35 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v25, &v84);
v77 = (char *)cocos2d::CCString::getCString(v35);
v87 = 0;
v88 = 0;
v89 = nullptr;
v36 = strlen(v77);
std::string::__init(&v87, v77, v36);
LevelTools::base64DecodeString((__int64)&v87, &v90);
if ( (v26[14] & 1) != 0 )
{
*(_BYTE *)v26[16] = 0;
v26[15] = 0;
}
else
{
*((_BYTE *)v26 + 113) = 0;
*((_BYTE *)v26 + 112) = 0;
}
std::string::reserve(v26 + 14, 0);
v37 = v91;
v26[14] = v90;
v26[15] = v37;
v26[16] = v92;
if ( (v87 & 1) != 0 )
{
operator delete(v89);
if ( (v84 & 1) == 0 )
goto LABEL_45;
}
else if ( (v84 & 1) == 0 )
{
goto LABEL_45;
}
operator delete(v86);
LABEL_45:
v90 = 0;
v91 = 0;
v92 = nullptr;
std::string::__init(&v90, "6", 1u);
v38 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v25, &v90);
v39 = (char *)cocos2d::CCString::getCString(v38);
std::string::assign(v26 + 17, v39);
if ( (v90 & 1) != 0 )
operator delete(v92);
v90 = 0;
v91 = 0;
v92 = nullptr;
std::string::__init(&v90, "7", 1u);
v40 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v25, &v90);
*((_BYTE *)v26 + 160) = cocos2d::CCString::boolValue(v40);
if ( (v90 & 1) != 0 )
operator delete(v92);
v90 = 0;
v91 = 0;
v92 = nullptr;
std::string::__init(&v90, "8", 1u);
v41 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v25, &v90);
*((_DWORD *)v26 + 41) = cocos2d::CCString::intValue(v41);
if ( (v90 & 1) != 0 )
operator delete(v92);
v90 = 0;
v91 = 0;
v92 = nullptr;
std::string::__init(&v90, "9", 1u);
v42 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v25, &v90);
*((_DWORD *)v26 + 42) = cocos2d::CCString::intValue(v42);
if ( (v90 & 1) != 0 )
operator delete(v92);
v90 = 0;
v91 = 0;
v92 = nullptr;
std::string::__init(&v90, "10", 2u);
v43 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v25, &v90);
v44 = (char *)cocos2d::CCString::getCString(v43);
std::string::assign(v26 + 22, v44);
if ( (v90 & 1) != 0 )
operator delete(v92);
v90 = 0;
v91 = 0;
v92 = nullptr;
std::string::__init(&v90, "11", 2u);
v45 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v25, &v90);
*((_DWORD *)v26 + 50) = cocos2d::CCString::intValue(v45);
if ( (v90 & 1) != 0 )
operator delete(v92);
v90 = 0;
v91 = 0;
v92 = nullptr;
std::string::__init(&v90, &word_120A570, 2u);
v46 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v25, &v90);
*((_DWORD *)v26 + 51) = cocos2d::CCString::intValue(v46);
if ( (v90 & 1) != 0 )
operator delete(v92);
v90 = 0;
v91 = 0;
v92 = nullptr;
std::string::__init(&v90, "13", 2u);
v47 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v25, &v90);
*((_DWORD *)v26 + 52) = cocos2d::CCString::intValue(v47);
if ( (v90 & 1) != 0 )
operator delete(v92);
v90 = 0;
v91 = 0;
v92 = nullptr;
std::string::__init(&v90, &word_1217DE8, 2u);
v48 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v25, &v90);
*((_DWORD *)v26 + 53) = cocos2d::CCString::intValue(v48);
if ( (v90 & 1) != 0 )
operator delete(v92);
v90 = 0;
v91 = 0;
v92 = nullptr;
std::string::__init(&v90, "15", 2u);
v49 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v25, &v90);
*((_DWORD *)v26 + 54) = cocos2d::CCString::intValue(v49);
if ( (v90 & 1) != 0 )
operator delete(v92);
v90 = 0;
v91 = 0;
v92 = nullptr;
std::string::__init(&v90, "16", 2u);
v50 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v25, &v90);
v51 = (char *)cocos2d::CCString::getCString(v50);
std::string::assign(v26 + 28, v51);
if ( (v90 & 1) != 0 )
operator delete(v92);
cocos2d::CCArray::addObject(v75, (cocos2d::CCObject *)v26);
v52 = (GameStatsManager *)*((unsigned int *)v26 + 50);
if ( (int)v52 > 0 )
{
v53 = (GameStatsManager *)GameStatsManager::sharedState(v52);
v54 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)*((unsigned int *)v26 + 50));
v55 = (const char *)cocos2d::CCString::getCString(v54);
GameStatsManager::setStatIfHigher(v53, v55, *((_DWORD *)v26 + 51));
}
v56 = (GameManager *)*((unsigned __int8 *)v26 + 176);
v57 = (unsigned __int8)v56 >> 1;
if ( ((unsigned __int8)v56 & 1) != 0 )
v57 = v26[23];
if ( v57 )
{
v64 = (GameManager *)GameManager::sharedState(v56);
v65 = (char *)v26 + 177;
if ( (v26[22] & 1) != 0 )
v65 = (char *)v26[24];
++v21;
GameManager::reportAchievementWithID(v64, v65, 100, 0);
continue;
}
LABEL_72:
++v21;
}
if ( !v73 )
{
v67 = GJAccountManager::sharedState(nullptr);
v68 = GameLevelManager::userInfoForAccountID(
(cocos2d::CCDictionary **)a1,
*(_DWORD *)(v67 + 352) - *(_DWORD *)(v67 + 356));
if ( v68 )
{
*(_DWORD *)(v68 + 704) = 0;
*(_DWORD *)(v68 + 708) = 0;
}
}
v58 = *((void (__fastcall ****)(_QWORD, cocos2d::CCArray *, _QWORD, _QWORD, _QWORD))a1 + 57);
if ( v58 )
(**v58)(v58, v75, v73, v72, v71);
return _stack_chk_guard;
}