{"type": "func", "start": 6443008480, "end": 6443008641, "name": "pugi::xml_document::save_file", "pseudocode": "// \n// pugi::xml_document::save_file from 0x1800881e0 to 0x180088281 (161 bytes)\n// \n// 4 xrefs:\n// > DS_Dictionary::saveRootSubDictToFile @ 0x18001def7\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bf82c\n// > <???> @ 0x1801bf838\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:05 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nchar __fastcall pugi::xml_document::save_file(__int64 *a1, const char *a2, const char *a3, unsigned int a4, int a5)\n{\n  const char *v9; // rdx\n  FILE *v10; // rax\n  FILE *v11; // rdi\n  int v12; // ebx\n  _QWORD v14[3]; // [rsp+30h] [rbp-18h] BYREF\n\n  v9 = \"wb\";\n  if ( (a4 & 0x20) != 0 )\n    v9 = \"w\";\n  v10 = fopen(a2, v9);\n  v11 = v10;\n  if ( v10 )\n  {\n    v14[0] = &pugi::xml_writer_file::`vftable';\n    v14[1] = v10;\n    pugi::xml_document::save(a1, (__int64)v14, a3, a4, a5);\n    v12 = ferror(v11);\n    fclose(v11);\n    LOBYTE(v10) = v12 == 0;\n  }\n  return (char)v10;\n}", "assembly": "; \n; pugi::xml_document::save_file from 0x1800881e0 to 0x180088281 (161 bytes)\n; \n; 4 xrefs:\n; > DS_Dictionary::saveRootSubDictToFile @ 0x18001def7\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bf82c\n; > <???> @ 0x1801bf838\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:05 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1800881e0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1800881e5\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x1800881ea\npush    rdi                                                            ; +0xf, 0x1800881ef\nsub     rsp, 40h                                                       ; +0x10, 0x1800881f0\nmov     ebx, r9d                                                       ; +0x14, 0x1800881f4\nmov     rsi, r8                                                        ; +0x17, 0x1800881f7\nmov     rax, rdx                                                       ; +0x1a, 0x1800881fa\nmov     rbp, rcx                                                       ; +0x1d, 0x1800881fd\ntest    r9b, 20h                                                       ; +0x20, 0x180088200\nlea     rcx, aW_0; \"w\"                                                 ; +0x24, 0x180088204\nlea     rdx, Mode; \"wb\"                                                ; +0x2b, 0x18008820b\ncmovnz  rdx, rcx; Mode                                                 ; +0x32, 0x180088212\nmov     rcx, rax; FileName                                             ; +0x36, 0x180088216\ncall    cs:fopen                                                       ; +0x39, 0x180088219\nmov     rdi, rax                                                       ; +0x3f, 0x18008821f\ntest    rax, rax                                                       ; +0x42, 0x180088222\njz      short loc_18008826C                                            ; +0x45, 0x180088225\nlea     rax, ??_7xml_writer_file@pugi@@6B@; const pugi::xml_writer_file::`vftable' ; +0x47, 0x180088227\nmov     [rsp+48h+var_18], rax                                          ; +0x4e, 0x18008822e\nmov     [rsp+48h+var_10], rdi                                          ; +0x53, 0x180088233\nmov     eax, [rsp+48h+arg_20]                                          ; +0x58, 0x180088238\nmov     [rsp+48h+var_28], eax                                          ; +0x5c, 0x18008823c\nmov     r9d, ebx                                                       ; +0x60, 0x180088240\nmov     r8, rsi                                                        ; +0x63, 0x180088243\nlea     rdx, [rsp+48h+var_18]                                          ; +0x66, 0x180088246\nmov     rcx, rbp                                                       ; +0x6b, 0x18008824b\ncall    ?save@xml_document@pugi@@QEBAXAEAVxml_writer@2@PEBDIW4xml_encoding@2@@Z; pugi::xml_document::save(pugi::xml_writer &,char const *,uint,pugi::xml_encoding) ; +0x6e, 0x18008824e\nmov     rcx, rdi; Stream                                               ; +0x73, 0x180088253\ncall    cs:ferror                                                      ; +0x76, 0x180088256\nmov     ebx, eax                                                       ; +0x7c, 0x18008825c\nmov     rcx, rdi; Stream                                               ; +0x7e, 0x18008825e\ncall    cs:fclose                                                      ; +0x81, 0x180088261\ntest    ebx, ebx                                                       ; +0x87, 0x180088267\nsetz    al                                                             ; +0x89, 0x180088269\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x8c, 0x18008826c\nmov     rbp, [rsp+48h+arg_8]                                           ; +0x91, 0x180088271\nmov     rsi, [rsp+48h+arg_10]                                          ; +0x96, 0x180088276\nadd     rsp, 40h                                                       ; +0x9b, 0x18008827b\npop     rdi                                                            ; +0x9f, 0x18008827f\nretn                                                                   ; +0xa0, 0x180088280", "xrefs": ["DS_Dictionary::saveRootSubDictToFile @ 0x18001def7", "<???> @ 0x18014cf68", "<???> @ 0x1801bf82c", "<???> @ 0x1801bf838"], "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"}