//
// achievementStrCompare from 0x4ee1f0 to 0x4ee3b4 (452 bytes)
//
// 1 xrefs:
// > ??> @ 0x3c888
//
// 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
//
__int64 __fastcall achievementStrCompare(cocos2d::CCDictionary **a1, cocos2d::CCDictionary **a2)
{
cocos2d::CCDictionary *v2; // x21
cocos2d::CCDictionary *v3; // x23
cocos2d::CCString *v4; // x0
const char *CString; // x19
cocos2d::CCString *v6; // x0
const char *v7; // x0
unsigned int v8; // w22
char *v9; // x0
char *v10; // x0
unsigned int *v12; // x1
int v13; // w2
unsigned int *v14; // x1
int v15; // w2
std::string v16; // [xsp+58h] [xbp+58h] BYREF
std::string v17; // [xsp+60h] [xbp+60h] BYREF
v2 = *a1;
v3 = *a2;
sub_D153B8((int)&v16, "icon");
v4 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v2, &v16);
CString = cocos2d::CCString::getCString(v4);
sub_D153B8((int)&v17, "icon");
v6 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v17);
v7 = cocos2d::CCString::getCString(v6);
v8 = strcmp(CString, v7);
v9 = (char *)v17.m_data.m_data - 24;
if ( (__int64 *)v17.m_data.m_data - 3 != &qword_124B6B0 )
{
if ( &pthread_create )
{
v12 = (unsigned int *)((char *)v17.m_data.m_data - 8);
do
v13 = __ldaxr(v12);
while ( __stlxr(v13 - 1, v12) );
}
else
{
v13 = *((_DWORD *)v17.m_data.m_data - 2);
*((_DWORD *)v17.m_data.m_data - 2) = v13 - 1;
}
if ( v13 <= 0 )
operator delete(v9);
}
v10 = (char *)v16.m_data.m_data - 24;
if ( (__int64 *)v16.m_data.m_data - 3 != &qword_124B6B0 )
{
if ( &pthread_create )
{
v14 = (unsigned int *)((char *)v16.m_data.m_data - 8);
do
v15 = __ldaxr(v14);
while ( __stlxr(v15 - 1, v14) );
}
else
{
v15 = *((_DWORD *)v16.m_data.m_data - 2);
*((_DWORD *)v16.m_data.m_data - 2) = v15 - 1;
}
if ( v15 <= 0 )
operator delete(v10);
}
return v8;
}