{"type": "func", "start": 4303119712, "end": 4303120265, "name": "CCCountdown::init", "pseudocode": "// \n// CCCountdown::init from 0x1007c6560 to 0x1007c6789 (553 bytes)\n// \n// 2 xrefs:\n// > CCCountdown::create @ 0x1007c651d\n// > <???> @ 0x100995e90\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 __fastcall CCCountdown::init(CCCountdown *a1)\n{\n  bool result; // al\n  cocos2d::CCSprite *v3; // rax\n  cocos2d::CCProgressTimer *v4; // rax\n  cocos2d::CCProgressTimer *m_progressTimer; // r14\n  __int64 v6; // rax\n  cocos2d::CCSprite *m_pSprite; // rdi\n  cocos2d::CCLabelBMFont *v8; // r14\n  __int64 v9; // rax\n  cocos2d::CCLabelBMFont *m_countdownLabel; // r14\n  cocos2d::CCLabelBMFont *v11; // r14\n  unsigned __int64 *v12; // r15\n  unsigned __int64 v13; // [rsp+0h] [rbp-40h] BYREF\n  double v14; // [rsp+8h] [rbp-38h] BYREF\n  float v15; // [rsp+10h] [rbp-30h]\n  bool v16; // [rsp+17h] [rbp-29h]\n\n  result = cocos2d::CCSprite::initWithFile_1(a1, \"timer_outerCircle.png\");\n  if ( result )\n  {\n    v16 = result;\n    v3 = cocos2d::CCSprite::create_1(\"timer_innerCircle.png\");\n    v4 = cocos2d::CCProgressTimer::create(v3);\n    a1->m_progressTimer = v4;\n    cocos2d::CCProgressTimer::setType(v4, kCCProgressTimerTypeRadial);\n    ((void (__fastcall *)(CCCountdown *, cocos2d::CCProgressTimer *, __int64))a1->addChild_0)(\n      a1,\n      a1->m_progressTimer,\n      0xFFFFFFFFLL);\n    m_progressTimer = a1->m_progressTimer;\n    v15 = *(float *)((__int64 (__fastcall *)(CCCountdown *))a1->getContentSize)(a1) * 0.5;\n    v6 = ((__int64 (__fastcall *)(CCCountdown *))a1->getContentSize)(a1);\n    sub_10028CBE0((float *)&v14, v15, *(float *)(v6 + 4) * 0.5);\n    ((void (__fastcall *)(cocos2d::CCProgressTimer *, double *))m_progressTimer->setPosition)(m_progressTimer, &v14);\n    cocos2d::CCProgressTimer::setPercentage(a1->m_progressTimer, 100.0);\n    m_pSprite = a1->m_progressTimer->m_pSprite;\n    BYTE2(v14) = 70;\n    LOWORD(v14) = 10240;\n    ((void (__fastcall *)(cocos2d::CCSprite *, double *))m_pSprite->setColor)(m_pSprite, &v14);\n    cocos2d::CCProgressTimer::updateColor(a1->m_progressTimer);\n    a1->m_progressTimer->m_bReverseDirection = 1;\n    v8 = cocos2d::CCLabelBMFont::create_3(\"0\", \"levelFont.fnt\");\n    a1->m_countdownLabel = v8;\n    v15 = *(float *)((__int64 (__fastcall *)(CCCountdown *))a1->getContentSize)(a1) * 0.5;\n    v9 = ((__int64 (__fastcall *)(CCCountdown *))a1->getContentSize)(a1);\n    sub_10028CBE0((float *)&v14, v15, *(float *)(v9 + 4) * 0.5);\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))v8->setPosition)(v8, &v14);\n    m_countdownLabel = a1->m_countdownLabel;\n    sub_10028CBE0((float *)&v14, 0.5, 0.5);\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))m_countdownLabel->setAnchorPoint)(m_countdownLabel, &v14);\n    v11 = a1->m_countdownLabel;\n    v12 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v11->getPosition)(v11);\n    sub_10028CBE0((float *)&v13, 0.0, -3.0);\n    sub_10028CCE0(&v14, v12, &v13);\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))v11->setPosition)(v11, &v14);\n    ((void (__fastcall *)(CCCountdown *, cocos2d::CCLabelBMFont *, __int64))a1->addChild_0)(a1, a1->m_countdownLabel, 1);\n    return v16;\n  }\n  return result;\n}", "assembly": "; \n; CCCountdown::init from 0x1007c6560 to 0x1007c6789 (553 bytes)\n; \n; 2 xrefs:\n; > CCCountdown::create @ 0x1007c651d\n; > <???> @ 0x100995e90\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    rbp                                                            ; +0x0, 0x1007c6560\nmov     rbp, rsp                                                       ; +0x1, 0x1007c6561\npush    r15                                                            ; +0x4, 0x1007c6564\npush    r14                                                            ; +0x6, 0x1007c6566\npush    r13                                                            ; +0x8, 0x1007c6568\npush    r12                                                            ; +0xa, 0x1007c656a\npush    rbx                                                            ; +0xc, 0x1007c656c\nsub     rsp, 18h                                                       ; +0xd, 0x1007c656d\nmov     rbx, rdi                                                       ; +0x11, 0x1007c6571\nlea     rsi, aTimerOutercirc; \"timer_outerCircle.png\"                  ; +0x14, 0x1007c6574\ncall    cocos2d__CCSprite__initWithFile_1                              ; +0x1b, 0x1007c657b\ntest    al, al                                                         ; +0x20, 0x1007c6580\njz      loc_1007C677A                                                  ; +0x22, 0x1007c6582\nlea     rdi, aTimerInnercirc; \"timer_innerCircle.png\"                  ; +0x28, 0x1007c6588\nmov     [rbp+var_29], al                                               ; +0x2f, 0x1007c658f\ncall    cocos2d__CCSprite__create_1                                    ; +0x32, 0x1007c6592\nmov     rdi, rax                                                       ; +0x37, 0x1007c6597\ncall    cocos2d__CCProgressTimer__create                               ; +0x3a, 0x1007c659a\nmov     [rbx+258h], rax                                                ; +0x3f, 0x1007c659f\nmov     rdi, rax                                                       ; +0x46, 0x1007c65a6\nxor     esi, esi                                                       ; +0x49, 0x1007c65a9\ncall    cocos2d__CCProgressTimer__setType                              ; +0x4b, 0x1007c65ab\nmov     rsi, [rbx+258h]                                                ; +0x50, 0x1007c65b0\nmov     rax, [rbx]                                                     ; +0x57, 0x1007c65b7\nmov     rdi, rbx                                                       ; +0x5a, 0x1007c65ba\nmov     edx, 0FFFFFFFFh                                                ; +0x5d, 0x1007c65bd\ncall    qword ptr [rax+1C0h]                                           ; +0x62, 0x1007c65c2\nmov     r14, [rbx+258h]                                                ; +0x68, 0x1007c65c8\nmov     rax, [rbx]                                                     ; +0x6f, 0x1007c65cf\nmov     rdi, rbx                                                       ; +0x72, 0x1007c65d2\ncall    qword ptr [rax+138h]                                           ; +0x75, 0x1007c65d5\nmovss   xmm0, dword ptr [rax]                                          ; +0x7b, 0x1007c65db\nmulss   xmm0, cs:dword_100814FA8                                       ; +0x7f, 0x1007c65df\nmovss   [rbp+var_30], xmm0                                             ; +0x87, 0x1007c65e7\nmov     rax, [rbx]                                                     ; +0x8c, 0x1007c65ec\nmov     rdi, rbx                                                       ; +0x8f, 0x1007c65ef\ncall    qword ptr [rax+138h]                                           ; +0x92, 0x1007c65f2\nmovss   xmm1, dword ptr [rax+4]                                        ; +0x98, 0x1007c65f8\nmulss   xmm1, cs:dword_100814FA8                                       ; +0x9d, 0x1007c65fd\nlea     r15, [rbp+var_38]                                              ; +0xa5, 0x1007c6605\nmov     rdi, r15                                                       ; +0xa9, 0x1007c6609\nmovss   xmm0, [rbp+var_30]                                             ; +0xac, 0x1007c660c\ncall    sub_10028CBE0                                                  ; +0xb1, 0x1007c6611\nmov     rax, [r14]                                                     ; +0xb6, 0x1007c6616\nmov     rdi, r14                                                       ; +0xb9, 0x1007c6619\nmov     rsi, r15                                                       ; +0xbc, 0x1007c661c\ncall    qword ptr [rax+0B8h]                                           ; +0xbf, 0x1007c661f\nmov     rdi, [rbx+258h]                                                ; +0xc5, 0x1007c6625\nmovss   xmm0, cs:dword_100815014                                       ; +0xcc, 0x1007c662c\ncall    cocos2d__CCProgressTimer__setPercentage                        ; +0xd4, 0x1007c6634\nmov     rax, [rbx+258h]                                                ; +0xd9, 0x1007c6639\nmov     rdi, [rax+160h]                                                ; +0xe0, 0x1007c6640\nmov     [rbp+var_36], 46h ; 'F'                                        ; +0xe7, 0x1007c6647\nmov     [rbp+var_38], 2800h                                            ; +0xeb, 0x1007c664b\nmov     rax, [rdi]                                                     ; +0xf1, 0x1007c6651\nlea     rsi, [rbp+var_38]                                              ; +0xf4, 0x1007c6654\ncall    qword ptr [rax+3B0h]                                           ; +0xf8, 0x1007c6658\nmov     rdi, [rbx+258h]                                                ; +0xfe, 0x1007c665e\ncall    cocos2d__CCProgressTimer__updateColor                          ; +0x105, 0x1007c6665\nmov     rax, [rbx+258h]                                                ; +0x10a, 0x1007c666a\nmov     byte ptr [rax+188h], 1                                         ; +0x111, 0x1007c6671\nlea     rdi, a0; \"0\"                                                   ; +0x118, 0x1007c6678\nlea     rsi, aLevelfontFnt; \"levelFont.fnt\"                            ; +0x11f, 0x1007c667f\ncall    cocos2d__CCLabelBMFont__create_3                               ; +0x126, 0x1007c6686\nmov     r14, rax                                                       ; +0x12b, 0x1007c668b\nmov     [rbx+268h], rax                                                ; +0x12e, 0x1007c668e\nmov     rax, [rbx]                                                     ; +0x135, 0x1007c6695\nmov     rdi, rbx                                                       ; +0x138, 0x1007c6698\ncall    qword ptr [rax+138h]                                           ; +0x13b, 0x1007c669b\nmovss   xmm0, dword ptr [rax]                                          ; +0x141, 0x1007c66a1\nmulss   xmm0, cs:dword_100814FA8                                       ; +0x145, 0x1007c66a5\nmovss   [rbp+var_30], xmm0                                             ; +0x14d, 0x1007c66ad\nmov     rax, [rbx]                                                     ; +0x152, 0x1007c66b2\nmov     rdi, rbx                                                       ; +0x155, 0x1007c66b5\ncall    qword ptr [rax+138h]                                           ; +0x158, 0x1007c66b8\nmovss   xmm1, dword ptr [rax+4]                                        ; +0x15e, 0x1007c66be\nmulss   xmm1, cs:dword_100814FA8                                       ; +0x163, 0x1007c66c3\nmov     rdi, r15                                                       ; +0x16b, 0x1007c66cb\nmovss   xmm0, [rbp+var_30]                                             ; +0x16e, 0x1007c66ce\ncall    sub_10028CBE0                                                  ; +0x173, 0x1007c66d3\nmov     rax, [r14]                                                     ; +0x178, 0x1007c66d8\nmov     rdi, r14                                                       ; +0x17b, 0x1007c66db\nmov     rsi, r15                                                       ; +0x17e, 0x1007c66de\ncall    qword ptr [rax+0B8h]                                           ; +0x181, 0x1007c66e1\nmov     r14, [rbx+268h]                                                ; +0x187, 0x1007c66e7\nmov     rdi, r15                                                       ; +0x18e, 0x1007c66ee\nmovss   xmm0, cs:dword_100814FA8                                       ; +0x191, 0x1007c66f1\nmovaps  xmm1, xmm0                                                     ; +0x199, 0x1007c66f9\ncall    sub_10028CBE0                                                  ; +0x19c, 0x1007c66fc\nmov     rax, [r14]                                                     ; +0x1a1, 0x1007c6701\nmov     rdi, r14                                                       ; +0x1a4, 0x1007c6704\nmov     rsi, r15                                                       ; +0x1a7, 0x1007c6707\ncall    qword ptr [rax+118h]                                           ; +0x1aa, 0x1007c670a\nmov     r14, [rbx+268h]                                                ; +0x1b0, 0x1007c6710\nmov     rax, [r14]                                                     ; +0x1b7, 0x1007c6717\nmov     rdi, r14                                                       ; +0x1ba, 0x1007c671a\ncall    qword ptr [rax+0C0h]                                           ; +0x1bd, 0x1007c671d\nmov     r15, rax                                                       ; +0x1c3, 0x1007c6723\nlea     r12, [rbp+var_40]                                              ; +0x1c6, 0x1007c6726\nmovss   xmm1, cs:dword_1008153C0                                       ; +0x1ca, 0x1007c672a\nxorps   xmm0, xmm0                                                     ; +0x1d2, 0x1007c6732\nmov     rdi, r12                                                       ; +0x1d5, 0x1007c6735\ncall    sub_10028CBE0                                                  ; +0x1d8, 0x1007c6738\nlea     r13, [rbp+var_38]                                              ; +0x1dd, 0x1007c673d\nmov     rdi, r13                                                       ; +0x1e1, 0x1007c6741\nmov     rsi, r15                                                       ; +0x1e4, 0x1007c6744\nmov     rdx, r12                                                       ; +0x1e7, 0x1007c6747\ncall    sub_10028CCE0                                                  ; +0x1ea, 0x1007c674a\nmov     rax, [r14]                                                     ; +0x1ef, 0x1007c674f\nmov     rdi, r14                                                       ; +0x1f2, 0x1007c6752\nmov     rsi, r13                                                       ; +0x1f5, 0x1007c6755\ncall    qword ptr [rax+0B8h]                                           ; +0x1f8, 0x1007c6758\nmov     rsi, [rbx+268h]                                                ; +0x1fe, 0x1007c675e\nmov     rax, [rbx]                                                     ; +0x205, 0x1007c6765\nmov     rdi, rbx                                                       ; +0x208, 0x1007c6768\nmov     edx, 1                                                         ; +0x20b, 0x1007c676b\ncall    qword ptr [rax+1C0h]                                           ; +0x210, 0x1007c6770\nmovzx   eax, [rbp+var_29]                                              ; +0x216, 0x1007c6776\nadd     rsp, 18h                                                       ; +0x21a, 0x1007c677a\npop     rbx                                                            ; +0x21e, 0x1007c677e\npop     r12                                                            ; +0x21f, 0x1007c677f\npop     r13                                                            ; +0x221, 0x1007c6781\npop     r14                                                            ; +0x223, 0x1007c6783\npop     r15                                                            ; +0x225, 0x1007c6785\npop     rbp                                                            ; +0x227, 0x1007c6787\nretn                                                                   ; +0x228, 0x1007c6788", "xrefs": ["CCCountdown::create @ 0x1007c651d", "<???> @ 0x100995e90"], "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"}