//
// FollowRewardPage::switchToOpenedState from 0x4ffc00 to 0x4ffca8 (168 bytes)
//
// 2 xrefs:
// > FollowRewardPage::init @ 0x5004a8
// > FollowRewardPage::onSpecialItem @ 0x5007e8
//
// 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 FollowRewardPage::switchToOpenedState(FollowRewardPage *a1, CCMenuItemSpriteExtra *a2)
{
GJChestSprite *v3; // r4
int v4; // r0
_DWORD *v5; // r2
int **v6; // r4
int **v7; // r5
int *v8; // r6
int *v9; // t1
int v10; // r3
void (__fastcall *v11)(int *, _DWORD *); // r3
_DWORD v12[2]; // [sp+0h] [bp-8h] BYREF
v12[0] = a1;
v12[1] = a2;
v3 = (GJChestSprite *)a2->getNormalImage(a2);
v3->m_dark = 0;
GJChestSprite::switchToState(v3, Opened, 1);
v4 = (int)v3->getChildren(v3);
if ( v4 )
{
v5 = *(_DWORD **)(v4 + 52);
if ( *v5 )
{
v6 = (int **)v5[3];
v7 = &(&v6[*v5])[-1];
while ( v6 <= v7 )
{
v9 = *v6++;
v8 = v9;
if ( !v9 )
break;
(*(void (__fastcall **)(int *, int))(*v8 + 448))(v8, 150);
v10 = *v8;
LOWORD(v12[0]) = -26986;
v11 = *(void (__fastcall **)(int *, _DWORD *))(v10 + 472);
BYTE2(v12[0]) = -106;
v11(v8, v12);
}
}
}
a2->setEnabled(a2, 0);
}