{"type": "func", "start": 6442996496, "end": 6442996685, "name": "pugi::xml_document::save_string", "pseudocode": "// \n// pugi::xml_document::save_string from 0x180085310 to 0x1800853cd (189 bytes)\n// \n// 4 xrefs:\n// > DS_Dictionary::saveRootSubDictToCompressedFile @ 0x18001d687\n// > DS_Dictionary::saveRootSubDictToString @ 0x18001e284\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b55b0\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\n// Hidden C++ exception states: #wind=1\n__int64 __fastcall pugi::xml_document::save_string(__int64 *a1, __int64 a2, __int64 a3, unsigned int a4, int a5)\n{\n  void *v6; // rcx\n  void **v8; // [rsp+40h] [rbp-38h] BYREF\n  void *Block[2]; // [rsp+48h] [rbp-30h] BYREF\n  __m128i si128; // [rsp+58h] [rbp-20h]\n\n  v8 = &xml_string_writer::`vftable';\n  *(_OWORD *)Block = 0;\n  si128 = _mm_load_si128((const __m128i *)&xmmword_1800E7160);\n  LOBYTE(Block[0]) = 0;\n  pugi::xml_document::save(a1, (__int64)&v8, a3, a4, a5);\n  sub_180016C80(a2, (__int64)Block);\n  if ( si128.m128i_i64[1] > 0xFuLL )\n  {\n    v6 = Block[0];\n    if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )\n    {\n      v6 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free_0(v6);\n  }\n  return a2;\n}", "assembly": "; \n; pugi::xml_document::save_string from 0x180085310 to 0x1800853cd (189 bytes)\n; \n; 4 xrefs:\n; > DS_Dictionary::saveRootSubDictToCompressedFile @ 0x18001d687\n; > DS_Dictionary::saveRootSubDictToString @ 0x18001e284\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b55b0\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    rbx                                                            ; +0x0, 0x180085310\nsub     rsp, 70h                                                       ; +0x2, 0x180085312\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x180085316\nxor     rax, rsp                                                       ; +0xd, 0x18008531d\nmov     [rsp+78h+var_10], rax                                          ; +0x10, 0x180085320\nmov     rbx, rdx                                                       ; +0x15, 0x180085325\nmov     [rsp+78h+var_40], rdx                                          ; +0x18, 0x180085328\nmov     eax, [rsp+78h+arg_20]                                          ; +0x1d, 0x18008532d\nlea     rdx, ??_7xml_string_writer@@6B@; const xml_string_writer::`vftable' ; +0x24, 0x180085334\nmov     [rsp+78h+var_38], rdx                                          ; +0x2b, 0x18008533b\nxorps   xmm0, xmm0                                                     ; +0x30, 0x180085340\nmovups  xmmword ptr [rsp+78h+Block], xmm0                              ; +0x33, 0x180085343\nmovdqa  xmm1, cs:xmmword_1800E7160                                     ; +0x38, 0x180085348\nmovdqu  [rsp+78h+var_20], xmm1                                         ; +0x40, 0x180085350\nmov     byte ptr [rsp+78h+Block], 0                                    ; +0x46, 0x180085356\nmov     [rsp+78h+var_58], eax                                          ; +0x4b, 0x18008535b\nlea     rdx, [rsp+78h+var_38]                                          ; +0x4f, 0x18008535f\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) ; +0x54, 0x180085364\nlea     rdx, [rsp+78h+Block]                                           ; +0x59, 0x180085369\nmov     rcx, rbx                                                       ; +0x5e, 0x18008536e\ncall    sub_180016C80                                                  ; +0x61, 0x180085371\nnop                                                                    ; +0x66, 0x180085376\nmov     rdx, qword ptr [rsp+78h+var_20+8]                              ; +0x67, 0x180085377\ncmp     rdx, 0Fh                                                       ; +0x6c, 0x18008537c\njbe     short loc_1800853B7                                            ; +0x70, 0x180085380\ninc     rdx                                                            ; +0x72, 0x180085382\nmov     rcx, [rsp+78h+Block]; Block                                    ; +0x75, 0x180085385\nmov     rax, rcx                                                       ; +0x7a, 0x18008538a\ncmp     rdx, 1000h                                                     ; +0x7d, 0x18008538d\njb      short loc_1800853B2                                            ; +0x84, 0x180085394\nadd     rdx, 27h ; '''                                                 ; +0x86, 0x180085396\nmov     rcx, [rcx-8]                                                   ; +0x8a, 0x18008539a\nsub     rax, rcx                                                       ; +0x8e, 0x18008539e\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x91, 0x1800853a1\ncmp     rax, 1Fh                                                       ; +0x95, 0x1800853a5\njbe     short loc_1800853B2                                            ; +0x99, 0x1800853a9\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x9b, 0x1800853ab\nalign 2                                                                ; +0xa1, 0x1800853b1\ncall    j_j_free_0                                                     ; +0xa2, 0x1800853b2\nmov     rax, rbx                                                       ; +0xa7, 0x1800853b7\nmov     rcx, [rsp+78h+var_10]                                          ; +0xaa, 0x1800853ba\nxor     rcx, rsp; StackCookie                                          ; +0xaf, 0x1800853bf\ncall    __security_check_cookie                                        ; +0xb2, 0x1800853c2\nadd     rsp, 70h                                                       ; +0xb7, 0x1800853c7\npop     rbx                                                            ; +0xbb, 0x1800853cb\nretn                                                                   ; +0xbc, 0x1800853cc", "xrefs": ["DS_Dictionary::saveRootSubDictToCompressedFile @ 0x18001d687", "DS_Dictionary::saveRootSubDictToString @ 0x18001e284", "<???> @ 0x1801438a8", "<???> @ 0x1801b55b0"], "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"}