//
// sub_CFE304 from 0xcfe304 to 0xcfe36c (104 bytes)
//
// 1 xrefs:
// > sub_CFE36C @ 0xcfe39c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void *__fastcall sub_CFE304(__int64 a1)
{
unsigned __int64 v2; // x0
unsigned __int64 v3; // x2
__int64 v4; // x1
void *result; // x0
v2 = sub_CEA974(&qword_124B678);
v3 = *(_QWORD *)(*(_QWORD *)a1 + 16LL);
v4 = *(_QWORD *)(*(_QWORD *)a1 + 8LL);
if ( v2 >= v3 || (v2 = *(_QWORD *)(v4 + 8 * v2)) == 0 )
sub_D13870(v2, v4, v3);
result = _dynamic_cast(
(const void *)v2,
(const struct __class_type_info *)&`typeinfo for'std::locale::facet,
(const struct __class_type_info *)&`typeinfo for'std::numpunct,
0);
if ( !result )
_cxa_bad_cast();
return result;
}