{"type": "func", "start": 5370675184, "end": 5370675387, "name": "GameStatsManager::storeSecretCoin", "pseudocode": "// \n// GameStatsManager::storeSecretCoin from 0x1401dfff0 to 0x1401e00bb (203 bytes)\n// \n// 5 xrefs:\n// > GJBaseGameLayer::processItems @ 0x140216660\n// > LevelPage::ccTouchBegan @ 0x14031e3e5\n// > SecretLayer::onSubmit @ 0x1403de5b8\n// > SecretLayer2::onSubmit @ 0x1403e5ccd\n// > <???> @ 0x1406cc4bc\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::storeSecretCoin(GameStatsManager *a1, const char *a2)\n{\n  cocos2d::CCString *v3; // rax\n  const char *CString; // rax\n  size_t v5; // r8\n  void *v6; // rcx\n  void *Block[2]; // [rsp+20h] [rbp-38h] BYREF\n  __int128 v8; // [rsp+30h] [rbp-28h]\n\n  v3 = cocos2d::CCString::createWithFormat(\"unique_%s\", a2);\n  CString = cocos2d::CCString::getCString(v3);\n  *(_OWORD *)Block = 0;\n  v8 = 0;\n  v5 = -1;\n  do\n    ++v5;\n  while ( CString[v5] );\n  sub_14003A930(Block, CString, v5);\n  cocos2d::CCDictionary::setObject(a1->m_playerStats, a1->m_trueString, Block);\n  if ( *((_QWORD *)&v8 + 1) > 0xFu )\n  {\n    v6 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v8 + 1) + 1LL) >= 0x1000 )\n    {\n      v6 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v6);\n  }\n}", "assembly": "; \n; GameStatsManager::storeSecretCoin from 0x1401dfff0 to 0x1401e00bb (203 bytes)\n; \n; 5 xrefs:\n; > GJBaseGameLayer::processItems @ 0x140216660\n; > LevelPage::ccTouchBegan @ 0x14031e3e5\n; > SecretLayer::onSubmit @ 0x1403de5b8\n; > SecretLayer2::onSubmit @ 0x1403e5ccd\n; > <???> @ 0x1406cc4bc\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, 0x1401dfff0\nsub     rsp, 50h                                                       ; +0x2, 0x1401dfff2\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x1401dfff6\nxor     rax, rsp                                                       ; +0xd, 0x1401dfffd\nmov     [rsp+58h+var_18], rax                                          ; +0x10, 0x1401e0000\nmov     rbx, rcx                                                       ; +0x15, 0x1401e0005\nlea     rcx, aUniqueS; \"unique_%s\"                                     ; +0x18, 0x1401e0008\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x1f, 0x1401e000f\nmov     rcx, rax                                                       ; +0x25, 0x1401e0015\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x28, 0x1401e0018\nxorps   xmm0, xmm0                                                     ; +0x2e, 0x1401e001e\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x31, 0x1401e0021\nxorps   xmm1, xmm1                                                     ; +0x36, 0x1401e0026\nmovdqu  [rsp+58h+var_28], xmm1                                         ; +0x39, 0x1401e0029\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x3f, 0x1401e002f\ninc     r8                                                             ; +0x46, 0x1401e0036\ncmp     byte ptr [rax+r8], 0                                           ; +0x49, 0x1401e0039\njnz     short loc_1401E0036                                            ; +0x4e, 0x1401e003e\nmov     rdx, rax                                                       ; +0x50, 0x1401e0040\nlea     rcx, [rsp+58h+Block]                                           ; +0x53, 0x1401e0043\ncall    sub_14003A930                                                  ; +0x58, 0x1401e0048\nnop                                                                    ; +0x5d, 0x1401e004d\nlea     r8, [rsp+58h+Block]                                            ; +0x5e, 0x1401e004e\nmov     rdx, [rbx+148h]                                                ; +0x63, 0x1401e0053\nmov     rcx, [rbx+240h]                                                ; +0x6a, 0x1401e005a\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 &) ; +0x71, 0x1401e0061\nnop                                                                    ; +0x77, 0x1401e0067\nmov     rdx, qword ptr [rsp+58h+var_28+8]                              ; +0x78, 0x1401e0068\ncmp     rdx, 0Fh                                                       ; +0x7d, 0x1401e006d\njbe     short loc_1401E00A8                                            ; +0x81, 0x1401e0071\ninc     rdx                                                            ; +0x83, 0x1401e0073\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0x86, 0x1401e0076\nmov     rax, rcx                                                       ; +0x8b, 0x1401e007b\ncmp     rdx, 1000h                                                     ; +0x8e, 0x1401e007e\njb      short loc_1401E00A3                                            ; +0x95, 0x1401e0085\nadd     rdx, 27h ; '''                                                 ; +0x97, 0x1401e0087\nmov     rcx, [rcx-8]                                                   ; +0x9b, 0x1401e008b\nsub     rax, rcx                                                       ; +0x9f, 0x1401e008f\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xa2, 0x1401e0092\ncmp     rax, 1Fh                                                       ; +0xa6, 0x1401e0096\njbe     short loc_1401E00A3                                            ; +0xaa, 0x1401e009a\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xac, 0x1401e009c\ndb 0CCh                                                                ; +0xb2, 0x1401e00a2\ncall    j_j_free                                                       ; +0xb3, 0x1401e00a3\nmov     rcx, [rsp+58h+var_18]                                          ; +0xb8, 0x1401e00a8\nxor     rcx, rsp; StackCookie                                          ; +0xbd, 0x1401e00ad\ncall    __security_check_cookie                                        ; +0xc0, 0x1401e00b0\nadd     rsp, 50h                                                       ; +0xc5, 0x1401e00b5\npop     rbx                                                            ; +0xc9, 0x1401e00b9\nretn                                                                   ; +0xca, 0x1401e00ba", "xrefs": ["GJBaseGameLayer::processItems @ 0x140216660", "LevelPage::ccTouchBegan @ 0x14031e3e5", "SecretLayer::onSubmit @ 0x1403de5b8", "SecretLayer2::onSubmit @ 0x1403e5ccd", "<???> @ 0x1406cc4bc"], "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"}