{"type": "func", "start": 5370938064, "end": 5370938583, "name": "GameLevelManager::getCompletedDailyLevels", "pseudocode": "// \n// GameLevelManager::getCompletedDailyLevels from 0x1402202d0 to 0x1402204d7 (519 bytes)\n// \n// 2 xrefs:\n// > GameLevelManager::updateUserScore @ 0x140236ed0\n// > <???> @ 0x14091bb60\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:28:24 +0000\n// \n\n// Hidden C++ exception states: #wind=2\n__int64 __fastcall GameLevelManager::getCompletedDailyLevels(__int64 a1)\n{\n  unsigned int v2; // esi\n  struct cocos2d::CCArray *v3; // rax\n  unsigned int *v4; // rdi\n  __int64 v5; // rax\n  cocos2d::CCString **v6; // rdi\n  cocos2d::CCString **i; // rbp\n  cocos2d::CCString *v8; // rbx\n  const char *CString; // rax\n  size_t v10; // r8\n  __int64 v11; // rax\n  _DWORD *v12; // rbx\n  void *v13; // rcx\n  __int64 v14; // rcx\n  void *v16; // [rsp+30h] [rbp-48h]\n  __int128 v17; // [rsp+38h] [rbp-40h] BYREF\n  __int64 v18; // [rsp+48h] [rbp-30h]\n  unsigned __int64 v19; // [rsp+50h] [rbp-28h]\n\n  v2 = 0;\n  v3 = cocos2d::CCDictionary::allKeys(*(cocos2d::CCDictionary **)(a1 + 944));\n  if ( v3 )\n  {\n    v4 = *((unsigned int **)v3 + 7);\n    v5 = *v4;\n    if ( (_DWORD)v5 )\n    {\n      v6 = *((cocos2d::CCString ***)v4 + 2);\n      for ( i = &v6[v5 - 1]; v6 <= i; ++v6 )\n      {\n        v8 = *v6;\n        if ( !*v6 )\n          break;\n        if ( (int)cocos2d::CCString::intValue(*v6) <= 100000 )\n        {\n          CString = cocos2d::CCString::getCString(v8);\n          v17 = 0;\n          v18 = 0;\n          v19 = 0;\n          v10 = -1;\n          do\n            ++v10;\n          while ( CString[v10] );\n          sub_14003D230(&v17, CString, v10);\n          v11 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 944), &v17);\n          v12 = (_DWORD *)_RTDynamicCast(\n                            v11,\n                            0,\n                            &cocos2d::CCObject `RTTI Type Descriptor',\n                            &GJGameLevel `RTTI Type Descriptor',\n                            0);\n          if ( v19 > 0xF )\n          {\n            v13 = (void *)v17;\n            if ( v19 + 1 >= 0x1000 )\n            {\n              v13 = *(void **)(v17 - 8);\n              if ( (unsigned __int64)(v17 - (_QWORD)v13 - 8) > 0x1F )\n                invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n            }\n            j_j_free(v13);\n          }\n          v18 = 0;\n          v19 = 15;\n          LOBYTE(v17) = 0;\n          if ( v12 && v12[255] - v12[256] < 10 && v12[233] - v12[232] == 100 )\n          {\n            v14 = qword_14090BFE0;\n            if ( !qword_14090BFE0 )\n            {\n              v16 = operator new(0x3E8u);\n              qword_14090BFE0 = sub_1402D6480(v16);\n              (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);\n              v14 = qword_14090BFE0;\n            }\n            if ( (unsigned __int8)GameStatsManager::hasCompletedLevel(v14, v12) )\n              ++v2;\n          }\n        }\n      }\n    }\n  }\n  return v2;\n}", "assembly": "; \n; GameLevelManager::getCompletedDailyLevels from 0x1402202d0 to 0x1402204d7 (519 bytes)\n; \n; 2 xrefs:\n; > GameLevelManager::updateUserScore @ 0x140236ed0\n; > <???> @ 0x14091bb60\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:28:24 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1402202d0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1402202d5\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x1402202da\npush    rdi                                                            ; +0xf, 0x1402202df\npush    r14                                                            ; +0x10, 0x1402202e0\npush    r15                                                            ; +0x12, 0x1402202e2\nsub     rsp, 60h                                                       ; +0x14, 0x1402202e4\nmov     rax, cs:__security_cookie                                      ; +0x18, 0x1402202e8\nxor     rax, rsp                                                       ; +0x1f, 0x1402202ef\nmov     [rsp+78h+var_20], rax                                          ; +0x22, 0x1402202f2\nmov     r14, rcx                                                       ; +0x27, 0x1402202f7\nxor     r15d, r15d                                                     ; +0x2a, 0x1402202fa\nmov     esi, r15d                                                      ; +0x2d, 0x1402202fd\nmov     rcx, [rcx+3B0h]                                                ; +0x30, 0x140220300\ncall    cs:?allKeys@CCDictionary@cocos2d@@QEAAPEAVCCArray@2@XZ; cocos2d::CCDictionary::allKeys(void) ; +0x37, 0x140220307\ntest    rax, rax                                                       ; +0x3d, 0x14022030d\njz      loc_140220498                                                  ; +0x40, 0x140220310\nmov     rdi, [rax+38h]                                                 ; +0x46, 0x140220316\nmov     eax, [rdi]                                                     ; +0x4a, 0x14022031a\ntest    eax, eax                                                       ; +0x4c, 0x14022031c\njz      loc_140220498                                                  ; +0x4e, 0x14022031e\nmov     rdi, [rdi+10h]                                                 ; +0x54, 0x140220324\nlea     rbp, [rax-1]                                                   ; +0x58, 0x140220328\nlea     rbp, [rdi+rbp*8]                                               ; +0x5c, 0x14022032c\ncmp     rdi, rbp                                                       ; +0x60, 0x140220330\nja      loc_140220498                                                  ; +0x63, 0x140220333\nnop     dword ptr [rax+00000000h]                                      ; +0x69, 0x140220339\nmov     rbx, [rdi]                                                     ; +0x70, 0x140220340\ntest    rbx, rbx                                                       ; +0x73, 0x140220343\njz      loc_140220498                                                  ; +0x76, 0x140220346\nmov     rcx, rbx                                                       ; +0x7c, 0x14022034c\ncall    cs:?intValue@CCString@cocos2d@@QEBAHXZ; cocos2d::CCString::intValue(void) ; +0x7f, 0x14022034f\ncmp     eax, 186A0h                                                    ; +0x85, 0x140220355\njg      loc_14022048B                                                  ; +0x8a, 0x14022035a\nmov     rcx, rbx                                                       ; +0x90, 0x140220360\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x93, 0x140220363\nxorps   xmm0, xmm0                                                     ; +0x99, 0x140220369\nmovups  [rsp+78h+var_40], xmm0                                         ; +0x9c, 0x14022036c\nmov     [rsp+78h+var_30], r15                                          ; +0xa1, 0x140220371\nmov     [rsp+78h+var_28], r15                                          ; +0xa6, 0x140220376\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0xab, 0x14022037b\ninc     r8                                                             ; +0xb2, 0x140220382\ncmp     byte ptr [rax+r8], 0                                           ; +0xb5, 0x140220385\njnz     short loc_140220382                                            ; +0xba, 0x14022038a\nmov     rdx, rax                                                       ; +0xbc, 0x14022038c\nlea     rcx, [rsp+78h+var_40]                                          ; +0xbf, 0x14022038f\ncall    sub_14003D230                                                  ; +0xc4, 0x140220394\nnop                                                                    ; +0xc9, 0x140220399\nlea     rdx, [rsp+78h+var_40]                                          ; +0xca, 0x14022039a\nmov     rcx, [r14+3B0h]                                                ; +0xcf, 0x14022039f\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 &) ; +0xd6, 0x1402203a6\nmov     rcx, rax                                                       ; +0xdc, 0x1402203ac\nmov     dword ptr [rsp+78h+Reserved], r15d                             ; +0xdf, 0x1402203af\nlea     r9, ??_R0?AVGJGameLevel@@@8; GJGameLevel `RTTI Type Descriptor' ; +0xe4, 0x1402203b4\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0xeb, 0x1402203bb\nxor     edx, edx                                                       ; +0xf2, 0x1402203c2\ncall    __RTDynamicCast                                                ; +0xf4, 0x1402203c4\nmov     rbx, rax                                                       ; +0xf9, 0x1402203c9\nmov     rdx, [rsp+78h+var_28]                                          ; +0xfc, 0x1402203cc\ncmp     rdx, 0Fh                                                       ; +0x101, 0x1402203d1\njbe     short loc_140220409                                            ; +0x105, 0x1402203d5\ninc     rdx                                                            ; +0x107, 0x1402203d7\nmov     rcx, qword ptr [rsp+78h+var_40]                                ; +0x10a, 0x1402203da\nmov     rax, rcx                                                       ; +0x10f, 0x1402203df\ncmp     rdx, 1000h                                                     ; +0x112, 0x1402203e2\njb      short loc_140220404                                            ; +0x119, 0x1402203e9\nadd     rdx, 27h ; '''                                                 ; +0x11b, 0x1402203eb\nmov     rcx, [rcx-8]; Block                                            ; +0x11f, 0x1402203ef\nsub     rax, rcx                                                       ; +0x123, 0x1402203f3\nsub     rax, 8                                                         ; +0x126, 0x1402203f6\ncmp     rax, 1Fh                                                       ; +0x12a, 0x1402203fa\nja      loc_1402204C1                                                  ; +0x12e, 0x1402203fe\ncall    j_j_free                                                       ; +0x134, 0x140220404\nmov     [rsp+78h+var_30], r15                                          ; +0x139, 0x140220409\nmov     [rsp+78h+var_28], 0Fh                                          ; +0x13e, 0x14022040e\nmov     byte ptr [rsp+78h+var_40], 0                                   ; +0x147, 0x140220417\ntest    rbx, rbx                                                       ; +0x14c, 0x14022041c\njz      short loc_14022048B                                            ; +0x14f, 0x14022041f\nmov     eax, [rbx+3FCh]                                                ; +0x151, 0x140220421\nsub     eax, [rbx+400h]                                                ; +0x157, 0x140220427\ncmp     eax, 0Ah                                                       ; +0x15d, 0x14022042d\njge     short loc_14022048B                                            ; +0x160, 0x140220430\nmov     eax, [rbx+3A4h]                                                ; +0x162, 0x140220432\nsub     eax, [rbx+3A0h]                                                ; +0x168, 0x140220438\ncmp     eax, 64h ; 'd'                                                 ; +0x16e, 0x14022043e\njnz     short loc_14022048B                                            ; +0x171, 0x140220441\nmov     rcx, cs:qword_14090BFE0                                        ; +0x173, 0x140220443\ntest    rcx, rcx                                                       ; +0x17a, 0x14022044a\njnz     short loc_14022047D                                            ; +0x17d, 0x14022044d\nmov     ecx, 3E8h; Size                                                ; +0x17f, 0x14022044f\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x184, 0x140220454\nmov     [rsp+78h+var_48], rax                                          ; +0x189, 0x140220459\nmov     rcx, rax                                                       ; +0x18e, 0x14022045e\ncall    sub_1402D6480                                                  ; +0x191, 0x140220461\nmov     rcx, rax                                                       ; +0x196, 0x140220466\nmov     cs:qword_14090BFE0, rax                                        ; +0x199, 0x140220469\nmov     rax, [rax]                                                     ; +0x1a0, 0x140220470\ncall    qword ptr [rax+48h]                                            ; +0x1a3, 0x140220473\nmov     rcx, cs:qword_14090BFE0                                        ; +0x1a6, 0x140220476\nmov     rdx, rbx                                                       ; +0x1ad, 0x14022047d\ncall    GameStatsManager__hasCompletedLevel                            ; +0x1b0, 0x140220480\ntest    al, al                                                         ; +0x1b5, 0x140220485\njz      short loc_14022048B                                            ; +0x1b7, 0x140220487\ninc     esi                                                            ; +0x1b9, 0x140220489\nadd     rdi, 8                                                         ; +0x1bb, 0x14022048b\ncmp     rdi, rbp                                                       ; +0x1bf, 0x14022048f\njbe     loc_140220340                                                  ; +0x1c2, 0x140220492\nmov     eax, esi                                                       ; +0x1c8, 0x140220498\nmov     rcx, [rsp+78h+var_20]                                          ; +0x1ca, 0x14022049a\nxor     rcx, rsp; StackCookie                                          ; +0x1cf, 0x14022049f\ncall    __security_check_cookie                                        ; +0x1d2, 0x1402204a2\nlea     r11, [rsp+78h+var_18]                                          ; +0x1d7, 0x1402204a7\nmov     rbx, [r11+28h]                                                 ; +0x1dc, 0x1402204ac\nmov     rbp, [r11+30h]                                                 ; +0x1e0, 0x1402204b0\nmov     rsi, [r11+38h]                                                 ; +0x1e4, 0x1402204b4\nmov     rsp, r11                                                       ; +0x1e8, 0x1402204b8\npop     r15                                                            ; +0x1eb, 0x1402204bb\npop     r14                                                            ; +0x1ed, 0x1402204bd\npop     rdi                                                            ; +0x1ef, 0x1402204bf\nretn                                                                   ; +0x1f0, 0x1402204c0\nmov     [rsp+78h+Reserved], r15; Reserved                              ; +0x1f1, 0x1402204c1\nxor     r9d, r9d; LineNo                                               ; +0x1f6, 0x1402204c6\nxor     r8d, r8d; FileName                                             ; +0x1f9, 0x1402204c9\nxor     edx, edx; FunctionName                                         ; +0x1fc, 0x1402204cc\nxor     ecx, ecx; Expression                                           ; +0x1fe, 0x1402204ce\ncall    cs:_invoke_watson                                              ; +0x200, 0x1402204d0\ndb 0CCh                                                                ; +0x206, 0x1402204d6", "xrefs": ["GameLevelManager::updateUserScore @ 0x140236ed0", "<???> @ 0x14091bb60"], "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"}