{"type": "func", "start": 4295434480, "end": 4295434706, "name": "GameStatsManager::storeRewardState", "pseudocode": "// \n// GameStatsManager::storeRewardState from 0x1000720f0 to 0x1000721d2 (226 bytes)\n// \n// 2 xrefs:\n// > GameLevelManager::onGetGJRewardsCompleted @ 0x10052733d\n// > GameLevelManager::onGetGJRewardsCompleted @ 0x1005273b7\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::storeRewardState(\n        __int64 a1,\n        unsigned int a2,\n        unsigned int a3,\n        int a4,\n        __int128 *a5,\n        double a6)\n{\n  unsigned int v9; // r13d\n  __int64 v10; // r14\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    v9 = 0;\n    if ( (*(_BYTE *)a5 & 1) == 0 )\n      goto LABEL_3;\n  }\n  else\n  {\n    ftime(&v11);\n    a6 = (double)(v11.millitm + 1000 * (v11.time & 0xFFFFF)) / 1000.0;\n    v9 = a4 + (int)a6;\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_100006B70(&v13, *((const void **)a5 + 2), *((_QWORD *)a5 + 1), a6);\nLABEL_6:\n  v10 = GJRewardItem::create(a3, v9, &v13);\n  if ( (v13 & 1) != 0 )\n    operator delete(__p);\n  *(_BYTE *)(v10 + 80) = 1;\n  *(_DWORD *)(v10 + 64) = a2;\n  cocos2d::CCDictionary::setObject(*(cocos2d::CCDictionary **)(v12 + 472), (cocos2d::CCObject *)v10, a2);\n}", "assembly": "; \n; GameStatsManager::storeRewardState from 0x1000720f0 to 0x1000721d2 (226 bytes)\n; \n; 2 xrefs:\n; > GameLevelManager::onGetGJRewardsCompleted @ 0x10052733d\n; > GameLevelManager::onGetGJRewardsCompleted @ 0x1005273b7\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, 0x1000720f0\nmov     rbp, rsp                                                       ; +0x1, 0x1000720f1\npush    r15                                                            ; +0x4, 0x1000720f4\npush    r14                                                            ; +0x6, 0x1000720f6\npush    r13                                                            ; +0x8, 0x1000720f8\npush    r12                                                            ; +0xa, 0x1000720fa\npush    rbx                                                            ; +0xc, 0x1000720fc\nsub     rsp, 38h                                                       ; +0xd, 0x1000720fd\nmov     r12, r8                                                        ; +0x11, 0x100072101\nmov     r15d, edx                                                      ; +0x14, 0x100072104\nmov     ebx, esi                                                       ; +0x17, 0x100072107\nmov     [rbp+var_48], rdi                                              ; +0x19, 0x100072109\ntest    ecx, ecx                                                       ; +0x1d, 0x10007210d\njle     short loc_100072167                                            ; +0x1f, 0x10007210f\nmov     r14d, ecx                                                      ; +0x21, 0x100072111\nlea     rdi, [rbp+var_58]; timeb *                                     ; +0x24, 0x100072114\ncall    _ftime                                                         ; +0x28, 0x100072118\nmovzx   eax, [rbp+var_58.millitm]                                      ; +0x2d, 0x10007211d\nmov     rcx, [rbp+var_58.time]                                         ; +0x31, 0x100072121\nand     ecx, 0FFFFFh                                                   ; +0x35, 0x100072125\nimul    rcx, 3E8h                                                      ; +0x3b, 0x10007212b\nadd     rcx, rax                                                       ; +0x42, 0x100072132\ncvtsi2sd xmm0, rcx                                                     ; +0x45, 0x100072135\ndivsd   xmm0, cs:qword_100815208                                       ; +0x4a, 0x10007213a\ncvttsd2si r13d, xmm0                                                   ; +0x52, 0x100072142\nadd     r13d, r14d                                                     ; +0x57, 0x100072147\ntest    byte ptr [r12], 1                                              ; +0x5a, 0x10007214a\njnz     short loc_100072171                                            ; +0x5f, 0x10007214f\nmov     rax, [r12+10h]                                                 ; +0x61, 0x100072151\nmov     [rbp+__p], rax                                                 ; +0x66, 0x100072156\nmovupd  xmm0, xmmword ptr [r12]                                        ; +0x6a, 0x10007215a\nmovapd  [rbp+var_40], xmm0                                             ; +0x70, 0x100072160\njmp     short loc_100072184                                            ; +0x75, 0x100072165\nxor     r13d, r13d                                                     ; +0x77, 0x100072167\ntest    byte ptr [r12], 1                                              ; +0x7a, 0x10007216a\njz      short loc_100072151                                            ; +0x7f, 0x10007216f\nmov     rdx, [r12+8]                                                   ; +0x81, 0x100072171\nmov     rsi, [r12+10h]                                                 ; +0x86, 0x100072176\nlea     rdi, [rbp+var_40]                                              ; +0x8b, 0x10007217b\ncall    sub_100006B70                                                  ; +0x8f, 0x10007217f\nlea     rdx, [rbp+var_40]                                              ; +0x94, 0x100072184\nmov     edi, r15d                                                      ; +0x98, 0x100072188\nmov     esi, r13d                                                      ; +0x9b, 0x10007218b\ncall    GJRewardItem__create                                           ; +0x9e, 0x10007218e\nmov     r14, rax                                                       ; +0xa3, 0x100072193\ntest    byte ptr [rbp+var_40], 1                                       ; +0xa6, 0x100072196\njz      short loc_1000721A5                                            ; +0xaa, 0x10007219a\nmov     rdi, [rbp+__p]; __p                                            ; +0xac, 0x10007219c\ncall    __ZdlPv; operator delete(void *)                               ; +0xb0, 0x1000721a0\nmov     byte ptr [r14+50h], 1                                          ; +0xb5, 0x1000721a5\nmov     [r14+40h], ebx                                                 ; +0xba, 0x1000721aa\nmov     rax, [rbp+var_48]                                              ; +0xbe, 0x1000721ae\nmov     rdi, [rax+1D8h]                                                ; +0xc2, 0x1000721b2\nmov     edx, ebx                                                       ; +0xc9, 0x1000721b9\nmov     rsi, r14                                                       ; +0xcb, 0x1000721bb\ncall    cocos2d__CCDictionary__setObject                               ; +0xce, 0x1000721be\nadd     rsp, 38h                                                       ; +0xd3, 0x1000721c3\npop     rbx                                                            ; +0xd7, 0x1000721c7\npop     r12                                                            ; +0xd8, 0x1000721c8\npop     r13                                                            ; +0xda, 0x1000721ca\npop     r14                                                            ; +0xdc, 0x1000721cc\npop     r15                                                            ; +0xde, 0x1000721ce\npop     rbp                                                            ; +0xe0, 0x1000721d0\nretn                                                                   ; +0xe1, 0x1000721d1", "xrefs": ["GameLevelManager::onGetGJRewardsCompleted @ 0x10052733d", "GameLevelManager::onGetGJRewardsCompleted @ 0x1005273b7"], "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"}