{"type": "func", "start": 4295916820, "end": 4295917140, "name": "AchievementManager::getAllAchievementsSorted", "pseudocode": "// \n// AchievementManager::getAllAchievementsSorted from 0x1000e7d14 to 0x1000e7e54 (320 bytes)\n// \n// 2 xrefs:\n// > AchievementManager::init @ 0x1000b6e14\n// > AchievementManager::init @ 0x1000b6e28\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\ncocos2d::CCArray *__fastcall AchievementManager::getAllAchievementsSorted(AchievementManager *a1, bool a2)\n{\n  _BOOL4 v2; // w20\n  cocos2d::CCArray *v4; // x22\n  cocos2d::CCArray *v5; // x19\n  __int64 v6; // x23\n  cocos2d::CCString *v7; // x0\n  char *CString; // x0\n  cocos2d::CCDictionary *m_platformAchievements; // x25\n  __int64 v10; // x25\n  __int64 v11; // x0\n  __int64 v12; // x26\n  void *__p[2]; // [xsp+8h] [xbp-58h] BYREF\n  char v15; // [xsp+1Fh] [xbp-41h]\n\n  v2 = a2;\n  v4 = cocos2d::CCDictionary::allKeys(a1->m_platformAchievements);\n  v5 = (cocos2d::CCArray *)sub_10024A15C(v4);\n  if ( (unsigned int)sub_10024A36C(v4) )\n  {\n    v6 = 0;\n    while ( 1 )\n    {\n      v7 = (cocos2d::CCString *)sub_10024A388(v4, v6);\n      CString = (char *)cocos2d::CCString::getCString(v7);\n      m_platformAchievements = a1->m_platformAchievements;\n      sub_100009900(__p, CString);\n      v10 = cocos2d::CCDictionary::objectForKey_1(m_platformAchievements, __p);\n      if ( v15 < 0 )\n      {\n        operator delete(__p[0]);\n        if ( !v2 )\n          goto LABEL_9;\n      }\n      else if ( !v2 )\n      {\n        goto LABEL_9;\n      }\n      sub_100009900(__p, \"un\");\n      v11 = cocos2d::CCDictionary::objectForKey_1(v10, __p);\n      v12 = v11;\n      if ( v15 < 0 )\n        break;\n      if ( !v11 )\n        goto LABEL_9;\nLABEL_10:\n      v6 = (unsigned int)(v6 + 1);\n      if ( (unsigned int)v6 >= (unsigned int)sub_10024A36C(v4) )\n        goto LABEL_14;\n    }\n    operator delete(__p[0]);\n    if ( v12 )\n      goto LABEL_10;\nLABEL_9:\n    sub_10024A2D0(v5, v10);\n    goto LABEL_10;\n  }\nLABEL_14:\n  if ( (unsigned int)sub_10024A36C(v5) )\n    qsort(v5->data->arr, v5->data->num, 8u, (int (__cdecl *)(const void *, const void *))sub_1000B6C78);\n  return v5;\n}", "assembly": "; \n; AchievementManager::getAllAchievementsSorted from 0x1000e7d14 to 0x1000e7e54 (320 bytes)\n; \n; 2 xrefs:\n; > AchievementManager::init @ 0x1000b6e14\n; > AchievementManager::init @ 0x1000b6e28\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSUB             SP, SP, #0x70                                          ; +0x0, 0x1000e7d14\nSTP             X26, X25, [SP,#0x60+var_40]                            ; +0x4, 0x1000e7d18\nSTP             X24, X23, [SP,#0x60+var_30]                            ; +0x8, 0x1000e7d1c\nSTP             X22, X21, [SP,#0x60+var_20]                            ; +0xc, 0x1000e7d20\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0x10, 0x1000e7d24\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0x14, 0x1000e7d28\nADD             X29, SP, #0x60                                         ; +0x18, 0x1000e7d2c\nMOV             X20, X1                                                ; +0x1c, 0x1000e7d30\nMOV             X21, X0                                                ; +0x20, 0x1000e7d34\nLDR             X0, [X0,#0x148]                                        ; +0x24, 0x1000e7d38\nBL              cocos2d__CCDictionary__allKeys                         ; +0x28, 0x1000e7d3c\nMOV             X22, X0                                                ; +0x2c, 0x1000e7d40\nBL              sub_10024A15C                                          ; +0x30, 0x1000e7d44\nMOV             X19, X0                                                ; +0x34, 0x1000e7d48\nMOV             X0, X22                                                ; +0x38, 0x1000e7d4c\nBL              sub_10024A36C                                          ; +0x3c, 0x1000e7d50\nCBZ             W0, loc_1000E7E0C                                      ; +0x40, 0x1000e7d54\nMOV             W23, #0                                                ; +0x44, 0x1000e7d58\nADRL            X24, aUn; \"un\"                                         ; +0x48, 0x1000e7d5c\nMOV             X0, X22                                                ; +0x50, 0x1000e7d64\nMOV             X1, X23                                                ; +0x54, 0x1000e7d68\nBL              sub_10024A388                                          ; +0x58, 0x1000e7d6c\nBL              cocos2d__CCString__getCString                          ; +0x5c, 0x1000e7d70\nMOV             X1, X0; __s                                            ; +0x60, 0x1000e7d74\nLDR             X25, [X21,#0x148]                                      ; +0x64, 0x1000e7d78\nADD             X0, SP, #0x60+__p; int                                 ; +0x68, 0x1000e7d7c\nBL              sub_100009900                                          ; +0x6c, 0x1000e7d80\nADD             X1, SP, #0x60+__p                                      ; +0x70, 0x1000e7d84\nMOV             X0, X25                                                ; +0x74, 0x1000e7d88\nBL              cocos2d__CCDictionary__objectForKey_1                  ; +0x78, 0x1000e7d8c\nMOV             X25, X0                                                ; +0x7c, 0x1000e7d90\nLDRSB           W8, [SP,#0x60+var_41]                                  ; +0x80, 0x1000e7d94\nTBNZ            W8, #0x1F, loc_1000E7DA4                               ; +0x84, 0x1000e7d98\nCBNZ            W20, loc_1000E7DB0                                     ; +0x88, 0x1000e7d9c\nB               loc_1000E7DD8                                          ; +0x8c, 0x1000e7da0\nLDR             X0, [SP,#0x60+__p]; __p                                ; +0x90, 0x1000e7da4\nBL              __ZdlPv; operator delete(void *)                       ; +0x94, 0x1000e7da8\nCBZ             W20, loc_1000E7DD8                                     ; +0x98, 0x1000e7dac\nADD             X0, SP, #0x60+__p; int                                 ; +0x9c, 0x1000e7db0\nMOV             X1, X24; __s                                           ; +0xa0, 0x1000e7db4\nBL              sub_100009900                                          ; +0xa4, 0x1000e7db8\nADD             X1, SP, #0x60+__p                                      ; +0xa8, 0x1000e7dbc\nMOV             X0, X25                                                ; +0xac, 0x1000e7dc0\nBL              cocos2d__CCDictionary__objectForKey_1                  ; +0xb0, 0x1000e7dc4\nMOV             X26, X0                                                ; +0xb4, 0x1000e7dc8\nLDRSB           W8, [SP,#0x60+var_41]                                  ; +0xb8, 0x1000e7dcc\nTBNZ            W8, #0x1F, loc_1000E7DFC                               ; +0xbc, 0x1000e7dd0\nCBNZ            X26, loc_1000E7DE4                                     ; +0xc0, 0x1000e7dd4\nMOV             X0, X19                                                ; +0xc4, 0x1000e7dd8\nMOV             X1, X25                                                ; +0xc8, 0x1000e7ddc\nBL              sub_10024A2D0                                          ; +0xcc, 0x1000e7de0\nADD             W23, W23, #1                                           ; +0xd0, 0x1000e7de4\nMOV             X0, X22                                                ; +0xd4, 0x1000e7de8\nBL              sub_10024A36C                                          ; +0xd8, 0x1000e7dec\nCMP             W23, W0                                                ; +0xdc, 0x1000e7df0\nB.CC            loc_1000E7D64                                          ; +0xe0, 0x1000e7df4\nB               loc_1000E7E0C                                          ; +0xe4, 0x1000e7df8\nLDR             X0, [SP,#0x60+__p]; __p                                ; +0xe8, 0x1000e7dfc\nBL              __ZdlPv; operator delete(void *)                       ; +0xec, 0x1000e7e00\nCBNZ            X26, loc_1000E7DE4                                     ; +0xf0, 0x1000e7e04\nB               loc_1000E7DD8                                          ; +0xf4, 0x1000e7e08\nMOV             X0, X19                                                ; +0xf8, 0x1000e7e0c\nBL              sub_10024A36C                                          ; +0xfc, 0x1000e7e10\nCBZ             W0, loc_1000E7E34                                      ; +0x100, 0x1000e7e14\nLDR             X8, [X19,#0x38]                                        ; +0x104, 0x1000e7e18\nLDR             X0, [X8,#0x10]; __base                                 ; +0x108, 0x1000e7e1c\nLDR             W1, [X8]; __nel                                        ; +0x10c, 0x1000e7e20\nADRL            X3, sub_1000B6C78; __compar                            ; +0x110, 0x1000e7e24\nMOV             W2, #8; __width                                        ; +0x118, 0x1000e7e2c\nBL              _qsort                                                 ; +0x11c, 0x1000e7e30\nMOV             X0, X19                                                ; +0x120, 0x1000e7e34\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x124, 0x1000e7e38\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x128, 0x1000e7e3c\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0x12c, 0x1000e7e40\nLDP             X24, X23, [SP,#0x60+var_30]                            ; +0x130, 0x1000e7e44\nLDP             X26, X25, [SP,#0x60+var_40]                            ; +0x134, 0x1000e7e48\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x138, 0x1000e7e4c\nRET                                                                    ; +0x13c, 0x1000e7e50", "xrefs": ["AchievementManager::init @ 0x1000b6e14", "AchievementManager::init @ 0x1000b6e28"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}