{"type": "func", "start": 6442564720, "end": 6442565410, "name": "DS_Dictionary::loadRootSubDictFromFile", "pseudocode": "// \n// DS_Dictionary::loadRootSubDictFromFile from 0x18001bc70 to 0x18001bf22 (690 bytes)\n// \n// 3 xrefs:\n// > CCContentManager::addDictDS @ 0x180005fd9\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801b8ae8\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:21:26 +0000\n// \n\n// Hidden C++ exception states: #wind=2\n__int64 __fastcall DS_Dictionary::loadRootSubDictFromFile(DS_Dictionary *this, const char *a2)\n{\n  __int64 v4; // rax\n  __int64 v5; // rax\n  struct cocos2d::CCFileUtils *v6; // rax\n  struct cocos2d::CCFileUtils *v7; // rax\n  void **v8; // rdx\n  __int64 v9; // rbx\n  size_t v10; // rax\n  struct cocos2d::CCFileUtils *v11; // rax\n  void **v12; // rdx\n  __int64 buffer; // rax\n  void *v14; // rcx\n  __int64 v15; // rbx\n  __int64 v16; // rax\n  __int64 v17; // rax\n  __int64 v18; // rax\n  unsigned __int8 v19; // bl\n  void *v20; // rcx\n  unsigned int v22; // [rsp+30h] [rbp-49h] BYREF\n  _BYTE v23[8]; // [rsp+38h] [rbp-41h] BYREF\n  _BYTE v24[8]; // [rsp+40h] [rbp-39h] BYREF\n  __int128 v25; // [rsp+48h] [rbp-31h] BYREF\n  __int64 v26; // [rsp+58h] [rbp-21h]\n  _BYTE v27[24]; // [rsp+60h] [rbp-19h] BYREF\n  void *Block[3]; // [rsp+78h] [rbp-1h] BYREF\n  unsigned __int64 v29; // [rsp+90h] [rbp+17h]\n  void *v30[3]; // [rsp+98h] [rbp+1Fh] BYREF\n  unsigned __int64 v31; // [rsp+B0h] [rbp+37h]\n\n  v4 = *((_QWORD *)this + 26);\n  if ( v4 != *((_QWORD *)this + 27) )\n    *((_QWORD *)this + 27) = v4;\n  v5 = cocos2d::CCThread::CCThread((cocos2d::CCThread *)v23);\n  sub_18001C710((char *)this + 208, v5);\n  v6 = cocos2d::CCFileUtils::sharedFileUtils();\n  (*(void (__fastcall **)(struct cocos2d::CCFileUtils *, void **, const char *, _QWORD))(*(_QWORD *)v6 + 40LL))(\n    v6,\n    v30,\n    a2,\n    0);\n  v22 = 0;\n  v7 = cocos2d::CCFileUtils::sharedFileUtils();\n  v8 = v30;\n  if ( v31 > 0xF )\n    v8 = (void **)v30[0];\n  v9 = (*(__int64 (__fastcall **)(struct cocos2d::CCFileUtils *, void **, const char *, unsigned int *))(*(_QWORD *)v7 + 24LL))(\n         v7,\n         v8,\n         \"r\",\n         &v22);\n  pugi::xml_document::load_buffer(this, &v25, v9, v22, 116, 0);\n  if ( !(unsigned __int8)sub_180082410(&v25) || !v9 )\n  {\n    sub_18003D940(Block);\n    v10 = strlen(a2);\n    sub_180007DF0(Block, a2, v10);\n    v22 = 0;\n    v11 = cocos2d::CCFileUtils::sharedFileUtils();\n    v12 = Block;\n    if ( v29 > 0xF )\n      v12 = (void **)Block[0];\n    v9 = (*(__int64 (__fastcall **)(struct cocos2d::CCFileUtils *, void **, const char *, unsigned int *))(*(_QWORD *)v11 + 24LL))(\n           v11,\n           v12,\n           \"r\",\n           &v22);\n    buffer = pugi::xml_document::load_buffer(this, v27, v9, v22, 116, 0);\n    v25 = *(_OWORD *)buffer;\n    v26 = *(_QWORD *)(buffer + 16);\n    if ( v29 > 0xF )\n    {\n      v14 = Block[0];\n      if ( v29 + 1 >= 0x1000 )\n      {\n        v14 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v14 - 8) > 0x1F )\n          invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n      }\n      j_j_free_0(v14);\n    }\n  }\n  if ( (unsigned __int8)sub_180082410(&v25) && v9 )\n  {\n    v15 = *((_QWORD *)this + 27);\n    v16 = sub_180082A40(this, v23, \"plist\");\n    *(_QWORD *)(v15 - 8) = *(_QWORD *)sub_180082A40(v16, v24, \"dict\");\n    v17 = sub_180082A40(this, v24, \"plist\");\n    v18 = sub_1800829C0(v17, v23, \"gjver\");\n    *((_BYTE *)this + 232) = (int)sub_180082940(v18, 0) < 2;\n    v19 = 1;\n  }\n  else\n  {\n    v19 = 0;\n  }\n  if ( v31 > 0xF )\n  {\n    v20 = v30[0];\n    if ( v31 + 1 >= 0x1000 )\n    {\n      v20 = *((void **)v30[0] - 1);\n      if ( (unsigned __int64)((char *)v30[0] - (char *)v20 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free_0(v20);\n  }\n  return v19;\n}", "assembly": "; \n; DS_Dictionary::loadRootSubDictFromFile from 0x18001bc70 to 0x18001bf22 (690 bytes)\n; \n; 3 xrefs:\n; > CCContentManager::addDictDS @ 0x180005fd9\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801b8ae8\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:21:26 +0000\n; \nmov     [rsp-8+arg_10], rbx                                            ; +0x0, 0x18001bc70\nmov     [rsp-8+arg_18], rsi                                            ; +0x5, 0x18001bc75\npush    rbp                                                            ; +0xa, 0x18001bc7a\npush    rdi                                                            ; +0xb, 0x18001bc7b\npush    r14                                                            ; +0xc, 0x18001bc7c\nlea     rbp, [rsp-47h]                                                 ; +0xe, 0x18001bc7e\nsub     rsp, 0C0h                                                      ; +0x13, 0x18001bc83\nmov     rax, cs:__security_cookie                                      ; +0x1a, 0x18001bc8a\nxor     rax, rsp                                                       ; +0x21, 0x18001bc91\nmov     [rbp+57h+var_18], rax                                          ; +0x24, 0x18001bc94\nmov     rsi, rdx                                                       ; +0x28, 0x18001bc98\nmov     rdi, rcx                                                       ; +0x2b, 0x18001bc9b\nmov     rax, [rcx+0D0h]                                                ; +0x2e, 0x18001bc9e\ncmp     rax, [rcx+0D8h]                                                ; +0x35, 0x18001bca5\njz      short loc_18001BCB5                                            ; +0x3c, 0x18001bcac\nmov     [rcx+0D8h], rax                                                ; +0x3e, 0x18001bcae\nlea     rcx, [rbp+57h+var_98]; this                                    ; +0x45, 0x18001bcb5\ncall    ??0CCThread@cocos2d@@QEAA@XZ; cocos2d::CCThread::CCThread(void) ; +0x49, 0x18001bcb9\nmov     rdx, rax                                                       ; +0x4e, 0x18001bcbe\nlea     rcx, [rdi+0D0h]                                                ; +0x51, 0x18001bcc1\ncall    sub_18001C710                                                  ; +0x58, 0x18001bcc8\ncall    ?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0x5d, 0x18001bccd\nmov     rcx, [rax]                                                     ; +0x62, 0x18001bcd2\nmov     r10, [rcx+28h]                                                 ; +0x65, 0x18001bcd5\nxor     r9d, r9d                                                       ; +0x69, 0x18001bcd9\nmov     r8, rsi                                                        ; +0x6c, 0x18001bcdc\nlea     rdx, [rbp+57h+var_38]                                          ; +0x6f, 0x18001bcdf\nmov     rcx, rax                                                       ; +0x73, 0x18001bce3\ncall    r10                                                            ; +0x76, 0x18001bce6\nnop                                                                    ; +0x79, 0x18001bce9\nxor     r14d, r14d                                                     ; +0x7a, 0x18001bcea\nmov     [rbp+57h+var_A0], r14d                                         ; +0x7d, 0x18001bced\ncall    ?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0x81, 0x18001bcf1\nlea     rdx, [rbp+57h+var_38]                                          ; +0x86, 0x18001bcf6\ncmp     [rbp+57h+var_20], 0Fh                                          ; +0x8a, 0x18001bcfa\ncmova   rdx, [rbp+57h+var_38]                                          ; +0x8f, 0x18001bcff\nmov     rcx, [rax]                                                     ; +0x94, 0x18001bd04\nmov     r10, [rcx+18h]                                                 ; +0x97, 0x18001bd07\nlea     r9, [rbp+57h+var_A0]                                           ; +0x9b, 0x18001bd0b\nlea     r8, aR; \"r\"                                                    ; +0x9f, 0x18001bd0f\nmov     rcx, rax                                                       ; +0xa6, 0x18001bd16\ncall    r10                                                            ; +0xa9, 0x18001bd19\nmov     rbx, rax                                                       ; +0xac, 0x18001bd1c\nmov     r9d, [rbp+57h+var_A0]                                          ; +0xaf, 0x18001bd1f\nmov     [rsp+0D0h+var_A8], r14d                                        ; +0xb3, 0x18001bd23\nmov     dword ptr [rsp+0D0h+Reserved], 74h ; 't'                       ; +0xb8, 0x18001bd28\nmov     r8, rax                                                        ; +0xc0, 0x18001bd30\nlea     rdx, [rbp+57h+var_88]                                          ; +0xc3, 0x18001bd33\nmov     rcx, rdi                                                       ; +0xc7, 0x18001bd37\ncall    ?load_buffer@xml_document@pugi@@QEAA?AUxml_parse_result@2@PEBX_KIW4xml_encoding@2@@Z; pugi::xml_document::load_buffer(void const *,unsigned __int64,uint,pugi::xml_encoding) ; +0xca, 0x18001bd3a\nlea     rcx, [rbp+57h+var_88]                                          ; +0xcf, 0x18001bd3f\ncall    sub_180082410                                                  ; +0xd3, 0x18001bd43\ntest    al, al                                                         ; +0xd8, 0x18001bd48\njz      short loc_18001BD55                                            ; +0xda, 0x18001bd4a\ntest    rbx, rbx                                                       ; +0xdc, 0x18001bd4c\njnz     loc_18001BE26                                                  ; +0xdf, 0x18001bd4f\nlea     rcx, [rbp+57h+Block]                                           ; +0xe5, 0x18001bd55\ncall    sub_18003D940                                                  ; +0xe9, 0x18001bd59\nnop                                                                    ; +0xee, 0x18001bd5e\nmov     rcx, rsi; Str                                                  ; +0xef, 0x18001bd5f\ncall    strlen                                                         ; +0xf2, 0x18001bd62\nmov     r8, rax                                                        ; +0xf7, 0x18001bd67\nmov     rdx, rsi                                                       ; +0xfa, 0x18001bd6a\nlea     rcx, [rbp+57h+Block]; Src                                      ; +0xfd, 0x18001bd6d\ncall    sub_180007DF0                                                  ; +0x101, 0x18001bd71\nmov     [rbp+57h+var_A0], r14d                                         ; +0x106, 0x18001bd76\ncall    ?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0x10a, 0x18001bd7a\nlea     rdx, [rbp+57h+Block]                                           ; +0x10f, 0x18001bd7f\ncmp     [rbp+57h+var_40], 0Fh                                          ; +0x113, 0x18001bd83\ncmova   rdx, [rbp+57h+Block]                                           ; +0x118, 0x18001bd88\nmov     rcx, [rax]                                                     ; +0x11d, 0x18001bd8d\nmov     r10, [rcx+18h]                                                 ; +0x120, 0x18001bd90\nlea     r9, [rbp+57h+var_A0]                                           ; +0x124, 0x18001bd94\nlea     r8, aR; \"r\"                                                    ; +0x128, 0x18001bd98\nmov     rcx, rax                                                       ; +0x12f, 0x18001bd9f\ncall    r10                                                            ; +0x132, 0x18001bda2\nmov     rbx, rax                                                       ; +0x135, 0x18001bda5\nmov     r9d, [rbp+57h+var_A0]                                          ; +0x138, 0x18001bda8\nmov     [rsp+0D0h+var_A8], r14d                                        ; +0x13c, 0x18001bdac\nmov     dword ptr [rsp+0D0h+Reserved], 74h ; 't'                       ; +0x141, 0x18001bdb1\nmov     r8, rax                                                        ; +0x149, 0x18001bdb9\nlea     rdx, [rbp+57h+var_70]                                          ; +0x14c, 0x18001bdbc\nmov     rcx, rdi                                                       ; +0x150, 0x18001bdc0\ncall    ?load_buffer@xml_document@pugi@@QEAA?AUxml_parse_result@2@PEBX_KIW4xml_encoding@2@@Z; pugi::xml_document::load_buffer(void const *,unsigned __int64,uint,pugi::xml_encoding) ; +0x153, 0x18001bdc3\nmovups  xmm0, xmmword ptr [rax]                                        ; +0x158, 0x18001bdc8\nmovups  [rbp+57h+var_88], xmm0                                         ; +0x15b, 0x18001bdcb\nmovsd   xmm1, qword ptr [rax+10h]                                      ; +0x15f, 0x18001bdcf\nmovsd   [rbp+57h+var_78], xmm1                                         ; +0x164, 0x18001bdd4\nmov     rdx, [rbp+57h+var_40]                                          ; +0x169, 0x18001bdd9\ncmp     rdx, 0Fh                                                       ; +0x16d, 0x18001bddd\njbe     short loc_18001BE26                                            ; +0x171, 0x18001bde1\ninc     rdx                                                            ; +0x173, 0x18001bde3\nmov     rcx, [rbp+57h+Block]; Block                                    ; +0x176, 0x18001bde6\nmov     rax, rcx                                                       ; +0x17a, 0x18001bdea\ncmp     rdx, 1000h                                                     ; +0x17d, 0x18001bded\njb      short loc_18001BE21                                            ; +0x184, 0x18001bdf4\nadd     rdx, 27h ; '''                                                 ; +0x186, 0x18001bdf6\nmov     rcx, [rcx-8]                                                   ; +0x18a, 0x18001bdfa\nsub     rax, rcx                                                       ; +0x18e, 0x18001bdfe\nsub     rax, 8                                                         ; +0x191, 0x18001be01\ncmp     rax, 1Fh                                                       ; +0x195, 0x18001be05\njbe     short loc_18001BE21                                            ; +0x199, 0x18001be09\nmov     [rsp+0D0h+Reserved], r14; Reserved                             ; +0x19b, 0x18001be0b\nxor     r9d, r9d; LineNo                                               ; +0x1a0, 0x18001be10\nxor     r8d, r8d; FileName                                             ; +0x1a3, 0x18001be13\nxor     edx, edx; FunctionName                                         ; +0x1a6, 0x18001be16\nxor     ecx, ecx; Expression                                           ; +0x1a8, 0x18001be18\ncall    cs:_invoke_watson                                              ; +0x1aa, 0x18001be1a\ndb 0CCh                                                                ; +0x1b0, 0x18001be20\ncall    j_j_free_0                                                     ; +0x1b1, 0x18001be21\nlea     rcx, [rbp+57h+var_88]                                          ; +0x1b6, 0x18001be26\ncall    sub_180082410                                                  ; +0x1ba, 0x18001be2a\ntest    al, al                                                         ; +0x1bf, 0x18001be2f\njz      short loc_18001BEAC                                            ; +0x1c1, 0x18001be31\ntest    rbx, rbx                                                       ; +0x1c3, 0x18001be33\njz      short loc_18001BEAC                                            ; +0x1c6, 0x18001be36\nmov     rbx, [rdi+0D8h]                                                ; +0x1c8, 0x18001be38\nlea     r8, aPlist; \"plist\"                                            ; +0x1cf, 0x18001be3f\nlea     rdx, [rbp+57h+var_98]                                          ; +0x1d6, 0x18001be46\nmov     rcx, rdi                                                       ; +0x1da, 0x18001be4a\ncall    sub_180082A40                                                  ; +0x1dd, 0x18001be4d\nmov     rcx, rax                                                       ; +0x1e2, 0x18001be52\nlea     r8, aDict_1; \"dict\"                                            ; +0x1e5, 0x18001be55\nlea     rdx, [rbp+57h+var_90]                                          ; +0x1ec, 0x18001be5c\ncall    sub_180082A40                                                  ; +0x1f0, 0x18001be60\nmov     rcx, [rax]                                                     ; +0x1f5, 0x18001be65\nmov     [rbx-8], rcx                                                   ; +0x1f8, 0x18001be68\nlea     r8, aPlist; \"plist\"                                            ; +0x1fc, 0x18001be6c\nlea     rdx, [rbp+57h+var_90]                                          ; +0x203, 0x18001be73\nmov     rcx, rdi                                                       ; +0x207, 0x18001be77\ncall    sub_180082A40                                                  ; +0x20a, 0x18001be7a\nmov     rcx, rax                                                       ; +0x20f, 0x18001be7f\nlea     r8, aGjver; \"gjver\"                                            ; +0x212, 0x18001be82\nlea     rdx, [rbp+57h+var_98]                                          ; +0x219, 0x18001be89\ncall    sub_1800829C0                                                  ; +0x21d, 0x18001be8d\nmov     rcx, rax                                                       ; +0x222, 0x18001be92\nxor     edx, edx                                                       ; +0x225, 0x18001be95\ncall    sub_180082940                                                  ; +0x227, 0x18001be97\ncmp     eax, 2                                                         ; +0x22c, 0x18001be9c\nsetl    al                                                             ; +0x22f, 0x18001be9f\nmov     [rdi+0E8h], al                                                 ; +0x232, 0x18001bea2\nmov     bl, 1                                                          ; +0x238, 0x18001bea8\njmp     short loc_18001BEAE                                            ; +0x23a, 0x18001beaa\nxor     bl, bl                                                         ; +0x23c, 0x18001beac\nmov     rdx, [rbp+57h+var_20]                                          ; +0x23e, 0x18001beae\ncmp     rdx, 0Fh                                                       ; +0x242, 0x18001beb2\njbe     short loc_18001BEFB                                            ; +0x246, 0x18001beb6\ninc     rdx                                                            ; +0x248, 0x18001beb8\nmov     rcx, [rbp+57h+var_38]; Block                                   ; +0x24b, 0x18001bebb\nmov     rax, rcx                                                       ; +0x24f, 0x18001bebf\ncmp     rdx, 1000h                                                     ; +0x252, 0x18001bec2\njb      short loc_18001BEF6                                            ; +0x259, 0x18001bec9\nadd     rdx, 27h ; '''                                                 ; +0x25b, 0x18001becb\nmov     rcx, [rcx-8]                                                   ; +0x25f, 0x18001becf\nsub     rax, rcx                                                       ; +0x263, 0x18001bed3\nsub     rax, 8                                                         ; +0x266, 0x18001bed6\ncmp     rax, 1Fh                                                       ; +0x26a, 0x18001beda\njbe     short loc_18001BEF6                                            ; +0x26e, 0x18001bede\nmov     [rsp+0D0h+Reserved], r14; Reserved                             ; +0x270, 0x18001bee0\nxor     r9d, r9d; LineNo                                               ; +0x275, 0x18001bee5\nxor     r8d, r8d; FileName                                             ; +0x278, 0x18001bee8\nxor     edx, edx; FunctionName                                         ; +0x27b, 0x18001beeb\nxor     ecx, ecx; Expression                                           ; +0x27d, 0x18001beed\ncall    cs:_invoke_watson                                              ; +0x27f, 0x18001beef\nalign 2                                                                ; +0x285, 0x18001bef5\ncall    j_j_free_0                                                     ; +0x286, 0x18001bef6\nmovzx   eax, bl                                                        ; +0x28b, 0x18001befb\nmov     rcx, [rbp+57h+var_18]                                          ; +0x28e, 0x18001befe\nxor     rcx, rsp; StackCookie                                          ; +0x292, 0x18001bf02\ncall    __security_check_cookie                                        ; +0x295, 0x18001bf05\nlea     r11, [rsp+0D0h+var_10]                                         ; +0x29a, 0x18001bf0a\nmov     rbx, [r11+30h]                                                 ; +0x2a2, 0x18001bf12\nmov     rsi, [r11+38h]                                                 ; +0x2a6, 0x18001bf16\nmov     rsp, r11                                                       ; +0x2aa, 0x18001bf1a\npop     r14                                                            ; +0x2ad, 0x18001bf1d\npop     rdi                                                            ; +0x2af, 0x18001bf1f\npop     rbp                                                            ; +0x2b0, 0x18001bf20\nretn                                                                   ; +0x2b1, 0x18001bf21", "xrefs": ["CCContentManager::addDictDS @ 0x180005fd9", "<???> @ 0x18014cf68", "<???> @ 0x1801b8ae8"], "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"}