{"type": "func", "start": 5371762480, "end": 5371762696, "name": "GameStatsManager::getItemUnlockState", "pseudocode": "// \n// GameStatsManager::getItemUnlockState from 0x1402e9730 to 0x1402e9808 (216 bytes)\n// \n// 4 xrefs:\n// > CharacterColorPage::updateColorMode @ 0x1400a2359\n// > GJGarageLayer::setupSpecialPage @ 0x14037f8d8\n// > ItemInfoPopup::init @ 0x140384cb8\n// > <???> @ 0x14091e08c\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 11:29:51 +0000\n// \n\n// Hidden C++ exception states: #wind=1\n__int64 __fastcall GameStatsManager::getItemUnlockState(__int64 a1, signed int a2, signed int a3)\n{\n  _QWORD *ItemKey; // rax\n  __int64 v7; // rsi\n  __int64 *v9; // r8\n  __int64 *v10; // rax\n  char v11; // dl\n  __int64 *v12; // rcx\n  _QWORD v13[4]; // [rsp+20h] [rbp-48h] BYREF\n\n  ItemKey = GameStatsManager::getItemKey(a1, v13, a2, a3);\n  v7 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 936), ItemKey);\n  sub_14003D310((__int64)v13);\n  if ( v7 )\n    return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 56LL))(v7);\n  v9 = *(__int64 **)(a1 + 976);\n  v10 = (__int64 *)v9[1];\n  if ( !*((_BYTE *)v10 + 25) )\n  {\n    do\n    {\n      if ( *((_DWORD *)v10 + 7) < a3 || *((_DWORD *)v10 + 7) <= a3 && *((_DWORD *)v10 + 8) < a2 )\n      {\n        v11 = 1;\n      }\n      else\n      {\n        v11 = 0;\n        v9 = v10;\n      }\n      v12 = v10 + 2;\n      if ( !v11 )\n        v12 = v10;\n      v10 = (__int64 *)*v12;\n    }\n    while ( !*(_BYTE *)(*v12 + 25) );\n  }\n  if ( *((_BYTE *)v9 + 25) || a3 < *((_DWORD *)v9 + 7) || a3 <= *((_DWORD *)v9 + 7) && a2 < *((_DWORD *)v9 + 8) )\n    return 0;\n  else\n    return 3;\n}", "assembly": "; \n; GameStatsManager::getItemUnlockState from 0x1402e9730 to 0x1402e9808 (216 bytes)\n; \n; 4 xrefs:\n; > CharacterColorPage::updateColorMode @ 0x1400a2359\n; > GJGarageLayer::setupSpecialPage @ 0x14037f8d8\n; > ItemInfoPopup::init @ 0x140384cb8\n; > <???> @ 0x14091e08c\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 11:29:51 +0000\n; \nmov     [rsp+arg_18], rbx                                              ; +0x0, 0x1402e9730\npush    rbp                                                            ; +0x5, 0x1402e9735\npush    rsi                                                            ; +0x6, 0x1402e9736\npush    rdi                                                            ; +0x7, 0x1402e9737\nsub     rsp, 50h                                                       ; +0x8, 0x1402e9738\nmov     rax, cs:__security_cookie                                      ; +0xc, 0x1402e973c\nxor     rax, rsp                                                       ; +0x13, 0x1402e9743\nmov     [rsp+68h+var_28], rax                                          ; +0x16, 0x1402e9746\nmov     ebx, r8d                                                       ; +0x1b, 0x1402e974b\nmov     edi, edx                                                       ; +0x1e, 0x1402e974e\nmov     rbp, rcx                                                       ; +0x20, 0x1402e9750\nmov     r9d, r8d                                                       ; +0x23, 0x1402e9753\nmov     r8d, edx                                                       ; +0x26, 0x1402e9756\nlea     rdx, [rsp+68h+var_48]                                          ; +0x29, 0x1402e9759\ncall    GameStatsManager__getItemKey                                   ; +0x2e, 0x1402e975e\nnop                                                                    ; +0x33, 0x1402e9763\nmov     rdx, rax                                                       ; +0x34, 0x1402e9764\nmov     rcx, [rbp+3A8h]                                                ; +0x37, 0x1402e9767\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::objectForKey(std::string const &) ; +0x3e, 0x1402e976e\nmov     rsi, rax                                                       ; +0x44, 0x1402e9774\nlea     rcx, [rsp+68h+var_48]                                          ; +0x47, 0x1402e9777\ncall    sub_14003D310                                                  ; +0x4c, 0x1402e977c\ntest    rsi, rsi                                                       ; +0x51, 0x1402e9781\njz      short loc_1402E9794                                            ; +0x54, 0x1402e9784\nmov     rcx, [rsi]                                                     ; +0x56, 0x1402e9786\nmov     rdx, [rcx+38h]                                                 ; +0x59, 0x1402e9789\nmov     rcx, rsi                                                       ; +0x5d, 0x1402e978d\ncall    rdx                                                            ; +0x60, 0x1402e9790\njmp     short loc_1402E97EB                                            ; +0x62, 0x1402e9792\nmov     r8, [rbp+3D0h]                                                 ; +0x64, 0x1402e9794\nmov     rax, [r8+8]                                                    ; +0x6b, 0x1402e979b\ncmp     byte ptr [rax+19h], 0                                          ; +0x6f, 0x1402e979f\njnz     short loc_1402E97CD                                            ; +0x73, 0x1402e97a3\ncmp     [rax+1Ch], ebx                                                 ; +0x75, 0x1402e97a5\njl      short loc_1402E97B8                                            ; +0x78, 0x1402e97a8\njg      short loc_1402E97B1                                            ; +0x7a, 0x1402e97aa\ncmp     [rax+20h], edi                                                 ; +0x7c, 0x1402e97ac\njl      short loc_1402E97B8                                            ; +0x7f, 0x1402e97af\nxor     edx, edx                                                       ; +0x81, 0x1402e97b1\nmov     r8, rax                                                        ; +0x83, 0x1402e97b3\njmp     short loc_1402E97BA                                            ; +0x86, 0x1402e97b6\nmov     dl, 1                                                          ; +0x88, 0x1402e97b8\nlea     rcx, [rax+10h]                                                 ; +0x8a, 0x1402e97ba\ntest    dl, dl                                                         ; +0x8e, 0x1402e97be\ncmovz   rcx, rax                                                       ; +0x90, 0x1402e97c0\nmov     rax, [rcx]                                                     ; +0x94, 0x1402e97c4\ncmp     byte ptr [rax+19h], 0                                          ; +0x97, 0x1402e97c7\njz      short loc_1402E97A5                                            ; +0x9b, 0x1402e97cb\ncmp     byte ptr [r8+19h], 0                                           ; +0x9d, 0x1402e97cd\njnz     short loc_1402E97E9                                            ; +0xa2, 0x1402e97d2\ncmp     ebx, [r8+1Ch]                                                  ; +0xa4, 0x1402e97d4\njl      short loc_1402E97E9                                            ; +0xa8, 0x1402e97d8\njg      short loc_1402E97E2                                            ; +0xaa, 0x1402e97da\ncmp     edi, [r8+20h]                                                  ; +0xac, 0x1402e97dc\njl      short loc_1402E97E9                                            ; +0xb0, 0x1402e97e0\nmov     eax, 3                                                         ; +0xb2, 0x1402e97e2\njmp     short loc_1402E97EB                                            ; +0xb7, 0x1402e97e7\nxor     eax, eax                                                       ; +0xb9, 0x1402e97e9\nmov     rcx, [rsp+68h+var_28]                                          ; +0xbb, 0x1402e97eb\nxor     rcx, rsp; StackCookie                                          ; +0xc0, 0x1402e97f0\ncall    __security_check_cookie                                        ; +0xc3, 0x1402e97f3\nmov     rbx, [rsp+68h+arg_18]                                          ; +0xc8, 0x1402e97f8\nadd     rsp, 50h                                                       ; +0xd0, 0x1402e9800\npop     rdi                                                            ; +0xd4, 0x1402e9804\npop     rsi                                                            ; +0xd5, 0x1402e9805\npop     rbp                                                            ; +0xd6, 0x1402e9806\nretn                                                                   ; +0xd7, 0x1402e9807", "xrefs": ["CharacterColorPage::updateColorMode @ 0x1400a2359", "GJGarageLayer::setupSpecialPage @ 0x14037f8d8", "ItemInfoPopup::init @ 0x140384cb8", "<???> @ 0x14091e08c"], "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"}