//
// GameLevelManager::onRequestUserAccessCompleted from 0x10008eba0 to 0x10008ece0 (320 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x100088844
//
// 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
//
__int64 __fastcall GameLevelManager::onRequestUserAccessCompleted(__int64 a1, char *a2)
{
__int64 v4; // x21
_BOOL4 v5; // w0
_BOOL4 v6; // w21
__int64 v7; // x0
__int64 result; // x0
int v9; // w20
GameManager *v10; // x21
float v11; // s0
void *__p[2]; // [xsp+8h] [xbp-38h] BYREF
char v13; // [xsp+1Fh] [xbp-21h]
v4 = *(_QWORD *)(a1 + 608);
sub_100009900(__p, "req_ua");
cocos2d::CCDictionary::removeObjectForKey_1(v4, (char *)__p);
if ( v13 < 0 )
operator delete(__p[0]);
sub_100009900(__p, "-1");
v5 = sub_1000045BC(a2, __p);
v6 = v5;
if ( v13 < 0 )
{
operator delete(__p[0]);
if ( !v6 )
goto LABEL_9;
}
else if ( !v5 )
{
goto LABEL_9;
}
v7 = *(_QWORD *)(a1 + 808);
if ( v7 )
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)v7 + 8LL))(v7, 0, 43);
LABEL_9:
if ( a2[23] < 0 )
a2 = *(char **)a2;
result = atoi(a2);
if ( (_DWORD)result == 99 )
{
GameManager::sharedState()->m_hasDRP = 1;
}
else
{
v9 = result;
if ( (unsigned int)(result - 1) > 1 )
return result;
v10 = GameManager::sharedState();
v10->m_hasRP.value = v9;
v11 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0;
v10->m_hasRP.seed = (int)v11;
v10->m_hasRP.random = v9 + (int)v11;
}
result = *(_QWORD *)(a1 + 808);
if ( result )
return (**(__int64 (__fastcall ***)(__int64, _QWORD, __int64))result)(result, 0, 43);
return result;
}