{"type": "func", "start": 5371928208, "end": 5371928418, "name": "LevelSearchLayer::checkDiff", "pseudocode": "// \n// LevelSearchLayer::checkDiff from 0x140311e90 to 0x140311f62 (210 bytes)\n// \n// 10 xrefs:\n// > LevelSearchLayer::getSearchObject @ 0x14030feca\n// > LevelSearchLayer::getSearchObject @ 0x14030fedb\n// > LevelSearchLayer::getSearchObject @ 0x14030fef0\n// > LevelSearchLayer::getSearchObject @ 0x14030ff01\n// > LevelSearchLayer::getSearchObject @ 0x14030ff12\n// > LevelSearchLayer::getSearchObject @ 0x14030ff22\n// > LevelSearchLayer::getSearchObject @ 0x14030ff32\n// > LevelSearchLayer::getSearchObject @ 0x14030ff40\n// > LevelSearchLayer::toggleDifficulty @ 0x140311fab\n// > <???> @ 0x1406d4844\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\nbool LevelSearchLayer::checkDiff(LevelSearchLayer *a1, int a2)\n{\n  cocos2d::CCString *v3; // rax\n  const char *CString; // rax\n  size_t v5; // r8\n  cocos2d::CCString *v6; // rax\n  bool v7; // bl\n  void *v8; // rcx\n  void *Block[2]; // [rsp+20h] [rbp-38h] BYREF\n  __int128 v11; // [rsp+30h] [rbp-28h]\n\n  v3 = cocos2d::CCString::createWithFormat(\"D%i\", a2);\n  CString = cocos2d::CCString::getCString(v3);\n  *(_OWORD *)Block = 0;\n  v11 = 0;\n  v5 = -1;\n  do\n    ++v5;\n  while ( CString[v5] );\n  sub_14003A930(Block, CString, v5);\n  v6 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(a1->m_difficultyDict, Block);\n  v7 = cocos2d::CCString::boolValue(v6);\n  if ( *((_QWORD *)&v11 + 1) > 0xFu )\n  {\n    v8 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v11 + 1) + 1LL) >= 0x1000 )\n    {\n      v8 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v8);\n  }\n  return v7;\n}", "assembly": "; \n; LevelSearchLayer::checkDiff from 0x140311e90 to 0x140311f62 (210 bytes)\n; \n; 10 xrefs:\n; > LevelSearchLayer::getSearchObject @ 0x14030feca\n; > LevelSearchLayer::getSearchObject @ 0x14030fedb\n; > LevelSearchLayer::getSearchObject @ 0x14030fef0\n; > LevelSearchLayer::getSearchObject @ 0x14030ff01\n; > LevelSearchLayer::getSearchObject @ 0x14030ff12\n; > LevelSearchLayer::getSearchObject @ 0x14030ff22\n; > LevelSearchLayer::getSearchObject @ 0x14030ff32\n; > LevelSearchLayer::getSearchObject @ 0x14030ff40\n; > LevelSearchLayer::toggleDifficulty @ 0x140311fab\n; > <???> @ 0x1406d4844\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, 0x140311e90\nsub     rsp, 50h                                                       ; +0x2, 0x140311e92\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x140311e96\nxor     rax, rsp                                                       ; +0xd, 0x140311e9d\nmov     [rsp+58h+var_18], rax                                          ; +0x10, 0x140311ea0\nmov     rbx, rcx                                                       ; +0x15, 0x140311ea5\nlea     rcx, aDI_1; \"D%i\"                                              ; +0x18, 0x140311ea8\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x1f, 0x140311eaf\nmov     rcx, rax                                                       ; +0x25, 0x140311eb5\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x28, 0x140311eb8\nxorps   xmm0, xmm0                                                     ; +0x2e, 0x140311ebe\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x31, 0x140311ec1\nxorps   xmm1, xmm1                                                     ; +0x36, 0x140311ec6\nmovdqu  [rsp+58h+var_28], xmm1                                         ; +0x39, 0x140311ec9\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x3f, 0x140311ecf\ninc     r8                                                             ; +0x46, 0x140311ed6\ncmp     byte ptr [rax+r8], 0                                           ; +0x49, 0x140311ed9\njnz     short loc_140311ED6                                            ; +0x4e, 0x140311ede\nmov     rdx, rax                                                       ; +0x50, 0x140311ee0\nlea     rcx, [rsp+58h+Block]                                           ; +0x53, 0x140311ee3\ncall    sub_14003A930                                                  ; +0x58, 0x140311ee8\nnop                                                                    ; +0x5d, 0x140311eed\nlea     rdx, [rsp+58h+Block]                                           ; +0x5e, 0x140311eee\nmov     rcx, [rbx+1D8h]                                                ; +0x63, 0x140311ef3\ncall    cs:?valueForKey@CCDictionary@cocos2d@@QEAAPEBVCCString@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::valueForKey(std::string const &) ; +0x6a, 0x140311efa\nmov     rcx, rax                                                       ; +0x70, 0x140311f00\ncall    cs:?boolValue@CCString@cocos2d@@QEBA_NXZ; cocos2d::CCString::boolValue(void) ; +0x73, 0x140311f03\nmovzx   ebx, al                                                        ; +0x79, 0x140311f09\nmov     rdx, qword ptr [rsp+58h+var_28+8]                              ; +0x7c, 0x140311f0c\ncmp     rdx, 0Fh                                                       ; +0x81, 0x140311f11\njbe     short loc_140311F4C                                            ; +0x85, 0x140311f15\ninc     rdx                                                            ; +0x87, 0x140311f17\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0x8a, 0x140311f1a\nmov     rax, rcx                                                       ; +0x8f, 0x140311f1f\ncmp     rdx, 1000h                                                     ; +0x92, 0x140311f22\njb      short loc_140311F47                                            ; +0x99, 0x140311f29\nadd     rdx, 27h ; '''                                                 ; +0x9b, 0x140311f2b\nmov     rcx, [rcx-8]                                                   ; +0x9f, 0x140311f2f\nsub     rax, rcx                                                       ; +0xa3, 0x140311f33\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xa6, 0x140311f36\ncmp     rax, 1Fh                                                       ; +0xaa, 0x140311f3a\njbe     short loc_140311F47                                            ; +0xae, 0x140311f3e\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xb0, 0x140311f40\ndb 0CCh                                                                ; +0xb6, 0x140311f46\ncall    j_j_free                                                       ; +0xb7, 0x140311f47\nmovzx   eax, bl                                                        ; +0xbc, 0x140311f4c\nmov     rcx, [rsp+58h+var_18]                                          ; +0xbf, 0x140311f4f\nxor     rcx, rsp; StackCookie                                          ; +0xc4, 0x140311f54\ncall    __security_check_cookie                                        ; +0xc7, 0x140311f57\nadd     rsp, 50h                                                       ; +0xcc, 0x140311f5c\npop     rbx                                                            ; +0xd0, 0x140311f60\nretn                                                                   ; +0xd1, 0x140311f61", "xrefs": ["LevelSearchLayer::getSearchObject @ 0x14030feca", "LevelSearchLayer::getSearchObject @ 0x14030fedb", "LevelSearchLayer::getSearchObject @ 0x14030fef0", "LevelSearchLayer::getSearchObject @ 0x14030ff01", "LevelSearchLayer::getSearchObject @ 0x14030ff12", "LevelSearchLayer::getSearchObject @ 0x14030ff22", "LevelSearchLayer::getSearchObject @ 0x14030ff32", "LevelSearchLayer::getSearchObject @ 0x14030ff40", "LevelSearchLayer::toggleDifficulty @ 0x140311fab", "<???> @ 0x1406d4844"], "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"}