//
// fmt::internal::UTF16ToUTF8::Convert from 0x180041750 to 0x1800417f3 (163 bytes)
//
// 2 xrefs:
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bb500
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:21:39 +0000
//
DWORD __fastcall fmt::internal::UTF16ToUTF8::Convert(__int64 a1, LPCWCH *a2)
{
const WCHAR *v2; // rsi
int v4; // eax
int cbMultiByte; // ebx
v2 = *a2;
v4 = WideCharToMultiByte(0xFDE9u, 0, *a2, -1, nullptr, 0, nullptr, nullptr);
cbMultiByte = v4;
if ( v4
&& (sub_180044BB0(a1, v4),
WideCharToMultiByte(0xFDE9u, 0, v2, -1, *(LPSTR *)(a1 + 16), cbMultiByte, nullptr, nullptr)) )
{
return 0;
}
else
{
return GetLastError();
}
}