{"type": "func", "start": 5370956640, "end": 5370957437, "name": "GameLevelManager::encodeDataTo", "pseudocode": "// \n// GameLevelManager::encodeDataTo from 0x140224b60 to 0x140224e7d (797 bytes)\n// \n// 2 xrefs:\n// > GameManager::encodeDataTo @ 0x140285ddc\n// > <???> @ 0x14091bd10\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:25 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nvoid __fastcall GameLevelManager::encodeDataTo(__int64 a1, DS_Dictionary *a2)\n{\n  __int64 v4; // rcx\n  cocos2d::CCArray *v5; // rbp\n  __int64 v6; // rdx\n  __int64 v7; // rdx\n  __int64 i; // rbx\n  __int64 v9; // rax\n  void *v10; // [rsp+30h] [rbp+8h]\n\n  DS_Dictionary::setDictForKey(a2, \"GLM_01\", *(struct cocos2d::CCDictionary **)(a1 + 840));\n  GameLevelManager::limitSavedLevels(a1);\n  GameLevelManager::purgeUnusedLevels(a1);\n  GameLevelManager::updateLevelOrders(a1);\n  GameLevelManager::updateLevelOrders(a1);\n  DS_Dictionary::setDictForKey(a2, \"GLM_03\", *(struct cocos2d::CCDictionary **)(a1 + 856));\n  GameLevelManager::cleanupDailyLevels(a1);\n  DS_Dictionary::setDictForKey(a2, \"GLM_10\", *(struct cocos2d::CCDictionary **)(a1 + 944));\n  DS_Dictionary::setIntegerForKey(a2, \"GLM_11\", *(_DWORD *)(a1 + 960));\n  DS_Dictionary::setIntegerForKey(a2, \"GLM_17\", *(_DWORD *)(a1 + 972));\n  DS_Dictionary::setIntegerForKey(a2, \"GLM_23\", *(_DWORD *)(a1 + 984));\n  DS_Dictionary::setIntegerForKey(a2, \"GLM_24\", *(_DWORD *)(a1 + 1012));\n  DS_Dictionary::setIntegerForKey(a2, \"GLM_25\", *(_DWORD *)(a1 + 1016));\n  DS_Dictionary::setIntegerForKey(a2, \"GLM_26\", *(_DWORD *)(a1 + 1020));\n  DS_Dictionary::setIntegerForKey(a2, \"GLM_27\", *(_DWORD *)(a1 + 1024));\n  DS_Dictionary::setIntegerForKey(a2, \"GLM_28\", *(_BYTE *)(a1 + 1028) != 0);\n  DS_Dictionary::setDictForKey(a2, \"GLM_16\", *(struct cocos2d::CCDictionary **)(a1 + 1032));\n  v5 = (cocos2d::CCArray *)cocos2d::CCArray::create(v4);\n  v6 = *(_QWORD *)(a1 + 880);\n  if ( v6 )\n  {\n    v7 = *(_QWORD *)(v6 + 56);\n    if ( v7 )\n    {\n      for ( i = *(_QWORD *)(v7 + 288); ; i = *(_QWORD *)(i + 288) )\n      {\n        cocos2d::CCArray::addObject(v5, *(struct cocos2d::CCObject **)(v7 + 264));\n        v7 = 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 + 1040);\n  v9 = qword_14090BFD0;\n  if ( !qword_14090BFD0 )\n  {\n    v10 = operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager(v10);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    v9 = qword_14090BFD0;\n  }\n  if ( !*(_BYTE *)(v9 + 354) )\n  {\n    DS_Dictionary::setDictForKey(a2, \"GLM_07\", *(struct cocos2d::CCDictionary **)(a1 + 888));\n    DS_Dictionary::setDictForKey(a2, \"GLM_14\", *(struct cocos2d::CCDictionary **)(a1 + 920));\n  }\n  DS_Dictionary::setDictForKey(a2, \"GLM_12\", *(struct cocos2d::CCDictionary **)(a1 + 896));\n  DS_Dictionary::setDictForKey(a2, \"GLM_13\", *(struct cocos2d::CCDictionary **)(a1 + 904));\n  DS_Dictionary::setDictForKey(a2, \"GLM_15\", *(struct cocos2d::CCDictionary **)(a1 + 912));\n  DS_Dictionary::setDictForKey(a2, \"GLM_06\", *(struct cocos2d::CCDictionary **)(a1 + 872));\n  DS_Dictionary::setDictForKey(a2, \"GLM_08\", *(struct cocos2d::CCDictionary **)(a1 + 848));\n  DS_Dictionary::setDictForKey(a2, \"GLM_18\", *(struct cocos2d::CCDictionary **)(a1 + 928));\n  DS_Dictionary::setDictForKey(a2, \"GLM_19\", *(struct cocos2d::CCDictionary **)(a1 + 936));\n  DS_Dictionary::setArrayForKey(a2, \"GLM_20\", *(struct cocos2d::CCArray **)(a1 + 1656));\n}", "assembly": "; \n; GameLevelManager::encodeDataTo from 0x140224b60 to 0x140224e7d (797 bytes)\n; \n; 2 xrefs:\n; > GameManager::encodeDataTo @ 0x140285ddc\n; > <???> @ 0x14091bd10\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:25 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140224b60\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x140224b65\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x140224b6a\npush    rdi                                                            ; +0xf, 0x140224b6f\nsub     rsp, 20h                                                       ; +0x10, 0x140224b70\nmov     rdi, rdx                                                       ; +0x14, 0x140224b74\nmov     rsi, rcx                                                       ; +0x17, 0x140224b77\nmov     r8, [rcx+348h]                                                 ; +0x1a, 0x140224b7a\nlea     rdx, aGlm01; \"GLM_01\"                                          ; +0x21, 0x140224b81\nmov     rcx, rdi                                                       ; +0x28, 0x140224b88\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x2b, 0x140224b8b\nmov     rcx, rsi                                                       ; +0x31, 0x140224b91\ncall    GameLevelManager__limitSavedLevels                             ; +0x34, 0x140224b94\nmov     rcx, rsi                                                       ; +0x39, 0x140224b99\ncall    GameLevelManager__purgeUnusedLevels                            ; +0x3c, 0x140224b9c\nmov     rcx, rsi                                                       ; +0x41, 0x140224ba1\ncall    GameLevelManager__updateLevelOrders                            ; +0x44, 0x140224ba4\nmov     rcx, rsi                                                       ; +0x49, 0x140224ba9\ncall    GameLevelManager__updateLevelOrders                            ; +0x4c, 0x140224bac\nmov     r8, [rsi+358h]                                                 ; +0x51, 0x140224bb1\nlea     rdx, aGlm03; \"GLM_03\"                                          ; +0x58, 0x140224bb8\nmov     rcx, rdi                                                       ; +0x5f, 0x140224bbf\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x62, 0x140224bc2\nmov     rcx, rsi                                                       ; +0x68, 0x140224bc8\ncall    GameLevelManager__cleanupDailyLevels                           ; +0x6b, 0x140224bcb\nmov     r8, [rsi+3B0h]                                                 ; +0x70, 0x140224bd0\nlea     rdx, aGlm10; \"GLM_10\"                                          ; +0x77, 0x140224bd7\nmov     rcx, rdi                                                       ; +0x7e, 0x140224bde\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x81, 0x140224be1\nmov     r8d, [rsi+3C0h]                                                ; +0x87, 0x140224be7\nlea     rdx, aGlm11; \"GLM_11\"                                          ; +0x8e, 0x140224bee\nmov     rcx, rdi                                                       ; +0x95, 0x140224bf5\ncall    cs:?setIntegerForKey@DS_Dictionary@@QEAAXPEBDH@Z; DS_Dictionary::setIntegerForKey(char const *,int) ; +0x98, 0x140224bf8\nmov     r8d, [rsi+3CCh]                                                ; +0x9e, 0x140224bfe\nlea     rdx, aGlm17; \"GLM_17\"                                          ; +0xa5, 0x140224c05\nmov     rcx, rdi                                                       ; +0xac, 0x140224c0c\ncall    cs:?setIntegerForKey@DS_Dictionary@@QEAAXPEBDH@Z; DS_Dictionary::setIntegerForKey(char const *,int) ; +0xaf, 0x140224c0f\nmov     r8d, [rsi+3D8h]                                                ; +0xb5, 0x140224c15\nlea     rdx, aGlm23; \"GLM_23\"                                          ; +0xbc, 0x140224c1c\nmov     rcx, rdi                                                       ; +0xc3, 0x140224c23\ncall    cs:?setIntegerForKey@DS_Dictionary@@QEAAXPEBDH@Z; DS_Dictionary::setIntegerForKey(char const *,int) ; +0xc6, 0x140224c26\nmov     r8d, [rsi+3F4h]                                                ; +0xcc, 0x140224c2c\nlea     rdx, aGlm24; \"GLM_24\"                                          ; +0xd3, 0x140224c33\nmov     rcx, rdi                                                       ; +0xda, 0x140224c3a\ncall    cs:?setIntegerForKey@DS_Dictionary@@QEAAXPEBDH@Z; DS_Dictionary::setIntegerForKey(char const *,int) ; +0xdd, 0x140224c3d\nmov     r8d, [rsi+3F8h]                                                ; +0xe3, 0x140224c43\nlea     rdx, aGlm25; \"GLM_25\"                                          ; +0xea, 0x140224c4a\nmov     rcx, rdi                                                       ; +0xf1, 0x140224c51\ncall    cs:?setIntegerForKey@DS_Dictionary@@QEAAXPEBDH@Z; DS_Dictionary::setIntegerForKey(char const *,int) ; +0xf4, 0x140224c54\nmov     r8d, [rsi+3FCh]                                                ; +0xfa, 0x140224c5a\nlea     rdx, aGlm26; \"GLM_26\"                                          ; +0x101, 0x140224c61\nmov     rcx, rdi                                                       ; +0x108, 0x140224c68\ncall    cs:?setIntegerForKey@DS_Dictionary@@QEAAXPEBDH@Z; DS_Dictionary::setIntegerForKey(char const *,int) ; +0x10b, 0x140224c6b\nmov     r8d, [rsi+400h]                                                ; +0x111, 0x140224c71\nlea     rdx, aGlm27; \"GLM_27\"                                          ; +0x118, 0x140224c78\nmov     rcx, rdi                                                       ; +0x11f, 0x140224c7f\ncall    cs:?setIntegerForKey@DS_Dictionary@@QEAAXPEBDH@Z; DS_Dictionary::setIntegerForKey(char const *,int) ; +0x122, 0x140224c82\nxor     r8d, r8d                                                       ; +0x128, 0x140224c88\ncmp     [rsi+404h], r8b                                                ; +0x12b, 0x140224c8b\nsetnz   r8b                                                            ; +0x132, 0x140224c92\nlea     rdx, aGlm28; \"GLM_28\"                                          ; +0x136, 0x140224c96\nmov     rcx, rdi                                                       ; +0x13d, 0x140224c9d\ncall    cs:?setIntegerForKey@DS_Dictionary@@QEAAXPEBDH@Z; DS_Dictionary::setIntegerForKey(char const *,int) ; +0x140, 0x140224ca0\nmov     r8, [rsi+408h]                                                 ; +0x146, 0x140224ca6\nlea     rdx, aGlm16; \"GLM_16\"                                          ; +0x14d, 0x140224cad\nmov     rcx, rdi                                                       ; +0x154, 0x140224cb4\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x157, 0x140224cb7\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x15d, 0x140224cbd\nmov     rbp, rax                                                       ; +0x163, 0x140224cc3\nmov     rdx, [rsi+370h]                                                ; +0x166, 0x140224cc6\ntest    rdx, rdx                                                       ; +0x16d, 0x140224ccd\njz      short loc_140224D11                                            ; +0x170, 0x140224cd0\nmov     rdx, [rdx+38h]                                                 ; +0x172, 0x140224cd2\ntest    rdx, rdx                                                       ; +0x176, 0x140224cd6\njz      short loc_140224D11                                            ; +0x179, 0x140224cd9\nmov     rbx, [rdx+120h]                                                ; +0x17b, 0x140224cdb\nnop     dword ptr [rax+00h]                                            ; +0x182, 0x140224ce2\nnop     word ptr [rax+rax+00000000h]                                   ; +0x186, 0x140224ce6\nmov     rdx, [rdx+108h]                                                ; +0x190, 0x140224cf0\nmov     rcx, rbp                                                       ; +0x197, 0x140224cf7\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x19a, 0x140224cfa\nmov     rdx, rbx                                                       ; +0x1a0, 0x140224d00\ntest    rbx, rbx                                                       ; +0x1a3, 0x140224d03\njz      short loc_140224D11                                            ; +0x1a6, 0x140224d06\nmov     rbx, [rbx+120h]                                                ; +0x1a8, 0x140224d08\njmp     short loc_140224CF0                                            ; +0x1af, 0x140224d0f\nmov     r8, rbp                                                        ; +0x1b1, 0x140224d11\nlea     rdx, aGlm22; \"GLM_22\"                                          ; +0x1b4, 0x140224d14\nmov     rcx, rdi                                                       ; +0x1bb, 0x140224d1b\ncall    cs:?setArrayForKey@DS_Dictionary@@QEAAXPEBDPEAVCCArray@cocos2d@@@Z; DS_Dictionary::setArrayForKey(char const *,cocos2d::CCArray *) ; +0x1be, 0x140224d1e\nlea     r8, [rsi+410h]                                                 ; +0x1c4, 0x140224d24\nlea     rdx, aGlm09; \"GLM_09\"                                          ; +0x1cb, 0x140224d2b\nmov     rcx, rdi                                                       ; +0x1d2, 0x140224d32\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> &) ; +0x1d5, 0x140224d35\nmov     rax, cs:qword_14090BFD0                                        ; +0x1db, 0x140224d3b\ntest    rax, rax                                                       ; +0x1e2, 0x140224d42\njnz     short loc_140224D79                                            ; +0x1e5, 0x140224d45\nmov     ecx, 6E8h; Size                                                ; +0x1e7, 0x140224d47\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1ec, 0x140224d4c\nmov     [rsp+28h+arg_0], rax                                           ; +0x1f1, 0x140224d51\nmov     rcx, rax                                                       ; +0x1f6, 0x140224d56\ncall    GameManager__GameManager                                       ; +0x1f9, 0x140224d59\nnop                                                                    ; +0x1fe, 0x140224d5e\nmov     cs:qword_14090BFD0, rax                                        ; +0x1ff, 0x140224d5f\nmov     rcx, [rax]                                                     ; +0x206, 0x140224d66\nmov     rdx, [rcx+48h]                                                 ; +0x209, 0x140224d69\nmov     rcx, rax                                                       ; +0x20d, 0x140224d6d\ncall    rdx                                                            ; +0x210, 0x140224d70\nmov     rax, cs:qword_14090BFD0                                        ; +0x212, 0x140224d72\ncmp     byte ptr [rax+162h], 0                                         ; +0x219, 0x140224d79\njnz     short loc_140224DB0                                            ; +0x220, 0x140224d80\nmov     r8, [rsi+378h]                                                 ; +0x222, 0x140224d82\nlea     rdx, aGlm07; \"GLM_07\"                                          ; +0x229, 0x140224d89\nmov     rcx, rdi                                                       ; +0x230, 0x140224d90\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x233, 0x140224d93\nmov     r8, [rsi+398h]                                                 ; +0x239, 0x140224d99\nlea     rdx, aGlm14; \"GLM_14\"                                          ; +0x240, 0x140224da0\nmov     rcx, rdi                                                       ; +0x247, 0x140224da7\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x24a, 0x140224daa\nmov     r8, [rsi+380h]                                                 ; +0x250, 0x140224db0\nlea     rdx, aGlm12; \"GLM_12\"                                          ; +0x257, 0x140224db7\nmov     rcx, rdi                                                       ; +0x25e, 0x140224dbe\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x261, 0x140224dc1\nmov     r8, [rsi+388h]                                                 ; +0x267, 0x140224dc7\nlea     rdx, aGlm13; \"GLM_13\"                                          ; +0x26e, 0x140224dce\nmov     rcx, rdi                                                       ; +0x275, 0x140224dd5\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x278, 0x140224dd8\nmov     r8, [rsi+390h]                                                 ; +0x27e, 0x140224dde\nlea     rdx, aGlm15; \"GLM_15\"                                          ; +0x285, 0x140224de5\nmov     rcx, rdi                                                       ; +0x28c, 0x140224dec\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x28f, 0x140224def\nmov     r8, [rsi+368h]                                                 ; +0x295, 0x140224df5\nlea     rdx, aGlm06; \"GLM_06\"                                          ; +0x29c, 0x140224dfc\nmov     rcx, rdi                                                       ; +0x2a3, 0x140224e03\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x2a6, 0x140224e06\nmov     r8, [rsi+350h]                                                 ; +0x2ac, 0x140224e0c\nlea     rdx, aGlm08; \"GLM_08\"                                          ; +0x2b3, 0x140224e13\nmov     rcx, rdi                                                       ; +0x2ba, 0x140224e1a\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x2bd, 0x140224e1d\nmov     r8, [rsi+3A0h]                                                 ; +0x2c3, 0x140224e23\nlea     rdx, aGlm18; \"GLM_18\"                                          ; +0x2ca, 0x140224e2a\nmov     rcx, rdi                                                       ; +0x2d1, 0x140224e31\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x2d4, 0x140224e34\nmov     r8, [rsi+3A8h]                                                 ; +0x2da, 0x140224e3a\nlea     rdx, aGlm19; \"GLM_19\"                                          ; +0x2e1, 0x140224e41\nmov     rcx, rdi                                                       ; +0x2e8, 0x140224e48\ncall    cs:?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x2eb, 0x140224e4b\nmov     r8, [rsi+678h]                                                 ; +0x2f1, 0x140224e51\nlea     rdx, aGlm20; \"GLM_20\"                                          ; +0x2f8, 0x140224e58\nmov     rcx, rdi                                                       ; +0x2ff, 0x140224e5f\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x302, 0x140224e62\nmov     rbp, [rsp+28h+arg_10]                                          ; +0x307, 0x140224e67\nmov     rsi, [rsp+28h+arg_18]                                          ; +0x30c, 0x140224e6c\nadd     rsp, 20h                                                       ; +0x311, 0x140224e71\npop     rdi                                                            ; +0x315, 0x140224e75\njmp     cs:?setArrayForKey@DS_Dictionary@@QEAAXPEBDPEAVCCArray@cocos2d@@@Z; DS_Dictionary::setArrayForKey(char const *,cocos2d::CCArray *) ; +0x316, 0x140224e76", "xrefs": ["GameManager::encodeDataTo @ 0x140285ddc", "<???> @ 0x14091bd10"], "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"}