//
// GameToolbox::intToShortString from 0x100048470 to 0x100048680 (528 bytes)
//
// 7 xrefs:
// > LevelListCell::loadFromList @ 0x100104618
// > LevelListCell::loadFromList @ 0x1001047bc
// > LevelCell::loadCustomLevelCell @ 0x10010e380
// > LevelCell::loadCustomLevelCell @ 0x10010e528
// > LevelListLayer::updateStatsArt @ 0x100245738
// > LevelListLayer::updateStatsArt @ 0x1002458d4
// > LevelListLayer::updateStatsArt @ 0x100245a34
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __usercall GameToolbox::intToShortString(__int64 a1@, _QWORD *a2@)
{
__int64 v2; // x20
__int64 v4; // x20
__int128 v5; // [xsp+0h] [xbp-260h] BYREF
int v6; // [xsp+10h] [xbp-250h]
char v7; // [xsp+14h] [xbp-24Ch]
__int128 v8; // [xsp+20h] [xbp-240h] BYREF
void *__p; // [xsp+30h] [xbp-230h]
_BYTE v10[512]; // [xsp+38h] [xbp-228h] BYREF
v2 = a1;
v8 = xmmword_1006350E0;
__p = v10;
if ( (a1 & 0x80000000) != 0 )
{
sub_10000CB18((__int64 *)&v8, "-", 0);
v2 = (unsigned int)-(int)v2;
}
if ( (unsigned int)v2 > 0x3E7 )
{
if ( (unsigned int)v2 >> 4 > 0x270 )
{
v5 = xmmword_100635440;
v6 = -1;
v7 = 0;
sub_100085BA4((int)&v8);
if ( (unsigned int)v2 > 0xF423F )
sub_10000CB18((__int64 *)&v8, "M", 0);
else
sub_10000CB18((__int64 *)&v8, "K", 0);
}
else
{
v5 = xmmword_100635440;
v6 = -1;
v7 = 0;
sub_100085BA4((int)&v8);
sub_10000CB18((__int64 *)&v8, "K", 0);
}
}
else
{
LODWORD(v5) = v2;
sub_100009A40((int)&v8, v2, (int)&v5);
}
v4 = v8;
if ( *((_QWORD *)&v8 + 1) < (unsigned __int64)(v8 + 1) )
sub_100009ED4((__int64)&v8, v8 + 1);
*((_BYTE *)__p + v4) = 0;
sub_100009900(a2, (char *)__p);
if ( __p != v10 )
{
if ( __p )
operator delete[](__p);
}
}