//
// AchievementManager::reportPlatformAchievementWithID from 0x3bee90 to 0x3befce (318 bytes)
//
// 2 xrefs:
// > AchievementManager::reportAchievementWithID @ 0x3bf04c
// > GameManager::syncPlatformAchievements @ 0x4152f2
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:46:29 +0000
//
int __fastcall AchievementManager::reportPlatformAchievementWithID(
AchievementManager *this,
const char *a2,
const char *a3)
{
int v4; // r6
size_t v6; // r0
int v7; // r5
int result; // r0
cocos2d::CCString *v9; // r0
const char *CString; // r8
size_t v11; // r0
int v12; // r3
size_t v13; // r6
unsigned int v14; // r5
char *v15; // r0
char *v16; // r1
size_t v17; // r2
int v18; // r11
int v19; // r2
int v20; // [sp+4h] [bp-20h] BYREF
size_t v21; // [sp+8h] [bp-1Ch]
char *v22; // [sp+Ch] [bp-18h]
int v23; // [sp+10h] [bp-14h] BYREF
unsigned int v24; // [sp+14h] [bp-10h]
char *v25; // [sp+18h] [bp-Ch]
v4 = *((_DWORD *)this + 67);
v23 = 0;
v24 = 0;
v25 = nullptr;
v6 = strlen(a2);
std::string::__init(&v23, a2, v6);
v7 = cocos2d::CCDictionary::objectForKey(v4, &v23);
result = std::string::~string((int)&v23);
if ( !v7 )
return result;
v23 = 0;
v24 = 0;
v25 = nullptr;
std::string::__init(&v23, "googleID", 8u);
v9 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v7, &v23);
CString = (const char *)cocos2d::CCString::getCString(v9);
result = std::string::~string((int)&v23);
if ( !CString )
return result;
v20 = 0;
v21 = 0;
v22 = nullptr;
v11 = strlen(CString);
std::string::__init(&v20, CString, v11);
v23 = 0;
v24 = 0;
v25 = nullptr;
std::string::__init(&v23, &unk_B6B226, 0);
v12 = v20 & 1;
if ( v12 )
v13 = v21;
else
v13 = (int)(unsigned __int8)v20 >> 1;
if ( (v23 & 1) == 0 )
{
v14 = (int)(unsigned __int8)v23 >> 1;
if ( !v12 )
{
v15 = (char *)&v20 + 1;
goto LABEL_13;
}
LABEL_10:
v15 = v22;
if ( (v23 & 1) != 0 )
goto LABEL_11;
LABEL_13:
v16 = (char *)&v23 + 1;
goto LABEL_14;
}
v14 = v24;
if ( v12 )
goto LABEL_10;
v15 = (char *)&v20 + 1;
LABEL_11:
v16 = v25;
LABEL_14:
v17 = v14;
if ( v14 >= v13 )
v17 = v13;
if ( !v17 || (v18 = memcmp(v15, v16, v17)) == 0 )
{
if ( v13 < v14 )
v18 = -1;
else
v18 = v13 > v14;
}
std::string::~string((int)&v23);
result = std::string::~string((int)&v20);
if ( v18 )
return PlatformToolbox::reportAchievementWithID((int)CString, a3, v19);
return result;
}