//
// GameToolbox::intToString from 0x587360 to 0x5874c0 (352 bytes)
//
// 80 xrefs:
// > CCCounterLabel::updateString @ 0x574970
// > GameToolbox::timestampToHumanReadable @ 0x587548
// > GameToolbox::timestampToHumanReadable @ 0x5875c8
// > GameToolbox::timestampToHumanReadable @ 0x587694
// > GameToolbox::timestampToHumanReadable @ 0x587714
// > GameToolbox::timestampToHumanReadable @ 0x5877a4
// > GameToolbox::pointsToString @ 0x58792c
// > GameToolbox::pointsToString @ 0x587bb4
// > FindBPMLayer::registerTouch @ 0x5c1d5c
// > PlayLayer::updateTimeLabel @ 0x5c9b54
// > PlayLayer::updateProgressbar @ 0x5cf13c
// > CommentCell::onGoToLevel @ 0x60baf8
// > LevelCell::loadCustomLevelCell @ 0x61136c
// > OptionsCell::loadFromObject @ 0x615f04
// > CommentCell::loadFromComment @ 0x617b28
// > LevelListCell::loadFromList @ 0x61f33c
// > LevelEditorLayer::updateObjectLabel @ 0x65f070
// > EditorUI::updateObjectInfoLabel @ 0x6bb9b4
// > EditorUI::setIDPopupClosed @ 0x6be748
// > LevelBrowserLayer::onMyOnlineLevels @ 0x6ec820
// > LevelBrowserLayer::onMyOnlineLevels @ 0x6ec8d0
// > GameLevelManager::writeSpecialFilters @ 0x6f5138
// > GameLevelManager::writeSpecialFilters @ 0x6f524c
// > GJLevelList::showListInfo @ 0x719588
// > GameLevelManager::createNewLevelList @ 0x71aec4
// > GameLevelManager::uploadLevelList @ 0x72d260
// > GameLevelManager::uploadLevelList @ 0x72d52c
// > GameLevelManager::deleteServerLevelList @ 0x72df34
// > GJLevelList::getListLevelsArray @ 0x730de8
// > GJLevelList::getListLevelsArray @ 0x730ecc
// > GJLevelList::getListLevelsArray @ 0x730f9c
// > GJLevelList::removeLevelFromList @ 0x73643c
// > GJLevelList::addLevelToList @ 0x736600
// > GameLevelManager::updateUserScore @ 0x737668
// > GameLevelManager::updateUserScore @ 0x7376ac
// > GameLevelManager::updateUserScore @ 0x7376f0
// > GameLevelManager::updateUserScore @ 0x7377b8
// > GameLevelManager::updateUserScore @ 0x7377fc
// > GameLevelManager::updateUserScore @ 0x737840
// > CustomSongWidget::updateMultiAssetInfo @ 0x746d78
// > CustomSongWidget::updateMultiAssetInfo @ 0x746e08
// > CustomSongWidget::updateMultiAssetInfo @ 0x746fb4
// > CustomSongWidget::updateMultiAssetInfo @ 0x74702c
// > LabelGameObject::updateLabel @ 0x761c98
// > GameStatsManager::getStatFromKey @ 0x7afa8c
// > GameStatsManager::tryFixPathBug @ 0x7b6b30
// > GameStatsManager::tryFixPathBug @ 0x7b6e00
// > GameStatsManager::trySelectActivePath @ 0x7b9d38
// > GameStatsManager::trySelectActivePath @ 0x7b9db8
// > GameStatsManager::incrementActivePath @ 0x7b9f14
// > InfoLayer::onCopyLevelID @ 0x7e1e98
// > GJRateLevelLayer::setupRateInfo @ 0x821e10
// > MusicDownloadManager::generateCustomContentURL @ 0x82ae68
// > MusicDownloadManager::generateCustomContentURL @ 0x82aec4
// > MusicDownloadManager::downloadCustomSong @ 0x82bb54
// > MusicDownloadManager::downloadSFX @ 0x82c700
// > MusicDownloadManager::pathForSFX @ 0x82f1a4
// > MusicDownloadManager::pathForSong @ 0x82f99c
// > CustomizeObjectLayer::updateKerningLabel @ 0x8401f8
// > GJBaseGameLayer::updatePlatformerTime @ 0x87a694
// > GJBaseGameLayer::updateSpecialLabels @ 0x87aa50
// > GJBaseGameLayer::updateTimerLabels @ 0x88fe4c
// > SetupInstantCollisionTriggerPopup::updateSpecialNodes @ 0x952120
// > SetupInstantCollisionTriggerPopup::updateSpecialNodes @ 0x952244
// > SetupAreaMoveTriggerPopup::updateEnterTargetIDState @ 0xa0969c
// > SetupAdvFollowPopup::init @ 0xa18fb4
// > LevelSettingsLayer::init @ 0xa37340
// > LevelSettingsLayer::init @ 0xa375c0
// > getItemVarName @ 0xa4921c
// > SelectEventLayer::addToggle @ 0xa544d8
// > GJPathSprite::addRankLabel @ 0xa6e494
// > LevelListLayer::onRefreshLevelList @ 0xa7346c
// > UploadListPopup::listUploadFailed @ 0xa73e84
// > LevelListLayer::updateStatsArt @ 0xa75504
// > LevelListLayer::init @ 0xa75c60
// > AudioAssetsBrowser::onInfo @ 0xa8ebe8
// > AudioAssetsBrowser::onInfo @ 0xa8ec54
// > AudioAssetsBrowser::onInfo @ 0xa8ed04
// > AudioAssetsBrowser::onInfo @ 0xa8ed70
// > ??> @ 0x7bed0
//
// 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
//
__int64 *__usercall GameToolbox::intToString@(__int64 *__return_ptr a1@, GameToolbox *this@)
{
size_t v3; // x24
unsigned __int64 v4; // x0
_BYTE *v5; // x0
_BYTE *v7; // x0
_BYTE *v8; // x23
void *v9; // x1
size_t v10; // [xsp+48h] [xbp+48h] BYREF
unsigned __int64 v11; // [xsp+50h] [xbp+50h]
_BYTE *v12; // [xsp+58h] [xbp+58h]
_BYTE v13[504]; // [xsp+60h] [xbp+60h] BYREF
v10 = 0;
v12 = v13;
v11 = 500;
fmt::BasicWriter::FormatInt,char>>(&v10, (unsigned int)this);
v3 = v10;
v4 = v10 + 1;
if ( v10 + 1 > v11 )
{
if ( v11 + (v11 >> 1) >= v4 )
v4 = v11 + (v11 >> 1);
v11 = v4;
v7 = (_BYTE *)operator new[](v4);
v8 = v7;
v9 = v12;
if ( v10 )
{
memmove(v7, v12, v10);
v9 = v12;
if ( v12 != v13 )
{
LABEL_11:
if ( v9 )
operator delete[](v9);
}
}
else if ( v12 != v13 )
{
goto LABEL_11;
}
v12 = v8;
v5 = v8;
goto LABEL_3;
}
v5 = v12;
LABEL_3:
v5[v3] = 0;
sub_D153B8((int)a1, v12);
if ( v12 != v13 && v12 )
operator delete[](v12);
return a1;
}