{"type": "func", "start": 5373145616, "end": 5373146070, "name": "LevelSearchLayer::toggleTime", "pseudocode": "// \n// LevelSearchLayer::toggleTime from 0x14043b210 to 0x14043b3d6 (454 bytes)\n// \n// 2 xrefs:\n// > LevelSearchLayer::init @ 0x140435d71\n// > <???> @ 0x140926f30\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:32:19 +0000\n// \n\n// Hidden C++ exception states: #wind=2\nvoid __fastcall LevelSearchLayer::toggleTime(__int64 a1, __int64 a2)\n{\n  unsigned int v3; // esi\n  BOOL v4; // edi\n  cocos2d::CCString *v5; // rax\n  const char *CString; // rax\n  size_t v7; // r8\n  __int64 v8; // rbx\n  struct cocos2d::CCString *v9; // rax\n  void *v10; // rcx\n  char *v11; // rcx\n  void (__fastcall *v12)(char *, __int16 *); // r8\n  __int16 *v13; // rdx\n  __int64 v14; // rcx\n  __int16 v15; // [rsp+30h] [rbp-58h] BYREF\n  char v16; // [rsp+32h] [rbp-56h]\n  _WORD v17[2]; // [rsp+34h] [rbp-54h] BYREF\n  void *v18; // [rsp+38h] [rbp-50h]\n  void *Block[2]; // [rsp+40h] [rbp-48h] BYREF\n  __int64 v20; // [rsp+50h] [rbp-38h]\n  unsigned __int64 v21; // [rsp+58h] [rbp-30h]\n\n  v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);\n  v4 = !LevelSearchLayer::checkTime(a1);\n  v5 = cocos2d::CCString::createWithFormat(\"T%i\", v3);\n  CString = cocos2d::CCString::getCString(v5);\n  *(_OWORD *)Block = 0;\n  v20 = 0;\n  v21 = 0;\n  v7 = -1;\n  do\n    ++v7;\n  while ( CString[v7] );\n  sub_14003D230(Block, CString, v7);\n  v8 = *(_QWORD *)(a1 + 480);\n  v9 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v4);\n  cocos2d::CCDictionary::setObject(v8, v9, Block);\n  if ( v21 > 0xF )\n  {\n    v10 = Block[0];\n    if ( v21 + 1 >= 0x1000 )\n    {\n      v10 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v10 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free(v10);\n  }\n  v11 = (char *)cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 472), v3) + 368;\n  v12 = **(void (__fastcall ***)(char *, __int16 *))v11;\n  if ( v4 )\n  {\n    v15 = -1;\n    v16 = -1;\n    v13 = &v15;\n  }\n  else\n  {\n    v15 = 32125;\n    memset(v17, 125, 3);\n    v13 = v17;\n  }\n  v12(v11, v13);\n  v14 = *(_QWORD *)&qword_14090BFB0;\n  if ( !*(_QWORD *)&qword_14090BFB0 )\n  {\n    v18 = operator new(0x690u);\n    *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v18);\n    (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n    v14 = *(_QWORD *)&qword_14090BFB0;\n  }\n  GameLevelManager::setLenVal(v14, v3, v4);\n}", "assembly": "; \n; LevelSearchLayer::toggleTime from 0x14043b210 to 0x14043b3d6 (454 bytes)\n; \n; 2 xrefs:\n; > LevelSearchLayer::init @ 0x140435d71\n; > <???> @ 0x140926f30\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:32:19 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x14043b210\npush    rbp                                                            ; +0x5, 0x14043b215\npush    rsi                                                            ; +0x6, 0x14043b216\npush    rdi                                                            ; +0x7, 0x14043b217\nsub     rsp, 70h                                                       ; +0x8, 0x14043b218\nmov     rax, cs:__security_cookie                                      ; +0xc, 0x14043b21c\nxor     rax, rsp                                                       ; +0x13, 0x14043b223\nmov     [rsp+88h+var_28], rax                                          ; +0x16, 0x14043b226\nmov     rbp, rcx                                                       ; +0x1b, 0x14043b22b\nmov     rax, [rdx]                                                     ; +0x1e, 0x14043b22e\nmov     rcx, rdx                                                       ; +0x21, 0x14043b231\ncall    qword ptr [rax+38h]                                            ; +0x24, 0x14043b234\nmov     esi, eax                                                       ; +0x27, 0x14043b237\nmov     edx, eax                                                       ; +0x29, 0x14043b239\nmov     rcx, rbp                                                       ; +0x2b, 0x14043b23b\ncall    LevelSearchLayer__checkTime                                    ; +0x2e, 0x14043b23e\nxor     al, 1                                                          ; +0x33, 0x14043b243\nmovzx   edi, al                                                        ; +0x35, 0x14043b245\nmov     edx, esi                                                       ; +0x38, 0x14043b248\nlea     rcx, aTI; \"T%i\"                                                ; +0x3a, 0x14043b24a\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x41, 0x14043b251\nmov     rcx, rax                                                       ; +0x47, 0x14043b257\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x4a, 0x14043b25a\nxorps   xmm0, xmm0                                                     ; +0x50, 0x14043b260\nmovups  xmmword ptr [rsp+88h+Block], xmm0                              ; +0x53, 0x14043b263\nmov     [rsp+88h+var_38], 0                                            ; +0x58, 0x14043b268\nmov     [rsp+88h+var_30], 0                                            ; +0x61, 0x14043b271\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x6a, 0x14043b27a\ninc     r8                                                             ; +0x71, 0x14043b281\ncmp     byte ptr [rax+r8], 0                                           ; +0x74, 0x14043b284\njnz     short loc_14043B281                                            ; +0x79, 0x14043b289\nmov     rdx, rax                                                       ; +0x7b, 0x14043b28b\nlea     rcx, [rsp+88h+Block]                                           ; +0x7e, 0x14043b28e\ncall    sub_14003D230                                                  ; +0x83, 0x14043b293\nnop                                                                    ; +0x88, 0x14043b298\nmov     rbx, [rbp+1E0h]                                                ; +0x89, 0x14043b299\nmov     edx, edi                                                       ; +0x90, 0x14043b2a0\nlea     rcx, word_1406ED6F8                                            ; +0x92, 0x14043b2a2\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x99, 0x14043b2a9\nmov     rdx, rax                                                       ; +0x9f, 0x14043b2af\nlea     r8, [rsp+88h+Block]                                            ; +0xa2, 0x14043b2b2\nmov     rcx, rbx                                                       ; +0xa7, 0x14043b2b7\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,std::string const &) ; +0xaa, 0x14043b2ba\nnop                                                                    ; +0xb0, 0x14043b2c0\nmov     rdx, [rsp+88h+var_30]                                          ; +0xb1, 0x14043b2c1\ncmp     rdx, 0Fh                                                       ; +0xb6, 0x14043b2c6\njbe     short loc_14043B314                                            ; +0xba, 0x14043b2ca\ninc     rdx                                                            ; +0xbc, 0x14043b2cc\nmov     rcx, [rsp+88h+Block]; Block                                    ; +0xbf, 0x14043b2cf\nmov     rax, rcx                                                       ; +0xc4, 0x14043b2d4\ncmp     rdx, 1000h                                                     ; +0xc7, 0x14043b2d7\njb      short loc_14043B30F                                            ; +0xce, 0x14043b2de\nadd     rdx, 27h ; '''                                                 ; +0xd0, 0x14043b2e0\nmov     rcx, [rcx-8]                                                   ; +0xd4, 0x14043b2e4\nsub     rax, rcx                                                       ; +0xd8, 0x14043b2e8\nsub     rax, 8                                                         ; +0xdb, 0x14043b2eb\ncmp     rax, 1Fh                                                       ; +0xdf, 0x14043b2ef\njbe     short loc_14043B30F                                            ; +0xe3, 0x14043b2f3\nmov     [rsp+88h+Reserved], 0; Reserved                                ; +0xe5, 0x14043b2f5\nxor     r9d, r9d; LineNo                                               ; +0xee, 0x14043b2fe\nxor     r8d, r8d; FileName                                             ; +0xf1, 0x14043b301\nxor     edx, edx; FunctionName                                         ; +0xf4, 0x14043b304\nxor     ecx, ecx; Expression                                           ; +0xf6, 0x14043b306\ncall    cs:_invoke_watson                                              ; +0xf8, 0x14043b308\ndb 0CCh                                                                ; +0xfe, 0x14043b30e\ncall    j_j_free                                                       ; +0xff, 0x14043b30f\nmov     edx, esi                                                       ; +0x104, 0x14043b314\nmov     rcx, [rbp+1D8h]                                                ; +0x106, 0x14043b316\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x10d, 0x14043b31d\nlea     rcx, [rax+170h]                                                ; +0x113, 0x14043b323\nmov     rax, [rcx]                                                     ; +0x11a, 0x14043b32a\nmov     r8, [rax]                                                      ; +0x11d, 0x14043b32d\ntest    dil, dil                                                       ; +0x120, 0x14043b330\njz      short loc_14043B352                                            ; +0x123, 0x14043b333\nmov     [rsp+88h+var_58], 0FFFFh                                       ; +0x125, 0x14043b335\nmovzx   eax, [rsp+88h+var_58]                                          ; +0x12c, 0x14043b33c\nmov     [rsp+88h+var_58], ax                                           ; +0x131, 0x14043b341\nmov     [rsp+88h+var_56], 0FFh                                         ; +0x136, 0x14043b346\nlea     rdx, [rsp+88h+var_58]                                          ; +0x13b, 0x14043b34b\njmp     short loc_14043B36D                                            ; +0x140, 0x14043b350\nmov     [rsp+88h+var_58], 7D7Dh                                        ; +0x142, 0x14043b352\nmovzx   eax, [rsp+88h+var_58]                                          ; +0x149, 0x14043b359\nmov     [rsp+88h+var_54], ax                                           ; +0x14e, 0x14043b35e\nmov     [rsp+88h+var_52], 7Dh ; '}'                                    ; +0x153, 0x14043b363\nlea     rdx, [rsp+88h+var_54]                                          ; +0x158, 0x14043b368\ncall    r8                                                             ; +0x15d, 0x14043b36d\nmov     rcx, cs:qword_14090BFB0                                        ; +0x160, 0x14043b370\ntest    rcx, rcx                                                       ; +0x167, 0x14043b377\njnz     short loc_14043B3AE                                            ; +0x16a, 0x14043b37a\nmov     ecx, 690h; Size                                                ; +0x16c, 0x14043b37c\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x171, 0x14043b381\nmov     [rsp+88h+var_50], rax                                          ; +0x176, 0x14043b386\nmov     rcx, rax                                                       ; +0x17b, 0x14043b38b\ncall    GameLevelManager__GameLevelManager                             ; +0x17e, 0x14043b38e\nnop                                                                    ; +0x183, 0x14043b393\nmov     cs:qword_14090BFB0, rax                                        ; +0x184, 0x14043b394\nmov     rcx, [rax]                                                     ; +0x18b, 0x14043b39b\nmov     rdx, [rcx+48h]                                                 ; +0x18e, 0x14043b39e\nmov     rcx, rax                                                       ; +0x192, 0x14043b3a2\ncall    rdx                                                            ; +0x195, 0x14043b3a5\nmov     rcx, cs:qword_14090BFB0                                        ; +0x197, 0x14043b3a7\nmovzx   r8d, dil                                                       ; +0x19e, 0x14043b3ae\nmov     edx, esi                                                       ; +0x1a2, 0x14043b3b2\ncall    GameLevelManager__setLenVal                                    ; +0x1a4, 0x14043b3b4\nmov     rcx, [rsp+88h+var_28]                                          ; +0x1a9, 0x14043b3b9\nxor     rcx, rsp; StackCookie                                          ; +0x1ae, 0x14043b3be\ncall    __security_check_cookie                                        ; +0x1b1, 0x14043b3c1\nmov     rbx, [rsp+88h+arg_10]                                          ; +0x1b6, 0x14043b3c6\nadd     rsp, 70h                                                       ; +0x1be, 0x14043b3ce\npop     rdi                                                            ; +0x1c2, 0x14043b3d2\npop     rsi                                                            ; +0x1c3, 0x14043b3d3\npop     rbp                                                            ; +0x1c4, 0x14043b3d4\nretn                                                                   ; +0x1c5, 0x14043b3d5", "xrefs": ["LevelSearchLayer::init @ 0x140435d71", "<???> @ 0x140926f30"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}