{"type": "func", "start": 5370682720, "end": 5370682935, "name": "GameStatsManager::storeQueuedChallenge", "pseudocode": "// \n// GameStatsManager::storeQueuedChallenge from 0x1401e1d60 to 0x1401e1e37 (215 bytes)\n// \n// 4 xrefs:\n// > GameLevelManager::onGetGJChallengesCompleted @ 0x1401685e3\n// > GameStatsManager::processChallengeQueue @ 0x1401e2b3e\n// > <???> @ 0x1406cc540\n// > <???> @ 0x1406cc54c\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\nvoid GameStatsManager::storeQueuedChallenge(GameStatsManager *a1, int a2, GJChallengeItem *a3)\n{\n  cocos2d::CCString *v5; // rax\n  const char *CString; // rax\n  size_t v7; // r8\n  void *v8; // rcx\n  void *Block[2]; // [rsp+20h] [rbp-38h] BYREF\n  __int128 v10; // [rsp+30h] [rbp-28h]\n\n  a3->m_position = a2;\n  v5 = cocos2d::CCString::createWithFormat(\"%i\", a2);\n  CString = cocos2d::CCString::getCString(v5);\n  *(_OWORD *)Block = 0;\n  v10 = 0;\n  v7 = -1;\n  do\n    ++v7;\n  while ( CString[v7] );\n  sub_14003A930(Block, CString, v7);\n  cocos2d::CCDictionary::setObject(a1->m_upcomingChallenges, a3, Block);\n  if ( *((_QWORD *)&v10 + 1) > 0xFu )\n  {\n    v8 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v10 + 1) + 1LL) >= 0x1000 )\n    {\n      v8 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v8);\n  }\n}", "assembly": "; \n; GameStatsManager::storeQueuedChallenge from 0x1401e1d60 to 0x1401e1e37 (215 bytes)\n; \n; 4 xrefs:\n; > GameLevelManager::onGetGJChallengesCompleted @ 0x1401685e3\n; > GameStatsManager::processChallengeQueue @ 0x1401e2b3e\n; > <???> @ 0x1406cc540\n; > <???> @ 0x1406cc54c\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_18], rbx                                              ; +0x0, 0x1401e1d60\npush    rdi                                                            ; +0x5, 0x1401e1d65\nsub     rsp, 50h                                                       ; +0x6, 0x1401e1d66\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x1401e1d6a\nxor     rax, rsp                                                       ; +0x11, 0x1401e1d71\nmov     [rsp+58h+var_18], rax                                          ; +0x14, 0x1401e1d74\nmov     rbx, r8                                                        ; +0x19, 0x1401e1d79\nmov     rdi, rcx                                                       ; +0x1c, 0x1401e1d7c\nmov     [r8+68h], edx                                                  ; +0x1f, 0x1401e1d7f\nlea     rcx, aI_11; \"%i\"                                               ; +0x23, 0x1401e1d83\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x2a, 0x1401e1d8a\nmov     rcx, rax                                                       ; +0x30, 0x1401e1d90\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x33, 0x1401e1d93\nxorps   xmm0, xmm0                                                     ; +0x39, 0x1401e1d99\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x3c, 0x1401e1d9c\nxorps   xmm1, xmm1                                                     ; +0x41, 0x1401e1da1\nmovdqu  [rsp+58h+var_28], xmm1                                         ; +0x44, 0x1401e1da4\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x4a, 0x1401e1daa\ninc     r8                                                             ; +0x51, 0x1401e1db1\ncmp     byte ptr [rax+r8], 0                                           ; +0x54, 0x1401e1db4\njnz     short loc_1401E1DB1                                            ; +0x59, 0x1401e1db9\nmov     rdx, rax                                                       ; +0x5b, 0x1401e1dbb\nlea     rcx, [rsp+58h+Block]                                           ; +0x5e, 0x1401e1dbe\ncall    sub_14003A930                                                  ; +0x63, 0x1401e1dc3\nnop                                                                    ; +0x68, 0x1401e1dc8\nlea     r8, [rsp+58h+Block]                                            ; +0x69, 0x1401e1dc9\nmov     rdx, rbx                                                       ; +0x6e, 0x1401e1dce\nmov     rcx, [rdi+230h]                                                ; +0x71, 0x1401e1dd1\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,std::string const &) ; +0x78, 0x1401e1dd8\nnop                                                                    ; +0x7e, 0x1401e1dde\nmov     rdx, qword ptr [rsp+58h+var_28+8]                              ; +0x7f, 0x1401e1ddf\ncmp     rdx, 0Fh                                                       ; +0x84, 0x1401e1de4\njbe     short loc_1401E1E1F                                            ; +0x88, 0x1401e1de8\ninc     rdx                                                            ; +0x8a, 0x1401e1dea\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0x8d, 0x1401e1ded\nmov     rax, rcx                                                       ; +0x92, 0x1401e1df2\ncmp     rdx, 1000h                                                     ; +0x95, 0x1401e1df5\njb      short loc_1401E1E1A                                            ; +0x9c, 0x1401e1dfc\nadd     rdx, 27h ; '''                                                 ; +0x9e, 0x1401e1dfe\nmov     rcx, [rcx-8]                                                   ; +0xa2, 0x1401e1e02\nsub     rax, rcx                                                       ; +0xa6, 0x1401e1e06\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xa9, 0x1401e1e09\ncmp     rax, 1Fh                                                       ; +0xad, 0x1401e1e0d\njbe     short loc_1401E1E1A                                            ; +0xb1, 0x1401e1e11\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xb3, 0x1401e1e13\nalign 2                                                                ; +0xb9, 0x1401e1e19\ncall    j_j_free                                                       ; +0xba, 0x1401e1e1a\nmov     rcx, [rsp+58h+var_18]                                          ; +0xbf, 0x1401e1e1f\nxor     rcx, rsp; StackCookie                                          ; +0xc4, 0x1401e1e24\ncall    __security_check_cookie                                        ; +0xc7, 0x1401e1e27\nmov     rbx, [rsp+58h+arg_18]                                          ; +0xcc, 0x1401e1e2c\nadd     rsp, 50h                                                       ; +0xd1, 0x1401e1e31\npop     rdi                                                            ; +0xd5, 0x1401e1e35\nretn                                                                   ; +0xd6, 0x1401e1e36", "xrefs": ["GameLevelManager::onGetGJChallengesCompleted @ 0x1401685e3", "GameStatsManager::processChallengeQueue @ 0x1401e2b3e", "<???> @ 0x1406cc540", "<???> @ 0x1406cc54c"], "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"}