{"type": "func", "start": 6443117280, "end": 6443117651, "name": "sub_1800A2AE0", "pseudocode": "// \n// sub_1800A2AE0 from 0x1800a2ae0 to 0x1800a2c53 (371 bytes)\n// \n// 9 xrefs:\n// > cocos2d::CCUserDefault::getBoolForKey @ 0x1800a25ad\n// > cocos2d::CCUserDefault::getDoubleForKey @ 0x1800a264d\n// > cocos2d::CCUserDefault::getIntegerForKey @ 0x1800a271c\n// > cocos2d::CCUserDefault::getStringForKey @ 0x1800a2895\n// > cocos2d::CCUserDefault::setBoolForKey @ 0x1800a2ffd\n// > cocos2d::CCUserDefault::setDoubleForKey @ 0x1800a3186\n// > cocos2d::CCUserDefault::setIntegerForKey @ 0x1800a32c1\n// > cocos2d::CCUserDefault::setStringForKey @ 0x1800a33cf\n// > <???> @ 0x1801c18cc\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:22:14 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nconst struct tinyxml2::XMLElement *__fastcall sub_1800A2AE0(char *Str2, tinyxml2::XMLNode **a2, tinyxml2::XMLNode **a3)\n{\n  const struct tinyxml2::XMLElement *i; // rbx\n  __int64 v8; // rax\n  tinyxml2::XMLNode *v9; // rsi\n  char **v10; // rbp\n  const char *v11; // rcx\n  FILE *v12; // rax\n  struct cocos2d::CCFileUtils *v13; // rax\n  __int64 v14; // rax\n  void *v15; // rbp\n  tinyxml2::XMLNode *ChildElement; // rax\n  const char *Str; // rax\n  unsigned int v18; // [rsp+50h] [rbp+8h] BYREF\n  cocos2d::CCUserDefault *v19; // [rsp+68h] [rbp+20h]\n\n  i = nullptr;\n  if ( !Str2 )\n    return nullptr;\n  v8 = sub_1800E4AC0(0x280u);\n  v19 = (cocos2d::CCUserDefault *)v8;\n  if ( v8 )\n    v9 = (tinyxml2::XMLNode *)tinyxml2::XMLDocument::XMLDocument(v8, 1, 0);\n  else\n    v9 = nullptr;\n  *a3 = v9;\n  cocos2d::CCUserDefault::initXMLFilePath();\n  v10 = &cocos2d::CCUserDefault::m_sFilePath;\n  v11 = (const char *)&cocos2d::CCUserDefault::m_sFilePath;\n  if ( *((_QWORD *)&xmmword_1801B2AA0 + 1) > 0xFu )\n    v11 = cocos2d::CCUserDefault::m_sFilePath;\n  v12 = fopen(v11, \"r\");\n  if ( v12 )\n  {\n    fclose(v12);\n    goto LABEL_11;\n  }\n  if ( cocos2d::CCUserDefault::createXMLFile() )\n  {\nLABEL_11:\n    if ( !cocos2d::CCUserDefault::m_spUserDefault )\n    {\n      v19 = (cocos2d::CCUserDefault *)sub_1800E4AC0(1u);\n      cocos2d::CCUserDefault::m_spUserDefault = v19;\n    }\n  }\n  v13 = cocos2d::CCFileUtils::sharedFileUtils();\n  if ( *((_QWORD *)&xmmword_1801B2AA0 + 1) > 0xFu )\n    v10 = (char **)cocos2d::CCUserDefault::m_sFilePath;\n  v14 = (*(__int64 (__fastcall **)(struct cocos2d::CCFileUtils *, char **, const char *, unsigned int *))(*(_QWORD *)v13 + 24LL))(\n          v13,\n          v10,\n          \"rb\",\n          &v18);\n  v15 = (void *)v14;\n  if ( v14 )\n  {\n    tinyxml2::XMLDocument::Parse((__int64)v9, v14, v18);\n    j_j_free_0(v15);\n    ChildElement = tinyxml2::XMLNode::FirstChildElement(v9, nullptr);\n    *a2 = ChildElement;\n    if ( ChildElement )\n    {\n      for ( i = tinyxml2::XMLNode::FirstChildElement(ChildElement, nullptr);\n            i;\n            i = tinyxml2::XMLNode::NextSiblingElement(i, nullptr) )\n      {\n        Str = tinyxml2::StrPair::GetStr((const struct tinyxml2::XMLElement *)((char *)i + 24));\n        if ( !strcmp(Str, Str2) )\n          break;\n      }\n    }\n  }\n  return i;\n}", "assembly": "; \n; sub_1800A2AE0 from 0x1800a2ae0 to 0x1800a2c53 (371 bytes)\n; \n; 9 xrefs:\n; > cocos2d::CCUserDefault::getBoolForKey @ 0x1800a25ad\n; > cocos2d::CCUserDefault::getDoubleForKey @ 0x1800a264d\n; > cocos2d::CCUserDefault::getIntegerForKey @ 0x1800a271c\n; > cocos2d::CCUserDefault::getStringForKey @ 0x1800a2895\n; > cocos2d::CCUserDefault::setBoolForKey @ 0x1800a2ffd\n; > cocos2d::CCUserDefault::setDoubleForKey @ 0x1800a3186\n; > cocos2d::CCUserDefault::setIntegerForKey @ 0x1800a32c1\n; > cocos2d::CCUserDefault::setStringForKey @ 0x1800a33cf\n; > <???> @ 0x1801c18cc\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:22:14 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1800a2ae0\npush    rbp                                                            ; +0x5, 0x1800a2ae5\npush    rsi                                                            ; +0x6, 0x1800a2ae6\npush    rdi                                                            ; +0x7, 0x1800a2ae7\npush    r14                                                            ; +0x8, 0x1800a2ae8\npush    r15                                                            ; +0xa, 0x1800a2aea\nsub     rsp, 20h                                                       ; +0xc, 0x1800a2aec\nmov     r14, r8                                                        ; +0x10, 0x1800a2af0\nmov     r15, rdx                                                       ; +0x13, 0x1800a2af3\nmov     rdi, rcx                                                       ; +0x16, 0x1800a2af6\nxor     ebx, ebx                                                       ; +0x19, 0x1800a2af9\ntest    rcx, rcx                                                       ; +0x1b, 0x1800a2afb\njnz     short loc_1800A2B13                                            ; +0x1e, 0x1800a2afe\nxor     eax, eax                                                       ; +0x20, 0x1800a2b00\nmov     rbx, [rsp+48h+arg_8]                                           ; +0x22, 0x1800a2b02\nadd     rsp, 20h                                                       ; +0x27, 0x1800a2b07\npop     r15                                                            ; +0x2b, 0x1800a2b0b\npop     r14                                                            ; +0x2d, 0x1800a2b0d\npop     rdi                                                            ; +0x2f, 0x1800a2b0f\npop     rsi                                                            ; +0x30, 0x1800a2b10\npop     rbp                                                            ; +0x31, 0x1800a2b11\nretn                                                                   ; +0x32, 0x1800a2b12\nmov     ecx, 280h; Size                                                ; +0x33, 0x1800a2b13\ncall    sub_1800E4AC0                                                  ; +0x38, 0x1800a2b18\nmov     [rsp+48h+arg_18], rax                                          ; +0x3d, 0x1800a2b1d\ntest    rax, rax                                                       ; +0x42, 0x1800a2b22\njz      short loc_1800A2B39                                            ; +0x45, 0x1800a2b25\nxor     r8d, r8d                                                       ; +0x47, 0x1800a2b27\nmov     dl, 1                                                          ; +0x4a, 0x1800a2b2a\nmov     rcx, rax                                                       ; +0x4c, 0x1800a2b2c\ncall    ??0XMLDocument@tinyxml2@@QEAA@_NW4Whitespace@1@@Z; tinyxml2::XMLDocument::XMLDocument(bool,tinyxml2::Whitespace) ; +0x4f, 0x1800a2b2f\nmov     rsi, rax                                                       ; +0x54, 0x1800a2b34\njmp     short loc_1800A2B3C                                            ; +0x57, 0x1800a2b37\nmov     rsi, rbx                                                       ; +0x59, 0x1800a2b39\nmov     [r14], rsi                                                     ; +0x5c, 0x1800a2b3c\ncall    ?initXMLFilePath@CCUserDefault@cocos2d@@CAXXZ; cocos2d::CCUserDefault::initXMLFilePath(void) ; +0x5f, 0x1800a2b3f\nlea     rbp, ?m_sFilePath@CCUserDefault@cocos2d@@0V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A; std::string cocos2d::CCUserDefault::m_sFilePath ; +0x64, 0x1800a2b44\nmov     rcx, rbp                                                       ; +0x6b, 0x1800a2b4b\ncmp     qword ptr cs:xmmword_1801B2AA0+8, 0Fh                          ; +0x6e, 0x1800a2b4e\ncmova   rcx, cs:?m_sFilePath@CCUserDefault@cocos2d@@0V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A; FileName ; +0x76, 0x1800a2b56\nlea     rdx, aR; \"r\"                                                   ; +0x7e, 0x1800a2b5e\ncall    cs:fopen                                                       ; +0x85, 0x1800a2b65\ntest    rax, rax                                                       ; +0x8b, 0x1800a2b6b\njz      short loc_1800A2B7B                                            ; +0x8e, 0x1800a2b6e\nmov     rcx, rax; Stream                                               ; +0x90, 0x1800a2b70\ncall    cs:fclose                                                      ; +0x93, 0x1800a2b73\njmp     short loc_1800A2B84                                            ; +0x99, 0x1800a2b79\ncall    ?createXMLFile@CCUserDefault@cocos2d@@CA_NXZ; cocos2d::CCUserDefault::createXMLFile(void) ; +0x9b, 0x1800a2b7b\ntest    al, al                                                         ; +0xa0, 0x1800a2b80\njz      short loc_1800A2BA4                                            ; +0xa2, 0x1800a2b82\ncmp     cs:?m_spUserDefault@CCUserDefault@cocos2d@@0PEAV12@EA, 0; cocos2d::CCUserDefault * cocos2d::CCUserDefault::m_spUserDefault ; +0xa4, 0x1800a2b84\njnz     short loc_1800A2BA4                                            ; +0xac, 0x1800a2b8c\nmov     ecx, 1; Size                                                   ; +0xae, 0x1800a2b8e\ncall    sub_1800E4AC0                                                  ; +0xb3, 0x1800a2b93\nmov     [rsp+48h+arg_18], rax                                          ; +0xb8, 0x1800a2b98\nmov     cs:?m_spUserDefault@CCUserDefault@cocos2d@@0PEAV12@EA, rax; cocos2d::CCUserDefault * cocos2d::CCUserDefault::m_spUserDefault ; +0xbd, 0x1800a2b9d\ncall    ?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0xc4, 0x1800a2ba4\nmov     rcx, rax                                                       ; +0xc9, 0x1800a2ba9\ncmp     qword ptr cs:xmmword_1801B2AA0+8, 0Fh                          ; +0xcc, 0x1800a2bac\ncmova   rbp, cs:?m_sFilePath@CCUserDefault@cocos2d@@0V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A; std::string cocos2d::CCUserDefault::m_sFilePath ; +0xd4, 0x1800a2bb4\nmov     rax, [rax]                                                     ; +0xdc, 0x1800a2bbc\nlea     r9, [rsp+48h+arg_0]                                            ; +0xdf, 0x1800a2bbf\nlea     r8, aRb_0; \"rb\"                                                ; +0xe4, 0x1800a2bc4\nmov     rdx, rbp                                                       ; +0xeb, 0x1800a2bcb\ncall    qword ptr [rax+18h]                                            ; +0xee, 0x1800a2bce\nmov     rbp, rax                                                       ; +0xf1, 0x1800a2bd1\ntest    rax, rax                                                       ; +0xf4, 0x1800a2bd4\njz      short loc_1800A2C3F                                            ; +0xf7, 0x1800a2bd7\nmov     r8d, [rsp+48h+arg_0]                                           ; +0xf9, 0x1800a2bd9\nmov     rdx, rax                                                       ; +0xfe, 0x1800a2bde\nmov     rcx, rsi                                                       ; +0x101, 0x1800a2be1\ncall    ?Parse@XMLDocument@tinyxml2@@QEAA?AW4XMLError@2@PEBD_K@Z; tinyxml2::XMLDocument::Parse(char const *,unsigned __int64) ; +0x104, 0x1800a2be4\nmov     rcx, rbp; Block                                                ; +0x109, 0x1800a2be9\ncall    j_j_free_0                                                     ; +0x10c, 0x1800a2bec\nxor     edx, edx; char *                                               ; +0x111, 0x1800a2bf1\nmov     rcx, rsi; this                                                 ; +0x113, 0x1800a2bf3\ncall    ?FirstChildElement@XMLNode@tinyxml2@@QEBAPEBVXMLElement@2@PEBD@Z; tinyxml2::XMLNode::FirstChildElement(char const *) ; +0x116, 0x1800a2bf6\nmov     [r15], rax                                                     ; +0x11b, 0x1800a2bfb\ntest    rax, rax                                                       ; +0x11e, 0x1800a2bfe\njz      short loc_1800A2C3F                                            ; +0x121, 0x1800a2c01\nxor     edx, edx; char *                                               ; +0x123, 0x1800a2c03\nmov     rcx, rax; this                                                 ; +0x125, 0x1800a2c05\ncall    ?FirstChildElement@XMLNode@tinyxml2@@QEBAPEBVXMLElement@2@PEBD@Z; tinyxml2::XMLNode::FirstChildElement(char const *) ; +0x128, 0x1800a2c08\nmov     rbx, rax                                                       ; +0x12d, 0x1800a2c0d\ntest    rax, rax                                                       ; +0x130, 0x1800a2c10\njz      short loc_1800A2C3F                                            ; +0x133, 0x1800a2c13\nlea     rcx, [rbx+18h]; this                                           ; +0x135, 0x1800a2c15\ncall    ?GetStr@StrPair@tinyxml2@@QEAAPEBDXZ; tinyxml2::StrPair::GetStr(void) ; +0x139, 0x1800a2c19\nmov     rdx, rdi; Str2                                                 ; +0x13e, 0x1800a2c1e\nmov     rcx, rax; Str1                                                 ; +0x141, 0x1800a2c21\ncall    strcmp                                                         ; +0x144, 0x1800a2c24\ntest    eax, eax                                                       ; +0x149, 0x1800a2c29\njz      short loc_1800A2C3F                                            ; +0x14b, 0x1800a2c2b\nxor     edx, edx; char *                                               ; +0x14d, 0x1800a2c2d\nmov     rcx, rbx; this                                                 ; +0x14f, 0x1800a2c2f\ncall    ?NextSiblingElement@XMLNode@tinyxml2@@QEBAPEBVXMLElement@2@PEBD@Z; tinyxml2::XMLNode::NextSiblingElement(char const *) ; +0x152, 0x1800a2c32\nmov     rbx, rax                                                       ; +0x157, 0x1800a2c37\ntest    rax, rax                                                       ; +0x15a, 0x1800a2c3a\njnz     short loc_1800A2C15                                            ; +0x15d, 0x1800a2c3d\nmov     rax, rbx                                                       ; +0x15f, 0x1800a2c3f\nmov     rbx, [rsp+48h+arg_8]                                           ; +0x162, 0x1800a2c42\nadd     rsp, 20h                                                       ; +0x167, 0x1800a2c47\npop     r15                                                            ; +0x16b, 0x1800a2c4b\npop     r14                                                            ; +0x16d, 0x1800a2c4d\npop     rdi                                                            ; +0x16f, 0x1800a2c4f\npop     rsi                                                            ; +0x170, 0x1800a2c50\npop     rbp                                                            ; +0x171, 0x1800a2c51\nretn                                                                   ; +0x172, 0x1800a2c52", "xrefs": ["cocos2d::CCUserDefault::getBoolForKey @ 0x1800a25ad", "cocos2d::CCUserDefault::getDoubleForKey @ 0x1800a264d", "cocos2d::CCUserDefault::getIntegerForKey @ 0x1800a271c", "cocos2d::CCUserDefault::getStringForKey @ 0x1800a2895", "cocos2d::CCUserDefault::setBoolForKey @ 0x1800a2ffd", "cocos2d::CCUserDefault::setDoubleForKey @ 0x1800a3186", "cocos2d::CCUserDefault::setIntegerForKey @ 0x1800a32c1", "cocos2d::CCUserDefault::setStringForKey @ 0x1800a33cf", "<???> @ 0x1801c18cc"], "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"}