//
// AchievementManager::reportPlatformAchievementWithID from 0x6855d8 to 0x685830 (600 bytes)
//
// 3 xrefs:
// > AchievementManager::reportAchievementWithID @ 0x685924
// > GameManager::syncPlatformAchievements @ 0x718470
// > ??> @ 0x96cb8
//
// This function is hookable on this platform (idp: arm, 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:50:30 +0000
//
__int64 __fastcall AchievementManager::reportPlatformAchievementWithID(
AchievementManager *this,
char *a2,
unsigned int a3)
{
__int64 v4; // x21
size_t v5; // x0
__int64 v6; // x21
cocos2d::CCString *v7; // x0
char *CString; // x24
size_t v9; // x0
int v10; // w27
size_t v11; // x22
int v12; // w26
char *v13; // x0
size_t v14; // x21
char *v15; // x1
size_t v16; // x2
_BOOL4 v17; // w19
__int64 v20; // [xsp+78h] [xbp+78h] BYREF
size_t v21; // [xsp+80h] [xbp+80h]
void *v22; // [xsp+88h] [xbp+88h]
__int64 v23; // [xsp+90h] [xbp+90h] BYREF
size_t v24; // [xsp+98h] [xbp+98h]
void *v25; // [xsp+A0h] [xbp+A0h]
v23 = 0;
v4 = *((_QWORD *)this + 41);
v24 = 0;
v25 = nullptr;
v5 = strlen(a2);
std::string::__init(&v23, a2, v5);
v6 = cocos2d::CCDictionary::objectForKey(v4, &v23);
if ( (v23 & 1) != 0 )
operator delete(v25);
if ( v6 )
{
v23 = 0;
v24 = 0;
v25 = nullptr;
std::string::__init(&v23, "googleID", 8u);
v7 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v6, &v23);
CString = (char *)cocos2d::CCString::getCString(v7);
if ( (v23 & 1) != 0 )
operator delete(v25);
if ( CString )
{
v20 = 0;
v21 = 0;
v22 = nullptr;
v9 = strlen(CString);
std::string::__init(&v20, CString, v9);
v23 = 0;
v24 = 0;
v25 = nullptr;
std::string::__init(&v23, &byte_11B8890, 0);
v10 = v20 & 1;
if ( v10 )
{
v11 = v21;
v12 = v23 & 1;
if ( (v23 & 1) == 0 )
{
v13 = (char *)v22;
v14 = (unsigned __int8)v23 >> 1;
v15 = (char *)&v23 + 1;
goto LABEL_10;
}
v14 = v24;
v13 = (char *)v22;
}
else
{
v11 = (unsigned __int8)v20 >> 1;
v12 = v23 & 1;
if ( (v23 & 1) == 0 )
{
v14 = (unsigned __int8)v23 >> 1;
v13 = (char *)&v20 + 1;
v15 = (char *)&v23 + 1;
LABEL_10:
if ( v14 > v11 )
v16 = v11;
else
v16 = v14;
if ( !v16 )
goto LABEL_25;
LABEL_14:
v17 = 1;
if ( memcmp(v13, v15, v16) )
{
if ( !v12 )
goto LABEL_16;
goto LABEL_29;
}
LABEL_25:
v17 = v11 != v14;
if ( !v12 )
{
LABEL_16:
if ( !v10 )
goto LABEL_17;
LABEL_32:
operator delete(v22);
LABEL_17:
if ( v17 )
PlatformToolbox::reportAchievementWithID((PlatformToolbox *)CString, (const char *)a3);
return _stack_chk_guard;
}
LABEL_29:
operator delete(v25);
if ( (v20 & 1) == 0 )
goto LABEL_17;
goto LABEL_32;
}
v14 = v24;
v13 = (char *)&v20 + 1;
}
v15 = (char *)v25;
if ( v14 > v11 )
v16 = v11;
else
v16 = v14;
v12 = 1;
if ( !v16 )
goto LABEL_25;
goto LABEL_14;
}
}
return _stack_chk_guard;
}