{"type": "func", "start": 5370064640, "end": 5370065306, "name": "GameLevelManager::encodeDataTo", "pseudocode": "// \n// GameLevelManager::encodeDataTo from 0x14014af00 to 0x14014b19a (666 bytes)\n// \n// 2 xrefs:\n// > GameManager::encodeDataTo @ 0x1401893fd\n// > <???> @ 0x1406ca770\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::encodeDataTo(GameLevelManager *a1, DS_Dictionary *a2)\n{\n  __int64 v4; // rcx\n  cocos2d::CCArray *v5; // rbp\n  cocos2d::CCDictionary *m_favoriteLists; // rdx\n  cocos2d::CCDictElement *m_pElements; // rdx\n  cocos2d::CCDictElement *i; // rbx\n  __int64 v9; // rax\n  void *v10; // [rsp+30h] [rbp+8h]\n\n  DS_Dictionary::setDictForKey(a2, \"GLM_01\", a1->m_mainLevels);\n  GameLevelManager::limitSavedLevels(a1);\n  GameLevelManager::purgeUnusedLevels(a1);\n  GameLevelManager::updateLevelOrders(a1);\n  GameLevelManager::updateLevelOrders(a1);\n  DS_Dictionary::setDictForKey(a2, \"GLM_03\", a1->m_onlineLevels);\n  GameLevelManager::cleanupDailyLevels(a1);\n  DS_Dictionary::setDictForKey(a2, \"GLM_10\", a1->m_dailyLevels);\n  DS_Dictionary::setIntegerForKey(a2, \"GLM_11\", a1->m_activeDailyID);\n  DS_Dictionary::setIntegerForKey(a2, \"GLM_17\", a1->m_activeWeeklyID);\n  DS_Dictionary::setIntegerForKey(a2, \"GLM_23\", a1->m_activeEventID);\n  DS_Dictionary::setDictForKey(a2, \"GLM_16\", a1->m_gauntletLevels);\n  v5 = (cocos2d::CCArray *)cocos2d::CCArray::create(v4);\n  m_favoriteLists = a1->m_favoriteLists;\n  if ( m_favoriteLists )\n  {\n    m_pElements = m_favoriteLists->m_pElements;\n    if ( m_pElements )\n    {\n      for ( i = (cocos2d::CCDictElement *)m_pElements->hh.next; ; i = (cocos2d::CCDictElement *)i->hh.next )\n      {\n        cocos2d::CCArray::addObject(v5, m_pElements->m_pObject);\n        m_pElements = i;\n        if ( !i )\n          break;\n      }\n    }\n  }\n  DS_Dictionary::setArrayForKey(a2, \"GLM_22\", v5);\n  DS_Dictionary::setBoolMapForKey(a2, \"GLM_09\", &a1->m_availableFilters);\n  v9 = qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v10 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00(v10);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v9 = qword_1406C2ED8;\n  }\n  if ( !*(_BYTE *)(v9 + 354) )\n  {\n    DS_Dictionary::setDictForKey(a2, \"GLM_07\", a1->m_downloadedLevels);\n    DS_Dictionary::setDictForKey(a2, \"GLM_14\", a1->m_reportedLevels);\n  }\n  DS_Dictionary::setDictForKey(a2, \"GLM_12\", a1->m_likedLevels);\n  DS_Dictionary::setDictForKey(a2, \"GLM_13\", a1->m_ratedLevels);\n  DS_Dictionary::setDictForKey(a2, \"GLM_15\", a1->m_ratedDemons);\n  DS_Dictionary::setDictForKey(a2, \"GLM_06\", a1->m_followedCreators);\n  DS_Dictionary::setDictForKey(a2, \"GLM_08\", a1->m_searchFilters);\n  DS_Dictionary::setDictForKey(a2, \"GLM_18\", a1->m_onlineFolders);\n  DS_Dictionary::setDictForKey(a2, \"GLM_19\", a1->m_localLevelsFolders);\n  DS_Dictionary::setArrayForKey(a2, \"GLM_20\", a1->m_smartTemplates);\n}", "assembly": "; \n; GameLevelManager::encodeDataTo from 0x14014af00 to 0x14014b19a (666 bytes)\n; \n; 2 xrefs:\n; > GameManager::encodeDataTo @ 0x1401893fd\n; > <???> @ 0x1406ca770\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_8], rbx                                               ; +0x0, 0x14014af00\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x14014af05\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x14014af0a\npush    rdi                                                            ; +0xf, 0x14014af0f\nsub     rsp, 20h                                                       ; +0x10, 0x14014af10\nmov     rdi, rdx                                                       ; +0x14, 0x14014af14\nmov     rsi, rcx                                                       ; +0x17, 0x14014af17\nmov     r8, [rcx+150h]                                                 ; +0x1a, 0x14014af1a\nlea     rdx, aGlm01; \"GLM_01\"                                          ; +0x21, 0x14014af21\nmov     rcx, rdi                                                       ; +0x28, 0x14014af28\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x2b, 0x14014af2b\nmov     rcx, rsi                                                       ; +0x31, 0x14014af31\ncall    GameLevelManager__limitSavedLevels                             ; +0x34, 0x14014af34\nmov     rcx, rsi                                                       ; +0x39, 0x14014af39\ncall    GameLevelManager__purgeUnusedLevels                            ; +0x3c, 0x14014af3c\nmov     rcx, rsi                                                       ; +0x41, 0x14014af41\ncall    GameLevelManager__updateLevelOrders                            ; +0x44, 0x14014af44\nmov     rcx, rsi                                                       ; +0x49, 0x14014af49\ncall    GameLevelManager__updateLevelOrders                            ; +0x4c, 0x14014af4c\nmov     r8, [rsi+160h]                                                 ; +0x51, 0x14014af51\nlea     rdx, aGlm03; \"GLM_03\"                                          ; +0x58, 0x14014af58\nmov     rcx, rdi                                                       ; +0x5f, 0x14014af5f\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x62, 0x14014af62\nmov     rcx, rsi                                                       ; +0x68, 0x14014af68\ncall    GameLevelManager__cleanupDailyLevels                           ; +0x6b, 0x14014af6b\nmov     r8, [rsi+1B8h]                                                 ; +0x70, 0x14014af70\nlea     rdx, aGlm10; \"GLM_10\"                                          ; +0x77, 0x14014af77\nmov     rcx, rdi                                                       ; +0x7e, 0x14014af7e\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x81, 0x14014af81\nmov     r8d, [rsi+1C8h]                                                ; +0x87, 0x14014af87\nlea     rdx, aGlm11; \"GLM_11\"                                          ; +0x8e, 0x14014af8e\nmov     rcx, rdi                                                       ; +0x95, 0x14014af95\ncall    cs:?setIntegerForKey@DS_Dictionary@@QEAAXPEBDH@Z; DS_Dictionary::setIntegerForKey(char const *,int) ; +0x98, 0x14014af98\nmov     r8d, [rsi+1D4h]                                                ; +0x9e, 0x14014af9e\nlea     rdx, aGlm17; \"GLM_17\"                                          ; +0xa5, 0x14014afa5\nmov     rcx, rdi                                                       ; +0xac, 0x14014afac\ncall    cs:?setIntegerForKey@DS_Dictionary@@QEAAXPEBDH@Z; DS_Dictionary::setIntegerForKey(char const *,int) ; +0xaf, 0x14014afaf\nmov     r8d, [rsi+1E0h]                                                ; +0xb5, 0x14014afb5\nlea     rdx, aGlm23; \"GLM_23\"                                          ; +0xbc, 0x14014afbc\nmov     rcx, rdi                                                       ; +0xc3, 0x14014afc3\ncall    cs:?setIntegerForKey@DS_Dictionary@@QEAAXPEBDH@Z; DS_Dictionary::setIntegerForKey(char const *,int) ; +0xc6, 0x14014afc6\nmov     r8, [rsi+1E8h]                                                 ; +0xcc, 0x14014afcc\nlea     rdx, aGlm16; \"GLM_16\"                                          ; +0xd3, 0x14014afd3\nmov     rcx, rdi                                                       ; +0xda, 0x14014afda\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0xdd, 0x14014afdd\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0xe3, 0x14014afe3\nmov     rbp, rax                                                       ; +0xe9, 0x14014afe9\nmov     rdx, [rsi+178h]                                                ; +0xec, 0x14014afec\ntest    rdx, rdx                                                       ; +0xf3, 0x14014aff3\njz      short loc_14014B031                                            ; +0xf6, 0x14014aff6\nmov     rdx, [rdx+38h]                                                 ; +0xf8, 0x14014aff8\ntest    rdx, rdx                                                       ; +0xfc, 0x14014affc\njz      short loc_14014B031                                            ; +0xff, 0x14014afff\nmov     rbx, [rdx+120h]                                                ; +0x101, 0x14014b001\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x108, 0x14014b008\nmov     rdx, [rdx+108h]                                                ; +0x110, 0x14014b010\nmov     rcx, rbp                                                       ; +0x117, 0x14014b017\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x11a, 0x14014b01a\nmov     rdx, rbx                                                       ; +0x120, 0x14014b020\ntest    rbx, rbx                                                       ; +0x123, 0x14014b023\njz      short loc_14014B031                                            ; +0x126, 0x14014b026\nmov     rbx, [rbx+120h]                                                ; +0x128, 0x14014b028\njmp     short loc_14014B010                                            ; +0x12f, 0x14014b02f\nmov     r8, rbp                                                        ; +0x131, 0x14014b031\nlea     rdx, aGlm22; \"GLM_22\"                                          ; +0x134, 0x14014b034\nmov     rcx, rdi                                                       ; +0x13b, 0x14014b03b\ncall    cs:?setArrayForKey@DS_Dictionary@@QEAAXPEBDPEAVCCArray@cocos2d@@@Z; DS_Dictionary::setArrayForKey(char const *,cocos2d::CCArray *) ; +0x13e, 0x14014b03e\nlea     r8, [rsi+1F0h]                                                 ; +0x144, 0x14014b044\nlea     rdx, aGlm09; \"GLM_09\"                                          ; +0x14b, 0x14014b04b\nmov     rcx, rdi                                                       ; +0x152, 0x14014b052\ncall    cs:?setBoolMapForKey@DS_Dictionary@@QEAAXPEBDAEAV?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_NU?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@std@@@2@@std@@@Z; DS_Dictionary::setBoolMapForKey(char const *,std::map<std::string,bool> &) ; +0x155, 0x14014b055\nmov     rax, cs:qword_1406C2ED8                                        ; +0x15b, 0x14014b05b\ntest    rax, rax                                                       ; +0x162, 0x14014b062\njnz     short loc_14014B096                                            ; +0x165, 0x14014b065\nmov     ecx, 668h; Size                                                ; +0x167, 0x14014b067\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x16c, 0x14014b06c\nmov     [rsp+28h+arg_0], rax                                           ; +0x171, 0x14014b071\nmov     rcx, rax                                                       ; +0x176, 0x14014b076\ncall    sub_14017AB00                                                  ; +0x179, 0x14014b079\nnop                                                                    ; +0x17e, 0x14014b07e\nmov     cs:qword_1406C2ED8, rax                                        ; +0x17f, 0x14014b07f\nmov     rdx, [rax]                                                     ; +0x186, 0x14014b086\nmov     rcx, rax                                                       ; +0x189, 0x14014b089\ncall    qword ptr [rdx+48h]                                            ; +0x18c, 0x14014b08c\nmov     rax, cs:qword_1406C2ED8                                        ; +0x18f, 0x14014b08f\ncmp     byte ptr [rax+162h], 0                                         ; +0x196, 0x14014b096\njnz     short loc_14014B0CD                                            ; +0x19d, 0x14014b09d\nmov     r8, [rsi+180h]                                                 ; +0x19f, 0x14014b09f\nlea     rdx, aGlm07; \"GLM_07\"                                          ; +0x1a6, 0x14014b0a6\nmov     rcx, rdi                                                       ; +0x1ad, 0x14014b0ad\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x1b0, 0x14014b0b0\nmov     r8, [rsi+1A0h]                                                 ; +0x1b6, 0x14014b0b6\nlea     rdx, aGlm14; \"GLM_14\"                                          ; +0x1bd, 0x14014b0bd\nmov     rcx, rdi                                                       ; +0x1c4, 0x14014b0c4\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x1c7, 0x14014b0c7\nmov     r8, [rsi+188h]                                                 ; +0x1cd, 0x14014b0cd\nlea     rdx, aGlm12; \"GLM_12\"                                          ; +0x1d4, 0x14014b0d4\nmov     rcx, rdi                                                       ; +0x1db, 0x14014b0db\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x1de, 0x14014b0de\nmov     r8, [rsi+190h]                                                 ; +0x1e4, 0x14014b0e4\nlea     rdx, aGlm13; \"GLM_13\"                                          ; +0x1eb, 0x14014b0eb\nmov     rcx, rdi                                                       ; +0x1f2, 0x14014b0f2\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x1f5, 0x14014b0f5\nmov     r8, [rsi+198h]                                                 ; +0x1fb, 0x14014b0fb\nlea     rdx, aGlm15; \"GLM_15\"                                          ; +0x202, 0x14014b102\nmov     rcx, rdi                                                       ; +0x209, 0x14014b109\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x20c, 0x14014b10c\nmov     r8, [rsi+170h]                                                 ; +0x212, 0x14014b112\nlea     rdx, aGlm06; \"GLM_06\"                                          ; +0x219, 0x14014b119\nmov     rcx, rdi                                                       ; +0x220, 0x14014b120\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x223, 0x14014b123\nmov     r8, [rsi+158h]                                                 ; +0x229, 0x14014b129\nlea     rdx, aGlm08; \"GLM_08\"                                          ; +0x230, 0x14014b130\nmov     rcx, rdi                                                       ; +0x237, 0x14014b137\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x23a, 0x14014b13a\nmov     r8, [rsi+1A8h]                                                 ; +0x240, 0x14014b140\nlea     rdx, aGlm18; \"GLM_18\"                                          ; +0x247, 0x14014b147\nmov     rcx, rdi                                                       ; +0x24e, 0x14014b14e\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x251, 0x14014b151\nmov     r8, [rsi+1B0h]                                                 ; +0x257, 0x14014b157\nlea     rdx, aGlm19; \"GLM_19\"                                          ; +0x25e, 0x14014b15e\nmov     rcx, rdi                                                       ; +0x265, 0x14014b165\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x268, 0x14014b168\nmov     r8, [rsi+3B8h]                                                 ; +0x26e, 0x14014b16e\nlea     rdx, aGlm20; \"GLM_20\"                                          ; +0x275, 0x14014b175\nmov     rcx, rdi                                                       ; +0x27c, 0x14014b17c\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x27f, 0x14014b17f\nmov     rbp, [rsp+28h+arg_10]                                          ; +0x284, 0x14014b184\nmov     rsi, [rsp+28h+arg_18]                                          ; +0x289, 0x14014b189\nadd     rsp, 20h                                                       ; +0x28e, 0x14014b18e\npop     rdi                                                            ; +0x292, 0x14014b192\njmp     cs:?setArrayForKey@DS_Dictionary@@QEAAXPEBDPEAVCCArray@cocos2d@@@Z; DS_Dictionary::setArrayForKey(char const *,cocos2d::CCArray *) ; +0x293, 0x14014b193", "xrefs": ["GameManager::encodeDataTo @ 0x1401893fd", "<???> @ 0x1406ca770"], "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"}