{"type": "func", "start": 6286352, "end": 6286662, "name": "DS_Dictionary::loadRootSubDictFromFile", "pseudocode": "// \n// DS_Dictionary::loadRootSubDictFromFile from 0x5fec10 to 0x5fed46 (310 bytes)\n// \n// 4 xrefs:\n// > CCAnimateFrameCache::addSpriteFramesWithFile @ 0x2e4c52\n// > CCAnimateFrameCache::addCustomSpriteFramesWithFile @ 0x2e5072\n// > CCContentManager::addDict @ 0x5fc3ec\n// > CCContentManager::addDictDS @ 0x5fc48c\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\nbool DS_Dictionary::loadRootSubDictFromFile(DS_Dictionary *a1, const char *a2)\n{\n  char **p_dictTree; // r9\n  cocos2d::CCFileUtils *v5; // r0\n  cocos2d::CCFileUtils *v6; // r0\n  int v7; // r7\n  int v8; // r1\n  int v9; // r4\n  cocos2d::CCFileUtils *v11; // r0\n  _DWORD *v12; // r7\n  _DWORD v13[5]; // [sp+10h] [bp-34h] BYREF\n  int v14; // [sp+24h] [bp-20h] BYREF\n  int v15; // [sp+28h] [bp-1Ch] BYREF\n  pugi::xml_node v16; // [sp+2Ch] [bp-18h] BYREF\n  pugi::xml_node v17[3]; // [sp+30h] [bp-14h] BYREF\n\n  p_dictTree = (char **)&a1->dictTree;\n  a1->dictTree.m_finish = a1->dictTree.m_start;\n  pugi::xml_node::xml_node(v17);\n  std::vector<pugi::xml_node>::emplace_back<pugi::xml_node>(p_dictTree, v17);\n  v5 = cocos2d::CCFileUtils::sharedFileUtils();\n  ((void (__fastcall *)(int *, cocos2d::CCFileUtils *, const char *, _DWORD))v5->createCCArrayWithContentsOfFile)(\n    &v14,\n    v5,\n    a2,\n    0);\n  v15 = 0;\n  v6 = cocos2d::CCFileUtils::sharedFileUtils();\n  v7 = ((int (__fastcall *)(cocos2d::CCFileUtils *, int, __int16 *, int *))v6->addSearchResolutionsOrder)(\n         v6,\n         v14,\n         &aO1i2r3e45s7t89[4],\n         &v15);\n  pugi::xml_document::load_buffer((int)v17, &a1->doc, v7, v15, 116, 0);\n  if ( !pugi::xml_parse_result::operator bool(v17) || !v7 )\n  {\n    FileOperation::getFilePath((FileOperation *)&v16, v8);\n    sub_774544((int)&v16, (char *)a2);\n    v15 = 0;\n    v11 = cocos2d::CCFileUtils::sharedFileUtils();\n    v7 = ((int (__fastcall *)(cocos2d::CCFileUtils *, pugi::xml_node_struct *, __int16 *, int *))v11->addSearchResolutionsOrder)(\n           v11,\n           v16._root,\n           &aO1i2r3e45s7t89[4],\n           &v15);\n    pugi::xml_document::load_buffer((int)v13, &a1->doc, v7, v15, 116, 0);\n    v17[0] = (pugi::xml_node)v13[0];\n    v17[1] = (pugi::xml_node)v13[1];\n    v17[2] = (pugi::xml_node)v13[2];\n    sub_774008(&v16);\n  }\n  v9 = pugi::xml_parse_result::operator bool(v17);\n  if ( v9 )\n  {\n    if ( v7 )\n    {\n      v12 = (_DWORD *)std::vector<pugi::xml_node>::back((int)p_dictTree);\n      v16._root = (pugi::xml_node_struct *)pugi::xml_node::child(&a1->doc, \"plist\");\n      *v12 = pugi::xml_node::child(&v16, \"dict\");\n      DS_Dictionary::checkCompatibility(a1);\n    }\n    else\n    {\n      LOBYTE(v9) = 0;\n    }\n  }\n  sub_774008(&v14);\n  return v9;\n}", "assembly": "; \n; DS_Dictionary::loadRootSubDictFromFile from 0x5fec10 to 0x5fed46 (310 bytes)\n; \n; 4 xrefs:\n; > CCAnimateFrameCache::addSpriteFramesWithFile @ 0x2e4c52\n; > CCAnimateFrameCache::addCustomSpriteFramesWithFile @ 0x2e5072\n; > CCContentManager::addDict @ 0x5fc3ec\n; > CCContentManager::addDictDS @ 0x5fc48c\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.W          {R4-R11,LR}                                            ; +0x0, 0x5fec10\nSUB             SP, SP, #0x44                                          ; +0x4, 0x5fec14\nLDR             R6, =(__stack_chk_guard_ptr - 0x5FEC24)                ; +0x6, 0x5fec16\nADD             R4, SP, #0x44+var_14                                   ; +0x8, 0x5fec18\nADD.W           R9, R0, #0xC8                                          ; +0xa, 0x5fec1a\nMOV             R5, R0                                                 ; +0xe, 0x5fec1e\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0x10, 0x5fec20\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x12, 0x5fec22\nMOV             R11, R1                                                ; +0x14, 0x5fec24\nADD.W           R10, SP, #0x44+var_20                                  ; +0x16, 0x5fec26\nADD.W           R8, SP, #0x44+var_4                                    ; +0x1a, 0x5fec2a\nLDR             R3, [R6]                                               ; +0x1e, 0x5fec2e\nSTR             R3, [SP,#0x44+var_8]                                   ; +0x20, 0x5fec30\nLDR.W           R3, [R0,#0xC8]                                         ; +0x22, 0x5fec32\nSTR.W           R3, [R0,#0xCC]                                         ; +0x26, 0x5fec36\nMOV             R0, R4; this                                           ; +0x2a, 0x5fec3a\nBL              _ZN4pugi8xml_nodeC1Ev; pugi::xml_node::xml_node(void)  ; +0x2c, 0x5fec3c\nMOV             R1, R4                                                 ; +0x30, 0x5fec40\nMOV             R0, R9                                                 ; +0x32, 0x5fec42\nBL              _ZNSt6vectorIN4pugi8xml_nodeESaIS1_EE12emplace_backIJS1_EEEvDpOT_; std::vector<pugi::xml_node>::emplace_back<pugi::xml_node>(pugi::xml_node &&) ; +0x34, 0x5fec44\nBL              _ZN7cocos2d11CCFileUtils15sharedFileUtilsEv; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0x38, 0x5fec48\nMOV             R2, R11                                                ; +0x3c, 0x5fec4c\nLDR             R3, [R0]                                               ; +0x3e, 0x5fec4e\nMOV             R1, R0                                                 ; +0x40, 0x5fec50\nMOV             R0, R10                                                ; +0x42, 0x5fec52\nLDR             R7, [R3,#0x18]                                         ; +0x44, 0x5fec54\nMOVS            R3, #0                                                 ; +0x46, 0x5fec56\nBLX             R7                                                     ; +0x48, 0x5fec58\nMOV.W           R12, #0                                                ; +0x4a, 0x5fec5a\nSTR.W           R12, [R8,#-0x18]!                                      ; +0x4e, 0x5fec5e\nSTR.W           R12, [SP,#0x44+var_38]                                 ; +0x52, 0x5fec62\nBL              _ZN7cocos2d11CCFileUtils15sharedFileUtilsEv; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0x56, 0x5fec66\nLDR             R2, =(aO1i2r3e45s7t89+8 - 0x5FEC72); \"r3e45s7t89g\"     ; +0x5a, 0x5fec6a\nLDR             R1, [SP,#0x44+var_20]                                  ; +0x5c, 0x5fec6c\nADD             R2, PC; \"r3e45s7t89g\"                                  ; +0x5e, 0x5fec6e\nLDR             R3, [R0]                                               ; +0x60, 0x5fec70\nLDR             R7, [R3,#0x10]                                         ; +0x62, 0x5fec72\nMOV             R3, R8                                                 ; +0x64, 0x5fec74\nBLX             R7                                                     ; +0x66, 0x5fec76\nLDR.W           R12, [SP,#0x44+var_38]                                 ; +0x68, 0x5fec78\nMOVS            R3, #0x74 ; 't'                                        ; +0x6c, 0x5fec7c\nMOV             R1, R5; this                                           ; +0x6e, 0x5fec7e\nSTR             R3, [SP,#0x44+var_44]; int                             ; +0x70, 0x5fec80\nSTR.W           R12, [SP,#0x44+var_40]; int                            ; +0x72, 0x5fec82\nLDR             R3, [SP,#0x44+var_1C]; int                             ; +0x76, 0x5fec86\nMOV             R7, R0                                                 ; +0x78, 0x5fec88\nMOV             R0, R4; int                                            ; +0x7a, 0x5fec8a\nMOV             R2, R7; int                                            ; +0x7c, 0x5fec8c\nBL              _ZN4pugi12xml_document11load_bufferEPKvjjNS_12xml_encodingE; pugi::xml_document::load_buffer(void const*,uint,uint,pugi::xml_encoding) ; +0x7e, 0x5fec8e\nMOV             R0, R4                                                 ; +0x82, 0x5fec92\nBL              _ZNK4pugi16xml_parse_resultcvbEv; pugi::xml_parse_result::operator bool(void) ; +0x84, 0x5fec94\nSTR             R6, [SP,#0x44+var_38]                                  ; +0x88, 0x5fec98\nCBZ             R0, loc_5FECC2                                         ; +0x8a, 0x5fec9a\nCBZ             R7, loc_5FECC2                                         ; +0x8c, 0x5fec9c\nMOV             R0, R4                                                 ; +0x8e, 0x5fec9e\nBL              _ZNK4pugi16xml_parse_resultcvbEv; pugi::xml_parse_result::operator bool(void) ; +0x90, 0x5feca0\nMOV             R4, R0                                                 ; +0x94, 0x5feca4\nCBZ             R0, loc_5FECAC                                         ; +0x96, 0x5feca6\nCBNZ            R7, loc_5FED14                                         ; +0x98, 0x5feca8\nMOV             R4, R7                                                 ; +0x9a, 0x5fecaa\nMOV             R0, R10                                                ; +0x9c, 0x5fecac\nBL              sub_774008                                             ; +0x9e, 0x5fecae\nLDR             R3, [SP,#0x44+var_38]                                  ; +0xa2, 0x5fecb2\nLDR             R2, [SP,#0x44+var_8]                                   ; +0xa4, 0x5fecb4\nMOV             R0, R4                                                 ; +0xa6, 0x5fecb6\nLDR             R3, [R3]                                               ; +0xa8, 0x5fecb8\nCMP             R2, R3                                                 ; +0xaa, 0x5fecba\nBEQ             loc_5FED40                                             ; +0xac, 0x5fecbc\nBLX             __stack_chk_fail                                       ; +0xae, 0x5fecbe\nADD             R6, SP, #0x44+var_18                                   ; +0xb2, 0x5fecc2\nMOV             R0, R6; this                                           ; +0xb4, 0x5fecc4\nBL              _ZN13FileOperation11getFilePathEv; FileOperation::getFilePath(void) ; +0xb6, 0x5fecc6\nMOV             R1, R11; char *                                        ; +0xba, 0x5fecca\nMOV             R0, R6; int                                            ; +0xbc, 0x5feccc\nMOV.W           R11, #0                                                ; +0xbe, 0x5fecce\nBL              sub_774544                                             ; +0xc2, 0x5fecd2\nSTR.W           R11, [SP,#0x44+var_1C]                                 ; +0xc6, 0x5fecd6\nBL              _ZN7cocos2d11CCFileUtils15sharedFileUtilsEv; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0xca, 0x5fecda\nLDR             R2, =(aO1i2r3e45s7t89+8 - 0x5FECE6); \"r3e45s7t89g\"     ; +0xce, 0x5fecde\nLDR             R1, [SP,#0x44+var_18]                                  ; +0xd0, 0x5fece0\nADD             R2, PC; \"r3e45s7t89g\"                                  ; +0xd2, 0x5fece2\nLDR             R3, [R0]                                               ; +0xd4, 0x5fece4\nLDR             R7, [R3,#0x10]                                         ; +0xd6, 0x5fece6\nMOV             R3, R8                                                 ; +0xd8, 0x5fece8\nBLX             R7                                                     ; +0xda, 0x5fecea\nADD.W           R8, SP, #0x44+var_34                                   ; +0xdc, 0x5fecec\nMOV             R1, R5; this                                           ; +0xe0, 0x5fecf0\nMOVS            R3, #0x74 ; 't'                                        ; +0xe2, 0x5fecf2\nSTMEA.W         SP, {R3,R11}                                           ; +0xe4, 0x5fecf4\nLDR             R3, [SP,#0x44+var_1C]; int                             ; +0xe8, 0x5fecf8\nMOV             R7, R0                                                 ; +0xea, 0x5fecfa\nMOV             R0, R8; int                                            ; +0xec, 0x5fecfc\nMOV             R2, R7; int                                            ; +0xee, 0x5fecfe\nBL              _ZN4pugi12xml_document11load_bufferEPKvjjNS_12xml_encodingE; pugi::xml_document::load_buffer(void const*,uint,uint,pugi::xml_encoding) ; +0xf0, 0x5fed00\nLDM.W           R8, {R0-R2}                                            ; +0xf4, 0x5fed04\nSTM.W           R4, {R0-R2}                                            ; +0xf8, 0x5fed08\nMOV             R0, R6                                                 ; +0xfc, 0x5fed0c\nBL              sub_774008                                             ; +0xfe, 0x5fed0e\nB               loc_5FEC9E                                             ; +0x102, 0x5fed12\nMOV             R0, R9                                                 ; +0x104, 0x5fed14\nBL              _ZNSt6vectorIN4pugi8xml_nodeESaIS1_EE4backEv; std::vector<pugi::xml_node>::back(void) ; +0x106, 0x5fed16\nLDR             R1, =(aPlist_0 - 0x5FED20); \"plist\"                    ; +0x10a, 0x5fed1a\nADD             R1, PC; \"plist\"                                        ; +0x10c, 0x5fed1c\nMOV             R7, R0                                                 ; +0x10e, 0x5fed1e\nMOV             R0, R5; this                                           ; +0x110, 0x5fed20\nBL              _ZNK4pugi8xml_node5childEPKc; pugi::xml_node::child(char const*) ; +0x112, 0x5fed22\nADD             R3, SP, #0x44+var_4                                    ; +0x116, 0x5fed26\nLDR             R1, =(aDict_1 - 0x5FED2E); \"dict\"                      ; +0x118, 0x5fed28\nADD             R1, PC; \"dict\"                                         ; +0x11a, 0x5fed2a\nSTR.W           R0, [R3,#-0x14]!                                       ; +0x11c, 0x5fed2c\nMOV             R0, R3; this                                           ; +0x120, 0x5fed30\nBL              _ZNK4pugi8xml_node5childEPKc; pugi::xml_node::child(char const*) ; +0x122, 0x5fed32\nSTR             R0, [R7]                                               ; +0x126, 0x5fed36\nMOV             R0, R5; this                                           ; +0x128, 0x5fed38\nBL              _ZN13DS_Dictionary18checkCompatibilityEv; DS_Dictionary::checkCompatibility(void) ; +0x12a, 0x5fed3a\nB               loc_5FECAC                                             ; +0x12e, 0x5fed3e\nADD             SP, SP, #0x44 ; 'D'                                    ; +0x130, 0x5fed40\nPOP.W           {R4-R11,PC}                                            ; +0x132, 0x5fed42", "xrefs": ["CCAnimateFrameCache::addSpriteFramesWithFile @ 0x2e4c52", "CCAnimateFrameCache::addCustomSpriteFramesWithFile @ 0x2e5072", "CCContentManager::addDict @ 0x5fc3ec", "CCContentManager::addDictDS @ 0x5fc48c"], "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"}