//
// sub_1004074D0 from 0x1004074d0 to 0x1004075b8 (232 bytes)
//
// 6 xrefs:
// > PlayLayer::playEndAnimationToPos @ 0x10008398f
// > PlayLayer::playEndAnimationToPos @ 0x100083b59
// > PlayLayer::playPlatformerEndAnimationToPos @ 0x100083ea4
// > PlayLayer::playPlatformerEndAnimationToPos @ 0x100083eda
// > PlayLayer::playPlatformerEndAnimationToPos @ 0x100084189
// > PlayLayer::playPlatformerEndAnimationToPos @ 0x1000841da
//
// 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:30:05 +0000
//
__int64 __fastcall sub_1004074D0(__int64 a1, __m128 a2, __m128 a3)
{
__int64 result; // rax
_OWORD *v4; // r14
__int64 v5; // rax
__int64 v6; // r14
if ( *(_BYTE *)(a1 + 2420) == 1 )
sub_1003F05E0(a1);
*(_BYTE *)(a1 + 2530) = 1;
*(_WORD *)(a1 + 1784) = 0;
*(_BYTE *)(a1 + 1640) = 0;
*(_DWORD *)(a1 + 1776) = 0;
result = PlayerObject::releaseButton(a1, 1, a2, a3);
if ( *(_BYTE *)(a1 + 1974) == 1 )
result = cocos2d::CCParticleSystem::stopSystem(*(_QWORD *)(a1 + 2160));
*(_BYTE *)(a1 + 1974) = 0;
*(_BYTE *)(a1 + 2500) = 0;
if ( *(_BYTE *)(a1 + 2420) == 1 )
{
result = cocos2d::CCNode::getActionByTag(*(_QWORD *)(a1 + 1920), 8);
if ( !result )
{
v4 = cocos2d::CCFadeOut::create((__m128)0x3ECCCCCDu);
v5 = cocos2d::CCCallFunc::create(*(_QWORD *)(a1 + 1920), HardStreak::stopStroke, 0);
v6 = sub_10039EB60((__int64)v4, v5, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v6 + 72LL))(v6, 8);
return cocos2d::CCNode::runAction(*(_QWORD *)(a1 + 1920), v6);
}
}
return result;
}