{"type": "func", "start": 4295596016, "end": 4295596212, "name": "GameLevelManager::getTimeLeft", "pseudocode": "// \n// GameLevelManager::getTimeLeft from 0x1000997f0 to 0x1000998b4 (196 bytes)\n// \n// 10 xrefs:\n// > AccountLayer::onBackup @ 0x100165e4c\n// > AccountLayer::onSync @ 0x100165fbc\n// > ProfilePage::onUpdate @ 0x1001978ec\n// > ProfilePage::onComment @ 0x10019b584\n// > FRequestProfilePage::onUpdate @ 0x1001b6d2c\n// > MessagesProfilePage::onUpdate @ 0x1001ccbd8\n// > FriendsProfilePage::onUpdate @ 0x1001d954c\n// > LevelLeaderboard::onUpdate @ 0x100250470\n// > InfoLayer::onComment @ 0x100351880\n// > InfoLayer::onRefreshComments @ 0x10035285c\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\nint __fastcall GameLevelManager::getTimeLeft(GameLevelManager *a1, const char *a2, float a3)\n{\n  cocos2d::CCDictionary *m_timerDict; // x19\n  __int64 v5; // x0\n  cocos2d::CCString *v6; // x19\n  double v7; // d9\n  double v8; // d0\n  double v9; // d2\n  bool v10; // cc\n  double v11; // d0\n  timeb v13; // [xsp+8h] [xbp-38h] BYREF\n  char v14; // [xsp+1Fh] [xbp-21h]\n\n  m_timerDict = a1->m_timerDict;\n  sub_100009900(&v13, (char *)a2);\n  v5 = cocos2d::CCDictionary::objectForKey_1(m_timerDict, &v13);\n  v6 = (cocos2d::CCString *)v5;\n  if ( v14 < 0 )\n  {\n    operator delete((void *)v13.time);\n    if ( v6 )\n      goto LABEL_3;\n    return 0;\n  }\n  if ( !v5 )\n    return 0;\nLABEL_3:\n  v7 = cocos2d::CCString::doubleValue(v6);\n  ftime(&v13);\n  v8 = (double)(v13.millitm + 1000 * (unsigned __int64)(v13.time & 0xFFFFF)) / 1000.0 - v7;\n  v9 = a3 - v8;\n  v10 = v8 > a3;\n  v11 = 0.0;\n  if ( v10 )\n    v9 = 0.0;\n  if ( v9 <= a3 )\n    return (int)v9;\n  return (int)v11;\n}", "assembly": "; \n; GameLevelManager::getTimeLeft from 0x1000997f0 to 0x1000998b4 (196 bytes)\n; \n; 10 xrefs:\n; > AccountLayer::onBackup @ 0x100165e4c\n; > AccountLayer::onSync @ 0x100165fbc\n; > ProfilePage::onUpdate @ 0x1001978ec\n; > ProfilePage::onComment @ 0x10019b584\n; > FRequestProfilePage::onUpdate @ 0x1001b6d2c\n; > MessagesProfilePage::onUpdate @ 0x1001ccbd8\n; > FriendsProfilePage::onUpdate @ 0x1001d954c\n; > LevelLeaderboard::onUpdate @ 0x100250470\n; > InfoLayer::onComment @ 0x100351880\n; > InfoLayer::onRefreshComments @ 0x10035285c\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\nSUB             SP, SP, #0x50                                          ; +0x0, 0x1000997f0\nSTP             D9, D8, [SP,#0x40+var_20]                              ; +0x4, 0x1000997f4\nSTP             X20, X19, [SP,#0x40+var_10]                            ; +0x8, 0x1000997f8\nSTP             X29, X30, [SP,#0x40+var_s0]                            ; +0xc, 0x1000997fc\nADD             X29, SP, #0x40                                         ; +0x10, 0x100099800\nFMOV            S8, S0                                                 ; +0x14, 0x100099804\nLDR             X19, [X0,#0x210]                                       ; +0x18, 0x100099808\nADD             X0, SP, #0x40+var_38; int                              ; +0x1c, 0x10009980c\nBL              sub_100009900                                          ; +0x20, 0x100099810\nADD             X1, SP, #0x40+var_38                                   ; +0x24, 0x100099814\nMOV             X0, X19                                                ; +0x28, 0x100099818\nBL              cocos2d__CCDictionary__objectForKey_1                  ; +0x2c, 0x10009981c\nMOV             X19, X0                                                ; +0x30, 0x100099820\nLDRSB           W8, [SP,#0x40+var_21]                                  ; +0x34, 0x100099824\nTBNZ            W8, #0x1F, loc_100099890                               ; +0x38, 0x100099828\nCBZ             X19, loc_10009989C                                     ; +0x3c, 0x10009982c\nMOV             X0, X19                                                ; +0x40, 0x100099830\nBL              cocos2d__CCString__doubleValue                         ; +0x44, 0x100099834\nFMOV            D9, D0                                                 ; +0x48, 0x100099838\nADD             X0, SP, #0x40+var_38; timeb *                          ; +0x4c, 0x10009983c\nBL              _ftime                                                 ; +0x50, 0x100099840\nLDRH            W8, [SP,#0x40+var_38.millitm]                          ; +0x54, 0x100099844\nLDR             X9, [SP,#0x40+var_38]                                  ; +0x58, 0x100099848\nAND             X9, X9, #0xFFFFF                                       ; +0x5c, 0x10009984c\nMOV             W10, #0x3E8                                            ; +0x60, 0x100099850\nUMADDL          X8, W9, W10, X8                                        ; +0x64, 0x100099854\nUCVTF           D0, X8                                                 ; +0x68, 0x100099858\nADRP            X8, #qword_1006356B0@PAGE                              ; +0x6c, 0x10009985c\nLDR             D1, [X8,#qword_1006356B0@PAGEOFF]                      ; +0x70, 0x100099860\nFDIV            D0, D0, D1                                             ; +0x74, 0x100099864\nFSUB            D0, D0, D9                                             ; +0x78, 0x100099868\nFCVT            D1, S8                                                 ; +0x7c, 0x10009986c\nFSUB            D2, D1, D0                                             ; +0x80, 0x100099870\nFCMP            D0, D1                                                 ; +0x84, 0x100099874\nFMOV            D0, XZR                                                ; +0x88, 0x100099878\nFCSEL           D2, D0, D2, HI                                         ; +0x8c, 0x10009987c\nFCMP            D2, D1                                                 ; +0x90, 0x100099880\nFCSEL           D0, D0, D2, GT                                         ; +0x94, 0x100099884\nFCVTZS          W0, D0                                                 ; +0x98, 0x100099888\nB               loc_1000998A0                                          ; +0x9c, 0x10009988c\nLDR             X0, [SP,#0x40+var_38]; __p                             ; +0xa0, 0x100099890\nBL              __ZdlPv; operator delete(void *)                       ; +0xa4, 0x100099894\nCBNZ            X19, loc_100099830                                     ; +0xa8, 0x100099898\nMOV             W0, #0                                                 ; +0xac, 0x10009989c\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0xb0, 0x1000998a0\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0xb4, 0x1000998a4\nLDP             D9, D8, [SP,#0x40+var_20]                              ; +0xb8, 0x1000998a8\nADD             SP, SP, #0x50 ; 'P'                                    ; +0xbc, 0x1000998ac\nRET                                                                    ; +0xc0, 0x1000998b0", "xrefs": ["AccountLayer::onBackup @ 0x100165e4c", "AccountLayer::onSync @ 0x100165fbc", "ProfilePage::onUpdate @ 0x1001978ec", "ProfilePage::onComment @ 0x10019b584", "FRequestProfilePage::onUpdate @ 0x1001b6d2c", "MessagesProfilePage::onUpdate @ 0x1001ccbd8", "FriendsProfilePage::onUpdate @ 0x1001d954c", "LevelLeaderboard::onUpdate @ 0x100250470", "InfoLayer::onComment @ 0x100351880", "InfoLayer::onRefreshComments @ 0x10035285c"], "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"}