//
// GameLevelManager::onAdminNameLockCompleted from 0x140248ff0 to 0x140249174 (388 bytes)
//
// 2 xrefs:
// > GameLevelManager::handleIt @ 0x14021b089
// > ??> @ 0x14091c364
//
// This function is hookable on this platform (idp: pc, 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 11:28:39 +0000
//
void __fastcall GameLevelManager::onAdminNameLockCompleted(__int64 a1, const void **a2, _QWORD *a3)
{
_BYTE *v6; // rdx
size_t v7; // r8
void *v8; // rcx
const void *v9; // rcx
unsigned __int64 v10; // rbp
size_t v11; // r8
__int64 v12; // rcx
__int64 v13; // rcx
void *Block[2]; // [rsp+40h] [rbp-48h] BYREF
__int128 v15; // [rsp+50h] [rbp-38h]
v6 = a3;
if ( a3[3] > 0xFu )
v6 = (_BYTE *)*a3;
*(_OWORD *)Block = 0;
v15 = 0;
v7 = -1;
do
++v7;
while ( v6[v7] );
sub_14003D230(Block, v6, v7);
cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(a1 + 1200), Block);
if ( *((_QWORD *)&v15 + 1) > 0xFu )
{
v8 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v15 + 1) + 1LL) >= 0x1000 )
{
v8 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v8);
}
*(_OWORD *)Block = 0;
*(_QWORD *)&v15 = 2;
*((_QWORD *)&v15 + 1) = 15;
strcpy((char *)Block, "-1");
v9 = a2;
if ( (unsigned __int64)a2[3] > 0xF )
v9 = *a2;
v10 = (unsigned __int64)a2[2];
v11 = v10;
if ( v10 > 2 )
v11 = 2;
if ( !memcmp(v9, Block, v11) && v10 == 2 )
{
v13 = *(_QWORD *)(a1 + 1384);
if ( v13 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v13 + 184LL))(v13);
}
else
{
v12 = *(_QWORD *)(a1 + 1384);
if ( v12 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v12 + 176LL))(v12);
}
sub_14003D310((__int64)a2);
sub_14003D310((__int64)a3);
}