//
// sub_14005E430 from 0x14005e430 to 0x14005e48c (92 bytes)
//
// 211 xrefs:
// > FMODAudioEngine::stopAllMusic @ 0x140059e96
// > sub_14005D160 @ 0x14005d160
// > sub_140083690 @ 0x140083761
// > sub_140083690 @ 0x14008376d
// > CustomSongWidget::onInfo @ 0x1400c9ed5
// > CustomSongWidget::onInfo @ 0x1400c9ee0
// > sub_140142070 @ 0x1401420cc
// > sub_14017B0A0 @ 0x14017b1a2
// > sub_140204400 @ 0x140204410
// > sub_140204FB0 @ 0x14020509c
// > sub_140204FB0 @ 0x1402050a8
// > sub_140204FB0 @ 0x140205143
// > GJBaseGameLayer::dGJBaseGameLayer @ 0x140205f67
// > GJBaseGameLayer::dGJBaseGameLayer @ 0x140205fd0
// > GJBaseGameLayer::dGJBaseGameLayer @ 0x140206035
// > GJBaseGameLayer::dGJBaseGameLayer @ 0x1402060a4
// > GJBaseGameLayer::dGJBaseGameLayer @ 0x140206a22
// > GJBaseGameLayer::addRemapTargets @ 0x14020dece
// > GJBaseGameLayer::addCustomEnterEffect @ 0x14020e576
// > GJBaseGameLayer::stopCustomEnterEffect @ 0x14020e8e7
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x14021a7d5
// > GJBaseGameLayer::addAreaEffect @ 0x1402275d6
// > GJBaseGameLayer::controlAreaEffectWithID @ 0x140227920
// > GJBaseGameLayer::controlAreaEffect @ 0x140227ab0
// > GJBaseGameLayer::gameEventTriggered @ 0x1402320c9
// > GJBaseGameLayer::activateEventTrigger @ 0x14023225c
// > GJBaseGameLayer::controlEventLink @ 0x140232485
// > GJBaseGameLayer::activatePersistentItemTrigger @ 0x140234cdd
// > GJBaseGameLayer::resetLevelVariables @ 0x14023b5b7
// > sub_14024A010 @ 0x14024a047
// > sub_14024A170 @ 0x14024a197
// > sub_14024BCB0 @ 0x14024bce7
// > sub_14024C6E0 @ 0x14024c747
// > sub_14024CAF0 @ 0x14024cbbd
// > sub_14024CAF0 @ 0x14024cc8d
// > sub_140250290 @ 0x1402502b7
// > sub_140250F30 @ 0x140250f46
// > sub_1402520F0 @ 0x1402522ca
// > sub_1402520F0 @ 0x14025236e
// > sub_1402520F0 @ 0x1402523e9
// > sub_1402526C0 @ 0x14025282a
// > sub_140253930 @ 0x140253977
// > sub_140253A30 @ 0x140253a5b
// > sub_1402541E0 @ 0x140254398
// > sub_1402541E0 @ 0x1402543e0
// > sub_1402541E0 @ 0x14025445e
// > sub_1402541E0 @ 0x1402544a4
// > sub_140254860 @ 0x140254879
// > sub_140254AF0 @ 0x140254b0a
// > sub_140254B40 @ 0x140254b67
// > sub_140255660 @ 0x1402556b2
// > sub_140257F30 @ 0x140257f34
// > sub_140258010 @ 0x140258014
// > sub_140258020 @ 0x140258024
// > sub_140258030 @ 0x140258034
// > sub_140258040 @ 0x140258044
// > sub_14025A480 @ 0x14025a526
// > sub_14025A480 @ 0x14025a57f
// > sub_14025A480 @ 0x14025a9f9
// > sub_14025A480 @ 0x14025aaad
// > GJEffectManager::reset @ 0x14025b257
// > GJEffectManager::resetEffects @ 0x14025c0ab
// > GJEffectManager::resetEffects @ 0x14025c0e4
// > GJEffectManager::resetEffects @ 0x14025c117
// > GJEffectManager::resetEffects @ 0x14025c224
// > GJEffectManager::handleObjectCollision @ 0x14025c61d
// > GJEffectManager::controlActionsForControlID @ 0x14025dbbd
// > GJEffectManager::controlActionsForControlID @ 0x14025dcf8
// > GJEffectManager::controlActionsForControlID @ 0x14025de27
// > GJEffectManager::controlActionsForControlID @ 0x14025df45
// > GJEffectManager::controlActionsForControlID @ 0x14025e011
// > GJEffectManager::controlActionsForControlID @ 0x14025e326
// > GJEffectManager::controlActionsForTrigger @ 0x14025e4f7
// > GJEffectManager::controlActionsForTrigger @ 0x14025e88a
// > GJEffectManager::controlActionsForTrigger @ 0x14025e9bd
// > GJEffectManager::controlActionsForTrigger @ 0x14025eafe
// > GJEffectManager::controlActionsForTrigger @ 0x14025ec3d
// > GJEffectManager::controlActionsForTrigger @ 0x14025edb6
// > GJEffectManager::resetTempGroupCommands @ 0x14025f392
// > GJEffectManager::prepareMoveActions @ 0x1402604f8
// > GJEffectManager::postMoveActions @ 0x1402608f6
// > GJEffectManager::updateSpawnTriggers @ 0x140261ecb
// > GJEffectManager::updateSpawnTriggers @ 0x140261fa7
// > GJEffectManager::playerButton @ 0x14026230e
// > GJEffectManager::updateCountForItem @ 0x1402627c9
// > GJEffectManager::updateCountForItem @ 0x14026283c
// > GJEffectManager::getPersistentStateString @ 0x140262b93
// > GJEffectManager::getPersistentStateString @ 0x140262dac
// > GJEffectManager::startTimer @ 0x14026308d
// > GJEffectManager::updateTimers @ 0x140263587
// > GJEffectManager::updateTimers @ 0x140263748
// > GJEffectManager::updateTimers @ 0x1402638e6
// > sub_140264F90 @ 0x140264ff7
// > sub_140265060 @ 0x140265097
// > sub_140265D60 @ 0x140265e2d
// > sub_140265D60 @ 0x140265efd
// > sub_140266150 @ 0x140266187
// > sub_140266220 @ 0x14026624b
// > sub_1402662E0 @ 0x14026630b
// > sub_1402663A0 @ 0x1402663cb
// > sub_140266AE0 @ 0x140266b92
// > sub_140267A80 @ 0x140267aa4
// > sub_140267AD0 @ 0x140267b77
// > sub_140267AD0 @ 0x140267d38
// > sub_140267D90 @ 0x140267da9
// > sub_140267E60 @ 0x140267efa
// > sub_140267E60 @ 0x1402680fa
// > sub_140268130 @ 0x140268149
// > sub_140268170 @ 0x140268214
// > sub_140268170 @ 0x140268459
// > sub_1402684A0 @ 0x1402684b9
// > sub_1402684E0 @ 0x140268584
// > sub_1402684E0 @ 0x1402687fb
// > sub_140268840 @ 0x1402688e4
// > sub_140268840 @ 0x140268b64
// > sub_140269700 @ 0x14026983b
// > sub_140269700 @ 0x1402698aa
// > sub_14026ADD0 @ 0x14026ae0a
// > sub_14026AF50 @ 0x14026af66
// > sub_14026B070 @ 0x14026b244
// > sub_14026B310 @ 0x14026b507
// > sub_14026C2B0 @ 0x14026c484
// > sub_14026C550 @ 0x14026c6ea
// > sub_14026C7B0 @ 0x14026c954
// > sub_14026C9F0 @ 0x14026cb8e
// > sub_14026C9F0 @ 0x14026cc80
// > sub_14026CCB0 @ 0x14026ce6b
// > sub_14026D810 @ 0x14026d82a
// > sub_14026D850 @ 0x14026d86a
// > sub_14026D890 @ 0x14026d8aa
// > sub_14026D8D0 @ 0x14026d8f7
// > sub_14026D920 @ 0x14026d95a
// > sub_14026DAB0 @ 0x14026dad7
// > sub_14026E210 @ 0x14026e229
// > sub_14026E250 @ 0x14026e473
// > sub_14026EC90 @ 0x14026ed34
// > sub_14026EC90 @ 0x14026efab
// > sub_14026EFF0 @ 0x14026f074
// > sub_14026EFF0 @ 0x14026f2f4
// > sub_14026F4B0 @ 0x14026f4ca
// > sub_14026F920 @ 0x14026fa59
// > sub_1402D1570 @ 0x1402d1a5c
// > sub_1402D1570 @ 0x1402d1abd
// > sub_1402D1570 @ 0x1402d1ac9
// > sub_1402D1570 @ 0x1402d1b2e
// > sub_1402D1570 @ 0x1402d1b3a
// > sub_1402D1570 @ 0x1402d1b46
// > sub_1402E2370 @ 0x1402e2e82
// > sub_1402E3B00 @ 0x1402e416f
// > ExplodeItemNode::createSprites @ 0x140384ea6
// > ExplodeItemNode::createSprites @ 0x140384eb0
// > ExplodeItemNode::createSprites @ 0x140384ebb
// > ExplodeItemNode::createSprites @ 0x140384ec5
// > PlayerObject::dPlayerObject @ 0x14038664d
// > sub_1403A5120 @ 0x1403a518e
// > PlayLayer::dPlayLayer @ 0x1403a59c7
// > PlayLayer::dPlayLayer @ 0x1403a59d3
// > PlayLayer::destroyPlayer @ 0x1403b3b27
// > sub_1403BC090 @ 0x1403bc137
// > sub_1403BC090 @ 0x1403bc2f7
// > sub_1403BC9F0 @ 0x1403bcb37
// > sub_1403BC9F0 @ 0x1403bcbaa
// > sub_1403BD540 @ 0x1403bd57a
// > SecretRewardsLayer::generateChestItems @ 0x1403d60ad
// > sub_1403F3740 @ 0x1403f3841
// > sub_140496210 @ 0x14049624c
// > EffectGameObject::triggerObject @ 0x1404a6112
// > EffectGameObject::triggerObject @ 0x1404a6630
// > EffectGameObject::triggerObject @ 0x1404a6a9d
// > EffectGameObject::triggerObject @ 0x1404a6ab1
// > EffectGameObject::triggerObject @ 0x1404a6cee
// > EffectGameObject::triggerObject @ 0x1404a6d01
// > EffectGameObject::triggerObject @ 0x1404a703e
// > EffectGameObject::triggerObject @ 0x1404a70ff
// > EffectGameObject::triggerObject @ 0x1404a7113
// > EffectGameObject::triggerObject @ 0x1404a721b
// > EffectGameObject::triggerObject @ 0x1404a72f5
// > EffectGameObject::triggerObject @ 0x1404a7309
// > EffectGameObject::triggerObject @ 0x1404a758a
// > EffectGameObject::triggerObject @ 0x1404a759d
// > EffectGameObject::triggerObject @ 0x1404a7930
// > EffectGameObject::triggerObject @ 0x1404a7d3d
// > EffectGameObject::triggerObject @ 0x1404a7d51
// > EffectGameObject::triggerObject @ 0x1404a7d65
// > EffectGameObject::triggerObject @ 0x1404a7d79
// > EffectGameObject::triggerObject @ 0x1404a7e6b
// > RandTriggerGameObject::triggerObject @ 0x1404b4394
// > EventLinkTrigger::triggerObject @ 0x1404b895e
// > CountTriggerGameObject::triggerObject @ 0x1404bb651
// > EndTriggerGameObject::triggerObject @ 0x1404bcda8
// > TimerTriggerGameObject::triggerObject @ 0x1404bf2d1
// > ItemTriggerGameObject::triggerObject @ 0x1404bfe13
// > sub_1404F883C @ 0x1404f884a
// > int `_wcstombs_l_helper @ 0x1404feb53
// > sub_14050066D @ 0x14050067b
// > sub_1405009F6 @ 0x140500a04
// > sub_140507330 @ 0x140507337
// > sub_14050733C @ 0x140507343
// > sub_140507348 @ 0x14050734f
// > sub_140507354 @ 0x14050735b
// > sub_1405073F8 @ 0x140507406
// > sub_140507FF1 @ 0x140507fff
// > sub_140508004 @ 0x14050800b
// > sub_14050920B @ 0x140509219
// > ??> @ 0x14068be4a
// > ??> @ 0x14069703b
// > ??> @ 0x140697042
// > ??> @ 0x140697048
// > ??> @ 0x14069704f
// > ??> @ 0x140698d05
// > ??> @ 0x1406c5748
//
// 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 __fastcall sub_14005E430(__int64 a1)
{
_QWORD *v2; // rcx
__int64 result; // rax
v2 = *(_QWORD **)a1;
if ( v2 )
{
if ( ((*(_QWORD *)(a1 + 16) - (_QWORD)v2) & 0xFFFFFFFFFFFFFFFCuLL) >= 0x1000 )
{
if ( (unsigned __int64)v2 - *(v2 - 1) - 8 > 0x1F )
invalid_parameter_noinfo_noreturn();
v2 = (_QWORD *)*(v2 - 1);
}
j_j_free(v2);
result = 0;
*(_QWORD *)a1 = 0;
*(_QWORD *)(a1 + 8) = 0;
*(_QWORD *)(a1 + 16) = 0;
}
return result;
}