{"type": "func", "start": 4297266016, "end": 4297266521, "name": "DailyLevelPage::updateTimers", "pseudocode": "// \n// DailyLevelPage::updateTimers from 0x100231360 to 0x100231559 (505 bytes)\n// \n// 4 xrefs:\n// > DailyLevelPage::dailyStatusFinished @ 0x10023179e\n// > DailyLevelPage::dailyStatusFinished @ 0x1002317c2\n// > DailyLevelPage::init @ 0x100230a4e\n// > DailyLevelPage::dailyStatusFinished @ 0x1002317a3\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\nvoid __fastcall DailyLevelPage::updateTimers(DailyLevelPage *a1, float a2)\n{\n  GameLevelManager *v3; // rax\n  GameLevelManager *v4; // rax\n  __m128 v5; // xmm0\n  unsigned int v6; // edx\n  void *v7; // rsi\n  DailyLevelNode *m_dailyNode; // r15\n  cocos2d::CCLabelBMFont *m_timeLabel; // rdi\n  char *v10; // rsi\n  GameLevelManager *v11; // rax\n  GameLevelManager *v12; // rax\n  double v13; // [rsp+8h] [rbp-58h]\n  timeb v14; // [rsp+10h] [rbp-50h] BYREF\n  void *__p; // [rsp+20h] [rbp-40h]\n  timeb v16; // [rsp+30h] [rbp-30h] BYREF\n  void *v17; // [rsp+40h] [rbp-20h]\n\n  v3 = GameLevelManager::sharedState();\n  if ( GameLevelManager::hasDailyStateBeenLoaded(v3, a1->m_type) )\n  {\n    ftime(&v16);\n    v13 = (double)(v16.millitm + 1000 * (v16.time & 0xFFFFF)) / -1000.0;\n    v4 = GameLevelManager::sharedState();\n    v5 = 0;\n    *(double *)v5.i64 = (double)GameLevelManager::getDailyTimer(v4, a1->m_type) + v13;\n    v6 = 0;\n    if ( (int)*(double *)v5.i64 > 0 )\n      v6 = (int)*(double *)v5.i64;\n    DailyLevelPage::getDailyTimeString((size_t *)&v16, (__int64)a1, v6, v5);\n    if ( a1->m_type != Event )\n    {\n      v7 = (v16.time & 1) != 0 ? v17 : (char *)&v16.time + 1;\n      ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void *))a1->m_timeLabel->setString)(a1->m_timeLabel, v7);\n      m_dailyNode = a1->m_dailyNode;\n      if ( m_dailyNode )\n      {\n        if ( (v16.time & 1) != 0 )\n        {\n          sub_100006B70(&v14, v17, *(unsigned __int64 *)&v16.millitm, *(double *)v5.i64);\n        }\n        else\n        {\n          __p = v17;\n          v14 = v16;\n        }\n        m_timeLabel = m_dailyNode->m_timeLabel;\n        if ( m_timeLabel )\n        {\n          if ( (v14.time & 1) != 0 )\n            v10 = (char *)__p;\n          else\n            v10 = (char *)&v14.time + 1;\n          ((void (__fastcall *)(cocos2d::CCLabelBMFont *, char *))m_timeLabel->setString)(m_timeLabel, v10);\n        }\n        if ( (v14.time & 1) != 0 )\n          operator delete(__p);\n      }\n    }\n    if ( (int)*(double *)v5.i64 <= 0 && !*(&a1->m_gettingDailyStatus + 1) )\n    {\n      *(&a1->m_gettingDailyStatus + 1) = 1;\n      if ( a1->m_type != Event )\n      {\n        ((void (__fastcall *)(LoadingCircle *, __int64))a1->m_timeCircle->setVisible)(a1->m_timeCircle, 1);\n        ((void (__fastcall *)(cocos2d::CCLabelBMFont *, _QWORD))a1->m_timeLabel->setVisible)(a1->m_timeLabel, 0);\n      }\n      v11 = GameLevelManager::sharedState();\n      GameLevelManager::resetDailyLevelState(v11, a1->m_type);\n      if ( a1->m_gettingDailyStatus )\n      {\n        ((void (__fastcall *)(LoadingCircle *, _QWORD))a1->m_timeCircle->setVisible)(a1->m_timeCircle, 0);\n        ((void (__fastcall *)(LoadingCircle *, _QWORD))a1->m_nodeCircle->setVisible)(a1->m_nodeCircle, 0);\n      }\n      else\n      {\n        a1->m_gettingDailyStatus = 1;\n        v12 = GameLevelManager::sharedState();\n        GameLevelManager::getGJDailyLevelState(v12, a1->m_type);\n      }\n      a1->m_gettingDailyStatus = 0;\n    }\n    if ( (v16.time & 1) != 0 )\n      operator delete(v17);\n  }\n}", "assembly": "; \n; DailyLevelPage::updateTimers from 0x100231360 to 0x100231559 (505 bytes)\n; \n; 4 xrefs:\n; > DailyLevelPage::dailyStatusFinished @ 0x10023179e\n; > DailyLevelPage::dailyStatusFinished @ 0x1002317c2\n; > DailyLevelPage::init @ 0x100230a4e\n; > DailyLevelPage::dailyStatusFinished @ 0x1002317a3\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, 0x100231360\nmov     rbp, rsp                                                       ; +0x1, 0x100231361\npush    r15                                                            ; +0x4, 0x100231364\npush    r14                                                            ; +0x6, 0x100231366\npush    rbx                                                            ; +0x8, 0x100231368\nsub     rsp, 48h                                                       ; +0x9, 0x100231369\nmov     rbx, rdi                                                       ; +0xd, 0x10023136d\ncall    GameLevelManager__sharedState                                  ; +0x10, 0x100231370\nmov     esi, [rbx+2BCh]                                                ; +0x15, 0x100231375\nmov     rdi, rax                                                       ; +0x1b, 0x10023137b\ncall    GameLevelManager__hasDailyStateBeenLoaded                      ; +0x1e, 0x10023137e\ntest    al, al                                                         ; +0x23, 0x100231383\njz      loc_10023154E                                                  ; +0x25, 0x100231385\nlea     rdi, [rbp+var_30]; timeb *                                     ; +0x2b, 0x10023138b\ncall    _ftime                                                         ; +0x2f, 0x10023138f\nmovzx   eax, [rbp+var_30.millitm]                                      ; +0x34, 0x100231394\nmov     rcx, [rbp+var_30.time]                                         ; +0x38, 0x100231398\nand     ecx, 0FFFFFh                                                   ; +0x3c, 0x10023139c\nimul    rcx, 3E8h                                                      ; +0x42, 0x1002313a2\nadd     rcx, rax                                                       ; +0x49, 0x1002313a9\ncvtsi2sd xmm0, rcx                                                     ; +0x4c, 0x1002313ac\ndivsd   xmm0, cs:qword_100817E80                                       ; +0x51, 0x1002313b1\nmovsd   [rbp+var_58], xmm0                                             ; +0x59, 0x1002313b9\ncall    GameLevelManager__sharedState                                  ; +0x5e, 0x1002313be\nmov     esi, [rbx+2BCh]                                                ; +0x63, 0x1002313c3\nmov     rdi, rax                                                       ; +0x69, 0x1002313c9\ncall    GameLevelManager__getDailyTimer                                ; +0x6c, 0x1002313cc\nxorps   xmm0, xmm0                                                     ; +0x71, 0x1002313d1\ncvtsi2sd xmm0, eax                                                     ; +0x74, 0x1002313d4\naddsd   xmm0, [rbp+var_58]                                             ; +0x78, 0x1002313d8\ncvttsd2si r14d, xmm0                                                   ; +0x7d, 0x1002313dd\nxor     edx, edx                                                       ; +0x82, 0x1002313e2\ntest    r14d, r14d                                                     ; +0x84, 0x1002313e4\ncmovg   edx, r14d                                                      ; +0x87, 0x1002313e7\nlea     rdi, [rbp+var_30]                                              ; +0x8b, 0x1002313eb\nmov     rsi, rbx                                                       ; +0x8f, 0x1002313ef\ncall    DailyLevelPage__getDailyTimeString                             ; +0x92, 0x1002313f2\ncmp     dword ptr [rbx+2BCh], 2                                        ; +0x97, 0x1002313f7\njz      loc_10023148F                                                  ; +0x9e, 0x1002313fe\nmov     rdi, [rbx+290h]                                                ; +0xa4, 0x100231404\ntest    byte ptr [rbp+var_30.time], 1                                  ; +0xab, 0x10023140b\njz      short loc_100231417                                            ; +0xaf, 0x10023140f\nmov     rsi, [rbp+var_20]                                              ; +0xb1, 0x100231411\njmp     short loc_10023141B                                            ; +0xb5, 0x100231415\nlea     rsi, [rbp+var_30.time+1]                                       ; +0xb7, 0x100231417\nmov     rax, [rdi]                                                     ; +0xbb, 0x10023141b\ncall    qword ptr [rax+390h]                                           ; +0xbe, 0x10023141e\nmov     r15, [rbx+2B0h]                                                ; +0xc4, 0x100231424\ntest    r15, r15                                                       ; +0xcb, 0x10023142b\njz      short loc_10023148F                                            ; +0xce, 0x10023142e\ntest    byte ptr [rbp+var_30.time], 1                                  ; +0xd0, 0x100231430\njnz     short loc_10023144A                                            ; +0xd4, 0x100231434\nmov     rax, [rbp+var_20]                                              ; +0xd6, 0x100231436\nmov     [rbp+__p], rax                                                 ; +0xda, 0x10023143a\nmovupd  xmm0, xmmword ptr [rbp+var_30.time]                            ; +0xde, 0x10023143e\nmovapd  [rbp+var_50], xmm0                                             ; +0xe3, 0x100231443\njmp     short loc_10023145B                                            ; +0xe8, 0x100231448\nmov     rdx, qword ptr [rbp+var_30.millitm]                            ; +0xea, 0x10023144a\nmov     rsi, [rbp+var_20]                                              ; +0xee, 0x10023144e\nlea     rdi, [rbp+var_50]                                              ; +0xf2, 0x100231452\ncall    sub_100006B70                                                  ; +0xf6, 0x100231456\nmov     rdi, [r15+158h]                                                ; +0xfb, 0x10023145b\ntest    rdi, rdi                                                       ; +0x102, 0x100231462\njz      short loc_100231480                                            ; +0x105, 0x100231465\ntest    byte ptr [rbp+var_50], 1                                       ; +0x107, 0x100231467\njz      short loc_100231473                                            ; +0x10b, 0x10023146b\nmov     rsi, [rbp+__p]                                                 ; +0x10d, 0x10023146d\njmp     short loc_100231477                                            ; +0x111, 0x100231471\nlea     rsi, [rbp+var_50+1]                                            ; +0x113, 0x100231473\nmov     rax, [rdi]                                                     ; +0x117, 0x100231477\ncall    qword ptr [rax+390h]                                           ; +0x11a, 0x10023147a\ntest    byte ptr [rbp+var_50], 1                                       ; +0x120, 0x100231480\njz      short loc_10023148F                                            ; +0x124, 0x100231484\nmov     rdi, [rbp+__p]; __p                                            ; +0x126, 0x100231486\ncall    __ZdlPv; operator delete(void *)                               ; +0x12a, 0x10023148a\ntest    r14d, r14d                                                     ; +0x12f, 0x10023148f\njg      loc_10023153F                                                  ; +0x132, 0x100231492\ncmp     byte ptr [rbx+2A9h], 0                                         ; +0x138, 0x100231498\njnz     loc_10023153F                                                  ; +0x13f, 0x10023149f\nmov     byte ptr [rbx+2A9h], 1                                         ; +0x145, 0x1002314a5\ncmp     dword ptr [rbx+2BCh], 2                                        ; +0x14c, 0x1002314ac\njz      short loc_1002314DC                                            ; +0x153, 0x1002314b3\nmov     rdi, [rbx+298h]                                                ; +0x155, 0x1002314b5\nmov     rax, [rdi]                                                     ; +0x15c, 0x1002314bc\nmov     esi, 1                                                         ; +0x15f, 0x1002314bf\ncall    qword ptr [rax+148h]                                           ; +0x164, 0x1002314c4\nmov     rdi, [rbx+290h]                                                ; +0x16a, 0x1002314ca\nmov     rax, [rdi]                                                     ; +0x171, 0x1002314d1\nxor     esi, esi                                                       ; +0x174, 0x1002314d4\ncall    qword ptr [rax+148h]                                           ; +0x176, 0x1002314d6\ncall    GameLevelManager__sharedState                                  ; +0x17c, 0x1002314dc\nmov     esi, [rbx+2BCh]                                                ; +0x181, 0x1002314e1\nmov     rdi, rax                                                       ; +0x187, 0x1002314e7\ncall    GameLevelManager__resetDailyLevelState                         ; +0x18a, 0x1002314ea\ncmp     byte ptr [rbx+2A8h], 1                                         ; +0x18f, 0x1002314ef\njnz     short loc_10023151E                                            ; +0x196, 0x1002314f6\nmov     rdi, [rbx+298h]                                                ; +0x198, 0x1002314f8\nmov     rax, [rdi]                                                     ; +0x19f, 0x1002314ff\nxor     esi, esi                                                       ; +0x1a2, 0x100231502\ncall    qword ptr [rax+148h]                                           ; +0x1a4, 0x100231504\nmov     rdi, [rbx+2A0h]                                                ; +0x1aa, 0x10023150a\nmov     rax, [rdi]                                                     ; +0x1b1, 0x100231511\nxor     esi, esi                                                       ; +0x1b4, 0x100231514\ncall    qword ptr [rax+148h]                                           ; +0x1b6, 0x100231516\njmp     short loc_100231538                                            ; +0x1bc, 0x10023151c\nmov     byte ptr [rbx+2A8h], 1                                         ; +0x1be, 0x10023151e\ncall    GameLevelManager__sharedState                                  ; +0x1c5, 0x100231525\nmov     esi, [rbx+2BCh]                                                ; +0x1ca, 0x10023152a\nmov     rdi, rax                                                       ; +0x1d0, 0x100231530\ncall    GameLevelManager__getGJDailyLevelState                         ; +0x1d3, 0x100231533\nmov     byte ptr [rbx+2A8h], 0                                         ; +0x1d8, 0x100231538\ntest    byte ptr [rbp+var_30.time], 1                                  ; +0x1df, 0x10023153f\njz      short loc_10023154E                                            ; +0x1e3, 0x100231543\nmov     rdi, [rbp+var_20]; __p                                         ; +0x1e5, 0x100231545\ncall    __ZdlPv; operator delete(void *)                               ; +0x1e9, 0x100231549\nadd     rsp, 48h                                                       ; +0x1ee, 0x10023154e\npop     rbx                                                            ; +0x1f2, 0x100231552\npop     r14                                                            ; +0x1f3, 0x100231553\npop     r15                                                            ; +0x1f5, 0x100231555\npop     rbp                                                            ; +0x1f7, 0x100231557\nretn                                                                   ; +0x1f8, 0x100231558", "xrefs": ["DailyLevelPage::dailyStatusFinished @ 0x10023179e", "DailyLevelPage::dailyStatusFinished @ 0x1002317c2", "DailyLevelPage::init @ 0x100230a4e", "DailyLevelPage::dailyStatusFinished @ 0x1002317a3"], "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"}