{"type": "func", "start": 4295438304, "end": 4295438533, "name": "GameStatsManager::storeQueuedChallenge", "pseudocode": "// \n// GameStatsManager::storeQueuedChallenge from 0x100072fe0 to 0x1000730c5 (229 bytes)\n// \n// 4 xrefs:\n// > GameStatsManager::processChallengeQueue @ 0x100073aa8\n// > GameLevelManager::onGetGJChallengesCompleted @ 0x100527ff9\n// > GameLevelManager::onGetGJChallengesCompleted @ 0x100528129\n// > GameLevelManager::onGetGJChallengesCompleted @ 0x100528259\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\nvoid __fastcall GameStatsManager::storeQueuedChallenge(GameStatsManager *a1, int a2, GJChallengeItem *a3)\n{\n  double v3; // xmm0_8\n  cocos2d::CCDictionary *m_upcomingChallenges; // r14\n  cocos2d::CCString *v6; // rax\n  const char *CString; // r12\n  size_t v8; // rax\n  size_t v9; // r15\n  char *v10; // r13\n  size_t v11; // r14\n  char v12; // [rsp+0h] [rbp-50h]\n  cocos2d::CCDictionary *v13; // [rsp+8h] [rbp-48h]\n  _QWORD __dst[2]; // [rsp+10h] [rbp-40h] BYREF\n  void *__p; // [rsp+20h] [rbp-30h]\n\n  a3->m_position = a2;\n  m_upcomingChallenges = a1->m_upcomingChallenges;\n  v6 = (cocos2d::CCString *)sub_1007AB580(\"%i\", v12);\n  CString = cocos2d::CCString::getCString(v6);\n  v8 = strlen(CString);\n  if ( v8 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100006BF0(v3);\n  v9 = v8;\n  if ( v8 >= 0x17 )\n  {\n    v13 = m_upcomingChallenges;\n    v11 = 26;\n    if ( (v8 | 7) != 0x17 )\n      v11 = (v8 | 7) + 1;\n    v10 = (char *)operator new(v11);\n    __p = v10;\n    __dst[0] = v11 + 1;\n    m_upcomingChallenges = v13;\n    __dst[1] = v9;\n    goto LABEL_8;\n  }\n  LOBYTE(__dst[0]) = 2 * v8;\n  v10 = (char *)__dst + 1;\n  if ( v8 )\nLABEL_8:\n    memmove(v10, CString, v9);\n  v10[v9] = 0;\n  cocos2d::CCDictionary::setObject_1(m_upcomingChallenges, a3, __dst);\n  if ( (__dst[0] & 1) != 0 )\n    operator delete(__p);\n}", "assembly": "; \n; GameStatsManager::storeQueuedChallenge from 0x100072fe0 to 0x1000730c5 (229 bytes)\n; \n; 4 xrefs:\n; > GameStatsManager::processChallengeQueue @ 0x100073aa8\n; > GameLevelManager::onGetGJChallengesCompleted @ 0x100527ff9\n; > GameLevelManager::onGetGJChallengesCompleted @ 0x100528129\n; > GameLevelManager::onGetGJChallengesCompleted @ 0x100528259\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    rbp                                                            ; +0x0, 0x100072fe0\nmov     rbp, rsp                                                       ; +0x1, 0x100072fe1\npush    r15                                                            ; +0x4, 0x100072fe4\npush    r14                                                            ; +0x6, 0x100072fe6\npush    r13                                                            ; +0x8, 0x100072fe8\npush    r12                                                            ; +0xa, 0x100072fea\npush    rbx                                                            ; +0xc, 0x100072fec\nsub     rsp, 28h                                                       ; +0xd, 0x100072fed\nmov     rbx, rdx                                                       ; +0x11, 0x100072ff1\nmov     [rdx+68h], esi                                                 ; +0x14, 0x100072ff4\nmov     r14, [rdi+1F8h]                                                ; +0x17, 0x100072ff7\nlea     rdi, aI; \"%i\"                                                  ; +0x1e, 0x100072ffe\nxor     eax, eax                                                       ; +0x25, 0x100073005\ncall    sub_1007AB580                                                  ; +0x27, 0x100073007\nmov     rdi, rax                                                       ; +0x2c, 0x10007300c\ncall    cocos2d__CCString__getCString                                  ; +0x2f, 0x10007300f\nmov     r12, rax                                                       ; +0x34, 0x100073014\nmov     rdi, rax; __s                                                  ; +0x37, 0x100073017\ncall    _strlen                                                        ; +0x3a, 0x10007301a\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x3f, 0x10007301f\njnb     loc_1000730C0                                                  ; +0x43, 0x100073023\nmov     r15, rax                                                       ; +0x49, 0x100073029\ncmp     rax, 17h                                                       ; +0x4c, 0x10007302c\njnb     short loc_100073044                                            ; +0x50, 0x100073030\nlea     eax, [r15+r15]                                                 ; +0x52, 0x100073032\nmov     byte ptr [rbp+__dst], al                                       ; +0x56, 0x100073036\nlea     r13, [rbp+__dst+1]                                             ; +0x59, 0x100073039\ntest    r15, r15                                                       ; +0x5d, 0x10007303d\njnz     short loc_10007307F                                            ; +0x60, 0x100073040\njmp     short loc_10007308D                                            ; +0x62, 0x100073042\nmov     rax, r15                                                       ; +0x64, 0x100073044\nor      rax, 7                                                         ; +0x67, 0x100073047\nlea     rcx, [rax+1]                                                   ; +0x6b, 0x10007304b\ncmp     rax, 17h                                                       ; +0x6f, 0x10007304f\nmov     [rbp+var_48], r14                                              ; +0x73, 0x100073053\nmov     r14d, 1Ah                                                      ; +0x77, 0x100073057\ncmovnz  r14, rcx                                                       ; +0x7d, 0x10007305d\nmov     rdi, r14; __sz                                                 ; +0x81, 0x100073061\ncall    __Znwm; operator new(ulong)                                    ; +0x84, 0x100073064\nmov     r13, rax                                                       ; +0x89, 0x100073069\nmov     [rbp+__p], rax                                                 ; +0x8c, 0x10007306c\ninc     r14                                                            ; +0x90, 0x100073070\nmov     [rbp+__dst], r14                                               ; +0x93, 0x100073073\nmov     r14, [rbp+var_48]                                              ; +0x97, 0x100073077\nmov     [rbp+var_38], r15                                              ; +0x9b, 0x10007307b\nmov     rdi, r13; __dst                                                ; +0x9f, 0x10007307f\nmov     rsi, r12; __src                                                ; +0xa2, 0x100073082\nmov     rdx, r15; __len                                                ; +0xa5, 0x100073085\ncall    _memmove                                                       ; +0xa8, 0x100073088\nmov     byte ptr [r13+r15+0], 0                                        ; +0xad, 0x10007308d\nlea     rdx, [rbp+__dst]                                               ; +0xb3, 0x100073093\nmov     rdi, r14                                                       ; +0xb7, 0x100073097\nmov     rsi, rbx                                                       ; +0xba, 0x10007309a\ncall    cocos2d__CCDictionary__setObject_1                             ; +0xbd, 0x10007309d\ntest    byte ptr [rbp+__dst], 1                                        ; +0xc2, 0x1000730a2\njz      short loc_1000730B1                                            ; +0xc6, 0x1000730a6\nmov     rdi, [rbp+__p]; __p                                            ; +0xc8, 0x1000730a8\ncall    __ZdlPv; operator delete(void *)                               ; +0xcc, 0x1000730ac\nadd     rsp, 28h                                                       ; +0xd1, 0x1000730b1\npop     rbx                                                            ; +0xd5, 0x1000730b5\npop     r12                                                            ; +0xd6, 0x1000730b6\npop     r13                                                            ; +0xd8, 0x1000730b8\npop     r14                                                            ; +0xda, 0x1000730ba\npop     r15                                                            ; +0xdc, 0x1000730bc\npop     rbp                                                            ; +0xde, 0x1000730be\nretn                                                                   ; +0xdf, 0x1000730bf\ncall    sub_100006BF0                                                  ; +0xe0, 0x1000730c0", "xrefs": ["GameStatsManager::processChallengeQueue @ 0x100073aa8", "GameLevelManager::onGetGJChallengesCompleted @ 0x100527ff9", "GameLevelManager::onGetGJChallengesCompleted @ 0x100528129", "GameLevelManager::onGetGJChallengesCompleted @ 0x100528259"], "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"}