//
// GameLevelManager::onAdminNameUnlockCompleted from 0x80ba60 to 0x80bc00 (416 bytes)
//
// 2 xrefs:
// > GameLevelManager::handleIt @ 0x85a20c
// > ??> @ 0x84160
//
// 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:47 +0000
//
__int64 __fastcall GameLevelManager::onAdminNameUnlockCompleted(__int64 a1, __int64 a2, char *a3)
{
const char *v5; // x22
__int64 v6; // x26
size_t v7; // x0
size_t v8; // x20
unsigned __int64 v9; // x0
char *v10; // x3
_BOOL4 v11; // w19
__int64 v12; // x0
unsigned __int64 v14; // [xsp+50h] [xbp+50h] BYREF
size_t v15; // [xsp+58h] [xbp+58h]
void *v16; // [xsp+60h] [xbp+60h]
v5 = a3 + 1;
v6 = *(_QWORD *)(a1 + 1088);
if ( (*a3 & 1) != 0 )
v5 = *((const char **)a3 + 2);
v14 = 0;
v15 = 0;
v16 = nullptr;
v7 = strlen(v5);
v8 = v7;
if ( v7 > 0xFFFFFFFFFFFFFFEFLL )
sub_62C79C();
if ( v7 > 0x16 )
{
v9 = (v7 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v14 = v9 | 1;
v10 = (char *)operator new(v9);
v16 = v10;
v15 = v8;
LABEL_6:
v10 = (char *)memcpy(v10, v5, v8);
goto LABEL_7;
}
LOBYTE(v14) = 2 * v7;
v10 = (char *)&v14 + 1;
if ( v7 )
goto LABEL_6;
LABEL_7:
v10[v8] = 0;
cocos2d::CCDictionary::removeObjectForKey(v6, &v14);
if ( (v14 & 1) != 0 )
operator delete(v16);
v14 = 0;
v15 = 0;
v16 = nullptr;
std::string::__init((__int64 *)&v14, &word_117CE08, 2u);
v11 = sub_7FEA60(a2, (__int64)&v14);
if ( (v14 & 1) != 0 )
operator delete(v16);
v12 = *(_QWORD *)(a1 + 1256);
if ( v11 )
{
if ( v12 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v12 + 200LL))(v12);
}
else if ( v12 )
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)v12 + 192LL))(v12);
}
return _stack_chk_guard;
}