{"type": "func", "start": 5047376, "end": 5047716, "name": "CurrencySprite::initWithSprite", "pseudocode": "// \n// CurrencySprite::initWithSprite from 0x4d0450 to 0x4d05a4 (340 bytes)\n// \n// 1 xrefs:\n// > CurrencySprite::createWithSprite @ 0x4d05d2\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\nbool CurrencySprite::initWithSprite(CurrencySprite *a1, cocos2d::CCSprite *a2)\n{\n  _BOOL4 v4; // r11\n  float v5; // s16\n  cocos2d::CCSprite *v6; // r0\n  float v7; // r2\n  cocos2d::CCActionInterval *v8; // r0\n  cocos2d::CCRepeatForever *v9; // r0\n  cocos2d::CCSprite *m_burstSprite; // r0\n  void (__fastcall *setColor)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // r3\n  cocos2d::CCSprite *v12; // r4\n  void (__fastcall *v13)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // r3\n  float v14; // r2\n  cocos2d::CCActionInterval *v15; // r0\n  cocos2d::CCRepeatForever *v16; // r0\n  void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // [sp+4h] [bp-18h]\n  cocos2d::CCPoint v19; // [sp+Ch] [bp-10h] BYREF\n\n  v4 = cocos2d::CCSprite::init(a1);\n  if ( v4 )\n  {\n    v5 = -1.0;\n    a1->addChild(a1, a2);\n    a2->setPosition(a2, &stru_AC6D54);\n    v6 = cocos2d::CCSprite::createWithSpriteFrameName(\"shineBurst_001.png\");\n    a1->m_burstSprite = v6;\n    cocos2d::CCObject::retain(v6);\n    if ( vcvts_n_f32_s32(rand(), 0x1Fu) > 0.5 )\n      v5 = 1.0;\n    v8 = (cocos2d::CCActionInterval *)cocos2d::CCRotateBy::create((cocos2d::CCRotateBy *)0x3F800000, v5 * 90.0, v7);\n    v9 = cocos2d::CCRepeatForever::create(v8);\n    cocos2d::CCNode::runAction(a1->m_burstSprite, v9);\n    ((void (__fastcall *)(cocos2d::CCSprite *, int))a1->m_burstSprite->setScale)(a1->m_burstSprite, 0x40000000);\n    m_burstSprite = a1->m_burstSprite;\n    setColor = m_burstSprite->setColor;\n    LOWORD(v19.x) = -1;\n    BYTE2(v19.x) = -1;\n    setColor(m_burstSprite, (const cocos2d::ccColor3B *)&v19);\n    v12 = cocos2d::CCSprite::createWithSpriteFrameName(\"shineBurst_001.png\");\n    a1->m_burstSprite->addChild(a1->m_burstSprite, v12);\n    setPosition = v12->setPosition;\n    cocos2d::CCNode::convertToNodeSpace(&v19, a1->m_burstSprite, &stru_AC6D54);\n    setPosition(v12, &v19);\n    ((void (__fastcall *)(cocos2d::CCSprite *, int))v12->setScale)(v12, 1061997773);\n    v13 = v12->setColor;\n    LOWORD(v19.x) = -1;\n    BYTE2(v19.x) = -1;\n    v13(v12, (const cocos2d::ccColor3B *)&v19);\n    v15 = (cocos2d::CCActionInterval *)cocos2d::CCRotateBy::create(\n                                         (cocos2d::CCRotateBy *)0x3F800000,\n                                         -(float)(v5 * 180.0),\n                                         v14);\n    v16 = cocos2d::CCRepeatForever::create(v15);\n    cocos2d::CCNode::runAction(v12, v16);\n  }\n  return v4;\n}", "assembly": "; \n; CurrencySprite::initWithSprite from 0x4d0450 to 0x4d05a4 (340 bytes)\n; \n; 1 xrefs:\n; > CurrencySprite::createWithSprite @ 0x4d05d2\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, 0x4d0450\nMOV             R5, R0                                                 ; +0x4, 0x4d0454\nLDR.W           R8, =(__stack_chk_guard_ptr - 0x4D0464)                ; +0x6, 0x4d0456\nMOV             R4, R1                                                 ; +0xa, 0x4d045a\nVPUSH           {D8}                                                   ; +0xc, 0x4d045c\nADD             R8, PC; __stack_chk_guard_ptr                          ; +0x10, 0x4d0460\nLDR.W           R8, [R8]; __stack_chk_guard                            ; +0x12, 0x4d0462\nLDR.W           R3, [R8]                                               ; +0x16, 0x4d0466\nSUB             SP, SP, #0x1C                                          ; +0x1a, 0x4d046a\nSTR             R3, [SP,#0x1C+var_8]                                   ; +0x1c, 0x4d046c\nBL              _ZN7cocos2d8CCSprite4initEv; cocos2d::CCSprite::init(void) ; +0x1e, 0x4d046e\nMOV             R11, R0                                                ; +0x22, 0x4d0472\nCMP             R0, #0                                                 ; +0x24, 0x4d0474\nBEQ.W           loc_4D058A                                             ; +0x26, 0x4d0476\nLDR             R3, [R5]                                               ; +0x2a, 0x4d047a\nMOV             R1, R4                                                 ; +0x2c, 0x4d047c\nMOV             R0, R5                                                 ; +0x2e, 0x4d047e\nLDR             R7, =(stru_AC6D54 - 0x4D0492)                          ; +0x30, 0x4d0480\nVMOV.F32        S16, #-1.0                                             ; +0x32, 0x4d0482\nMOV.W           R10, #0x3F800000                                       ; +0x36, 0x4d0486\nLDR.W           R3, [R3,#0xDC]                                         ; +0x3a, 0x4d048a\nADD             R7, PC; stru_AC6D54                                    ; +0x3e, 0x4d048e\nBLX             R3                                                     ; +0x40, 0x4d0490\nLDR             R3, [R4]                                               ; +0x42, 0x4d0492\nMOV             R0, R4                                                 ; +0x44, 0x4d0494\nLDR             R4, =(aShineburst001P - 0x4D04A2); \"shineBurst_001.png\" ; +0x46, 0x4d0496\nMOV             R1, R7                                                 ; +0x48, 0x4d0498\nADD.W           R9, SP, #0x1C+var_10                                   ; +0x4a, 0x4d049a\nADD             R4, PC; \"shineBurst_001.png\"                           ; +0x4e, 0x4d049e\nLDR             R6, [R3,#0x5C]                                         ; +0x50, 0x4d04a0\nBLX             R6                                                     ; +0x52, 0x4d04a2\nMOVS            R6, #0xFF                                              ; +0x54, 0x4d04a4\nMOV             R0, R4; this                                           ; +0x56, 0x4d04a6\nBL              _ZN7cocos2d8CCSprite25createWithSpriteFrameNameEPKc; cocos2d::CCSprite::createWithSpriteFrameName(char const*) ; +0x58, 0x4d04a8\nSTR.W           R0, [R5,#0x22C]                                        ; +0x5c, 0x4d04ac\nBL              _ZN7cocos2d8CCObject6retainEv; cocos2d::CCObject::retain(void) ; +0x60, 0x4d04b0\nBLX             rand                                                   ; +0x64, 0x4d04b4\nVMOV.F32        S15, #0.5                                              ; +0x68, 0x4d04b8\nVMOV            S14, R0                                                ; +0x6c, 0x4d04bc\nMOV             R0, R10; this                                          ; +0x70, 0x4d04c0\nVCVT.F32.S32    S14, S14, #0x1F                                        ; +0x72, 0x4d04c2\nVCMPE.F32       S14, S15                                               ; +0x76, 0x4d04c6\nVLDR            S15, =90.0                                             ; +0x7a, 0x4d04ca\nVMRS            APSR_nzcv, FPSCR                                       ; +0x7e, 0x4d04ce\nIT GT                                                                  ; +0x82, 0x4d04d2\nVMOVGT          S16, R10                                               ; +0x84, 0x4d04d4\nVMUL.F32        S15, S16, S15                                          ; +0x88, 0x4d04d8\nVMOV            R1, S15; float                                         ; +0x8c, 0x4d04dc\nBL              _ZN7cocos2d10CCRotateBy6createEff; cocos2d::CCRotateBy::create(float,float) ; +0x90, 0x4d04e0\nBL              _ZN7cocos2d15CCRepeatForever6createEPNS_16CCActionIntervalE; cocos2d::CCRepeatForever::create(cocos2d::CCActionInterval *) ; +0x94, 0x4d04e4\nMOV             R1, R0; cocos2d::CCAction *                            ; +0x98, 0x4d04e8\nLDR.W           R0, [R5,#0x22C]; this                                  ; +0x9a, 0x4d04ea\nBL              _ZN7cocos2d6CCNode9runActionEPNS_8CCActionE; cocos2d::CCNode::runAction(cocos2d::CCAction *) ; +0x9e, 0x4d04ee\nLDR.W           R0, [R5,#0x22C]                                        ; +0xa2, 0x4d04f2\nMOV.W           R1, #0x40000000                                        ; +0xa6, 0x4d04f6\nLDR             R3, [R0]                                               ; +0xaa, 0x4d04fa\nLDR             R3, [R3,#0x50]                                         ; +0xac, 0x4d04fc\nBLX             R3                                                     ; +0xae, 0x4d04fe\nLDR.W           R0, [R5,#0x22C]                                        ; +0xb0, 0x4d0500\nMOV             R1, R9                                                 ; +0xb4, 0x4d0504\nLDR             R3, [R0]                                               ; +0xb6, 0x4d0506\nLDR.W           R3, [R3,#0x1D8]                                        ; +0xb8, 0x4d0508\nSTRB.W          R6, [SP,#0x1C+var_10]                                  ; +0xbc, 0x4d050c\nSTRB.W          R6, [SP,#0x1C+var_F]                                   ; +0xc0, 0x4d0510\nSTRB.W          R6, [SP,#0x1C+var_E]                                   ; +0xc4, 0x4d0514\nBLX             R3                                                     ; +0xc8, 0x4d0518\nMOV             R0, R4; this                                           ; +0xca, 0x4d051a\nBL              _ZN7cocos2d8CCSprite25createWithSpriteFrameNameEPKc; cocos2d::CCSprite::createWithSpriteFrameName(char const*) ; +0xcc, 0x4d051c\nMOV             R4, R0                                                 ; +0xd0, 0x4d0520\nLDR.W           R0, [R5,#0x22C]                                        ; +0xd2, 0x4d0522\nMOV             R1, R4                                                 ; +0xd6, 0x4d0526\nLDR             R3, [R0]                                               ; +0xd8, 0x4d0528\nLDR.W           R3, [R3,#0xDC]                                         ; +0xda, 0x4d052a\nBLX             R3                                                     ; +0xde, 0x4d052e\nLDR             R3, [R4]                                               ; +0xe0, 0x4d0530\nMOV             R2, R7                                                 ; +0xe2, 0x4d0532\nMOV             R0, R9; this                                           ; +0xe4, 0x4d0534\nLDR.W           R1, [R5,#0x22C]; cocos2d::CCPoint *                    ; +0xe6, 0x4d0536\nLDR             R3, [R3,#0x5C]                                         ; +0xea, 0x4d053a\nSTR             R3, [SP,#0x1C+var_18]                                  ; +0xec, 0x4d053c\nBL              _ZN7cocos2d6CCNode18convertToNodeSpaceERKNS_7CCPointE; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const&) ; +0xee, 0x4d053e\nMOV             R0, R4                                                 ; +0xf2, 0x4d0542\nMOV             R1, R9                                                 ; +0xf4, 0x4d0544\nLDR             R3, [SP,#0x1C+var_18]                                  ; +0xf6, 0x4d0546\nBLX             R3                                                     ; +0xf8, 0x4d0548\nLDR             R3, [R4]                                               ; +0xfa, 0x4d054a\nMOV             R0, R4                                                 ; +0xfc, 0x4d054c\nLDR             R1, =0x3F4CCCCD                                        ; +0xfe, 0x4d054e\nLDR             R3, [R3,#0x50]                                         ; +0x100, 0x4d0550\nBLX             R3                                                     ; +0x102, 0x4d0552\nLDR             R3, [R4]                                               ; +0x104, 0x4d0554\nMOV             R0, R4                                                 ; +0x106, 0x4d0556\nMOV             R1, R9                                                 ; +0x108, 0x4d0558\nLDR.W           R3, [R3,#0x1D8]                                        ; +0x10a, 0x4d055a\nSTRB.W          R6, [SP,#0x1C+var_10]                                  ; +0x10e, 0x4d055e\nSTRB.W          R6, [SP,#0x1C+var_F]                                   ; +0x112, 0x4d0562\nSTRB.W          R6, [SP,#0x1C+var_E]                                   ; +0x116, 0x4d0566\nBLX             R3                                                     ; +0x11a, 0x4d056a\nVLDR            S15, =180.0                                            ; +0x11c, 0x4d056c\nMOV             R0, R10; this                                          ; +0x120, 0x4d0570\nVNMUL.F32       S15, S16, S15                                          ; +0x122, 0x4d0572\nVMOV            R1, S15; float                                         ; +0x126, 0x4d0576\nBL              _ZN7cocos2d10CCRotateBy6createEff; cocos2d::CCRotateBy::create(float,float) ; +0x12a, 0x4d057a\nBL              _ZN7cocos2d15CCRepeatForever6createEPNS_16CCActionIntervalE; cocos2d::CCRepeatForever::create(cocos2d::CCActionInterval *) ; +0x12e, 0x4d057e\nMOV             R1, R0; cocos2d::CCAction *                            ; +0x132, 0x4d0582\nMOV             R0, R4; this                                           ; +0x134, 0x4d0584\nBL              _ZN7cocos2d6CCNode9runActionEPNS_8CCActionE; cocos2d::CCNode::runAction(cocos2d::CCAction *) ; +0x136, 0x4d0586\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0x13a, 0x4d058a\nMOV             R0, R11                                                ; +0x13c, 0x4d058c\nLDR.W           R3, [R8]                                               ; +0x13e, 0x4d058e\nCMP             R2, R3                                                 ; +0x142, 0x4d0592\nBEQ             loc_4D059A                                             ; +0x144, 0x4d0594\nBLX             __stack_chk_fail                                       ; +0x146, 0x4d0596\nADD             SP, SP, #0x1C                                          ; +0x14a, 0x4d059a\nVPOP            {D8}                                                   ; +0x14c, 0x4d059c\nPOP.W           {R4-R11,PC}                                            ; +0x150, 0x4d05a0", "xrefs": ["CurrencySprite::createWithSprite @ 0x4d05d2"], "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"}