{"type": "func", "start": 5718676, "end": 5719288, "name": "CCCountdown::init", "pseudocode": "// \n// CCCountdown::init from 0x574294 to 0x5744f8 (612 bytes)\n// \n// 3 xrefs:\n// > CCCountdown::create @ 0x5746f8\n// > <???> @ 0x3fd68\n// > <???> @ 0x1137270\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 CCCountdown::init(CCCountdown *a1)\n{\n  const char *v2; // x1\n  char v3; // w22\n  cocos2d::CCSprite *v4; // x0\n  cocos2d::CCProgressTimer *v5; // x0\n  cocos2d::CCProgressTimer *m_progressTimer; // x24\n  void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x25\n  const cocos2d::CCSize *v8; // x0\n  cocos2d::CCSprite *m_pSprite; // x0\n  void (__fastcall *setColor)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // x2\n  cocos2d::CCLabelBMFont *v11; // x24\n  CCCountdown_vtbl *v12; // x1\n  void (__fastcall *v13)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x25\n  const cocos2d::CCSize *v14; // x0\n  cocos2d::CCLabelBMFont *m_countdownLabel; // x24\n  void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x25\n  cocos2d::CCLabelBMFont *v17; // x24\n  void (__fastcall *v18)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x25\n  __int64 v19; // x26\n  float v21; // [xsp+60h] [xbp+60h]\n  float v22; // [xsp+60h] [xbp+60h]\n  cocos2d::CCPoint v23; // [xsp+78h] [xbp+78h] BYREF\n  cocos2d::CCPoint v24; // [xsp+80h] [xbp+80h] BYREF\n\n  v3 = cocos2d::CCSprite::initWithFile(a1, \"timer_outerCircle.png\");\n  if ( v3 )\n  {\n    v4 = (cocos2d::CCSprite *)cocos2d::CCSprite::create((cocos2d::CCSprite *)\"timer_innerCircle.png\", v2);\n    v5 = cocos2d::CCProgressTimer::create(v4);\n    a1->m_progressTimer = v5;\n    cocos2d::CCProgressTimer::setType(v5, kCCProgressTimerTypeRadial);\n    a1->addChild_0(a1, a1->m_progressTimer, -1);\n    m_progressTimer = a1->m_progressTimer;\n    setPosition = m_progressTimer->setPosition;\n    v21 = a1->getContentSize(a1)->width * 0.5;\n    v8 = a1->getContentSize(a1);\n    cocos2d::CCPoint::CCPoint(&v24, v21, v8->height * 0.5);\n    setPosition(m_progressTimer, &v24);\n    cocos2d::CCProgressTimer::setPercentage(a1->m_progressTimer, 100.0);\n    m_pSprite = a1->m_progressTimer->m_pSprite;\n    setColor = m_pSprite->setColor;\n    LOWORD(v24.x) = 10240;\n    BYTE2(v24.x) = 70;\n    setColor(m_pSprite, (const cocos2d::ccColor3B *)&v24);\n    cocos2d::CCProgressTimer::updateColor(a1->m_progressTimer);\n    a1->m_progressTimer->m_bReverseDirection = 1;\n    v11 = cocos2d::CCLabelBMFont::create();\n    v12 = a1->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    a1->m_countdownLabel = v11;\n    v13 = v11->setPosition;\n    v22 = v12->getContentSize(a1)->width * 0.5;\n    v14 = a1->getContentSize(a1);\n    cocos2d::CCPoint::CCPoint(&v24, v22, v14->height * 0.5);\n    v13(v11, &v24);\n    m_countdownLabel = a1->m_countdownLabel;\n    setAnchorPoint = m_countdownLabel->setAnchorPoint;\n    cocos2d::CCPoint::CCPoint(&v24, 0.5, 0.5);\n    setAnchorPoint(m_countdownLabel, &v24);\n    v17 = a1->m_countdownLabel;\n    v18 = v17->setPosition;\n    v19 = (__int64)v17->getPosition(v17);\n    cocos2d::CCPoint::CCPoint(&v23, 0.0, -3.0);\n    cocos2d::CCPoint::operator+(&v24, v19, &v23);\n    v18(v17, &v24);\n    a1->addChild_0(a1, a1->m_countdownLabel, 1);\n  }\n  return v3;\n}", "assembly": "; \n; CCCountdown::init from 0x574294 to 0x5744f8 (612 bytes)\n; \n; 3 xrefs:\n; > CCCountdown::create @ 0x5746f8\n; > <???> @ 0x3fd68\n; > <???> @ 0x1137270\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\nSTP             X29, X30, [SP,#var_90]!                                ; +0x0, 0x574294\nADRP            X1, #aTimerOutercirc@PAGE; \"timer_outerCircle.png\"     ; +0x4, 0x574298\nMOV             X29, SP                                                ; +0x8, 0x57429c\nSTP             X19, X20, [SP,#0x90+var_80]                            ; +0xc, 0x5742a0\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x5742a4\nADD             X1, X1, #aTimerOutercirc@PAGEOFF; \"timer_outerCircle.png\" ; +0x14, 0x5742a8\nSTP             X21, X22, [SP,#0x90+var_70]                            ; +0x18, 0x5742ac\nSTP             X23, X24, [SP,#0x90+var_60]                            ; +0x1c, 0x5742b0\nLDR             X2, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x5742b4\nMOV             X19, X0                                                ; +0x24, 0x5742b8\nSTP             X25, X26, [SP,#0x90+var_50]                            ; +0x28, 0x5742bc\nSTR             D8, [SP,#0x90+var_40]                                  ; +0x2c, 0x5742c0\nLDR             X2, [X2]                                               ; +0x30, 0x5742c4\nSTR             X2, [X29,#0x90+var_8]                                  ; +0x34, 0x5742c8\nBL              _ZN7cocos2d8CCSprite12initWithFileEPKc; cocos2d::CCSprite::initWithFile(char const*) ; +0x38, 0x5742cc\nUXTB            W0, W0                                                 ; +0x3c, 0x5742d0\nMOV             W22, W0                                                ; +0x40, 0x5742d4\nCBZ             W0, loc_5744C0                                         ; +0x44, 0x5742d8\nADRP            X0, #aTimerInnercirc@PAGE; \"timer_innerCircle.png\"     ; +0x48, 0x5742dc\nADD             X21, X29, #0x90+var_10                                 ; +0x4c, 0x5742e0\nFMOV            S8, #0.5                                               ; +0x50, 0x5742e4\nADD             X0, X0, #aTimerInnercirc@PAGEOFF; \"timer_innerCircle.png\" ; +0x54, 0x5742e8\nADD             X23, X29, #0x90+var_18                                 ; +0x58, 0x5742ec\nBL              _ZN7cocos2d8CCSprite6createEPKc; cocos2d::CCSprite::create(char const*) ; +0x5c, 0x5742f0\nBL              _ZN7cocos2d15CCProgressTimer6createEPNS_8CCSpriteE; cocos2d::CCProgressTimer::create(cocos2d::CCSprite *) ; +0x60, 0x5742f4\nSTR             X0, [X19,#0x258]                                       ; +0x64, 0x5742f8\nMOV             W1, #0                                                 ; +0x68, 0x5742fc\nBL              _ZN7cocos2d15CCProgressTimer7setTypeENS_19CCProgressTimerTypeE; cocos2d::CCProgressTimer::setType(cocos2d::CCProgressTimerType) ; +0x6c, 0x574300\nLDR             X3, [X19]                                              ; +0x70, 0x574304\nMOV             W2, #0xFFFFFFFF                                        ; +0x74, 0x574308\nLDR             X1, [X19,#0x258]                                       ; +0x78, 0x57430c\nMOV             X0, X19                                                ; +0x7c, 0x574310\nLDR             X3, [X3,#0x1C0]                                        ; +0x80, 0x574314\nBLR             X3                                                     ; +0x84, 0x574318\nLDR             X24, [X19,#0x258]                                      ; +0x88, 0x57431c\nLDR             X1, [X19]                                              ; +0x8c, 0x574320\nMOV             X0, X19                                                ; +0x90, 0x574324\nLDR             X2, [X24]                                              ; +0x94, 0x574328\nLDR             X1, [X1,#0x138]                                        ; +0x98, 0x57432c\nLDR             X25, [X2,#0xB8]                                        ; +0x9c, 0x574330\nBLR             X1                                                     ; +0xa0, 0x574334\nLDR             X1, [X19]                                              ; +0xa4, 0x574338\nLDR             S0, [X0]                                               ; +0xa8, 0x57433c\nMOV             X0, X19                                                ; +0xac, 0x574340\nFMUL            S0, S0, S8                                             ; +0xb0, 0x574344\nLDR             X1, [X1,#0x138]                                        ; +0xb4, 0x574348\nSTR             Q0, [X29,#0x90+var_30]                                 ; +0xb8, 0x57434c\nBLR             X1                                                     ; +0xbc, 0x574350\nLDR             S1, [X0,#4]                                            ; +0xc0, 0x574354\nMOV             X0, X21; this                                          ; +0xc4, 0x574358\nLDR             Q0, [X29,#0x90+var_30]; float                          ; +0xc8, 0x57435c\nFMUL            S1, S1, S8; float                                      ; +0xcc, 0x574360\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xd0, 0x574364\nMOV             X0, X24                                                ; +0xd4, 0x574368\nMOV             X1, X21                                                ; +0xd8, 0x57436c\nBLR             X25                                                    ; +0xdc, 0x574370\nLDR             S0, flt_5744F8; float                                  ; +0xe0, 0x574374\nLDR             X0, [X19,#0x258]; this                                 ; +0xe4, 0x574378\nBL              _ZN7cocos2d15CCProgressTimer13setPercentageEf; cocos2d::CCProgressTimer::setPercentage(float) ; +0xe8, 0x57437c\nLDR             X0, [X19,#0x258]                                       ; +0xec, 0x574380\nMOV             W3, #0x28 ; '('                                        ; +0xf0, 0x574384\nMOV             X1, X21                                                ; +0xf4, 0x574388\nLDR             X2, [X0,#0x160]                                        ; +0xf8, 0x57438c\nMOV             X0, X2                                                 ; +0xfc, 0x574390\nLDR             X2, [X2]                                               ; +0x100, 0x574394\nLDR             X2, [X2,#0x3B0]                                        ; +0x104, 0x574398\nSTRB            W3, [X29,#0x90+var_F]                                  ; +0x108, 0x57439c\nMOV             W3, #0x46 ; 'F'                                        ; +0x10c, 0x5743a0\nSTRB            WZR, [X29,#0x90+var_10]                                ; +0x110, 0x5743a4\nSTRB            W3, [X29,#0x90+var_E]                                  ; +0x114, 0x5743a8\nBLR             X2                                                     ; +0x118, 0x5743ac\nLDR             X0, [X19,#0x258]; this                                 ; +0x11c, 0x5743b0\nBL              _ZN7cocos2d15CCProgressTimer11updateColorEv; cocos2d::CCProgressTimer::updateColor(void) ; +0x120, 0x5743b4\nLDR             X2, [X19,#0x258]; char *                               ; +0x124, 0x5743b8\nADRP            X1, #aLevelfontFnt@PAGE; \"levelFont.fnt\"               ; +0x128, 0x5743bc\nADRP            X0, #(aAssertionFaile_0+0x48)@PAGE; \"0\"                ; +0x12c, 0x5743c0\nMOV             W3, #1                                                 ; +0x130, 0x5743c4\nADD             X1, X1, #aLevelfontFnt@PAGEOFF; \"levelFont.fnt\"        ; +0x134, 0x5743c8\nADD             X0, X0, #(aAssertionFaile_0+0x48)@PAGEOFF; this        ; +0x138, 0x5743cc\nSTRB            W3, [X2,#0x188]                                        ; +0x13c, 0x5743d0\nBL              _ZN7cocos2d13CCLabelBMFont6createEPKcS2_; cocos2d::CCLabelBMFont::create(char const*,char const*) ; +0x140, 0x5743d4\nMOV             X24, X0                                                ; +0x144, 0x5743d8\nLDR             X1, [X19]                                              ; +0x148, 0x5743dc\nMOV             X0, X19                                                ; +0x14c, 0x5743e0\nSTR             X24, [X19,#0x268]                                      ; +0x150, 0x5743e4\nLDR             X2, [X24]                                              ; +0x154, 0x5743e8\nLDR             X1, [X1,#0x138]                                        ; +0x158, 0x5743ec\nLDR             X25, [X2,#0xB8]                                        ; +0x15c, 0x5743f0\nBLR             X1                                                     ; +0x160, 0x5743f4\nLDR             X1, [X19]                                              ; +0x164, 0x5743f8\nLDR             S0, [X0]                                               ; +0x168, 0x5743fc\nMOV             X0, X19                                                ; +0x16c, 0x574400\nFMUL            S0, S0, S8                                             ; +0x170, 0x574404\nLDR             X1, [X1,#0x138]                                        ; +0x174, 0x574408\nSTR             Q0, [X29,#0x90+var_30]                                 ; +0x178, 0x57440c\nBLR             X1                                                     ; +0x17c, 0x574410\nLDR             S1, [X0,#4]                                            ; +0x180, 0x574414\nMOV             X0, X21; this                                          ; +0x184, 0x574418\nLDR             Q0, [X29,#0x90+var_30]; float                          ; +0x188, 0x57441c\nFMUL            S1, S1, S8; float                                      ; +0x18c, 0x574420\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x190, 0x574424\nMOV             X0, X24                                                ; +0x194, 0x574428\nMOV             X1, X21                                                ; +0x198, 0x57442c\nBLR             X25                                                    ; +0x19c, 0x574430\nLDR             X24, [X19,#0x268]                                      ; +0x1a0, 0x574434\nFMOV            S0, S8; float                                          ; +0x1a4, 0x574438\nMOV             X0, X21; this                                          ; +0x1a8, 0x57443c\nFMOV            S1, S8; float                                          ; +0x1ac, 0x574440\nLDR             X1, [X24]                                              ; +0x1b0, 0x574444\nLDR             X25, [X1,#0x118]                                       ; +0x1b4, 0x574448\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x1b8, 0x57444c\nMOV             X0, X24                                                ; +0x1bc, 0x574450\nMOV             X1, X21                                                ; +0x1c0, 0x574454\nBLR             X25                                                    ; +0x1c4, 0x574458\nLDR             X24, [X19,#0x268]                                      ; +0x1c8, 0x57445c\nMOV             X0, X24                                                ; +0x1cc, 0x574460\nLDR             X1, [X24]                                              ; +0x1d0, 0x574464\nLDR             X2, [X1,#0xC0]                                         ; +0x1d4, 0x574468\nLDR             X25, [X1,#0xB8]                                        ; +0x1d8, 0x57446c\nBLR             X2                                                     ; +0x1dc, 0x574470\nMOV             X26, X0                                                ; +0x1e0, 0x574474\nFMOV            S0, WZR; float                                         ; +0x1e4, 0x574478\nMOV             X0, X23; this                                          ; +0x1e8, 0x57447c\nFMOV            S1, #-3.0; float                                       ; +0x1ec, 0x574480\nSTR             X23, [X29,#0x90+var_30]                                ; +0x1f0, 0x574484\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x1f4, 0x574488\nLDR             X1, [X29,#0x90+var_30]                                 ; +0x1f8, 0x57448c\nMOV             X8, X21                                                ; +0x1fc, 0x574490\nMOV             X0, X26                                                ; +0x200, 0x574494\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0x204, 0x574498\nMOV             X0, X24                                                ; +0x208, 0x57449c\nMOV             X1, X21                                                ; +0x20c, 0x5744a0\nBLR             X25                                                    ; +0x210, 0x5744a4\nLDR             X3, [X19]                                              ; +0x214, 0x5744a8\nMOV             X0, X19                                                ; +0x218, 0x5744ac\nLDR             X1, [X19,#0x268]                                       ; +0x21c, 0x5744b0\nMOV             W2, #1                                                 ; +0x220, 0x5744b4\nLDR             X3, [X3,#0x1C0]                                        ; +0x224, 0x5744b8\nBLR             X3                                                     ; +0x228, 0x5744bc\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x22c, 0x5744c0\nMOV             W0, W22                                                ; +0x230, 0x5744c4\nLDR             X2, [X29,#0x90+var_8]                                  ; +0x234, 0x5744c8\nLDR             X1, [X20]                                              ; +0x238, 0x5744cc\nCMP             X2, X1                                                 ; +0x23c, 0x5744d0\nB.NE            loc_5744F4                                             ; +0x240, 0x5744d4\nLDP             X19, X20, [SP,#0x90+var_80]                            ; +0x244, 0x5744d8\nLDP             X21, X22, [SP,#0x90+var_70]                            ; +0x248, 0x5744dc\nLDP             X23, X24, [SP,#0x90+var_60]                            ; +0x24c, 0x5744e0\nLDP             X25, X26, [SP,#0x90+var_50]                            ; +0x250, 0x5744e4\nLDR             D8, [SP,#0x90+var_40]                                  ; +0x254, 0x5744e8\nLDP             X29, X30, [SP+0x90+var_90],#0x90                       ; +0x258, 0x5744ec\nRET                                                                    ; +0x25c, 0x5744f0\nBL              .__stack_chk_fail                                      ; +0x260, 0x5744f4", "xrefs": ["CCCountdown::create @ 0x5746f8", "<???> @ 0x3fd68", "<???> @ 0x1137270"], "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"}