//
// GameStatsManager::hasPendingUserCoin from 0x1401dfe60 to 0x1401dff13 (179 bytes)
//
// 8 xrefs:
// > LevelCell::loadCustomLevelCell @ 0x1400afde8
// > EndLevelLayer::customSetup @ 0x140134438
// > GameLevelManager::updateLevelRewards @ 0x140146585
// > GameLevelManager::getLevelLeaderboard @ 0x1401584b6
// > GJBaseGameLayer::processItems @ 0x1402164ea
// > GJBaseGameLayer::hasUniqueCoin @ 0x1402168a7
// > LevelInfoLayer::updateLabelValues @ 0x1403000b7
// > ??> @ 0x1406cc4a4
//
// 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
//
bool GameStatsManager::hasPendingUserCoin(GameStatsManager *a1, const char *a2)
{
size_t v3; // r8
bool v4; // bl
void *v5; // rcx
void *Block[2]; // [rsp+20h] [rbp-38h] BYREF
__int128 v8; // [rsp+30h] [rbp-28h]
*(_OWORD *)Block = 0;
v8 = 0;
v3 = -1;
do
++v3;
while ( a2[v3] );
sub_14003A930(Block, a2, v3);
v4 = cocos2d::CCDictionary::objectForKey(a1->m_pendingUserCoins, Block) != 0;
if ( *((_QWORD *)&v8 + 1) > 0xFu )
{
v5 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v8 + 1) + 1LL) >= 0x1000 )
{
v5 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v5 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v5);
}
return v4;
}