//
// artIconForKey from 0xb7251c to 0xb72608 (236 bytes)
//
// 3 xrefs:
// > SetupArtSwitchPopup::selectArtClosed @ 0xb72668
// > SetupArtSwitchPopup::init @ 0xb7aab4
// > ??> @ 0x1039f0
//
// 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 13:02:21 +0000
//
__int64 *__usercall artIconForKey@(int a1@, int a2@, __int64 *a3@)
{
unsigned __int64 v5; // x1
char *v6; // x0
cocos2d::CCString *v7; // x0
const char *CString; // x0
size_t v9; // x0
char *v10; // [xsp+28h] [xbp+28h]
if ( a2 == 1 )
{
if ( a1 > 22 )
LODWORD(v5) = 22;
else
LODWORD(v5) = a1;
v6 = "gIcon_%02d_001.png";
if ( (int)v5 <= 0 )
v5 = 1;
else
v5 = (unsigned int)v5;
}
else if ( a2 == 2 )
{
if ( a1 > 3 )
LODWORD(v5) = 3;
else
LODWORD(v5) = a1;
v6 = "mgIcon_%02d_001.png";
if ( (v5 & 0x80000000) != 0LL )
v5 = 0;
else
v5 = (unsigned int)v5;
}
else
{
if ( a2 )
{
*a3 = 0;
a3[1] = 0;
a3[2] = 0;
std::string::__init(a3, "mgIcon_00_001.png", 0x11u);
return a3;
}
if ( a1 > 59 )
LODWORD(v5) = 59;
else
LODWORD(v5) = a1;
v6 = "bgIcon_%02d_001.png";
if ( (int)v5 <= 0 )
v5 = 1;
else
v5 = (unsigned int)v5;
}
v7 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)v6, (const char *)v5);
CString = (const char *)cocos2d::CCString::getCString(v7);
*a3 = 0;
a3[1] = 0;
a3[2] = 0;
v10 = (char *)CString;
v9 = strlen(CString);
std::string::__init(a3, v10, v9);
return a3;
}