{"type": "func", "start": 5370194032, "end": 5370194261, "name": "GameLevelManager::setLenVal", "pseudocode": "// \n// GameLevelManager::setLenVal from 0x14016a870 to 0x14016a955 (229 bytes)\n// \n// 3 xrefs:\n// > LevelSearchLayer::toggleTime @ 0x1403126b9\n// > LevelSearchLayer::toggleTimeNum @ 0x140312856\n// > <???> @ 0x1406cad64\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 GameLevelManager::setLenVal(GameLevelManager *a1, int a2, bool a3)\n{\n  BOOL v3; // edi\n  cocos2d::CCString *v5; // rax\n  const char *CString; // rax\n  size_t v7; // r8\n  struct cocos2d::CCString *v8; // rax\n  void *v9; // rcx\n  void *Block[2]; // [rsp+20h] [rbp-38h] BYREF\n  __int128 v11; // [rsp+30h] [rbp-28h]\n\n  v3 = a3;\n  v5 = cocos2d::CCString::createWithFormat(\"Len%i\", a2);\n  CString = cocos2d::CCString::getCString(v5);\n  *(_OWORD *)Block = 0;\n  v11 = 0;\n  v7 = -1;\n  do\n    ++v7;\n  while ( CString[v7] );\n  sub_14003A930(Block, CString, v7);\n  v8 = cocos2d::CCString::createWithFormat(\"%i\", v3);\n  cocos2d::CCDictionary::setObject(a1->m_searchFilters, v8, Block);\n  if ( *((_QWORD *)&v11 + 1) > 0xFu )\n  {\n    v9 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v11 + 1) + 1LL) >= 0x1000 )\n    {\n      v9 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v9 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v9);\n  }\n}", "assembly": "; \n; GameLevelManager::setLenVal from 0x14016a870 to 0x14016a955 (229 bytes)\n; \n; 3 xrefs:\n; > LevelSearchLayer::toggleTime @ 0x1403126b9\n; > LevelSearchLayer::toggleTimeNum @ 0x140312856\n; > <???> @ 0x1406cad64\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\nmov     [rsp+arg_18], rbx                                              ; +0x0, 0x14016a870\npush    rdi                                                            ; +0x5, 0x14016a875\nsub     rsp, 50h                                                       ; +0x6, 0x14016a876\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x14016a87a\nxor     rax, rsp                                                       ; +0x11, 0x14016a881\nmov     [rsp+58h+var_18], rax                                          ; +0x14, 0x14016a884\nmovzx   edi, r8b                                                       ; +0x19, 0x14016a889\nmov     rbx, rcx                                                       ; +0x1d, 0x14016a88d\nlea     rcx, aLenI; \"Len%i\"                                            ; +0x20, 0x14016a890\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x27, 0x14016a897\nmov     rcx, rax                                                       ; +0x2d, 0x14016a89d\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x30, 0x14016a8a0\nxorps   xmm0, xmm0                                                     ; +0x36, 0x14016a8a6\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x39, 0x14016a8a9\nxorps   xmm1, xmm1                                                     ; +0x3e, 0x14016a8ae\nmovdqu  [rsp+58h+var_28], xmm1                                         ; +0x41, 0x14016a8b1\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x47, 0x14016a8b7\nxchg    ax, ax                                                         ; +0x4e, 0x14016a8be\ninc     r8                                                             ; +0x50, 0x14016a8c0\ncmp     byte ptr [rax+r8], 0                                           ; +0x53, 0x14016a8c3\njnz     short loc_14016A8C0                                            ; +0x58, 0x14016a8c8\nmov     rdx, rax                                                       ; +0x5a, 0x14016a8ca\nlea     rcx, [rsp+58h+Block]                                           ; +0x5d, 0x14016a8cd\ncall    sub_14003A930                                                  ; +0x62, 0x14016a8d2\nnop                                                                    ; +0x67, 0x14016a8d7\nmov     edx, edi                                                       ; +0x68, 0x14016a8d8\nlea     rcx, aI_11; \"%i\"                                               ; +0x6a, 0x14016a8da\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x71, 0x14016a8e1\nmov     rdx, rax                                                       ; +0x77, 0x14016a8e7\nlea     r8, [rsp+58h+Block]                                            ; +0x7a, 0x14016a8ea\nmov     rcx, [rbx+158h]                                                ; +0x7f, 0x14016a8ef\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 &) ; +0x86, 0x14016a8f6\nnop                                                                    ; +0x8c, 0x14016a8fc\nmov     rdx, qword ptr [rsp+58h+var_28+8]                              ; +0x8d, 0x14016a8fd\ncmp     rdx, 0Fh                                                       ; +0x92, 0x14016a902\njbe     short loc_14016A93D                                            ; +0x96, 0x14016a906\ninc     rdx                                                            ; +0x98, 0x14016a908\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0x9b, 0x14016a90b\nmov     rax, rcx                                                       ; +0xa0, 0x14016a910\ncmp     rdx, 1000h                                                     ; +0xa3, 0x14016a913\njb      short loc_14016A938                                            ; +0xaa, 0x14016a91a\nadd     rdx, 27h ; '''                                                 ; +0xac, 0x14016a91c\nmov     rcx, [rcx-8]                                                   ; +0xb0, 0x14016a920\nsub     rax, rcx                                                       ; +0xb4, 0x14016a924\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xb7, 0x14016a927\ncmp     rax, 1Fh                                                       ; +0xbb, 0x14016a92b\njbe     short loc_14016A938                                            ; +0xbf, 0x14016a92f\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xc1, 0x14016a931\nalign 8                                                                ; +0xc7, 0x14016a937\ncall    j_j_free                                                       ; +0xc8, 0x14016a938\nmov     rcx, [rsp+58h+var_18]                                          ; +0xcd, 0x14016a93d\nxor     rcx, rsp; StackCookie                                          ; +0xd2, 0x14016a942\ncall    __security_check_cookie                                        ; +0xd5, 0x14016a945\nmov     rbx, [rsp+58h+arg_18]                                          ; +0xda, 0x14016a94a\nadd     rsp, 50h                                                       ; +0xdf, 0x14016a94f\npop     rdi                                                            ; +0xe3, 0x14016a953\nretn                                                                   ; +0xe4, 0x14016a954", "xrefs": ["LevelSearchLayer::toggleTime @ 0x1403126b9", "LevelSearchLayer::toggleTimeNum @ 0x140312856", "<???> @ 0x1406cad64"], "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"}