{"type": "func", "start": 4295429056, "end": 4295429258, "name": "GameStatsManager::getCurrencyKey", "pseudocode": "// \n// GameStatsManager::getCurrencyKey from 0x100070bc0 to 0x100070c8a (202 bytes)\n// \n// 6 xrefs:\n// > GameStatsManager::getBaseCurrencyForLevel @ 0x100070d59\n// > GameStatsManager::getAwardedCurrencyForLevel @ 0x100070f16\n// > GameStatsManager::awardCurrencyForLevel @ 0x10007114f\n// > GameStatsManager::awardCurrencyForLevel @ 0x10007138f\n// > GameStatsManager::getAwardedDiamondsForLevel @ 0x10007168b\n// > GameStatsManager::awardDiamondsForLevel @ 0x10007188a\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_QWORD *__fastcall GameStatsManager::getCurrencyKey(_QWORD *a1, double a2)\n{\n  char v2; // al\n  cocos2d::CCString *v3; // rax\n  const char *CString; // r12\n  size_t v5; // rax\n  size_t v6; // r15\n  void *v7; // r14\n  size_t v8; // r13\n\n  v3 = (cocos2d::CCString *)sub_1007AB580(\"%i\", v2);\n  CString = cocos2d::CCString::getCString(v3);\n  v5 = strlen(CString);\n  if ( v5 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100006BF0(a2);\n  v6 = v5;\n  if ( v5 >= 0x17 )\n  {\n    v8 = 26;\n    if ( (v5 | 7) != 0x17 )\n      v8 = (v5 | 7) + 1;\n    v7 = operator new(v8);\n    a1[2] = v7;\n    *a1 = v8 + 1;\n    a1[1] = v6;\n  }\n  else\n  {\n    *(_BYTE *)a1 = 2 * v5;\n    v7 = (char *)a1 + 1;\n    if ( !v5 )\n      goto LABEL_9;\n  }\n  memmove(v7, CString, v6);\nLABEL_9:\n  *((_BYTE *)v7 + v6) = 0;\n  return a1;\n}", "assembly": "; \n; GameStatsManager::getCurrencyKey from 0x100070bc0 to 0x100070c8a (202 bytes)\n; \n; 6 xrefs:\n; > GameStatsManager::getBaseCurrencyForLevel @ 0x100070d59\n; > GameStatsManager::getAwardedCurrencyForLevel @ 0x100070f16\n; > GameStatsManager::awardCurrencyForLevel @ 0x10007114f\n; > GameStatsManager::awardCurrencyForLevel @ 0x10007138f\n; > GameStatsManager::getAwardedDiamondsForLevel @ 0x10007168b\n; > GameStatsManager::awardDiamondsForLevel @ 0x10007188a\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, 0x100070bc0\nmov     rbp, rsp                                                       ; +0x1, 0x100070bc1\npush    r15                                                            ; +0x4, 0x100070bc4\npush    r14                                                            ; +0x6, 0x100070bc6\npush    r13                                                            ; +0x8, 0x100070bc8\npush    r12                                                            ; +0xa, 0x100070bca\npush    rbx                                                            ; +0xc, 0x100070bcc\npush    rax; char                                                      ; +0xd, 0x100070bcd\nmov     rbx, rdi                                                       ; +0xe, 0x100070bce\nmov     esi, [rdx+324h]                                                ; +0x11, 0x100070bd1\nsub     esi, [rdx+328h]                                                ; +0x17, 0x100070bd7\njg      short loc_100070BEB                                            ; +0x1d, 0x100070bdd\nmov     esi, [rdx+148h]                                                ; +0x1f, 0x100070bdf\nsub     esi, [rdx+14Ch]                                                ; +0x25, 0x100070be5\nlea     rdi, aI; \"%i\"                                                  ; +0x2b, 0x100070beb\nxor     eax, eax                                                       ; +0x32, 0x100070bf2\ncall    sub_1007AB580                                                  ; +0x34, 0x100070bf4\nmov     rdi, rax                                                       ; +0x39, 0x100070bf9\ncall    cocos2d__CCString__getCString                                  ; +0x3c, 0x100070bfc\nmov     r12, rax                                                       ; +0x41, 0x100070c01\nmov     rdi, rax; __s                                                  ; +0x44, 0x100070c04\ncall    _strlen                                                        ; +0x47, 0x100070c07\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x4c, 0x100070c0c\njnb     short loc_100070C85                                            ; +0x50, 0x100070c10\nmov     r15, rax                                                       ; +0x52, 0x100070c12\ncmp     rax, 17h                                                       ; +0x55, 0x100070c15\njnb     short loc_100070C2C                                            ; +0x59, 0x100070c19\nlea     eax, [r15+r15]                                                 ; +0x5b, 0x100070c1b\nmov     [rbx], al                                                      ; +0x5f, 0x100070c1f\nlea     r14, [rbx+1]                                                   ; +0x61, 0x100070c21\ntest    r15, r15                                                       ; +0x65, 0x100070c25\njnz     short loc_100070C5E                                            ; +0x68, 0x100070c28\njmp     short loc_100070C6C                                            ; +0x6a, 0x100070c2a\nmov     rax, r15                                                       ; +0x6c, 0x100070c2c\nor      rax, 7                                                         ; +0x6f, 0x100070c2f\nlea     rcx, [rax+1]                                                   ; +0x73, 0x100070c33\ncmp     rax, 17h                                                       ; +0x77, 0x100070c37\nmov     r13d, 1Ah                                                      ; +0x7b, 0x100070c3b\ncmovnz  r13, rcx                                                       ; +0x81, 0x100070c41\nmov     rdi, r13; __sz                                                 ; +0x85, 0x100070c45\ncall    __Znwm; operator new(ulong)                                    ; +0x88, 0x100070c48\nmov     r14, rax                                                       ; +0x8d, 0x100070c4d\nmov     [rbx+10h], rax                                                 ; +0x90, 0x100070c50\ninc     r13                                                            ; +0x94, 0x100070c54\nmov     [rbx], r13                                                     ; +0x97, 0x100070c57\nmov     [rbx+8], r15                                                   ; +0x9a, 0x100070c5a\nmov     rdi, r14; __dst                                                ; +0x9e, 0x100070c5e\nmov     rsi, r12; __src                                                ; +0xa1, 0x100070c61\nmov     rdx, r15; __len                                                ; +0xa4, 0x100070c64\ncall    _memmove                                                       ; +0xa7, 0x100070c67\nadd     r14, r15                                                       ; +0xac, 0x100070c6c\nmov     byte ptr [r14], 0                                              ; +0xaf, 0x100070c6f\nmov     rax, rbx                                                       ; +0xb3, 0x100070c73\nadd     rsp, 8                                                         ; +0xb6, 0x100070c76\npop     rbx                                                            ; +0xba, 0x100070c7a\npop     r12                                                            ; +0xbb, 0x100070c7b\npop     r13                                                            ; +0xbd, 0x100070c7d\npop     r14                                                            ; +0xbf, 0x100070c7f\npop     r15                                                            ; +0xc1, 0x100070c81\npop     rbp                                                            ; +0xc3, 0x100070c83\nretn                                                                   ; +0xc4, 0x100070c84\ncall    sub_100006BF0                                                  ; +0xc5, 0x100070c85", "xrefs": ["GameStatsManager::getBaseCurrencyForLevel @ 0x100070d59", "GameStatsManager::getAwardedCurrencyForLevel @ 0x100070f16", "GameStatsManager::awardCurrencyForLevel @ 0x10007114f", "GameStatsManager::awardCurrencyForLevel @ 0x10007138f", "GameStatsManager::getAwardedDiamondsForLevel @ 0x10007168b", "GameStatsManager::awardDiamondsForLevel @ 0x10007188a"], "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"}