//
// GameStatsManager::unlockDailyRecall from 0x10003a500 to 0x10003a65c (348 bytes)
//
// 1 xrefs:
// > LevelBrowserLayer::FLAlert_Clicked @ 0x100487fb1
//
// 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
//
char __fastcall GameStatsManager::unlockDailyRecall(__int64 a1, int a2, __m128 a3)
{
int v3; // r14d
int Stat; // eax
bool v5; // cc
int v6; // eax
__int64 v8; // rbx
__int64 v9; // r14
__int64 v10; // rax
const char *CString; // r12
size_t v12; // rax
size_t v13; // r15
char *v14; // r13
__int64 v15; // r14
size_t v16; // rbx
char v17; // [rsp+0h] [rbp-50h]
char v18; // [rsp+0h] [rbp-50h]
__int64 v19; // [rsp+8h] [rbp-48h]
_QWORD __dst[2]; // [rsp+10h] [rbp-40h] BYREF
void *__p; // [rsp+20h] [rbp-30h]
if ( a2 <= 0 || (unsigned __int8)GameStatsManager::isDailyRecall(a1, a2) )
return 0;
v3 = 5;
if ( (unsigned int)a2 < 0x30D41 )
v3 = 2 * ((unsigned int)a2 >= 0x186A1) + 1;
Stat = GameStatsManager::getStat(a1, "21", a3);
v5 = Stat < v3;
v6 = Stat - v3;
if ( v5 )
return 0;
GameStatsManager::setStat(a1, "21", v6, a3);
v8 = *(_QWORD *)(a1 + 752);
v9 = sub_10088E820("%i", v17);
v10 = sub_10088E820("%i", v18);
CString = (const char *)cocos2d::CCString::getCString(v10);
v12 = strlen(CString);
if ( v12 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v13 = v12;
if ( v12 >= 0x17 )
{
v19 = v9;
v15 = v8;
v16 = 26;
if ( (v12 | 7) != 0x17 )
v16 = (v12 | 7) + 1;
v14 = (char *)operator new(v16);
__p = v14;
__dst[0] = v16 + 1;
v8 = v15;
v9 = v19;
__dst[1] = v13;
}
else
{
LOBYTE(__dst[0]) = 2 * v12;
v14 = (char *)__dst + 1;
if ( !v12 )
goto LABEL_15;
}
memmove(v14, CString, v13);
LABEL_15:
v14[v13] = 0;
cocos2d::CCDictionary::setObject(v8, v9, __dst);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
return 1;
}