//
// GameStatsManager::storeUserCoin from 0x1401dfda0 to 0x1401dfe52 (178 bytes)
//
// 4 xrefs:
// > GameLevelManager::updateLevelRewards @ 0x1401465a7
// > GameStatsManager::dataLoaded @ 0x1401f2a9c
// > GJBaseGameLayer::processItems @ 0x140216469
// > ??> @ 0x1406cc498
//
// 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
//
// Hidden C++ exception states: #wind=1
void GameStatsManager::storeUserCoin(GameStatsManager *a1, const char *a2)
{
size_t v3; // r8
void *v4; // rcx
void *Block[2]; // [rsp+20h] [rbp-38h] BYREF
__int128 v6; // [rsp+30h] [rbp-28h]
*(_OWORD *)Block = 0;
v6 = 0;
v3 = -1;
do
++v3;
while ( a2[v3] );
sub_14003A930(Block, a2, v3);
cocos2d::CCDictionary::setObject(a1->m_verifiedUserCoins, a1->m_trueString, Block);
if ( *((_QWORD *)&v6 + 1) > 0xFu )
{
v4 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v6 + 1) + 1LL) >= 0x1000 )
{
v4 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v4 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v4);
}
}