//
// AchievementManager::notifyAchievementWithID from 0x6793bc to 0x67958c (464 bytes)
//
// 2 xrefs:
// > AchievementManager::reportAchievementWithID @ 0x685940
// > ??> @ 0x641b0
//
// 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:20 +0000
//
__int64 __fastcall AchievementManager::notifyAchievementWithID(AchievementManager *this, char *a2)
{
__int64 v3; // x21
size_t v4; // x0
__int64 v5; // x21
cocos2d::CCString *v6; // x0
AchievementBar *CString; // x23
cocos2d::CCString *v8; // x0
const char *v9; // x22
cocos2d::CCString *v10; // x0
const char *v11; // x20
AchievementNotifier *v12; // x0
cocos2d::CCArray **v13; // x0
AchievementNotifier *v15; // [xsp+50h] [xbp+50h] BYREF
__int64 v16; // [xsp+58h] [xbp+58h]
void *v17; // [xsp+60h] [xbp+60h]
if ( !*((_BYTE *)this + 360) )
{
v3 = *((_QWORD *)this + 41);
v15 = nullptr;
v16 = 0;
v17 = nullptr;
v4 = strlen(a2);
std::string::__init((__int64 *)&v15, a2, v4);
v5 = cocos2d::CCDictionary::objectForKey(v3, &v15);
if ( ((unsigned __int8)v15 & 1) != 0 )
operator delete(v17);
if ( v5 )
{
v15 = nullptr;
v16 = 0;
v17 = nullptr;
std::string::__init((__int64 *)&v15, "title", 5u);
v6 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v5, &v15);
CString = (AchievementBar *)cocos2d::CCString::getCString(v6);
if ( ((unsigned __int8)v15 & 1) != 0 )
operator delete(v17);
v15 = nullptr;
v16 = 0;
v17 = nullptr;
std::string::__init((__int64 *)&v15, "achievedDescription", 0x13u);
v8 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v5, &v15);
v9 = (const char *)cocos2d::CCString::getCString(v8);
if ( ((unsigned __int8)v15 & 1) != 0 )
operator delete(v17);
v15 = nullptr;
v16 = 0;
v17 = nullptr;
std::string::__init((__int64 *)&v15, "icon", 4u);
v10 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v5, &v15);
v11 = (const char *)cocos2d::CCString::getCString(v10);
v12 = (AchievementNotifier *)(unsigned __int8)v15;
if ( ((unsigned __int8)v15 & 1) != 0 )
operator delete(v17);
v13 = (cocos2d::CCArray **)AchievementNotifier::sharedState(v12);
AchievementNotifier::notifyAchievement(v13, CString, v9, v11, 0);
}
}
return _stack_chk_guard;
}