{"type": "func", "start": 4302852656, "end": 4302852782, "name": "AchievementManager::limitForAchievement", "pseudocode": "// \n// AchievementManager::limitForAchievement from 0x100785230 to 0x1007852ae (126 bytes)\n// \n// 1 xrefs:\n// > ItemInfoPopup::init @ 0x100371d96\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\n__int64 __fastcall AchievementManager::limitForAchievement(AchievementManager *a1, __int64 a2)\n{\n  cocos2d::CCDictionary *AchievementsWithID; // rax\n  unsigned int v3; // ebx\n  cocos2d::CCString *v4; // r14\n  char v6; // [rsp+8h] [rbp-28h] BYREF\n  char v7[15]; // [rsp+9h] [rbp-27h] BYREF\n  void *__p; // [rsp+18h] [rbp-18h]\n\n  if ( (*(_BYTE *)a2 & 1) != 0 )\n  {\n    AchievementsWithID = AchievementManager::getAchievementsWithID(a1, *(const char **)(a2 + 16));\n    v3 = 0;\n    if ( !AchievementsWithID )\n      return v3;\n  }\n  else\n  {\n    AchievementsWithID = AchievementManager::getAchievementsWithID(a1, (const char *)(a2 + 1));\n    v3 = 0;\n    if ( !AchievementsWithID )\n      return v3;\n  }\n  v6 = 12;\n  strcpy(v7, \"limits\");\n  v4 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey_1((__int64)AchievementsWithID, &v6);\n  if ( (v6 & 1) != 0 )\n    operator delete(__p);\n  if ( v4 )\n    return (unsigned int)cocos2d::CCString::intValue(v4);\n  return v3;\n}", "assembly": "; \n; AchievementManager::limitForAchievement from 0x100785230 to 0x1007852ae (126 bytes)\n; \n; 1 xrefs:\n; > ItemInfoPopup::init @ 0x100371d96\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\npush    rbp                                                            ; +0x0, 0x100785230\nmov     rbp, rsp                                                       ; +0x1, 0x100785231\npush    r14                                                            ; +0x4, 0x100785234\npush    rbx                                                            ; +0x6, 0x100785236\nsub     rsp, 20h                                                       ; +0x7, 0x100785237\ntest    byte ptr [rsi], 1                                              ; +0xb, 0x10078523b\njnz     short loc_100785251                                            ; +0xe, 0x10078523e\ninc     rsi                                                            ; +0x10, 0x100785240\ncall    AchievementManager__getAchievementsWithID                      ; +0x13, 0x100785243\nxor     ebx, ebx                                                       ; +0x18, 0x100785248\ntest    rax, rax                                                       ; +0x1a, 0x10078524a\njnz     short loc_100785261                                            ; +0x1d, 0x10078524d\njmp     short loc_1007852A3                                            ; +0x1f, 0x10078524f\nmov     rsi, [rsi+10h]                                                 ; +0x21, 0x100785251\ncall    AchievementManager__getAchievementsWithID                      ; +0x25, 0x100785255\nxor     ebx, ebx                                                       ; +0x2a, 0x10078525a\ntest    rax, rax                                                       ; +0x2c, 0x10078525c\njz      short loc_1007852A3                                            ; +0x2f, 0x10078525f\nmov     [rbp+var_28], 0Ch                                              ; +0x31, 0x100785261\nmov     dword ptr [rbp+var_27], 696D696Ch                              ; +0x35, 0x100785265\nmov     word ptr [rbp+var_27+4], 7374h                                 ; +0x3c, 0x10078526c\nmov     [rbp+var_27+6], 0                                              ; +0x42, 0x100785272\nlea     rsi, [rbp+var_28]                                              ; +0x46, 0x100785276\nmov     rdi, rax                                                       ; +0x4a, 0x10078527a\ncall    cocos2d__CCDictionary__objectForKey_1                          ; +0x4d, 0x10078527d\nmov     r14, rax                                                       ; +0x52, 0x100785282\ntest    [rbp+var_28], 1                                                ; +0x55, 0x100785285\njz      short loc_100785294                                            ; +0x59, 0x100785289\nmov     rdi, [rbp+__p]; __p                                            ; +0x5b, 0x10078528b\ncall    __ZdlPv; operator delete(void *)                               ; +0x5f, 0x10078528f\ntest    r14, r14                                                       ; +0x64, 0x100785294\njz      short loc_1007852A3                                            ; +0x67, 0x100785297\nmov     rdi, r14                                                       ; +0x69, 0x100785299\ncall    cocos2d__CCString__intValue                                    ; +0x6c, 0x10078529c\nmov     ebx, eax                                                       ; +0x71, 0x1007852a1\nmov     eax, ebx                                                       ; +0x73, 0x1007852a3\nadd     rsp, 20h                                                       ; +0x75, 0x1007852a5\npop     rbx                                                            ; +0x79, 0x1007852a9\npop     r14                                                            ; +0x7a, 0x1007852aa\npop     rbp                                                            ; +0x7c, 0x1007852ac\nretn                                                                   ; +0x7d, 0x1007852ad", "xrefs": ["ItemInfoPopup::init @ 0x100371d96"], "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"}