{"type": "func", "start": 4298126352, "end": 4298126644, "name": "GJPathRewardPopup::onClaim", "pseudocode": "// \n// GJPathRewardPopup::onClaim from 0x100303410 to 0x100303534 (292 bytes)\n// \n// 1 xrefs:\n// > GJPathRewardPopup::init @ 0x100303040\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 GJPathRewardPopup::onClaim(GJPathRewardPopup *a1, cocos2d::CCObject *a2)\n{\n  GameStatsManager *v2; // rax\n  GJRewardItem *v3; // rax\n  GJRewardItem *v4; // r14\n  cocos2d::CCFadeTo *v5; // rax\n  unsigned int v6; // r15d\n  unsigned int v7; // eax\n  int v8; // ecx\n  int v9; // r8d\n  int v10; // r9d\n  cocos2d::CCAction *v11; // rax\n  RewardUnlockLayer *v12; // r15\n  __int64 v13; // r12\n  int v14; // eax\n  cocos2d::CCDirector *v15; // rax\n  cocos2d::CCTouchDispatcher *v16; // rax\n\n  v2 = GameStatsManager::sharedState();\n  v3 = GameStatsManager::unlockPathChest(v2, a1->m_pathNumber);\n  if ( v3 )\n  {\n    v4 = v3;\n    v5 = cocos2d::CCFadeTo::create(0.2, 0);\n    cocos2d::CCNode::runAction(a1, v5);\n    v6 = (unsigned int)cocos2d::CCDelayTime::create(0.2);\n    v7 = (unsigned int)cocos2d::CCCallFunc::create(\n                         a1,\n                         (cocos2d::SEL_CallFunc)(unsigned __int64)GJPathRewardPopup::closePopup);\n    v11 = (cocos2d::CCAction *)sub_1003B5760(v6, v7, 0, v8, v9, v10);\n    cocos2d::CCNode::runAction(a1, v11);\n    v12 = RewardUnlockLayer::create(v4->m_rewardType, nullptr);\n    v13 = ((__int64 (__fastcall *)(GJPathRewardPopup *))a1->getParent)(a1);\n    v14 = ((__int64 (__fastcall *)(GJPathRewardPopup *))a1->getZOrder)(a1);\n    (*(void (__fastcall **)(__int64, RewardUnlockLayer *, _QWORD))(*(_QWORD *)v13 + 448LL))(\n      v13,\n      v12,\n      (unsigned int)(v14 + 1));\n    RewardUnlockLayer::showCollectReward(v12, v4);\n  }\n  else\n  {\n    v15 = cocos2d::CCDirector::sharedDirector();\n    v16 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(cocos2d::CCDirector *))v15->getTouchDispatcher)(v15);\n    cocos2d::CCTouchDispatcher::unregisterForcePrio(v16, a1);\n    cocos2d::CCNode::stopAllActions(a1);\n    cocos2d::CCNode::unscheduleAllSelectors(a1);\n    ((void (__fastcall *)(GJPathRewardPopup *, _QWORD))a1->setKeypadEnabled)(a1, 0);\n    ((void (__fastcall *)(GJPathRewardPopup *, __int64))a1->removeFromParentAndCleanup)(a1, 1);\n  }\n}", "assembly": "; \n; GJPathRewardPopup::onClaim from 0x100303410 to 0x100303534 (292 bytes)\n; \n; 1 xrefs:\n; > GJPathRewardPopup::init @ 0x100303040\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, 0x100303410\nmov     rbp, rsp                                                       ; +0x1, 0x100303411\npush    r15                                                            ; +0x4, 0x100303414\npush    r14                                                            ; +0x6, 0x100303416\npush    r12                                                            ; +0x8, 0x100303418\npush    rbx                                                            ; +0xa, 0x10030341a\nmov     rbx, rdi                                                       ; +0xb, 0x10030341b\ncall    GameStatsManager__sharedState                                  ; +0xe, 0x10030341e\nmov     esi, [rbx+278h]                                                ; +0x13, 0x100303423\nmov     rdi, rax                                                       ; +0x19, 0x100303429\ncall    GameStatsManager__unlockPathChest                              ; +0x1c, 0x10030342c\ntest    rax, rax                                                       ; +0x21, 0x100303431\njz      loc_1003034DE                                                  ; +0x24, 0x100303434\nmov     r14, rax                                                       ; +0x2a, 0x10030343a\nmovss   xmm0, cs:dword_10081541C                                       ; +0x2d, 0x10030343d\nxor     edi, edi                                                       ; +0x35, 0x100303445\ncall    cocos2d__CCFadeTo__create                                      ; +0x37, 0x100303447\nmov     rdi, rbx                                                       ; +0x3c, 0x10030344c\nmov     rsi, rax                                                       ; +0x3f, 0x10030344f\ncall    cocos2d__CCNode__runAction                                     ; +0x42, 0x100303452\nmovss   xmm0, cs:dword_10081541C                                       ; +0x47, 0x100303457\ncall    cocos2d__CCDelayTime__create                                   ; +0x4f, 0x10030345f\nmov     r15, rax                                                       ; +0x54, 0x100303464\nlea     rsi, GJPathRewardPopup__closePopup                             ; +0x57, 0x100303467\nmov     rdi, rbx                                                       ; +0x5e, 0x10030346e\nxor     edx, edx                                                       ; +0x61, 0x100303471\ncall    cocos2d__CCCallFunc__create                                    ; +0x63, 0x100303473\nmov     rdi, r15                                                       ; +0x68, 0x100303478\nmov     rsi, rax                                                       ; +0x6b, 0x10030347b\nxor     edx, edx                                                       ; +0x6e, 0x10030347e\nxor     eax, eax                                                       ; +0x70, 0x100303480\ncall    sub_1003B5760                                                  ; +0x72, 0x100303482\nmov     rdi, rbx                                                       ; +0x77, 0x100303487\nmov     rsi, rax                                                       ; +0x7a, 0x10030348a\ncall    cocos2d__CCNode__runAction                                     ; +0x7d, 0x10030348d\nmov     edi, [r14+40h]                                                 ; +0x82, 0x100303492\nxor     esi, esi                                                       ; +0x86, 0x100303496\ncall    RewardUnlockLayer__create                                      ; +0x88, 0x100303498\nmov     r15, rax                                                       ; +0x8d, 0x10030349d\nmov     rax, [rbx]                                                     ; +0x90, 0x1003034a0\nmov     rdi, rbx                                                       ; +0x93, 0x1003034a3\ncall    qword ptr [rax+1F0h]                                           ; +0x96, 0x1003034a6\nmov     r12, rax                                                       ; +0x9c, 0x1003034ac\nmov     rax, [rbx]                                                     ; +0x9f, 0x1003034af\nmov     rdi, rbx                                                       ; +0xa2, 0x1003034b2\ncall    qword ptr [rax+68h]                                            ; +0xa5, 0x1003034b5\nlea     edx, [rax+1]                                                   ; +0xa8, 0x1003034b8\nmov     rax, [r12]                                                     ; +0xab, 0x1003034bb\nmov     rdi, r12                                                       ; +0xaf, 0x1003034bf\nmov     rsi, r15                                                       ; +0xb2, 0x1003034c2\ncall    qword ptr [rax+1C0h]                                           ; +0xb5, 0x1003034c5\nmov     rdi, r15                                                       ; +0xbb, 0x1003034cb\nmov     rsi, r14                                                       ; +0xbe, 0x1003034ce\npop     rbx                                                            ; +0xc1, 0x1003034d1\npop     r12                                                            ; +0xc2, 0x1003034d2\npop     r14                                                            ; +0xc4, 0x1003034d4\npop     r15                                                            ; +0xc6, 0x1003034d6\npop     rbp                                                            ; +0xc8, 0x1003034d8\njmp     RewardUnlockLayer__showCollectReward                           ; +0xc9, 0x1003034d9\ncall    cocos2d__CCDirector__sharedDirector                            ; +0xce, 0x1003034de\nmov     rcx, [rax]                                                     ; +0xd3, 0x1003034e3\nmov     rdi, rax                                                       ; +0xd6, 0x1003034e6\ncall    qword ptr [rcx+0A0h]                                           ; +0xd9, 0x1003034e9\nmov     rdi, rax                                                       ; +0xdf, 0x1003034ef\nmov     rsi, rbx                                                       ; +0xe2, 0x1003034f2\ncall    cocos2d__CCTouchDispatcher__unregisterForcePrio                ; +0xe5, 0x1003034f5\nmov     rdi, rbx                                                       ; +0xea, 0x1003034fa\ncall    cocos2d__CCNode__stopAllActions                                ; +0xed, 0x1003034fd\nmov     rdi, rbx                                                       ; +0xf2, 0x100303502\ncall    cocos2d__CCNode__unscheduleAllSelectors                        ; +0xf5, 0x100303505\nmov     rax, [rbx]                                                     ; +0xfa, 0x10030350a\nmov     rdi, rbx                                                       ; +0xfd, 0x10030350d\nxor     esi, esi                                                       ; +0x100, 0x100303510\ncall    qword ptr [rax+420h]                                           ; +0x102, 0x100303512\nmov     rax, [rbx]                                                     ; +0x108, 0x100303518\nmov     rax, [rax+200h]                                                ; +0x10b, 0x10030351b\nmov     rdi, rbx                                                       ; +0x112, 0x100303522\nmov     esi, 1                                                         ; +0x115, 0x100303525\npop     rbx                                                            ; +0x11a, 0x10030352a\npop     r12                                                            ; +0x11b, 0x10030352b\npop     r14                                                            ; +0x11d, 0x10030352d\npop     r15                                                            ; +0x11f, 0x10030352f\npop     rbp                                                            ; +0x121, 0x100303531\njmp     rax                                                            ; +0x122, 0x100303532", "xrefs": ["GJPathRewardPopup::init @ 0x100303040"], "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"}