//
// GJGarageLayer::achievementForUnlock from 0x402b00 to 0x402b94 (148 bytes)
//
// 0 xrefs:
//
// 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
//
_DWORD *__fastcall GJGarageLayer::achievementForUnlock(_DWORD *a1, int a2, const char *a3, const char *a4)
{
AchievementManager *v7; // r0
AchievementManager *v8; // r8
stl::StringData::Internal *v9; // r2
stl::StringData::Internal *v10; // r3
cocos2d::CCDictionary *v11; // r8
void *v13; // [sp+4h] [bp-Ch] BYREF
const char *v14[2]; // [sp+8h] [bp-8h] BYREF
v13 = (void *)a2;
v14[0] = a3;
v14[1] = a4;
v7 = AchievementManager::sharedState();
AchievementManager::achievementForUnlock((int)&v13, (int)v7, a2, (int)a3);
v8 = AchievementManager::sharedState();
sub_775C20(v14);
v11 = AchievementManager::isAchievementAvailable(v8, v14, v9, v10);
sub_774008(v14);
if ( v11 )
{
*a1 = v13;
v13 = &unk_ACDDA8;
}
else
{
sub_776584((int)a1, (char *)&unk_939830);
}
sub_774008(&v13);
return a1;
}