//
// sub_180041030 from 0x180041030 to 0x180041092 (98 bytes)
//
// 9 xrefs:
// > sub_18003D560 @ 0x18003d7fd
// > sub_18003D560 @ 0x18003d80d
// > sub_18003D560 @ 0x18003d821
// > sub_18003D560 @ 0x18003d832
// > sub_18003DEC0 @ 0x18003e169
// > sub_18003DEC0 @ 0x18003e179
// > sub_18003DEC0 @ 0x18003e18d
// > sub_18003DEC0 @ 0x18003e19e
// > ??> @ 0x1801b13f8
//
// 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
//
int sub_180041030(char *Buffer, size_t BufferCount, char *Format, ...)
{
unsigned __int64 *v6; // rax
int result; // eax
va_list va; // [rsp+88h] [rbp+20h] BYREF
va_start(va, Format);
v6 = (unsigned __int64 *)sub_180009520();
result = _stdio_common_vsnprintf_s(*v6, Buffer, BufferCount, 0xFFFFFFFFFFFFFFFFuLL, Format, nullptr, va);
if ( result < 0 )
return -1;
return result;
}