{"type": "func", "start": 6442715600, "end": 6442715783, "name": "fmt::internal::UTF16ToUTF8::UTF16ToUTF8", "pseudocode": "// \n// fmt::internal::UTF16ToUTF8::UTF16ToUTF8 from 0x1800409d0 to 0x180040a87 (183 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b13b0\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 fmt::internal::UTF16ToUTF8::UTF16ToUTF8(__int64 a1, LPCWCH *a2)\n{\n  const WCHAR *v3; // rsi\n  int v4; // eax\n  int cbMultiByte; // edi\n\n  *(_QWORD *)a1 = 0;\n  *(_QWORD *)(a1 + 8) = 500;\n  *(_QWORD *)(a1 + 16) = a1 + 24;\n  v3 = *a2;\n  v4 = WideCharToMultiByte(0xFDE9u, 0, *a2, -1, nullptr, 0, nullptr, nullptr);\n  cbMultiByte = v4;\n  if ( !v4\n    || (sub_1800447F0(a1, v4),\n        !WideCharToMultiByte(0xFDE9u, 0, v3, -1, *(LPSTR *)(a1 + 16), cbMultiByte, nullptr, nullptr)) )\n  {\n    GetLastError();\n  }\n  return a1;\n}", "assembly": "; \n; fmt::internal::UTF16ToUTF8::UTF16ToUTF8 from 0x1800409d0 to 0x180040a87 (183 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b13b0\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\nmov     r11, rsp                                                       ; +0x0, 0x1800409d0\nmov     [r11+10h], rbx                                                 ; +0x3, 0x1800409d3\nmov     [r11+18h], rbp                                                 ; +0x7, 0x1800409d7\nmov     [r11+20h], rsi                                                 ; +0xb, 0x1800409db\nmov     [r11+8], rcx                                                   ; +0xf, 0x1800409df\npush    rdi                                                            ; +0x13, 0x1800409e3\nsub     rsp, 40h                                                       ; +0x14, 0x1800409e4\nmov     rbx, rcx                                                       ; +0x18, 0x1800409e8\nxor     ebp, ebp                                                       ; +0x1b, 0x1800409eb\nmov     [rcx], rbp                                                     ; +0x1d, 0x1800409ed\nmov     qword ptr [rcx+8], 1F4h                                        ; +0x20, 0x1800409f0\nlea     rax, [rcx+18h]                                                 ; +0x28, 0x1800409f8\nmov     [rcx+10h], rax                                                 ; +0x2c, 0x1800409fc\nmov     [r11-10h], rbp                                                 ; +0x30, 0x180040a00\nmov     [r11-18h], rbp                                                 ; +0x34, 0x180040a04\nmov     [rsp+48h+cbMultiByte], ebp; cbMultiByte                        ; +0x38, 0x180040a08\nmov     [r11-28h], rbp                                                 ; +0x3c, 0x180040a0c\nlea     r9d, [rbp-1]; cchWideChar                                      ; +0x40, 0x180040a10\nmov     rsi, [rdx]                                                     ; +0x44, 0x180040a14\nmov     r8, rsi; lpWideCharStr                                         ; +0x47, 0x180040a17\nxor     edx, edx; dwFlags                                              ; +0x4a, 0x180040a1a\nmov     ecx, 0FDE9h; CodePage                                          ; +0x4c, 0x180040a1c\ncall    cs:WideCharToMultiByte                                         ; +0x51, 0x180040a21\nmovsxd  rdi, eax                                                       ; +0x57, 0x180040a27\ntest    eax, eax                                                       ; +0x5a, 0x180040a2a\njz      short loc_180040A68                                            ; +0x5c, 0x180040a2c\nmov     rdx, rdi                                                       ; +0x5e, 0x180040a2e\nmov     rcx, rbx                                                       ; +0x61, 0x180040a31\ncall    sub_1800447F0                                                  ; +0x64, 0x180040a34\nmov     rdx, [rbx+10h]                                                 ; +0x69, 0x180040a39\nmov     [rsp+48h+lpUsedDefaultChar], rbp; lpUsedDefaultChar            ; +0x6d, 0x180040a3d\nmov     [rsp+48h+lpDefaultChar], rbp; lpDefaultChar                    ; +0x72, 0x180040a42\nmov     [rsp+48h+cbMultiByte], edi; cbMultiByte                        ; +0x77, 0x180040a47\nmov     [rsp+48h+lpMultiByteStr], rdx; lpMultiByteStr                  ; +0x7b, 0x180040a4b\nlea     r9d, [rbp-1]; cchWideChar                                      ; +0x80, 0x180040a50\nmov     r8, rsi; lpWideCharStr                                         ; +0x84, 0x180040a54\nxor     edx, edx; dwFlags                                              ; +0x87, 0x180040a57\nmov     ecx, 0FDE9h; CodePage                                          ; +0x89, 0x180040a59\ncall    cs:WideCharToMultiByte                                         ; +0x8e, 0x180040a5e\ntest    eax, eax                                                       ; +0x94, 0x180040a64\njnz     short loc_180040A6F                                            ; +0x96, 0x180040a66\ncall    cs:GetLastError                                                ; +0x98, 0x180040a68\nnop                                                                    ; +0x9e, 0x180040a6e\nmov     rax, rbx                                                       ; +0x9f, 0x180040a6f\nmov     rbx, [rsp+48h+arg_8]                                           ; +0xa2, 0x180040a72\nmov     rbp, [rsp+48h+arg_10]                                          ; +0xa7, 0x180040a77\nmov     rsi, [rsp+48h+arg_18]                                          ; +0xac, 0x180040a7c\nadd     rsp, 40h                                                       ; +0xb1, 0x180040a81\npop     rdi                                                            ; +0xb5, 0x180040a85\nretn                                                                   ; +0xb6, 0x180040a86", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b13b0"], "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"}