{"type": "func", "start": 4295920200, "end": 4295920412, "name": "AchievementManager::reportAchievementWithID", "pseudocode": "// \n// AchievementManager::reportAchievementWithID from 0x1000e8a48 to 0x1000e8b1c (212 bytes)\n// \n// 1 xrefs:\n// > GameManager::reportAchievementWithID @ 0x100313d60\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\nvoid __fastcall AchievementManager::reportAchievementWithID(AchievementManager *a1, const char *a2, int a3, bool a4)\n{\n  cocos2d::CCDictionary *m_reportedAchievements; // x22\n  __int64 v9; // x23\n  AchievementManager *v10; // x0\n  void *__p[2]; // [xsp+8h] [xbp-48h] BYREF\n  char v12; // [xsp+1Fh] [xbp-31h]\n\n  if ( AchievementManager::percentForAchievement(a1, a2) <= 99 )\n  {\n    if ( AchievementManager::percentForAchievement(a1, a2) < a3 )\n    {\n      if ( a3 >= 100 )\n        a3 = 100;\n      m_reportedAchievements = a1->m_reportedAchievements;\n      v9 = sub_100268F4C(\"%i\", a3);\n      sub_100009900(__p, (char *)a2);\n      cocos2d::CCDictionary::setObject_1(m_reportedAchievements, v9, __p);\n      if ( v12 < 0 )\n        operator delete(__p[0]);\n      PlatformToolbox::reportAchievementWithID(a2, a3);\n    }\n    if ( a3 >= 100 && !a4 )\n    {\n      v10 = AchievementManager::sharedState();\n      AchievementManager::notifyAchievementWithID(v10, a2);\n    }\n  }\n}", "assembly": "; \n; AchievementManager::reportAchievementWithID from 0x1000e8a48 to 0x1000e8b1c (212 bytes)\n; \n; 1 xrefs:\n; > GameManager::reportAchievementWithID @ 0x100313d60\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, #0x60                                          ; +0x0, 0x1000e8a48\nSTP             X24, X23, [SP,#0x50+var_30]                            ; +0x4, 0x1000e8a4c\nSTP             X22, X21, [SP,#0x50+var_20]                            ; +0x8, 0x1000e8a50\nSTP             X20, X19, [SP,#0x50+var_10]                            ; +0xc, 0x1000e8a54\nSTP             X29, X30, [SP,#0x50+var_s0]                            ; +0x10, 0x1000e8a58\nADD             X29, SP, #0x50                                         ; +0x14, 0x1000e8a5c\nMOV             X20, X3                                                ; +0x18, 0x1000e8a60\nMOV             X21, X2                                                ; +0x1c, 0x1000e8a64\nMOV             X19, X1                                                ; +0x20, 0x1000e8a68\nMOV             X22, X0                                                ; +0x24, 0x1000e8a6c\nBL              AchievementManager__percentForAchievement              ; +0x28, 0x1000e8a70\nCMP             W0, #0x63 ; 'c'                                        ; +0x2c, 0x1000e8a74\nB.GT            loc_1000E8B04                                          ; +0x30, 0x1000e8a78\nMOV             X0, X22                                                ; +0x34, 0x1000e8a7c\nMOV             X1, X19                                                ; +0x38, 0x1000e8a80\nBL              AchievementManager__percentForAchievement              ; +0x3c, 0x1000e8a84\nCMP             W0, W21                                                ; +0x40, 0x1000e8a88\nB.GE            loc_1000E8AEC                                          ; +0x44, 0x1000e8a8c\nCMP             W21, #0x64 ; 'd'                                       ; +0x48, 0x1000e8a90\nMOV             W8, #0x64 ; 'd'                                        ; +0x4c, 0x1000e8a94\nCSEL            W21, W21, W8, LT                                       ; +0x50, 0x1000e8a98\nLDR             X22, [X22,#0x160]                                      ; +0x54, 0x1000e8a9c\nSTR             X21, [SP,#0x50+var_50]                                 ; +0x58, 0x1000e8aa0\nADRL            X0, aI; \"%i\"                                           ; +0x5c, 0x1000e8aa4\nBL              sub_100268F4C                                          ; +0x64, 0x1000e8aac\nMOV             X23, X0                                                ; +0x68, 0x1000e8ab0\nADD             X0, SP, #0x50+__p; int                                 ; +0x6c, 0x1000e8ab4\nMOV             X1, X19; __s                                           ; +0x70, 0x1000e8ab8\nBL              sub_100009900                                          ; +0x74, 0x1000e8abc\nADD             X2, SP, #0x50+__p                                      ; +0x78, 0x1000e8ac0\nMOV             X0, X22                                                ; +0x7c, 0x1000e8ac4\nMOV             X1, X23                                                ; +0x80, 0x1000e8ac8\nBL              cocos2d__CCDictionary__setObject_1                     ; +0x84, 0x1000e8acc\nLDRSB           W8, [SP,#0x50+var_31]                                  ; +0x88, 0x1000e8ad0\nTBZ             W8, #0x1F, loc_1000E8AE0                               ; +0x8c, 0x1000e8ad4\nLDR             X0, [SP,#0x50+__p]; __p                                ; +0x90, 0x1000e8ad8\nBL              __ZdlPv; operator delete(void *)                       ; +0x94, 0x1000e8adc\nMOV             X0, X19                                                ; +0x98, 0x1000e8ae0\nMOV             X1, X21                                                ; +0x9c, 0x1000e8ae4\nBL              PlatformToolbox__reportAchievementWithID               ; +0xa0, 0x1000e8ae8\nCMP             W21, #0x64 ; 'd'                                       ; +0xa4, 0x1000e8aec\nB.LT            loc_1000E8B04                                          ; +0xa8, 0x1000e8af0\nTBNZ            W20, #0, loc_1000E8B04                                 ; +0xac, 0x1000e8af4\nBL              AchievementManager__sharedState                        ; +0xb0, 0x1000e8af8\nMOV             X1, X19                                                ; +0xb4, 0x1000e8afc\nBL              AchievementManager__notifyAchievementWithID            ; +0xb8, 0x1000e8b00\nLDP             X29, X30, [SP,#0x50+var_s0]                            ; +0xbc, 0x1000e8b04\nLDP             X20, X19, [SP,#0x50+var_10]                            ; +0xc0, 0x1000e8b08\nLDP             X22, X21, [SP,#0x50+var_20]                            ; +0xc4, 0x1000e8b0c\nLDP             X24, X23, [SP,#0x50+var_30]                            ; +0xc8, 0x1000e8b10\nADD             SP, SP, #0x60 ; '`'                                    ; +0xcc, 0x1000e8b14\nRET                                                                    ; +0xd0, 0x1000e8b18", "xrefs": ["GameManager::reportAchievementWithID @ 0x100313d60"], "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"}