//
// GameLevelManager::updateUsernames from 0x84a004 to 0x84a11c (280 bytes)
//
// 2 xrefs:
// > GameLevelManager::dataLoaded @ 0x860cb4
// > ??> @ 0x425b0
//
// 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:55:22 +0000
//
__int64 __fastcall GameLevelManager::updateUsernames(GameLevelManager *this)
{
__int64 v2; // x0
__int64 v3; // x0
__int64 i; // x22
__int64 v5; // x0
__int64 v6; // x2
int v7; // w20
char v8; // w3
int v9; // w21
int v10; // w20
__int64 v11; // x0
__int64 v12; // x1
__int64 v14; // [xsp+40h] [xbp+40h] BYREF
__int64 v15; // [xsp+48h] [xbp+48h]
void *v16; // [xsp+50h] [xbp+50h]
v2 = *((_QWORD *)this + 95);
if ( v2 )
{
v3 = *(_QWORD *)(v2 + 56);
if ( v3 )
{
for ( i = *(_QWORD *)(v3 + 288); ; i = *(_QWORD *)(i + 288) )
{
v5 = *(_QWORD *)(v3 + 264);
v14 = 0;
v6 = v5 + 416;
v15 = 0;
v7 = *(_DWORD *)(v5 + 588);
v8 = *(_BYTE *)(v5 + 416);
v9 = *(_DWORD *)(v5 + 576) - *(_DWORD *)(v5 + 580);
LODWORD(v5) = *(_DWORD *)(v5 + 592);
v16 = nullptr;
v10 = v7 - v5;
if ( (v8 & 1) != 0 )
{
std::string::__init(&v14, *(void **)(v6 + 16), *(_QWORD *)(v6 + 8));
}
else
{
v11 = *(_QWORD *)v6;
v12 = *(_QWORD *)(v6 + 8);
v16 = *(void **)(v6 + 16);
v14 = v11;
v15 = v12;
}
GameLevelManager::storeUserName(this, v9, v10, (char *)&v14);
if ( (v14 & 1) != 0 )
{
operator delete(v16);
if ( !i )
return _stack_chk_guard;
}
else if ( !i )
{
return _stack_chk_guard;
}
v3 = i;
}
}
}
return _stack_chk_guard;
}