{"type": "func", "start": 6442716960, "end": 6442717121, "name": "fmt::internal::UTF16ToUTF8::Convert", "pseudocode": "// \n// fmt::internal::UTF16ToUTF8::Convert from 0x180040f20 to 0x180040fc1 (161 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b13ec\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\nDWORD __fastcall fmt::internal::UTF16ToUTF8::Convert(__int64 a1, LPCWCH *a2)\n{\n  const WCHAR *v2; // rdi\n  int v4; // eax\n  int cbMultiByte; // ebx\n\n  v2 = *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, v2, -1, *(LPSTR *)(a1 + 16), cbMultiByte, nullptr, nullptr)) )\n  {\n    return 0;\n  }\n  else\n  {\n    return GetLastError();\n  }\n}", "assembly": "; \n; fmt::internal::UTF16ToUTF8::Convert from 0x180040f20 to 0x180040fc1 (161 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b13ec\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     rax, rsp                                                       ; +0x0, 0x180040f20\nmov     [rax+8], rbx                                                   ; +0x3, 0x180040f23\nmov     [rax+10h], rbp                                                 ; +0x7, 0x180040f27\nmov     [rax+18h], rsi                                                 ; +0xb, 0x180040f2b\npush    rdi                                                            ; +0xf, 0x180040f2f\nsub     rsp, 40h                                                       ; +0x10, 0x180040f30\nmov     rdi, [rdx]                                                     ; +0x14, 0x180040f34\nxor     ebp, ebp                                                       ; +0x17, 0x180040f37\nmov     [rax-10h], rbp                                                 ; +0x19, 0x180040f39\nmov     rsi, rcx                                                       ; +0x1d, 0x180040f3d\nmov     [rax-18h], rbp                                                 ; +0x20, 0x180040f40\nmov     r8, rdi; lpWideCharStr                                         ; +0x24, 0x180040f44\nmov     [rax-20h], ebp                                                 ; +0x27, 0x180040f47\nxor     edx, edx; dwFlags                                              ; +0x2a, 0x180040f4a\nlea     r9d, [rbp-1]; cchWideChar                                      ; +0x2c, 0x180040f4c\nmov     [rax-28h], rbp                                                 ; +0x30, 0x180040f50\nmov     ecx, 0FDE9h; CodePage                                          ; +0x34, 0x180040f54\ncall    cs:WideCharToMultiByte                                         ; +0x39, 0x180040f59\nmovsxd  rbx, eax                                                       ; +0x3f, 0x180040f5f\ntest    eax, eax                                                       ; +0x42, 0x180040f62\njnz     short loc_180040F6E                                            ; +0x44, 0x180040f64\ncall    cs:GetLastError                                                ; +0x46, 0x180040f66\njmp     short loc_180040FAC                                            ; +0x4c, 0x180040f6c\nmov     rdx, rbx                                                       ; +0x4e, 0x180040f6e\nmov     rcx, rsi                                                       ; +0x51, 0x180040f71\ncall    sub_1800447F0                                                  ; +0x54, 0x180040f74\nmov     rax, [rsi+10h]                                                 ; +0x59, 0x180040f79\nmov     r9d, 0FFFFFFFFh; cchWideChar                                   ; +0x5d, 0x180040f7d\nmov     [rsp+48h+lpUsedDefaultChar], rbp; lpUsedDefaultChar            ; +0x63, 0x180040f83\nmov     r8, rdi; lpWideCharStr                                         ; +0x68, 0x180040f88\nmov     [rsp+48h+lpDefaultChar], rbp; lpDefaultChar                    ; +0x6b, 0x180040f8b\nxor     edx, edx; dwFlags                                              ; +0x70, 0x180040f90\nmov     [rsp+48h+cbMultiByte], ebx; cbMultiByte                        ; +0x72, 0x180040f92\nmov     ecx, 0FDE9h; CodePage                                          ; +0x76, 0x180040f96\nmov     [rsp+48h+lpMultiByteStr], rax; lpMultiByteStr                  ; +0x7b, 0x180040f9b\ncall    cs:WideCharToMultiByte                                         ; +0x80, 0x180040fa0\ntest    eax, eax                                                       ; +0x86, 0x180040fa6\njz      short loc_180040F66                                            ; +0x88, 0x180040fa8\nxor     eax, eax                                                       ; +0x8a, 0x180040faa\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x8c, 0x180040fac\nmov     rbp, [rsp+48h+arg_8]                                           ; +0x91, 0x180040fb1\nmov     rsi, [rsp+48h+arg_10]                                          ; +0x96, 0x180040fb6\nadd     rsp, 40h                                                       ; +0x9b, 0x180040fbb\npop     rdi                                                            ; +0x9f, 0x180040fbf\nretn                                                                   ; +0xa0, 0x180040fc0", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b13ec"], "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"}