{"type": "func", "start": 5370060176, "end": 5370060485, "name": "GameLevelManager::isTimeValid", "pseudocode": "// \n// GameLevelManager::isTimeValid from 0x140149d90 to 0x140149ec5 (309 bytes)\n// \n// 4 xrefs:\n// > GameLevelManager::getStoredOnlineLevels @ 0x1401498a7\n// > GameLevelManager::getStoredLevelComments @ 0x14015d9d7\n// > LevelInfoLayer::onUpdate @ 0x1402fed84\n// > <???> @ 0x1406ca6f8\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\n// Hidden C++ exception states: #wind=1\nbool GameLevelManager::isTimeValid(GameLevelManager *a1, const char *a2, float a3)\n{\n  size_t v4; // r8\n  cocos2d::CCString *v5; // rbx\n  void *v6; // rcx\n  double v7; // xmm0_8\n  void *Block[2]; // [rsp+20h] [rbp-58h] BYREF\n  __m128i si128; // [rsp+30h] [rbp-48h]\n\n  *(_OWORD *)Block = 0;\n  si128 = 0;\n  v4 = -1;\n  do\n    ++v4;\n  while ( a2[v4] );\n  sub_14003A930(Block, a2, v4);\n  v5 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(a1->m_timerDict, Block);\n  if ( si128.m128i_i64[1] > 0xFuLL )\n  {\n    v6 = Block[0];\n    if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )\n    {\n      v6 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v6);\n  }\n  si128 = _mm_load_si128((const __m128i *)&xmmword_140623F30);\n  LOBYTE(Block[0]) = 0;\n  if ( !v5 )\n    return 0;\n  v7 = cocos2d::CCString::doubleValue(v5);\n  ftime64((struct __timeb64 *)Block);\n  return a3 >= (double)(LOWORD(Block[1]) + 1000 * ((__int64)Block[0] & 0xFFFFF)) / 1000.0 - v7;\n}", "assembly": "; \n; GameLevelManager::isTimeValid from 0x140149d90 to 0x140149ec5 (309 bytes)\n; \n; 4 xrefs:\n; > GameLevelManager::getStoredOnlineLevels @ 0x1401498a7\n; > GameLevelManager::getStoredLevelComments @ 0x14015d9d7\n; > LevelInfoLayer::onUpdate @ 0x1402fed84\n; > <???> @ 0x1406ca6f8\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    rbx                                                            ; +0x0, 0x140149d90\nsub     rsp, 70h                                                       ; +0x2, 0x140149d92\nmovaps  [rsp+78h+var_18], xmm6                                         ; +0x6, 0x140149d96\nmovaps  [rsp+78h+var_28], xmm7                                         ; +0xb, 0x140149d9b\nmov     rax, cs:__security_cookie                                      ; +0x10, 0x140149da0\nxor     rax, rsp                                                       ; +0x17, 0x140149da7\nmov     [rsp+78h+var_38], rax                                          ; +0x1a, 0x140149daa\nmovaps  xmm7, xmm2                                                     ; +0x1f, 0x140149daf\nmov     rbx, rcx                                                       ; +0x22, 0x140149db2\nxorps   xmm0, xmm0                                                     ; +0x25, 0x140149db5\nmovups  xmmword ptr [rsp+78h+Block], xmm0                              ; +0x28, 0x140149db8\nxorps   xmm1, xmm1                                                     ; +0x2d, 0x140149dbd\nmovdqu  [rsp+78h+var_48], xmm1                                         ; +0x30, 0x140149dc0\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x36, 0x140149dc6\nnop     dword ptr [rax]                                                ; +0x3d, 0x140149dcd\ninc     r8                                                             ; +0x40, 0x140149dd0\ncmp     byte ptr [rdx+r8], 0                                           ; +0x43, 0x140149dd3\njnz     short loc_140149DD0                                            ; +0x48, 0x140149dd8\nlea     rcx, [rsp+78h+Block]                                           ; +0x4a, 0x140149dda\ncall    sub_14003A930                                                  ; +0x4f, 0x140149ddf\nnop                                                                    ; +0x54, 0x140149de4\nlea     rdx, [rsp+78h+Block]                                           ; +0x55, 0x140149de5\nmov     rcx, [rbx+200h]                                                ; +0x5a, 0x140149dea\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::objectForKey(std::string const &) ; +0x61, 0x140149df1\nmov     rbx, rax                                                       ; +0x67, 0x140149df7\nmov     rdx, qword ptr [rsp+78h+var_48+8]                              ; +0x6a, 0x140149dfa\ncmp     rdx, 0Fh                                                       ; +0x6f, 0x140149dff\njbe     short loc_140149E3A                                            ; +0x73, 0x140149e03\ninc     rdx                                                            ; +0x75, 0x140149e05\nmov     rcx, [rsp+78h+Block]; Block                                    ; +0x78, 0x140149e08\nmov     rax, rcx                                                       ; +0x7d, 0x140149e0d\ncmp     rdx, 1000h                                                     ; +0x80, 0x140149e10\njb      short loc_140149E35                                            ; +0x87, 0x140149e17\nadd     rdx, 27h ; '''                                                 ; +0x89, 0x140149e19\nmov     rcx, [rcx-8]                                                   ; +0x8d, 0x140149e1d\nsub     rax, rcx                                                       ; +0x91, 0x140149e21\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x94, 0x140149e24\ncmp     rax, 1Fh                                                       ; +0x98, 0x140149e28\njbe     short loc_140149E35                                            ; +0x9c, 0x140149e2c\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x9e, 0x140149e2e\ndb 0CCh                                                                ; +0xa4, 0x140149e34\ncall    j_j_free                                                       ; +0xa5, 0x140149e35\nmovdqa  xmm0, cs:xmmword_140623F30                                     ; +0xaa, 0x140149e3a\nmovdqu  [rsp+78h+var_48], xmm0                                         ; +0xb2, 0x140149e42\nmov     byte ptr [rsp+78h+Block], 0                                    ; +0xb8, 0x140149e48\ntest    rbx, rbx                                                       ; +0xbd, 0x140149e4d\njz      short loc_140149EA6                                            ; +0xc0, 0x140149e50\nmov     rcx, rbx                                                       ; +0xc2, 0x140149e52\ncall    cs:?doubleValue@CCString@cocos2d@@QEBANXZ; cocos2d::CCString::doubleValue(void) ; +0xc5, 0x140149e55\nmovaps  xmm6, xmm0                                                     ; +0xcb, 0x140149e5b\nlea     rcx, [rsp+78h+Block]; Time                                     ; +0xce, 0x140149e5e\ncall    cs:_ftime64                                                    ; +0xd3, 0x140149e63\nmov     rax, [rsp+78h+Block]                                           ; +0xd9, 0x140149e69\nand     eax, 0FFFFFh                                                   ; +0xde, 0x140149e6e\nimul    rcx, rax, 3E8h                                                 ; +0xe3, 0x140149e73\nmovzx   eax, word ptr [rsp+78h+Block+8]                                ; +0xea, 0x140149e7a\nadd     rcx, rax                                                       ; +0xef, 0x140149e7f\nxorps   xmm1, xmm1                                                     ; +0xf2, 0x140149e82\ncvtsi2sd xmm1, rcx                                                     ; +0xf5, 0x140149e85\ndivsd   xmm1, cs:qword_140623000                                       ; +0xfa, 0x140149e8a\nsubsd   xmm1, xmm6                                                     ; +0x102, 0x140149e92\nxorps   xmm0, xmm0                                                     ; +0x106, 0x140149e96\ncvtss2sd xmm0, xmm7                                                    ; +0x109, 0x140149e99\ncomisd  xmm0, xmm1                                                     ; +0x10d, 0x140149e9d\nsetnb   al                                                             ; +0x111, 0x140149ea1\njmp     short loc_140149EA8                                            ; +0x114, 0x140149ea4\nxor     al, al                                                         ; +0x116, 0x140149ea6\nmov     rcx, [rsp+78h+var_38]                                          ; +0x118, 0x140149ea8\nxor     rcx, rsp; StackCookie                                          ; +0x11d, 0x140149ead\ncall    __security_check_cookie                                        ; +0x120, 0x140149eb0\nmovaps  xmm6, [rsp+78h+var_18]                                         ; +0x125, 0x140149eb5\nmovaps  xmm7, [rsp+78h+var_28]                                         ; +0x12a, 0x140149eba\nadd     rsp, 70h                                                       ; +0x12f, 0x140149ebf\npop     rbx                                                            ; +0x133, 0x140149ec3\nretn                                                                   ; +0x134, 0x140149ec4", "xrefs": ["GameLevelManager::getStoredOnlineLevels @ 0x1401498a7", "GameLevelManager::getStoredLevelComments @ 0x14015d9d7", "LevelInfoLayer::onUpdate @ 0x1402fed84", "<???> @ 0x1406ca6f8"], "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"}