//
// sub_100009ED4 from 0x100009ed4 to 0x100009f48 (116 bytes)
//
// 116 xrefs:
// > sub_100004000 @ 0x100004090
// > sub_100009AD4 @ 0x100009b34
// > sub_100009C3C @ 0x100009cb8
// > sub_100009C3C @ 0x100009d24
// > sub_100009C3C @ 0x100009d84
// > sub_100009C3C @ 0x100009dc8
// > sub_100009C3C @ 0x100009e00
// > sub_10000C7F0 @ 0x10000ca94
// > sub_10000CB18 @ 0x10000cb6c
// > GJEffectManager::getPersistentStateString @ 0x1000157d4
// > GJEffectManager::getSaveString @ 0x100016654
// > GameToolbox::stringFromHSV @ 0x100045478
// > GameToolbox::saveParticleToString @ 0x100046eec
// > GameToolbox::intToString @ 0x1000483f4
// > GameToolbox::intToShortString @ 0x100048624
// > CCPartAnimSprite::initWithAnimDesc @ 0x10007e750
// > sub_100085BA4 @ 0x100085c88
// > sub_100085BA4 @ 0x100085dac
// > sub_100085BA4 @ 0x100085e1c
// > sub_100085BA4 @ 0x100085ee4
// > sub_100086008 @ 0x100086054
// > sub_100086008 @ 0x1000860b4
// > GameLevelManager::getDemonLevelsString @ 0x100097a1c
// > GameLevelManager::getStarLevelsString @ 0x100098374
// > GJGameLevel::savePercentage @ 0x1000ac964
// > GJGameLevel::scoreVectorToString @ 0x1000ad3f8
// > GJLevelList::updateLevelsString @ 0x1000b15fc
// > AchievementManager::achievementForUnlock @ 0x1000e878c
// > PlayLayer::updateInfoLabel @ 0x100118158
// > DS_Dictionary::setIntegerForKey @ 0x100161ee4
// > DS_Dictionary::setFloatForKey @ 0x100162260
// > GJBaseGameLayer::getCapacityString @ 0x1001e2ef8
// > GJBaseGameLayer::getGroupParentsString @ 0x1001f2bd8
// > GJBaseGameLayer::updateCounters @ 0x1001fb780
// > GJBaseGameLayer::updateTimerLabels @ 0x1001fc5bc
// > GJBaseGameLayer::refreshCounterLabels @ 0x1001fc864
// > GJBaseGameLayer::getRecordString @ 0x100201d08
// > GJBaseGameLayer::getParticleKey @ 0x10020447c
// > sub_10021717C @ 0x10021731c
// > GameObject::getGroupString @ 0x10025d7dc
// > GameObject::getColorKey @ 0x10025df64
// > GameObject::getSaveString @ 0x100260c68
// > EnhancedGameObject::getSaveString @ 0x100264cec
// > TextGameObject::getSaveString @ 0x100265418
// > GameObject::perspectiveFrame @ 0x1002ae4b0
// > SecretRewardsLayer::generateChestItems @ 0x1002eae3c
// > SimplePlayer::init @ 0x1003070c8
// > GameManager::iconKey @ 0x1003129cc
// > GameManager::colorKey @ 0x100312dd8
// > GameManager::sheetNameForIcon @ 0x100317984
// > GameManager::saveDPadLayout @ 0x10031a79c
// > GameManager::saveDPadLayout @ 0x10031a84c
// > GameManager::saveDPadLayout @ 0x10031a86c
// > GameManager::saveDPadLayout @ 0x10031a88c
// > GameManager::saveDPadLayout @ 0x10031a8ac
// > GameManager::saveDPadLayout @ 0x10031a8cc
// > GameManager::dpadConfigToString @ 0x10031abf8
// > CurrencyRewardLayer::incrementCount @ 0x1003215c8
// > CurrencyRewardLayer::incrementStarsCount @ 0x1003216d4
// > CurrencyRewardLayer::incrementMoonsCount @ 0x1003217e0
// > CurrencyRewardLayer::incrementDiamondsCount @ 0x1003218ec
// > CurrencyRewardLayer::incrementSpecialCount2 @ 0x1003219f8
// > CurrencyRewardLayer::incrementSpecialCount1 @ 0x100321b04
// > SpriteAnimationManager::loadAnimations @ 0x100323824
// > GameStatsManager::getItemKey @ 0x10032bc58
// > GameStatsManager::getPathRewardKey @ 0x100330390
// > GameStatsManager::getLevelKey @ 0x100330940
// > GameStatsManager::getRewardKey @ 0x100333450
// > GameStatsManager::getGauntletRewardKey @ 0x100336508
// > GameStatsManager::getSecretOnlineRewardKey @ 0x100336c84
// > LevelSettingsObject::getSaveString @ 0x10035d508
// > LevelEditorLayer::getLockedLayers @ 0x10035d668
// > LevelEditorLayer::getSongIDs @ 0x10035d8b4
// > LevelEditorLayer::getSFXIDs @ 0x10035db14
// > LevelEditorLayer::getSavedEditorPositions @ 0x10035dc98
// > EnterEffectObject::getSaveString @ 0x100372448
// > EffectGameObject::getSaveString @ 0x1003745c0
// > GradientTriggerObject::getSaveString @ 0x10037ad88
// > ShaderGameObject::getSaveString @ 0x10037c0d8
// > AdvancedFollowTriggerObject::getSaveString @ 0x10037e828
// > AdvancedFollowEditObject::getSaveString @ 0x10037fb18
// > GameOptionsTrigger::getSaveString @ 0x1003803ac
// > SmartGameObject::getSaveString @ 0x100380a20
// > ParticleGameObject::getSaveString @ 0x1003821b4
// > SpecialAnimGameObject::getSaveString @ 0x100382470
// > RingObject::getSaveString @ 0x100382ac8
// > DashRingObject::getSaveString @ 0x100383030
// > KeyframeAnimTriggerObject::getSaveString @ 0x100386f18
// > EnhancedTriggerObject::getSaveString @ 0x100387410
// > TeleportPortalObject::getSaveString @ 0x10038842c
// > LabelGameObject::updatePreviewLabel @ 0x100388f4c
// > LabelGameObject::getSaveString @ 0x100389674
// > RandTriggerGameObject::getSaveString @ 0x10038a078
// > SequenceTriggerGameObject::getSaveString @ 0x10038abe4
// > KeyframeGameObject::getSaveString @ 0x10038becc
// > SFXTriggerGameObject::getSaveString @ 0x10038d228
// > SongTriggerGameObject::getSaveString @ 0x10038defc
// > EventLinkTrigger::getSaveString @ 0x10038e578
// > SpawnTriggerGameObject::getSaveString @ 0x10038f6b8
// > CheckpointGameObject::getSaveString @ 0x100390594
// > CountTriggerGameObject::getSaveString @ 0x100391370
// > TransformTriggerGameObject::getSaveString @ 0x100391de0
// > EndTriggerGameObject::getSaveString @ 0x100392284
// > UISettingsGameObject::getSaveString @ 0x10039283c
// > CameraTriggerGameObject::getSaveString @ 0x1003939d4
// > TimerTriggerGameObject::getSaveString @ 0x100394804
// > ItemTriggerGameObject::getSaveString @ 0x100395b2c
// > AudioLineGuideGameObject::getSaveString @ 0x1003965e4
// > ForceBlockGameObject::getSaveString @ 0x100396b8c
// > ArtTriggerGameObject::getSaveString @ 0x1003971b8
// > PlayerControlGameObject::getSaveString @ 0x1003976ec
// > ObjectControlGameObject::getSaveString @ 0x100397ae4
// > TriggerControlGameObject::getSaveString @ 0x100397e9c
// > SpawnParticleGameObject::getSaveString @ 0x10039872c
// > RotateGameplayGameObject::getSaveString @ 0x100399088
// > EditorUI::copyObjects @ 0x1003e89d4
//
// 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 __fastcall sub_100009ED4(__int64 a1, size_t a2)
{
size_t v3; // x0
void *v4; // x0
void *v5; // x20
void *v6; // x21
if ( *(_QWORD *)(a1 + 8) + (*(_QWORD *)(a1 + 8) >> 1) <= a2 )
v3 = a2;
else
v3 = *(_QWORD *)(a1 + 8) + (*(_QWORD *)(a1 + 8) >> 1);
*(_QWORD *)(a1 + 8) = v3;
v4 = operator new[](v3);
v5 = v4;
v6 = *(void **)(a1 + 16);
if ( *(_QWORD *)a1 )
memmove(v4, *(const void **)(a1 + 16), *(_QWORD *)a1);
if ( v6 != (void *)(a1 + 24) && v6 != nullptr )
operator delete[](v6);
*(_QWORD *)(a1 + 16) = v5;
}