{"type": "func", "start": 5370193792, "end": 5370194021, "name": "GameLevelManager::setDiffVal", "pseudocode": "// \n// GameLevelManager::setDiffVal from 0x14016a780 to 0x14016a865 (229 bytes)\n// \n// 3 xrefs:\n// > LevelSearchLayer::toggleDifficulty @ 0x1403121d3\n// > LevelSearchLayer::toggleDifficultyNum @ 0x140312436\n// > <???> @ 0x1406cad58\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\nvoid GameLevelManager::setDiffVal(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(\"Diff%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::setDiffVal from 0x14016a780 to 0x14016a865 (229 bytes)\n; \n; 3 xrefs:\n; > LevelSearchLayer::toggleDifficulty @ 0x1403121d3\n; > LevelSearchLayer::toggleDifficultyNum @ 0x140312436\n; > <???> @ 0x1406cad58\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, 0x14016a780\npush    rdi                                                            ; +0x5, 0x14016a785\nsub     rsp, 50h                                                       ; +0x6, 0x14016a786\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x14016a78a\nxor     rax, rsp                                                       ; +0x11, 0x14016a791\nmov     [rsp+58h+var_18], rax                                          ; +0x14, 0x14016a794\nmovzx   edi, r8b                                                       ; +0x19, 0x14016a799\nmov     rbx, rcx                                                       ; +0x1d, 0x14016a79d\nlea     rcx, aDiffI; \"Diff%i\"                                          ; +0x20, 0x14016a7a0\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x27, 0x14016a7a7\nmov     rcx, rax                                                       ; +0x2d, 0x14016a7ad\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x30, 0x14016a7b0\nxorps   xmm0, xmm0                                                     ; +0x36, 0x14016a7b6\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x39, 0x14016a7b9\nxorps   xmm1, xmm1                                                     ; +0x3e, 0x14016a7be\nmovdqu  [rsp+58h+var_28], xmm1                                         ; +0x41, 0x14016a7c1\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x47, 0x14016a7c7\nxchg    ax, ax                                                         ; +0x4e, 0x14016a7ce\ninc     r8                                                             ; +0x50, 0x14016a7d0\ncmp     byte ptr [rax+r8], 0                                           ; +0x53, 0x14016a7d3\njnz     short loc_14016A7D0                                            ; +0x58, 0x14016a7d8\nmov     rdx, rax                                                       ; +0x5a, 0x14016a7da\nlea     rcx, [rsp+58h+Block]                                           ; +0x5d, 0x14016a7dd\ncall    sub_14003A930                                                  ; +0x62, 0x14016a7e2\nnop                                                                    ; +0x67, 0x14016a7e7\nmov     edx, edi                                                       ; +0x68, 0x14016a7e8\nlea     rcx, aI_11; \"%i\"                                               ; +0x6a, 0x14016a7ea\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x71, 0x14016a7f1\nmov     rdx, rax                                                       ; +0x77, 0x14016a7f7\nlea     r8, [rsp+58h+Block]                                            ; +0x7a, 0x14016a7fa\nmov     rcx, [rbx+158h]                                                ; +0x7f, 0x14016a7ff\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, 0x14016a806\nnop                                                                    ; +0x8c, 0x14016a80c\nmov     rdx, qword ptr [rsp+58h+var_28+8]                              ; +0x8d, 0x14016a80d\ncmp     rdx, 0Fh                                                       ; +0x92, 0x14016a812\njbe     short loc_14016A84D                                            ; +0x96, 0x14016a816\ninc     rdx                                                            ; +0x98, 0x14016a818\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0x9b, 0x14016a81b\nmov     rax, rcx                                                       ; +0xa0, 0x14016a820\ncmp     rdx, 1000h                                                     ; +0xa3, 0x14016a823\njb      short loc_14016A848                                            ; +0xaa, 0x14016a82a\nadd     rdx, 27h ; '''                                                 ; +0xac, 0x14016a82c\nmov     rcx, [rcx-8]                                                   ; +0xb0, 0x14016a830\nsub     rax, rcx                                                       ; +0xb4, 0x14016a834\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xb7, 0x14016a837\ncmp     rax, 1Fh                                                       ; +0xbb, 0x14016a83b\njbe     short loc_14016A848                                            ; +0xbf, 0x14016a83f\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xc1, 0x14016a841\nalign 8                                                                ; +0xc7, 0x14016a847\ncall    j_j_free                                                       ; +0xc8, 0x14016a848\nmov     rcx, [rsp+58h+var_18]                                          ; +0xcd, 0x14016a84d\nxor     rcx, rsp; StackCookie                                          ; +0xd2, 0x14016a852\ncall    __security_check_cookie                                        ; +0xd5, 0x14016a855\nmov     rbx, [rsp+58h+arg_18]                                          ; +0xda, 0x14016a85a\nadd     rsp, 50h                                                       ; +0xdf, 0x14016a85f\npop     rdi                                                            ; +0xe3, 0x14016a863\nretn                                                                   ; +0xe4, 0x14016a864", "xrefs": ["LevelSearchLayer::toggleDifficulty @ 0x1403121d3", "LevelSearchLayer::toggleDifficultyNum @ 0x140312436", "<???> @ 0x1406cad58"], "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"}