{"type": "func", "start": 3036120, "end": 3036536, "name": "CCCountdown::init", "pseudocode": "// \n// CCCountdown::init from 0x2e53d8 to 0x2e5578 (416 bytes)\n// \n// 1 xrefs:\n// > CCCountdown::create @ 0x2e56f0\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; // r1\n  int v3; // r8\n  cocos2d::CCSprite *v4; // r0\n  cocos2d::CCProgressTimer *v5; // r0\n  cocos2d::CCProgressTimer *m_progressTimer; // r7\n  void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9\n  float width; // s17\n  const cocos2d::CCSize *v9; // r0\n  cocos2d::CCSprite *m_pSprite; // r0\n  void (__fastcall *setColor)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // r3\n  cocos2d::CCLabelBMFont *v12; // r0\n  cocos2d::CCLabelBMFont_vtbl *v13; // r3\n  cocos2d::CCLabelBMFont *v14; // r7\n  void (__fastcall *v15)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10\n  float v16; // s17\n  const cocos2d::CCSize *v17; // r0\n  cocos2d::CCLabelBMFont *m_countdownLabel; // r7\n  void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r10\n  cocos2d::CCLabelBMFont *v20; // r7\n  int v21; // r11\n  void (__fastcall *v23)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+4h] [bp-20h]\n  cocos2d::CCPoint v24; // [sp+Ch] [bp-18h] BYREF\n  cocos2d::CCPoint v25; // [sp+14h] [bp-10h] 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    width = a1->getContentSize(a1)->width;\n    v9 = a1->getContentSize(a1);\n    cocos2d::CCPoint::CCPoint(&v25, width * 0.5, v9->height * 0.5);\n    setPosition(m_progressTimer, &v25);\n    cocos2d::CCProgressTimer::setPercentage(a1->m_progressTimer, 100.0);\n    m_pSprite = a1->m_progressTimer->m_pSprite;\n    setColor = m_pSprite->setColor;\n    LOWORD(v25.x) = 10240;\n    BYTE2(v25.x) = 70;\n    setColor(m_pSprite, (const cocos2d::ccColor3B *)&v25);\n    cocos2d::CCProgressTimer::updateColor(a1->m_progressTimer);\n    a1->m_progressTimer->m_bReverseDirection = 1;\n    v12 = cocos2d::CCLabelBMFont::create();\n    v13 = v12->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    v14 = v12;\n    a1->m_countdownLabel = v12;\n    v15 = v13->setPosition;\n    v16 = a1->getContentSize(a1)->width;\n    v17 = a1->getContentSize(a1);\n    cocos2d::CCPoint::CCPoint(&v25, v16 * 0.5, v17->height * 0.5);\n    v15(v14, &v25);\n    m_countdownLabel = a1->m_countdownLabel;\n    setAnchorPoint = m_countdownLabel->setAnchorPoint;\n    cocos2d::CCPoint::CCPoint(&v25, 0.5, 0.5);\n    setAnchorPoint(m_countdownLabel, &v25);\n    v20 = a1->m_countdownLabel;\n    v23 = v20->setPosition;\n    v21 = (int)v20->getPosition(v20);\n    cocos2d::CCPoint::CCPoint(&v24, 0.0, -3.0);\n    cocos2d::CCPoint::operator+(&v25, v21, &v24);\n    v23(v20, &v25);\n    a1->addChild_0(a1, a1->m_countdownLabel, 1);\n  }\n  return v3;\n}", "assembly": "; \n; CCCountdown::init from 0x2e53d8 to 0x2e5578 (416 bytes)\n; \n; 1 xrefs:\n; > CCCountdown::create @ 0x2e56f0\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, 0x2e53d8\nMOV             R4, R0                                                 ; +0x4, 0x2e53dc\nLDR             R6, =(__stack_chk_guard_ptr - 0x2E53E8)                ; +0x6, 0x2e53de\nVPUSH           {D8}                                                   ; +0x8, 0x2e53e0\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xc, 0x2e53e4\nLDR             R6, [R6]; __stack_chk_guard                            ; +0xe, 0x2e53e6\nLDR             R1, =(aTimerOutercirc - 0x2E53F0); \"timer_outerCircle.png\" ; +0x10, 0x2e53e8\nLDR             R3, [R6]                                               ; +0x12, 0x2e53ea\nADD             R1, PC; \"timer_outerCircle.png\"                        ; +0x14, 0x2e53ec\nSUB             SP, SP, #0x24                                          ; +0x16, 0x2e53ee\nSTR             R3, [SP,#0x24+var_8]                                   ; +0x18, 0x2e53f0\nBL              _ZN7cocos2d8CCSprite12initWithFileEPKc; cocos2d::CCSprite::initWithFile(char const*) ; +0x1a, 0x2e53f2\nMOV             R8, R0                                                 ; +0x1e, 0x2e53f6\nCMP             R0, #0                                                 ; +0x20, 0x2e53f8\nBEQ.W           loc_2E5560                                             ; +0x22, 0x2e53fa\nLDR             R0, =(aTimerInnercirc - 0x2E540A); \"timer_innerCircle.png\" ; +0x26, 0x2e53fe\nVMOV.F32        S16, #0.5                                              ; +0x28, 0x2e5400\nADD             R5, SP, #0x24+var_10                                   ; +0x2c, 0x2e5404\nADD             R0, PC; \"timer_innerCircle.png\"                        ; +0x2e, 0x2e5406\nBL              _ZN7cocos2d8CCSprite6createEPKc; cocos2d::CCSprite::create(char const*) ; +0x30, 0x2e5408\nBL              _ZN7cocos2d15CCProgressTimer6createEPNS_8CCSpriteE; cocos2d::CCProgressTimer::create(cocos2d::CCSprite *) ; +0x34, 0x2e540c\nMOVS            R1, #0                                                 ; +0x38, 0x2e5410\nSTR.W           R0, [R4,#0x1FC]                                        ; +0x3a, 0x2e5412\nBL              _ZN7cocos2d15CCProgressTimer7setTypeENS_19CCProgressTimerTypeE; cocos2d::CCProgressTimer::setType(cocos2d::CCProgressTimerType) ; +0x3e, 0x2e5416\nLDR             R3, [R4]                                               ; +0x42, 0x2e541a\nLDR.W           R1, [R4,#0x1FC]                                        ; +0x44, 0x2e541c\nMOV.W           R2, #0xFFFFFFFF                                        ; +0x48, 0x2e5420\nMOV             R0, R4                                                 ; +0x4c, 0x2e5424\nLDR.W           R3, [R3,#0xE0]                                         ; +0x4e, 0x2e5426\nBLX             R3                                                     ; +0x52, 0x2e542a\nLDR.W           R7, [R4,#0x1FC]                                        ; +0x54, 0x2e542c\nMOV             R0, R4                                                 ; +0x58, 0x2e5430\nLDR             R3, [R7]                                               ; +0x5a, 0x2e5432\nLDR.W           R9, [R3,#0x5C]                                         ; +0x5c, 0x2e5434\nLDR             R3, [R4]                                               ; +0x60, 0x2e5438\nLDR.W           R3, [R3,#0x9C]                                         ; +0x62, 0x2e543a\nBLX             R3                                                     ; +0x66, 0x2e543e\nLDR             R3, [R4]                                               ; +0x68, 0x2e5440\nLDR.W           R3, [R3,#0x9C]                                         ; +0x6a, 0x2e5442\nVLDR            S17, [R0]                                              ; +0x6e, 0x2e5446\nMOV             R0, R4                                                 ; +0x72, 0x2e544a\nBLX             R3                                                     ; +0x74, 0x2e544c\nVMUL.F32        S17, S17, S16                                          ; +0x76, 0x2e544e\nVMOV            R1, S17; float                                         ; +0x7a, 0x2e5452\nVLDR            S15, [R0,#4]                                           ; +0x7e, 0x2e5456\nMOV             R0, R5; this                                           ; +0x82, 0x2e545a\nVMUL.F32        S15, S15, S16                                          ; +0x84, 0x2e545c\nVMOV            R2, S15; float                                         ; +0x88, 0x2e5460\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x8c, 0x2e5464\nMOV             R0, R7                                                 ; +0x90, 0x2e5468\nMOV             R1, R5                                                 ; +0x92, 0x2e546a\nBLX             R9                                                     ; +0x94, 0x2e546c\nLDR.W           R0, [R4,#0x1FC]; this                                  ; +0x96, 0x2e546e\nLDR             R1, flt_2E5578; float                                  ; +0x9a, 0x2e5472\nMOV.W           R9, #1                                                 ; +0x9c, 0x2e5474\nBL              _ZN7cocos2d15CCProgressTimer13setPercentageEf; cocos2d::CCProgressTimer::setPercentage(float) ; +0xa0, 0x2e5478\nLDR.W           R3, [R4,#0x1FC]                                        ; +0xa4, 0x2e547c\nMOV             R1, R5                                                 ; +0xa8, 0x2e5480\nMOVS            R2, #0                                                 ; +0xaa, 0x2e5482\nLDR.W           R0, [R3,#0x120]                                        ; +0xac, 0x2e5484\nLDR             R3, [R0]                                               ; +0xb0, 0x2e5488\nLDR.W           R3, [R3,#0x1D8]                                        ; +0xb2, 0x2e548a\nSTRB.W          R2, [SP,#0x24+var_10]                                  ; +0xb6, 0x2e548e\nMOVS            R2, #0x28 ; '('                                        ; +0xba, 0x2e5492\nSTRB.W          R2, [SP,#0x24+var_F]                                   ; +0xbc, 0x2e5494\nMOVS            R2, #0x46 ; 'F'                                        ; +0xc0, 0x2e5498\nSTRB.W          R2, [SP,#0x24+var_E]                                   ; +0xc2, 0x2e549a\nBLX             R3                                                     ; +0xc6, 0x2e549e\nLDR.W           R0, [R4,#0x1FC]; this                                  ; +0xc8, 0x2e54a0\nBL              _ZN7cocos2d15CCProgressTimer11updateColorEv; cocos2d::CCProgressTimer::updateColor(void) ; +0xcc, 0x2e54a4\nLDR.W           R3, [R4,#0x1FC]                                        ; +0xd0, 0x2e54a8\nLDR             R0, =(a0 - 0x2E54B8); \"0\"                              ; +0xd4, 0x2e54ac\nLDR             R1, =(aLevelfontFnt - 0x2E54BA); \"levelFont.fnt\"       ; +0xd6, 0x2e54ae\nSTRB.W          R9, [R3,#0x13C]                                        ; +0xd8, 0x2e54b0\nADD             R0, PC; \"0\"                                            ; +0xdc, 0x2e54b4\nADD             R1, PC; \"levelFont.fnt\"                                ; +0xde, 0x2e54b6\nBL              _ZN7cocos2d13CCLabelBMFont6createEPKcS2_; cocos2d::CCLabelBMFont::create(char const*,char const*) ; +0xe0, 0x2e54b8\nLDR             R3, [R0]                                               ; +0xe4, 0x2e54bc\nMOV             R7, R0                                                 ; +0xe6, 0x2e54be\nSTR.W           R0, [R4,#0x208]                                        ; +0xe8, 0x2e54c0\nMOV             R0, R4                                                 ; +0xec, 0x2e54c4\nLDR.W           R10, [R3,#0x5C]                                        ; +0xee, 0x2e54c6\nLDR             R3, [R4]                                               ; +0xf2, 0x2e54ca\nLDR.W           R3, [R3,#0x9C]                                         ; +0xf4, 0x2e54cc\nBLX             R3                                                     ; +0xf8, 0x2e54d0\nLDR             R3, [R4]                                               ; +0xfa, 0x2e54d2\nLDR.W           R3, [R3,#0x9C]                                         ; +0xfc, 0x2e54d4\nVLDR            S17, [R0]                                              ; +0x100, 0x2e54d8\nMOV             R0, R4                                                 ; +0x104, 0x2e54dc\nBLX             R3                                                     ; +0x106, 0x2e54de\nVMUL.F32        S17, S17, S16                                          ; +0x108, 0x2e54e0\nVMOV            R1, S17; float                                         ; +0x10c, 0x2e54e4\nVLDR            S15, [R0,#4]                                           ; +0x110, 0x2e54e8\nMOV             R0, R5; this                                           ; +0x114, 0x2e54ec\nVMUL.F32        S15, S15, S16                                          ; +0x116, 0x2e54ee\nVMOV            R2, S15; float                                         ; +0x11a, 0x2e54f2\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x11e, 0x2e54f6\nMOV             R0, R7                                                 ; +0x122, 0x2e54fa\nMOV             R1, R5                                                 ; +0x124, 0x2e54fc\nBLX             R10                                                    ; +0x126, 0x2e54fe\nLDR.W           R7, [R4,#0x208]                                        ; +0x128, 0x2e5500\nVMOV            R2, S16; float                                         ; +0x12c, 0x2e5504\nMOV             R0, R5; this                                           ; +0x130, 0x2e5508\nVMOV            R1, S16; float                                         ; +0x132, 0x2e550a\nLDR             R3, [R7]                                               ; +0x136, 0x2e550e\nLDR.W           R10, [R3,#0x8C]                                        ; +0x138, 0x2e5510\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x13c, 0x2e5514\nMOV             R0, R7                                                 ; +0x140, 0x2e5518\nMOV             R1, R5                                                 ; +0x142, 0x2e551a\nBLX             R10                                                    ; +0x144, 0x2e551c\nLDR.W           R7, [R4,#0x208]                                        ; +0x146, 0x2e551e\nADD.W           R10, SP, #0x24+var_18                                  ; +0x14a, 0x2e5522\nLDR             R3, [R7]                                               ; +0x14e, 0x2e5526\nMOV             R0, R7                                                 ; +0x150, 0x2e5528\nLDR             R2, [R3,#0x5C]                                         ; +0x152, 0x2e552a\nLDR             R3, [R3,#0x60]                                         ; +0x154, 0x2e552c\nSTR             R2, [SP,#0x24+var_20]                                  ; +0x156, 0x2e552e\nBLX             R3                                                     ; +0x158, 0x2e5530\nMOVS            R1, #0; float                                          ; +0x15a, 0x2e5532\nLDR             R2, flt_2E557C; float                                  ; +0x15c, 0x2e5534\nMOV             R11, R0                                                ; +0x15e, 0x2e5536\nMOV             R0, R10; this                                          ; +0x160, 0x2e5538\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x162, 0x2e553a\nMOV             R2, R10                                                ; +0x166, 0x2e553e\nMOV             R0, R5                                                 ; +0x168, 0x2e5540\nMOV             R1, R11                                                ; +0x16a, 0x2e5542\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0x16c, 0x2e5544\nMOV             R0, R7                                                 ; +0x170, 0x2e5548\nMOV             R1, R5                                                 ; +0x172, 0x2e554a\nLDR             R3, [SP,#0x24+var_20]                                  ; +0x174, 0x2e554c\nBLX             R3                                                     ; +0x176, 0x2e554e\nLDR             R3, [R4]                                               ; +0x178, 0x2e5550\nMOV             R0, R4                                                 ; +0x17a, 0x2e5552\nLDR.W           R1, [R4,#0x208]                                        ; +0x17c, 0x2e5554\nMOV             R2, R9                                                 ; +0x180, 0x2e5558\nLDR.W           R3, [R3,#0xE0]                                         ; +0x182, 0x2e555a\nBLX             R3                                                     ; +0x186, 0x2e555e\nLDR             R2, [SP,#0x24+var_8]                                   ; +0x188, 0x2e5560\nMOV             R0, R8                                                 ; +0x18a, 0x2e5562\nLDR             R3, [R6]                                               ; +0x18c, 0x2e5564\nCMP             R2, R3                                                 ; +0x18e, 0x2e5566\nBEQ             loc_2E556E                                             ; +0x190, 0x2e5568\nBLX             __stack_chk_fail                                       ; +0x192, 0x2e556a\nADD             SP, SP, #0x24 ; '$'                                    ; +0x196, 0x2e556e\nVPOP            {D8}                                                   ; +0x198, 0x2e5570\nPOP.W           {R4-R11,PC}                                            ; +0x19c, 0x2e5574", "xrefs": ["CCCountdown::create @ 0x2e56f0"], "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"}