{"type": "func", "start": 3952920, "end": 3953336, "name": "CCCountdown::init", "pseudocode": "// \n// CCCountdown::init from 0x3c5118 to 0x3c52b8 (416 bytes)\n// \n// 1 xrefs:\n// > CCCountdown::create @ 0x3c5430\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:46:33 +0000\n// \n\nint __fastcall CCCountdown::init(cocos2d::CCProgressTimer **this)\n{\n  const char *v2; // r1\n  int v3; // r8\n  cocos2d::CCProgressTimer *v4; // r0\n  cocos2d::CCSprite *v5; // r1\n  int v6; // r7\n  void (__fastcall *v7)(int, char *); // r9\n  float v8; // s17\n  int v9; // r0\n  int v10; // r0\n  void (__fastcall *v11)(int, char *); // r3\n  const char *v12; // r2\n  cocos2d::CCProgressTimer *v13; // r0\n  cocos2d::CCProgressTimer *v14; // r7\n  void (__fastcall *v15)(cocos2d::CCProgressTimer *, char *); // r10\n  float v16; // s17\n  int v17; // r0\n  int v18; // r7\n  void (__fastcall *v19)(int, char *); // r10\n  int v20; // r7\n  int v21; // r11\n  void (__fastcall *v23)(int, char *); // [sp+4h] [bp-20h]\n  _BYTE v24[8]; // [sp+Ch] [bp-18h] BYREF\n  char v25; // [sp+14h] [bp-10h] BYREF\n  _BYTE v26[2]; // [sp+15h] [bp-Fh] BYREF\n\n  v3 = cocos2d::CCSprite::initWithFile((cocos2d::CCSprite *)this, \"timer_outerCircle.png\");\n  if ( v3 )\n  {\n    v4 = (cocos2d::CCProgressTimer *)cocos2d::CCSprite::create((cocos2d::CCSprite *)\"timer_innerCircle.png\", v2);\n    *(this + 127) = (cocos2d::CCProgressTimer *)cocos2d::CCProgressTimer::create(v4, v5);\n    cocos2d::CCProgressTimer::setType();\n    (*((void (__fastcall **)(cocos2d::CCProgressTimer **, _DWORD, int))*this + 58))(this, *(this + 127), -1);\n    v6 = (int)*(this + 127);\n    v7 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v6 + 92);\n    v8 = *(float *)(*((int (__fastcall **)(cocos2d::CCProgressTimer **))*this + 41))(this);\n    v9 = (*((int (__fastcall **)(cocos2d::CCProgressTimer **))*this + 41))(this);\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v25, v8 * 0.5, *(float *)(v9 + 4) * 0.5);\n    v7(v6, &v25);\n    cocos2d::CCProgressTimer::setPercentage(*(this + 127), 100.0);\n    v10 = *((_DWORD *)*(this + 127) + 72);\n    v11 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v10 + 480);\n    v25 = 0;\n    qmemcpy(v26, \"(F\", sizeof(v26));\n    v11(v10, &v25);\n    cocos2d::CCProgressTimer::updateColor(*(this + 127));\n    *((_BYTE *)*(this + 127) + 316) = 1;\n    v13 = (cocos2d::CCProgressTimer *)cocos2d::CCLabelBMFont::create(\n                                        (cocos2d::CCLabelBMFont *)\"0\",\n                                        \"levelFont.fnt\",\n                                        v12);\n    *(this + 130) = v13;\n    v14 = v13;\n    v15 = *(void (__fastcall **)(cocos2d::CCProgressTimer *, char *))(*(_DWORD *)v13 + 92);\n    v16 = *(float *)(*((int (__fastcall **)(cocos2d::CCProgressTimer **))*this + 41))(this);\n    v17 = (*((int (__fastcall **)(cocos2d::CCProgressTimer **))*this + 41))(this);\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v25, v16 * 0.5, *(float *)(v17 + 4) * 0.5);\n    v15(v14, &v25);\n    v18 = (int)*(this + 130);\n    v19 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v18 + 148);\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v25, 0.5, 0.5);\n    v19(v18, &v25);\n    v20 = (int)*(this + 130);\n    v23 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v20 + 92);\n    v21 = (*(int (__fastcall **)(int))(*(_DWORD *)v20 + 96))(v20);\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v24, 0.0, -3.0);\n    cocos2d::CCPoint::operator+(&v25, v21, v24);\n    v23(v20, &v25);\n    (*((void (__fastcall **)(cocos2d::CCProgressTimer **, _DWORD, int))*this + 58))(this, *(this + 130), 1);\n  }\n  return v3;\n}", "assembly": "; \n; CCCountdown::init from 0x3c5118 to 0x3c52b8 (416 bytes)\n; \n; 1 xrefs:\n; > CCCountdown::create @ 0x3c5430\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:46:33 +0000\n; \nPUSH.W          {R4-R11,LR}                                            ; +0x0, 0x3c5118\nMOV             R4, R0                                                 ; +0x4, 0x3c511c\nVPUSH           {D8}                                                   ; +0x6, 0x3c511e\nLDR             R6, =(__stack_chk_guard_ptr - 0x3C512A)                ; +0xa, 0x3c5122\nLDR             R1, =(aTimerOutercirc - 0x3C5130); \"timer_outerCircle.png\" ; +0xc, 0x3c5124\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xe, 0x3c5126\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x10, 0x3c5128\nSUB             SP, SP, #0x24                                          ; +0x12, 0x3c512a\nADD             R1, PC; \"timer_outerCircle.png\"                        ; +0x14, 0x3c512c\nLDR             R3, [R6]                                               ; +0x16, 0x3c512e\nSTR             R3, [SP,#0x24+var_8]                                   ; +0x18, 0x3c5130\nBL              _ZN7cocos2d8CCSprite12initWithFileEPKc; cocos2d::CCSprite::initWithFile(char const*) ; +0x1a, 0x3c5132\nMOV             R8, R0                                                 ; +0x1e, 0x3c5136\nCMP             R0, #0                                                 ; +0x20, 0x3c5138\nBEQ.W           loc_3C52A0                                             ; +0x22, 0x3c513a\nLDR             R0, =(aTimerInnercirc - 0x3C514A); \"timer_innerCircle.png\" ; +0x26, 0x3c513e\nVMOV.F32        S16, #0.5                                              ; +0x28, 0x3c5140\nADD             R5, SP, #0x24+var_10                                   ; +0x2c, 0x3c5144\nADD             R0, PC; \"timer_innerCircle.png\"                        ; +0x2e, 0x3c5146\nBL              _ZN7cocos2d8CCSprite6createEPKc; cocos2d::CCSprite::create(char const*) ; +0x30, 0x3c5148\nBL              _ZN7cocos2d15CCProgressTimer6createEPNS_8CCSpriteE; cocos2d::CCProgressTimer::create(cocos2d::CCSprite *) ; +0x34, 0x3c514c\nMOVS            R1, #0                                                 ; +0x38, 0x3c5150\nSTR.W           R0, [R4,#0x1FC]                                        ; +0x3a, 0x3c5152\nBL              _ZN7cocos2d15CCProgressTimer7setTypeENS_19CCProgressTimerTypeE; cocos2d::CCProgressTimer::setType(cocos2d::CCProgressTimerType) ; +0x3e, 0x3c5156\nLDR             R3, [R4]                                               ; +0x42, 0x3c515a\nLDR.W           R1, [R4,#0x1FC]                                        ; +0x44, 0x3c515c\nMOV.W           R2, #0xFFFFFFFF                                        ; +0x48, 0x3c5160\nMOV             R0, R4                                                 ; +0x4c, 0x3c5164\nLDR.W           R3, [R3,#0xE8]                                         ; +0x4e, 0x3c5166\nBLX             R3                                                     ; +0x52, 0x3c516a\nLDR.W           R7, [R4,#0x1FC]                                        ; +0x54, 0x3c516c\nMOV             R0, R4                                                 ; +0x58, 0x3c5170\nLDR             R3, [R7]                                               ; +0x5a, 0x3c5172\nLDR.W           R9, [R3,#0x5C]                                         ; +0x5c, 0x3c5174\nLDR             R3, [R4]                                               ; +0x60, 0x3c5178\nLDR.W           R3, [R3,#0xA4]                                         ; +0x62, 0x3c517a\nBLX             R3                                                     ; +0x66, 0x3c517e\nLDR             R3, [R4]                                               ; +0x68, 0x3c5180\nLDR.W           R3, [R3,#0xA4]                                         ; +0x6a, 0x3c5182\nVLDR            S17, [R0]                                              ; +0x6e, 0x3c5186\nMOV             R0, R4                                                 ; +0x72, 0x3c518a\nBLX             R3                                                     ; +0x74, 0x3c518c\nVMUL.F32        S17, S17, S16                                          ; +0x76, 0x3c518e\nVMOV            R1, S17; float                                         ; +0x7a, 0x3c5192\nVLDR            S15, [R0,#4]                                           ; +0x7e, 0x3c5196\nMOV             R0, R5; this                                           ; +0x82, 0x3c519a\nVMUL.F32        S15, S15, S16                                          ; +0x84, 0x3c519c\nVMOV            R2, S15; float                                         ; +0x88, 0x3c51a0\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x8c, 0x3c51a4\nMOV             R0, R7                                                 ; +0x90, 0x3c51a8\nMOV             R1, R5                                                 ; +0x92, 0x3c51aa\nBLX             R9                                                     ; +0x94, 0x3c51ac\nLDR.W           R0, [R4,#0x1FC]; this                                  ; +0x96, 0x3c51ae\nLDR             R1, flt_3C52B8; float                                  ; +0x9a, 0x3c51b2\nMOV.W           R9, #1                                                 ; +0x9c, 0x3c51b4\nBL              _ZN7cocos2d15CCProgressTimer13setPercentageEf; cocos2d::CCProgressTimer::setPercentage(float) ; +0xa0, 0x3c51b8\nLDR.W           R3, [R4,#0x1FC]                                        ; +0xa4, 0x3c51bc\nMOV             R1, R5                                                 ; +0xa8, 0x3c51c0\nMOVS            R2, #0                                                 ; +0xaa, 0x3c51c2\nLDR.W           R0, [R3,#0x120]                                        ; +0xac, 0x3c51c4\nLDR             R3, [R0]                                               ; +0xb0, 0x3c51c8\nLDR.W           R3, [R3,#0x1E0]                                        ; +0xb2, 0x3c51ca\nSTRB.W          R2, [SP,#0x24+var_10]                                  ; +0xb6, 0x3c51ce\nMOVS            R2, #0x28 ; '('                                        ; +0xba, 0x3c51d2\nSTRB.W          R2, [SP,#0x24+var_F]                                   ; +0xbc, 0x3c51d4\nMOVS            R2, #0x46 ; 'F'                                        ; +0xc0, 0x3c51d8\nSTRB.W          R2, [SP,#0x24+var_E]                                   ; +0xc2, 0x3c51da\nBLX             R3                                                     ; +0xc6, 0x3c51de\nLDR.W           R0, [R4,#0x1FC]; this                                  ; +0xc8, 0x3c51e0\nBL              _ZN7cocos2d15CCProgressTimer11updateColorEv; cocos2d::CCProgressTimer::updateColor(void) ; +0xcc, 0x3c51e4\nLDR.W           R3, [R4,#0x1FC]                                        ; +0xd0, 0x3c51e8\nLDR             R0, =(a0 - 0x3C51F8); \"0\"                              ; +0xd4, 0x3c51ec\nLDR             R1, =(aLevelfontFnt - 0x3C51FA); \"levelFont.fnt\"       ; +0xd6, 0x3c51ee\nSTRB.W          R9, [R3,#0x13C]                                        ; +0xd8, 0x3c51f0\nADD             R0, PC; \"0\"                                            ; +0xdc, 0x3c51f4\nADD             R1, PC; \"levelFont.fnt\"                                ; +0xde, 0x3c51f6\nBL              _ZN7cocos2d13CCLabelBMFont6createEPKcS2_; cocos2d::CCLabelBMFont::create(char const*,char const*) ; +0xe0, 0x3c51f8\nSTR.W           R0, [R4,#0x208]                                        ; +0xe4, 0x3c51fc\nMOV             R7, R0                                                 ; +0xe8, 0x3c5200\nLDR             R3, [R0]                                               ; +0xea, 0x3c5202\nMOV             R0, R4                                                 ; +0xec, 0x3c5204\nLDR.W           R10, [R3,#0x5C]                                        ; +0xee, 0x3c5206\nLDR             R3, [R4]                                               ; +0xf2, 0x3c520a\nLDR.W           R3, [R3,#0xA4]                                         ; +0xf4, 0x3c520c\nBLX             R3                                                     ; +0xf8, 0x3c5210\nLDR             R3, [R4]                                               ; +0xfa, 0x3c5212\nLDR.W           R3, [R3,#0xA4]                                         ; +0xfc, 0x3c5214\nVLDR            S17, [R0]                                              ; +0x100, 0x3c5218\nMOV             R0, R4                                                 ; +0x104, 0x3c521c\nBLX             R3                                                     ; +0x106, 0x3c521e\nVMUL.F32        S17, S17, S16                                          ; +0x108, 0x3c5220\nVMOV            R1, S17; float                                         ; +0x10c, 0x3c5224\nVLDR            S15, [R0,#4]                                           ; +0x110, 0x3c5228\nMOV             R0, R5; this                                           ; +0x114, 0x3c522c\nVMUL.F32        S15, S15, S16                                          ; +0x116, 0x3c522e\nVMOV            R2, S15; float                                         ; +0x11a, 0x3c5232\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x11e, 0x3c5236\nMOV             R0, R7                                                 ; +0x122, 0x3c523a\nMOV             R1, R5                                                 ; +0x124, 0x3c523c\nBLX             R10                                                    ; +0x126, 0x3c523e\nLDR.W           R7, [R4,#0x208]                                        ; +0x128, 0x3c5240\nVMOV            R2, S16; float                                         ; +0x12c, 0x3c5244\nMOV             R0, R5; this                                           ; +0x130, 0x3c5248\nVMOV            R1, S16; float                                         ; +0x132, 0x3c524a\nLDR             R3, [R7]                                               ; +0x136, 0x3c524e\nLDR.W           R10, [R3,#0x94]                                        ; +0x138, 0x3c5250\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x13c, 0x3c5254\nMOV             R0, R7                                                 ; +0x140, 0x3c5258\nMOV             R1, R5                                                 ; +0x142, 0x3c525a\nBLX             R10                                                    ; +0x144, 0x3c525c\nLDR.W           R7, [R4,#0x208]                                        ; +0x146, 0x3c525e\nADD.W           R10, SP, #0x24+var_18                                  ; +0x14a, 0x3c5262\nLDR             R3, [R7]                                               ; +0x14e, 0x3c5266\nMOV             R0, R7                                                 ; +0x150, 0x3c5268\nLDR             R2, [R3,#0x5C]                                         ; +0x152, 0x3c526a\nLDR             R3, [R3,#0x60]                                         ; +0x154, 0x3c526c\nSTR             R2, [SP,#0x24+var_20]                                  ; +0x156, 0x3c526e\nBLX             R3                                                     ; +0x158, 0x3c5270\nMOVS            R1, #0; float                                          ; +0x15a, 0x3c5272\nLDR             R2, flt_3C52BC; float                                  ; +0x15c, 0x3c5274\nMOV             R11, R0                                                ; +0x15e, 0x3c5276\nMOV             R0, R10; this                                          ; +0x160, 0x3c5278\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x162, 0x3c527a\nMOV             R2, R10                                                ; +0x166, 0x3c527e\nMOV             R0, R5                                                 ; +0x168, 0x3c5280\nMOV             R1, R11                                                ; +0x16a, 0x3c5282\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0x16c, 0x3c5284\nMOV             R0, R7                                                 ; +0x170, 0x3c5288\nMOV             R1, R5                                                 ; +0x172, 0x3c528a\nLDR             R3, [SP,#0x24+var_20]                                  ; +0x174, 0x3c528c\nBLX             R3                                                     ; +0x176, 0x3c528e\nLDR             R3, [R4]                                               ; +0x178, 0x3c5290\nMOV             R0, R4                                                 ; +0x17a, 0x3c5292\nLDR.W           R1, [R4,#0x208]                                        ; +0x17c, 0x3c5294\nMOV             R2, R9                                                 ; +0x180, 0x3c5298\nLDR.W           R3, [R3,#0xE8]                                         ; +0x182, 0x3c529a\nBLX             R3                                                     ; +0x186, 0x3c529e\nLDR             R2, [SP,#0x24+var_8]                                   ; +0x188, 0x3c52a0\nMOV             R0, R8                                                 ; +0x18a, 0x3c52a2\nLDR             R3, [R6]                                               ; +0x18c, 0x3c52a4\nCMP             R2, R3                                                 ; +0x18e, 0x3c52a6\nBEQ             loc_3C52AE                                             ; +0x190, 0x3c52a8\nBLX             __stack_chk_fail                                       ; +0x192, 0x3c52aa\nADD             SP, SP, #0x24 ; '$'                                    ; +0x196, 0x3c52ae\nVPOP            {D8}                                                   ; +0x198, 0x3c52b0\nPOP.W           {R4-R11,PC}                                            ; +0x19c, 0x3c52b4", "xrefs": ["CCCountdown::create @ 0x3c5430"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}