//
// fmt::internal::UTF8ToUTF16::UTF8ToUTF16 from 0x1800412c0 to 0x18004136c (172 bytes)
//
// 2 xrefs:
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bb4d0
//
// 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
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall fmt::internal::UTF8ToUTF16::UTF8ToUTF16(__int64 a1, LPCCH *a2)
{
const CHAR *v3; // rsi
unsigned __int64 cchWideChar; // rbp
*(_QWORD *)a1 = 0;
*(_QWORD *)(a1 + 8) = 500;
*(_QWORD *)(a1 + 16) = a1 + 24;
v3 = *a2;
cchWideChar = MultiByteToWideChar(0xFDE9u, 8u, *a2, -1, nullptr, 0);
if ( cchWideChar > *(_QWORD *)(a1 + 8) )
sub_180044610(a1);
*(_QWORD *)a1 = cchWideChar;
MultiByteToWideChar(0xFDE9u, 8u, v3, -1, *(LPWSTR *)(a1 + 16), cchWideChar);
return a1;
}