//
// GameLevelManager::userNameForUserID from 0x4ad06c to 0x4ad110 (164 bytes)
//
// 5 xrefs:
// > CommentCell::loadFromComment @ 0x432752
// > LevelBrowserLayer::getSearchTitle @ 0x4a5fd4
// > LevelBrowserLayer::getSearchTitle @ 0x4a61c0
// > GameLevelManager::tryGetUsername @ 0x4ceb3c
// > GJGameLevel::create @ 0x4cf320
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:49:59 +0000
//
GameLevelManager *__fastcall GameLevelManager::userNameForUserID(
GameLevelManager *this,
int a2,
const char *a3,
int a4)
{
int *v5; // r0
const char *v6; // r1
size_t v7; // r2
int v8; // r7
cocos2d::CCString *v9; // r0
const char *CString; // r8
size_t v11; // r0
cocos2d::CCString *v12; // r7
const char *v13; // r0
const char *v14; // r5
size_t v15; // r0
GameLevelManager *v17; // [sp+0h] [bp-10h] BYREF
int v18; // [sp+4h] [bp-Ch]
const char *v19; // [sp+8h] [bp-8h]
int v20; // [sp+Ch] [bp-4h]
v17 = this;
v18 = a2;
v19 = a3;
v20 = a4;
if ( (int)a3 <= 0 )
goto LABEL_2;
v8 = *(_DWORD *)(a2 + 692);
v9 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", a3);
v17 = nullptr;
v18 = 0;
v19 = nullptr;
CString = (const char *)cocos2d::CCString::getCString(v9);
v11 = strlen(CString);
std::string::__init((int *)&v17, CString, v11);
v12 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v8, &v17);
std::string::~string((int)&v17);
if ( v12 )
{
v13 = (const char *)cocos2d::CCString::getCString(v12);
*(_DWORD *)this = 0;
*((_DWORD *)this + 1) = 0;
*((_DWORD *)this + 2) = 0;
v14 = v13;
v15 = strlen(v13);
v6 = v14;
v7 = v15;
v5 = (int *)this;
}
else
{
LABEL_2:
v5 = (int *)this;
*(_DWORD *)this = 0;
*((_DWORD *)this + 1) = 0;
v6 = "-";
*((_DWORD *)this + 2) = 0;
v7 = 1;
}
std::string::__init(v5, v6, v7);
return this;
}