//
// GameLevelManager::requestUserAccess from 0x1401646c0 to 0x140164995 (725 bytes)
//
// 2 xrefs:
// > SupportLayer::onRequestAccess @ 0x1404c98e4
// > ??> @ 0x1406cac80
//
// 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
//
// Hidden C++ exception states: #wind=4
bool GameLevelManager::requestUserAccess(GameLevelManager *a1)
{
__int64 v2; // rbx
void *v3; // rcx
__int64 v5; // rax
__int64 v6; // rcx
void *v7; // rcx
cocos2d::CCString *v8; // rax
const char *CString; // rax
cocos2d::CCString *v10; // rax
char *v11; // rax
size_t v12; // rbx
size_t v13; // r8
_QWORD *v14; // rdx
__int128 v15; // [rsp+40h] [rbp-49h] BYREF
__int64 v16; // [rsp+50h] [rbp-39h]
__int64 v17; // [rsp+58h] [rbp-31h]
__int128 v18; // [rsp+60h] [rbp-29h] BYREF
__int64 v19; // [rsp+70h] [rbp-19h]
__int64 v20; // [rsp+78h] [rbp-11h]
__int128 *v21; // [rsp+80h] [rbp-9h]
__int128 *v22; // [rsp+88h] [rbp-1h]
void *Block[2]; // [rsp+98h] [rbp+Fh] BYREF
__int128 v24; // [rsp+A8h] [rbp+1Fh]
_QWORD Src[4]; // [rsp+B8h] [rbp+2Fh] BYREF
*(_OWORD *)Block = 0;
v24 = 0;
sub_14003A930(Block, "req_ua", 6u);
v2 = cocos2d::CCDictionary::objectForKey(a1->m_friendReqAndUserBlocks, Block);
if ( *((_QWORD *)&v24 + 1) > 0xFu )
{
v3 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v24 + 1) + 1LL) >= 0x1000 )
{
v3 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v3 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v3);
}
if ( v2 )
return 0;
*(_OWORD *)Block = 0;
v24 = 0;
sub_14003A930(Block, "req_ua", 6u);
v5 = cocos2d::CCNode::create();
cocos2d::CCDictionary::setObject(a1->m_friendReqAndUserBlocks, v5, Block);
if ( *((_QWORD *)&v24 + 1) > 0xFu )
{
v7 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v24 + 1) + 1LL) >= 0x1000 )
{
v7 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v7 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v7);
}
GameLevelManager::getBasePostString(v6, Src);
v8 = cocos2d::CCString::createWithFormat("%c%s%s%c%c%s", 87, "mfd", "2893", 103, 98, (const char *)&word_140531E88);
CString = cocos2d::CCString::getCString(v8);
v10 = cocos2d::CCString::createWithFormat("&secret=%s", CString);
v11 = (char *)cocos2d::CCString::getCString(v10);
v12 = -1;
v13 = -1;
do
++v13;
while ( v11[v13] );
sub_140041270(Src, v11, v13);
v21 = &v15;
v22 = &v18;
v15 = 0;
v16 = 0;
v17 = 0;
sub_14003A930(&v15, "req_ua", 6u);
v14 = Src;
if ( Src[3] > 0xFu )
v14 = (_QWORD *)Src[0];
v18 = 0;
v19 = 0;
v20 = 0;
do
++v12;
while ( *((_BYTE *)v14 + v12) );
sub_14003A930(&v18, v14, v12);
*(_OWORD *)Block = 0;
*(_QWORD *)&v24 = 0;
*((_QWORD *)&v24 + 1) = 15;
Block[0] = sub_14003AA10(0x40u);
*(_QWORD *)&v24 = 56;
*((_QWORD *)&v24 + 1) = 63;
strcpy((char *)Block[0], "https://www.boomlings.com/database/requestUserAccess.php");
GameLevelManager::ProcessHttpRequest(a1, (__int64)Block, (const char *)&v18, (const char *)&v15, 43);
sub_14003A830((__int64)Src);
return 1;
}