{"type": "func", "start": 4295195600, "end": 4295195815, "name": "GameStatsManager::storeRewardState", "pseudocode": "// \n// GameStatsManager::storeRewardState from 0x100037bd0 to 0x100037ca7 (215 bytes)\n// \n// 2 xrefs:\n// > GameLevelManager::onGetGJRewardsCompleted @ 0x10052ca4d\n// > GameLevelManager::onGetGJRewardsCompleted @ 0x10052cac7\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:32 +0000\n// \n\n__int64 __fastcall GameStatsManager::storeRewardState(\n        __int64 a1,\n        unsigned int a2,\n        unsigned int a3,\n        int a4,\n        __int128 *a5)\n{\n  unsigned int v8; // r13d\n  __int64 v9; // r15\n  timeb v11; // [rsp+8h] [rbp-58h] BYREF\n  __int64 v12; // [rsp+18h] [rbp-48h]\n  __int128 v13; // [rsp+20h] [rbp-40h] BYREF\n  void *__p; // [rsp+30h] [rbp-30h]\n\n  v12 = a1;\n  if ( a4 <= 0 )\n  {\n    v8 = 0;\n    if ( (*(_BYTE *)a5 & 1) == 0 )\n      goto LABEL_3;\n  }\n  else\n  {\n    ftime(&v11);\n    v8 = a4 + (int)((double)v11.millitm / 1000.0 + (double)SLODWORD(v11.time));\n    if ( (*(_BYTE *)a5 & 1) == 0 )\n    {\nLABEL_3:\n      __p = *((void **)a5 + 2);\n      v13 = *a5;\n      goto LABEL_6;\n    }\n  }\n  sub_10001AD30(&v13, *((const void **)a5 + 2), *((_QWORD *)a5 + 1));\nLABEL_6:\n  v9 = GJRewardItem::create(a3, v8, &v13);\n  if ( (v13 & 1) != 0 )\n    operator delete(__p);\n  *(_BYTE *)(v9 + 80) = 1;\n  *(_DWORD *)(v9 + 64) = a2;\n  return cocos2d::CCDictionary::setObject_1(*(_QWORD *)(v12 + 472), v9, a2);\n}", "assembly": "; \n; GameStatsManager::storeRewardState from 0x100037bd0 to 0x100037ca7 (215 bytes)\n; \n; 2 xrefs:\n; > GameLevelManager::onGetGJRewardsCompleted @ 0x10052ca4d\n; > GameLevelManager::onGetGJRewardsCompleted @ 0x10052cac7\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:32 +0000\n; \npush    rbp                                                            ; +0x0, 0x100037bd0\nmov     rbp, rsp                                                       ; +0x1, 0x100037bd1\npush    r15                                                            ; +0x4, 0x100037bd4\npush    r14                                                            ; +0x6, 0x100037bd6\npush    r13                                                            ; +0x8, 0x100037bd8\npush    r12                                                            ; +0xa, 0x100037bda\npush    rbx                                                            ; +0xc, 0x100037bdc\nsub     rsp, 38h                                                       ; +0xd, 0x100037bdd\nmov     r12, r8                                                        ; +0x11, 0x100037be1\nmov     r15d, edx                                                      ; +0x14, 0x100037be4\nmov     ebx, esi                                                       ; +0x17, 0x100037be7\nmov     [rbp+var_48], rdi                                              ; +0x19, 0x100037be9\ntest    ecx, ecx                                                       ; +0x1d, 0x100037bed\njle     short loc_100037C3C                                            ; +0x1f, 0x100037bef\nmov     r14d, ecx                                                      ; +0x21, 0x100037bf1\nlea     rdi, [rbp+var_58]; timeb *                                     ; +0x24, 0x100037bf4\ncall    _ftime                                                         ; +0x28, 0x100037bf8\ncvtsi2sd xmm0, [rbp+var_58.time]                                       ; +0x2d, 0x100037bfd\nmovzx   eax, [rbp+var_58.millitm]                                      ; +0x33, 0x100037c03\ncvtsi2sd xmm1, eax                                                     ; +0x37, 0x100037c07\ndivsd   xmm1, cs:qword_100A03B70                                       ; +0x3b, 0x100037c0b\naddsd   xmm1, xmm0                                                     ; +0x43, 0x100037c13\ncvttsd2si r13d, xmm1                                                   ; +0x47, 0x100037c17\nadd     r13d, r14d                                                     ; +0x4c, 0x100037c1c\ntest    byte ptr [r12], 1                                              ; +0x4f, 0x100037c1f\njnz     short loc_100037C46                                            ; +0x54, 0x100037c24\nmov     rax, [r12+10h]                                                 ; +0x56, 0x100037c26\nmov     [rbp+__p], rax                                                 ; +0x5b, 0x100037c2b\nmovupd  xmm0, xmmword ptr [r12]                                        ; +0x5f, 0x100037c2f\nmovapd  [rbp+var_40], xmm0                                             ; +0x65, 0x100037c35\njmp     short loc_100037C59                                            ; +0x6a, 0x100037c3a\nxor     r13d, r13d                                                     ; +0x6c, 0x100037c3c\ntest    byte ptr [r12], 1                                              ; +0x6f, 0x100037c3f\njz      short loc_100037C26                                            ; +0x74, 0x100037c44\nmov     rdx, [r12+8]                                                   ; +0x76, 0x100037c46\nmov     rsi, [r12+10h]                                                 ; +0x7b, 0x100037c4b\nlea     rdi, [rbp+var_40]                                              ; +0x80, 0x100037c50\ncall    sub_10001AD30                                                  ; +0x84, 0x100037c54\nlea     rdx, [rbp+var_40]                                              ; +0x89, 0x100037c59\nmov     edi, r15d                                                      ; +0x8d, 0x100037c5d\nmov     esi, r13d                                                      ; +0x90, 0x100037c60\ncall    GJRewardItem__create                                           ; +0x93, 0x100037c63\nmov     r15, rax                                                       ; +0x98, 0x100037c68\ntest    byte ptr [rbp+var_40], 1                                       ; +0x9b, 0x100037c6b\njz      short loc_100037C7A                                            ; +0x9f, 0x100037c6f\nmov     rdi, [rbp+__p]; __p                                            ; +0xa1, 0x100037c71\ncall    __ZdlPv; operator delete(void *)                               ; +0xa5, 0x100037c75\nmov     byte ptr [r15+50h], 1                                          ; +0xaa, 0x100037c7a\nmov     [r15+40h], ebx                                                 ; +0xaf, 0x100037c7f\nmov     rax, [rbp+var_48]                                              ; +0xb3, 0x100037c83\nmov     rdi, [rax+1D8h]                                                ; +0xb7, 0x100037c87\nmov     edx, ebx                                                       ; +0xbe, 0x100037c8e\nmov     rsi, r15                                                       ; +0xc0, 0x100037c90\ncall    cocos2d__CCDictionary__setObject_1                             ; +0xc3, 0x100037c93\nadd     rsp, 38h                                                       ; +0xc8, 0x100037c98\npop     rbx                                                            ; +0xcc, 0x100037c9c\npop     r12                                                            ; +0xcd, 0x100037c9d\npop     r13                                                            ; +0xcf, 0x100037c9f\npop     r14                                                            ; +0xd1, 0x100037ca1\npop     r15                                                            ; +0xd3, 0x100037ca3\npop     rbp                                                            ; +0xd5, 0x100037ca5\nretn                                                                   ; +0xd6, 0x100037ca6", "xrefs": ["GameLevelManager::onGetGJRewardsCompleted @ 0x10052ca4d", "GameLevelManager::onGetGJRewardsCompleted @ 0x10052cac7"], "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"}