{"type": "func", "start": 5371372544, "end": 5371373021, "name": "GJPathRewardPopup::onClaim", "pseudocode": "// \n// GJPathRewardPopup::onClaim from 0x14028a400 to 0x14028a5dd (477 bytes)\n// \n// 2 xrefs:\n// > GJPathRewardPopup::init @ 0x14028a01b\n// > <???> @ 0x1406d1640\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// Hidden C++ exception states: #wind=2\nvoid GJPathRewardPopup::onClaim(GJPathRewardPopup *a1, cocos2d::CCObject *a2)\n{\n  float v2; // xmm3_4\n  GameStatsManager *v4; // rbx\n  __int64 v5; // rax\n  GJRewardItem *v6; // rbp\n  struct cocos2d::CCFadeTo *v7; // rax\n  cocos2d::ccColor3B *v8; // r8\n  __int64 v9; // rbx\n  struct cocos2d::CCDelayTime *v10; // rax\n  struct cocos2d::CCSequence *v11; // rax\n  cocos2d::ccColor3B *v12; // r8\n  RewardUnlockLayer *v13; // rsi\n  cocos2d::CCNode *v14; // rbx\n  cocos2d::CCNode_vtbl *v15; // rdi\n  int v16; // eax\n  cocos2d::CCObject *m_rewardItem; // rcx\n  void *v18; // [rsp+20h] [rbp-68h]\n  float v19; // [rsp+20h] [rbp-68h]\n  char v20[32]; // [rsp+28h] [rbp-60h] BYREF\n  _QWORD v21[4]; // [rsp+48h] [rbp-40h] BYREF\n\n  v4 = (GameStatsManager *)qword_1406C2EE8;\n  if ( !qword_1406C2EE8 )\n  {\n    v18 = operator new(0x3E0u);\n    qword_1406C2EE8 = sub_1401D0AE0((__int64)v18);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);\n    v4 = (GameStatsManager *)qword_1406C2EE8;\n  }\n  GameStatsManager::getPathRewardKey((__int64)a1, v21, a1->m_pathNumber);\n  v5 = sub_14003BDB0((__int64)v20, (__int64)v21);\n  v6 = GameStatsManager::unlockSpecialChest(v4, v5);\n  sub_14003A830((__int64)v21);\n  if ( v6 )\n  {\n    v7 = cocos2d::CCFadeTo::create(0.2, 0);\n    cocos2d::CCNode::runAction((CCLightFlash *)a1, (cocos2d::CCPoint)v7, v8, v2, *(float *)&v18);\n    v9 = cocos2d::CCCallFunc::create(a1, GJPathRewardPopup::closePopup);\n    v10 = cocos2d::CCDelayTime::create(0.2);\n    v11 = cocos2d::CCSequence::create(v10, v9, 0);\n    cocos2d::CCNode::runAction((CCLightFlash *)a1, (cocos2d::CCPoint)v11, v12, v2, v19);\n    v13 = RewardUnlockLayer::create(v6->m_rewardType, nullptr);\n    v14 = a1->getParent(a1);\n    v15 = v14->__vftable;\n    v16 = a1->getZOrder(a1);\n    v15->addChild_0(v14, v13, v16 + 1);\n    m_rewardItem = v13->m_rewardItem;\n    if ( m_rewardItem )\n      cocos2d::CCObject::release(m_rewardItem);\n    v13->m_rewardItem = v6;\n    cocos2d::CCObject::retain(v6);\n    if ( !v6->m_unk || v6->m_rewardType == v13->m_chestType )\n    {\n      v13->m_closeBtn->setVisible(v13->m_closeBtn, 0);\n      v13->m_closeBtn->setEnabled(v13->m_closeBtn, 0);\n      v13->m_wrongLabel->setVisible(v13->m_wrongLabel, 0);\n      v13->m_rewardCollected = 1;\n      if ( v13->m_animationPlayed )\n        RewardUnlockLayer::playRewardEffect(v13);\n    }\n  }\n  else\n  {\n    GJPathRewardPopup::closePopup(a1);\n  }\n}", "assembly": "; \n; GJPathRewardPopup::onClaim from 0x14028a400 to 0x14028a5dd (477 bytes)\n; \n; 2 xrefs:\n; > GJPathRewardPopup::init @ 0x14028a01b\n; > <???> @ 0x1406d1640\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x14028a400\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x14028a405\npush    rsi                                                            ; +0xa, 0x14028a40a\npush    rdi                                                            ; +0xb, 0x14028a40b\npush    r14                                                            ; +0xc, 0x14028a40c\nsub     rsp, 70h                                                       ; +0xe, 0x14028a40e\nmov     rax, cs:__security_cookie                                      ; +0x12, 0x14028a412\nxor     rax, rsp                                                       ; +0x19, 0x14028a419\nmov     [rsp+88h+var_20], rax                                          ; +0x1c, 0x14028a41c\nmov     r14, rcx                                                       ; +0x21, 0x14028a421\nmov     rbx, cs:qword_1406C2EE8                                        ; +0x24, 0x14028a424\ntest    rbx, rbx                                                       ; +0x2b, 0x14028a42b\njnz     short loc_14028A45F                                            ; +0x2e, 0x14028a42e\nmov     ecx, 3E0h; Size                                                ; +0x30, 0x14028a430\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x35, 0x14028a435\nmov     [rsp+88h+var_68], rax                                          ; +0x3a, 0x14028a43a\nmov     rcx, rax                                                       ; +0x3f, 0x14028a43f\ncall    sub_1401D0AE0                                                  ; +0x42, 0x14028a442\nnop                                                                    ; +0x47, 0x14028a447\nmov     cs:qword_1406C2EE8, rax                                        ; +0x48, 0x14028a448\nmov     rdx, [rax]                                                     ; +0x4f, 0x14028a44f\nmov     rcx, rax                                                       ; +0x52, 0x14028a452\ncall    qword ptr [rdx+48h]                                            ; +0x55, 0x14028a455\nmov     rbx, cs:qword_1406C2EE8                                        ; +0x58, 0x14028a458\nmov     r8d, [r14+278h]                                                ; +0x5f, 0x14028a45f\nlea     rdx, [rsp+88h+var_40]                                          ; +0x66, 0x14028a466\ncall    GameStatsManager__getPathRewardKey                             ; +0x6b, 0x14028a46b\nnop                                                                    ; +0x70, 0x14028a470\nlea     rdx, [rsp+88h+var_40]                                          ; +0x71, 0x14028a471\nlea     rcx, [rsp+88h+var_60]                                          ; +0x76, 0x14028a476\ncall    sub_14003BDB0                                                  ; +0x7b, 0x14028a47b\nmov     rdx, rax                                                       ; +0x80, 0x14028a480\nmov     rcx, rbx                                                       ; +0x83, 0x14028a483\ncall    GameStatsManager__unlockSpecialChest                           ; +0x86, 0x14028a486\nmov     rbp, rax                                                       ; +0x8b, 0x14028a48b\nlea     rcx, [rsp+88h+var_40]                                          ; +0x8e, 0x14028a48e\ncall    sub_14003A830                                                  ; +0x93, 0x14028a493\ntest    rbp, rbp                                                       ; +0x98, 0x14028a498\njnz     short loc_14028A4AA                                            ; +0x9b, 0x14028a49b\nmov     rcx, r14                                                       ; +0x9d, 0x14028a49d\ncall    GJPathRewardPopup__closePopup; Merged with: GJPathRewardPopup::closePopup, GJPathsLayer::onClose, GJPromoPopup::onClose ; +0xa0, 0x14028a4a0\njmp     loc_14028A5BB                                                  ; +0xa5, 0x14028a4a5\nxor     edx, edx                                                       ; +0xaa, 0x14028a4aa\nmovss   xmm0, cs:dword_140622A74                                       ; +0xac, 0x14028a4ac\ncall    cs:?create@CCFadeTo@cocos2d@@SAPEAV12@ME@Z; cocos2d::CCFadeTo::create(float,uchar) ; +0xb4, 0x14028a4b4\nmov     rdx, rax                                                       ; +0xba, 0x14028a4ba\nmov     rcx, r14                                                       ; +0xbd, 0x14028a4bd\ncall    cs:?runAction@CCNode@cocos2d@@QEAAPEAVCCAction@2@PEAV32@@Z; cocos2d::CCNode::runAction(cocos2d::CCAction *) ; +0xc0, 0x14028a4c0\nlea     rdx, GJPathRewardPopup__closePopup; Merged with: GJPathRewardPopup::closePopup, GJPathsLayer::onClose, GJPromoPopup::onClose ; +0xc6, 0x14028a4c6\nmov     rcx, r14                                                       ; +0xcd, 0x14028a4cd\ncall    cs:?create@CCCallFunc@cocos2d@@SAPEAV12@PEAVCCObject@2@P832@EAAXXZ@Z; cocos2d::CCCallFunc::create(cocos2d::CCObject *,void (cocos2d::CCObject::*)(void)) ; +0xd0, 0x14028a4d0\nmov     rbx, rax                                                       ; +0xd6, 0x14028a4d6\nmovss   xmm0, cs:dword_140622A74                                       ; +0xd9, 0x14028a4d9\ncall    cs:?create@CCDelayTime@cocos2d@@SAPEAV12@M@Z; cocos2d::CCDelayTime::create(float) ; +0xe1, 0x14028a4e1\nmov     rcx, rax                                                       ; +0xe7, 0x14028a4e7\nxor     r8d, r8d                                                       ; +0xea, 0x14028a4ea\nmov     rdx, rbx                                                       ; +0xed, 0x14028a4ed\ncall    cs:?create@CCSequence@cocos2d@@SAPEAV12@PEAVCCFiniteTimeAction@2@ZZ; cocos2d::CCSequence::create(cocos2d::CCFiniteTimeAction *,...) ; +0xf0, 0x14028a4f0\nmov     rdx, rax                                                       ; +0xf6, 0x14028a4f6\nmov     rcx, r14                                                       ; +0xf9, 0x14028a4f9\ncall    cs:?runAction@CCNode@cocos2d@@QEAAPEAVCCAction@2@PEAV32@@Z; cocos2d::CCNode::runAction(cocos2d::CCAction *) ; +0xfc, 0x14028a4fc\nxor     edx, edx                                                       ; +0x102, 0x14028a502\nmov     ecx, [rbp+40h]                                                 ; +0x104, 0x14028a504\ncall    RewardUnlockLayer__create                                      ; +0x107, 0x14028a507\nmov     rsi, rax                                                       ; +0x10c, 0x14028a50c\nmov     rdx, [r14]                                                     ; +0x10f, 0x14028a50f\nmov     rcx, r14                                                       ; +0x112, 0x14028a512\ncall    qword ptr [rdx+1E8h]                                           ; +0x115, 0x14028a515\nmov     rbx, rax                                                       ; +0x11b, 0x14028a51b\nmov     rdi, [rax]                                                     ; +0x11e, 0x14028a51e\nmov     rdx, [r14]                                                     ; +0x121, 0x14028a521\nmov     rcx, r14                                                       ; +0x124, 0x14028a524\ncall    qword ptr [rdx+60h]                                            ; +0x127, 0x14028a527\nlea     r8d, [rax+1]                                                   ; +0x12a, 0x14028a52a\nmov     rdx, rsi                                                       ; +0x12e, 0x14028a52e\nmov     rcx, rbx                                                       ; +0x131, 0x14028a531\ncall    qword ptr [rdi+1B8h]                                           ; +0x134, 0x14028a534\nmov     rcx, [rsi+2A0h]                                                ; +0x13a, 0x14028a53a\ntest    rcx, rcx                                                       ; +0x141, 0x14028a541\njz      short loc_14028A54C                                            ; +0x144, 0x14028a544\ncall    cs:?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x146, 0x14028a546\nmov     [rsi+2A0h], rbp                                                ; +0x14c, 0x14028a54c\nmov     rcx, rbp                                                       ; +0x153, 0x14028a553\ncall    cs:?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x156, 0x14028a556\ncmp     byte ptr [rbp+50h], 0                                          ; +0x15c, 0x14028a55c\njz      short loc_14028A56D                                            ; +0x160, 0x14028a560\nmov     eax, [rsi+298h]                                                ; +0x162, 0x14028a562\ncmp     [rbp+40h], eax                                                 ; +0x168, 0x14028a568\njnz     short loc_14028A5BB                                            ; +0x16b, 0x14028a56b\nmov     rcx, [rsi+2B0h]                                                ; +0x16d, 0x14028a56d\nmov     rax, [rcx]                                                     ; +0x174, 0x14028a574\nxor     edx, edx                                                       ; +0x177, 0x14028a577\ncall    qword ptr [rax+140h]                                           ; +0x179, 0x14028a579\nmov     rcx, [rsi+2B0h]                                                ; +0x17f, 0x14028a57f\nmov     rax, [rcx]                                                     ; +0x186, 0x14028a586\nxor     edx, edx                                                       ; +0x189, 0x14028a589\ncall    qword ptr [rax+398h]                                           ; +0x18b, 0x14028a58b\nmov     rcx, [rsi+2A8h]                                                ; +0x191, 0x14028a591\nmov     rax, [rcx]                                                     ; +0x198, 0x14028a598\nxor     edx, edx                                                       ; +0x19b, 0x14028a59b\ncall    qword ptr [rax+140h]                                           ; +0x19d, 0x14028a59d\nmov     byte ptr [rsi+29Ch], 1                                         ; +0x1a3, 0x14028a5a3\ncmp     byte ptr [rsi+29Dh], 0                                         ; +0x1aa, 0x14028a5aa\njz      short loc_14028A5BB                                            ; +0x1b1, 0x14028a5b1\nmov     rcx, rsi                                                       ; +0x1b3, 0x14028a5b3\ncall    RewardUnlockLayer__playRewardEffect                            ; +0x1b6, 0x14028a5b6\nmov     rcx, [rsp+88h+var_20]                                          ; +0x1bb, 0x14028a5bb\nxor     rcx, rsp; StackCookie                                          ; +0x1c0, 0x14028a5c0\ncall    __security_check_cookie                                        ; +0x1c3, 0x14028a5c3\nlea     r11, [rsp+88h+var_18]                                          ; +0x1c8, 0x14028a5c8\nmov     rbx, [r11+28h]                                                 ; +0x1cd, 0x14028a5cd\nmov     rbp, [r11+30h]                                                 ; +0x1d1, 0x14028a5d1\nmov     rsp, r11                                                       ; +0x1d5, 0x14028a5d5\npop     r14                                                            ; +0x1d8, 0x14028a5d8\npop     rdi                                                            ; +0x1da, 0x14028a5da\npop     rsi                                                            ; +0x1db, 0x14028a5db\nretn                                                                   ; +0x1dc, 0x14028a5dc", "xrefs": ["GJPathRewardPopup::init @ 0x14028a01b", "<???> @ 0x1406d1640"], "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"}