{"type": "func", "start": 6443118880, "end": 6443119179, "name": "cocos2d::CCUserDefault::setDoubleForKey", "pseudocode": "// \n// cocos2d::CCUserDefault::setDoubleForKey from 0x1800a3120 to 0x1800a324b (299 bytes)\n// \n// 6 xrefs:\n// > cocos2d::CCUserDefault::setFloatForKey @ 0x1800a3254\n// > <???> @ 0x1801483cc\n// > <???> @ 0x1801483e0\n// > <???> @ 0x1801483f0\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c18fc\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\nvoid __fastcall cocos2d::CCUserDefault::setDoubleForKey(cocos2d::CCUserDefault *this, char *a2, double a3)\n{\n  const struct tinyxml2::XMLElement *v4; // rax\n  tinyxml2::XMLDocument *v5; // rdi\n  struct tinyxml2::XMLElement *v6; // rbx\n  tinyxml2::XMLNode *v7; // rcx\n  struct tinyxml2::XMLNode *v8; // rax\n  const char *v9; // rdx\n  tinyxml2::XMLNode *v10; // [rsp+20h] [rbp-58h] BYREF\n  tinyxml2::XMLDocument *v11; // [rsp+28h] [rbp-50h] BYREF\n  char v12[16]; // [rsp+30h] [rbp-48h] BYREF\n  __int128 v13; // [rsp+40h] [rbp-38h]\n  __int128 v14; // [rsp+50h] [rbp-28h]\n  __int16 v15; // [rsp+60h] [rbp-18h]\n\n  if ( !a2 )\n    return;\n  v15 = 0;\n  *(_OWORD *)v12 = 0;\n  v13 = 0;\n  v14 = 0;\n  sub_1800095F0(v12, \"%f\", a3);\n  v4 = sub_1800A2AE0(a2, &v10, &v11);\n  v5 = v11;\n  v6 = v4;\n  if ( v4 )\n  {\n    v7 = *((tinyxml2::XMLNode **)v4 + 6);\n    if ( v7 )\n    {\n      tinyxml2::XMLNode::SetValue(v7, v12, 0);\n      goto LABEL_8;\n    }\n  }\n  else\n  {\n    if ( !v10 )\n      goto LABEL_8;\n    v6 = tinyxml2::XMLDocument::NewElement(v11, a2);\n    tinyxml2::XMLNode::InsertEndChild(v10, v6);\n  }\n  v8 = tinyxml2::XMLDocument::NewText(v5, v12);\n  tinyxml2::XMLNode::InsertEndChild(v6, v8);\nLABEL_8:\n  if ( v5 )\n  {\n    cocos2d::CCUserDefault::sharedUserDefault();\n    v9 = (const char *)&cocos2d::CCUserDefault::m_sFilePath;\n    if ( *((_QWORD *)&xmmword_1801B2AA0 + 1) > 0xFu )\n      v9 = cocos2d::CCUserDefault::m_sFilePath;\n    tinyxml2::XMLDocument::SaveFile((__int64)v5, v9, 0);\n    (*(void (__fastcall **)(tinyxml2::XMLDocument *, __int64))(*(_QWORD *)v5 + 128LL))(v5, 1);\n  }\n}", "assembly": "; \n; cocos2d::CCUserDefault::setDoubleForKey from 0x1800a3120 to 0x1800a324b (299 bytes)\n; \n; 6 xrefs:\n; > cocos2d::CCUserDefault::setFloatForKey @ 0x1800a3254\n; > <???> @ 0x1801483cc\n; > <???> @ 0x1801483e0\n; > <???> @ 0x1801483f0\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c18fc\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; \ntest    rdx, rdx                                                       ; +0x0, 0x1800a3120\njz      locret_1800A324A                                               ; +0x3, 0x1800a3123\nmov     r11, rsp                                                       ; +0x9, 0x1800a3129\npush    rbp                                                            ; +0xc, 0x1800a312c\nsub     rsp, 70h                                                       ; +0xd, 0x1800a312d\nmov     rax, cs:__security_cookie                                      ; +0x11, 0x1800a3131\nxor     rax, rsp                                                       ; +0x18, 0x1800a3138\nmov     [rsp+78h+var_10], rax                                          ; +0x1b, 0x1800a313b\nxorps   xmm0, xmm0                                                     ; +0x20, 0x1800a3140\nmov     [r11+8], rbx                                                   ; +0x23, 0x1800a3143\nmov     rbp, rdx                                                       ; +0x27, 0x1800a3147\nmov     [r11+20h], rdi                                                 ; +0x2a, 0x1800a314a\nxor     eax, eax                                                       ; +0x2e, 0x1800a314e\nlea     rdx, asc_1800EC3B0; \"%f\"                                       ; +0x30, 0x1800a3150\nmovq    r8, xmm2                                                       ; +0x37, 0x1800a3157\nmov     [rsp+78h+var_18], ax                                           ; +0x3c, 0x1800a315c\nlea     rcx, [r11-48h]; Buffer                                         ; +0x41, 0x1800a3161\nmovups  xmmword ptr [rsp+78h+var_48], xmm0                             ; +0x45, 0x1800a3165\nmovups  [rsp+78h+var_38], xmm0                                         ; +0x4a, 0x1800a316a\nmovups  [rsp+78h+var_28], xmm0                                         ; +0x4f, 0x1800a316f\ncall    sub_1800095F0                                                  ; +0x54, 0x1800a3174\nlea     r8, [rsp+78h+var_50]                                           ; +0x59, 0x1800a3179\nmov     rcx, rbp; Str2                                                 ; +0x5e, 0x1800a317e\nlea     rdx, [rsp+78h+var_58]                                          ; +0x61, 0x1800a3181\ncall    sub_1800A2AE0                                                  ; +0x66, 0x1800a3186\nmov     rdi, [rsp+78h+var_50]                                          ; +0x6b, 0x1800a318b\nmov     rbx, rax                                                       ; +0x70, 0x1800a3190\ntest    rax, rax                                                       ; +0x73, 0x1800a3193\njz      short loc_1800A31B0                                            ; +0x76, 0x1800a3196\nmov     rcx, [rax+30h]; this                                           ; +0x78, 0x1800a3198\nlea     rdx, [rsp+78h+var_48]; char *                                  ; +0x7c, 0x1800a319c\ntest    rcx, rcx                                                       ; +0x81, 0x1800a31a1\njz      short loc_1800A31D8                                            ; +0x84, 0x1800a31a4\nxor     r8d, r8d; bool                                                 ; +0x86, 0x1800a31a6\ncall    ?SetValue@XMLNode@tinyxml2@@QEAAXPEBD_N@Z; tinyxml2::XMLNode::SetValue(char const *,bool) ; +0x89, 0x1800a31a9\njmp     short loc_1800A31EB                                            ; +0x8e, 0x1800a31ae\ncmp     [rsp+78h+var_58], 0                                            ; +0x90, 0x1800a31b0\njz      short loc_1800A31EB                                            ; +0x96, 0x1800a31b6\nmov     rdx, rbp; char *                                               ; +0x98, 0x1800a31b8\nmov     rcx, rdi; this                                                 ; +0x9b, 0x1800a31bb\ncall    ?NewElement@XMLDocument@tinyxml2@@QEAAPEAVXMLElement@2@PEBD@Z; tinyxml2::XMLDocument::NewElement(char const *) ; +0x9e, 0x1800a31be\nmov     rcx, [rsp+78h+var_58]; this                                    ; +0xa3, 0x1800a31c3\nmov     rdx, rax; struct tinyxml2::XMLNode *                           ; +0xa8, 0x1800a31c8\nmov     rbx, rax                                                       ; +0xab, 0x1800a31cb\ncall    ?InsertEndChild@XMLNode@tinyxml2@@QEAAPEAV12@PEAV12@@Z; tinyxml2::XMLNode::InsertEndChild(tinyxml2::XMLNode *) ; +0xae, 0x1800a31ce\nlea     rdx, [rsp+78h+var_48]; char *                                  ; +0xb3, 0x1800a31d3\nmov     rcx, rdi; this                                                 ; +0xb8, 0x1800a31d8\ncall    ?NewText@XMLDocument@tinyxml2@@QEAAPEAVXMLText@2@PEBD@Z; tinyxml2::XMLDocument::NewText(char const *) ; +0xbb, 0x1800a31db\nmov     rdx, rax; struct tinyxml2::XMLNode *                           ; +0xc0, 0x1800a31e0\nmov     rcx, rbx; this                                                 ; +0xc3, 0x1800a31e3\ncall    ?InsertEndChild@XMLNode@tinyxml2@@QEAAPEAV12@PEAV12@@Z; tinyxml2::XMLNode::InsertEndChild(tinyxml2::XMLNode *) ; +0xc6, 0x1800a31e6\nmov     rbx, [rsp+78h+arg_0]                                           ; +0xcb, 0x1800a31eb\ntest    rdi, rdi                                                       ; +0xd3, 0x1800a31f3\njz      short loc_1800A3230                                            ; +0xd6, 0x1800a31f6\ncall    ?sharedUserDefault@CCUserDefault@cocos2d@@SAPEAV12@XZ; cocos2d::CCUserDefault::sharedUserDefault(void) ; +0xd8, 0x1800a31f8\ncmp     qword ptr cs:xmmword_1801B2AA0+8, 0Fh                          ; +0xdd, 0x1800a31fd\nlea     rdx, ?m_sFilePath@CCUserDefault@cocos2d@@0V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A; std::string cocos2d::CCUserDefault::m_sFilePath ; +0xe5, 0x1800a3205\nmov     rcx, rdi                                                       ; +0xec, 0x1800a320c\ncmova   rdx, 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 ; +0xef, 0x1800a320f\nxor     r8d, r8d                                                       ; +0xf7, 0x1800a3217\ncall    ?SaveFile@XMLDocument@tinyxml2@@QEAA?AW4XMLError@2@PEBD_N@Z; tinyxml2::XMLDocument::SaveFile(char const *,bool) ; +0xfa, 0x1800a321a\nmov     rax, [rdi]                                                     ; +0xff, 0x1800a321f\nmov     edx, 1                                                         ; +0x102, 0x1800a3222\nmov     rcx, rdi                                                       ; +0x107, 0x1800a3227\ncall    qword ptr [rax+80h]                                            ; +0x10a, 0x1800a322a\nmov     rdi, [rsp+78h+arg_18]                                          ; +0x110, 0x1800a3230\nmov     rcx, [rsp+78h+var_10]                                          ; +0x118, 0x1800a3238\nxor     rcx, rsp; StackCookie                                          ; +0x11d, 0x1800a323d\ncall    __security_check_cookie                                        ; +0x120, 0x1800a3240\nadd     rsp, 70h                                                       ; +0x125, 0x1800a3245\npop     rbp                                                            ; +0x129, 0x1800a3249\nretn                                                                   ; +0x12a, 0x1800a324a", "xrefs": ["cocos2d::CCUserDefault::setFloatForKey @ 0x1800a3254", "<???> @ 0x1801483cc", "<???> @ 0x1801483e0", "<???> @ 0x1801483f0", "<???> @ 0x18014cf68", "<???> @ 0x1801c18fc"], "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"}