{"type": "func", "start": 5060308, "end": 5060694, "name": "CurrencyRewardLayer::create", "pseudocode": "// \n// CurrencyRewardLayer::create from 0x4d36d4 to 0x4d3856 (386 bytes)\n// \n// 7 xrefs:\n// > PlayLayer::showNewBest @ 0x310816\n// > GJGarageLayer::dialogClosed @ 0x404bb8\n// > EndLevelLayer::playEndEffect @ 0x42890e\n// > ChallengesPage::claimItem @ 0x4cd126\n// > DailyLevelPage::claimLevelReward @ 0x4d576c\n// > RewardUnlockLayer::playRewardEffect @ 0x4e945a\n// > LevelListLayer::onClaimReward @ 0x58ecba\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\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; // r4\n  CurrencyRewardLayer_vtbl *v17; // r3\n  int *v18; // r0\n  cocos2d::CCPoint v20; // [sp+14h] [bp-28h]\n  float v21; // [sp+24h] [bp-18h]\n  cocos2d::CCPoint v22; // [sp+2Ch] [bp-10h] BYREF\n\n  v16 = (CurrencyRewardLayer *)operator new(0x1E0u);\n  cocos2d::CCLayer::CCLayer(v16);\n  v16->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (CurrencyRewardLayer_vtbl *)&off_A76338;\n  v16->cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&off_A76578;\n  v16->cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&off_A765B0;\n  v16->cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&off_A765BC;\n  v16->cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&off_A765CC;\n  v16->cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&off_A765DC;\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  v16->m_orbs = 0;\n  v16->m_stars = 0;\n  v16->m_moons = 0;\n  v16->m_diamonds = 0;\n  v16->m_keys = 0;\n  v16->m_shards = 0;\n  v16->m_elapsed = 0.0;\n  v16->m_unknown = 0.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  v16->m_particlesAdded = 0;\n  v16->m_objectsAdded = 0;\n  v16->m_mainNode = nullptr;\n  v16->m_rewardCount = 0;\n  v16->m_rewardType = 0;\n  cocos2d::CCPoint::CCPoint(&v22, (const cocos2d::CCPoint *)LODWORD(a9.x));\n  LODWORD(v20.x) = &v22;\n  v20.y = a9.y;\n  if ( CurrencyRewardLayer::init(v16, a1, a2, a3, a4, a5, a6, a7, a8, v20, a10, a11, v21) )\n  {\n    cocos2d::CCObject::autorelease(v16);\n  }\n  else\n  {\n    v17 = v16->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    v18 = (int *)v16;\n    v16 = nullptr;\n    v17->~CurrencyRewardLayer_0((CurrencyRewardLayer *)v18);\n  }\n  return v16;\n}", "assembly": "; \n; CurrencyRewardLayer::create from 0x4d36d4 to 0x4d3856 (386 bytes)\n; \n; 7 xrefs:\n; > PlayLayer::showNewBest @ 0x310816\n; > GJGarageLayer::dialogClosed @ 0x404bb8\n; > EndLevelLayer::playEndEffect @ 0x42890e\n; > ChallengesPage::claimItem @ 0x4cd126\n; > DailyLevelPage::claimLevelReward @ 0x4d576c\n; > RewardUnlockLayer::playRewardEffect @ 0x4e945a\n; > LevelListLayer::onClaimReward @ 0x58ecba\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.W          {R4-R11,LR}                                            ; +0x0, 0x4d36d4\nMOV             R9, R3                                                 ; +0x4, 0x4d36d8\nLDR             R5, =(__stack_chk_guard_ptr - 0x4D36E8)                ; +0x6, 0x4d36da\nSUB             SP, SP, #0x3C                                          ; +0x8, 0x4d36dc\nMOV             R8, R0                                                 ; +0xa, 0x4d36de\nMOV.W           R0, #0x1E0; unsigned int                               ; +0xc, 0x4d36e0\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0x10, 0x4d36e4\nLDR             R5, [R5]; __stack_chk_guard                            ; +0x12, 0x4d36e6\nMOV             R7, R1                                                 ; +0x14, 0x4d36e8\nMOV             R6, R2                                                 ; +0x16, 0x4d36ea\nLDR.W           R10, [SP,#0x3C+arg_10]                                 ; +0x18, 0x4d36ec\nLDR             R3, [R5]                                               ; +0x1c, 0x4d36f0\nSTR             R3, [SP,#0x3C+var_8]                                   ; +0x1e, 0x4d36f2\nBL              _Znwj; operator new(uint)                              ; +0x20, 0x4d36f4\nMOV             R4, R0                                                 ; +0x24, 0x4d36f8\nBL              _ZN7cocos2d7CCLayerC2Ev; cocos2d::CCLayer::CCLayer(void) ; +0x26, 0x4d36fa\nLDR             R3, =(_ZTV19CurrencyRewardLayer_ptr - 0x4D3708)        ; +0x2a, 0x4d36fe\nADD.W           R0, R4, #0x1A0; this                                   ; +0x2c, 0x4d3700\nADD             R3, PC; _ZTV19CurrencyRewardLayer_ptr                  ; +0x30, 0x4d3704\nLDR             R3, [R3]; `vtable for'CurrencyRewardLayer ...          ; +0x32, 0x4d3706\nADD.W           R2, R3, #8                                             ; +0x34, 0x4d3708\nSTR             R2, [R4]                                               ; +0x38, 0x4d370c\nADD.W           R2, R3, #0x248                                         ; +0x3a, 0x4d370e\nSTR.W           R2, [R4,#0x108]                                        ; +0x3e, 0x4d3712\nADD.W           R2, R3, #0x280                                         ; +0x42, 0x4d3716\nSTR.W           R2, [R4,#0x10C]                                        ; +0x46, 0x4d371a\nADD.W           R2, R3, #0x28C                                         ; +0x4a, 0x4d371e\nSTR.W           R2, [R4,#0x110]                                        ; +0x4e, 0x4d3722\nADD.W           R2, R3, #0x29C                                         ; +0x52, 0x4d3726\nADD.W           R3, R3, #0x2AC                                         ; +0x56, 0x4d372a\nSTR.W           R2, [R4,#0x114]                                        ; +0x5a, 0x4d372e\nSTR.W           R3, [R4,#0x118]                                        ; +0x5e, 0x4d3732\nMOVS            R3, #0                                                 ; +0x62, 0x4d3736\nSTR.W           R3, [R4,#0x13C]                                        ; +0x64, 0x4d3738\nSTR.W           R3, [R4,#0x140]                                        ; +0x68, 0x4d373c\nSTR.W           R3, [R4,#0x144]                                        ; +0x6c, 0x4d3740\nSTR.W           R3, [R4,#0x148]                                        ; +0x70, 0x4d3744\nSTR.W           R3, [R4,#0x150]                                        ; +0x74, 0x4d3748\nSTR.W           R3, [R4,#0x154]                                        ; +0x78, 0x4d374c\nSTR.W           R3, [R4,#0x158]                                        ; +0x7c, 0x4d3750\nSTR.W           R3, [R4,#0x15C]                                        ; +0x80, 0x4d3754\nSTR.W           R3, [R4,#0x160]                                        ; +0x84, 0x4d3758\nSTR.W           R3, [R4,#0x168]                                        ; +0x88, 0x4d375c\nSTR.W           R3, [R4,#0x16C]                                        ; +0x8c, 0x4d3760\nSTR.W           R3, [R4,#0x170]                                        ; +0x90, 0x4d3764\nSTR.W           R3, [R4,#0x174]                                        ; +0x94, 0x4d3768\nSTR.W           R3, [R4,#0x178]                                        ; +0x98, 0x4d376c\nSTR.W           R3, [R4,#0x17C]                                        ; +0x9c, 0x4d3770\nSTR.W           R3, [R4,#0x180]                                        ; +0xa0, 0x4d3774\nSTR.W           R3, [R4,#0x184]                                        ; +0xa4, 0x4d3778\nSTR.W           R3, [R4,#0x188]                                        ; +0xa8, 0x4d377c\nSTR.W           R3, [R4,#0x18C]                                        ; +0xac, 0x4d3780\nSTR.W           R3, [R4,#0x190]                                        ; +0xb0, 0x4d3784\nMOVS            R3, #0                                                 ; +0xb4, 0x4d3788\nSTR.W           R3, [R4,#0x194]                                        ; +0xb6, 0x4d378a\nSTR.W           R3, [R4,#0x198]                                        ; +0xba, 0x4d378e\nMOV.W           R3, #0x3F800000                                        ; +0xbe, 0x4d3792\nSTR.W           R3, [R4,#0x19C]                                        ; +0xc2, 0x4d3796\nBL              _ZN7cocos2d7CCPointC1Ev; cocos2d::CCPoint::CCPoint(void) ; +0xc6, 0x4d379a\nADD.W           R0, R4, #0x1A8; this                                   ; +0xca, 0x4d379e\nBL              _ZN7cocos2d7CCPointC1Ev; cocos2d::CCPoint::CCPoint(void) ; +0xce, 0x4d37a2\nADD.W           R0, R4, #0x1B0; this                                   ; +0xd2, 0x4d37a6\nBL              _ZN7cocos2d7CCPointC1Ev; cocos2d::CCPoint::CCPoint(void) ; +0xd6, 0x4d37aa\nADD.W           R0, R4, #0x1B8; this                                   ; +0xda, 0x4d37ae\nBL              _ZN7cocos2d7CCPointC1Ev; cocos2d::CCPoint::CCPoint(void) ; +0xde, 0x4d37b2\nADD.W           R0, R4, #0x1C0; this                                   ; +0xe2, 0x4d37b6\nBL              _ZN7cocos2d7CCPointC1Ev; cocos2d::CCPoint::CCPoint(void) ; +0xe6, 0x4d37ba\nADD.W           R0, R4, #0x1C8; this                                   ; +0xea, 0x4d37be\nBL              _ZN7cocos2d7CCPointC1Ev; cocos2d::CCPoint::CCPoint(void) ; +0xee, 0x4d37c2\nADD.W           R11, SP, #0x3C+var_10                                  ; +0xf2, 0x4d37c6\nMOVS            R3, #0                                                 ; +0xf6, 0x4d37ca\nMOV             R1, R10; cocos2d::CCPoint *                            ; +0xf8, 0x4d37cc\nSTRB.W          R3, [R4,#0x1D0]                                        ; +0xfa, 0x4d37ce\nSTRB.W          R3, [R4,#0x1D1]                                        ; +0xfe, 0x4d37d2\nMOV             R0, R11; this                                          ; +0x102, 0x4d37d6\nSTR.W           R3, [R4,#0x1D4]                                        ; +0x104, 0x4d37d8\nSTR.W           R3, [R4,#0x1D8]                                        ; +0x108, 0x4d37dc\nSTR.W           R3, [R4,#0x1DC]                                        ; +0x10c, 0x4d37e0\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x110, 0x4d37e4\nLDR             R3, [SP,#0x3C+arg_0]                                   ; +0x114, 0x4d37e8\nSTR.W           R9, [SP,#0x3C+var_3C]; int                             ; +0x116, 0x4d37ea\nMOV             R0, R4; int                                            ; +0x11a, 0x4d37ee\nSTR.W           R11, [SP,#0x3C+var_28]; int                            ; +0x11c, 0x4d37f0\nMOV             R1, R8; int                                            ; +0x120, 0x4d37f4\nSTR             R3, [SP,#0x3C+var_38]; int                             ; +0x122, 0x4d37f6\nMOV             R2, R7; int                                            ; +0x124, 0x4d37f8\nLDR             R3, [SP,#0x3C+arg_4]                                   ; +0x126, 0x4d37fa\nSTR             R3, [SP,#0x3C+var_34]; int                             ; +0x128, 0x4d37fc\nLDR             R3, [SP,#0x3C+arg_8]                                   ; +0x12a, 0x4d37fe\nSTR             R3, [SP,#0x3C+var_30]; int                             ; +0x12c, 0x4d3800\nLDR             R3, [SP,#0x3C+arg_C]                                   ; +0x12e, 0x4d3802\nSTR             R3, [SP,#0x3C+var_2C]; int                             ; +0x130, 0x4d3804\nLDR             R3, [SP,#0x3C+arg_10.y]                                ; +0x132, 0x4d3806\nSTR             R3, [SP,#0x3C+var_24]; int                             ; +0x134, 0x4d3808\nLDR             R3, [SP,#0x3C+arg_18]                                  ; +0x136, 0x4d380a\nSTR             R3, [SP,#0x3C+var_20]; float                           ; +0x138, 0x4d380c\nLDR             R3, [SP,#0x3C+arg_1C]                                  ; +0x13a, 0x4d380e\nSTR             R3, [SP,#0x3C+var_1C]; float                           ; +0x13c, 0x4d3810\nMOV             R3, R6; int                                            ; +0x13e, 0x4d3812\nBL              _ZN19CurrencyRewardLayer4initEiiii18CurrencySpriteTypeiS0_iN7cocos2d7CCPointE18CurrencyRewardTypeff; CurrencyRewardLayer::init(int,int,int,int,CurrencySpriteType,int,CurrencySpriteType,int,cocos2d::CCPoint,CurrencyRewardType,float,float) ; +0x140, 0x4d3814\nMOV             R6, R0                                                 ; +0x144, 0x4d3818\nCBZ             R0, loc_4D382E                                         ; +0x146, 0x4d381a\nMOV             R0, R4; this                                           ; +0x148, 0x4d381c\nBL              _ZN7cocos2d8CCObject11autoreleaseEv; cocos2d::CCObject::autorelease(void) ; +0x14a, 0x4d381e\nB               loc_4D3838                                             ; +0x14e, 0x4d3822\nMOV             R0, R4; this                                           ; +0x150, 0x4d3824\nBL              _ZN7cocos2d7CCLayerD2Ev; cocos2d::CCLayer::~CCLayer()  ; +0x152, 0x4d3826\nB               loc_4D3846                                             ; +0x156, 0x4d382a\nB               loc_4D384C                                             ; +0x158, 0x4d382c\nLDR             R3, [R4]                                               ; +0x15a, 0x4d382e\nMOV             R0, R4                                                 ; +0x15c, 0x4d3830\nMOV             R4, R6                                                 ; +0x15e, 0x4d3832\nLDR             R3, [R3,#8]                                            ; +0x160, 0x4d3834\nBLX             R3                                                     ; +0x162, 0x4d3836\nLDR             R2, [SP,#0x3C+var_8]                                   ; +0x164, 0x4d3838\nMOV             R0, R4                                                 ; +0x166, 0x4d383a\nLDR             R3, [R5]                                               ; +0x168, 0x4d383c\nCMP             R2, R3                                                 ; +0x16a, 0x4d383e\nBEQ             loc_4D3850                                             ; +0x16c, 0x4d3840\nBLX             __stack_chk_fail                                       ; +0x16e, 0x4d3842\nMOV             R0, R4; p                                              ; +0x172, 0x4d3846\nBL              _ZdlPv; operator delete(void *)                        ; +0x174, 0x4d3848\nBL              __cxa_end_cleanup                                      ; +0x178, 0x4d384c\nADD             SP, SP, #0x3C ; '<'                                    ; +0x17c, 0x4d3850\nPOP.W           {R4-R11,PC}                                            ; +0x17e, 0x4d3852", "xrefs": ["PlayLayer::showNewBest @ 0x310816", "GJGarageLayer::dialogClosed @ 0x404bb8", "EndLevelLayer::playEndEffect @ 0x42890e", "ChallengesPage::claimItem @ 0x4cd126", "DailyLevelPage::claimLevelReward @ 0x4d576c", "RewardUnlockLayer::playRewardEffect @ 0x4e945a", "LevelListLayer::onClaimReward @ 0x58ecba"], "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"}