{"type": "func", "start": 9525820, "end": 9526412, "name": "DailyLevelPage::updateTimers", "pseudocode": "// \n// DailyLevelPage::updateTimers from 0x915a3c to 0x915c8c (592 bytes)\n// \n// 7 xrefs:\n// > DailyLevelPage::dailyStatusFinished @ 0x915cb8\n// > DailyLevelPage::dailyStatusFinished @ 0x915cdc\n// > <???> @ 0x34698\n// > DailyLevelPage::init @ 0x914d00\n// > DailyLevelPage::dailyStatusFinished @ 0x915ce0\n// > DailyLevelPage::dailyStatusFinished @ 0x915cf0\n// > <???> @ 0x1229960\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 DailyLevelPage::updateTimers(DailyLevelPage *a1, float a2)\n{\n  GameLevelManager *v3; // x0\n  int DailyTime; // w22\n  DailyLevelNode *m_dailyNode; // x24\n  void *v6; // x0\n  unsigned __int8 *v7; // x0\n  unsigned int *v8; // x20\n  int v9; // w1\n  GJTimedLevelType m_type; // w0\n  GameLevelManager *v11; // x0\n  unsigned int *v12; // x1\n  int v13; // w2\n  const unsigned __int8 *v14; // [xsp+58h] [xbp+58h] BYREF\n  __int64 v15; // [xsp+60h] [xbp+60h] BYREF\n\n  v3 = GameLevelManager::sharedState();\n  if ( GameLevelManager::hasDailyStateBeenLoaded(v3, a1->m_type) )\n  {\n    DailyTime = DailyLevelPage::getDailyTime(a1);\n    DailyLevelPage::getDailyTimeString(a1, (GameToolbox *)(unsigned int)DailyTime, (__int64)&v14);\n    if ( a1->m_type != Event )\n    {\n      a1->m_timeLabel->setString(a1->m_timeLabel, v14);\n      m_dailyNode = a1->m_dailyNode;\n      if ( m_dailyNode )\n      {\n        sub_D18D28(&v15);\n        DailyLevelNode::updateTimeLabel((__int64)m_dailyNode, &v15);\n        v6 = (void *)(v15 - 24);\n        if ( (__int64 *)(v15 - 24) != &qword_124B6B0 )\n        {\n          if ( &pthread_create )\n          {\n            v12 = (unsigned int *)(v15 - 8);\n            do\n              v13 = __ldaxr(v12);\n            while ( __stlxr(v13 - 1, v12) );\n          }\n          else\n          {\n            v13 = *(_DWORD *)(v15 - 8);\n            *(_DWORD *)(v15 - 8) = v13 - 1;\n          }\n          if ( v13 <= 0 )\n            operator delete(v6);\n        }\n      }\n    }\n    if ( DailyTime <= 0 && !*(&a1->m_gettingDailyStatus + 1) )\n    {\n      m_type = a1->m_type;\n      *(&a1->m_gettingDailyStatus + 1) = 1;\n      if ( m_type != Event )\n      {\n        ((void (__fastcall *)(LoadingCircle *))a1->m_timeCircle->setVisible)(a1->m_timeCircle);\n        a1->m_timeLabel->setVisible(a1->m_timeLabel, 0);\n      }\n      v11 = GameLevelManager::sharedState();\n      GameLevelManager::resetDailyLevelState(v11, a1->m_type);\n      DailyLevelPage::tryGetDailyStatus(a1);\n      a1->m_gettingDailyStatus = 0;\n    }\n    v7 = (unsigned __int8 *)(v14 - 24);\n    if ( v14 - 24 != (const unsigned __int8 *)&qword_124B6B0 )\n    {\n      if ( &pthread_create )\n      {\n        v8 = (unsigned int *)(v14 - 8);\n        do\n          v9 = __ldaxr(v8);\n        while ( __stlxr(v9 - 1, v8) );\n      }\n      else\n      {\n        v9 = *((_DWORD *)v14 - 2);\n        *((_DWORD *)v14 - 2) = v9 - 1;\n      }\n      if ( v9 <= 0 )\n        operator delete(v7);\n    }\n  }\n}", "assembly": "; \n; DailyLevelPage::updateTimers from 0x915a3c to 0x915c8c (592 bytes)\n; \n; 7 xrefs:\n; > DailyLevelPage::dailyStatusFinished @ 0x915cb8\n; > DailyLevelPage::dailyStatusFinished @ 0x915cdc\n; > <???> @ 0x34698\n; > DailyLevelPage::init @ 0x914d00\n; > DailyLevelPage::dailyStatusFinished @ 0x915ce0\n; > DailyLevelPage::dailyStatusFinished @ 0x915cf0\n; > <???> @ 0x1229960\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_70]!                                ; +0x0, 0x915a3c\nMOV             X29, SP                                                ; +0x4, 0x915a40\nSTP             X19, X20, [SP,#0x70+var_60]                            ; +0x8, 0x915a44\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x915a48\nMOV             X20, X0                                                ; +0x10, 0x915a4c\nSTP             X21, X22, [SP,#0x70+var_50]                            ; +0x14, 0x915a50\nSTP             X23, X24, [SP,#0x70+var_40]                            ; +0x18, 0x915a54\nLDR             X0, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x1c, 0x915a58\nSTR             X25, [SP,#0x70+var_30]                                 ; +0x20, 0x915a5c\nLDR             X0, [X0]; this                                         ; +0x24, 0x915a60\nSTR             X0, [X29,#0x70+var_8]                                  ; +0x28, 0x915a64\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x2c, 0x915a68\nLDR             W1, [X20,#0x2BC]                                       ; +0x30, 0x915a6c\nBL              _ZN16GameLevelManager23hasDailyStateBeenLoadedE16GJTimedLevelType; GameLevelManager::hasDailyStateBeenLoaded(GJTimedLevelType) ; +0x34, 0x915a70\nUXTB            W0, W0                                                 ; +0x38, 0x915a74\nCBNZ            W0, loc_915AA8                                         ; +0x3c, 0x915a78\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x40, 0x915a7c\nLDR             X1, [X29,#0x70+var_8]                                  ; +0x44, 0x915a80\nLDR             X0, [X19]                                              ; +0x48, 0x915a84\nCMP             X1, X0                                                 ; +0x4c, 0x915a88\nB.NE            loc_915C38                                             ; +0x50, 0x915a8c\nLDP             X19, X20, [SP,#0x70+var_60]                            ; +0x54, 0x915a90\nLDP             X21, X22, [SP,#0x70+var_50]                            ; +0x58, 0x915a94\nLDP             X23, X24, [SP,#0x70+var_40]                            ; +0x5c, 0x915a98\nLDR             X25, [SP,#0x70+var_30]                                 ; +0x60, 0x915a9c\nLDP             X29, X30, [SP+0x70+var_70],#0x70                       ; +0x64, 0x915aa0\nRET                                                                    ; +0x68, 0x915aa4\nMOV             X0, X20; this                                          ; +0x6c, 0x915aa8\nADD             X23, X29, #0x70+var_18                                 ; +0x70, 0x915aac\nADRP            X21, #off_122EFE8@PAGE                                 ; +0x74, 0x915ab0\nBL              _ZN14DailyLevelPage12getDailyTimeEv; DailyLevelPage::getDailyTime(void) ; +0x78, 0x915ab4\nMOV             W22, W0                                                ; +0x7c, 0x915ab8\nMOV             X8, X23                                                ; +0x80, 0x915abc\nMOV             X0, X20; this                                          ; +0x84, 0x915ac0\nMOV             W1, W22; GameToolbox *                                 ; +0x88, 0x915ac4\nBL              _ZN14DailyLevelPage18getDailyTimeStringEi; DailyLevelPage::getDailyTimeString(int) ; +0x8c, 0x915ac8\nLDR             W0, [X20,#0x2BC]                                       ; +0x90, 0x915acc\nCMP             W0, #2                                                 ; +0x94, 0x915ad0\nB.EQ            loc_915B30                                             ; +0x98, 0x915ad4\nLDR             X2, [X20,#0x290]                                       ; +0x9c, 0x915ad8\nADRP            X21, #off_122EFE8@PAGE                                 ; +0xa0, 0x915adc\nLDR             X1, [X29,#0x70+var_18]                                 ; +0xa4, 0x915ae0\nMOV             X0, X2                                                 ; +0xa8, 0x915ae4\nLDR             X2, [X2]                                               ; +0xac, 0x915ae8\nLDR             X2, [X2,#0x390]                                        ; +0xb0, 0x915aec\nBLR             X2                                                     ; +0xb4, 0x915af0\nLDR             X24, [X20,#0x2B0]                                      ; +0xb8, 0x915af4\nCBZ             X24, loc_915B30                                        ; +0xbc, 0x915af8\nADD             X25, X29, #0x70+var_10                                 ; +0xc0, 0x915afc\nMOV             X1, X23                                                ; +0xc4, 0x915b00\nMOV             X0, X25                                                ; +0xc8, 0x915b04\nADRP            X21, #off_122EFE8@PAGE                                 ; +0xcc, 0x915b08\nBL              sub_D18D28                                             ; +0xd0, 0x915b0c\nMOV             X0, X24                                                ; +0xd4, 0x915b10\nMOV             X1, X25                                                ; +0xd8, 0x915b14\nBL              _ZN14DailyLevelNode15updateTimeLabelESs; DailyLevelNode::updateTimeLabel(std::string) ; +0xdc, 0x915b18\nLDR             X1, [X29,#0x70+var_10]                                 ; +0xe0, 0x915b1c\nLDR             X2, [X21,#off_122EFE8@PAGEOFF]; qword_124B6B0          ; +0xe4, 0x915b20\nSUB             X0, X1, #0x18; p                                       ; +0xe8, 0x915b24\nCMP             X0, X2                                                 ; +0xec, 0x915b28\nB.NE            loc_915BE4                                             ; +0xf0, 0x915b2c\nCMP             W22, WZR                                               ; +0xf4, 0x915b30\nB.LE            loc_915B80                                             ; +0xf8, 0x915b34\nLDR             X20, [X29,#0x70+var_18]                                ; +0xfc, 0x915b38\nLDR             X21, [X21,#off_122EFE8@PAGEOFF]; qword_124B6B0         ; +0x100, 0x915b3c\nSUB             X0, X20, #0x18; p                                      ; +0x104, 0x915b40\nCMP             X0, X21                                                ; +0x108, 0x915b44\nB.EQ            loc_915A7C                                             ; +0x10c, 0x915b48\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0x110, 0x915b4c\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x114, 0x915b50\nCBZ             X1, loc_915C18                                         ; +0x118, 0x915b54\nSUB             X20, X20, #8                                           ; +0x11c, 0x915b58\nLDAXR           W1, [X20]                                              ; +0x120, 0x915b5c\nSUB             W2, W1, #1                                             ; +0x124, 0x915b60\nSTLXR           W3, W2, [X20]                                          ; +0x128, 0x915b64\nCBNZ            W3, loc_915B5C                                         ; +0x12c, 0x915b68\nCMP             W1, WZR                                                ; +0x130, 0x915b6c\nB.GT            loc_915A7C                                             ; +0x134, 0x915b70\nADD             X1, X29, #0x70+var_10                                  ; +0x138, 0x915b74\nBL              j__ZdlPv; operator delete(void *)                      ; +0x13c, 0x915b78\nB               loc_915A7C                                             ; +0x140, 0x915b7c\nLDRB            W0, [X20,#0x2A9]                                       ; +0x144, 0x915b80\nCBNZ            W0, loc_915B38                                         ; +0x148, 0x915b84\nLDR             W0, [X20,#0x2BC]                                       ; +0x14c, 0x915b88\nMOV             W1, #1                                                 ; +0x150, 0x915b8c\nSTRB            W1, [X20,#0x2A9]                                       ; +0x154, 0x915b90\nCMP             W0, #2                                                 ; +0x158, 0x915b94\nB.EQ            loc_915BC8                                             ; +0x15c, 0x915b98\nLDR             X2, [X20,#0x298]                                       ; +0x160, 0x915b9c\nMOV             X0, X2                                                 ; +0x164, 0x915ba0\nLDR             X2, [X2]                                               ; +0x168, 0x915ba4\nLDR             X2, [X2,#0x148]                                        ; +0x16c, 0x915ba8\nBLR             X2                                                     ; +0x170, 0x915bac\nLDR             X2, [X20,#0x290]                                       ; +0x174, 0x915bb0\nMOV             W1, #0                                                 ; +0x178, 0x915bb4\nMOV             X0, X2                                                 ; +0x17c, 0x915bb8\nLDR             X2, [X2]                                               ; +0x180, 0x915bbc\nLDR             X2, [X2,#0x148]                                        ; +0x184, 0x915bc0\nBLR             X2                                                     ; +0x188, 0x915bc4\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x18c, 0x915bc8\nLDR             W1, [X20,#0x2BC]                                       ; +0x190, 0x915bcc\nBL              _ZN16GameLevelManager20resetDailyLevelStateE16GJTimedLevelType; GameLevelManager::resetDailyLevelState(GJTimedLevelType) ; +0x194, 0x915bd0\nMOV             X0, X20; this                                          ; +0x198, 0x915bd4\nBL              _ZN14DailyLevelPage17tryGetDailyStatusEv; DailyLevelPage::tryGetDailyStatus(void) ; +0x19c, 0x915bd8\nSTRB            WZR, [X20,#0x2A8]                                      ; +0x1a0, 0x915bdc\nB               loc_915B38                                             ; +0x1a4, 0x915be0\nADRP            X2, #pthread_create_ptr_0@PAGE                         ; +0x1a8, 0x915be4\nLDR             X2, [X2,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x1ac, 0x915be8\nCBZ             X2, loc_915C28                                         ; +0x1b0, 0x915bec\nSUB             X1, X1, #8                                             ; +0x1b4, 0x915bf0\nLDAXR           W2, [X1]                                               ; +0x1b8, 0x915bf4\nSUB             W3, W2, #1                                             ; +0x1bc, 0x915bf8\nSTLXR           W4, W3, [X1]                                           ; +0x1c0, 0x915bfc\nCBNZ            W4, loc_915BF4                                         ; +0x1c4, 0x915c00\nCMP             W2, WZR                                                ; +0x1c8, 0x915c04\nB.GT            loc_915B30                                             ; +0x1cc, 0x915c08\nADD             X1, X29, #0x70+var_20                                  ; +0x1d0, 0x915c0c\nBL              j__ZdlPv; operator delete(void *)                      ; +0x1d4, 0x915c10\nB               loc_915B30                                             ; +0x1d8, 0x915c14\nLDUR            W1, [X20,#-8]                                          ; +0x1dc, 0x915c18\nSUB             W2, W1, #1                                             ; +0x1e0, 0x915c1c\nSTUR            W2, [X20,#-8]                                          ; +0x1e4, 0x915c20\nB               loc_915B6C                                             ; +0x1e8, 0x915c24\nLDUR            W2, [X1,#-8]                                           ; +0x1ec, 0x915c28\nSUB             W3, W2, #1                                             ; +0x1f0, 0x915c2c\nSTUR            W3, [X1,#-8]                                           ; +0x1f4, 0x915c30\nB               loc_915C04                                             ; +0x1f8, 0x915c34\nBL              .__stack_chk_fail                                      ; +0x1fc, 0x915c38\nADRP            X21, #off_122EFE8@PAGE                                 ; +0x200, 0x915c3c\nMOV             X19, X0                                                ; +0x204, 0x915c40\nLDR             X0, [X29,#0x70+var_10]                                 ; +0x208, 0x915c44\nLDR             X1, [X21,#off_122EFE8@PAGEOFF]; qword_124B6B0          ; +0x20c, 0x915c48\nSUB             X0, X0, #0x18                                          ; +0x210, 0x915c4c\nCMP             X0, X1                                                 ; +0x214, 0x915c50\nB.EQ            loc_915C60                                             ; +0x218, 0x915c54\nADD             X1, X29, #0x70+var_20                                  ; +0x21c, 0x915c58\nBL              sub_4DCB20                                             ; +0x220, 0x915c5c\nLDR             X0, [X29,#0x70+var_18]                                 ; +0x224, 0x915c60\nLDR             X21, [X21,#off_122EFE8@PAGEOFF]; qword_124B6B0         ; +0x228, 0x915c64\nSUB             X0, X0, #0x18                                          ; +0x22c, 0x915c68\nCMP             X0, X21                                                ; +0x230, 0x915c6c\nB.EQ            loc_915C7C                                             ; +0x234, 0x915c70\nADD             X1, X29, #0x70+var_20                                  ; +0x238, 0x915c74\nBL              sub_4DCB20                                             ; +0x23c, 0x915c78\nMOV             X0, X19                                                ; +0x240, 0x915c7c\nBL              _Unwind_Resume                                         ; +0x244, 0x915c80\nMOV             X19, X0                                                ; +0x248, 0x915c84\nB               loc_915C60                                             ; +0x24c, 0x915c88", "xrefs": ["DailyLevelPage::dailyStatusFinished @ 0x915cb8", "DailyLevelPage::dailyStatusFinished @ 0x915cdc", "<???> @ 0x34698", "DailyLevelPage::init @ 0x914d00", "DailyLevelPage::dailyStatusFinished @ 0x915ce0", "DailyLevelPage::dailyStatusFinished @ 0x915cf0", "<???> @ 0x1229960"], "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"}