// // GJGarageLayer::achievementForUnlock from 0x791548 to 0x791734 (492 bytes) // // 1 xrefs: // > @ 0x3ae78 // // 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 // char **__usercall GJGarageLayer::achievementForUnlock@(signed int a1@, int a2@, char **a3@) { AchievementManager *v4; // x0 AchievementManager *v5; // x24 int isAchievementAvailable; // w23 char *v7; // x0 char *v9; // x1 unsigned int *v10; // x0 int v11; // w2 unsigned int *v12; // x1 int v13; // w2 char *v16; // [xsp+58h] [xbp+58h] BYREF const char *v17; // [xsp+60h] [xbp+60h] BYREF v4 = AchievementManager::sharedState(); AchievementManager::achievementForUnlock((__int64)v4, a1, a2, (__int64)&v16); v5 = AchievementManager::sharedState(); sub_D18D28(&v17); isAchievementAvailable = (unsigned __int8)AchievementManager::isAchievementAvailable(v5, &v17); v7 = (char *)(v17 - 24); if ( v17 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v12 = (unsigned int *)(v17 - 8); do v13 = __ldaxr(v12); while ( __stlxr(v13 - 1, v12) ); } else { v13 = *((_DWORD *)v17 - 2); *((_DWORD *)v17 - 2) = v13 - 1; } if ( v13 <= 0 ) operator delete(v7); } if ( isAchievementAvailable ) { *a3 = v16; v16 = &byte_124B6C8; } else { sub_D153B8((int)a3, &byte_F288A0); v9 = v16 - 24; if ( v16 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v10 = (unsigned int *)(v16 - 8); do v11 = __ldaxr(v10); while ( __stlxr(v11 - 1, v10) ); } else { v11 = *((_DWORD *)v16 - 2); *((_DWORD *)v16 - 2) = v11 - 1; } if ( v11 <= 0 ) operator delete(v9); } } return a3; }
GD Web Decomp Icon

GD Web Decomp

Raw Source