//
// sub_180047250 from 0x180047250 to 0x1800472ae (94 bytes)
//
// 10 xrefs:
// > sub_1800E1ED0 @ 0x1800e1ed7
// > sub_1800E1EE0 @ 0x1800e1ee7
// > int `__acrt_get_current_directory<__crt_win32_buffer_internal_dynamic_resizing> @ 0x1800e1ef7
// > int `std::exception_ptr::_Current_exception @ 0x1800e2f5b
// > ??> @ 0x180137913
// > ??> @ 0x180137919
// > ??> @ 0x18013791f
// > ??> @ 0x180137925
// > ??> @ 0x18013e577
// > ??> @ 0x1801b180c
//
// 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
//
__int64 __fastcall sub_180047250(__int64 a1)
{
_QWORD *v2; // rcx
__int64 result; // rax
v2 = *(_QWORD **)a1;
if ( v2 )
{
if ( (unsigned __int64)(2 * ((__int64)(*(_QWORD *)(a1 + 16) - (_QWORD)v2) >> 1)) >= 0x1000 )
{
if ( (unsigned __int64)v2 - *(v2 - 1) - 8 > 0x1F )
invalid_parameter_noinfo_noreturn();
v2 = (_QWORD *)*(v2 - 1);
}
j_j_free_0(v2);
result = 0;
*(_QWORD *)a1 = 0;
*(_QWORD *)(a1 + 8) = 0;
*(_QWORD *)(a1 + 16) = 0;
}
return result;
}