//
// GameStatsManager::hasUserCoin from 0x100035a40 to 0x100035b06 (198 bytes)
//
// 11 xrefs:
// > GameStatsManager::checkCoinsForLevel @ 0x100035686
// > GameStatsManager::checkCoinsForLevel @ 0x100035779
// > GameStatsManager::checkCoinsForLevel @ 0x10003586c
// > GameStatsManager::dataLoaded @ 0x10005474d
// > GJBaseGameLayer::hasUniqueCoin @ 0x10010644f
// > GJBaseGameLayer::processItems @ 0x100107176
// > LevelCell::loadCustomLevelCell @ 0x1002391bd
// > LevelInfoLayer::updateLabelValues @ 0x1002b01f2
// > PauseLayer::customSetup @ 0x1003c073f
// > EndLevelLayer::customSetup @ 0x1004ba74b
// > GameLevelManager::getLevelLeaderboard @ 0x100565f4e
//
// This function is hookable on this platform (idp: pc, 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:19:32 +0000
//
bool __fastcall GameStatsManager::hasUserCoin(__int64 a1, const char *a2)
{
__int64 v2; // rbx
size_t v3; // rax
size_t v4; // r15
char *v5; // r12
size_t v6; // r13
__int64 v7; // rbx
_QWORD __dst[2]; // [rsp+0h] [rbp-40h] BYREF
void *__p; // [rsp+10h] [rbp-30h]
v2 = *(_QWORD *)(a1 + 616);
v3 = strlen(a2);
if ( v3 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v4 = v3;
if ( v3 >= 0x17 )
{
v6 = 26;
if ( (v3 | 7) != 0x17 )
v6 = (v3 | 7) + 1;
v5 = (char *)operator new(v6);
__p = v5;
__dst[0] = v6 + 1;
__dst[1] = v4;
goto LABEL_8;
}
LOBYTE(__dst[0]) = 2 * v3;
v5 = (char *)__dst + 1;
if ( v3 )
LABEL_8:
memcpy(v5, a2, v4);
v5[v4] = 0;
v7 = cocos2d::CCDictionary::objectForKey(v2, __dst);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
return v7 != 0;
}