{"type": "func", "start": 5371142192, "end": 5371142764, "name": "GameLevelManager::onClaimNotificationRewardCompleted", "pseudocode": "// \n// GameLevelManager::onClaimNotificationRewardCompleted from 0x140252030 to 0x14025226c (572 bytes)\n// \n// 2 xrefs:\n// > GameLevelManager::handleIt @ 0x14021b388\n// > <???> @ 0x14091c4e4\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 11:28:42 +0000\n// \n\n// Hidden C++ exception states: #wind=6\nvoid __fastcall GameLevelManager::onClaimNotificationRewardCompleted(__int64 a1, __int64 a2, _QWORD *a3)\n{\n  _BYTE *v6; // rdx\n  __int64 v7; // rdx\n  __int64 v8; // rcx\n  __int64 v9; // r8\n  __int64 v10; // r9\n  unsigned __int64 v11; // rax\n  size_t v12; // rax\n  size_t v13; // r8\n  _QWORD *v14; // rdx\n  const char *v15; // rcx\n  __int64 v16; // rcx\n  unsigned int v17; // edi\n  char *v18; // r8\n  __int64 v19; // rcx\n  __int64 v20; // r14\n  __int64 NotificationRewardKey; // rsi\n  __int64 v22; // rcx\n  __int64 v23; // rcx\n  __int64 v24; // rcx\n  char **v25; // [rsp+30h] [rbp-78h] BYREF\n  void *v26; // [rsp+38h] [rbp-70h]\n  void *v27; // [rsp+40h] [rbp-68h]\n  __int64 v28; // [rsp+48h] [rbp-60h]\n  _QWORD *v29; // [rsp+50h] [rbp-58h]\n  char *String[2]; // [rsp+58h] [rbp-50h] BYREF\n  __int64 v31; // [rsp+68h] [rbp-40h]\n  unsigned __int64 v32; // [rsp+70h] [rbp-38h]\n\n  v28 = a2;\n  v29 = a3;\n  v6 = a3;\n  if ( a3[3] > 0xFu )\n    v6 = (_BYTE *)*a3;\n  GameLevelManager::removeDLFromActive(a1, v6);\n  *(_OWORD *)String = 0;\n  v31 = 0;\n  v32 = 0;\n  v11 = a3[2];\n  if ( v11 < 0xC )\n    sub_14003F4D0(v8, v7, v9, v10);\n  v12 = v11 - 12;\n  v13 = -1;\n  if ( v12 != -1 )\n    v13 = v12;\n  v14 = a3;\n  if ( a3[3] > 0xFu )\n    v14 = (_QWORD *)*a3;\n  sub_14003D230(String, (char *)v14 + 12, v13);\n  v15 = (const char *)String;\n  if ( v32 > 0xF )\n    v15 = String[0];\n  v17 = atoi(v15);\n  if ( v32 > 0xF )\n  {\n    v18 = String[0];\n    if ( v32 + 1 >= 0x1000 )\n    {\n      v18 = *((char **)String[0] - 1);\n      if ( (unsigned __int64)(String[0] - v18 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free(v18);\n  }\n  LODWORD(v25) = 0;\n  v20 = GameLevelManager::rewardItemFromResponse(v16, a2, &v25);\n  if ( v20 && (_DWORD)v25 == v17 )\n  {\n    v25 = String;\n    if ( !qword_14090BFE0 )\n    {\n      v26 = operator new(0x3E8u);\n      qword_14090BFE0 = sub_1402D6480(v26);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);\n    }\n    NotificationRewardKey = GameStatsManager::getNotificationRewardKey(v19, String, v17);\n    v26 = (void *)NotificationRewardKey;\n    v22 = qword_14090BFE0;\n    if ( !qword_14090BFE0 )\n    {\n      v27 = operator new(0x3E8u);\n      qword_14090BFE0 = sub_1402D6480(v27);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);\n      v22 = qword_14090BFE0;\n    }\n    cocos2d::CCDictionary::setObject(*(_QWORD *)(v22 + 368), v20, NotificationRewardKey);\n    sub_14003D310(NotificationRewardKey);\n    v23 = *(_QWORD *)(a1 + 528);\n    if ( v23 )\n      (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v23 + 16LL))(v23, v17);\n  }\n  else\n  {\n    v24 = *(_QWORD *)(a1 + 528);\n    if ( v24 )\n      (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v24 + 24LL))(v24, v17);\n  }\n  sub_14003D310(a2);\n  sub_14003D310((__int64)a3);\n}", "assembly": "; \n; GameLevelManager::onClaimNotificationRewardCompleted from 0x140252030 to 0x14025226c (572 bytes)\n; \n; 2 xrefs:\n; > GameLevelManager::handleIt @ 0x14021b388\n; > <???> @ 0x14091c4e4\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 11:28:42 +0000\n; \nmov     [rsp+arg_18], rbx                                              ; +0x0, 0x140252030\npush    rbp                                                            ; +0x5, 0x140252035\npush    rsi                                                            ; +0x6, 0x140252036\npush    rdi                                                            ; +0x7, 0x140252037\npush    r14                                                            ; +0x8, 0x140252038\npush    r15                                                            ; +0xa, 0x14025203a\nsub     rsp, 80h                                                       ; +0xc, 0x14025203c\nmov     rax, cs:__security_cookie                                      ; +0x13, 0x140252043\nxor     rax, rsp                                                       ; +0x1a, 0x14025204a\nmov     [rsp+0A8h+var_30], rax                                         ; +0x1d, 0x14025204d\nmov     rbx, r8                                                        ; +0x22, 0x140252052\nmov     rbp, rdx                                                       ; +0x25, 0x140252055\nmov     r15, rcx                                                       ; +0x28, 0x140252058\nmov     [rsp+0A8h+var_60], rdx                                         ; +0x2b, 0x14025205b\nmov     [rsp+0A8h+var_58], rbx                                         ; +0x30, 0x140252060\nxor     esi, esi                                                       ; +0x35, 0x140252065\nmov     rdx, r8                                                        ; +0x37, 0x140252067\ncmp     qword ptr [r8+18h], 0Fh                                        ; +0x3a, 0x14025206a\njbe     short loc_140252074                                            ; +0x3f, 0x14025206f\nmov     rdx, [r8]                                                      ; +0x41, 0x140252071\ncall    GameLevelManager__removeDLFromActive                           ; +0x44, 0x140252074\nxorps   xmm0, xmm0                                                     ; +0x49, 0x140252079\nmovups  xmmword ptr [rsp+0A8h+String], xmm0                            ; +0x4c, 0x14025207c\nmov     [rsp+0A8h+var_40], rsi                                         ; +0x51, 0x140252081\nmov     [rsp+0A8h+var_38], rsi                                         ; +0x56, 0x140252086\nmov     rax, [rbx+10h]                                                 ; +0x5b, 0x14025208b\ncmp     rax, 0Ch                                                       ; +0x5f, 0x14025208f\njb      loc_140252266                                                  ; +0x63, 0x140252093\nadd     rax, 0FFFFFFFFFFFFFFF4h                                        ; +0x69, 0x140252099\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x6d, 0x14025209d\ncmp     rax, r8                                                        ; +0x74, 0x1402520a4\ncmovb   r8, rax                                                        ; +0x77, 0x1402520a7\nmov     rdx, rbx                                                       ; +0x7b, 0x1402520ab\ncmp     qword ptr [rbx+18h], 0Fh                                       ; +0x7e, 0x1402520ae\njbe     short loc_1402520B8                                            ; +0x83, 0x1402520b3\nmov     rdx, [rbx]                                                     ; +0x85, 0x1402520b5\nadd     rdx, 0Ch                                                       ; +0x88, 0x1402520b8\nlea     rcx, [rsp+0A8h+String]                                         ; +0x8c, 0x1402520bc\ncall    sub_14003D230                                                  ; +0x91, 0x1402520c1\nlea     rcx, [rsp+0A8h+String]                                         ; +0x96, 0x1402520c6\ncmp     [rsp+0A8h+var_38], 0Fh                                         ; +0x9b, 0x1402520cb\ncmova   rcx, [rsp+0A8h+String]; String                                 ; +0xa1, 0x1402520d1\ncall    cs:atoi                                                        ; +0xa7, 0x1402520d7\nmov     edi, eax                                                       ; +0xad, 0x1402520dd\nmov     rdx, [rsp+0A8h+var_38]                                         ; +0xaf, 0x1402520df\ncmp     rdx, 0Fh                                                       ; +0xb4, 0x1402520e4\njbe     short loc_140252131                                            ; +0xb8, 0x1402520e8\ninc     rdx                                                            ; +0xba, 0x1402520ea\nmov     r8, [rsp+0A8h+String]                                          ; +0xbd, 0x1402520ed\nmov     rcx, r8                                                        ; +0xc2, 0x1402520f2\ncmp     rdx, 1000h                                                     ; +0xc5, 0x1402520f5\njb      short loc_140252129                                            ; +0xcc, 0x1402520fc\nadd     rdx, 27h ; '''                                                 ; +0xce, 0x1402520fe\nmov     r8, [r8-8]                                                     ; +0xd2, 0x140252102\nsub     rcx, r8                                                        ; +0xd6, 0x140252106\nsub     rcx, 8                                                         ; +0xd9, 0x140252109\ncmp     rcx, 1Fh                                                       ; +0xdd, 0x14025210d\njbe     short loc_140252129                                            ; +0xe1, 0x140252111\nmov     [rsp+0A8h+Reserved], rsi; Reserved                             ; +0xe3, 0x140252113\nxor     r9d, r9d; LineNo                                               ; +0xe8, 0x140252118\nxor     r8d, r8d; FileName                                             ; +0xeb, 0x14025211b\nxor     edx, edx; FunctionName                                         ; +0xee, 0x14025211e\nxor     ecx, ecx; Expression                                           ; +0xf0, 0x140252120\ncall    cs:_invoke_watson                                              ; +0xf2, 0x140252122\ndb 0CCh                                                                ; +0xf8, 0x140252128\nmov     rcx, r8; Block                                                 ; +0xf9, 0x140252129\ncall    j_j_free                                                       ; +0xfc, 0x14025212c\nmov     dword ptr [rsp+0A8h+var_78], esi                               ; +0x101, 0x140252131\nlea     r8, [rsp+0A8h+var_78]                                          ; +0x105, 0x140252135\nmov     rdx, rbp                                                       ; +0x10a, 0x14025213a\ncall    GameLevelManager__rewardItemFromResponse                       ; +0x10d, 0x14025213d\nmov     r14, rax                                                       ; +0x112, 0x140252142\ntest    rax, rax                                                       ; +0x115, 0x140252145\njz      loc_14025221C                                                  ; +0x118, 0x140252148\ncmp     dword ptr [rsp+0A8h+var_78], edi                               ; +0x11e, 0x14025214e\njnz     loc_14025221C                                                  ; +0x122, 0x140252152\nlea     rax, [rsp+0A8h+String]                                         ; +0x128, 0x140252158\nmov     [rsp+0A8h+var_78], rax                                         ; +0x12d, 0x14025215d\ncmp     cs:qword_14090BFE0, 0                                          ; +0x132, 0x140252162\njnz     short loc_140252197                                            ; +0x13a, 0x14025216a\nmov     ecx, 3E8h; Size                                                ; +0x13c, 0x14025216c\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x141, 0x140252171\nmov     [rsp+0A8h+var_70], rax                                         ; +0x146, 0x140252176\nmov     rcx, rax                                                       ; +0x14b, 0x14025217b\ncall    sub_1402D6480                                                  ; +0x14e, 0x14025217e\nnop                                                                    ; +0x153, 0x140252183\nmov     cs:qword_14090BFE0, rax                                        ; +0x154, 0x140252184\nmov     rcx, [rax]                                                     ; +0x15b, 0x14025218b\nmov     rdx, [rcx+48h]                                                 ; +0x15e, 0x14025218e\nmov     rcx, rax                                                       ; +0x162, 0x140252192\ncall    rdx                                                            ; +0x165, 0x140252195\nmov     r8d, edi                                                       ; +0x167, 0x140252197\nlea     rdx, [rsp+0A8h+String]                                         ; +0x16a, 0x14025219a\ncall    GameStatsManager__getNotificationRewardKey                     ; +0x16f, 0x14025219f\nmov     rsi, rax                                                       ; +0x174, 0x1402521a4\nmov     [rsp+0A8h+var_70], rax                                         ; +0x177, 0x1402521a7\nmov     rcx, cs:qword_14090BFE0                                        ; +0x17c, 0x1402521ac\ntest    rcx, rcx                                                       ; +0x183, 0x1402521b3\njnz     short loc_1402521EA                                            ; +0x186, 0x1402521b6\nmov     ecx, 3E8h; Size                                                ; +0x188, 0x1402521b8\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x18d, 0x1402521bd\nmov     [rsp+0A8h+var_68], rax                                         ; +0x192, 0x1402521c2\nmov     rcx, rax                                                       ; +0x197, 0x1402521c7\ncall    sub_1402D6480                                                  ; +0x19a, 0x1402521ca\nnop                                                                    ; +0x19f, 0x1402521cf\nmov     cs:qword_14090BFE0, rax                                        ; +0x1a0, 0x1402521d0\nmov     rcx, [rax]                                                     ; +0x1a7, 0x1402521d7\nmov     rdx, [rcx+48h]                                                 ; +0x1aa, 0x1402521da\nmov     rcx, rax                                                       ; +0x1ae, 0x1402521de\ncall    rdx                                                            ; +0x1b1, 0x1402521e1\nmov     rcx, cs:qword_14090BFE0                                        ; +0x1b3, 0x1402521e3\nmov     r8, rsi                                                        ; +0x1ba, 0x1402521ea\nmov     rdx, r14                                                       ; +0x1bd, 0x1402521ed\nmov     rcx, [rcx+170h]                                                ; +0x1c0, 0x1402521f0\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,std::string const &) ; +0x1c7, 0x1402521f7\nnop                                                                    ; +0x1cd, 0x1402521fd\nmov     rcx, rsi                                                       ; +0x1ce, 0x1402521fe\ncall    sub_14003D310                                                  ; +0x1d1, 0x140252201\nmov     rcx, [r15+210h]                                                ; +0x1d6, 0x140252206\ntest    rcx, rcx                                                       ; +0x1dd, 0x14025220d\njz      short loc_140252231                                            ; +0x1e0, 0x140252210\nmov     rax, [rcx]                                                     ; +0x1e2, 0x140252212\nmov     edx, edi                                                       ; +0x1e5, 0x140252215\ncall    qword ptr [rax+10h]                                            ; +0x1e7, 0x140252217\njmp     short loc_140252231                                            ; +0x1ea, 0x14025221a\nmov     rcx, [r15+210h]                                                ; +0x1ec, 0x14025221c\ntest    rcx, rcx                                                       ; +0x1f3, 0x140252223\njz      short loc_140252231                                            ; +0x1f6, 0x140252226\nmov     rax, [rcx]                                                     ; +0x1f8, 0x140252228\nmov     edx, edi                                                       ; +0x1fb, 0x14025222b\ncall    qword ptr [rax+18h]                                            ; +0x1fd, 0x14025222d\nnop                                                                    ; +0x200, 0x140252230\nmov     rcx, rbp                                                       ; +0x201, 0x140252231\ncall    sub_14003D310                                                  ; +0x204, 0x140252234\nnop                                                                    ; +0x209, 0x140252239\nmov     rcx, rbx                                                       ; +0x20a, 0x14025223a\ncall    sub_14003D310                                                  ; +0x20d, 0x14025223d\nmov     rcx, [rsp+0A8h+var_30]                                         ; +0x212, 0x140252242\nxor     rcx, rsp; StackCookie                                          ; +0x217, 0x140252247\ncall    __security_check_cookie                                        ; +0x21a, 0x14025224a\nmov     rbx, [rsp+0A8h+arg_18]                                         ; +0x21f, 0x14025224f\nadd     rsp, 80h                                                       ; +0x227, 0x140252257\npop     r15                                                            ; +0x22e, 0x14025225e\npop     r14                                                            ; +0x230, 0x140252260\npop     rdi                                                            ; +0x232, 0x140252262\npop     rsi                                                            ; +0x233, 0x140252263\npop     rbp                                                            ; +0x234, 0x140252264\nretn                                                                   ; +0x235, 0x140252265\ncall    sub_14003F4D0                                                  ; +0x236, 0x140252266\nalign 4                                                                ; +0x23b, 0x14025226b", "xrefs": ["GameLevelManager::handleIt @ 0x14021b388", "<???> @ 0x14091c4e4"], "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"}