//
// GameToolbox::intToString from 0x1004f4870 to 0x1004f4a16 (422 bytes)
//
// 144 xrefs:
// > EditorUI::updateObjectInfoLabel @ 0x10000f590
// > EditorUI::updateObjectInfoLabel @ 0x10000f671
// > EditorUI::updateObjectInfoLabel @ 0x10000f744
// > EditorUI::updateObjectInfoLabel @ 0x10000f822
// > EditorUI::updateObjectInfoLabel @ 0x10000f8f1
// > EditorUI::setIDPopupClosed @ 0x100010346
// > GameStatsManager::incrementStat @ 0x10002c7c1
// > GameStatsManager::incrementActivePath @ 0x100030f78
// > GameStatsManager::trySelectActivePath @ 0x100031273
// > GameStatsManager::trySelectActivePath @ 0x1000312de
// > GameStatsManager::trySelectActivePath @ 0x10003133d
// > GameStatsManager::trySelectActivePath @ 0x10003139c
// > GameStatsManager::trySelectActivePath @ 0x1000313fb
// > GameStatsManager::trySelectActivePath @ 0x10003145a
// > GameStatsManager::trySelectActivePath @ 0x1000314b9
// > GameStatsManager::trySelectActivePath @ 0x100031518
// > GameStatsManager::trySelectActivePath @ 0x100031577
// > GameStatsManager::trySelectActivePath @ 0x1000315d6
// > GameStatsManager::trySelectActivePath @ 0x100031631
// > GameStatsManager::tryFixPathBug @ 0x1000317b2
// > GameStatsManager::tryFixPathBug @ 0x1000317f5
// > GameStatsManager::tryFixPathBug @ 0x100031950
// > GameStatsManager::tryFixPathBug @ 0x100031989
// > GameStatsManager::tryFixPathBug @ 0x1000319be
// > GameStatsManager::tryFixPathBug @ 0x1000319f3
// > GameStatsManager::tryFixPathBug @ 0x100031a28
// > GameStatsManager::tryFixPathBug @ 0x100031a5d
// > GameStatsManager::tryFixPathBug @ 0x100031a92
// > GameStatsManager::tryFixPathBug @ 0x100031ac7
// > GameStatsManager::tryFixPathBug @ 0x100031afc
// > GameStatsManager::tryFixPathBug @ 0x100031b31
// > GameStatsManager::tryFixPathBug @ 0x100031cfa
// > GameStatsManager::tryFixPathBug @ 0x100031d6d
// > GameStatsManager::tryFixPathBug @ 0x100031da8
// > GameStatsManager::getStatFromKey @ 0x100031f80
// > GameStatsManager::verifyPathAchievements @ 0x100032225
// > GameStatsManager::dataLoaded @ 0x100054642
// > GameStatsManager::dataLoaded @ 0x100054687
// > PlayLayer::updateProgressbar @ 0x10007f0a2
// > PlayLayer::updateTimeLabel @ 0x100087155
// > LevelEditorLayer::updateObjectLabel @ 0x1000bcb09
// > GJBaseGameLayer::updateTimerLabels @ 0x10012b770
// > GJBaseGameLayer::updateSpecialLabels @ 0x100134174
// > GJBaseGameLayer::updatePlatformerTime @ 0x10013466e
// > LabelGameObject::updateLabel_1 @ 0x1001a2154
// > CustomizeObjectLayer::updateKerningLabel @ 0x1001da39a
// > sub_100229CF0 @ 0x100229df9
// > LevelListCell::loadFromList @ 0x10022b399
// > CommentCell::loadFromComment @ 0x10022e7be
// > LevelCell::loadCustomLevelCell @ 0x1002374a0
// > CommentCell::onGoToLevel @ 0x10023de79
// > CommentCell::onGoToLevel @ 0x10023deea
// > LevelSettingsLayer::init @ 0x10025724f
// > LevelSettingsLayer::init @ 0x10025750b
// > GJPathSprite::addRankLabel @ 0x1002edb86
// > SetupAdvFollowPopup::init @ 0x1002f0d0c
// > SetupAdvFollowPopup::init @ 0x1002f0e5d
// > SetupAdvFollowPopup::init @ 0x1002f0fb1
// > LevelListLayer::init @ 0x1003473f1
// > LevelListLayer::onRefreshLevelList @ 0x100348ef7
// > LevelListLayer::updateStatsArt @ 0x10034a48a
// > UploadListPopup::listUploadFailed @ 0x10034fc79
// > SetupCollisionTriggerPopup::updateSpecialNodes @ 0x100380c65
// > SetupCollisionTriggerPopup::updateSpecialNodes @ 0x100380cf1
// > SetupInstantCollisionTriggerPopup::updateSpecialNodes @ 0x1003816d0
// > SetupInstantCollisionTriggerPopup::updateSpecialNodes @ 0x100381729
// > LevelBrowserLayer::onMyOnlineLevels @ 0x100483060
// > LevelBrowserLayer::onMyOnlineLevels @ 0x100483086
// > SetupAreaMoveTriggerPopup::updateEnterTargetIDState @ 0x1004d02fc
// > GameToolbox::timestampToHumanReadable @ 0x1004f58cd
// > GameToolbox::timestampToHumanReadable @ 0x1004f591a
// > GameToolbox::timestampToHumanReadable @ 0x1004f5967
// > GameToolbox::timestampToHumanReadable @ 0x1004f59b4
// > GameToolbox::timestampToHumanReadable @ 0x1004f59f0
// > sub_1004F5CB0 @ 0x1004f5d13
// > sub_1004F5CB0 @ 0x1004f5d55
// > sub_1004F5CB0 @ 0x1004f5d73
// > GameToolbox::pointsToString @ 0x1004f5fdb
// > GameToolbox::pointsToString @ 0x1004f5ff2
// > GJRateLevelLayer::setupRateInfo @ 0x1005059f0
// > sub_1005070C0 @ 0x100507a67
// > FindBPMLayer::registerTouch @ 0x10050eef0
// > CCCounterLabel::updateString @ 0x100512a01
// > GameLevelManager::createNewLevelList @ 0x10053f2cc
// > GameLevelManager::uploadDeathData @ 0x1005521d3
// > GameLevelManager::uploadDeathData @ 0x1005522f7
// > GameLevelManager::uploadDeathData @ 0x10055233b
// > GameLevelManager::uploadDeathData @ 0x100552540
// > GameLevelManager::uploadDeathData @ 0x10055258a
// > sub_100553F20 @ 0x10055414d
// > sub_100553F20 @ 0x1005541d3
// > sub_100553F20 @ 0x100554250
// > GameLevelManager::writeSpecialFilters @ 0x1005580f7
// > GameLevelManager::writeSpecialFilters @ 0x10055817d
// > GameLevelManager::writeSpecialFilters @ 0x10055820b
// > GameLevelManager::uploadLevelList @ 0x100559b99
// > GameLevelManager::uploadLevelList @ 0x10055a090
// > GameLevelManager::deleteServerLevelList @ 0x10055a92c
// > GameLevelManager::updateUserScore @ 0x100563b55
// > GameLevelManager::updateUserScore @ 0x100563bac
// > GameLevelManager::updateUserScore @ 0x100563bff
// > GameLevelManager::updateUserScore @ 0x100563de2
// > GameLevelManager::updateUserScore @ 0x100563e34
// > GameLevelManager::updateUserScore @ 0x100563e87
// > GJGameLevel::encodeWithCoder @ 0x10058b15c
// > GJGameLevel::encodeWithCoder @ 0x10058b1a1
// > GJLevelList::getListLevelsArray @ 0x10058ef28
// > GJLevelList::getListLevelsArray @ 0x10058ef98
// > GJLevelList::getListLevelsArray @ 0x10058f067
// > GJLevelList::addLevelToList @ 0x10058f2f2
// > GJLevelList::removeLevelFromList @ 0x10058f63e
// > GJLevelList::showListInfo @ 0x10058fa6c
// > SelectEventLayer::addToggle @ 0x1005a730c
// > sub_1005ACEB0 @ 0x1005acf02
// > MusicDownloadManager::pathForSong @ 0x10064eb1d
// > MusicDownloadManager::downloadCustomSong @ 0x10064f1f1
// > MusicDownloadManager::pathForSFX @ 0x10065017c
// > MusicDownloadManager::generateCustomContentURL @ 0x1006596ec
// > MusicDownloadManager::generateCustomContentURL @ 0x100659782
// > MusicDownloadManager::downloadSFX @ 0x10065eca6
// > MusicSearchResult::getFilesMatchingSearch @ 0x1006689d1
// > sub_1006D9620 @ 0x1006d963b
// > CustomSongWidget::updateMultiAssetInfo @ 0x1006fc1f1
// > CustomSongWidget::updateMultiAssetInfo @ 0x1006fc231
// > CustomSongWidget::updateMultiAssetInfo @ 0x1006fc371
// > CustomSongWidget::updateMultiAssetInfo @ 0x1006fc3b1
// > InfoLayer::onCopyLevelID @ 0x1008959cc
// > AudioAssetsBrowser::onInfo @ 0x100899a7c
// > AudioAssetsBrowser::onInfo @ 0x100899abb
// > AudioAssetsBrowser::onInfo @ 0x100899bdd
// > AudioAssetsBrowser::onInfo @ 0x100899c1c
// > sub_1008C8B30 @ 0x1008c8f70
// > sub_1008CD070 @ 0x1008cd1b8
// > sub_1008CD4B0 @ 0x1008cd516
// > sub_1008CFE20 @ 0x1008cfe51
// > sub_1008D16E0 @ 0x1008d1748
// > sub_1008D16E0 @ 0x1008d17a9
// > sub_1008D16E0 @ 0x1008d17e1
// > sub_1008D16E0 @ 0x1008d1809
// > sub_1008D16E0 @ 0x1008d1841
// > sub_100907740 @ 0x1009078bf
// > AccountReviewPopup::onJumpRow @ 0x1009a1a26
// > sub_1009A4070 @ 0x1009a40e6
// > sub_1009A4070 @ 0x1009a414b
//
// This function is hookable on this platform (idp: pc, 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:31:26 +0000
//
size_t *__fastcall GameToolbox::intToString(size_t *a1, int a2)
{
size_t v3; // r14
size_t v4; // rdi
void *v5; // rax
void *v6; // r15
_BYTE *v7; // r12
void *v8; // r15
size_t v9; // rax
size_t v10; // r14
void *v11; // r12
size_t v12; // r13
size_t __len; // [rsp+0h] [rbp-240h] BYREF
size_t v15; // [rsp+8h] [rbp-238h]
void *__src; // [rsp+10h] [rbp-230h]
_BYTE v17[504]; // [rsp+18h] [rbp-228h] BYREF
__len = 0;
v15 = 500;
__src = v17;
sub_100032CB0((__int64)&__len, a2);
v3 = __len;
if ( v15 >= __len + 1 )
{
v6 = __src;
}
else
{
v4 = v15 + (v15 >> 1);
if ( v4 <= __len + 1 )
v4 = __len + 1;
v15 = v4;
v5 = operator new[](v4);
v6 = v5;
v7 = __src;
if ( v3 )
memmove(v5, __src, v3);
if ( v7 != v17 && v7 != nullptr )
operator delete[](v7);
__src = v6;
}
*((_BYTE *)v6 + v3) = 0;
v8 = __src;
v9 = strlen((const char *)__src);
if ( v9 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v10 = v9;
if ( v9 >= 0x17 )
{
v12 = 26;
if ( (v9 | 7) != 0x17 )
v12 = (v9 | 7) + 1;
v11 = operator new(v12);
a1[2] = (size_t)v11;
*a1 = v12 | 1;
a1[1] = v10;
goto LABEL_17;
}
*(_BYTE *)a1 = 2 * v9;
v11 = (char *)a1 + 1;
if ( v9 )
LABEL_17:
memmove(v11, v8, v10);
*((_BYTE *)v11 + v10) = 0;
if ( __src != v17 && __src != nullptr )
operator delete[](__src);
return a1;
}