{"type": "func", "start": 5371930336, "end": 5371930736, "name": "LevelSearchLayer::toggleTimeNum", "pseudocode": "// \n// LevelSearchLayer::toggleTimeNum from 0x1403126e0 to 0x140312870 (400 bytes)\n// \n// 3 xrefs:\n// > LevelSearchLayer::init @ 0x14030de4c\n// > LevelSearchLayer::clearFilters @ 0x14030e8d8\n// > <???> @ 0x1406d4880\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=2\nvoid LevelSearchLayer::toggleTimeNum(LevelSearchLayer *a1, int a2, bool a3)\n{\n  BOOL v3; // esi\n  cocos2d::CCString *v6; // rax\n  const char *CString; // rax\n  size_t v8; // r8\n  struct cocos2d::CCString *v9; // rax\n  void *v10; // rcx\n  char *p_m_uIndexInArray; // rcx\n  __int16 *v12; // rdx\n  GameLevelManager *v13; // rcx\n  __int16 v14; // [rsp+20h] [rbp-58h] BYREF\n  char v15; // [rsp+22h] [rbp-56h]\n  _WORD v16[2]; // [rsp+24h] [rbp-54h] BYREF\n  void *v17; // [rsp+28h] [rbp-50h]\n  void *Block[2]; // [rsp+30h] [rbp-48h] BYREF\n  __int64 v19; // [rsp+40h] [rbp-38h]\n  unsigned __int64 v20; // [rsp+48h] [rbp-30h]\n\n  v3 = a3;\n  if ( a1->m_type != 1 )\n  {\n    v6 = cocos2d::CCString::createWithFormat(\"T%i\", a2);\n    CString = cocos2d::CCString::getCString(v6);\n    *(_OWORD *)Block = 0;\n    v19 = 0;\n    v20 = 0;\n    v8 = -1;\n    do\n      ++v8;\n    while ( CString[v8] );\n    sub_14003A930(Block, CString, v8);\n    v9 = cocos2d::CCString::createWithFormat(\"%i\", v3);\n    cocos2d::CCDictionary::setObject(a1->m_difficultyDict, v9, Block);\n    if ( v20 > 0xF )\n    {\n      v10 = Block[0];\n      if ( v20 + 1 >= 0x1000 )\n      {\n        v10 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v10 - 8) > 0x1F )\n          invalid_parameter_noinfo_noreturn();\n      }\n      j_j_free(v10);\n    }\n    p_m_uIndexInArray = (char *)&cocos2d::CCArray::objectAtIndex(a1->m_lengthSprites, a2)[6].m_uIndexInArray;\n    if ( v3 )\n    {\n      v14 = -1;\n      v15 = -1;\n      v12 = &v14;\n    }\n    else\n    {\n      v14 = 32125;\n      memset(v16, 125, 3);\n      v12 = v16;\n    }\n    (**(void (__fastcall ***)(char *, __int16 *))p_m_uIndexInArray)(p_m_uIndexInArray, v12);\n    v13 = (GameLevelManager *)qword_1406C2EC0;\n    if ( !qword_1406C2EC0 )\n    {\n      v17 = operator new(0x3D0u);\n      qword_1406C2EC0 = sub_140141280((__int64)v17);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n      v13 = (GameLevelManager *)qword_1406C2EC0;\n    }\n    GameLevelManager::setLenVal(v13, a2, v3);\n  }\n}", "assembly": "; \n; LevelSearchLayer::toggleTimeNum from 0x1403126e0 to 0x140312870 (400 bytes)\n; \n; 3 xrefs:\n; > LevelSearchLayer::init @ 0x14030de4c\n; > LevelSearchLayer::clearFilters @ 0x14030e8d8\n; > <???> @ 0x1406d4880\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, 0x1403126e0\npush    rsi                                                            ; +0x2, 0x1403126e2\npush    rdi                                                            ; +0x3, 0x1403126e3\nsub     rsp, 60h                                                       ; +0x4, 0x1403126e4\nmov     rax, cs:__security_cookie                                      ; +0x8, 0x1403126e8\nxor     rax, rsp                                                       ; +0xf, 0x1403126ef\nmov     [rsp+78h+var_28], rax                                          ; +0x12, 0x1403126f2\nmovzx   esi, r8b                                                       ; +0x17, 0x1403126f7\nmov     ebx, edx                                                       ; +0x1b, 0x1403126fb\nmov     rdi, rcx                                                       ; +0x1d, 0x1403126fd\ncmp     dword ptr [rcx+1B0h], 1                                        ; +0x20, 0x140312700\njz      loc_14031285B                                                  ; +0x27, 0x140312707\nlea     rcx, aTI; \"T%i\"                                                ; +0x2d, 0x14031270d\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x34, 0x140312714\nmov     rcx, rax                                                       ; +0x3a, 0x14031271a\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x3d, 0x14031271d\nxorps   xmm0, xmm0                                                     ; +0x43, 0x140312723\nmovups  xmmword ptr [rsp+78h+Block], xmm0                              ; +0x46, 0x140312726\nxor     ecx, ecx                                                       ; +0x4b, 0x14031272b\nmov     [rsp+78h+var_38], rcx                                          ; +0x4d, 0x14031272d\nmov     [rsp+78h+var_30], rcx                                          ; +0x52, 0x140312732\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x57, 0x140312737\nxchg    ax, ax                                                         ; +0x5e, 0x14031273e\ninc     r8                                                             ; +0x60, 0x140312740\ncmp     [rax+r8], cl                                                   ; +0x63, 0x140312743\njnz     short loc_140312740                                            ; +0x67, 0x140312747\nmov     rdx, rax                                                       ; +0x69, 0x140312749\nlea     rcx, [rsp+78h+Block]                                           ; +0x6c, 0x14031274c\ncall    sub_14003A930                                                  ; +0x71, 0x140312751\nnop                                                                    ; +0x76, 0x140312756\nmov     edx, esi                                                       ; +0x77, 0x140312757\nlea     rcx, aI_11; \"%i\"                                               ; +0x79, 0x140312759\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x80, 0x140312760\nmov     rdx, rax                                                       ; +0x86, 0x140312766\nlea     r8, [rsp+78h+Block]                                            ; +0x89, 0x140312769\nmov     rcx, [rdi+1D8h]                                                ; +0x8e, 0x14031276e\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 &) ; +0x95, 0x140312775\nnop                                                                    ; +0x9b, 0x14031277b\nmov     rdx, [rsp+78h+var_30]                                          ; +0x9c, 0x14031277c\ncmp     rdx, 0Fh                                                       ; +0xa1, 0x140312781\njbe     short loc_1403127BC                                            ; +0xa5, 0x140312785\ninc     rdx                                                            ; +0xa7, 0x140312787\nmov     rcx, [rsp+78h+Block]; Block                                    ; +0xaa, 0x14031278a\nmov     rax, rcx                                                       ; +0xaf, 0x14031278f\ncmp     rdx, 1000h                                                     ; +0xb2, 0x140312792\njb      short loc_1403127B7                                            ; +0xb9, 0x140312799\nadd     rdx, 27h ; '''                                                 ; +0xbb, 0x14031279b\nmov     rcx, [rcx-8]                                                   ; +0xbf, 0x14031279f\nsub     rax, rcx                                                       ; +0xc3, 0x1403127a3\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xc6, 0x1403127a6\ncmp     rax, 1Fh                                                       ; +0xca, 0x1403127aa\njbe     short loc_1403127B7                                            ; +0xce, 0x1403127ae\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xd0, 0x1403127b0\ndb 0CCh                                                                ; +0xd6, 0x1403127b6\ncall    j_j_free                                                       ; +0xd7, 0x1403127b7\nmov     edx, ebx                                                       ; +0xdc, 0x1403127bc\nmov     rcx, [rdi+1D0h]                                                ; +0xde, 0x1403127be\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xe5, 0x1403127c5\nlea     rcx, [rax+170h]                                                ; +0xeb, 0x1403127cb\ntest    sil, sil                                                       ; +0xf2, 0x1403127d2\njz      short loc_1403127F4                                            ; +0xf5, 0x1403127d5\nmov     [rsp+78h+var_58], 0FFFFh                                       ; +0xf7, 0x1403127d7\nmovzx   eax, [rsp+78h+var_58]                                          ; +0xfe, 0x1403127de\nmov     [rsp+78h+var_58], ax                                           ; +0x103, 0x1403127e3\nmov     [rsp+78h+var_56], 0FFh                                         ; +0x108, 0x1403127e8\nlea     rdx, [rsp+78h+var_58]                                          ; +0x10d, 0x1403127ed\njmp     short loc_14031280F                                            ; +0x112, 0x1403127f2\nmov     [rsp+78h+var_58], 7D7Dh                                        ; +0x114, 0x1403127f4\nmovzx   eax, [rsp+78h+var_58]                                          ; +0x11b, 0x1403127fb\nmov     [rsp+78h+var_54], ax                                           ; +0x120, 0x140312800\nmov     [rsp+78h+var_52], 7Dh ; '}'                                    ; +0x125, 0x140312805\nlea     rdx, [rsp+78h+var_54]                                          ; +0x12a, 0x14031280a\nmov     rax, [rcx]                                                     ; +0x12f, 0x14031280f\ncall    qword ptr [rax]                                                ; +0x132, 0x140312812\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x134, 0x140312814\ntest    rcx, rcx                                                       ; +0x13b, 0x14031281b\njnz     short loc_140312850                                            ; +0x13e, 0x14031281e\nmov     ecx, 3D0h; Size                                                ; +0x140, 0x140312820\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x145, 0x140312825\nmov     [rsp+78h+var_50], rax                                          ; +0x14a, 0x14031282a\nmov     rcx, rax                                                       ; +0x14f, 0x14031282f\ncall    sub_140141280                                                  ; +0x152, 0x140312832\nnop                                                                    ; +0x157, 0x140312837\nmov     cs:qword_1406C2EC0, rax                                        ; +0x158, 0x140312838\nmov     r9, [rax]                                                      ; +0x15f, 0x14031283f\nmov     rcx, rax                                                       ; +0x162, 0x140312842\ncall    qword ptr [r9+48h]                                             ; +0x165, 0x140312845\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x169, 0x140312849\nmovzx   r8d, sil                                                       ; +0x170, 0x140312850\nmov     edx, ebx                                                       ; +0x174, 0x140312854\ncall    GameLevelManager__setLenVal                                    ; +0x176, 0x140312856\nmov     rcx, [rsp+78h+var_28]                                          ; +0x17b, 0x14031285b\nxor     rcx, rsp; StackCookie                                          ; +0x180, 0x140312860\ncall    __security_check_cookie                                        ; +0x183, 0x140312863\nadd     rsp, 60h                                                       ; +0x188, 0x140312868\npop     rdi                                                            ; +0x18c, 0x14031286c\npop     rsi                                                            ; +0x18d, 0x14031286d\npop     rbx                                                            ; +0x18e, 0x14031286e\nretn                                                                   ; +0x18f, 0x14031286f", "xrefs": ["LevelSearchLayer::init @ 0x14030de4c", "LevelSearchLayer::clearFilters @ 0x14030e8d8", "<???> @ 0x1406d4880"], "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"}