//
// GameStatsManager::storeSecondaryQueuedChallenge from 0x100038ca0 to 0x100038d88 (232 bytes)
//
// 3 xrefs:
// > sub_10052CE00 @ 0x10052d6ed
// > sub_10052CE00 @ 0x10052d81d
// > sub_10052CE00 @ 0x10052d94d
//
// 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:33 +0000
//
void __fastcall GameStatsManager::storeSecondaryQueuedChallenge(__int64 a1, int a2, __int64 a3)
{
__int64 v4; // r14
__int64 v5; // rax
const char *CString; // r12
size_t v7; // rax
size_t v8; // r15
char *v9; // r13
size_t v10; // r14
char v11; // [rsp+0h] [rbp-50h]
__int64 v12; // [rsp+8h] [rbp-48h]
_QWORD __dst[2]; // [rsp+10h] [rbp-40h] BYREF
void *__p; // [rsp+20h] [rbp-30h]
*(_DWORD *)(a3 + 104) = a2;
v4 = *(_QWORD *)(a1 + 504);
v5 = sub_10088E820("%i", v11);
CString = (const char *)cocos2d::CCString::getCString(v5);
v7 = strlen(CString);
if ( v7 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v8 = v7;
if ( v7 >= 0x17 )
{
v12 = v4;
v10 = 26;
if ( (v7 | 7) != 0x17 )
v10 = (v7 | 7) + 1;
v9 = (char *)operator new(v10);
__p = v9;
__dst[0] = v10 + 1;
v4 = v12;
__dst[1] = v8;
goto LABEL_8;
}
LOBYTE(__dst[0]) = 2 * v7;
v9 = (char *)__dst + 1;
if ( v7 )
LABEL_8:
memmove(v9, CString, v8);
v9[v8] = 0;
cocos2d::CCDictionary::setObject(v4, a3, __dst);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
}