//
// sub_1003859CC from 0x1003859cc to 0x100385aec (288 bytes)
//
// 1 xrefs:
// > SecretRewardsLayer::onBack @ 0x100384b9c
//
// This function is hookable on this platform (idp: arm, 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 11:03:33 +0000
//
__int64 __fastcall sub_1003859CC(__int64 result)
{
__int64 v1; // x19
__int64 v2; // x0
double WinSize; // d0
_OWORD *v4; // x0
_OWORD *v5; // x0
_OWORD *v6; // x0
_OWORD *v7; // x20
char v8; // w0
__int64 v9; // x1
__int64 v10; // x2
__int64 v11; // x3
__int64 v12; // x4
__int64 v13; // x5
__int64 v14; // x6
__int64 v15; // x7
__int64 v16; // x0
double v17; // [xsp+10h] [xbp-30h] BYREF
__int64 v18; // [xsp+18h] [xbp-28h] BYREF
if ( (*(_BYTE *)(result + 584) & 1) == 0 )
{
v1 = result;
*(_BYTE *)(result + 584) = 1;
v2 = cocos2d::CCDirector::sharedDirector();
WinSize = cocos2d::CCDirector::getWinSize(v2, &v18);
(*(void (__fastcall **)(_QWORD, __int64, double))(**(_QWORD **)(v1 + 544) + 1000LL))(
*(_QWORD *)(v1 + 544),
1,
WinSize);
sub_1000262BC((float *)&v17, 0.0, 0.0);
v4 = cocos2d::CCMoveTo::create(&v17, 0.4);
v5 = cocos2d::CCEaseInOut::create((__int64)v4, 2.0);
cocos2d::CCNode::runAction(*(_QWORD *)(v1 + 424), (__int64)v5);
if ( *(_QWORD *)(v1 + 432) )
{
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v1 + 552) + 1000LL))(*(_QWORD *)(v1 + 552), 0);
*(_QWORD *)(v1 + 552) = 0;
*(_QWORD *)(v1 + 448) = 0;
sub_1000262BC((float *)&v17, 0.0, *((float *)&v18 + 1) + 50.0);
v6 = cocos2d::CCMoveTo::create(&v17, 0.4);
v7 = cocos2d::CCEaseInOut::create((__int64)v6, 2.0);
v8 = (unsigned __int8)cocos2d::CCCallFunc::create(*(_QWORD *)(v1 + 432), 536, 1);
v16 = sub_10021D420((__int64)v7, v9, v10, v11, v12, v13, v14, v15, v8);
cocos2d::CCNode::runAction(*(_QWORD *)(v1 + 432), v16);
*(_QWORD *)(v1 + 432) = 0;
}
return SecretRewardsLayer::updateBackButton(v1);
}
return result;
}