//
// GameLevelManager::onRequestUserAccessCompleted from 0x4b13b0 to 0x4b14ac (252 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x4dadfa
//
// 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:03 +0000
//
GameManager *__fastcall GameLevelManager::onRequestUserAccessCompleted(int a1, int a2)
{
cocos2d::CCDictionary *v3; // r9
_BOOL4 v5; // r5
int v6; // r0
int v7; // r5
const char *v8; // r0
int v9; // r6
GameManager *result; // r0
int v11; // r4
GameManager *v12; // r4
GameManager *HasRatingPower; // r0
GameManager *v14; // r0
int v15; // [sp+0h] [bp-14h] BYREF
int v16; // [sp+4h] [bp-10h]
int v17; // [sp+8h] [bp-Ch]
v3 = *(cocos2d::CCDictionary **)(a1 + 748);
v15 = 0;
v16 = 0;
v17 = 0;
std::string::__init(&v15, "req_ua", 6u);
cocos2d::CCDictionary::removeObjectForKey(v3);
std::string::~string((int)&v15);
v15 = 0;
v16 = 0;
v17 = 0;
std::string::__init(&v15, "-1", 2u);
v5 = sub_4A9CC4((unsigned __int8 *)a2, (unsigned __int8 *)&v15);
std::string::~string((int)&v15);
if ( v5 )
{
v6 = *(_DWORD *)(a1 + 888);
if ( v6 )
(*(void (__fastcall **)(int, _DWORD, int))(*(_DWORD *)v6 + 4))(v6, 0, 49);
}
v7 = *(_BYTE *)a2 & 1;
if ( (*(_BYTE *)a2 & 1) != 0 )
v8 = *(const char **)(a2 + 8);
else
v8 = (const char *)(a2 + 1);
v9 = atoi(v8);
result = (GameManager *)std::string::find((unsigned __int8 *)a2, 44, 0);
if ( result == (GameManager *)-1 )
{
v12 = nullptr;
}
else
{
if ( v7 )
v11 = *(_DWORD *)(a2 + 8);
else
v11 = a2 + 1;
result = (GameManager *)atoi((const char *)result + v11 + 1);
v12 = result;
}
if ( v9 == 99 )
{
HasRatingPower = (GameManager *)GameManager::sharedState(result);
*((_BYTE *)HasRatingPower + 832) = 1;
}
else
{
if ( (unsigned int)(v9 - 1) > 1 )
return result;
v14 = (GameManager *)GameManager::sharedState(result);
HasRatingPower = (GameManager *)GameManager::setHasRatingPower(v14, v9);
}
*(_DWORD *)(GameManager::sharedState(HasRatingPower) + 836) = v12;
result = *(GameManager **)(a1 + 888);
if ( result )
return (GameManager *)(**(int (__fastcall ***)(GameManager *, _DWORD, int))result)(result, 0, 49);
return result;
}