{"type": "func", "start": 4295427392, "end": 4295427627, "name": "GameStatsManager::storeSecretCoin", "pseudocode": "// \n// GameStatsManager::storeSecretCoin from 0x100070540 to 0x10007062b (235 bytes)\n// \n// 4 xrefs:\n// > GJBaseGameLayer::processItems @ 0x100129738\n// > LevelPage::ccTouchBegan @ 0x10043770e\n// > SecretLayer2::onSubmit @ 0x10049eb14\n// > SecretLayer::onSubmit @ 0x1005fbe72\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::storeSecretCoin(GameStatsManager *a1, const char *a2)\n{\n  double v2; // xmm0_8\n  cocos2d::CCString *m_trueString; // rbx\n  cocos2d::CCDictionary *m_playerStats; // r14\n  cocos2d::CCString *v5; // rax\n  const char *CString; // r12\n  size_t v7; // rax\n  size_t v8; // r15\n  char *v9; // r13\n  cocos2d::CCString *v10; // r14\n  size_t v11; // rbx\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  m_trueString = a1->m_trueString;\n  m_playerStats = a1->m_playerStats;\n  v5 = (cocos2d::CCString *)sub_1007AB580(\"unique_%s\", v12);\n  CString = cocos2d::CCString::getCString(v5);\n  v7 = strlen(CString);\n  if ( v7 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100006BF0(v2);\n  v8 = v7;\n  if ( v7 >= 0x17 )\n  {\n    v13 = m_playerStats;\n    v10 = m_trueString;\n    v11 = 26;\n    if ( (v7 | 7) != 0x17 )\n      v11 = (v7 | 7) + 1;\n    v9 = (char *)operator new(v11);\n    __p = v9;\n    __dst[0] = v11 + 1;\n    m_trueString = v10;\n    m_playerStats = v13;\n    __dst[1] = v8;\n    goto LABEL_8;\n  }\n  LOBYTE(__dst[0]) = 2 * v7;\n  v9 = (char *)__dst + 1;\n  if ( v7 )\nLABEL_8:\n    memmove(v9, CString, v8);\n  v9[v8] = 0;\n  cocos2d::CCDictionary::setObject_1(m_playerStats, m_trueString, __dst);\n  if ( (__dst[0] & 1) != 0 )\n    operator delete(__p);\n}", "assembly": "; \n; GameStatsManager::storeSecretCoin from 0x100070540 to 0x10007062b (235 bytes)\n; \n; 4 xrefs:\n; > GJBaseGameLayer::processItems @ 0x100129738\n; > LevelPage::ccTouchBegan @ 0x10043770e\n; > SecretLayer2::onSubmit @ 0x10049eb14\n; > SecretLayer::onSubmit @ 0x1005fbe72\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, 0x100070540\nmov     rbp, rsp                                                       ; +0x1, 0x100070541\npush    r15                                                            ; +0x4, 0x100070544\npush    r14                                                            ; +0x6, 0x100070546\npush    r13                                                            ; +0x8, 0x100070548\npush    r12                                                            ; +0xa, 0x10007054a\npush    rbx                                                            ; +0xc, 0x10007054c\nsub     rsp, 28h                                                       ; +0xd, 0x10007054d\nmov     rbx, [rdi+140h]                                                ; +0x11, 0x100070551\nmov     r14, [rdi+208h]                                                ; +0x18, 0x100070558\nlea     rdi, aUniqueS; \"unique_%s\"                                     ; +0x1f, 0x10007055f\nxor     eax, eax                                                       ; +0x26, 0x100070566\ncall    sub_1007AB580                                                  ; +0x28, 0x100070568\nmov     rdi, rax                                                       ; +0x2d, 0x10007056d\ncall    cocos2d__CCString__getCString                                  ; +0x30, 0x100070570\nmov     r12, rax                                                       ; +0x35, 0x100070575\nmov     rdi, rax; __s                                                  ; +0x38, 0x100070578\ncall    _strlen                                                        ; +0x3b, 0x10007057b\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x40, 0x100070580\njnb     loc_100070626                                                  ; +0x44, 0x100070584\nmov     r15, rax                                                       ; +0x4a, 0x10007058a\ncmp     rax, 17h                                                       ; +0x4d, 0x10007058d\njnb     short loc_1000705A5                                            ; +0x51, 0x100070591\nlea     eax, [r15+r15]                                                 ; +0x53, 0x100070593\nmov     byte ptr [rbp+__dst], al                                       ; +0x57, 0x100070597\nlea     r13, [rbp+__dst+1]                                             ; +0x5a, 0x10007059a\ntest    r15, r15                                                       ; +0x5e, 0x10007059e\njnz     short loc_1000705E5                                            ; +0x61, 0x1000705a1\njmp     short loc_1000705F3                                            ; +0x63, 0x1000705a3\nmov     rax, r15                                                       ; +0x65, 0x1000705a5\nor      rax, 7                                                         ; +0x68, 0x1000705a8\nlea     rcx, [rax+1]                                                   ; +0x6c, 0x1000705ac\ncmp     rax, 17h                                                       ; +0x70, 0x1000705b0\nmov     [rbp+var_48], r14                                              ; +0x74, 0x1000705b4\nmov     r14, rbx                                                       ; +0x78, 0x1000705b8\nmov     ebx, 1Ah                                                       ; +0x7b, 0x1000705bb\ncmovnz  rbx, rcx                                                       ; +0x80, 0x1000705c0\nmov     rdi, rbx; __sz                                                 ; +0x84, 0x1000705c4\ncall    __Znwm; operator new(ulong)                                    ; +0x87, 0x1000705c7\nmov     r13, rax                                                       ; +0x8c, 0x1000705cc\nmov     [rbp+__p], rax                                                 ; +0x8f, 0x1000705cf\ninc     rbx                                                            ; +0x93, 0x1000705d3\nmov     [rbp+__dst], rbx                                               ; +0x96, 0x1000705d6\nmov     rbx, r14                                                       ; +0x9a, 0x1000705da\nmov     r14, [rbp+var_48]                                              ; +0x9d, 0x1000705dd\nmov     [rbp+var_38], r15                                              ; +0xa1, 0x1000705e1\nmov     rdi, r13; __dst                                                ; +0xa5, 0x1000705e5\nmov     rsi, r12; __src                                                ; +0xa8, 0x1000705e8\nmov     rdx, r15; __len                                                ; +0xab, 0x1000705eb\ncall    _memmove                                                       ; +0xae, 0x1000705ee\nmov     byte ptr [r13+r15+0], 0                                        ; +0xb3, 0x1000705f3\nlea     rdx, [rbp+__dst]                                               ; +0xb9, 0x1000705f9\nmov     rdi, r14                                                       ; +0xbd, 0x1000705fd\nmov     rsi, rbx                                                       ; +0xc0, 0x100070600\ncall    cocos2d__CCDictionary__setObject_1                             ; +0xc3, 0x100070603\ntest    byte ptr [rbp+__dst], 1                                        ; +0xc8, 0x100070608\njz      short loc_100070617                                            ; +0xcc, 0x10007060c\nmov     rdi, [rbp+__p]; __p                                            ; +0xce, 0x10007060e\ncall    __ZdlPv; operator delete(void *)                               ; +0xd2, 0x100070612\nadd     rsp, 28h                                                       ; +0xd7, 0x100070617\npop     rbx                                                            ; +0xdb, 0x10007061b\npop     r12                                                            ; +0xdc, 0x10007061c\npop     r13                                                            ; +0xde, 0x10007061e\npop     r14                                                            ; +0xe0, 0x100070620\npop     r15                                                            ; +0xe2, 0x100070622\npop     rbp                                                            ; +0xe4, 0x100070624\nretn                                                                   ; +0xe5, 0x100070625\ncall    sub_100006BF0                                                  ; +0xe6, 0x100070626", "xrefs": ["GJBaseGameLayer::processItems @ 0x100129738", "LevelPage::ccTouchBegan @ 0x10043770e", "SecretLayer2::onSubmit @ 0x10049eb14", "SecretLayer::onSubmit @ 0x1005fbe72"], "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"}