//
// SecretRewardsLayer::updateBackButton from 0x10070ffd0 to 0x1007100fc (300 bytes)
//
// 2 xrefs:
// > SecretRewardsLayer::moveToSecondaryLayer @ 0x10070fd80
// > SecretRewardsLayer::moveToMainLayer @ 0x100710239
//
// 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:36:06 +0000
//
__int64 __fastcall SecretRewardsLayer::updateBackButton(__int64 a1)
{
__int64 v2; // r14
__int64 v3; // rax
const char *v4; // rsi
__int64 v5; // rax
__int64 v6; // rdi
__int64 result; // rax
double v8; // xmm0_8
_OWORD *v9; // rax
_OWORD *v10; // r14
double v11; // xmm0_8
_OWORD *v12; // rax
_OWORD *v13; // rax
__int64 v14; // rax
cocos2d::CCNode::stopAllActions(*(_QWORD *)(a1 + 528));
v2 = *(_QWORD *)(a1 + 528);
v3 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v4 = "GJ_closeBtn_001.png";
if ( *(_BYTE *)(a1 + 584) )
v4 = "GJ_arrow_03_001.png";
v5 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v3, v4);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v2 + 1160LL))(v2, v5);
v6 = *(_QWORD *)(a1 + 528);
if ( !*(_BYTE *)(a1 + 584) )
{
result = (*(__int64 (__fastcall **)(__int64, float))(*(_QWORD *)v6 + 160LL))(v6, 0.80000001);
if ( *(_BYTE *)(a1 + 584) )
return result;
goto LABEL_5;
}
result = (*(__int64 (__fastcall **)(__int64, float))(*(_QWORD *)v6 + 160LL))(v6, 1.0);
if ( !*(_BYTE *)(a1 + 584) )
{
LABEL_5:
v8 = (*(double (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 528) + 168LL))(*(_QWORD *)(a1 + 528));
v9 = cocos2d::CCScaleTo::create_1((__m128)0x3E4CCCCDu, *(float *)&v8 + 0.1);
v10 = cocos2d::CCEaseBackOut::create((__int64)v9);
v11 = (*(double (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 528) + 168LL))(*(_QWORD *)(a1 + 528));
v12 = cocos2d::CCScaleTo::create_1((__m128)0x3E4CCCCDu, *(float *)&v11);
v13 = cocos2d::CCEaseInOut::create((__int64)v12, 2.0);
v14 = sub_10039EB60((__int64)v10, v13, 0);
return cocos2d::CCNode::runAction(*(_QWORD *)(a1 + 528), v14);
}
return result;
}