//
// GJNotificationCell::refreshChest from 0x739ec4 to 0x73a064 (416 bytes)
//
// 3 xrefs:
// > CustomListView::reloadAll @ 0x748d30
// > GJNotificationCell::loadFromNotification @ 0x74a8bc
// > ??> @ 0xc7480
//
// 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 12:52:40 +0000
//
__int64 __fastcall GJNotificationCell::refreshChest(GJNotificationCell *this)
{
__int64 v2; // x0
GameStatsManager *v3; // x22
int v4; // w23
int isSpecialChestUnlocked; // w24
__int64 v7; // x0
unsigned int *v8; // x1
char *v9; // x22
__int64 v10; // x0
char *v11; // x25
__int64 *i; // x21
__int64 v13; // x2
_BYTE v14[8]; // [xsp+68h] [xbp+68h] BYREF
__int64 v15[3]; // [xsp+70h] [xbp+70h] BYREF
v2 = *((_QWORD *)this + 71);
if ( v2 && *((_QWORD *)this + 70) )
{
v3 = (GameStatsManager *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 1072LL))(v2);
v4 = GameStatsManager::sharedState(v3);
GJNotification::rewardKey(v15, *((GJNotification **)this + 70));
isSpecialChestUnlocked = (unsigned __int8)GameStatsManager::isSpecialChestUnlocked(v4, (char *)v15);
if ( (v15[0] & 1) != 0 )
{
operator delete((void *)v15[2]);
if ( !isSpecialChestUnlocked )
goto LABEL_5;
}
else if ( !isSpecialChestUnlocked )
{
LABEL_5:
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 71) + 1056LL))(
*((_QWORD *)this + 71),
isSpecialChestUnlocked ^ 1u);
return _stack_chk_guard;
}
*((_BYTE *)v3 + 604) = 0;
GJChestSprite::switchToState(v3, 4, 1);
v7 = (*(__int64 (__fastcall **)(GameStatsManager *))(*(_QWORD *)v3 + 488LL))(v3);
if ( v7 )
{
v8 = *(unsigned int **)(v7 + 56);
if ( *v8 )
{
v9 = *((char **)v8 + 2);
v10 = 8LL * *v8 - 8;
v11 = &v9[v10];
if ( v9 <= &v9[v10] )
{
for ( i = *(__int64 **)v9; *(_QWORD *)v9; i = *(__int64 **)v9 )
{
v9 += 8;
(*(void (__fastcall **)(__int64 *, __int64))(*i + 912))(i, 4294967190LL);
v13 = *i;
memset(v14, 150, 3);
(*(void (__fastcall **)(__int64 *, _BYTE *))(v13 + 960))(i, v14);
if ( v11 < v9 )
break;
}
}
}
}
goto LABEL_5;
}
return _stack_chk_guard;
}