{"type": "func", "start": 5370683152, "end": 5370683353, "name": "GameStatsManager::getQueuedChallenge", "pseudocode": "// \n// GameStatsManager::getQueuedChallenge from 0x1401e1f10 to 0x1401e1fd9 (201 bytes)\n// \n// 5 xrefs:\n// > ChallengesPage::updateDots @ 0x140085dbd\n// > ChallengesPage::challengeStatusFinished @ 0x140085eba\n// > GameLevelManager::onGetGJChallengesCompleted @ 0x140168492\n// > GameStatsManager::processChallengeQueue @ 0x1401e2947\n// > <???> @ 0x1406cc564\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\nGJChallengeItem *GameStatsManager::getQueuedChallenge(GameStatsManager *a1, int a2)\n{\n  cocos2d::CCString *v3; // rax\n  const char *CString; // rax\n  size_t v5; // r8\n  GJChallengeItem *v6; // rbx\n  void *v7; // rcx\n  void *Block[2]; // [rsp+20h] [rbp-38h] BYREF\n  __int128 v10; // [rsp+30h] [rbp-28h]\n\n  v3 = cocos2d::CCString::createWithFormat(\"%i\", a2);\n  CString = cocos2d::CCString::getCString(v3);\n  *(_OWORD *)Block = 0;\n  v10 = 0;\n  v5 = -1;\n  do\n    ++v5;\n  while ( CString[v5] );\n  sub_14003A930(Block, CString, v5);\n  v6 = (GJChallengeItem *)cocos2d::CCDictionary::objectForKey(a1->m_upcomingChallenges, Block);\n  if ( *((_QWORD *)&v10 + 1) > 0xFu )\n  {\n    v7 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v10 + 1) + 1LL) >= 0x1000 )\n    {\n      v7 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v7 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v7);\n  }\n  return v6;\n}", "assembly": "; \n; GameStatsManager::getQueuedChallenge from 0x1401e1f10 to 0x1401e1fd9 (201 bytes)\n; \n; 5 xrefs:\n; > ChallengesPage::updateDots @ 0x140085dbd\n; > ChallengesPage::challengeStatusFinished @ 0x140085eba\n; > GameLevelManager::onGetGJChallengesCompleted @ 0x140168492\n; > GameStatsManager::processChallengeQueue @ 0x1401e2947\n; > <???> @ 0x1406cc564\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    rbx                                                            ; +0x0, 0x1401e1f10\nsub     rsp, 50h                                                       ; +0x2, 0x1401e1f12\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x1401e1f16\nxor     rax, rsp                                                       ; +0xd, 0x1401e1f1d\nmov     [rsp+58h+var_18], rax                                          ; +0x10, 0x1401e1f20\nmov     rbx, rcx                                                       ; +0x15, 0x1401e1f25\nlea     rcx, aI_11; \"%i\"                                               ; +0x18, 0x1401e1f28\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x1f, 0x1401e1f2f\nmov     rcx, rax                                                       ; +0x25, 0x1401e1f35\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x28, 0x1401e1f38\nxorps   xmm0, xmm0                                                     ; +0x2e, 0x1401e1f3e\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x31, 0x1401e1f41\nxorps   xmm1, xmm1                                                     ; +0x36, 0x1401e1f46\nmovdqu  [rsp+58h+var_28], xmm1                                         ; +0x39, 0x1401e1f49\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x3f, 0x1401e1f4f\ninc     r8                                                             ; +0x46, 0x1401e1f56\ncmp     byte ptr [rax+r8], 0                                           ; +0x49, 0x1401e1f59\njnz     short loc_1401E1F56                                            ; +0x4e, 0x1401e1f5e\nmov     rdx, rax                                                       ; +0x50, 0x1401e1f60\nlea     rcx, [rsp+58h+Block]                                           ; +0x53, 0x1401e1f63\ncall    sub_14003A930                                                  ; +0x58, 0x1401e1f68\nnop                                                                    ; +0x5d, 0x1401e1f6d\nlea     rdx, [rsp+58h+Block]                                           ; +0x5e, 0x1401e1f6e\nmov     rcx, [rbx+230h]                                                ; +0x63, 0x1401e1f73\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 &) ; +0x6a, 0x1401e1f7a\nmov     rbx, rax                                                       ; +0x70, 0x1401e1f80\nmov     rdx, qword ptr [rsp+58h+var_28+8]                              ; +0x73, 0x1401e1f83\ncmp     rdx, 0Fh                                                       ; +0x78, 0x1401e1f88\njbe     short loc_1401E1FC3                                            ; +0x7c, 0x1401e1f8c\ninc     rdx                                                            ; +0x7e, 0x1401e1f8e\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0x81, 0x1401e1f91\nmov     rax, rcx                                                       ; +0x86, 0x1401e1f96\ncmp     rdx, 1000h                                                     ; +0x89, 0x1401e1f99\njb      short loc_1401E1FBE                                            ; +0x90, 0x1401e1fa0\nadd     rdx, 27h ; '''                                                 ; +0x92, 0x1401e1fa2\nmov     rcx, [rcx-8]                                                   ; +0x96, 0x1401e1fa6\nsub     rax, rcx                                                       ; +0x9a, 0x1401e1faa\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x9d, 0x1401e1fad\ncmp     rax, 1Fh                                                       ; +0xa1, 0x1401e1fb1\njbe     short loc_1401E1FBE                                            ; +0xa5, 0x1401e1fb5\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xa7, 0x1401e1fb7\nalign 2                                                                ; +0xad, 0x1401e1fbd\ncall    j_j_free                                                       ; +0xae, 0x1401e1fbe\nmov     rax, rbx                                                       ; +0xb3, 0x1401e1fc3\nmov     rcx, [rsp+58h+var_18]                                          ; +0xb6, 0x1401e1fc6\nxor     rcx, rsp; StackCookie                                          ; +0xbb, 0x1401e1fcb\ncall    __security_check_cookie                                        ; +0xbe, 0x1401e1fce\nadd     rsp, 50h                                                       ; +0xc3, 0x1401e1fd3\npop     rbx                                                            ; +0xc7, 0x1401e1fd7\nretn                                                                   ; +0xc8, 0x1401e1fd8", "xrefs": ["ChallengesPage::updateDots @ 0x140085dbd", "ChallengesPage::challengeStatusFinished @ 0x140085eba", "GameLevelManager::onGetGJChallengesCompleted @ 0x140168492", "GameStatsManager::processChallengeQueue @ 0x1401e2947", "<???> @ 0x1406cc564"], "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"}