//
// GameStatsManager::storePendingUserCoin from 0x100070430 to 0x100070505 (213 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::processItems @ 0x1001296ef
//
// 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 __fastcall GameStatsManager::storePendingUserCoin(GameStatsManager *a1, const char *a2)
{
double v2; // xmm0_8
cocos2d::CCString *m_trueString; // rbx
cocos2d::CCDictionary *m_pendingUserCoins; // r14
size_t v5; // rax
size_t v6; // r12
char *v7; // r13
cocos2d::CCString *v8; // r14
size_t v9; // rbx
cocos2d::CCDictionary *v10; // [rsp+8h] [rbp-48h]
_QWORD __dst[2]; // [rsp+10h] [rbp-40h] BYREF
void *__p; // [rsp+20h] [rbp-30h]
m_trueString = a1->m_trueString;
m_pendingUserCoins = a1->m_pendingUserCoins;
v5 = strlen(a2);
if ( v5 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v2);
v6 = v5;
if ( v5 >= 0x17 )
{
v10 = a1->m_pendingUserCoins;
v8 = a1->m_trueString;
v9 = 26;
if ( (v5 | 7) != 0x17 )
v9 = (v5 | 7) + 1;
v7 = (char *)operator new(v9);
__p = v7;
__dst[0] = v9 + 1;
m_trueString = v8;
m_pendingUserCoins = v10;
__dst[1] = v6;
goto LABEL_8;
}
LOBYTE(__dst[0]) = 2 * v5;
v7 = (char *)__dst + 1;
if ( v5 )
LABEL_8:
memcpy(v7, a2, v6);
v7[v6] = 0;
cocos2d::CCDictionary::setObject_1(m_pendingUserCoins, m_trueString, __dst);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
}