//
// GameManager::sheetNameForIcon from 0x728c78 to 0x729028 (944 bytes)
//
// 4 xrefs:
// > GameManager::unloadIcon @ 0x729208
// > GameManager::loadIcon @ 0x7294a0
// > GameManager::loadIconAsync @ 0x72997c
// > ??> @ 0xe4778
//
// 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:52:32 +0000
//
__int64 *__usercall GameManager::sheetNameForIcon@(signed int a1@, int a2@, __int64 *a3@)
{
size_t v7; // x1
size_t v8; // x24
size_t v9; // x25
int v10; // w0
const char *v11; // x27
size_t v12; // x24
size_t v13; // x25
unsigned __int64 v14; // x26
unsigned __int64 v15; // x0
size_t v16; // x23
const char *v17; // x1
size_t v18; // x0
char *v19; // x0
char *v20; // [xsp+68h] [xbp+68h]
__int64 v21; // [xsp+80h] [xbp+80h] BYREF
size_t v22; // [xsp+88h] [xbp+88h]
char *v23; // [xsp+90h] [xbp+90h]
size_t v24; // [xsp+98h] [xbp+98h] BYREF
size_t v25; // [xsp+A0h] [xbp+A0h]
char *v26; // [xsp+A8h] [xbp+A8h]
_BYTE v27[504]; // [xsp+B0h] [xbp+B0h] BYREF
v24 = 0;
v25 = 500;
v26 = v27;
v21 = 0;
v22 = 0;
v23 = nullptr;
switch ( a2 )
{
case 0:
std::string::assign(&v21, "player_");
goto LABEL_10;
case 1:
std::string::assign(&v21, (char *)&dword_111BA00);
goto LABEL_10;
case 2:
std::string::assign(&v21, "player_ball_");
goto LABEL_10;
case 3:
std::string::assign(&v21, (char *)&dword_111BA10);
goto LABEL_10;
case 4:
std::string::assign(&v21, (char *)&dword_111BA18);
goto LABEL_10;
case 5:
std::string::assign(&v21, (char *)&dword_111BA20);
goto LABEL_10;
case 6:
std::string::assign(&v21, (char *)&dword_111BA28);
goto LABEL_10;
case 7:
std::string::assign(&v21, (char *)&dword_111BA48);
goto LABEL_10;
case 8:
std::string::assign(&v21, "jetpack_");
LABEL_10:
v7 = (unsigned __int8)v21 >> 1;
if ( (v21 & 1) != 0 )
v7 = v22;
if ( !v7 )
goto LABEL_2;
v8 = v24;
v9 = v24 + 6;
if ( v24 + 6 > v25 )
fmt::internal::Array::grow(&v24, v24 + 6);
v24 = v9;
qmemcpy(&v26[v8], "icons/", 6);
if ( (v21 & 1) == 0 )
{
v10 = (int)(unsigned __int8)v21 >> 1;
v11 = (char *)&v21 + 1;
v12 = v10;
if ( v10 )
goto LABEL_18;
goto LABEL_17;
}
v12 = v22;
v11 = v23;
if ( v22 )
{
v13 = v24;
v14 = v24 + v22;
if ( v24 + v22 <= v25 )
{
v24 += v22;
v19 = &v26[v13];
goto LABEL_44;
}
goto LABEL_46;
}
if ( v23 )
{
LABEL_17:
v12 = strlen(v11);
LABEL_18:
v13 = v24;
v14 = v12 + v24;
if ( v12 + v24 <= v25 )
{
LABEL_19:
v24 = v14;
if ( !v12 )
{
LABEL_20:
if ( a1 > 9 )
goto LABEL_25;
v13 = v24;
v15 = v25;
goto LABEL_22;
}
v19 = &v26[v13];
LABEL_44:
memmove(v19, v11, v12);
goto LABEL_20;
}
LABEL_46:
fmt::internal::Array::grow(&v24, v14);
goto LABEL_19;
}
v13 = v24;
v15 = v25;
if ( v24 > v25 )
{
v14 = v24;
goto LABEL_46;
}
if ( a1 > 9 )
goto LABEL_25;
LABEL_22:
if ( v15 < v13 + 1 )
fmt::internal::Array::grow(&v24, v13 + 1);
v24 = v13 + 1;
v26[v13] = aAssertionFaile_0[72];
LABEL_25:
fmt::BasicWriter::FormatInt,char>>(&v24, a1);
v16 = v24;
if ( v24 + 1 > v25 )
fmt::internal::Array::grow(&v24, v24 + 1);
v26[v16] = 0;
*a3 = 0;
v17 = v26;
a3[1] = 0;
a3[2] = 0;
v20 = (char *)v17;
v18 = strlen(v17);
std::string::__init(a3, v20, v18);
LABEL_3:
if ( (v21 & 1) != 0 )
operator delete(v23);
if ( v26 != v27 && v26 )
operator delete[](v26);
return a3;
default:
LABEL_2:
*a3 = 0;
a3[1] = 0;
a3[2] = 0;
std::string::__init(a3, &byte_11B8890, 0);
goto LABEL_3;
}
}