//
// AchievementManager::getAchievementsWithID from 0x1007850d0 to 0x100785193 (195 bytes)
//
// 7 xrefs:
// > GJGarageLayer::titleForUnlock @ 0x10036f609
// > GJGarageLayer::descriptionForUnlock @ 0x10036f779
// > GameManager::getUnlockForAchievement @ 0x10037878f
// > AchievementManager::isAchievementAvailable @ 0x1007851c1
// > AchievementManager::isAchievementAvailable @ 0x100785200
// > AchievementManager::limitForAchievement @ 0x100785243
// > AchievementManager::limitForAchievement @ 0x100785255
//
// 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
//
cocos2d::CCDictionary *__fastcall AchievementManager::getAchievementsWithID(AchievementManager *a1, const char *a2)
{
double v2; // xmm0_8
cocos2d::CCDictionary *m_platformAchievements; // rbx
size_t v4; // rax
size_t v5; // r15
char *v6; // r12
size_t v7; // r13
cocos2d::CCDictionary *result; // rax
cocos2d::CCDictionary *v9; // rbx
_QWORD __dst[2]; // [rsp+0h] [rbp-40h] BYREF
void *__p; // [rsp+10h] [rbp-30h]
m_platformAchievements = a1->m_platformAchievements;
v4 = strlen(a2);
if ( v4 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v2);
v5 = v4;
if ( v4 >= 0x17 )
{
v7 = 26;
if ( (v4 | 7) != 0x17 )
v7 = (v4 | 7) + 1;
v6 = (char *)operator new(v7);
__p = v6;
__dst[0] = v7 + 1;
__dst[1] = v5;
goto LABEL_8;
}
LOBYTE(__dst[0]) = 2 * v4;
v6 = (char *)__dst + 1;
if ( v4 )
LABEL_8:
memcpy(v6, a2, v5);
v6[v5] = 0;
result = (cocos2d::CCDictionary *)cocos2d::CCDictionary::objectForKey_1(
(__int64)m_platformAchievements,
(char *)__dst);
if ( (__dst[0] & 1) != 0 )
{
v9 = result;
operator delete(__p);
return v9;
}
return result;
}