{"type": "func", "start": 5369363472, "end": 5369364051, "name": "CurrencyRewardLayer::create", "pseudocode": "// \n// CurrencyRewardLayer::create from 0x14009fc10 to 0x14009fe53 (579 bytes)\n// \n// 8 xrefs:\n// > ChallengesPage::claimItem @ 0x140086c30\n// > DailyLevelPage::claimLevelReward @ 0x1400d1cca\n// > EndLevelLayer::playEndEffect @ 0x140136d3b\n// > GJGarageLayer::dialogClosed @ 0x140278839\n// > LevelListLayer::onClaimReward @ 0x140306342\n// > PlayLayer::showNewBest @ 0x1403ab5af\n// > RewardUnlockLayer::playRewardEffect @ 0x1403cf7c3\n// > <???> @ 0x1406c76a4\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\nCurrencyRewardLayer *CurrencyRewardLayer::create(\n        int a1,\n        int a2,\n        int a3,\n        int a4,\n        CurrencySpriteType a5,\n        int a6,\n        CurrencySpriteType a7,\n        int a8,\n        cocos2d::CCPoint a9,\n        CurrencyRewardType a10,\n        float a11,\n        float a12)\n{\n  CurrencyRewardLayer *v16; // r14\n  cocos2d::CCPoint v17; // rax\n  CurrencyRewardLayer *v19; // [rsp+70h] [rbp-28h] BYREF\n\n  v16 = (CurrencyRewardLayer *)operator new(0x280u);\n  v19 = v16;\n  cocos2d::CCLayer::CCLayer(v16);\n  v16->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (CurrencyRewardLayer_vtbl *)&CurrencyRewardLayer::`vftable';\n  v16->cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&CurrencyRewardLayer::`vftable';\n  v16->cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&CurrencyRewardLayer::`vftable';\n  v16->cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&CurrencyRewardLayer::`vftable';\n  v16->cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&CurrencyRewardLayer::`vftable';\n  v16->cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&CurrencyRewardLayer::`vftable';\n  v16->m_delegate = nullptr;\n  v16->m_objects = nullptr;\n  v16->m_orbsLabel = nullptr;\n  v16->m_starsLabel = nullptr;\n  v16->m_diamondsLabel = nullptr;\n  v16->m_keysLabel = nullptr;\n  v16->m_shardsLabel = nullptr;\n  v16->m_orbsSprite = nullptr;\n  v16->m_starsSprite = nullptr;\n  v16->m_diamondsSprite = nullptr;\n  v16->m_keysSprite = nullptr;\n  v16->m_shardsSprite = nullptr;\n  v16->m_currencyBatchNode = nullptr;\n  v16->m_orbBatchNode = nullptr;\n  *(_QWORD *)&v16->m_orbs = 0;\n  *(_QWORD *)&v16->m_moons = 0;\n  *(_QWORD *)&v16->m_keys = 0;\n  *(_QWORD *)&v16->m_elapsed = 0;\n  v16->m_time = 1.0;\n  cocos2d::CCPoint::CCPoint(&v16->m_orbsPosition);\n  cocos2d::CCPoint::CCPoint(&v16->m_starsPosition);\n  cocos2d::CCPoint::CCPoint(&v16->m_moonsPosition);\n  cocos2d::CCPoint::CCPoint(&v16->m_diamondsPosition);\n  cocos2d::CCPoint::CCPoint(&v16->m_keysPosition);\n  cocos2d::CCPoint::CCPoint(&v16->m_shardsPosition);\n  *(_WORD *)&v16->m_particlesAdded = 0;\n  v16->m_mainNode = nullptr;\n  *(_QWORD *)&v16->m_rewardCount = 0;\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v19, *(const struct cocos2d::CCPoint **)&a9);\n  if ( CurrencyRewardLayer::init(v16, a1, a2, a3, a4, a5, a6, a7, a8, v17, a10, a11, a12) )\n  {\n    cocos2d::CCObject::autorelease(v16);\n    return v16;\n  }\n  else\n  {\n    ((void (__fastcall *)(CurrencyRewardLayer *, __int64))v16->~CurrencyRewardLayer)(v16, 1);\n    return nullptr;\n  }\n}", "assembly": "; \n; CurrencyRewardLayer::create from 0x14009fc10 to 0x14009fe53 (579 bytes)\n; \n; 8 xrefs:\n; > ChallengesPage::claimItem @ 0x140086c30\n; > DailyLevelPage::claimLevelReward @ 0x1400d1cca\n; > EndLevelLayer::playEndEffect @ 0x140136d3b\n; > GJGarageLayer::dialogClosed @ 0x140278839\n; > LevelListLayer::onClaimReward @ 0x140306342\n; > PlayLayer::showNewBest @ 0x1403ab5af\n; > RewardUnlockLayer::playRewardEffect @ 0x1403cf7c3\n; > <???> @ 0x1406c76a4\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_0], rbx                                               ; +0x0, 0x14009fc10\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x14009fc15\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x14009fc1a\npush    rdi                                                            ; +0xf, 0x14009fc1f\npush    r14                                                            ; +0x10, 0x14009fc20\npush    r15                                                            ; +0x12, 0x14009fc22\nsub     rsp, 80h                                                       ; +0x14, 0x14009fc24\nmov     ebx, r9d                                                       ; +0x1b, 0x14009fc2b\nmov     edi, r8d                                                       ; +0x1e, 0x14009fc2e\nmov     esi, edx                                                       ; +0x21, 0x14009fc31\nmov     ebp, ecx                                                       ; +0x23, 0x14009fc33\nmov     ecx, 280h; Size                                                ; +0x25, 0x14009fc35\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2a, 0x14009fc3a\nmov     r14, rax                                                       ; +0x2f, 0x14009fc3f\nmov     [rsp+98h+var_28], rax                                          ; +0x32, 0x14009fc42\nmov     rcx, rax                                                       ; +0x37, 0x14009fc47\ncall    cs:??0CCLayer@cocos2d@@QEAA@XZ; cocos2d::CCLayer::CCLayer(void) ; +0x3a, 0x14009fc4a\nnop                                                                    ; +0x40, 0x14009fc50\nlea     rax, ??_7CurrencyRewardLayer@@6B@; const CurrencyRewardLayer::`vftable' ; +0x41, 0x14009fc51\nmov     [r14], rax                                                     ; +0x48, 0x14009fc58\nlea     rax, ??_7CurrencyRewardLayer@@6B@_0; const CurrencyRewardLayer::`vftable' ; +0x4b, 0x14009fc5b\nmov     [r14+140h], rax                                                ; +0x52, 0x14009fc62\nlea     rax, ??_7CurrencyRewardLayer@@6B@_1; const CurrencyRewardLayer::`vftable' ; +0x59, 0x14009fc69\nmov     [r14+148h], rax                                                ; +0x60, 0x14009fc70\nlea     rax, ??_7CurrencyRewardLayer@@6B@_2; const CurrencyRewardLayer::`vftable' ; +0x67, 0x14009fc77\nmov     [r14+150h], rax                                                ; +0x6e, 0x14009fc7e\nlea     rax, ??_7CurrencyRewardLayer@@6B@_3; const CurrencyRewardLayer::`vftable' ; +0x75, 0x14009fc85\nmov     [r14+158h], rax                                                ; +0x7c, 0x14009fc8c\nlea     rax, ??_7CurrencyRewardLayer@@6B@_4; const CurrencyRewardLayer::`vftable' ; +0x83, 0x14009fc93\nmov     [r14+160h], rax                                                ; +0x8a, 0x14009fc9a\nxor     r15d, r15d                                                     ; +0x91, 0x14009fca1\nmov     [r14+198h], r15                                                ; +0x94, 0x14009fca4\nmov     [r14+1A0h], r15                                                ; +0x9b, 0x14009fcab\nmov     [r14+1A8h], r15                                                ; +0xa2, 0x14009fcb2\nmov     [r14+1B0h], r15                                                ; +0xa9, 0x14009fcb9\nmov     [r14+1C0h], r15                                                ; +0xb0, 0x14009fcc0\nmov     [r14+1C8h], r15                                                ; +0xb7, 0x14009fcc7\nmov     [r14+1D0h], r15                                                ; +0xbe, 0x14009fcce\nmov     [r14+1D8h], r15                                                ; +0xc5, 0x14009fcd5\nmov     [r14+1E0h], r15                                                ; +0xcc, 0x14009fcdc\nmov     [r14+1F0h], r15                                                ; +0xd3, 0x14009fce3\nmov     [r14+1F8h], r15                                                ; +0xda, 0x14009fcea\nmov     [r14+200h], r15                                                ; +0xe1, 0x14009fcf1\nmov     [r14+208h], r15                                                ; +0xe8, 0x14009fcf8\nmov     [r14+210h], r15                                                ; +0xef, 0x14009fcff\nmov     [r14+218h], r15                                                ; +0xf6, 0x14009fd06\nmov     [r14+220h], r15                                                ; +0xfd, 0x14009fd0d\nmov     [r14+228h], r15                                                ; +0x104, 0x14009fd14\nmov     [r14+230h], r15                                                ; +0x10b, 0x14009fd1b\nmov     dword ptr [r14+238h], 3F800000h                                ; +0x112, 0x14009fd22\nlea     rcx, [r14+23Ch]                                                ; +0x11d, 0x14009fd2d\ncall    cs:??0CCPoint@cocos2d@@QEAA@XZ; cocos2d::CCPoint::CCPoint(void) ; +0x124, 0x14009fd34\nlea     rcx, [r14+244h]                                                ; +0x12a, 0x14009fd3a\ncall    cs:??0CCPoint@cocos2d@@QEAA@XZ; cocos2d::CCPoint::CCPoint(void) ; +0x131, 0x14009fd41\nlea     rcx, [r14+24Ch]                                                ; +0x137, 0x14009fd47\ncall    cs:??0CCPoint@cocos2d@@QEAA@XZ; cocos2d::CCPoint::CCPoint(void) ; +0x13e, 0x14009fd4e\nlea     rcx, [r14+254h]                                                ; +0x144, 0x14009fd54\ncall    cs:??0CCPoint@cocos2d@@QEAA@XZ; cocos2d::CCPoint::CCPoint(void) ; +0x14b, 0x14009fd5b\nlea     rcx, [r14+25Ch]                                                ; +0x151, 0x14009fd61\ncall    cs:??0CCPoint@cocos2d@@QEAA@XZ; cocos2d::CCPoint::CCPoint(void) ; +0x158, 0x14009fd68\nlea     rcx, [r14+264h]                                                ; +0x15e, 0x14009fd6e\ncall    cs:??0CCPoint@cocos2d@@QEAA@XZ; cocos2d::CCPoint::CCPoint(void) ; +0x165, 0x14009fd75\nmov     [r14+26Ch], r15w                                               ; +0x16b, 0x14009fd7b\nmov     [r14+270h], r15                                                ; +0x173, 0x14009fd83\nmov     [r14+278h], r15                                                ; +0x17a, 0x14009fd8a\nmov     rdx, qword ptr [rsp+98h+arg_40.x]                              ; +0x181, 0x14009fd91\nlea     rcx, [rsp+98h+var_28]                                          ; +0x189, 0x14009fd99\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x18e, 0x14009fd9e\nmov     rcx, rax                                                       ; +0x194, 0x14009fda4\nmovss   xmm0, [rsp+98h+arg_58]                                         ; +0x197, 0x14009fda7\nmovss   [rsp+98h+var_38], xmm0                                         ; +0x1a0, 0x14009fdb0\nmovss   xmm1, [rsp+98h+arg_50]                                         ; +0x1a6, 0x14009fdb6\nmovss   [rsp+98h+var_40], xmm1                                         ; +0x1af, 0x14009fdbf\nmov     eax, [rsp+98h+arg_48]                                          ; +0x1b5, 0x14009fdc5\nmov     [rsp+98h+var_48], eax                                          ; +0x1bc, 0x14009fdcc\nmov     [rsp+98h+var_50], rcx                                          ; +0x1c0, 0x14009fdd0\nmov     eax, [rsp+98h+arg_38]                                          ; +0x1c5, 0x14009fdd5\nmov     [rsp+98h+var_58], eax                                          ; +0x1cc, 0x14009fddc\nmov     eax, [rsp+98h+arg_30]                                          ; +0x1d0, 0x14009fde0\nmov     [rsp+98h+var_60], eax                                          ; +0x1d7, 0x14009fde7\nmov     eax, [rsp+98h+arg_28]                                          ; +0x1db, 0x14009fdeb\nmov     [rsp+98h+var_68], eax                                          ; +0x1e2, 0x14009fdf2\nmov     ecx, [rsp+98h+arg_20]                                          ; +0x1e6, 0x14009fdf6\nmov     [rsp+98h+var_70], ecx                                          ; +0x1ed, 0x14009fdfd\nmov     [rsp+98h+var_78], ebx                                          ; +0x1f1, 0x14009fe01\nmov     r9d, edi                                                       ; +0x1f5, 0x14009fe05\nmov     r8d, esi                                                       ; +0x1f8, 0x14009fe08\nmov     edx, ebp                                                       ; +0x1fb, 0x14009fe0b\nmov     rcx, r14                                                       ; +0x1fd, 0x14009fe0d\ncall    CurrencyRewardLayer__init                                      ; +0x200, 0x14009fe10\nmov     rcx, r14                                                       ; +0x205, 0x14009fe15\ntest    al, al                                                         ; +0x208, 0x14009fe18\njz      short loc_14009FE27                                            ; +0x20a, 0x14009fe1a\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x20c, 0x14009fe1c\nmov     rax, r14                                                       ; +0x212, 0x14009fe22\njmp     short loc_14009FE36                                            ; +0x215, 0x14009fe25\nmov     r8, [r14]                                                      ; +0x217, 0x14009fe27\nmov     edx, 1                                                         ; +0x21a, 0x14009fe2a\ncall    qword ptr [r8+8]                                               ; +0x21f, 0x14009fe2f\nmov     rax, r15                                                       ; +0x223, 0x14009fe33\nlea     r11, [rsp+98h+var_18]                                          ; +0x226, 0x14009fe36\nmov     rbx, [r11+20h]                                                 ; +0x22e, 0x14009fe3e\nmov     rbp, [r11+28h]                                                 ; +0x232, 0x14009fe42\nmov     rsi, [r11+30h]                                                 ; +0x236, 0x14009fe46\nmov     rsp, r11                                                       ; +0x23a, 0x14009fe4a\npop     r15                                                            ; +0x23d, 0x14009fe4d\npop     r14                                                            ; +0x23f, 0x14009fe4f\npop     rdi                                                            ; +0x241, 0x14009fe51\nretn                                                                   ; +0x242, 0x14009fe52", "xrefs": ["ChallengesPage::claimItem @ 0x140086c30", "DailyLevelPage::claimLevelReward @ 0x1400d1cca", "EndLevelLayer::playEndEffect @ 0x140136d3b", "GJGarageLayer::dialogClosed @ 0x140278839", "LevelListLayer::onClaimReward @ 0x140306342", "PlayLayer::showNewBest @ 0x1403ab5af", "RewardUnlockLayer::playRewardEffect @ 0x1403cf7c3", "<???> @ 0x1406c76a4"], "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"}