{"type": "func", "start": 5370686688, "end": 5370686941, "name": "GameStatsManager::hasCompletedDailyLevel", "pseudocode": "// \n// GameStatsManager::hasCompletedDailyLevel from 0x1401e2ce0 to 0x1401e2ddd (253 bytes)\n// \n// 4 xrefs:\n// > DailyLevelPage::init @ 0x1400cf72e\n// > DailyLevelPage::dailyStatusFinished @ 0x1400cfab0\n// > GameStatsManager::completedDailyLevel @ 0x1401e2e59\n// > <???> @ 0x1406cc5ac\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// Hidden C++ exception states: #wind=1\nbool GameStatsManager::hasCompletedDailyLevel(GameStatsManager *a1, int a2)\n{\n  cocos2d::CCString *v4; // rax\n  const char *CString; // rax\n  size_t v6; // r8\n  cocos2d::CCDictionary *m_wraithChests; // rcx\n  bool v8; // bl\n  void *v9; // rcx\n  void *Block[2]; // [rsp+28h] [rbp-30h] BYREF\n  __int128 v12; // [rsp+38h] [rbp-20h]\n\n  v4 = cocos2d::CCString::createWithFormat(\"d%i\", a2);\n  CString = cocos2d::CCString::getCString(v4);\n  *(_OWORD *)Block = 0;\n  v12 = 0;\n  v6 = -1;\n  do\n    ++v6;\n  while ( CString[v6] );\n  sub_14003A930(Block, CString, v6);\n  if ( a2 >= 100000 )\n  {\n    if ( a2 >= 200000 )\n      m_wraithChests = a1->m_wraithChests;\n    else\n      m_wraithChests = a1->m_weeklyChest;\n  }\n  else\n  {\n    m_wraithChests = a1->m_challengeDiamonds;\n  }\n  v8 = cocos2d::CCDictionary::objectForKey(m_wraithChests, Block) != 0;\n  if ( *((_QWORD *)&v12 + 1) > 0xFu )\n  {\n    v9 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v12 + 1) + 1LL) >= 0x1000 )\n    {\n      v9 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v9 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v9);\n  }\n  return v8;\n}", "assembly": "; \n; GameStatsManager::hasCompletedDailyLevel from 0x1401e2ce0 to 0x1401e2ddd (253 bytes)\n; \n; 4 xrefs:\n; > DailyLevelPage::init @ 0x1400cf72e\n; > DailyLevelPage::dailyStatusFinished @ 0x1400cfab0\n; > GameStatsManager::completedDailyLevel @ 0x1401e2e59\n; > <???> @ 0x1406cc5ac\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\nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x1401e2ce0\npush    rdi                                                            ; +0x5, 0x1401e2ce5\nsub     rsp, 50h                                                       ; +0x6, 0x1401e2ce6\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x1401e2cea\nxor     rax, rsp                                                       ; +0x11, 0x1401e2cf1\nmov     [rsp+58h+var_10], rax                                          ; +0x14, 0x1401e2cf4\nmov     edi, edx                                                       ; +0x19, 0x1401e2cf9\nmov     rbx, rcx                                                       ; +0x1b, 0x1401e2cfb\nlea     rcx, aDI_0; \"d%i\"                                              ; +0x1e, 0x1401e2cfe\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x25, 0x1401e2d05\nmov     rcx, rax                                                       ; +0x2b, 0x1401e2d0b\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x2e, 0x1401e2d0e\nxorps   xmm0, xmm0                                                     ; +0x34, 0x1401e2d14\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x37, 0x1401e2d17\nxorps   xmm1, xmm1                                                     ; +0x3c, 0x1401e2d1c\nmovdqu  [rsp+58h+var_20], xmm1                                         ; +0x3f, 0x1401e2d1f\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x45, 0x1401e2d25\nnop     dword ptr [rax+00h]                                            ; +0x4c, 0x1401e2d2c\ninc     r8                                                             ; +0x50, 0x1401e2d30\ncmp     byte ptr [rax+r8], 0                                           ; +0x53, 0x1401e2d33\njnz     short loc_1401E2D30                                            ; +0x58, 0x1401e2d38\nmov     rdx, rax                                                       ; +0x5a, 0x1401e2d3a\nlea     rcx, [rsp+58h+Block]                                           ; +0x5d, 0x1401e2d3d\ncall    sub_14003A930                                                  ; +0x62, 0x1401e2d42\nnop                                                                    ; +0x67, 0x1401e2d47\ncmp     edi, 186A0h                                                    ; +0x68, 0x1401e2d48\njge     short loc_1401E2D59                                            ; +0x6e, 0x1401e2d4e\nmov     rcx, [rbx+330h]                                                ; +0x70, 0x1401e2d50\njmp     short loc_1401E2D71                                            ; +0x77, 0x1401e2d57\ncmp     edi, 30D40h                                                    ; +0x79, 0x1401e2d59\njge     short loc_1401E2D6A                                            ; +0x7f, 0x1401e2d5f\nmov     rcx, [rbx+348h]                                                ; +0x81, 0x1401e2d61\njmp     short loc_1401E2D71                                            ; +0x88, 0x1401e2d68\nmov     rcx, [rbx+380h]                                                ; +0x8a, 0x1401e2d6a\nlea     rdx, [rsp+58h+Block]                                           ; +0x91, 0x1401e2d71\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 &) ; +0x96, 0x1401e2d76\ntest    rax, rax                                                       ; +0x9c, 0x1401e2d7c\nsetnz   bl                                                             ; +0x9f, 0x1401e2d7f\nmov     rdx, qword ptr [rsp+58h+var_20+8]                              ; +0xa2, 0x1401e2d82\ncmp     rdx, 0Fh                                                       ; +0xa7, 0x1401e2d87\njbe     short loc_1401E2DC2                                            ; +0xab, 0x1401e2d8b\ninc     rdx                                                            ; +0xad, 0x1401e2d8d\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0xb0, 0x1401e2d90\nmov     rax, rcx                                                       ; +0xb5, 0x1401e2d95\ncmp     rdx, 1000h                                                     ; +0xb8, 0x1401e2d98\njb      short loc_1401E2DBD                                            ; +0xbf, 0x1401e2d9f\nadd     rdx, 27h ; '''                                                 ; +0xc1, 0x1401e2da1\nmov     rcx, [rcx-8]                                                   ; +0xc5, 0x1401e2da5\nsub     rax, rcx                                                       ; +0xc9, 0x1401e2da9\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xcc, 0x1401e2dac\ncmp     rax, 1Fh                                                       ; +0xd0, 0x1401e2db0\njbe     short loc_1401E2DBD                                            ; +0xd4, 0x1401e2db4\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xd6, 0x1401e2db6\ndb 0CCh                                                                ; +0xdc, 0x1401e2dbc\ncall    j_j_free                                                       ; +0xdd, 0x1401e2dbd\nmovzx   eax, bl                                                        ; +0xe2, 0x1401e2dc2\nmov     rcx, [rsp+58h+var_10]                                          ; +0xe5, 0x1401e2dc5\nxor     rcx, rsp; StackCookie                                          ; +0xea, 0x1401e2dca\ncall    __security_check_cookie                                        ; +0xed, 0x1401e2dcd\nmov     rbx, [rsp+58h+arg_10]                                          ; +0xf2, 0x1401e2dd2\nadd     rsp, 50h                                                       ; +0xf7, 0x1401e2dd7\npop     rdi                                                            ; +0xfb, 0x1401e2ddb\nretn                                                                   ; +0xfc, 0x1401e2ddc", "xrefs": ["DailyLevelPage::init @ 0x1400cf72e", "DailyLevelPage::dailyStatusFinished @ 0x1400cfab0", "GameStatsManager::completedDailyLevel @ 0x1401e2e59", "<???> @ 0x1406cc5ac"], "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"}