{"type": "func", "start": 4295206144, "end": 4295206492, "name": "GameStatsManager::unlockDailyRecall", "pseudocode": "// \n// GameStatsManager::unlockDailyRecall from 0x10003a500 to 0x10003a65c (348 bytes)\n// \n// 1 xrefs:\n// > LevelBrowserLayer::FLAlert_Clicked @ 0x100487fb1\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 12:19:33 +0000\n// \n\nchar __fastcall GameStatsManager::unlockDailyRecall(__int64 a1, int a2, __m128 a3)\n{\n  int v3; // r14d\n  int Stat; // eax\n  bool v5; // cc\n  int v6; // eax\n  __int64 v8; // rbx\n  __int64 v9; // r14\n  __int64 v10; // rax\n  const char *CString; // r12\n  size_t v12; // rax\n  size_t v13; // r15\n  char *v14; // r13\n  __int64 v15; // r14\n  size_t v16; // rbx\n  char v17; // [rsp+0h] [rbp-50h]\n  char v18; // [rsp+0h] [rbp-50h]\n  __int64 v19; // [rsp+8h] [rbp-48h]\n  _QWORD __dst[2]; // [rsp+10h] [rbp-40h] BYREF\n  void *__p; // [rsp+20h] [rbp-30h]\n\n  if ( a2 <= 0 || (unsigned __int8)GameStatsManager::isDailyRecall(a1, a2) )\n    return 0;\n  v3 = 5;\n  if ( (unsigned int)a2 < 0x30D41 )\n    v3 = 2 * ((unsigned int)a2 >= 0x186A1) + 1;\n  Stat = GameStatsManager::getStat(a1, \"21\", a3);\n  v5 = Stat < v3;\n  v6 = Stat - v3;\n  if ( v5 )\n    return 0;\n  GameStatsManager::setStat(a1, \"21\", v6, a3);\n  v8 = *(_QWORD *)(a1 + 752);\n  v9 = sub_10088E820(\"%i\", v17);\n  v10 = sub_10088E820(\"%i\", v18);\n  CString = (const char *)cocos2d::CCString::getCString(v10);\n  v12 = strlen(CString);\n  if ( v12 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100003630();\n  v13 = v12;\n  if ( v12 >= 0x17 )\n  {\n    v19 = v9;\n    v15 = v8;\n    v16 = 26;\n    if ( (v12 | 7) != 0x17 )\n      v16 = (v12 | 7) + 1;\n    v14 = (char *)operator new(v16);\n    __p = v14;\n    __dst[0] = v16 + 1;\n    v8 = v15;\n    v9 = v19;\n    __dst[1] = v13;\n  }\n  else\n  {\n    LOBYTE(__dst[0]) = 2 * v12;\n    v14 = (char *)__dst + 1;\n    if ( !v12 )\n      goto LABEL_15;\n  }\n  memmove(v14, CString, v13);\nLABEL_15:\n  v14[v13] = 0;\n  cocos2d::CCDictionary::setObject(v8, v9, __dst);\n  if ( (__dst[0] & 1) != 0 )\n    operator delete(__p);\n  return 1;\n}", "assembly": "; \n; GameStatsManager::unlockDailyRecall from 0x10003a500 to 0x10003a65c (348 bytes)\n; \n; 1 xrefs:\n; > LevelBrowserLayer::FLAlert_Clicked @ 0x100487fb1\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 12:19:33 +0000\n; \npush    rbp                                                            ; +0x0, 0x10003a500\nmov     rbp, rsp                                                       ; +0x1, 0x10003a501\npush    r15                                                            ; +0x4, 0x10003a504\npush    r14                                                            ; +0x6, 0x10003a506\npush    r13                                                            ; +0x8, 0x10003a508\npush    r12                                                            ; +0xa, 0x10003a50a\npush    rbx                                                            ; +0xc, 0x10003a50c\nsub     rsp, 28h                                                       ; +0xd, 0x10003a50d\ntest    esi, esi                                                       ; +0x11, 0x10003a511\njle     short loc_10003A559                                            ; +0x13, 0x10003a513\nmov     r15d, esi                                                      ; +0x15, 0x10003a515\nmov     rbx, rdi                                                       ; +0x18, 0x10003a518\ncall    GameStatsManager__isDailyRecall                                ; +0x1b, 0x10003a51b\ntest    al, al                                                         ; +0x20, 0x10003a520\njnz     short loc_10003A559                                            ; +0x22, 0x10003a522\nxor     eax, eax                                                       ; +0x24, 0x10003a524\ncmp     r15d, 186A1h                                                   ; +0x26, 0x10003a526\nsetnb   al                                                             ; +0x2d, 0x10003a52d\ncmp     r15d, 30D41h                                                   ; +0x30, 0x10003a530\nlea     eax, [rax+rax+1]                                               ; +0x37, 0x10003a537\nmov     r14d, 5                                                        ; +0x3b, 0x10003a53b\ncmovb   r14d, eax                                                      ; +0x41, 0x10003a541\nlea     rsi, a21; \"21\"                                                 ; +0x45, 0x10003a545\nmov     rdi, rbx                                                       ; +0x4c, 0x10003a54c\ncall    GameStatsManager__getStat                                      ; +0x4f, 0x10003a54f\nsub     eax, r14d                                                      ; +0x54, 0x10003a554\njge     short loc_10003A56A                                            ; +0x57, 0x10003a557\nxor     eax, eax                                                       ; +0x59, 0x10003a559\nadd     rsp, 28h                                                       ; +0x5b, 0x10003a55b\npop     rbx                                                            ; +0x5f, 0x10003a55f\npop     r12                                                            ; +0x60, 0x10003a560\npop     r13                                                            ; +0x62, 0x10003a562\npop     r14                                                            ; +0x64, 0x10003a564\npop     r15                                                            ; +0x66, 0x10003a566\npop     rbp                                                            ; +0x68, 0x10003a568\nretn                                                                   ; +0x69, 0x10003a569\nlea     rsi, a21; \"21\"                                                 ; +0x6a, 0x10003a56a\nmov     rdi, rbx                                                       ; +0x71, 0x10003a571\nmov     edx, eax                                                       ; +0x74, 0x10003a574\ncall    GameStatsManager__setStat                                      ; +0x76, 0x10003a576\nmov     rbx, [rbx+2F0h]                                                ; +0x7b, 0x10003a57b\nlea     r12, aI_14; \"%i\"                                               ; +0x82, 0x10003a582\nmov     rdi, r12; __format                                             ; +0x89, 0x10003a589\nmov     esi, r14d                                                      ; +0x8c, 0x10003a58c\nxor     eax, eax                                                       ; +0x8f, 0x10003a58f\ncall    sub_10088E820                                                  ; +0x91, 0x10003a591\nmov     r14, rax                                                       ; +0x96, 0x10003a596\nmov     rdi, r12; __format                                             ; +0x99, 0x10003a599\nmov     esi, r15d                                                      ; +0x9c, 0x10003a59c\nxor     eax, eax                                                       ; +0x9f, 0x10003a59f\ncall    sub_10088E820                                                  ; +0xa1, 0x10003a5a1\nmov     rdi, rax                                                       ; +0xa6, 0x10003a5a6\ncall    cocos2d__CCString__getCString                                  ; +0xa9, 0x10003a5a9\nmov     r12, rax                                                       ; +0xae, 0x10003a5ae\nmov     rdi, rax; __s                                                  ; +0xb1, 0x10003a5b1\ncall    _strlen                                                        ; +0xb4, 0x10003a5b4\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xb9, 0x10003a5b9\njnb     loc_10003A657                                                  ; +0xbd, 0x10003a5bd\nmov     r15, rax                                                       ; +0xc3, 0x10003a5c3\ncmp     rax, 17h                                                       ; +0xc6, 0x10003a5c6\njnb     short loc_10003A5DE                                            ; +0xca, 0x10003a5ca\nlea     eax, [r15+r15]                                                 ; +0xcc, 0x10003a5cc\nmov     byte ptr [rbp+__dst], al                                       ; +0xd0, 0x10003a5d0\nlea     r13, [rbp+__dst+1]                                             ; +0xd3, 0x10003a5d3\ntest    r15, r15                                                       ; +0xd7, 0x10003a5d7\njnz     short loc_10003A61E                                            ; +0xda, 0x10003a5da\njmp     short loc_10003A62C                                            ; +0xdc, 0x10003a5dc\nmov     rax, r15                                                       ; +0xde, 0x10003a5de\nor      rax, 7                                                         ; +0xe1, 0x10003a5e1\nlea     rcx, [rax+1]                                                   ; +0xe5, 0x10003a5e5\ncmp     rax, 17h                                                       ; +0xe9, 0x10003a5e9\nmov     [rbp+var_48], r14                                              ; +0xed, 0x10003a5ed\nmov     r14, rbx                                                       ; +0xf1, 0x10003a5f1\nmov     ebx, 1Ah                                                       ; +0xf4, 0x10003a5f4\ncmovnz  rbx, rcx                                                       ; +0xf9, 0x10003a5f9\nmov     rdi, rbx; __sz                                                 ; +0xfd, 0x10003a5fd\ncall    __Znwm; operator new(ulong)                                    ; +0x100, 0x10003a600\nmov     r13, rax                                                       ; +0x105, 0x10003a605\nmov     [rbp+__p], rax                                                 ; +0x108, 0x10003a608\ninc     rbx                                                            ; +0x10c, 0x10003a60c\nmov     [rbp+__dst], rbx                                               ; +0x10f, 0x10003a60f\nmov     rbx, r14                                                       ; +0x113, 0x10003a613\nmov     r14, [rbp+var_48]                                              ; +0x116, 0x10003a616\nmov     [rbp+var_38], r15                                              ; +0x11a, 0x10003a61a\nmov     rdi, r13; __dst                                                ; +0x11e, 0x10003a61e\nmov     rsi, r12; __src                                                ; +0x121, 0x10003a621\nmov     rdx, r15; __len                                                ; +0x124, 0x10003a624\ncall    _memmove                                                       ; +0x127, 0x10003a627\nmov     byte ptr [r13+r15+0], 0                                        ; +0x12c, 0x10003a62c\nlea     rdx, [rbp+__dst]                                               ; +0x132, 0x10003a632\nmov     rdi, rbx                                                       ; +0x136, 0x10003a636\nmov     rsi, r14                                                       ; +0x139, 0x10003a639\ncall    cocos2d__CCDictionary__setObject                               ; +0x13c, 0x10003a63c\ntest    byte ptr [rbp+__dst], 1                                        ; +0x141, 0x10003a641\njz      short loc_10003A650                                            ; +0x145, 0x10003a645\nmov     rdi, [rbp+__p]; __p                                            ; +0x147, 0x10003a647\ncall    __ZdlPv; operator delete(void *)                               ; +0x14b, 0x10003a64b\nmov     al, 1                                                          ; +0x150, 0x10003a650\njmp     loc_10003A55B                                                  ; +0x152, 0x10003a652\ncall    sub_100003630                                                  ; +0x157, 0x10003a657", "xrefs": ["LevelBrowserLayer::FLAlert_Clicked @ 0x100487fb1"], "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"}