//
// GameStatsManager::verifyUserCoins from 0x10006f8e0 to 0x10006fe33 (1363 bytes)
//
// 2 xrefs:
// > GJAccountManager::onSyncAccountCompleted @ 0x1000d11d6
// > GameManager::dataLoaded @ 0x10038a3c9
//
// 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::verifyUserCoins(GameStatsManager *a1)
{
char v1; // al
int Stat; // r14d
cocos2d::CCString *v3; // rax
const char *CString; // rax
const char *v5; // r15
AchievementManager *v6; // rax
cocos2d::CCString *v7; // rax
const char *v8; // rax
const char *v9; // r15
AchievementManager *v10; // rax
cocos2d::CCString *v11; // rax
const char *v12; // rax
const char *v13; // r15
AchievementManager *v14; // rax
cocos2d::CCString *v15; // rax
const char *v16; // rax
const char *v17; // r15
AchievementManager *v18; // rax
cocos2d::CCString *v19; // rax
const char *v20; // rax
const char *v21; // r15
AchievementManager *v22; // rax
cocos2d::CCString *v23; // rax
const char *v24; // rax
const char *v25; // r15
AchievementManager *v26; // rax
cocos2d::CCString *v27; // rax
const char *v28; // rax
const char *v29; // r15
AchievementManager *v30; // rax
cocos2d::CCString *v31; // rax
const char *v32; // rax
const char *v33; // r15
AchievementManager *v34; // rax
cocos2d::CCString *v35; // rax
const char *v36; // rax
const char *v37; // r15
AchievementManager *v38; // rax
cocos2d::CCString *v39; // rax
const char *v40; // rax
const char *v41; // r15
AchievementManager *v42; // rax
cocos2d::CCString *v43; // rax
const char *v44; // rax
const char *v45; // r15
AchievementManager *v46; // rax
cocos2d::CCString *v47; // rax
const char *v48; // rax
const char *v49; // r15
AchievementManager *v50; // rax
cocos2d::CCString *v51; // rax
const char *v52; // rax
const char *v53; // r15
AchievementManager *v54; // rax
cocos2d::CCString *v55; // rax
const char *v56; // rax
const char *v57; // r15
AchievementManager *v58; // rax
cocos2d::CCString *v59; // rax
const char *v60; // rax
const char *v61; // r15
AchievementManager *v62; // rax
cocos2d::CCString *v63; // rax
const char *v64; // rax
const char *v65; // r15
AchievementManager *v66; // rax
cocos2d::CCString *v67; // rax
const char *v68; // rax
const char *v69; // r15
AchievementManager *v70; // rax
cocos2d::CCString *v71; // rax
const char *v72; // rax
const char *v73; // r15
AchievementManager *v74; // rax
cocos2d::CCString *v75; // rax
const char *v76; // rax
const char *v77; // r15
AchievementManager *v78; // rax
cocos2d::CCString *v79; // rax
const char *v80; // rax
const char *v81; // r15
AchievementManager *v82; // rax
cocos2d::CCString *v83; // rax
const char *v84; // rax
const char *v85; // r15
AchievementManager *v86; // rax
char v87; // [rsp-8h] [rbp-20h]
char v88; // [rsp-8h] [rbp-20h]
char v89; // [rsp-8h] [rbp-20h]
char v90; // [rsp-8h] [rbp-20h]
char v91; // [rsp-8h] [rbp-20h]
char v92; // [rsp-8h] [rbp-20h]
char v93; // [rsp-8h] [rbp-20h]
char v94; // [rsp-8h] [rbp-20h]
char v95; // [rsp-8h] [rbp-20h]
char v96; // [rsp-8h] [rbp-20h]
char v97; // [rsp-8h] [rbp-20h]
char v98; // [rsp-8h] [rbp-20h]
char v99; // [rsp-8h] [rbp-20h]
char v100; // [rsp-8h] [rbp-20h]
char v101; // [rsp-8h] [rbp-20h]
char v102; // [rsp-8h] [rbp-20h]
char v103; // [rsp-8h] [rbp-20h]
char v104; // [rsp-8h] [rbp-20h]
char v105; // [rsp-8h] [rbp-20h]
char v106; // [rsp-8h] [rbp-20h]
char v107; // [rsp-8h] [rbp-20h]
v87 = v1;
Stat = GameStatsManager::getStat(a1, "12");
if ( Stat <= (int)cocos2d::CCDictionary::count(a1->m_verifiedUserCoins) )
{
v3 = (cocos2d::CCString *)sub_1007AB580("geometry.ach.usercoins%02d", v87);
CString = cocos2d::CCString::getCString(v3);
if ( Stat <= 0 )
{
v5 = CString;
v6 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v6, v5) )
goto LABEL_45;
}
v7 = (cocos2d::CCString *)sub_1007AB580("geometry.ach.usercoins%02d", v88);
v8 = cocos2d::CCString::getCString(v7);
if ( Stat <= 19 )
{
v9 = v8;
v10 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v10, v9) )
goto LABEL_45;
}
v11 = (cocos2d::CCString *)sub_1007AB580("geometry.ach.usercoins%02d", v89);
v12 = cocos2d::CCString::getCString(v11);
if ( Stat <= 29 )
{
v13 = v12;
v14 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v14, v13) )
goto LABEL_45;
}
v15 = (cocos2d::CCString *)sub_1007AB580("geometry.ach.usercoins%02d", v90);
v16 = cocos2d::CCString::getCString(v15);
if ( Stat <= 39 )
{
v17 = v16;
v18 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v18, v17) )
goto LABEL_45;
}
v19 = (cocos2d::CCString *)sub_1007AB580("geometry.ach.usercoins%02d", v91);
v20 = cocos2d::CCString::getCString(v19);
if ( Stat <= 49 )
{
v21 = v20;
v22 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v22, v21) )
goto LABEL_45;
}
v23 = (cocos2d::CCString *)sub_1007AB580("geometry.ach.usercoins%02d", v92);
v24 = cocos2d::CCString::getCString(v23);
if ( Stat <= 59 )
{
v25 = v24;
v26 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v26, v25) )
goto LABEL_45;
}
v27 = (cocos2d::CCString *)sub_1007AB580("geometry.ach.usercoins%02d", v93);
v28 = cocos2d::CCString::getCString(v27);
if ( Stat <= 69 )
{
v29 = v28;
v30 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v30, v29) )
goto LABEL_45;
}
v31 = (cocos2d::CCString *)sub_1007AB580("geometry.ach.usercoins%02d", v94);
v32 = cocos2d::CCString::getCString(v31);
if ( Stat <= 79 )
{
v33 = v32;
v34 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v34, v33) )
goto LABEL_45;
}
v35 = (cocos2d::CCString *)sub_1007AB580("geometry.ach.usercoins%02d", v95);
v36 = cocos2d::CCString::getCString(v35);
if ( Stat <= 89 )
{
v37 = v36;
v38 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v38, v37) )
goto LABEL_45;
}
v39 = (cocos2d::CCString *)sub_1007AB580("geometry.ach.usercoins%02d", v96);
v40 = cocos2d::CCString::getCString(v39);
if ( Stat <= 99 )
{
v41 = v40;
v42 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v42, v41) )
goto LABEL_45;
}
v43 = (cocos2d::CCString *)sub_1007AB580("geometry.ach.usercoins%02d", v97);
v44 = cocos2d::CCString::getCString(v43);
if ( Stat <= 109 )
{
v45 = v44;
v46 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v46, v45) )
goto LABEL_45;
}
v47 = (cocos2d::CCString *)sub_1007AB580("geometry.ach.usercoins%02d", v98);
v48 = cocos2d::CCString::getCString(v47);
if ( Stat <= 119 )
{
v49 = v48;
v50 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v50, v49) )
goto LABEL_45;
}
v51 = (cocos2d::CCString *)sub_1007AB580("geometry.ach.usercoins%02d", v99);
v52 = cocos2d::CCString::getCString(v51);
if ( Stat <= 129 )
{
v53 = v52;
v54 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v54, v53) )
goto LABEL_45;
}
v55 = (cocos2d::CCString *)sub_1007AB580("geometry.ach.usercoins%02d", v100);
v56 = cocos2d::CCString::getCString(v55);
if ( Stat <= 139 )
{
v57 = v56;
v58 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v58, v57) )
goto LABEL_45;
}
v59 = (cocos2d::CCString *)sub_1007AB580("geometry.ach.usercoins%02d", v101);
v60 = cocos2d::CCString::getCString(v59);
if ( Stat <= 149 )
{
v61 = v60;
v62 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v62, v61) )
goto LABEL_45;
}
v63 = (cocos2d::CCString *)sub_1007AB580("geometry.ach.usercoins%02d", v102);
v64 = cocos2d::CCString::getCString(v63);
if ( Stat <= 159 )
{
v65 = v64;
v66 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v66, v65) )
goto LABEL_45;
}
v67 = (cocos2d::CCString *)sub_1007AB580("geometry.ach.usercoins%02d", v103);
v68 = cocos2d::CCString::getCString(v67);
if ( Stat <= 169 )
{
v69 = v68;
v70 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v70, v69) )
goto LABEL_45;
}
v71 = (cocos2d::CCString *)sub_1007AB580("geometry.ach.usercoins%02d", v104);
v72 = cocos2d::CCString::getCString(v71);
if ( Stat <= 179 )
{
v73 = v72;
v74 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v74, v73) )
goto LABEL_45;
}
v75 = (cocos2d::CCString *)sub_1007AB580("geometry.ach.usercoins%02d", v105);
v76 = cocos2d::CCString::getCString(v75);
if ( Stat <= 189 )
{
v77 = v76;
v78 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v78, v77) )
goto LABEL_45;
}
v79 = (cocos2d::CCString *)sub_1007AB580("geometry.ach.usercoins%02d", v106);
v80 = cocos2d::CCString::getCString(v79);
if ( Stat <= 199 )
{
v81 = v80;
v82 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v82, v81) )
goto LABEL_45;
}
v83 = (cocos2d::CCString *)sub_1007AB580("geometry.ach.usercoins%02d", v107);
v84 = cocos2d::CCString::getCString(v83);
if ( Stat <= 209 )
{
v85 = v84;
v86 = AchievementManager::sharedState();
if ( AchievementManager::isAchievementEarned(v86, v85) )
LABEL_45:
GameStatsManager::recountUserCoins(a1, 1);
}
}
else
{
GameStatsManager::recountUserCoins(a1, 0);
}
}