{"type": "func", "start": 5371204640, "end": 5371204894, "name": "GameLevelManager::setDiffVal", "pseudocode": "// \n// GameLevelManager::setDiffVal from 0x140261420 to 0x14026151e (254 bytes)\n// \n// 3 xrefs:\n// > LevelSearchLayer::toggleDifficulty @ 0x14043ae55\n// > LevelSearchLayer::toggleDifficultyNum @ 0x14043b0f0\n// > <???> @ 0x14091c7f0\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:28:48 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nvoid __fastcall GameLevelManager::setDiffVal(__int64 a1, int a2, unsigned __int8 a3)\n{\n  unsigned int v3; // 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  void *Block[2]; // [rsp+30h] [rbp-38h] BYREF\n  __int128 v12; // [rsp+40h] [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  v12 = 0;\n  v7 = -1;\n  do\n    ++v7;\n  while ( CString[v7] );\n  sub_14003D230(Block, CString, v7);\n  v8 = *(_QWORD *)(a1 + 848);\n  v9 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v3);\n  cocos2d::CCDictionary::setObject(v8, v9, Block);\n  if ( *((_QWORD *)&v12 + 1) > 0xFu )\n  {\n    v10 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v12 + 1) + 1LL) >= 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}", "assembly": "; \n; GameLevelManager::setDiffVal from 0x140261420 to 0x14026151e (254 bytes)\n; \n; 3 xrefs:\n; > LevelSearchLayer::toggleDifficulty @ 0x14043ae55\n; > LevelSearchLayer::toggleDifficultyNum @ 0x14043b0f0\n; > <???> @ 0x14091c7f0\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:28:48 +0000\n; \nmov     [rsp+arg_18], rbx                                              ; +0x0, 0x140261420\npush    rdi                                                            ; +0x5, 0x140261425\nsub     rsp, 60h                                                       ; +0x6, 0x140261426\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x14026142a\nxor     rax, rsp                                                       ; +0x11, 0x140261431\nmov     [rsp+68h+var_18], rax                                          ; +0x14, 0x140261434\nmovzx   edi, r8b                                                       ; +0x19, 0x140261439\nmov     rbx, rcx                                                       ; +0x1d, 0x14026143d\nlea     rcx, aDiffI; \"Diff%i\"                                          ; +0x20, 0x140261440\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x27, 0x140261447\nmov     rcx, rax                                                       ; +0x2d, 0x14026144d\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x30, 0x140261450\nxorps   xmm0, xmm0                                                     ; +0x36, 0x140261456\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0x39, 0x140261459\nxorps   xmm1, xmm1                                                     ; +0x3e, 0x14026145e\nmovdqu  [rsp+68h+var_28], xmm1                                         ; +0x41, 0x140261461\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x47, 0x140261467\nxchg    ax, ax                                                         ; +0x4e, 0x14026146e\ninc     r8                                                             ; +0x50, 0x140261470\ncmp     byte ptr [rax+r8], 0                                           ; +0x53, 0x140261473\njnz     short loc_140261470                                            ; +0x58, 0x140261478\nmov     rdx, rax                                                       ; +0x5a, 0x14026147a\nlea     rcx, [rsp+68h+Block]                                           ; +0x5d, 0x14026147d\ncall    sub_14003D230                                                  ; +0x62, 0x140261482\nnop                                                                    ; +0x67, 0x140261487\nmov     rbx, [rbx+350h]                                                ; +0x68, 0x140261488\nmov     edx, edi                                                       ; +0x6f, 0x14026148f\nlea     rcx, word_1406ED6F8                                            ; +0x71, 0x140261491\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x78, 0x140261498\nmov     rdx, rax                                                       ; +0x7e, 0x14026149e\nlea     r8, [rsp+68h+Block]                                            ; +0x81, 0x1402614a1\nmov     rcx, rbx                                                       ; +0x86, 0x1402614a6\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 &) ; +0x89, 0x1402614a9\nnop                                                                    ; +0x8f, 0x1402614af\nmov     rdx, qword ptr [rsp+68h+var_28+8]                              ; +0x90, 0x1402614b0\ncmp     rdx, 0Fh                                                       ; +0x95, 0x1402614b5\njbe     short loc_140261503                                            ; +0x99, 0x1402614b9\ninc     rdx                                                            ; +0x9b, 0x1402614bb\nmov     rcx, [rsp+68h+Block]; Block                                    ; +0x9e, 0x1402614be\nmov     rax, rcx                                                       ; +0xa3, 0x1402614c3\ncmp     rdx, 1000h                                                     ; +0xa6, 0x1402614c6\njb      short loc_1402614FE                                            ; +0xad, 0x1402614cd\nadd     rdx, 27h ; '''                                                 ; +0xaf, 0x1402614cf\nmov     rcx, [rcx-8]                                                   ; +0xb3, 0x1402614d3\nsub     rax, rcx                                                       ; +0xb7, 0x1402614d7\nsub     rax, 8                                                         ; +0xba, 0x1402614da\ncmp     rax, 1Fh                                                       ; +0xbe, 0x1402614de\njbe     short loc_1402614FE                                            ; +0xc2, 0x1402614e2\nmov     [rsp+68h+Reserved], 0; Reserved                                ; +0xc4, 0x1402614e4\nxor     r9d, r9d; LineNo                                               ; +0xcd, 0x1402614ed\nxor     r8d, r8d; FileName                                             ; +0xd0, 0x1402614f0\nxor     edx, edx; FunctionName                                         ; +0xd3, 0x1402614f3\nxor     ecx, ecx; Expression                                           ; +0xd5, 0x1402614f5\ncall    cs:_invoke_watson                                              ; +0xd7, 0x1402614f7\nalign 2                                                                ; +0xdd, 0x1402614fd\ncall    j_j_free                                                       ; +0xde, 0x1402614fe\nmov     rcx, [rsp+68h+var_18]                                          ; +0xe3, 0x140261503\nxor     rcx, rsp; StackCookie                                          ; +0xe8, 0x140261508\ncall    __security_check_cookie                                        ; +0xeb, 0x14026150b\nmov     rbx, [rsp+68h+arg_18]                                          ; +0xf0, 0x140261510\nadd     rsp, 60h                                                       ; +0xf8, 0x140261518\npop     rdi                                                            ; +0xfc, 0x14026151c\nretn                                                                   ; +0xfd, 0x14026151d", "xrefs": ["LevelSearchLayer::toggleDifficulty @ 0x14043ae55", "LevelSearchLayer::toggleDifficultyNum @ 0x14043b0f0", "<???> @ 0x14091c7f0"], "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"}