// // sub_140078010 from 0x140078010 to 0x1400781be (430 bytes) // // 2 xrefs: // > sub_140077F10 @ 0x140077f6d // > @ 0x1406c6630 // // 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 // // Hidden C++ exception states: #wind=1 __int64 __fastcall sub_140078010(__int64 a1, __int64 a2) { __int64 result; // rax cocos2d::CCArray *m_allAchievements; // rsi unsigned int i; // ebx struct cocos2d::CCObject *v5; // rax cocos2d::CCString *v6; // rax const char *CString; // rdi void *v8; // rcx AchievementManager *v9; // rax _QWORD *v10; // rax _QWORD *v11; // rax _QWORD v12[2]; // [rsp+20h] [rbp-38h] BYREF __int64 v13; // [rsp+30h] [rbp-28h] unsigned __int64 v14; // [rsp+38h] [rbp-20h] result = *(_QWORD *)a2; if ( *(_QWORD *)(a1 + 392) == *(_QWORD *)a2 && *(_DWORD *)(a2 + 8) == 1 ) { *(_BYTE *)(a1 + 384) = 1; if ( !*(_BYTE *)(a1 + 385) ) { *(_BYTE *)(a1 + 385) = 1; m_allAchievements = AchievementManager::sharedState()->m_allAchievements; for ( i = 0; i < cocos2d::CCArray::count(m_allAchievements); ++i ) { v5 = cocos2d::CCArray::objectAtIndex(m_allAchievements, i); v12[1] = 29285; v13 = 10; v14 = 15; v12[0] = 0x696669746E656469LL; v6 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v5, v12); CString = cocos2d::CCString::getCString(v6); if ( v14 > 0xF ) { v8 = (void *)v12[0]; if ( v14 + 1 >= 0x1000 ) { v8 = *(void **)(v12[0] - 8LL); if ( (unsigned __int64)(v12[0] - (_QWORD)v8 - 8LL) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v8); } v13 = 0; v14 = 15; LOBYTE(v12[0]) = 0; v9 = AchievementManager::sharedState(); if ( AchievementManager::percentForAchievement(v9, CString) >= 100 ) { v10 = (_QWORD *)SteamInternal_ContextInit(&off_1406BA0B0); (*(void (__fastcall **)(_QWORD, const char *))(*(_QWORD *)*v10 + 56LL))(*v10, CString); } } v11 = (_QWORD *)SteamInternal_ContextInit(&off_1406BA0B0); return (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)*v11 + 80LL))(*v11); } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source