{"type": "func", "start": 5370296080, "end": 5370296298, "name": "GameManager::getIntGameVariable", "pseudocode": "// \n// GameManager::getIntGameVariable from 0x140183710 to 0x1401837ea (218 bytes)\n// \n// 45 xrefs:\n// > CreatorLayer::onMyLevels @ 0x14009d3b3\n// > CreatorLayer::onMyLevels @ 0x14009d403\n// > CreatorLayer::onMyLevels @ 0x14009d45b\n// > CreatorLayer::onMyLevels @ 0x14009d4a7\n// > CreatorLayer::onSavedLevels @ 0x14009d5c0\n// > CreatorLayer::onSavedLevels @ 0x14009d610\n// > CreatorLayer::onSavedLevels @ 0x14009d662\n// > CreatorLayer::onSavedLevels @ 0x14009d6ae\n// > EditLevelLayer::onLevelLeaderboard @ 0x1400d69cb\n// > EditorPauseLayer::onResume @ 0x1400dd753\n// > EditorPauseLayer::onResume @ 0x1400dd79c\n// > EditorUI::reloadCustomItems @ 0x1400e4ce4\n// > EditorUI::reloadCustomItems @ 0x1400e4d2d\n// > EditorUI::setupDeleteMenu @ 0x1400e58e2\n// > EditorUI::setupDeleteMenu @ 0x1400e5a3a\n// > EditorUI::shouldDeleteObject @ 0x1400e6368\n// > EditorUI::shouldDeleteObject @ 0x1400e63ca\n// > EditorUI::onGroupIDFilter @ 0x1400e721c\n// > EditorUI::onColorFilter @ 0x1400e72f4\n// > EditorUI::updateDeleteButtons @ 0x1400e76f6\n// > EditorUI::updateDeleteButtons @ 0x1400e77f5\n// > EditorUI::setupCreateMenu @ 0x1400e8133\n// > EditorUI::setupCreateMenu @ 0x1400e814b\n// > EditorUI::canSelectObject @ 0x1401103ae\n// > EditorUI::canSelectObject @ 0x1401103fa\n// > EditorUI::canSelectObject @ 0x14011044d\n// > EditorUI::canSelectObject @ 0x1401104d0\n// > EditorUI::selectObjects @ 0x1401108f6\n// > EditorUI::selectObjects @ 0x140110946\n// > EditorUI::selectObjects @ 0x1401109e5\n// > EditorUI::selectObjects @ 0x140110ab9\n// > EditorUI::createMoveMenu @ 0x14011bdf2\n// > EditorUI::createMoveMenu @ 0x14011be3a\n// > EndLevelLayer::onLevelLeaderboard @ 0x14013491c\n// > EndLevelLayer::onLevelLeaderboard @ 0x14013492d\n// > GameManager::dataLoaded @ 0x140188622\n// > GameManager::dataLoaded @ 0x14018864b\n// > GameManager::firstLoad @ 0x1401887c8\n// > EditorOptionsLayer::setupOptions @ 0x1402913a7\n// > EditorOptionsLayer::setupOptions @ 0x1402913f3\n// > EditorOptionsLayer::onClose @ 0x140291ae7\n// > EditorOptionsLayer::onClose @ 0x140291b30\n// > LevelInfoLayer::onLevelLeaderboard @ 0x1402f9d9b\n// > LevelInfoLayer::onLevelLeaderboard @ 0x1402f9dac\n// > <???> @ 0x1406cb5bc\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\nint GameManager::getIntGameVariable(GameManager *a1, const char *a2)\n{\n  cocos2d::CCString *v3; // rax\n  const char *CString; // rax\n  size_t v5; // r8\n  cocos2d::CCString *v6; // rax\n  int v7; // ebx\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(\"%s%s\", \"gv_\", 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_valueKeeper, Block);\n  v7 = cocos2d::CCString::intValue(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; GameManager::getIntGameVariable from 0x140183710 to 0x1401837ea (218 bytes)\n; \n; 45 xrefs:\n; > CreatorLayer::onMyLevels @ 0x14009d3b3\n; > CreatorLayer::onMyLevels @ 0x14009d403\n; > CreatorLayer::onMyLevels @ 0x14009d45b\n; > CreatorLayer::onMyLevels @ 0x14009d4a7\n; > CreatorLayer::onSavedLevels @ 0x14009d5c0\n; > CreatorLayer::onSavedLevels @ 0x14009d610\n; > CreatorLayer::onSavedLevels @ 0x14009d662\n; > CreatorLayer::onSavedLevels @ 0x14009d6ae\n; > EditLevelLayer::onLevelLeaderboard @ 0x1400d69cb\n; > EditorPauseLayer::onResume @ 0x1400dd753\n; > EditorPauseLayer::onResume @ 0x1400dd79c\n; > EditorUI::reloadCustomItems @ 0x1400e4ce4\n; > EditorUI::reloadCustomItems @ 0x1400e4d2d\n; > EditorUI::setupDeleteMenu @ 0x1400e58e2\n; > EditorUI::setupDeleteMenu @ 0x1400e5a3a\n; > EditorUI::shouldDeleteObject @ 0x1400e6368\n; > EditorUI::shouldDeleteObject @ 0x1400e63ca\n; > EditorUI::onGroupIDFilter @ 0x1400e721c\n; > EditorUI::onColorFilter @ 0x1400e72f4\n; > EditorUI::updateDeleteButtons @ 0x1400e76f6\n; > EditorUI::updateDeleteButtons @ 0x1400e77f5\n; > EditorUI::setupCreateMenu @ 0x1400e8133\n; > EditorUI::setupCreateMenu @ 0x1400e814b\n; > EditorUI::canSelectObject @ 0x1401103ae\n; > EditorUI::canSelectObject @ 0x1401103fa\n; > EditorUI::canSelectObject @ 0x14011044d\n; > EditorUI::canSelectObject @ 0x1401104d0\n; > EditorUI::selectObjects @ 0x1401108f6\n; > EditorUI::selectObjects @ 0x140110946\n; > EditorUI::selectObjects @ 0x1401109e5\n; > EditorUI::selectObjects @ 0x140110ab9\n; > EditorUI::createMoveMenu @ 0x14011bdf2\n; > EditorUI::createMoveMenu @ 0x14011be3a\n; > EndLevelLayer::onLevelLeaderboard @ 0x14013491c\n; > EndLevelLayer::onLevelLeaderboard @ 0x14013492d\n; > GameManager::dataLoaded @ 0x140188622\n; > GameManager::dataLoaded @ 0x14018864b\n; > GameManager::firstLoad @ 0x1401887c8\n; > EditorOptionsLayer::setupOptions @ 0x1402913a7\n; > EditorOptionsLayer::setupOptions @ 0x1402913f3\n; > EditorOptionsLayer::onClose @ 0x140291ae7\n; > EditorOptionsLayer::onClose @ 0x140291b30\n; > LevelInfoLayer::onLevelLeaderboard @ 0x1402f9d9b\n; > LevelInfoLayer::onLevelLeaderboard @ 0x1402f9dac\n; > <???> @ 0x1406cb5bc\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, 0x140183710\nsub     rsp, 50h                                                       ; +0x2, 0x140183712\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x140183716\nxor     rax, rsp                                                       ; +0xd, 0x14018371d\nmov     [rsp+58h+var_18], rax                                          ; +0x10, 0x140183720\nmov     rbx, rcx                                                       ; +0x15, 0x140183725\nmov     r8, rdx                                                        ; +0x18, 0x140183728\nlea     rdx, aGv; \"gv_\"                                                ; +0x1b, 0x14018372b\nlea     rcx, aSS_0; \"%s%s\"                                             ; +0x22, 0x140183732\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x29, 0x140183739\nmov     rcx, rax                                                       ; +0x2f, 0x14018373f\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x32, 0x140183742\nxorps   xmm0, xmm0                                                     ; +0x38, 0x140183748\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x3b, 0x14018374b\nxorps   xmm1, xmm1                                                     ; +0x40, 0x140183750\nmovdqu  [rsp+58h+var_28], xmm1                                         ; +0x43, 0x140183753\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x49, 0x140183759\ninc     r8                                                             ; +0x50, 0x140183760\ncmp     byte ptr [rax+r8], 0                                           ; +0x53, 0x140183763\njnz     short loc_140183760                                            ; +0x58, 0x140183768\nmov     rdx, rax                                                       ; +0x5a, 0x14018376a\nlea     rcx, [rsp+58h+Block]                                           ; +0x5d, 0x14018376d\ncall    sub_14003A930                                                  ; +0x62, 0x140183772\nnop                                                                    ; +0x67, 0x140183777\nlea     rdx, [rsp+58h+Block]                                           ; +0x68, 0x140183778\nmov     rcx, [rbx+198h]                                                ; +0x6d, 0x14018377d\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 &) ; +0x74, 0x140183784\nmov     rcx, rax                                                       ; +0x7a, 0x14018378a\ncall    cs:?intValue@CCString@cocos2d@@QEBAHXZ; cocos2d::CCString::intValue(void) ; +0x7d, 0x14018378d\nmov     ebx, eax                                                       ; +0x83, 0x140183793\nmov     rdx, qword ptr [rsp+58h+var_28+8]                              ; +0x85, 0x140183795\ncmp     rdx, 0Fh                                                       ; +0x8a, 0x14018379a\njbe     short loc_1401837D5                                            ; +0x8e, 0x14018379e\ninc     rdx                                                            ; +0x90, 0x1401837a0\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0x93, 0x1401837a3\nmov     rax, rcx                                                       ; +0x98, 0x1401837a8\ncmp     rdx, 1000h                                                     ; +0x9b, 0x1401837ab\njb      short loc_1401837D0                                            ; +0xa2, 0x1401837b2\nadd     rdx, 27h ; '''                                                 ; +0xa4, 0x1401837b4\nmov     rcx, [rcx-8]                                                   ; +0xa8, 0x1401837b8\nsub     rax, rcx                                                       ; +0xac, 0x1401837bc\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xaf, 0x1401837bf\ncmp     rax, 1Fh                                                       ; +0xb3, 0x1401837c3\njbe     short loc_1401837D0                                            ; +0xb7, 0x1401837c7\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xb9, 0x1401837c9\nalign 10h                                                              ; +0xbf, 0x1401837cf\ncall    j_j_free                                                       ; +0xc0, 0x1401837d0\nmov     eax, ebx                                                       ; +0xc5, 0x1401837d5\nmov     rcx, [rsp+58h+var_18]                                          ; +0xc7, 0x1401837d7\nxor     rcx, rsp; StackCookie                                          ; +0xcc, 0x1401837dc\ncall    __security_check_cookie                                        ; +0xcf, 0x1401837df\nadd     rsp, 50h                                                       ; +0xd4, 0x1401837e4\npop     rbx                                                            ; +0xd8, 0x1401837e8\nretn                                                                   ; +0xd9, 0x1401837e9", "xrefs": ["CreatorLayer::onMyLevels @ 0x14009d3b3", "CreatorLayer::onMyLevels @ 0x14009d403", "CreatorLayer::onMyLevels @ 0x14009d45b", "CreatorLayer::onMyLevels @ 0x14009d4a7", "CreatorLayer::onSavedLevels @ 0x14009d5c0", "CreatorLayer::onSavedLevels @ 0x14009d610", "CreatorLayer::onSavedLevels @ 0x14009d662", "CreatorLayer::onSavedLevels @ 0x14009d6ae", "EditLevelLayer::onLevelLeaderboard @ 0x1400d69cb", "EditorPauseLayer::onResume @ 0x1400dd753", "EditorPauseLayer::onResume @ 0x1400dd79c", "EditorUI::reloadCustomItems @ 0x1400e4ce4", "EditorUI::reloadCustomItems @ 0x1400e4d2d", "EditorUI::setupDeleteMenu @ 0x1400e58e2", "EditorUI::setupDeleteMenu @ 0x1400e5a3a", "EditorUI::shouldDeleteObject @ 0x1400e6368", "EditorUI::shouldDeleteObject @ 0x1400e63ca", "EditorUI::onGroupIDFilter @ 0x1400e721c", "EditorUI::onColorFilter @ 0x1400e72f4", "EditorUI::updateDeleteButtons @ 0x1400e76f6", "EditorUI::updateDeleteButtons @ 0x1400e77f5", "EditorUI::setupCreateMenu @ 0x1400e8133", "EditorUI::setupCreateMenu @ 0x1400e814b", "EditorUI::canSelectObject @ 0x1401103ae", "EditorUI::canSelectObject @ 0x1401103fa", "EditorUI::canSelectObject @ 0x14011044d", "EditorUI::canSelectObject @ 0x1401104d0", "EditorUI::selectObjects @ 0x1401108f6", "EditorUI::selectObjects @ 0x140110946", "EditorUI::selectObjects @ 0x1401109e5", "EditorUI::selectObjects @ 0x140110ab9", "EditorUI::createMoveMenu @ 0x14011bdf2", "EditorUI::createMoveMenu @ 0x14011be3a", "EndLevelLayer::onLevelLeaderboard @ 0x14013491c", "EndLevelLayer::onLevelLeaderboard @ 0x14013492d", "GameManager::dataLoaded @ 0x140188622", "GameManager::dataLoaded @ 0x14018864b", "GameManager::firstLoad @ 0x1401887c8", "EditorOptionsLayer::setupOptions @ 0x1402913a7", "EditorOptionsLayer::setupOptions @ 0x1402913f3", "EditorOptionsLayer::onClose @ 0x140291ae7", "EditorOptionsLayer::onClose @ 0x140291b30", "LevelInfoLayer::onLevelLeaderboard @ 0x1402f9d9b", "LevelInfoLayer::onLevelLeaderboard @ 0x1402f9dac", "<???> @ 0x1406cb5bc"], "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"}