{"type": "func", "start": 4303766672, "end": 4303766798, "name": "AchievementManager::limitForAchievement", "pseudocode": "// \n// AchievementManager::limitForAchievement from 0x100864490 to 0x10086450e (126 bytes)\n// \n// 1 xrefs:\n// > ItemInfoPopup::init @ 0x10035b266\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:36:42 +0000\n// \n\n__int64 __fastcall AchievementManager::limitForAchievement(__int64 a1, __int64 a2)\n{\n  __int64 AchievementsWithID; // rax\n  unsigned int v3; // ebx\n  __int64 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::CCDictionary::objectForKey(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 0x100864490 to 0x10086450e (126 bytes)\n; \n; 1 xrefs:\n; > ItemInfoPopup::init @ 0x10035b266\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:36:42 +0000\n; \npush    rbp                                                            ; +0x0, 0x100864490\nmov     rbp, rsp                                                       ; +0x1, 0x100864491\npush    r14                                                            ; +0x4, 0x100864494\npush    rbx                                                            ; +0x6, 0x100864496\nsub     rsp, 20h                                                       ; +0x7, 0x100864497\ntest    byte ptr [rsi], 1                                              ; +0xb, 0x10086449b\njnz     short loc_1008644B1                                            ; +0xe, 0x10086449e\ninc     rsi                                                            ; +0x10, 0x1008644a0\ncall    AchievementManager__getAchievementsWithID                      ; +0x13, 0x1008644a3\nxor     ebx, ebx                                                       ; +0x18, 0x1008644a8\ntest    rax, rax                                                       ; +0x1a, 0x1008644aa\njnz     short loc_1008644C1                                            ; +0x1d, 0x1008644ad\njmp     short loc_100864503                                            ; +0x1f, 0x1008644af\nmov     rsi, [rsi+10h]                                                 ; +0x21, 0x1008644b1\ncall    AchievementManager__getAchievementsWithID                      ; +0x25, 0x1008644b5\nxor     ebx, ebx                                                       ; +0x2a, 0x1008644ba\ntest    rax, rax                                                       ; +0x2c, 0x1008644bc\njz      short loc_100864503                                            ; +0x2f, 0x1008644bf\nmov     [rbp+var_28], 0Ch                                              ; +0x31, 0x1008644c1\nmov     dword ptr [rbp+var_27], 696D696Ch                              ; +0x35, 0x1008644c5\nmov     word ptr [rbp+var_27+4], 7374h                                 ; +0x3c, 0x1008644cc\nmov     [rbp+var_27+6], 0                                              ; +0x42, 0x1008644d2\nlea     rsi, [rbp+var_28]                                              ; +0x46, 0x1008644d6\nmov     rdi, rax                                                       ; +0x4a, 0x1008644da\ncall    cocos2d__CCDictionary__objectForKey                            ; +0x4d, 0x1008644dd\nmov     r14, rax                                                       ; +0x52, 0x1008644e2\ntest    [rbp+var_28], 1                                                ; +0x55, 0x1008644e5\njz      short loc_1008644F4                                            ; +0x59, 0x1008644e9\nmov     rdi, [rbp+__p]; __p                                            ; +0x5b, 0x1008644eb\ncall    __ZdlPv; operator delete(void *)                               ; +0x5f, 0x1008644ef\ntest    r14, r14                                                       ; +0x64, 0x1008644f4\njz      short loc_100864503                                            ; +0x67, 0x1008644f7\nmov     rdi, r14                                                       ; +0x69, 0x1008644f9\ncall    cocos2d__CCString__intValue                                    ; +0x6c, 0x1008644fc\nmov     ebx, eax                                                       ; +0x71, 0x100864501\nmov     eax, ebx                                                       ; +0x73, 0x100864503\nadd     rsp, 20h                                                       ; +0x75, 0x100864505\npop     rbx                                                            ; +0x79, 0x100864509\npop     r14                                                            ; +0x7a, 0x10086450a\npop     rbp                                                            ; +0x7c, 0x10086450c\nretn                                                                   ; +0x7d, 0x10086450d", "xrefs": ["ItemInfoPopup::init @ 0x10035b266"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}