{"type": "func", "start": 5371750320, "end": 5371750562, "name": "GameStatsManager::storeEventChest", "pseudocode": "// \n// GameStatsManager::storeEventChest from 0x1402e67b0 to 0x1402e68a2 (242 bytes)\n// \n// 3 xrefs:\n// > GameLevelManager::processOnDownloadLevelCompleted @ 0x1402335fb\n// > GameLevelManager::onGetGJDailyLevelStateCompleted @ 0x1402606f7\n// > <???> @ 0x14091e014\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:29:50 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nvoid __fastcall GameStatsManager::storeEventChest(__int64 a1, int a2, __int64 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+38h] [rbp-30h] BYREF\n  __int128 v10; // [rsp+48h] [rbp-20h]\n\n  if ( a3 )\n  {\n    v5 = cocos2d::CCString::createWithFormat(\"d%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_14003D230(Block, CString, v7);\n    cocos2d::CCDictionary::setObject(*(_QWORD *)(a1 + 848), 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          invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n      }\n      j_j_free(v8);\n    }\n  }\n}", "assembly": "; \n; GameStatsManager::storeEventChest from 0x1402e67b0 to 0x1402e68a2 (242 bytes)\n; \n; 3 xrefs:\n; > GameLevelManager::processOnDownloadLevelCompleted @ 0x1402335fb\n; > GameLevelManager::onGetGJDailyLevelStateCompleted @ 0x1402606f7\n; > <???> @ 0x14091e014\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:29:50 +0000\n; \ntest    r8, r8                                                         ; +0x0, 0x1402e67b0\njz      locret_1402E68A1                                               ; +0x3, 0x1402e67b3\nmov     [rsp+arg_18], rbx                                              ; +0x9, 0x1402e67b9\npush    rdi                                                            ; +0xe, 0x1402e67be\nsub     rsp, 60h                                                       ; +0xf, 0x1402e67bf\nmov     rax, cs:__security_cookie                                      ; +0x13, 0x1402e67c3\nxor     rax, rsp                                                       ; +0x1a, 0x1402e67ca\nmov     [rsp+68h+var_10], rax                                          ; +0x1d, 0x1402e67cd\nmov     rbx, r8                                                        ; +0x22, 0x1402e67d2\nmov     rdi, rcx                                                       ; +0x25, 0x1402e67d5\nlea     rcx, aDI_0; \"d%i\"                                              ; +0x28, 0x1402e67d8\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x2f, 0x1402e67df\nmov     rcx, rax                                                       ; +0x35, 0x1402e67e5\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x38, 0x1402e67e8\nxorps   xmm0, xmm0                                                     ; +0x3e, 0x1402e67ee\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0x41, 0x1402e67f1\nxorps   xmm1, xmm1                                                     ; +0x46, 0x1402e67f6\nmovdqu  [rsp+68h+var_20], xmm1                                         ; +0x49, 0x1402e67f9\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x4f, 0x1402e67ff\ninc     r8                                                             ; +0x56, 0x1402e6806\ncmp     byte ptr [rax+r8], 0                                           ; +0x59, 0x1402e6809\njnz     short loc_1402E6806                                            ; +0x5e, 0x1402e680e\nmov     rdx, rax                                                       ; +0x60, 0x1402e6810\nlea     rcx, [rsp+68h+Block]                                           ; +0x63, 0x1402e6813\ncall    sub_14003D230                                                  ; +0x68, 0x1402e6818\nnop                                                                    ; +0x6d, 0x1402e681d\nlea     r8, [rsp+68h+Block]                                            ; +0x6e, 0x1402e681e\nmov     rdx, rbx                                                       ; +0x73, 0x1402e6823\nmov     rcx, [rdi+350h]                                                ; +0x76, 0x1402e6826\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 &) ; +0x7d, 0x1402e682d\nnop                                                                    ; +0x83, 0x1402e6833\nmov     rdx, qword ptr [rsp+68h+var_20+8]                              ; +0x84, 0x1402e6834\ncmp     rdx, 0Fh                                                       ; +0x89, 0x1402e6839\njbe     short loc_1402E6887                                            ; +0x8d, 0x1402e683d\ninc     rdx                                                            ; +0x8f, 0x1402e683f\nmov     rcx, [rsp+68h+Block]; Block                                    ; +0x92, 0x1402e6842\nmov     rax, rcx                                                       ; +0x97, 0x1402e6847\ncmp     rdx, 1000h                                                     ; +0x9a, 0x1402e684a\njb      short loc_1402E6882                                            ; +0xa1, 0x1402e6851\nadd     rdx, 27h ; '''                                                 ; +0xa3, 0x1402e6853\nmov     rcx, [rcx-8]                                                   ; +0xa7, 0x1402e6857\nsub     rax, rcx                                                       ; +0xab, 0x1402e685b\nsub     rax, 8                                                         ; +0xae, 0x1402e685e\ncmp     rax, 1Fh                                                       ; +0xb2, 0x1402e6862\njbe     short loc_1402E6882                                            ; +0xb6, 0x1402e6866\nmov     [rsp+68h+Reserved], 0; Reserved                                ; +0xb8, 0x1402e6868\nxor     r9d, r9d; LineNo                                               ; +0xc1, 0x1402e6871\nxor     r8d, r8d; FileName                                             ; +0xc4, 0x1402e6874\nxor     edx, edx; FunctionName                                         ; +0xc7, 0x1402e6877\nxor     ecx, ecx; Expression                                           ; +0xc9, 0x1402e6879\ncall    cs:_invoke_watson                                              ; +0xcb, 0x1402e687b\nalign 2                                                                ; +0xd1, 0x1402e6881\ncall    j_j_free                                                       ; +0xd2, 0x1402e6882\nmov     rcx, [rsp+68h+var_10]                                          ; +0xd7, 0x1402e6887\nxor     rcx, rsp; StackCookie                                          ; +0xdc, 0x1402e688c\ncall    __security_check_cookie                                        ; +0xdf, 0x1402e688f\nmov     rbx, [rsp+68h+arg_18]                                          ; +0xe4, 0x1402e6894\nadd     rsp, 60h                                                       ; +0xec, 0x1402e689c\npop     rdi                                                            ; +0xf0, 0x1402e68a0\nretn                                                                   ; +0xf1, 0x1402e68a1", "xrefs": ["GameLevelManager::processOnDownloadLevelCompleted @ 0x1402335fb", "GameLevelManager::onGetGJDailyLevelStateCompleted @ 0x1402606f7", "<???> @ 0x14091e014"], "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"}